diff --git a/docs/_astro/App.DRMFD-wl.js b/docs/_astro/App.DRMFD-wl.js deleted file mode 100644 index 9687be0..0000000 --- a/docs/_astro/App.DRMFD-wl.js +++ /dev/null @@ -1,6409 +0,0 @@ -import{j as St}from"./jsx-runtime.BFYNFNPI.js";import{g as zf,r as Fr,a as ri,c as f1}from"./index.DIpCM_17.js";import{p as d1,a as Uf}from"./index.DxhZiom7.js";import{t as we}from"./index.BH1EYZ08.js";var Xf={exports:{}},te={};/** - * @license React - * react-is.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Zo=Symbol.for("react.element"),Jo=Symbol.for("react.portal"),Lr=Symbol.for("react.fragment"),Or=Symbol.for("react.strict_mode"),Dr=Symbol.for("react.profiler"),Ir=Symbol.for("react.provider"),Br=Symbol.for("react.context"),c1=Symbol.for("react.server_context"),br=Symbol.for("react.forward_ref"),Nr=Symbol.for("react.suspense"),Gr=Symbol.for("react.suspense_list"),zr=Symbol.for("react.memo"),Ur=Symbol.for("react.lazy"),v1=Symbol.for("react.offscreen"),Vf;Vf=Symbol.for("react.module.reference");function oi(S){if(typeof S=="object"&&S!==null){var T=S.$$typeof;switch(T){case Zo:switch(S=S.type,S){case Lr:case Dr:case Or:case Nr:case Gr:return S;default:switch(S=S&&S.$$typeof,S){case c1:case Br:case br:case Ur:case zr:case Ir:return S;default:return T}}case Jo:return T}}}te.ContextConsumer=Br;te.ContextProvider=Ir;te.Element=Zo;te.ForwardRef=br;te.Fragment=Lr;te.Lazy=Ur;te.Memo=zr;te.Portal=Jo;te.Profiler=Dr;te.StrictMode=Or;te.Suspense=Nr;te.SuspenseList=Gr;te.isAsyncMode=function(){return!1};te.isConcurrentMode=function(){return!1};te.isContextConsumer=function(S){return oi(S)===Br};te.isContextProvider=function(S){return oi(S)===Ir};te.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===Zo};te.isForwardRef=function(S){return oi(S)===br};te.isFragment=function(S){return oi(S)===Lr};te.isLazy=function(S){return oi(S)===Ur};te.isMemo=function(S){return oi(S)===zr};te.isPortal=function(S){return oi(S)===Jo};te.isProfiler=function(S){return oi(S)===Dr};te.isStrictMode=function(S){return oi(S)===Or};te.isSuspense=function(S){return oi(S)===Nr};te.isSuspenseList=function(S){return oi(S)===Gr};te.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===Lr||S===Dr||S===Or||S===Nr||S===Gr||S===v1||typeof S=="object"&&S!==null&&(S.$$typeof===Ur||S.$$typeof===zr||S.$$typeof===Ir||S.$$typeof===Br||S.$$typeof===br||S.$$typeof===Vf||S.getModuleId!==void 0)};te.typeOf=oi;Xf.exports=te;var Wf=Xf.exports;function p1(S){function T(J,X,Y,b,z){for(var W=0,H=0,Z=0,Q=0,k,et,st=0,rt=0,ot,ft=ot=k=0,at=0,vt=0,At=0,Et=0,Pt=Y.length,ct=Pt-1,Ct,pt="",wt="",Bt="",jt="",zt;atk)&&(Et=(pt=pt.replace(" ",":")).length),0b&&(b=(X=X.trim()).charCodeAt(0)),b){case 38:return X.replace(s,"$1"+J.trim());case 58:return J.trim()+X.replace(s,"$1"+J.trim());default:if(0<1*Y&&0H.charCodeAt(8))break;case 115:z=z.replace(H,"-webkit-"+H)+";"+z;break;case 207:case 102:z=z.replace(H,"-webkit-"+(102Y.charCodeAt(0)&&(Y=Y.trim()),j=Y,Y=[j],01?T-1:0),w=1;w0?" Args: "+E.join(", "):""))}var b1=function(){function S(E){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=E}var T=S.prototype;return T.indexOfGroup=function(E){for(var w=0,O=0;O=this.groupSizes.length){for(var O=this.groupSizes,D=O.length,c=D;E>=c;)(c<<=1)<0&&xn(16,""+E);this.groupSizes=new Uint32Array(c),this.groupSizes.set(O),this.length=c;for(var m=D;m=this.length||this.groupSizes[E]===0)return w;for(var O=this.groupSizes[E],D=this.indexOfGroup(E),c=D+O,m=D;m=ln&&(ln=T+1),pr.set(S,T),Er.set(T,S)},z1="style["+bs+'][data-styled-version="5.3.6"]',U1=new RegExp("^"+bs+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),X1=function(S,T,E){for(var w,O=E.split(","),D=0,c=O.length;D=0;a--){var v=t[a];if(v&&v.nodeType===1&&v.hasAttribute(bs))return v}}(E),D=O!==void 0?O.nextSibling:null;w.setAttribute(bs,"active"),w.setAttribute("data-styled-version","5.3.6");var c=W1();return c&&w.setAttribute("nonce",c),E.insertBefore(w,D),w},Y1=function(){function S(E){var w=this.element=$f(E);w.appendChild(document.createTextNode("")),this.sheet=function(O){if(O.sheet)return O.sheet;for(var D=document.styleSheets,c=0,m=D.length;c=0){var O=document.createTextNode(w),D=this.nodes[E];return this.element.insertBefore(O,D||null),this.length++,!0}return!1},T.deleteRule=function(E){this.element.removeChild(this.nodes[E]),this.length--},T.getRule=function(E){return E0&&(o+=r+",")}),D+=""+a+v+'{content:"'+o+`"}/*!sc*/ -`}}}return D}(this)},S}(),$1=/(a)(d)/gi,nf=function(S){return String.fromCharCode(S+(S>25?39:97))};function Lo(S){var T,E="";for(T=Math.abs(S);T>52;T=T/52|0)E=nf(T%52)+E;return(nf(T%52)+E).replace($1,"$1-$2")}var Ls=function(S,T){for(var E=T.length;E;)S=33*S^T.charCodeAt(--E);return S},Jf=function(S){return Ls(5381,S)};function Z1(S){for(var T=0;T>>0);if(!E.hasNameForId(O,m)){var t=w(c,"."+m,void 0,O);E.insertRules(O,m,t)}D.push(m),this.staticRulesId=m}else{for(var a=this.rules.length,v=Ls(this.baseHash,w.hash),o="",r=0;r>>0);if(!E.hasNameForId(O,h)){var s=w(o,"."+h,void 0,O);E.insertRules(O,h,s)}D.push(h)}}return D.join(" ")},S}(),k1=/^\s*\/\/.*$/gm,q1=[":","[",".","#"];function _1(S){var T,E,w,O,D=S===void 0?Zi:S,c=D.options,m=c===void 0?Zi:c,t=D.plugins,a=t===void 0?Cr:t,v=new p1(m),o=[],r=function(i){function h(s){if(s)try{i(s+"}")}catch{}}return function(s,l,f,u,d,p,g,x,y,C){switch(s){case 1:if(y===0&&l.charCodeAt(0)===64)return i(l+";"),"";break;case 2:if(x===0)return l+"/*|*/";break;case 3:switch(x){case 102:case 112:return i(f[0]+l),"";default:return l+(C===0?"/*|*/":"")}case-2:l.split("/*|*/}").forEach(h)}}}(function(i){o.push(i)}),n=function(i,h,s){return h===0&&q1.indexOf(s[E.length])!==-1||s.match(O)?i:"."+T};function e(i,h,s,l){l===void 0&&(l="&");var f=i.replace(k1,""),u=h&&s?s+" "+h+" { "+f+" }":f;return T=l,E=h,w=new RegExp("\\"+E+"\\b","g"),O=new RegExp("(\\"+E+"\\b){2,}"),v(s||!h?"":h,u)}return v.use([].concat(a,[function(i,h,s){i===2&&s.length&&s[0].lastIndexOf(E)>0&&(s[0]=s[0].replace(w,n))},r,function(i){if(i===-2){var h=o;return o=[],h}}])),e.hash=a.length?a.reduce(function(i,h){return h.name||xn(15),Ls(i,h.name)},5381).toString():"",e}var Qf=Fr.createContext();Qf.Consumer;var kf=Fr.createContext(),tT=(kf.Consumer,new Zf),Oo=_1();function eT(){return ri.useContext(Qf)||tT}function iT(){return ri.useContext(kf)||Oo}var sT=function(){function S(T,E){var w=this;this.inject=function(O,D){D===void 0&&(D=Oo);var c=w.name+D.hash;O.hasNameForId(w.id,c)||O.insertRules(w.id,c,D(w.rules,c,"@keyframes"))},this.toString=function(){return xn(12,String(w.name))},this.name=T,this.id="sc-keyframes-"+T,this.rules=E}return S.prototype.getName=function(T){return T===void 0&&(T=Oo),this.name+T.hash},S}(),nT=/([A-Z])/,rT=/([A-Z])/g,aT=/^ms-/,oT=function(S){return"-"+S.toLowerCase()};function rf(S){return nT.test(S)?S.replace(rT,oT).replace(aT,"-ms-"):S}var af=function(S){return S==null||S===!1||S===""};function Ns(S,T,E,w){if(Array.isArray(S)){for(var O,D=[],c=0,m=S.length;c1?T-1:0),w=1;w?@[\\\]^`{|}~-]+/g,fT=/(^-|-$)/g;function yo(S){return S.replace(uT,"-").replace(fT,"")}var dT=function(S){return Lo(Jf(S)>>>0)};function dr(S){return typeof S=="string"&&!0}var Do=function(S){return typeof S=="function"||typeof S=="object"&&S!==null&&!Array.isArray(S)},cT=function(S){return S!=="__proto__"&&S!=="constructor"&&S!=="prototype"};function vT(S,T,E){var w=S[E];Do(T)&&Do(w)?qf(w,T):S[E]=T}function qf(S){for(var T=arguments.length,E=new Array(T>1?T-1:0),w=1;w=0||(C[x]=p[x]);return C}(T,["componentId"]),d=f&&f+"-"+(dr(l)?l:yo(ef(l)));return td(l,Ii({},u,{attrs:r,componentId:d}),E)},Object.defineProperty(e,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(l){this._foldedDefaultProps=w?qf({},S.defaultProps,l):l}}),e.toString=function(){return"."+e.styledComponentId},O&&I1(e,S,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),e}var Pr=function(S){return function T(E,w,O){if(O===void 0&&(O=Zi),!Wf.isValidElementType(w))return xn(1,String(w));var D=function(){return E(w,O,hT.apply(void 0,arguments))};return D.withConfig=function(c){return T(E,w,Ii({},O,{},c))},D.attrs=function(c){return T(E,w,Ii({},O,{attrs:Array.prototype.concat(O.attrs,c).filter(Boolean)}))},D}(td,S)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach(function(S){Pr[S]=Pr(S)});var ed={exports:{}};(function(S,T){(function(w,O){S.exports=O()})(f1,()=>(()=>{var E={50792:c=>{var m=Object.prototype.hasOwnProperty,t="~";function a(){}Object.create&&(a.prototype=Object.create(null),new a().__proto__||(t=!1));function v(e,i,h){this.fn=e,this.context=i,this.once=h||!1}function o(e,i,h,s,l){if(typeof h!="function")throw new TypeError("The listener must be a function");var f=new v(h,s||e,l),u=t?t+i:i;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],f]:e._events[u].push(f):(e._events[u]=f,e._eventsCount++),e}function r(e,i){--e._eventsCount===0?e._events=new a:delete e._events[i]}function n(){this._events=new a,this._eventsCount=0}n.prototype.eventNames=function(){var i=[],h,s;if(this._eventsCount===0)return i;for(s in h=this._events)m.call(h,s)&&i.push(t?s.slice(1):s);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(h)):i},n.prototype.listeners=function(i){var h=t?t+i:i,s=this._events[h];if(!s)return[];if(s.fn)return[s.fn];for(var l=0,f=s.length,u=new Array(f);l{/** - * @author samme - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(38829),v=function(o,r,n,e){for(var i=o[0],h=1;h{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(66979),v=function(o,r,n,e,i){return a(o,"angle",r,n,e,i)};c.exports=v},60757:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){for(var o=0;o{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){v===void 0&&(v=0);for(var o=v;o{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){v===void 0&&(v=0);for(var o=t.length-1;o>=v;o--){var r=t[o],n=!0;for(var e in a)r[e]!==a[e]&&(n=!1);if(n)return r}return null};c.exports=m},94420:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(11879),v=t(60461),o=t(95540),r=t(29747),n=t(41481),e=new n({sys:{queueDepthSort:r,events:{once:r}}},0,0,1,1).setOrigin(0,0),i=function(h,s){s===void 0&&(s={});var l=s.hasOwnProperty("width"),f=s.hasOwnProperty("height"),u=o(s,"width",-1),d=o(s,"height",-1),p=o(s,"cellWidth",1),g=o(s,"cellHeight",p),x=o(s,"position",v.TOP_LEFT),y=o(s,"x",0),C=o(s,"y",0),P=0,M=0,R=u*p,I=d*g;e.setPosition(y,C),e.setSize(p,g);for(var L=0;L{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(66979),v=function(o,r,n,e,i){return a(o,"alpha",r,n,e,i)};c.exports=v},67285:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(66979),v=function(o,r,n,e,i){return a(o,"x",r,n,e,i)};c.exports=v},9074:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(66979),v=function(o,r,n,e,i,h,s){return n==null&&(n=r),a(o,"x",r,e,h,s),a(o,"y",n,i,h,s)};c.exports=v},75222:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(66979),v=function(o,r,n,e,i){return a(o,"y",r,n,e,i)};c.exports=v},22983:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){v===void 0&&(v=0),o===void 0&&(o=6.28);for(var r=v,n=(o-v)/t.length,e=a.x,i=a.y,h=a.radius,s=0;s{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){v===void 0&&(v=0),o===void 0&&(o=6.28);for(var r=v,n=(o-v)/t.length,e=a.width/2,i=a.height/2,h=0;h{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(15258),v=t(26708),o=function(r,n,e){var i;e?i=v(n,e,r.length):i=a(n,r.length);for(var h=0;h{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(14649),v=t(86003),o=t(49498),r=function(n,e,i){i===void 0&&(i=0);var h=a(e,!1,n.length);i>0?v(h,i):i<0&&o(h,Math.abs(i));for(var s=0;s{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(84993),v=function(o,r,n){var e=a({x1:r.x1,y1:r.y1,x2:r.x2,y2:r.y2},n),i=a({x1:r.x2,y1:r.y2,x2:r.x3,y2:r.y3},n),h=a({x1:r.x3,y1:r.y3,x2:r.x1,y2:r.y1},n);e.pop(),i.pop(),h.pop(),e=e.concat(i,h);for(var s=e.length/o.length,l=0,f=0;f{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){for(var o=0;o{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o,r,n){o===void 0&&(o=0),r===void 0&&(r=0),n===void 0&&(n=1);var e,i=0,h=t.length;if(n===1)for(e=r;e=0;e--)t[e][a]+=v+i*o,i++;return t};c.exports=m},43967:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o,r,n){o===void 0&&(o=0),r===void 0&&(r=0),n===void 0&&(n=1);var e,i=0,h=t.length;if(n===1)for(e=r;e=0;e--)t[e][a]=v+i*o,i++;return t};c.exports=m},88926:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(28176),v=function(o,r){for(var n=0;n{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(24820),v=function(o,r){for(var n=0;n{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(65822),v=function(o,r){for(var n=0;n{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(26597),v=function(o,r){for(var n=0;n{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(90260),v=function(o,r){for(var n=0;n{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(66979),v=function(o,r,n,e,i){return a(o,"rotation",r,n,e,i)};c.exports=v},91051:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(1163),v=t(20339),o=function(r,n,e){for(var i=n.x,h=n.y,s=0;s{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(1163),v=function(o,r,n,e){var i=r.x,h=r.y;if(e===0)return o;for(var s=0;s{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(66979),v=function(o,r,n,e,i){return a(o,"scaleX",r,n,e,i)};c.exports=v},94868:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(66979),v=function(o,r,n,e,i,h,s){return n==null&&(n=r),a(o,"scaleX",r,e,h,s),a(o,"scaleY",n,i,h,s)};c.exports=v},95532:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(66979),v=function(o,r,n,e,i){return a(o,"scaleY",r,n,e,i)};c.exports=v},8689:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(43967),v=function(o,r,n,e,i){return a(o,"alpha",r,n,e,i)};c.exports=v},2645:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(43967),v=function(o,r,n,e){return a(o,"blendMode",r,0,n,e)};c.exports=v},32372:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(43967),v=function(o,r,n,e,i){return a(o,"depth",r,n,e,i)};c.exports=v},85373:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){for(var o=0;o{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(43967),v=function(o,r,n,e,i,h,s){return n==null&&(n=r),a(o,"originX",r,e,h,s),a(o,"originY",n,i,h,s),o.forEach(function(l){l.updateDisplayOrigin()}),o};c.exports=v},79939:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(43967),v=function(o,r,n,e,i){return a(o,"rotation",r,n,e,i)};c.exports=v},2699:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(43967),v=function(o,r,n,e,i,h,s){return n==null&&(n=r),a(o,"scaleX",r,e,h,s),a(o,"scaleY",n,i,h,s)};c.exports=v},98739:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(43967),v=function(o,r,n,e,i){return a(o,"scaleX",r,n,e,i)};c.exports=v},98476:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(43967),v=function(o,r,n,e,i){return a(o,"scaleY",r,n,e,i)};c.exports=v},6207:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(43967),v=function(o,r,n,e,i,h,s){return n==null&&(n=r),a(o,"scrollFactorX",r,e,h,s),a(o,"scrollFactorY",n,i,h,s)};c.exports=v},6607:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(43967),v=function(o,r,n,e,i){return a(o,"scrollFactorX",r,n,e,i)};c.exports=v},72248:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(43967),v=function(o,r,n,e,i){return a(o,"scrollFactorY",r,n,e,i)};c.exports=v},14036:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o,r){for(var n=0;n{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(43967),v=function(o,r,n,e){return a(o,"visible",r,0,n,e)};c.exports=v},77597:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(43967),v=function(o,r,n,e,i){return a(o,"x",r,n,e,i)};c.exports=v},83194:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(43967),v=function(o,r,n,e,i,h,s){return n==null&&(n=r),a(o,"x",r,e,h,s),a(o,"y",n,i,h,s)};c.exports=v},67678:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(43967),v=function(o,r,n,e,i){return a(o,"y",r,n,e,i)};c.exports=v},35850:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(26099),v=function(o,r,n,e,i){e===void 0&&(e=0),i===void 0&&(i=new a);var h,s,l=o.length;if(l===1)h=o[0].x,s=o[0].y,o[0].x=r,o[0].y=n;else{var f=1,u=0;e===0&&(u=l-1,f=l-2),h=o[u].x,s=o[u].y,o[u].x=r,o[u].y=n;for(var d=0;d=l||f===-1)){var p=o[f],g=p.x,x=p.y;p.x=h,p.y=s,h=g,s=x,e===0?f--:f++}}return i.x=h,i.y=s,i};c.exports=v},8628:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(33680),v=function(o){return a(o)};c.exports=v},21837:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(7602),v=function(o,r,n,e,i){i===void 0&&(i=!1);var h=Math.abs(e-n)/o.length,s;if(i)for(s=0;s{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(54261),v=function(o,r,n,e,i){i===void 0&&(i=!1);var h=Math.abs(e-n)/o.length,s;if(i)for(s=0;s{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o,r){if(r===void 0&&(r=!1),t.length===0)return t;if(t.length===1)return r?t[0][a]+=(o+v)/2:t[0][a]=(o+v)/2,t;var n=Math.abs(o-v)/(t.length-1),e;if(r)for(e=0;e{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){for(var a=0;a{/** - * @author Richard Davey - * @author samme - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(15994),v=function(o,r,n){n===void 0&&(n=0);for(var e=0;e{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={AlignTo:t(11517),Angle:t(80318),Call:t(60757),GetFirst:t(69927),GetLast:t(32265),GridAlign:t(94420),IncAlpha:t(41721),IncX:t(67285),IncXY:t(9074),IncY:t(75222),PlaceOnCircle:t(22983),PlaceOnEllipse:t(95253),PlaceOnLine:t(88505),PlaceOnRectangle:t(41346),PlaceOnTriangle:t(11575),PlayAnimation:t(29953),PropertyValueInc:t(66979),PropertyValueSet:t(43967),RandomCircle:t(88926),RandomEllipse:t(33286),RandomLine:t(96e3),RandomRectangle:t(28789),RandomTriangle:t(97154),Rotate:t(20510),RotateAround:t(91051),RotateAroundDistance:t(76332),ScaleX:t(61619),ScaleXY:t(94868),ScaleY:t(95532),SetAlpha:t(8689),SetBlendMode:t(2645),SetDepth:t(32372),SetHitArea:t(85373),SetOrigin:t(81583),SetRotation:t(79939),SetScale:t(2699),SetScaleX:t(98739),SetScaleY:t(98476),SetScrollFactor:t(6207),SetScrollFactorX:t(6607),SetScrollFactorY:t(72248),SetTint:t(14036),SetVisible:t(50159),SetX:t(77597),SetXY:t(83194),SetY:t(67678),ShiftPosition:t(35850),Shuffle:t(8628),SmootherStep:t(21910),SmoothStep:t(21837),Spread:t(62054),ToggleVisible:t(79815),WrapInRectangle:t(39665)}},42099:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(45319),v=t(83419),o=t(74943),r=t(81957),n=t(41138),e=t(35154),i=t(90126),h=new v({initialize:function(l,f,u){this.manager=l,this.key=f,this.type="frame",this.frames=this.getFrames(l.textureManager,e(u,"frames",[]),e(u,"defaultTextureKey",null),e(u,"sortFrames",!0)),this.frameRate=e(u,"frameRate",null),this.duration=e(u,"duration",null),this.msPerFrame,this.skipMissedFrames=e(u,"skipMissedFrames",!0),this.delay=e(u,"delay",0),this.repeat=e(u,"repeat",0),this.repeatDelay=e(u,"repeatDelay",0),this.yoyo=e(u,"yoyo",!1),this.showBeforeDelay=e(u,"showBeforeDelay",!1),this.showOnStart=e(u,"showOnStart",!1),this.hideOnComplete=e(u,"hideOnComplete",!1),this.randomFrame=e(u,"randomFrame",!1),this.paused=!1,this.calculateDuration(this,this.getTotalFrames(),this.duration,this.frameRate),this.manager.on&&(this.manager.on(o.PAUSE_ALL,this.pause,this),this.manager.on(o.RESUME_ALL,this.resume,this))},getTotalFrames:function(){return this.frames.length},calculateDuration:function(s,l,f,u){f===null&&u===null?(s.frameRate=24,s.duration=24/l*1e3):f&&u===null?(s.duration=f,s.frameRate=l/(f/1e3)):(s.frameRate=u,s.duration=l/u*1e3),s.msPerFrame=1e3/s.frameRate},addFrame:function(s){return this.addFrameAt(this.frames.length,s)},addFrameAt:function(s,l){var f=this.getFrames(this.manager.textureManager,l);if(f.length>0){if(s===0)this.frames=f.concat(this.frames);else if(s===this.frames.length)this.frames=this.frames.concat(f);else{var u=this.frames.slice(0,s),d=this.frames.slice(s);this.frames=u.concat(f,d)}this.updateFrameSequence()}return this},checkFrame:function(s){return s>=0&&s0){g.isLast=!0,g.nextFrame=d[0],d[0].prevFrame=g;var N=1/(d.length-1);for(y=0;y0?s.inReverse&&s.forward?s.forward=!1:this.repeatAnimation(s):s.complete():this.updateAndGetNextTick(s,l.nextFrame)},handleYoyoFrame:function(s,l){if(l||(l=!1),s.inReverse===!l&&s.repeatCounter>0){(s.repeatDelay===0||s.pendingRepeat)&&(s.forward=l),this.repeatAnimation(s);return}if(s.inReverse!==l&&s.repeatCounter===0){s.complete();return}s.forward=l;var f=l?s.currentFrame.nextFrame:s.currentFrame.prevFrame;this.updateAndGetNextTick(s,f)},getLastFrame:function(){return this.frames[this.frames.length-1]},previousFrame:function(s){var l=s.currentFrame;l.isFirst?s.yoyo?this.handleYoyoFrame(s,!0):s.repeatCounter>0?s.inReverse&&!s.forward?this.repeatAnimation(s):(s.forward=!0,this.repeatAnimation(s)):s.complete():this.updateAndGetNextTick(s,l.prevFrame)},updateAndGetNextTick:function(s,l){s.setCurrentFrame(l),this.getNextTick(s)},removeFrame:function(s){var l=this.frames.indexOf(s);return l!==-1&&this.removeFrameAt(l),this},removeFrameAt:function(s){return this.frames.splice(s,1),this.updateFrameSequence(),this},repeatAnimation:function(s){if(s._pendingStop===2){if(s._pendingStopValue===0)return s.stop();s._pendingStopValue--}s.repeatDelay>0&&!s.pendingRepeat?(s.pendingRepeat=!0,s.accumulator-=s.nextTick,s.nextTick+=s.repeatDelay):(s.repeatCounter--,s.forward?s.setCurrentFrame(s.currentFrame.nextFrame):s.setCurrentFrame(s.currentFrame.prevFrame),s.isPlaying&&(this.getNextTick(s),s.handleRepeat()))},toJSON:function(){var s={key:this.key,type:this.type,frames:[],frameRate:this.frameRate,duration:this.duration,skipMissedFrames:this.skipMissedFrames,delay:this.delay,repeat:this.repeat,repeatDelay:this.repeatDelay,yoyo:this.yoyo,showBeforeDelay:this.showBeforeDelay,showOnStart:this.showOnStart,randomFrame:this.randomFrame,hideOnComplete:this.hideOnComplete};return this.frames.forEach(function(l){s.frames.push(l.toJSON())}),s},updateFrameSequence:function(){for(var s=this.frames.length,l=1/(s-1),f,u=0;u1?(f.isLast=!0,f.prevFrame=this.frames[s-2],f.nextFrame=this.frames[0]):s>1&&(f.prevFrame=this.frames[u-1],f.nextFrame=this.frames[u+1]);return this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},destroy:function(){this.manager.off&&(this.manager.off(o.PAUSE_ALL,this.pause,this),this.manager.off(o.RESUME_ALL,this.resume,this)),this.manager.remove(this.key);for(var s=0;s{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=new a({initialize:function(r,n,e,i,h){h===void 0&&(h=!1),this.textureKey=r,this.textureFrame=n,this.index=e,this.frame=i,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0,this.isKeyFrame=h},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration,keyframe:this.isKeyFrame}},destroy:function(){this.frame=void 0}});c.exports=v},60848:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(42099),v=t(83419),o=t(90330),r=t(50792),n=t(74943),e=t(8443),i=t(95540),h=t(35154),s=t(36383),l=t(20283),f=t(41836),u=new v({Extends:r,initialize:function(p){r.call(this),this.game=p,this.textureManager=null,this.globalTimeScale=1,this.anims=new o,this.mixes=new o,this.paused=!1,this.name="AnimationManager",p.events.once(e.BOOT,this.boot,this)},boot:function(){this.textureManager=this.game.textures,this.game.events.once(e.DESTROY,this.destroy,this)},addMix:function(d,p,g){var x=this.anims,y=this.mixes,C=typeof d=="string"?d:d.key,P=typeof p=="string"?p:p.key;if(x.has(C)&&x.has(P)){var M=y.get(C);M||(M={}),M[P]=g,y.set(C,M)}return this},removeMix:function(d,p){var g=this.mixes,x=typeof d=="string"?d:d.key,y=g.get(x);if(y)if(p){var C=typeof p=="string"?p:p.key;y.hasOwnProperty(C)&&delete y[C]}else p||g.delete(x);return this},getMix:function(d,p){var g=this.mixes,x=typeof d=="string"?d:d.key,y=typeof p=="string"?p:p.key,C=g.get(x);return C&&C.hasOwnProperty(y)?C[y]:0},add:function(d,p){return this.anims.has(d)?(console.warn("Animation key exists: "+d),this):(p.key=d,this.anims.set(d,p),this.emit(n.ADD_ANIMATION,d,p),this)},exists:function(d){return this.anims.has(d)},createFromAseprite:function(d,p,g){var x=[],y=this.game.cache.json.get(d);if(!y)return console.warn("No Aseprite data found for: "+d),x;var C=this,P=h(y,"meta",null),M=h(y,"frames",null);if(P&&M){var R=h(P,"frameTags",[]);R.forEach(function(I){var L=[],B=i(I,"name",null),N=i(I,"from",0),G=i(I,"to",0),V=i(I,"direction","forward");if(B&&(!p||p&&p.indexOf(B)>-1)){for(var K=0,j=N;j<=G;j++){var J=j.toString(),X=M[J];if(X){var Y=i(X,"duration",s.MAX_SAFE_INTEGER);L.push({key:d,frame:J,duration:Y}),K+=Y}}V==="reverse"&&(L=L.reverse());var b={key:B,frames:L,duration:K,yoyo:V==="pingpong"},z;g?g.anims&&(z=g.anims.create(b)):z=C.create(b),z&&x.push(z)}})}return x},create:function(d){var p=d.key,g=!1;return p&&(g=this.get(p),g?console.warn("AnimationManager key already exists: "+p):(g=new a(this,p,d),this.anims.set(p,g),this.emit(n.ADD_ANIMATION,p,g))),g},fromJSON:function(d,p){p===void 0&&(p=!1),p&&this.anims.clear(),typeof d=="string"&&(d=JSON.parse(d));var g=[];if(d.hasOwnProperty("anims")&&Array.isArray(d.anims)){for(var x=0;x{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(42099),v=t(30976),o=t(83419),r=t(90330),n=t(74943),e=t(95540),i=new o({initialize:function(s){this.parent=s,this.animationManager=s.scene.sys.anims,this.animationManager.on(n.REMOVE_ANIMATION,this.globalRemove,this),this.textureManager=this.animationManager.textureManager,this.anims=null,this.isPlaying=!1,this.hasStarted=!1,this.currentAnim=null,this.currentFrame=null,this.nextAnim=null,this.nextAnimsQueue=[],this.timeScale=1,this.frameRate=0,this.duration=0,this.msPerFrame=0,this.skipMissedFrames=!0,this.randomFrame=!1,this.delay=0,this.repeat=0,this.repeatDelay=0,this.yoyo=!1,this.showBeforeDelay=!1,this.showOnStart=!1,this.hideOnComplete=!1,this.forward=!0,this.inReverse=!1,this.accumulator=0,this.nextTick=0,this.delayCounter=0,this.repeatCounter=0,this.pendingRepeat=!1,this._paused=!1,this._wasPlaying=!1,this._pendingStop=0,this._pendingStopValue},chain:function(h){var s=this.parent;if(h===void 0)return this.nextAnimsQueue.length=0,this.nextAnim=null,s;Array.isArray(h)||(h=[h]);for(var l=0;lu&&(g=0),this.randomFrame&&(g=v(0,u-1));var x=f.frames[g];g===0&&!this.forward&&(x=f.getLastFrame()),this.currentFrame=x}return this.parent},pause:function(h){return this._paused||(this._paused=!0,this._wasPlaying=this.isPlaying,this.isPlaying=!1),h!==void 0&&this.setCurrentFrame(h),this.parent},resume:function(h){return this._paused&&(this._paused=!1,this.isPlaying=this._wasPlaying),h!==void 0&&this.setCurrentFrame(h),this.parent},playAfterDelay:function(h,s){if(!this.isPlaying)this.delayCounter=s,this.play(h,!0);else{var l=this.nextAnim,f=this.nextAnimsQueue;l&&f.unshift(l),this.nextAnim=h,this._pendingStop=1,this._pendingStopValue=s}return this.parent},playAfterRepeat:function(h,s){if(s===void 0&&(s=1),!this.isPlaying)this.play(h);else{var l=this.nextAnim,f=this.nextAnimsQueue;l&&f.unshift(l),this.repeatCounter!==-1&&s>this.repeatCounter&&(s=this.repeatCounter),this.nextAnim=h,this._pendingStop=2,this._pendingStopValue=s}return this.parent},play:function(h,s){s===void 0&&(s=!1);var l=this.currentAnim,f=this.parent,u=typeof h=="string"?h:h.key;if(s&&this.isPlaying&&l.key===u)return f;if(l&&this.isPlaying){var d=this.animationManager.getMix(l.key,h);if(d>0)return this.playAfterDelay(h,d)}return this.forward=!0,this.inReverse=!1,this._paused=!1,this._wasPlaying=!0,this.startAnimation(h)},playReverse:function(h,s){s===void 0&&(s=!1);var l=typeof h=="string"?h:h.key;return s&&this.isPlaying&&this.currentAnim.key===l?this.parent:(this.forward=!1,this.inReverse=!0,this._paused=!1,this._wasPlaying=!0,this.startAnimation(h))},startAnimation:function(h){this.load(h);var s=this.currentAnim,l=this.parent;return s&&(this.repeatCounter=this.repeat===-1?Number.MAX_VALUE:this.repeat,s.getFirstTick(this),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!1,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.delayCounter+=this.delay,this.delayCounter===0?this.handleStart():this.showBeforeDelay&&this.setCurrentFrame(this.currentFrame)),l},handleStart:function(){this.showOnStart&&this.parent.setVisible(!0),this.setCurrentFrame(this.currentFrame),this.hasStarted=!0,this.emitEvents(n.ANIMATION_START)},handleRepeat:function(){this.pendingRepeat=!1,this.emitEvents(n.ANIMATION_REPEAT)},handleStop:function(){this._pendingStop=0,this.isPlaying=!1,this.emitEvents(n.ANIMATION_STOP)},handleComplete:function(){this._pendingStop=0,this.isPlaying=!1,this.hideOnComplete&&this.parent.setVisible(!1),this.emitEvents(n.ANIMATION_COMPLETE,n.ANIMATION_COMPLETE_KEY)},emitEvents:function(h,s){var l=this.currentAnim;if(l){var f=this.currentFrame,u=this.parent,d=f.textureFrame;u.emit(h,l,f,u,d),s&&u.emit(s+l.key,l,f,u,d)}},reverse:function(){return this.isPlaying&&(this.inReverse=!this.inReverse,this.forward=!this.forward),this.parent},getProgress:function(){var h=this.currentFrame;if(!h)return 0;var s=h.progress;return this.inReverse&&(s*=-1),s},setProgress:function(h){return this.forward||(h=1-h),this.setCurrentFrame(this.currentAnim.getFrameByProgress(h)),this.parent},setRepeat:function(h){return this.repeatCounter=h===-1?Number.MAX_VALUE:h,this.parent},globalRemove:function(h,s){s===void 0&&(s=this.currentAnim),this.isPlaying&&s.key===this.currentAnim.key&&(this.stop(),this.setCurrentFrame(this.currentAnim.frames[0]))},restart:function(h,s){h===void 0&&(h=!1),s===void 0&&(s=!1);var l=this.currentAnim,f=this.parent;return l?(s&&(this.repeatCounter=this.repeat===-1?Number.MAX_VALUE:this.repeat),l.getFirstTick(this),this.emitEvents(n.ANIMATION_RESTART),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!h,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.setCurrentFrame(l.frames[0]),this.parent):f},complete:function(){if(this._pendingStop=0,this.isPlaying=!1,this.currentAnim&&this.handleComplete(),this.nextAnim){var h=this.nextAnim;this.nextAnim=this.nextAnimsQueue.length>0?this.nextAnimsQueue.shift():null,this.play(h)}return this.parent},stop:function(){if(this._pendingStop=0,this.isPlaying=!1,this.delayCounter=0,this.currentAnim&&this.handleStop(),this.nextAnim){var h=this.nextAnim;this.nextAnim=this.nextAnimsQueue.shift(),this.play(h)}return this.parent},stopAfterDelay:function(h){return this._pendingStop=1,this._pendingStopValue=h,this.parent},stopAfterRepeat:function(h){return h===void 0&&(h=1),this.repeatCounter!==-1&&h>this.repeatCounter&&(h=this.repeatCounter),this._pendingStop=2,this._pendingStopValue=h,this.parent},stopOnFrame:function(h){return this._pendingStop=3,this._pendingStopValue=h,this.parent},getTotalFrames:function(){return this.currentAnim?this.currentAnim.getTotalFrames():0},update:function(h,s){var l=this.currentAnim;if(!(!this.isPlaying||!l||l.paused)){if(this.accumulator+=s*this.timeScale*this.animationManager.globalTimeScale,this._pendingStop===1&&(this._pendingStopValue-=s,this._pendingStopValue<=0))return this.stop();if(!this.hasStarted)this.accumulator>=this.delayCounter&&(this.accumulator-=this.delayCounter,this.handleStart());else if(this.accumulator>=this.nextTick&&(this.forward?l.nextFrame(this):l.previousFrame(this),this.isPlaying&&this._pendingStop===0&&this.skipMissedFrames&&this.accumulator>this.nextTick)){var f=0;do this.forward?l.nextFrame(this):l.previousFrame(this),f++;while(this.isPlaying&&this.accumulator>this.nextTick&&f<60)}}},setCurrentFrame:function(h){var s=this.parent;return this.currentFrame=h,s.texture=h.frame.texture,s.frame=h.frame,s.isCropped&&s.frame.updateCropUVs(s._crop,s.flipX,s.flipY),h.setAlpha&&(s.alpha=h.alpha),s.setSizeToFrame(),s._originComponent&&(h.frame.customPivot?s.setOrigin(h.frame.pivotX,h.frame.pivotY):s.updateDisplayOrigin()),this.isPlaying&&this.hasStarted&&(this.emitEvents(n.ANIMATION_UPDATE),this._pendingStop===3&&this._pendingStopValue===h&&this.stop()),s},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},get:function(h){return this.anims?this.anims.get(h):null},exists:function(h){return this.anims?this.anims.has(h):!1},create:function(h){var s=h.key,l=!1;return s&&(l=this.get(s),l?console.warn("Animation key already exists: "+s):(l=new a(this,s,h),this.anims||(this.anims=new r),this.anims.set(s,l))),l},createFromAseprite:function(h,s){return this.animationManager.createFromAseprite(h,s,this.parent)},generateFrameNames:function(h,s){return this.animationManager.generateFrameNames(h,s)},generateFrameNumbers:function(h,s){return this.animationManager.generateFrameNumbers(h,s)},remove:function(h){var s=this.get(h);return s&&(this.currentAnim===s&&this.stop(),this.anims.delete(h)),s},destroy:function(){this.animationManager.off(n.REMOVE_ANIMATION,this.globalRemove,this),this.anims&&this.anims.clear(),this.animationManager=null,this.parent=null,this.nextAnim=null,this.nextAnimsQueue.length=0,this.currentAnim=null,this.currentFrame=null},isPaused:{get:function(){return this._paused}}});c.exports=i},57090:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="add"},25312:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="animationcomplete"},89580:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="animationcomplete-"},52860:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="animationrepeat"},63850:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="animationrestart"},99085:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="animationstart"},28087:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="animationstop"},1794:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="animationupdate"},52562:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="pauseall"},57953:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="remove"},68339:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="resumeall"},74943:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={ADD_ANIMATION:t(57090),ANIMATION_COMPLETE:t(25312),ANIMATION_COMPLETE_KEY:t(89580),ANIMATION_REPEAT:t(52860),ANIMATION_RESTART:t(63850),ANIMATION_START:t(99085),ANIMATION_STOP:t(28087),ANIMATION_UPDATE:t(1794),PAUSE_ALL:t(52562),REMOVE_ANIMATION:t(57953),RESUME_ALL:t(68339)}},60421:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={Animation:t(42099),AnimationFrame:t(41138),AnimationManager:t(60848),AnimationState:t(9674),Events:t(74943)}},2161:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(90330),o=t(50792),r=t(24736),n=new a({initialize:function(){this.entries=new v,this.events=new o},add:function(e,i){return this.entries.set(e,i),this.events.emit(r.ADD,this,e,i),this},has:function(e){return this.entries.has(e)},exists:function(e){return this.entries.has(e)},get:function(e){return this.entries.get(e)},remove:function(e){var i=this.get(e);return i&&(this.entries.delete(e),this.events.emit(r.REMOVE,this,e,i.data)),this},getKeys:function(){return this.entries.keys()},destroy:function(){this.entries.clear(),this.events.removeAllListeners(),this.entries=null,this.events=null}});c.exports=n},24047:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2161),v=t(83419),o=t(8443),r=new v({initialize:function(e){this.game=e,this.binary=new a,this.bitmapFont=new a,this.json=new a,this.physics=new a,this.shader=new a,this.audio=new a,this.video=new a,this.text=new a,this.html=new a,this.obj=new a,this.tilemap=new a,this.xml=new a,this.custom={},this.game.events.once(o.DESTROY,this.destroy,this)},addCustom:function(n){return this.custom.hasOwnProperty(n)||(this.custom[n]=new a),this.custom[n]},destroy:function(){for(var n=["binary","bitmapFont","json","physics","shader","audio","video","text","html","obj","tilemap","xml"],e=0;e{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="add"},59261:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="remove"},24736:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={ADD:t(51464),REMOVE:t(59261)}},83388:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={BaseCache:t(2161),CacheManager:t(24047),Events:t(24736)}},71911:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(31401),o=t(39506),r=t(50792),n=t(19715),e=t(87841),i=t(61340),h=t(80333),s=t(26099),l=new a({Extends:r,Mixins:[v.AlphaSingle,v.Visible],initialize:function(u,d,p,g){u===void 0&&(u=0),d===void 0&&(d=0),p===void 0&&(p=0),g===void 0&&(g=0),r.call(this),this.scene,this.sceneManager,this.scaleManager,this.cameraManager,this.id=0,this.name="",this.roundPixels=!1,this.useBounds=!1,this.worldView=new e,this.dirty=!0,this._x=u,this._y=d,this._width=p,this._height=g,this._bounds=new e,this._scrollX=0,this._scrollY=0,this._zoomX=1,this._zoomY=1,this._rotation=0,this.matrix=new i,this.transparent=!0,this.backgroundColor=h("rgba(0,0,0,0)"),this.disableCull=!1,this.culledObjects=[],this.midPoint=new s(p/2,g/2),this.originX=.5,this.originY=.5,this._customViewport=!1,this.mask=null,this._maskCamera=null,this.renderList=[],this.isSceneCamera=!0},addToRenderList:function(f){this.renderList.push(f)},setOrigin:function(f,u){return f===void 0&&(f=.5),u===void 0&&(u=f),this.originX=f,this.originY=u,this},getScroll:function(f,u,d){d===void 0&&(d=new s);var p=this.width*.5,g=this.height*.5;return d.x=f-p,d.y=u-g,this.useBounds&&(d.x=this.clampX(d.x),d.y=this.clampY(d.y)),d},centerOnX:function(f){var u=this.width*.5;return this.midPoint.x=f,this.scrollX=f-u,this.useBounds&&(this.scrollX=this.clampX(this.scrollX)),this},centerOnY:function(f){var u=this.height*.5;return this.midPoint.y=f,this.scrollY=f-u,this.useBounds&&(this.scrollY=this.clampY(this.scrollY)),this},centerOn:function(f,u){return this.centerOnX(f),this.centerOnY(u),this},centerToBounds:function(){if(this.useBounds){var f=this._bounds,u=this.width*.5,d=this.height*.5;this.midPoint.set(f.centerX,f.centerY),this.scrollX=f.centerX-u,this.scrollY=f.centerY-d}return this},centerToSize:function(){return this.scrollX=this.width*.5,this.scrollY=this.height*.5,this},cull:function(f){if(this.disableCull)return f;var u=this.matrix.matrix,d=u[0],p=u[1],g=u[2],x=u[3],y=d*x-p*g;if(!y)return f;var C=u[4],P=u[5],M=this.scrollX,R=this.scrollY,I=this.width,L=this.height,B=this.y,N=B+L,G=this.x,V=G+I,K=this.culledObjects,j=f.length;y=1/y,K.length=0;for(var J=0;JG&&HB&&Zg&&(f=g),f},clampY:function(f){var u=this._bounds,d=this.displayHeight,p=u.y+(d-this.height)/2,g=Math.max(p,p+u.height-d);return fg&&(f=g),f},removeBounds:function(){return this.useBounds=!1,this.dirty=!0,this._bounds.setEmpty(),this},setAngle:function(f){return f===void 0&&(f=0),this.rotation=o(f),this},setBackgroundColor:function(f){return f===void 0&&(f="rgba(0,0,0,0)"),this.backgroundColor=h(f),this.transparent=this.backgroundColor.alpha===0,this},setBounds:function(f,u,d,p,g){return g===void 0&&(g=!1),this._bounds.setTo(f,u,d,p),this.dirty=!0,this.useBounds=!0,g?this.centerToBounds():(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},getBounds:function(f){f===void 0&&(f=new e);var u=this._bounds;return f.setTo(u.x,u.y,u.width,u.height),f},setName:function(f){return f===void 0&&(f=""),this.name=f,this},setPosition:function(f,u){return u===void 0&&(u=f),this.x=f,this.y=u,this},setRotation:function(f){return f===void 0&&(f=0),this.rotation=f,this},setRoundPixels:function(f){return this.roundPixels=f,this},setScene:function(f,u){u===void 0&&(u=!0),this.scene&&this._customViewport&&this.sceneManager.customViewports--,this.scene=f,this.isSceneCamera=u;var d=f.sys;return this.sceneManager=d.game.scene,this.scaleManager=d.scale,this.cameraManager=d.cameras,this.updateSystem(),this},setScroll:function(f,u){return u===void 0&&(u=f),this.scrollX=f,this.scrollY=u,this},setSize:function(f,u){return u===void 0&&(u=f),this.width=f,this.height=u,this},setViewport:function(f,u,d,p){return this.x=f,this.y=u,this.width=d,this.height=p,this},setZoom:function(f,u){return f===void 0&&(f=1),u===void 0&&(u=f),f===0&&(f=.001),u===0&&(u=.001),this.zoomX=f,this.zoomY=u,this},setMask:function(f,u){return u===void 0&&(u=!0),this.mask=f,this._maskCamera=u?this.cameraManager.default:this,this},clearMask:function(f){return f===void 0&&(f=!1),f&&this.mask&&this.mask.destroy(),this.mask=null,this},toJSON:function(){var f={name:this.name,x:this.x,y:this.y,width:this.width,height:this.height,zoom:this.zoom,rotation:this.rotation,roundPixels:this.roundPixels,scrollX:this.scrollX,scrollY:this.scrollY,backgroundColor:this.backgroundColor.rgba};return this.useBounds&&(f.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),f},update:function(){},setIsSceneCamera:function(f){return this.isSceneCamera=f,this},updateSystem:function(){if(!(!this.scaleManager||!this.isSceneCamera)){var f=this._x!==0||this._y!==0||this.scaleManager.width!==this._width||this.scaleManager.height!==this._height,u=this.sceneManager;f&&!this._customViewport?u.customViewports++:!f&&this._customViewport&&u.customViewports--,this.dirty=!0,this._customViewport=f}},destroy:function(){this.emit(n.DESTROY,this),this.removeAllListeners(),this.matrix.destroy(),this.culledObjects=[],this._customViewport&&this.sceneManager.customViewports--,this.renderList=[],this._bounds=null,this.scene=null,this.scaleManager=null,this.sceneManager=null,this.cameraManager=null},x:{get:function(){return this._x},set:function(f){this._x=f,this.updateSystem()}},y:{get:function(){return this._y},set:function(f){this._y=f,this.updateSystem()}},width:{get:function(){return this._width},set:function(f){this._width=f,this.updateSystem()}},height:{get:function(){return this._height},set:function(f){this._height=f,this.updateSystem()}},scrollX:{get:function(){return this._scrollX},set:function(f){f!==this._scrollX&&(this._scrollX=f,this.dirty=!0)}},scrollY:{get:function(){return this._scrollY},set:function(f){f!==this._scrollY&&(this._scrollY=f,this.dirty=!0)}},zoom:{get:function(){return(this._zoomX+this._zoomY)/2},set:function(f){this._zoomX=f,this._zoomY=f,this.dirty=!0}},zoomX:{get:function(){return this._zoomX},set:function(f){this._zoomX=f,this.dirty=!0}},zoomY:{get:function(){return this._zoomY},set:function(f){this._zoomY=f,this.dirty=!0}},rotation:{get:function(){return this._rotation},set:function(f){this._rotation=f,this.dirty=!0}},centerX:{get:function(){return this.x+.5*this.width}},centerY:{get:function(){return this.y+.5*this.height}},displayWidth:{get:function(){return this.width/this.zoomX}},displayHeight:{get:function(){return this.height/this.zoomY}}});c.exports=l},38058:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(71911),v=t(67502),o=t(45319),r=t(83419),n=t(31401),e=t(20052),i=t(19715),h=t(28915),s=t(87841),l=t(26099),f=new r({Extends:a,Mixins:[n.PostPipeline],initialize:function(d,p,g,x){a.call(this,d,p,g,x),this.initPostPipeline(),this.inputEnabled=!0,this.fadeEffect=new e.Fade(this),this.flashEffect=new e.Flash(this),this.shakeEffect=new e.Shake(this),this.panEffect=new e.Pan(this),this.rotateToEffect=new e.RotateTo(this),this.zoomEffect=new e.Zoom(this),this.lerp=new l(1,1),this.followOffset=new l,this.deadzone=null,this._follow=null},setDeadzone:function(u,d){if(u===void 0)this.deadzone=null;else{if(this.deadzone?(this.deadzone.width=u,this.deadzone.height=d):this.deadzone=new s(0,0,u,d),this._follow){var p=this.width/2,g=this.height/2,x=this._follow.x-this.followOffset.x,y=this._follow.y-this.followOffset.y;this.midPoint.set(x,y),this.scrollX=x-p,this.scrollY=y-g}v(this.deadzone,this.midPoint.x,this.midPoint.y)}return this},fadeIn:function(u,d,p,g,x,y){return this.fadeEffect.start(!1,u,d,p,g,!0,x,y)},fadeOut:function(u,d,p,g,x,y){return this.fadeEffect.start(!0,u,d,p,g,!0,x,y)},fadeFrom:function(u,d,p,g,x,y,C){return this.fadeEffect.start(!1,u,d,p,g,x,y,C)},fade:function(u,d,p,g,x,y,C){return this.fadeEffect.start(!0,u,d,p,g,x,y,C)},flash:function(u,d,p,g,x,y,C){return this.flashEffect.start(u,d,p,g,x,y,C)},shake:function(u,d,p,g,x){return this.shakeEffect.start(u,d,p,g,x)},pan:function(u,d,p,g,x,y,C){return this.panEffect.start(u,d,p,g,x,y,C)},rotateTo:function(u,d,p,g,x,y,C){return this.rotateToEffect.start(u,d,p,g,x,y,C)},zoomTo:function(u,d,p,g,x,y){return this.zoomEffect.start(u,d,p,g,x,y)},preRender:function(){this.renderList.length=0;var u=this.width,d=this.height,p=u*.5,g=d*.5,x=this.zoom,y=this.matrix,C=u*this.originX,P=d*this.originY,M=this._follow,R=this.deadzone,I=this.scrollX,L=this.scrollY;R&&v(R,this.midPoint.x,this.midPoint.y);var B=!1;if(M&&!this.panEffect.isRunning){var N=this.lerp,G=M.x-this.followOffset.x,V=M.y-this.followOffset.y;R?(GR.right&&(I=h(I,I+(G-R.right),N.x)),VR.bottom&&(L=h(L,L+(V-R.bottom),N.y))):(I=h(I,G-C,N.x),L=h(L,V-P,N.y)),B=!0}this.useBounds&&(I=this.clampX(I),L=this.clampY(L)),this.scrollX=I,this.scrollY=L;var K=I+p,j=L+g;this.midPoint.set(K,j);var J=u/x,X=d/x,Y=Math.floor(K-J/2),b=Math.floor(j-X/2);this.worldView.setTo(Y,b,J,X),y.applyITRS(Math.floor(this.x+C),Math.floor(this.y+P),this.rotation,x,x),y.translate(-C,-P),this.shakeEffect.preRender(),B&&this.emit(i.FOLLOW_UPDATE,this,M)},setLerp:function(u,d){return u===void 0&&(u=1),d===void 0&&(d=u),this.lerp.set(u,d),this},setFollowOffset:function(u,d){return u===void 0&&(u=0),d===void 0&&(d=0),this.followOffset.set(u,d),this},startFollow:function(u,d,p,g,x,y){d===void 0&&(d=!1),p===void 0&&(p=1),g===void 0&&(g=p),x===void 0&&(x=0),y===void 0&&(y=x),this._follow=u,this.roundPixels=d,p=o(p,0,1),g=o(g,0,1),this.lerp.set(p,g),this.followOffset.set(x,y);var C=this.width/2,P=this.height/2,M=u.x-x,R=u.y-y;return this.midPoint.set(M,R),this.scrollX=M-C,this.scrollY=R-P,this.useBounds&&(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},stopFollow:function(){return this._follow=null,this},resetFX:function(){return this.rotateToEffect.reset(),this.panEffect.reset(),this.shakeEffect.reset(),this.flashEffect.reset(),this.fadeEffect.reset(),this},update:function(u,d){this.visible&&(this.rotateToEffect.update(u,d),this.panEffect.update(u,d),this.zoomEffect.update(u,d),this.shakeEffect.update(u,d),this.flashEffect.update(u,d),this.fadeEffect.update(u,d))},destroy:function(){this.resetFX(),a.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});c.exports=f},32743:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(38058),v=t(83419),o=t(95540),r=t(37277),n=t(37303),e=t(97480),i=t(44594),h=new v({initialize:function(l){this.scene=l,this.systems=l.sys,this.roundPixels=l.sys.game.config.roundPixels,this.cameras=[],this.main,this.default,l.sys.events.once(i.BOOT,this.boot,this),l.sys.events.on(i.START,this.start,this)},boot:function(){var s=this.systems;s.settings.cameras?this.fromJSON(s.settings.cameras):this.add(),this.main=this.cameras[0],this.default=new a(0,0,s.scale.width,s.scale.height).setScene(this.scene),s.game.scale.on(e.RESIZE,this.onResize,this),this.systems.events.once(i.DESTROY,this.destroy,this)},start:function(){if(!this.main){var s=this.systems;s.settings.cameras?this.fromJSON(s.settings.cameras):this.add(),this.main=this.cameras[0]}var l=this.systems.events;l.on(i.UPDATE,this.update,this),l.once(i.SHUTDOWN,this.shutdown,this)},add:function(s,l,f,u,d,p){s===void 0&&(s=0),l===void 0&&(l=0),f===void 0&&(f=this.scene.sys.scale.width),u===void 0&&(u=this.scene.sys.scale.height),d===void 0&&(d=!1),p===void 0&&(p="");var g=new a(s,l,f,u);return g.setName(p),g.setScene(this.scene),g.setRoundPixels(this.roundPixels),g.id=this.getNextID(),this.cameras.push(g),d&&(this.main=g),g},addExisting:function(s,l){l===void 0&&(l=!1);var f=this.cameras.indexOf(s);return f===-1?(s.id=this.getNextID(),s.setRoundPixels(this.roundPixels),this.cameras.push(s),l&&(this.main=s),s):null},getNextID:function(){for(var s=this.cameras,l=1,f=0;f<32;f++){for(var u=!1,d=0;d0){p.preRender();var g=this.getVisibleChildren(l.getChildren(),p);s.render(f,g,p)}}},getVisibleChildren:function(s,l){return s.filter(function(f){return f.willRender(l)})},resetAll:function(){for(var s=0;s{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(45319),v=t(83419),o=t(19715),r=new v({initialize:function(e){this.camera=e,this.isRunning=!1,this.isComplete=!1,this.direction=!0,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(n,e,i,h,s,l,f,u){if(n===void 0&&(n=!0),e===void 0&&(e=1e3),i===void 0&&(i=0),h===void 0&&(h=0),s===void 0&&(s=0),l===void 0&&(l=!1),f===void 0&&(f=null),u===void 0&&(u=this.camera.scene),!l&&this.isRunning)return this.camera;this.isRunning=!0,this.isComplete=!1,this.duration=e,this.direction=n,this.progress=0,this.red=i,this.green=h,this.blue=s,this.alpha=n?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=f,this._onUpdateScope=u;var d=n?o.FADE_OUT_START:o.FADE_IN_START;return this.camera.emit(d,this.camera,this,e,i,h,s),this.camera},update:function(n,e){this.isRunning&&(this._elapsed+=e,this.progress=a(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(45319),v=t(83419),o=t(19715),r=new v({initialize:function(e){this.camera=e,this.isRunning=!1,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=1,this.progress=0,this._elapsed=0,this._alpha,this._onUpdate,this._onUpdateScope},start:function(n,e,i,h,s,l,f){return n===void 0&&(n=250),e===void 0&&(e=255),i===void 0&&(i=255),h===void 0&&(h=255),s===void 0&&(s=!1),l===void 0&&(l=null),f===void 0&&(f=this.camera.scene),!s&&this.isRunning?this.camera:(this.isRunning=!0,this.duration=n,this.progress=0,this.red=e,this.green=i,this.blue=h,this._alpha=this.alpha,this._elapsed=0,this._onUpdate=l,this._onUpdateScope=f,this.camera.emit(o.FLASH_START,this.camera,this,n,e,i,h),this.camera)},update:function(n,e){this.isRunning&&(this._elapsed+=e,this.progress=a(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(45319),v=t(83419),o=t(62640),r=t(19715),n=t(26099),e=new v({initialize:function(h){this.camera=h,this.isRunning=!1,this.duration=0,this.source=new n,this.current=new n,this.destination=new n,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(i,h,s,l,f,u,d){s===void 0&&(s=1e3),l===void 0&&(l=o.Linear),f===void 0&&(f=!1),u===void 0&&(u=null),d===void 0&&(d=this.camera.scene);var p=this.camera;return!f&&this.isRunning||(this.isRunning=!0,this.duration=s,this.progress=0,this.source.set(p.scrollX,p.scrollY),this.destination.set(i,h),p.getScroll(i,h,this.current),typeof l=="string"&&o.hasOwnProperty(l)?this.ease=o[l]:typeof l=="function"&&(this.ease=l),this._elapsed=0,this._onUpdate=u,this._onUpdateScope=d,this.camera.emit(r.PAN_START,this.camera,this,s,i,h)),p},update:function(i,h){if(this.isRunning){this._elapsed+=h;var s=a(this._elapsed/this.duration,0,1);this.progress=s;var l=this.camera;if(this._elapsed{/** - * @author Jason Nicholls - * @copyright 2018 Photon Storm Ltd. - * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} - */var a=t(45319),v=t(83419),o=t(19715),r=t(62640),n=new v({initialize:function(i){this.camera=i,this.isRunning=!1,this.duration=0,this.source=0,this.current=0,this.destination=0,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope,this.clockwise=!0,this.shortestPath=!1},start:function(e,i,h,s,l,f,u){h===void 0&&(h=1e3),s===void 0&&(s=r.Linear),l===void 0&&(l=!1),f===void 0&&(f=null),u===void 0&&(u=this.camera.scene),i===void 0&&(i=!1),this.shortestPath=i;var d=e;e<0?(d=-1*e,this.clockwise=!1):this.clockwise=!0;var p=360*Math.PI/180;d=d-Math.floor(d/p)*p;var g=this.camera;if(!l&&this.isRunning)return g;if(this.isRunning=!0,this.duration=h,this.progress=0,this.source=g.rotation,this.destination=d,typeof s=="string"&&r.hasOwnProperty(s)?this.ease=r[s]:typeof s=="function"&&(this.ease=s),this._elapsed=0,this._onUpdate=f,this._onUpdateScope=u,this.shortestPath){var x=0,y=0;this.destination>this.source?x=Math.abs(this.destination-this.source):x=Math.abs(this.destination+p)-this.source,this.source>this.destination?y=Math.abs(this.source-this.destination):y=Math.abs(this.source+p)-this.destination,xy&&(this.clockwise=!1)}return this.camera.emit(o.ROTATE_START,this.camera,this,h,d),g},update:function(e,i){if(this.isRunning){this._elapsed+=i;var h=a(this._elapsed/this.duration,0,1);this.progress=h;var s=this.camera;if(this._elapsed=p?f=Math.abs(d-p):f=Math.abs(d+u)-p;var g=0;this.clockwise?g=s.rotation+f*l:g=s.rotation-f*l,s.rotation=g,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,s,h,g)}else s.rotation=this.destination,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,s,h,this.destination),this.effectComplete()}},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(o.ROTATE_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null,this.source=null,this.destination=null}});c.exports=n},30330:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(45319),v=t(83419),o=t(19715),r=t(26099),n=new v({initialize:function(i){this.camera=i,this.isRunning=!1,this.duration=0,this.intensity=new r,this.progress=0,this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate,this._onUpdateScope},start:function(e,i,h,s,l){return e===void 0&&(e=100),i===void 0&&(i=.05),h===void 0&&(h=!1),s===void 0&&(s=null),l===void 0&&(l=this.camera.scene),!h&&this.isRunning?this.camera:(this.isRunning=!0,this.duration=e,this.progress=0,typeof i=="number"?this.intensity.set(i):this.intensity.set(i.x,i.y),this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate=s,this._onUpdateScope=l,this.camera.emit(o.SHAKE_START,this.camera,this,e,i),this.camera)},preRender:function(){this.isRunning&&this.camera.matrix.translate(this._offsetX,this._offsetY)},update:function(e,i){if(this.isRunning)if(this._elapsed+=i,this.progress=a(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(45319),v=t(83419),o=t(62640),r=t(19715),n=new v({initialize:function(i){this.camera=i,this.isRunning=!1,this.duration=0,this.source=1,this.destination=1,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(e,i,h,s,l,f){i===void 0&&(i=1e3),h===void 0&&(h=o.Linear),s===void 0&&(s=!1),l===void 0&&(l=null),f===void 0&&(f=this.camera.scene);var u=this.camera;return!s&&this.isRunning||(this.isRunning=!0,this.duration=i,this.progress=0,this.source=u.zoom,this.destination=e,typeof h=="string"&&o.hasOwnProperty(h)?this.ease=o[h]:typeof h=="function"&&(this.ease=h),this._elapsed=0,this._onUpdate=l,this._onUpdateScope=f,this.camera.emit(r.ZOOM_START,this.camera,this,i,e)),u},update:function(e,i){this.isRunning&&(this._elapsed+=i,this.progress=a(this._elapsed/this.duration,0,1),this._elapsed{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={Fade:t(5020),Flash:t(10662),Pan:t(20359),Shake:t(30330),RotateTo:t(34208),Zoom:t(45641)}},16438:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="cameradestroy"},32726:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="camerafadeincomplete"},87807:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="camerafadeinstart"},45917:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="camerafadeoutcomplete"},95666:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="camerafadeoutstart"},47056:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="cameraflashcomplete"},91261:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="cameraflashstart"},45047:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="followupdate"},81927:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="camerapancomplete"},74264:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="camerapanstart"},54419:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="postrender"},79330:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="prerender"},93183:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="camerarotatecomplete"},80112:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="camerarotatestart"},62252:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="camerashakecomplete"},86017:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="camerashakestart"},539:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="camerazoomcomplete"},51892:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="camerazoomstart"},19715:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={DESTROY:t(16438),FADE_IN_COMPLETE:t(32726),FADE_IN_START:t(87807),FADE_OUT_COMPLETE:t(45917),FADE_OUT_START:t(95666),FLASH_COMPLETE:t(47056),FLASH_START:t(91261),FOLLOW_UPDATE:t(45047),PAN_COMPLETE:t(81927),PAN_START:t(74264),POST_RENDER:t(54419),PRE_RENDER:t(79330),ROTATE_COMPLETE:t(93183),ROTATE_START:t(80112),SHAKE_COMPLETE:t(62252),SHAKE_START:t(86017),ZOOM_COMPLETE:t(539),ZOOM_START:t(51892)}},87969:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={Camera:t(38058),BaseCamera:t(71911),CameraManager:t(32743),Effects:t(20052),Events:t(19715)}},63091:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(35154),o=new a({initialize:function(n){this.camera=v(n,"camera",null),this.left=v(n,"left",null),this.right=v(n,"right",null),this.up=v(n,"up",null),this.down=v(n,"down",null),this.zoomIn=v(n,"zoomIn",null),this.zoomOut=v(n,"zoomOut",null),this.zoomSpeed=v(n,"zoomSpeed",.01),this.minZoom=v(n,"minZoom",.001),this.maxZoom=v(n,"maxZoom",1e3),this.speedX=0,this.speedY=0;var e=v(n,"speed",null);typeof e=="number"?(this.speedX=e,this.speedY=e):(this.speedX=v(n,"speed.x",0),this.speedY=v(n,"speed.y",0)),this._zoom=0,this.active=this.camera!==null},start:function(){return this.active=this.camera!==null,this},stop:function(){return this.active=!1,this},setCamera:function(r){return this.camera=r,this},update:function(r){if(this.active){r===void 0&&(r=1);var n=this.camera;this.up&&this.up.isDown?n.scrollY-=this.speedY*r|0:this.down&&this.down.isDown&&(n.scrollY+=this.speedY*r|0),this.left&&this.left.isDown?n.scrollX-=this.speedX*r|0:this.right&&this.right.isDown&&(n.scrollX+=this.speedX*r|0),this.zoomIn&&this.zoomIn.isDown?(n.zoom-=this.zoomSpeed,n.zoomthis.maxZoom&&(n.zoom=this.maxZoom))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});c.exports=o},58818:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(35154),o=new a({initialize:function(n){this.camera=v(n,"camera",null),this.left=v(n,"left",null),this.right=v(n,"right",null),this.up=v(n,"up",null),this.down=v(n,"down",null),this.zoomIn=v(n,"zoomIn",null),this.zoomOut=v(n,"zoomOut",null),this.zoomSpeed=v(n,"zoomSpeed",.01),this.minZoom=v(n,"minZoom",.001),this.maxZoom=v(n,"maxZoom",1e3),this.accelX=0,this.accelY=0;var e=v(n,"acceleration",null);typeof e=="number"?(this.accelX=e,this.accelY=e):(this.accelX=v(n,"acceleration.x",0),this.accelY=v(n,"acceleration.y",0)),this.dragX=0,this.dragY=0;var i=v(n,"drag",null);typeof i=="number"?(this.dragX=i,this.dragY=i):(this.dragX=v(n,"drag.x",0),this.dragY=v(n,"drag.y",0)),this.maxSpeedX=0,this.maxSpeedY=0;var h=v(n,"maxSpeed",null);typeof h=="number"?(this.maxSpeedX=h,this.maxSpeedY=h):(this.maxSpeedX=v(n,"maxSpeed.x",0),this.maxSpeedY=v(n,"maxSpeed.y",0)),this._speedX=0,this._speedY=0,this._zoom=0,this.active=this.camera!==null},start:function(){return this.active=this.camera!==null,this},stop:function(){return this.active=!1,this},setCamera:function(r){return this.camera=r,this},update:function(r){if(this.active){r===void 0&&(r=1);var n=this.camera;this._speedX>0?(this._speedX-=this.dragX*r,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*r,this._speedX>0&&(this._speedX=0)),this._speedY>0?(this._speedY-=this.dragY*r,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*r,this._speedY>0&&(this._speedY=0)),this.up&&this.up.isDown?(this._speedY+=this.accelY,this._speedY>this.maxSpeedY&&(this._speedY=this.maxSpeedY)):this.down&&this.down.isDown&&(this._speedY-=this.accelY,this._speedY<-this.maxSpeedY&&(this._speedY=-this.maxSpeedY)),this.left&&this.left.isDown?(this._speedX+=this.accelX,this._speedX>this.maxSpeedX&&(this._speedX=this.maxSpeedX)):this.right&&this.right.isDown&&(this._speedX-=this.accelX,this._speedX<-this.maxSpeedX&&(this._speedX=-this.maxSpeedX)),this.zoomIn&&this.zoomIn.isDown?this._zoom=-this.zoomSpeed:this.zoomOut&&this.zoomOut.isDown?this._zoom=this.zoomSpeed:this._zoom=0,this._speedX!==0&&(n.scrollX-=this._speedX*r|0),this._speedY!==0&&(n.scrollY-=this._speedY*r|0),this._zoom!==0&&(n.zoom+=this._zoom,n.zoomthis.maxZoom&&(n.zoom=this.maxZoom))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});c.exports=o},38865:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={FixedKeyControl:t(63091),SmoothedKeyControl:t(58818)}},26638:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={Controls:t(38865),Scene2D:t(87969)}},8054:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a={VERSION:"3.80.1",BlendModes:t(10312),ScaleModes:t(29795),AUTO:0,CANVAS:1,WEBGL:2,HEADLESS:3,FOREVER:-1,NONE:4,UP:5,DOWN:6,LEFT:7,RIGHT:8};c.exports=a},69547:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(8054),o=t(42363),r=t(82264),n=t(95540),e=t(35154),i=t(41212),h=t(29747),s=t(75508),l=t(36060),f=t(80333),u=new a({initialize:function(p){p===void 0&&(p={});var g=["#ff0000","#ffff00","#00ff00","#00ffff","#000000"],x="#ffffff",y=e(p,"scale",null);this.width=e(y,"width",1024,p),this.height=e(y,"height",768,p),this.zoom=e(y,"zoom",1,p),this.parent=e(y,"parent",void 0,p),this.scaleMode=e(y,y?"mode":"scaleMode",0,p),this.expandParent=e(y,"expandParent",!0,p),this.autoRound=e(y,"autoRound",!1,p),this.autoCenter=e(y,"autoCenter",0,p),this.resizeInterval=e(y,"resizeInterval",500,p),this.fullscreenTarget=e(y,"fullscreenTarget",null,p),this.minWidth=e(y,"min.width",0,p),this.maxWidth=e(y,"max.width",0,p),this.minHeight=e(y,"min.height",0,p),this.maxHeight=e(y,"max.height",0,p),this.snapWidth=e(y,"snap.width",0,p),this.snapHeight=e(y,"snap.height",0,p),this.renderType=e(p,"type",v.AUTO),this.canvas=e(p,"canvas",null),this.context=e(p,"context",null),this.canvasStyle=e(p,"canvasStyle",null),this.customEnvironment=e(p,"customEnvironment",!1),this.sceneConfig=e(p,"scene",null),this.seed=e(p,"seed",[(Date.now()*Math.random()).toString()]),s.RND=new s.RandomDataGenerator(this.seed),this.gameTitle=e(p,"title",""),this.gameURL=e(p,"url","https://phaser.io"),this.gameVersion=e(p,"version",""),this.autoFocus=e(p,"autoFocus",!0),this.stableSort=e(p,"stableSort",-1),this.stableSort===-1&&(this.stableSort=r.browser.es2019?1:0),r.features.stableSort=this.stableSort,this.domCreateContainer=e(p,"dom.createContainer",!1),this.domPointerEvents=e(p,"dom.pointerEvents","none"),this.inputKeyboard=e(p,"input.keyboard",!0),this.inputKeyboardEventTarget=e(p,"input.keyboard.target",window),this.inputKeyboardCapture=e(p,"input.keyboard.capture",[]),this.inputMouse=e(p,"input.mouse",!0),this.inputMouseEventTarget=e(p,"input.mouse.target",null),this.inputMousePreventDefaultDown=e(p,"input.mouse.preventDefaultDown",!0),this.inputMousePreventDefaultUp=e(p,"input.mouse.preventDefaultUp",!0),this.inputMousePreventDefaultMove=e(p,"input.mouse.preventDefaultMove",!0),this.inputMousePreventDefaultWheel=e(p,"input.mouse.preventDefaultWheel",!0),this.inputTouch=e(p,"input.touch",r.input.touch),this.inputTouchEventTarget=e(p,"input.touch.target",null),this.inputTouchCapture=e(p,"input.touch.capture",!0),this.inputActivePointers=e(p,"input.activePointers",1),this.inputSmoothFactor=e(p,"input.smoothFactor",0),this.inputWindowEvents=e(p,"input.windowEvents",!0),this.inputGamepad=e(p,"input.gamepad",!1),this.inputGamepadEventTarget=e(p,"input.gamepad.target",window),this.disableContextMenu=e(p,"disableContextMenu",!1),this.audio=e(p,"audio",{}),this.hideBanner=e(p,"banner",null)===!1,this.hidePhaser=e(p,"banner.hidePhaser",!1),this.bannerTextColor=e(p,"banner.text",x),this.bannerBackgroundColor=e(p,"banner.background",g),this.gameTitle===""&&this.hidePhaser&&(this.hideBanner=!0),this.fps=e(p,"fps",null),this.disablePreFX=e(p,"disablePreFX",!1),this.disablePostFX=e(p,"disablePostFX",!1);var C=e(p,"render",null);this.pipeline=e(C,"pipeline",null,p),this.autoMobilePipeline=e(C,"autoMobilePipeline",!0,p),this.defaultPipeline=e(C,"defaultPipeline",l.MULTI_PIPELINE,p),this.antialias=e(C,"antialias",!0,p),this.antialiasGL=e(C,"antialiasGL",!0,p),this.mipmapFilter=e(C,"mipmapFilter","",p),this.desynchronized=e(C,"desynchronized",!1,p),this.roundPixels=e(C,"roundPixels",!0,p),this.pixelArt=e(C,"pixelArt",this.zoom!==1,p),this.pixelArt&&(this.antialias=!1,this.antialiasGL=!1,this.roundPixels=!0),this.transparent=e(C,"transparent",!1,p),this.clearBeforeRender=e(C,"clearBeforeRender",!0,p),this.preserveDrawingBuffer=e(C,"preserveDrawingBuffer",!1,p),this.premultipliedAlpha=e(C,"premultipliedAlpha",!0,p),this.failIfMajorPerformanceCaveat=e(C,"failIfMajorPerformanceCaveat",!1,p),this.powerPreference=e(C,"powerPreference","default",p),this.batchSize=e(C,"batchSize",4096,p),this.maxTextures=e(C,"maxTextures",-1,p),this.maxLights=e(C,"maxLights",10,p);var P=e(p,"backgroundColor",0);this.backgroundColor=f(P),this.transparent&&(this.backgroundColor=f(0),this.backgroundColor.alpha=0),this.preBoot=e(p,"callbacks.preBoot",h),this.postBoot=e(p,"callbacks.postBoot",h),this.physics=e(p,"physics",{}),this.defaultPhysicsSystem=e(this.physics,"default",!1),this.loaderBaseURL=e(p,"loader.baseURL",""),this.loaderPath=e(p,"loader.path",""),this.loaderMaxParallelDownloads=e(p,"loader.maxParallelDownloads",r.os.android?6:32),this.loaderCrossOrigin=e(p,"loader.crossOrigin",void 0),this.loaderResponseType=e(p,"loader.responseType",""),this.loaderAsync=e(p,"loader.async",!0),this.loaderUser=e(p,"loader.user",""),this.loaderPassword=e(p,"loader.password",""),this.loaderTimeout=e(p,"loader.timeout",0),this.loaderWithCredentials=e(p,"loader.withCredentials",!1),this.loaderImageLoadType=e(p,"loader.imageLoadType","XHR"),this.loaderLocalScheme=e(p,"loader.localScheme",["file://","capacitor://"]),this.glowFXQuality=e(p,"fx.glow.quality",.1),this.glowFXDistance=e(p,"fx.glow.distance",10),this.installGlobalPlugins=[],this.installScenePlugins=[];var M=e(p,"plugins",null),R=o.DefaultScene;M&&(Array.isArray(M)?this.defaultPlugins=M:i(M)&&(this.installGlobalPlugins=n(M,"global",[]),this.installScenePlugins=n(M,"scene",[]),Array.isArray(M.default)?R=M.default:Array.isArray(M.defaultMerge)&&(R=R.concat(M.defaultMerge)))),this.defaultPlugins=R;var I="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=e(p,"images.default",I+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=e(p,"images.missing",I+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),this.whiteImage=e(p,"images.white","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABdJREFUeNpi/P//PwMMMDEgAdwcgAADAJZuAwXJYZOzAAAAAElFTkSuQmCC"),window&&(window.FORCE_WEBGL?this.renderType=v.WEBGL:window.FORCE_CANVAS&&(this.renderType=v.CANVAS))}});c.exports=u},86054:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(20623),v=t(27919),o=t(8054),r=t(89357),n=function(e){var i=e.config;if((i.customEnvironment||i.canvas)&&i.renderType===o.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!i.customEnvironment&&!i.canvas&&i.renderType!==o.HEADLESS)if(i.renderType===o.AUTO&&(i.renderType=r.webGL?o.WEBGL:o.CANVAS),i.renderType===o.WEBGL){if(!r.webGL)throw new Error("Cannot create WebGL context, aborting.")}else if(i.renderType===o.CANVAS){if(!r.canvas)throw new Error("Cannot create Canvas context, aborting.")}else throw new Error("Unknown value for renderer type: "+i.renderType);i.antialias||v.disableSmoothing();var h=e.scale.baseSize,s=h.width,l=h.height;if(i.canvas?(e.canvas=i.canvas,e.canvas.width=s,e.canvas.height=l):e.canvas=v.create(e,s,l,i.renderType),i.canvasStyle&&(e.canvas.style=i.canvasStyle),i.antialias||a.setCrisp(e.canvas),i.renderType!==o.HEADLESS){var f,u;f=t(68627),u=t(74797),i.renderType===o.WEBGL?e.renderer=new u(e):(e.renderer=new f(e),e.context=e.renderer.gameContext)}};c.exports=n},96391:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(8054),v=function(o){var r=o.config;if(!r.hideBanner){var n="WebGL";r.renderType===a.CANVAS?n="Canvas":r.renderType===a.HEADLESS&&(n="Headless");var e=r.audio,i=o.device.audio,h;if(i.webAudio&&!e.disableWebAudio?h="Web Audio":e.noAudio||!i.webAudio&&!i.audioData?h="No Audio":h="HTML5 Audio",o.device.browser.ie)window.console&&console.log("Phaser v"+a.VERSION+" / https://phaser.io");else{var s="",l=[s];if(Array.isArray(r.bannerBackgroundColor)){var f;r.bannerBackgroundColor.forEach(function(d){s=s.concat("%c "),l.push("background: "+d),f=d}),l[l.length-1]="color: "+r.bannerTextColor+"; background: "+f}else s=s.concat("%c "),l.push("color: "+r.bannerTextColor+"; background: "+r.bannerBackgroundColor);l.push("background: transparent"),r.gameTitle&&(s=s.concat(r.gameTitle),r.gameVersion&&(s=s.concat(" v"+r.gameVersion)),r.hidePhaser||(s=s.concat(" / ")));var u="";r.hidePhaser||(s=s.concat("Phaser v"+a.VERSION+u+" ("+n+" | "+h+")")),s=s.concat(" %c "+r.gameURL),l[0]=s,console.log.apply(console,l)}}};c.exports=v},50127:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(40366),v=t(60848),o=t(24047),r=t(27919),n=t(83419),e=t(69547),i=t(83719),h=t(86054),s=t(45893),l=t(96391),f=t(82264),u=t(57264),d=t(50792),p=t(8443),g=t(7003),x=t(37277),y=t(77332),C=t(76531),P=t(60903),M=t(69442),R=t(17130),I=t(65898),L=t(51085),B=t(14747),N=new n({initialize:function(V){this.config=new e(V),this.renderer=null,this.domContainer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new d,this.anims=new v(this),this.textures=new R(this),this.cache=new o(this),this.registry=new s(this,new d),this.input=new g(this,this.config),this.scene=new P(this,this.config.sceneConfig),this.device=f,this.scale=new C(this,this.config),this.sound=null,this.sound=B.create(this),this.loop=new I(this,this.config.fps),this.plugins=new y(this,this.config),this.pendingDestroy=!1,this.removeCanvas=!1,this.noReturn=!1,this.hasFocus=!1,this.isPaused=!1,u(this.boot.bind(this))},boot:function(){if(!x.hasCore("EventEmitter")){console.warn("Aborting. Core Plugins missing.");return}this.isBooted=!0,this.config.preBoot(this),this.scale.preBoot(),h(this),i(this),l(this),a(this.canvas,this.config.parent),this.textures.once(M.READY,this.texturesReady,this),this.events.emit(p.BOOT)},texturesReady:function(){this.events.emit(p.READY),this.start()},start:function(){this.isRunning=!0,this.config.postBoot(this),this.renderer?this.loop.start(this.step.bind(this)):this.loop.start(this.headlessStep.bind(this)),L(this);var G=this.events;G.on(p.HIDDEN,this.onHidden,this),G.on(p.VISIBLE,this.onVisible,this),G.on(p.BLUR,this.onBlur,this),G.on(p.FOCUS,this.onFocus,this)},step:function(G,V){if(this.pendingDestroy)return this.runDestroy();if(!this.isPaused){var K=this.events;K.emit(p.PRE_STEP,G,V),K.emit(p.STEP,G,V),this.scene.update(G,V),K.emit(p.POST_STEP,G,V);var j=this.renderer;j.preRender(),K.emit(p.PRE_RENDER,j,G,V),this.scene.render(j),j.postRender(),K.emit(p.POST_RENDER,j,G,V)}},headlessStep:function(G,V){if(this.pendingDestroy)return this.runDestroy();if(!this.isPaused){var K=this.events;K.emit(p.PRE_STEP,G,V),K.emit(p.STEP,G,V),this.scene.update(G,V),K.emit(p.POST_STEP,G,V),this.scene.isProcessing=!1,K.emit(p.PRE_RENDER,null,G,V),K.emit(p.POST_RENDER,null,G,V)}},onHidden:function(){this.loop.pause(),this.events.emit(p.PAUSE)},pause:function(){var G=this.isPaused;this.isPaused=!0,G||this.events.emit(p.PAUSE)},onVisible:function(){this.loop.resume(),this.events.emit(p.RESUME)},resume:function(){var G=this.isPaused;this.isPaused=!1,G&&this.events.emit(p.RESUME)},onBlur:function(){this.hasFocus=!1,this.loop.blur()},onFocus:function(){this.hasFocus=!0,this.loop.focus()},getFrame:function(){return this.loop.frame},getTime:function(){return this.loop.now},destroy:function(G,V){V===void 0&&(V=!1),this.pendingDestroy=!0,this.removeCanvas=G,this.noReturn=V},runDestroy:function(){this.scene.destroy(),this.events.emit(p.DESTROY),this.events.removeAllListeners(),this.renderer&&this.renderer.destroy(),this.removeCanvas&&this.canvas&&(r.remove(this.canvas),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)),this.domContainer&&this.domContainer.parentNode&&this.domContainer.parentNode.removeChild(this.domContainer),this.loop.destroy(),this.pendingDestroy=!1}});c.exports=N},65898:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(35154),o=t(29747),r=t(43092),n=new a({initialize:function(i,h){this.game=i,this.raf=new r,this.started=!1,this.running=!1,this.minFps=v(h,"min",5),this.targetFps=v(h,"target",60),this.fpsLimit=v(h,"limit",0),this.hasFpsLimit=this.fpsLimit>0,this._limitRate=this.hasFpsLimit?1e3/this.fpsLimit:0,this._min=1e3/this.minFps,this._target=1e3/this.targetFps,this.actualFps=this.targetFps,this.nextFpsUpdate=0,this.framesThisSecond=0,this.callback=o,this.forceSetTimeOut=v(h,"forceSetTimeOut",!1),this.time=0,this.startTime=0,this.lastTime=0,this.frame=0,this.inFocus=!0,this._pauseTime=0,this._coolDown=0,this.delta=0,this.deltaIndex=0,this.deltaHistory=[],this.deltaSmoothingMax=v(h,"deltaHistory",10),this.panicMax=v(h,"panicMax",120),this.rawDelta=0,this.now=0,this.smoothStep=v(h,"smoothStep",!0)},blur:function(){this.inFocus=!1},focus:function(){this.inFocus=!0,this.resetDelta()},pause:function(){this._pauseTime=window.performance.now()},resume:function(){this.resetDelta(),this.startTime+=this.time-this._pauseTime},resetDelta:function(){var e=window.performance.now();this.time=e,this.lastTime=e,this.nextFpsUpdate=e+1e3,this.framesThisSecond=0;for(var i=0;i0||!this.inFocus)&&(this._coolDown--,e=Math.min(e,this._target)),e>this._min&&(e=h[i],e=Math.min(e,this._min)),h[i]=e,this.deltaIndex++,this.deltaIndex>=s&&(this.deltaIndex=0);for(var l=0,f=0;f=this.nextFpsUpdate&&this.updateFPS(e),this.framesThisSecond++,this.delta>=this._limitRate&&(this.callback(e,this.delta),this.delta=0),this.lastTime=e,this.frame++},step:function(e){this.now=e;var i=Math.max(0,e-this.lastTime);this.rawDelta=i,this.time+=this.rawDelta,this.smoothStep&&(i=this.smoothDelta(i)),this.delta=i,e>=this.nextFpsUpdate&&this.updateFPS(e),this.framesThisSecond++,this.callback(e,i),this.lastTime=e,this.frame++},tick:function(){var e=window.performance.now();this.hasFpsLimit?this.stepLimitFPS(e):this.step(e)},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(e){e===void 0&&(e=!1);var i=window.performance.now();if(!this.running){e&&(this.startTime+=-this.lastTime+(this.lastTime+i));var h=this.hasFpsLimit?this.stepLimitFPS.bind(this):this.step.bind(this);this.raf.start(h,this.forceSetTimeOut,this._target),this.running=!0,this.nextFpsUpdate=i+1e3,this.framesThisSecond=0,this.fpsLimitTriggered=!1,this.tick()}},getDuration:function(){return Math.round(this.lastTime-this.startTime)/1e3},getDurationMS:function(){return Math.round(this.lastTime-this.startTime)},stop:function(){return this.running=!1,this.started=!1,this.raf.stop(),this},destroy:function(){this.stop(),this.raf.destroy(),this.raf=null,this.game=null,this.callback=null}});c.exports=n},51085:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(8443),v=function(o){var r,n=o.events;if(document.hidden!==void 0)r="visibilitychange";else{var e=["webkit","moz","ms"];e.forEach(function(h){document[h+"Hidden"]!==void 0&&(document.hidden=function(){return document[h+"Hidden"]},r=h+"visibilitychange")})}var i=function(h){document.hidden||h.type==="pause"?n.emit(a.HIDDEN):n.emit(a.VISIBLE)};r&&document.addEventListener(r,i,!1),window.onblur=function(){n.emit(a.BLUR)},window.onfocus=function(){n.emit(a.FOCUS)},window.focus&&o.config.autoFocus&&window.focus()};c.exports=v},97217:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="blur"},47548:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="boot"},19814:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="contextlost"},68446:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="destroy"},41700:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="focus"},25432:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="hidden"},65942:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="pause"},59211:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="postrender"},47789:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="poststep"},39066:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="prerender"},460:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="prestep"},16175:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="ready"},42331:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="resume"},11966:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="step"},32969:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="systemready"},94830:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="visible"},8443:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={BLUR:t(97217),BOOT:t(47548),CONTEXT_LOST:t(19814),DESTROY:t(68446),FOCUS:t(41700),HIDDEN:t(25432),PAUSE:t(65942),POST_RENDER:t(59211),POST_STEP:t(47789),PRE_RENDER:t(39066),PRE_STEP:t(460),READY:t(16175),RESUME:t(42331),STEP:t(11966),SYSTEM_READY:t(32969),VISIBLE:t(94830)}},42857:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={Config:t(69547),CreateRenderer:t(86054),DebugHeader:t(96391),Events:t(8443),TimeStep:t(65898),VisibilityHandler:t(51085)}},99584:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(5290),v=t(27919),o=t(35154),r=function(n){var e=o(n,"data",[]),i=o(n,"canvas",null),h=o(n,"palette",a),s=o(n,"pixelWidth",1),l=o(n,"pixelHeight",s),f=o(n,"resizeCanvas",!0),u=o(n,"clearCanvas",!0),d=o(n,"preRender",null),p=o(n,"postRender",null),g=Math.floor(Math.abs(e[0].length*s)),x=Math.floor(Math.abs(e.length*l));i||(i=v.create2D(this,g,x),f=!1,u=!1),f&&(i.width=g,i.height=x);var y=i.getContext("2d",{willReadFrequently:!0});u&&y.clearRect(0,0,g,x),d&&d(i,y);for(var C=0;C{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={GenerateTexture:t(99584),Palettes:t(57763)}},5290:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={0:"#000",1:"#9D9D9D",2:"#FFF",3:"#BE2633",4:"#E06F8B",5:"#493C2B",6:"#A46422",7:"#EB8931",8:"#F7E26B",9:"#2F484E",A:"#44891A",B:"#A3CE27",C:"#1B2632",D:"#005784",E:"#31A2F2",F:"#B2DCEF"}},23816:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={0:"#000",1:"#fff",2:"#8b4131",3:"#7bbdc5",4:"#8b41ac",5:"#6aac41",6:"#3931a4",7:"#d5de73",8:"#945a20",9:"#5a4100",A:"#bd736a",B:"#525252",C:"#838383",D:"#acee8b",E:"#7b73de",F:"#acacac"}},9866:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={0:"#000",1:"#2234d1",2:"#0c7e45",3:"#44aacc",4:"#8a3622",5:"#5c2e78",6:"#aa5c3d",7:"#b5b5b5",8:"#5e606e",9:"#4c81fb",A:"#6cd947",B:"#7be2f9",C:"#eb8a60",D:"#e23d69",E:"#ffd93f",F:"#fff"}},77552:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#f5f4eb"}},92259:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.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:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={ARNE16:t(5290),C64:t(23816),CGA:t(9866),JMP:t(77552),MSX:t(92259)}},46728:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(36316),o=t(80021),r=t(26099),n=new a({Extends:o,initialize:function(i,h,s,l){o.call(this,"CubicBezierCurve"),Array.isArray(i)&&(l=new r(i[6],i[7]),s=new r(i[4],i[5]),h=new r(i[2],i[3]),i=new r(i[0],i[1])),this.p0=i,this.p1=h,this.p2=s,this.p3=l},getStartPoint:function(e){return e===void 0&&(e=new r),e.copy(this.p0)},getResolution:function(e){return e},getPoint:function(e,i){i===void 0&&(i=new r);var h=this.p0,s=this.p1,l=this.p2,f=this.p3;return i.set(v(e,h.x,s.x,l.x,f.x),v(e,h.y,s.y,l.y,f.y))},draw:function(e,i){i===void 0&&(i=32);var h=this.getPoints(i);e.beginPath(),e.moveTo(this.p0.x,this.p0.y);for(var s=1;s{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(19217),o=t(87841),r=t(26099),n=new a({initialize:function(i){this.type=i,this.defaultDivisions=5,this.arcLengthDivisions=100,this.cacheArcLengths=[],this.needsUpdate=!0,this.active=!0,this._tmpVec2A=new r,this._tmpVec2B=new r},draw:function(e,i){return i===void 0&&(i=32),e.strokePoints(this.getPoints(i))},getBounds:function(e,i){e||(e=new o),i===void 0&&(i=16);var h=this.getLength();i>h&&(i=h/2);var s=Math.max(1,Math.round(h/i));return v(this.getSpacedPoints(s),e)},getDistancePoints:function(e){var i=this.getLength(),h=Math.max(1,i/e);return this.getSpacedPoints(h)},getEndPoint:function(e){return e===void 0&&(e=new r),this.getPointAt(1,e)},getLength:function(){var e=this.getLengths();return e[e.length-1]},getLengths:function(e){if(e===void 0&&(e=this.arcLengthDivisions),this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var i=[],h,s=this.getPoint(0,this._tmpVec2A),l=0;i.push(0);for(var f=1;f<=e;f++)h=this.getPoint(f/e,this._tmpVec2B),l+=h.distance(s),i.push(l),s.copy(h);return this.cacheArcLengths=i,i},getPointAt:function(e,i){var h=this.getUtoTmapping(e);return this.getPoint(h,i)},getPoints:function(e,i,h){h===void 0&&(h=[]),e||(i?e=this.getLength()/i:e=this.defaultDivisions);for(var s=0;s<=e;s++)h.push(this.getPoint(s/e));return h},getRandomPoint:function(e){return e===void 0&&(e=new r),this.getPoint(Math.random(),e)},getSpacedPoints:function(e,i,h){h===void 0&&(h=[]),e||(i?e=this.getLength()/i:e=this.defaultDivisions);for(var s=0;s<=e;s++){var l=this.getUtoTmapping(s/e,null,e);h.push(this.getPoint(l))}return h},getStartPoint:function(e){return e===void 0&&(e=new r),this.getPointAt(0,e)},getTangent:function(e,i){i===void 0&&(i=new r);var h=1e-4,s=e-h,l=e+h;return s<0&&(s=0),l>1&&(l=1),this.getPoint(s,this._tmpVec2A),this.getPoint(l,i),i.subtract(this._tmpVec2A).normalize()},getTangentAt:function(e,i){var h=this.getUtoTmapping(e);return this.getTangent(h,i)},getTFromDistance:function(e,i){return e<=0?0:this.getUtoTmapping(0,e,i)},getUtoTmapping:function(e,i,h){var s=this.getLengths(h),l=0,f=s.length,u;i?u=Math.min(i,s[f-1]):u=e*s[f-1];for(var d=0,p=f-1,g;d<=p;)if(l=Math.floor(d+(p-d)/2),g=s[l]-u,g<0)d=l+1;else if(g>0)p=l-1;else{p=l;break}if(l=p,s[l]===u)return l/(f-1);var x=s[l],y=s[l+1],C=y-x,P=(u-x)/C;return(l+P)/(f-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});c.exports=n},73825:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(80021),o=t(39506),r=t(35154),n=t(43396),e=t(26099),i=new a({Extends:v,initialize:function(s,l,f,u,d,p,g,x){if(typeof s=="object"){var y=s;s=r(y,"x",0),l=r(y,"y",0),f=r(y,"xRadius",0),u=r(y,"yRadius",f),d=r(y,"startAngle",0),p=r(y,"endAngle",360),g=r(y,"clockwise",!1),x=r(y,"rotation",0)}else u===void 0&&(u=f),d===void 0&&(d=0),p===void 0&&(p=360),g===void 0&&(g=!1),x===void 0&&(x=0);v.call(this,"EllipseCurve"),this.p0=new e(s,l),this._xRadius=f,this._yRadius=u,this._startAngle=o(d),this._endAngle=o(p),this._clockwise=g,this._rotation=o(x)},getStartPoint:function(h){return h===void 0&&(h=new e),this.getPoint(0,h)},getResolution:function(h){return h*2},getPoint:function(h,s){s===void 0&&(s=new e);for(var l=Math.PI*2,f=this._endAngle-this._startAngle,u=Math.abs(f)l;)f-=l;f{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(80021),o=t(19217),r=t(87841),n=t(26099),e=new a({Extends:v,initialize:function(h,s){v.call(this,"LineCurve"),Array.isArray(h)&&(s=new n(h[2],h[3]),h=new n(h[0],h[1])),this.p0=h,this.p1=s,this.arcLengthDivisions=1},getBounds:function(i){return i===void 0&&(i=new r),o([this.p0,this.p1],i)},getStartPoint:function(i){return i===void 0&&(i=new n),i.copy(this.p0)},getResolution:function(i){return i===void 0&&(i=1),i},getPoint:function(i,h){return h===void 0&&(h=new n),i===1?h.copy(this.p1):(h.copy(this.p1).subtract(this.p0).scale(i).add(this.p0),h)},getPointAt:function(i,h){return this.getPoint(i,h)},getTangent:function(i,h){return h===void 0&&(h=new n),h.copy(this.p1).subtract(this.p0).normalize(),h},getUtoTmapping:function(i,h,s){var l;if(h){var f=this.getLengths(s),u=f[f.length-1],d=Math.min(h,u);l=d/u}else l=i;return l},draw:function(i){return i.lineBetween(this.p0.x,this.p0.y,this.p1.x,this.p1.y),i},toJSON:function(){return{type:this.type,points:[this.p0.x,this.p0.y,this.p1.x,this.p1.y]}}});e.fromJSON=function(i){var h=i.points,s=new n(h[0],h[1]),l=new n(h[2],h[3]);return new e(s,l)},c.exports=e},14744:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(80021),o=t(32112),r=t(26099),n=new a({Extends:v,initialize:function(i,h,s){v.call(this,"QuadraticBezierCurve"),Array.isArray(i)&&(s=new r(i[4],i[5]),h=new r(i[2],i[3]),i=new r(i[0],i[1])),this.p0=i,this.p1=h,this.p2=s},getStartPoint:function(e){return e===void 0&&(e=new r),e.copy(this.p0)},getResolution:function(e){return e},getPoint:function(e,i){i===void 0&&(i=new r);var h=this.p0,s=this.p1,l=this.p2;return i.set(o(e,h.x,s.x,l.x),o(e,h.y,s.y,l.y))},draw:function(e,i){i===void 0&&(i=32);var h=this.getPoints(i);e.beginPath(),e.moveTo(this.p0.x,this.p0.y);for(var s=1;s{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(87842),v=t(83419),o=t(80021),r=t(26099),n=new v({Extends:o,initialize:function(i){i===void 0&&(i=[]),o.call(this,"SplineCurve"),this.points=[],this.addPoints(i)},addPoints:function(e){for(var i=0;ih.length-2?h.length-1:l+1],g=h[l>h.length-3?h.length-1:l+2];return i.set(a(f,u.x,d.x,p.x,g.x),a(f,u.y,d.y,p.y,g.y))},toJSON:function(){for(var e=[],i=0;i{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={Path:t(46669),MoveTo:t(68618),CubicBezier:t(46728),Curve:t(80021),Ellipse:t(73825),Line:t(33951),QuadraticBezier:t(14744),Spline:t(42534)}},68618:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(26099),o=new a({initialize:function(n,e){this.active=!1,this.p0=new v(n,e)},getPoint:function(r,n){return n===void 0&&(n=new v),n.copy(this.p0)},getPointAt:function(r,n){return this.getPoint(r,n)},getResolution:function(){return 1},getLength:function(){return 0},toJSON:function(){return{type:"MoveTo",points:[this.p0.x,this.p0.y]}}});c.exports=o},46669:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(46728),o=t(73825),r=t(39429),n=t(33951),e=t(68618),i=t(14744),h=t(87841),s=t(42534),l=t(26099),f=t(36383),u=new a({initialize:function(p,g){p===void 0&&(p=0),g===void 0&&(g=0),this.name="",this.defaultDivisions=12,this.curves=[],this.cacheLengths=[],this.autoClose=!1,this.startPoint=new l,this._tmpVec2A=new l,this._tmpVec2B=new l,typeof p=="object"?this.fromJSON(p):this.startPoint.set(p,g)},add:function(d){return this.curves.push(d),this},circleTo:function(d,p,g){return p===void 0&&(p=!1),this.ellipseTo(d,d,0,360,p,g)},closePath:function(){var d=this.curves[0].getPoint(0),p=this.curves[this.curves.length-1].getPoint(1);return d.equals(p)||this.curves.push(new n(p,d)),this},cubicBezierTo:function(d,p,g,x,y,C){var P=this.getEndPoint(),M,R,I;return d instanceof l?(M=d,R=p,I=g):(M=new l(g,x),R=new l(y,C),I=new l(d,p)),this.add(new v(P,M,R,I))},quadraticBezierTo:function(d,p,g,x){var y=this.getEndPoint(),C,P;return d instanceof l?(C=d,P=p):(C=new l(g,x),P=new l(d,p)),this.add(new i(y,C,P))},draw:function(d,p){for(var g=0;g=p)return this.curves[x];x++}return null},getEndPoint:function(d){return d===void 0&&(d=new l),this.curves.length>0?this.curves[this.curves.length-1].getPoint(1,d):d.copy(this.startPoint),d},getLength:function(){var d=this.getCurveLengths();return d[d.length-1]},getPoint:function(d,p){p===void 0&&(p=new l);for(var g=d*this.getLength(),x=this.getCurveLengths(),y=0;y=g){var C=x[y]-g,P=this.curves[y],M=P.getLength(),R=M===0?0:1-C/M;return P.getPointAt(R,p)}y++}return null},getPoints:function(d,p){!d&&!p&&(d=this.defaultDivisions);for(var g=[],x,y=0;y1&&!g[g.length-1].equals(g[0])&&g.push(g[0]),g},getRandomPoint:function(d){return d===void 0&&(d=new l),this.getPoint(Math.random(),d)},getSpacedPoints:function(d){d===void 0&&(d=40);for(var p=[],g=0;g<=d;g++)p.push(this.getPoint(g/d));return this.autoClose&&p.push(p[0]),p},getStartPoint:function(d){return d===void 0&&(d=new l),d.copy(this.startPoint)},getTangent:function(d,p){p===void 0&&(p=new l);for(var g=d*this.getLength(),x=this.getCurveLengths(),y=0;y=g){var C=x[y]-g,P=this.curves[y],M=P.getLength(),R=M===0?0:1-C/M;return P.getTangentAt(R,p)}y++}return null},lineTo:function(d,p){d instanceof l?this._tmpVec2B.copy(d):typeof d=="object"?this._tmpVec2B.setFromObject(d):this._tmpVec2B.set(d,p);var g=this.getEndPoint(this._tmpVec2A);return this.add(new n([g.x,g.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(d){return d.unshift(this.getEndPoint()),this.add(new s(d))},moveTo:function(d,p){return d instanceof l?this.add(new e(d.x,d.y)):this.add(new e(d,p))},toJSON:function(){for(var d=[],p=0;p{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(24882),o=new a({initialize:function(n,e){this.parent=n,this.events=e,e||(this.events=n.events?n.events:n),this.list={},this.values={},this._frozen=!1,!n.hasOwnProperty("sys")&&this.events&&this.events.once(v.DESTROY,this.destroy,this)},get:function(r){var n=this.list;if(Array.isArray(r)){for(var e=[],i=0;i{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(45893),o=t(37277),r=t(44594),n=new a({Extends:v,initialize:function(i){v.call(this,i,i.sys.events),this.scene=i,this.systems=i.sys,i.sys.events.once(r.BOOT,this.boot,this),i.sys.events.on(r.START,this.start,this)},boot:function(){this.events=this.systems.events,this.events.once(r.DESTROY,this.destroy,this)},start:function(){this.events.once(r.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.systems.events.off(r.SHUTDOWN,this.shutdown,this)},destroy:function(){v.prototype.destroy.call(this),this.events.off(r.START,this.start,this),this.scene=null,this.systems=null}});o.register("DataManagerPlugin",n,"data"),c.exports=n},10700:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="changedata"},93608:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="changedata-"},60883:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="destroy"},69780:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="removedata"},22166:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="setdata"},24882:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={CHANGE_DATA:t(10700),CHANGE_DATA_KEY:t(93608),DESTROY:t(60883),REMOVE_DATA:t(69780),SET_DATA:t(22166)}},44965:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={DataManager:t(45893),DataManagerPlugin:t(63646),Events:t(24882)}},7098:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(84148),v={flac:!1,aac:!1,audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};function o(){if(typeof importScripts=="function")return v;v.audioData=!!window.Audio,v.webAudio=!!(window.AudioContext||window.webkitAudioContext);var r=document.createElement("audio"),n=!!r.canPlayType;try{if(n){var e=function(s,l){var f=r.canPlayType("audio/"+s).replace(/^no$/,"");return l?!!(f||r.canPlayType("audio/"+l).replace(/^no$/,"")):!!f};if(v.ogg=e('ogg; codecs="vorbis"'),v.opus=e('ogg; codecs="opus"',"opus"),v.mp3=e("mpeg"),v.wav=e("wav"),v.m4a=e("x-m4a"),v.aac=e("aac"),v.flac=e("flac","x-flac"),v.webm=e('webm; codecs="vorbis"'),r.canPlayType('audio/mp4; codecs="ec-3"')!==""){if(a.edge)v.dolby=!0;else if(a.safari&&a.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var i=parseInt(RegExp.$1,10),h=parseInt(RegExp.$2,10);(i===10&&h>=11||i>10)&&(v.dolby=!0)}}}}catch{}return v}c.exports=o()},84148:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(25892),v={chrome:!1,chromeVersion:0,edge:!1,firefox:!1,firefoxVersion:0,ie:!1,ieVersion:0,mobileSafari:!1,opera:!1,safari:!1,safariVersion:0,silk:!1,trident:!1,tridentVersion:0,es2019:!1};function o(){var r=navigator.userAgent;return/Edg\/\d+/.test(r)?(v.edge=!0,v.es2019=!0):/OPR/.test(r)?(v.opera=!0,v.es2019=!0):/Chrome\/(\d+)/.test(r)&&!a.windowsPhone?(v.chrome=!0,v.chromeVersion=parseInt(RegExp.$1,10),v.es2019=v.chromeVersion>69):/Firefox\D+(\d+)/.test(r)?(v.firefox=!0,v.firefoxVersion=parseInt(RegExp.$1,10),v.es2019=v.firefoxVersion>10):/AppleWebKit\/(?!.*CriOS)/.test(r)&&a.iOS?(v.mobileSafari=!0,v.es2019=!0):/MSIE (\d+\.\d+);/.test(r)?(v.ie=!0,v.ieVersion=parseInt(RegExp.$1,10)):/Version\/(\d+\.\d+(\.\d+)?) Safari/.test(r)&&!a.windowsPhone?(v.safari=!0,v.safariVersion=parseInt(RegExp.$1,10),v.es2019=v.safariVersion>10):/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(r)&&(v.ie=!0,v.trident=!0,v.tridentVersion=parseInt(RegExp.$1,10),v.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(r)&&(v.silk=!0),v}c.exports=o()},89289:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(27919),v={supportInverseAlpha:!1,supportNewBlendModes:!1};function o(){var e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",i="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",h=new Image;return h.onload=function(){var s=new Image;s.onload=function(){var l=a.create2D(s,6),f=l.getContext("2d",{willReadFrequently:!0});if(f.globalCompositeOperation="multiply",f.drawImage(h,0,0),f.drawImage(s,2,0),!f.getImageData(2,0,1,1))return!1;var u=f.getImageData(2,0,1,1).data;a.remove(s),v.supportNewBlendModes=u[0]===255&&u[1]===0&&u[2]===0},s.src=e+"/wCKxvRF"+i},h.src=e+"AP804Oa6"+i,!1}function r(){var e=a.create2D(this,2),i=e.getContext("2d",{willReadFrequently:!0});i.fillStyle="rgba(10, 20, 30, 0.5)",i.fillRect(0,0,1,1);var h=i.getImageData(0,0,1,1);if(h===null)return!1;i.putImageData(h,1,0);var s=i.getImageData(1,0,1,1),l=s.data[0]===h.data[0]&&s.data[1]===h.data[1]&&s.data[2]===h.data[2]&&s.data[3]===h.data[3];return a.remove(this),l}function n(){return typeof importScripts!="function"&&document!==void 0&&(v.supportNewBlendModes=o(),v.supportInverseAlpha=r()),v}c.exports=n()},89357:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(25892),v=t(84148),o=t(27919),r={canvas:!1,canvasBitBltShift:null,file:!1,fileSystem:!1,getUserMedia:!0,littleEndian:!1,localStorage:!1,pointerLock:!1,stableSort:!1,support32bit:!1,vibration:!1,webGL:!1,worker:!1};function n(){var i=new ArrayBuffer(4),h=new Uint8Array(i),s=new Uint32Array(i);return h[0]=161,h[1]=178,h[2]=195,h[3]=212,s[0]===3569595041?!0:s[0]===2712847316?!1:null}function e(){if(typeof importScripts=="function")return r;r.canvas=!!window.CanvasRenderingContext2D;try{r.localStorage=!!localStorage.getItem}catch{r.localStorage=!1}r.file=!!window.File&&!!window.FileReader&&!!window.FileList&&!!window.Blob,r.fileSystem=!!window.requestFileSystem;var i=!1,h=function(){if(window.WebGLRenderingContext)try{var s=o.createWebGL(this),l=s.getContext("webgl")||s.getContext("experimental-webgl"),f=o.create2D(this),u=f.getContext("2d",{willReadFrequently:!0}),d=u.createImageData(1,1);return i=d.data instanceof Uint8ClampedArray,o.remove(s),o.remove(f),!!l}catch{return!1}return!1};return r.webGL=h(),r.worker=!!window.Worker,r.pointerLock="pointerLockElement"in document||"mozPointerLockElement"in document||"webkitPointerLockElement"in document,navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia||navigator.oGetUserMedia,window.URL=window.URL||window.webkitURL||window.mozURL||window.msURL,r.getUserMedia=r.getUserMedia&&!!navigator.getUserMedia&&!!window.URL,v.firefox&&v.firefoxVersion<21&&(r.getUserMedia=!1),!a.iOS&&(v.ie||v.firefox||v.chrome)&&(r.canvasBitBltShift=!0),(v.safari||v.mobileSafari)&&(r.canvasBitBltShift=!1),navigator.vibrate=navigator.vibrate||navigator.webkitVibrate||navigator.mozVibrate||navigator.msVibrate,navigator.vibrate&&(r.vibration=!0),typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&typeof Uint32Array<"u"&&(r.littleEndian=n()),r.support32bit=typeof ArrayBuffer<"u"&&typeof Uint8ClampedArray<"u"&&typeof Int32Array<"u"&&r.littleEndian!==null&&i,r}c.exports=e()},91639:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={available:!1,cancel:"",keyboard:!1,request:""};function t(){if(typeof importScripts=="function")return m;var a,v="Fullscreen",o="FullScreen",r=["request"+v,"request"+o,"webkitRequest"+v,"webkitRequest"+o,"msRequest"+v,"msRequest"+o,"mozRequest"+o,"mozRequest"+v];for(a=0;a{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(84148),v={gamepads:!1,mspointer:!1,touch:!1,wheelEvent:null};function o(){return typeof importScripts=="function"||(("ontouchstart"in document.documentElement||navigator.maxTouchPoints&&navigator.maxTouchPoints>=1)&&(v.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(v.mspointer=!0),navigator.getGamepads&&(v.gamepads=!0),"onwheel"in window||a.ie&&"WheelEvent"in window?v.wheelEvent="wheel":"onmousewheel"in window?v.wheelEvent="mousewheel":a.firefox&&"MouseScrollEvent"in window&&(v.wheelEvent="DOMMouseScroll")),v}c.exports=o()},25892:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={android:!1,chromeOS:!1,cordova:!1,crosswalk:!1,desktop:!1,ejecta:!1,electron:!1,iOS:!1,iOSVersion:0,iPad:!1,iPhone:!1,kindle:!1,linux:!1,macOS:!1,node:!1,nodeWebkit:!1,pixelRatio:1,webApp:!1,windows:!1,windowsPhone:!1};function t(){if(typeof importScripts=="function")return m;var a=navigator.userAgent;/Windows/.test(a)?m.windows=!0:/Mac OS/.test(a)&&!/like Mac OS/.test(a)?navigator.maxTouchPoints&&navigator.maxTouchPoints>2?(m.iOS=!0,m.iPad=!0,navigator.appVersion.match(/Version\/(\d+)/),m.iOSVersion=parseInt(RegExp.$1,10)):m.macOS=!0:/Android/.test(a)?m.android=!0:/Linux/.test(a)?m.linux=!0:/iP[ao]d|iPhone/i.test(a)?(m.iOS=!0,navigator.appVersion.match(/OS (\d+)/),m.iOSVersion=parseInt(RegExp.$1,10),m.iPhone=a.toLowerCase().indexOf("iphone")!==-1,m.iPad=a.toLowerCase().indexOf("ipad")!==-1):/Kindle/.test(a)||/\bKF[A-Z][A-Z]+/.test(a)||/Silk.*Mobile Safari/.test(a)?m.kindle=!0:/CrOS/.test(a)&&(m.chromeOS=!0),(/Windows Phone/i.test(a)||/IEMobile/i.test(a))&&(m.android=!1,m.iOS=!1,m.macOS=!1,m.windows=!0,m.windowsPhone=!0);var v=/Silk/.test(a);return(m.windows||m.macOS||m.linux&&!v||m.chromeOS)&&(m.desktop=!0),(m.windowsPhone||/Windows NT/i.test(a)&&/Touch/i.test(a))&&(m.desktop=!1),navigator.standalone&&(m.webApp=!0),typeof importScripts!="function"&&(window.cordova!==void 0&&(m.cordova=!0),window.ejecta!==void 0&&(m.ejecta=!0)),typeof process<"u"&&process.versions&&process.versions.node&&(m.node=!0),m.node&&typeof process.versions=="object"&&(m.nodeWebkit=!!process.versions["node-webkit"],m.electron=!!process.versions.electron),/Crosswalk/.test(a)&&(m.crosswalk=!0),m.pixelRatio=window.devicePixelRatio||1,m}c.exports=t()},43267:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(95540),v={h264:!1,hls:!1,mp4:!1,m4v:!1,ogg:!1,vp9:!1,webm:!1,hasRequestVideoFrame:!1};function o(){if(typeof importScripts=="function")return v;var r=document.createElement("video"),n=!!r.canPlayType,e=/^no$/;try{n&&(r.canPlayType('video/ogg; codecs="theora"').replace(e,"")&&(v.ogg=!0),r.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(e,"")&&(v.h264=!0,v.mp4=!0),r.canPlayType("video/x-m4v").replace(e,"")&&(v.m4v=!0),r.canPlayType('video/webm; codecs="vp8, vorbis"').replace(e,"")&&(v.webm=!0),r.canPlayType('video/webm; codecs="vp9"').replace(e,"")&&(v.vp9=!0),r.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(e,"")&&(v.hls=!0))}catch{}return r.parentNode&&r.parentNode.removeChild(r),v.getVideoURL=function(i){Array.isArray(i)||(i=[i]);for(var h=0;h{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={os:t(25892),browser:t(84148),features:t(89357),input:t(31784),audio:t(7098),video:t(43267),fullscreen:t(91639),canvasFeatures:t(89289)}},89422:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=new Float32Array(20),o=new a({initialize:function(){this._matrix=new Float32Array(20),this.alpha=1,this._dirty=!0,this._data=new Float32Array(20),this.reset()},set:function(r){return this._matrix.set(r),this._dirty=!0,this},reset:function(){var r=this._matrix;return r.fill(0),r[0]=1,r[6]=1,r[12]=1,r[18]=1,this.alpha=1,this._dirty=!0,this},getData:function(){var r=this._data;return this._dirty&&(r.set(this._matrix),r[4]/=255,r[9]/=255,r[14]/=255,r[19]/=255,this._dirty=!1),r},brightness:function(r,n){r===void 0&&(r=0),n===void 0&&(n=!1);var e=r;return this.multiply([e,0,0,0,0,0,e,0,0,0,0,0,e,0,0,0,0,0,1,0],n)},saturate:function(r,n){r===void 0&&(r=0),n===void 0&&(n=!1);var e=r*2/3+1,i=(e-1)*-.5;return this.multiply([e,i,i,0,0,i,e,i,0,0,i,i,e,0,0,0,0,0,1,0],n)},desaturate:function(r){return r===void 0&&(r=!1),this.saturate(-1,r)},hue:function(r,n){r===void 0&&(r=0),n===void 0&&(n=!1),r=r/180*Math.PI;var e=Math.cos(r),i=Math.sin(r),h=.213,s=.715,l=.072;return this.multiply([h+e*(1-h)+i*-h,s+e*-s+i*-s,l+e*-l+i*(1-l),0,0,h+e*-h+i*.143,s+e*(1-s)+i*.14,l+e*-l+i*-.283,0,0,h+e*-h+i*-(1-h),s+e*-s+i*s,l+e*(1-l)+i*l,0,0,0,0,0,1,0],n)},grayscale:function(r,n){return r===void 0&&(r=1),n===void 0&&(n=!1),this.saturate(-r,n)},blackWhite:function(r){return r===void 0&&(r=!1),this.multiply(o.BLACK_WHITE,r)},contrast:function(r,n){r===void 0&&(r=0),n===void 0&&(n=!1);var e=r+1,i=-.5*(e-1);return this.multiply([e,0,0,0,i,0,e,0,0,i,0,0,e,0,i,0,0,0,1,0],n)},negative:function(r){return r===void 0&&(r=!1),this.multiply(o.NEGATIVE,r)},desaturateLuminance:function(r){return r===void 0&&(r=!1),this.multiply(o.DESATURATE_LUMINANCE,r)},sepia:function(r){return r===void 0&&(r=!1),this.multiply(o.SEPIA,r)},night:function(r,n){return r===void 0&&(r=.1),n===void 0&&(n=!1),this.multiply([r*-2,-r,0,0,0,-r,0,r,0,0,0,r,r*2,0,0,0,0,0,1,0],n)},lsd:function(r){return r===void 0&&(r=!1),this.multiply(o.LSD,r)},brown:function(r){return r===void 0&&(r=!1),this.multiply(o.BROWN,r)},vintagePinhole:function(r){return r===void 0&&(r=!1),this.multiply(o.VINTAGE,r)},kodachrome:function(r){return r===void 0&&(r=!1),this.multiply(o.KODACHROME,r)},technicolor:function(r){return r===void 0&&(r=!1),this.multiply(o.TECHNICOLOR,r)},polaroid:function(r){return r===void 0&&(r=!1),this.multiply(o.POLAROID,r)},shiftToBGR:function(r){return r===void 0&&(r=!1),this.multiply(o.SHIFT_BGR,r)},multiply:function(r,n){n===void 0&&(n=!1),n||this.reset();var e=this._matrix,i=v;return i.set(e),e.set([i[0]*r[0]+i[1]*r[5]+i[2]*r[10]+i[3]*r[15],i[0]*r[1]+i[1]*r[6]+i[2]*r[11]+i[3]*r[16],i[0]*r[2]+i[1]*r[7]+i[2]*r[12]+i[3]*r[17],i[0]*r[3]+i[1]*r[8]+i[2]*r[13]+i[3]*r[18],i[0]*r[4]+i[1]*r[9]+i[2]*r[14]+i[3]*r[19]+i[4],i[5]*r[0]+i[6]*r[5]+i[7]*r[10]+i[8]*r[15],i[5]*r[1]+i[6]*r[6]+i[7]*r[11]+i[8]*r[16],i[5]*r[2]+i[6]*r[7]+i[7]*r[12]+i[8]*r[17],i[5]*r[3]+i[6]*r[8]+i[7]*r[13]+i[8]*r[18],i[5]*r[4]+i[6]*r[9]+i[7]*r[14]+i[8]*r[19]+i[9],i[10]*r[0]+i[11]*r[5]+i[12]*r[10]+i[13]*r[15],i[10]*r[1]+i[11]*r[6]+i[12]*r[11]+i[13]*r[16],i[10]*r[2]+i[11]*r[7]+i[12]*r[12]+i[13]*r[17],i[10]*r[3]+i[11]*r[8]+i[12]*r[13]+i[13]*r[18],i[10]*r[4]+i[11]*r[9]+i[12]*r[14]+i[13]*r[19]+i[14],i[15]*r[0]+i[16]*r[5]+i[17]*r[10]+i[18]*r[15],i[15]*r[1]+i[16]*r[6]+i[17]*r[11]+i[18]*r[16],i[15]*r[2]+i[16]*r[7]+i[17]*r[12]+i[18]*r[17],i[15]*r[3]+i[16]*r[8]+i[17]*r[13]+i[18]*r[18],i[15]*r[4]+i[16]*r[9]+i[17]*r[14]+i[18]*r[19]+i[19]]),this._dirty=!0,this}});o.BLACK_WHITE=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],o.NEGATIVE=[-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],o.DESATURATE_LUMINANCE=[.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,0,0,0,1,0],o.SEPIA=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],o.LSD=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],o.BROWN=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],o.VINTAGE=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],o.KODACHROME=[1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0],o.TECHNICOLOR=[1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0],o.POLAROID=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],o.SHIFT_BGR=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],c.exports=o},51767:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(29747),o=new a({initialize:function(n,e,i){this._rgb=[0,0,0],this.onChangeCallback=v,this.dirty=!1,this.set(n,e,i)},set:function(r,n,e){return r===void 0&&(r=0),n===void 0&&(n=0),e===void 0&&(e=0),this._rgb=[r,n,e],this.onChange(),this},equals:function(r,n,e){var i=this._rgb;return i[0]===r&&i[1]===n&&i[2]===e},onChange:function(){this.dirty=!0;var r=this._rgb;this.onChangeCallback.call(this,r[0],r[1],r[2])},r:{get:function(){return this._rgb[0]},set:function(r){this._rgb[0]=r,this.onChange()}},g:{get:function(){return this._rgb[1]},set:function(r){this._rgb[1]=r,this.onChange()}},b:{get:function(){return this._rgb[2]},set:function(r){this._rgb[2]=r,this.onChange()}},destroy:function(){this.onChangeCallback=null}});c.exports=o},60461:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={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};c.exports=m},54312:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(62235),v=t(35893),o=t(86327),r=t(88417),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),r(e,v(i)+h),o(e,a(i)+s),e};c.exports=n},46768:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(62235),v=t(26541),o=t(86327),r=t(385),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),r(e,v(i)-h),o(e,a(i)+s),e};c.exports=n},35827:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(62235),v=t(54380),o=t(86327),r=t(40136),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),r(e,v(i)+h),o(e,a(i)+s),e};c.exports=n},46871:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(66786),v=t(35893),o=t(7702),r=function(n,e,i,h){return i===void 0&&(i=0),h===void 0&&(h=0),a(n,v(e)+i,o(e)+h),n};c.exports=r},5198:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(7702),v=t(26541),o=t(20786),r=t(385),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),r(e,v(i)-h),o(e,a(i)+s),e};c.exports=n},11879:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(60461),v=[];v[a.BOTTOM_CENTER]=t(54312),v[a.BOTTOM_LEFT]=t(46768),v[a.BOTTOM_RIGHT]=t(35827),v[a.CENTER]=t(46871),v[a.LEFT_CENTER]=t(5198),v[a.RIGHT_CENTER]=t(80503),v[a.TOP_CENTER]=t(89698),v[a.TOP_LEFT]=t(922),v[a.TOP_RIGHT]=t(21373),v[a.LEFT_BOTTOM]=v[a.BOTTOM_LEFT],v[a.LEFT_TOP]=v[a.TOP_LEFT],v[a.RIGHT_BOTTOM]=v[a.BOTTOM_RIGHT],v[a.RIGHT_TOP]=v[a.TOP_RIGHT];var o=function(r,n,e,i,h){return v[e](r,n,i,h)};c.exports=o},80503:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(7702),v=t(54380),o=t(20786),r=t(40136),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),r(e,v(i)+h),o(e,a(i)+s),e};c.exports=n},89698:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(35893),v=t(17717),o=t(88417),r=t(66737),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),o(e,a(i)+h),r(e,v(i)-s),e};c.exports=n},922:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(26541),v=t(17717),o=t(385),r=t(66737),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),o(e,a(i)-h),r(e,v(i)-s),e};c.exports=n},21373:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(54380),v=t(17717),o=t(40136),r=t(66737),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),o(e,a(i)+h),r(e,v(i)-s),e};c.exports=n},91660:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={BottomCenter:t(54312),BottomLeft:t(46768),BottomRight:t(35827),Center:t(46871),LeftCenter:t(5198),QuickSet:t(11879),RightCenter:t(80503),TopCenter:t(89698),TopLeft:t(922),TopRight:t(21373)}},71926:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(60461),v=t(79291),o={In:t(91660),To:t(16694)};o=v(!1,o,a),c.exports=o},21578:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(62235),v=t(35893),o=t(88417),r=t(66737),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),o(e,v(i)+h),r(e,a(i)+s),e};c.exports=n},10210:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(62235),v=t(26541),o=t(385),r=t(66737),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),o(e,v(i)-h),r(e,a(i)+s),e};c.exports=n},82341:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(62235),v=t(54380),o=t(40136),r=t(66737),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),o(e,v(i)+h),r(e,a(i)+s),e};c.exports=n},87958:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(62235),v=t(26541),o=t(86327),r=t(40136),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),r(e,v(i)-h),o(e,a(i)+s),e};c.exports=n},40080:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(7702),v=t(26541),o=t(20786),r=t(40136),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),r(e,v(i)-h),o(e,a(i)+s),e};c.exports=n},88466:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(26541),v=t(17717),o=t(40136),r=t(66737),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),o(e,a(i)-h),r(e,v(i)-s),e};c.exports=n},38829:(c,m,t)=>{/** - * @author samme - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(60461),v=[];v[a.BOTTOM_CENTER]=t(21578),v[a.BOTTOM_LEFT]=t(10210),v[a.BOTTOM_RIGHT]=t(82341),v[a.LEFT_BOTTOM]=t(87958),v[a.LEFT_CENTER]=t(40080),v[a.LEFT_TOP]=t(88466),v[a.RIGHT_BOTTOM]=t(19211),v[a.RIGHT_CENTER]=t(34609),v[a.RIGHT_TOP]=t(48741),v[a.TOP_CENTER]=t(49440),v[a.TOP_LEFT]=t(81288),v[a.TOP_RIGHT]=t(61323);var o=function(r,n,e,i,h){return v[e](r,n,i,h)};c.exports=o},19211:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(62235),v=t(54380),o=t(86327),r=t(385),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),r(e,v(i)+h),o(e,a(i)+s),e};c.exports=n},34609:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(7702),v=t(54380),o=t(20786),r=t(385),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),r(e,v(i)+h),o(e,a(i)+s),e};c.exports=n},48741:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(54380),v=t(17717),o=t(385),r=t(66737),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),o(e,a(i)+h),r(e,v(i)-s),e};c.exports=n},49440:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(35893),v=t(17717),o=t(86327),r=t(88417),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),r(e,a(i)+h),o(e,v(i)-s),e};c.exports=n},81288:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(26541),v=t(17717),o=t(86327),r=t(385),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),r(e,a(i)-h),o(e,v(i)-s),e};c.exports=n},61323:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(54380),v=t(17717),o=t(86327),r=t(40136),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),r(e,a(i)+h),o(e,v(i)-s),e};c.exports=n},16694:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={BottomCenter:t(21578),BottomLeft:t(10210),BottomRight:t(82341),LeftBottom:t(87958),LeftCenter:t(40080),LeftTop:t(88466),QuickSet:t(38829),RightBottom:t(19211),RightCenter:t(34609),RightTop:t(48741),TopCenter:t(49440),TopLeft:t(81288),TopRight:t(61323)}},66786:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(88417),v=t(20786),o=function(r,n,e){return a(r,n),v(r,e)};c.exports=o},62235:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return t.y+t.height-t.height*t.originY};c.exports=m},72873:(c,m,t)=>{/** - * @author samme - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(62235),v=t(26541),o=t(54380),r=t(17717),n=t(87841),e=function(i,h){h===void 0&&(h=new n);var s=v(i),l=r(i);return h.x=s,h.y=l,h.width=o(i)-s,h.height=a(i)-l,h};c.exports=e},35893:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return t.x-t.width*t.originX+t.width*.5};c.exports=m},7702:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return t.y-t.height*t.originY+t.height*.5};c.exports=m},26541:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return t.x-t.width*t.originX};c.exports=m},87431:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return t.width*t.originX};c.exports=m},46928:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return t.height*t.originY};c.exports=m},54380:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return t.x+t.width-t.width*t.originX};c.exports=m},17717:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return t.y-t.height*t.originY};c.exports=m},86327:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return t.y=a-t.height+t.height*t.originY,t};c.exports=m},88417:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){var v=t.width*t.originX;return t.x=a+v-t.width*.5,t};c.exports=m},20786:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){var v=t.height*t.originY;return t.y=a+v-t.height*.5,t};c.exports=m},385:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return t.x=a+t.width*t.originX,t};c.exports=m},40136:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return t.x=a-t.width+t.width*t.originX,t};c.exports=m},66737:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return t.y=a+t.height*t.originY,t};c.exports=m},58724:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={CenterOn:t(66786),GetBottom:t(62235),GetBounds:t(72873),GetCenterX:t(35893),GetCenterY:t(7702),GetLeft:t(26541),GetOffsetX:t(87431),GetOffsetY:t(46928),GetRight:t(54380),GetTop:t(17717),SetBottom:t(86327),SetCenterX:t(88417),SetCenterY:t(20786),SetLeft:t(385),SetRight:t(40136),SetTop:t(66737)}},20623:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={setCrisp:function(t){var a=["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"];return a.forEach(function(v){t.style["image-rendering"]=v}),t.style.msInterpolationMode="nearest-neighbor",t},setBicubic:function(t){return t.style["image-rendering"]="auto",t.style.msInterpolationMode="bicubic",t}};c.exports=m},27919:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(8054),v=t(68703),o=[],r=!1,n=function(){var e=function(g,x,y,C,P){x===void 0&&(x=1),y===void 0&&(y=1),C===void 0&&(C=a.CANVAS),P===void 0&&(P=!1);var M,R=s(C);return R===null?(R={parent:g,canvas:document.createElement("canvas"),type:C},C===a.CANVAS&&o.push(R),M=R.canvas):(R.parent=g,M=R.canvas),P&&(R.parent=M),M.width=x,M.height=y,r&&C===a.CANVAS&&v.disable(M.getContext("2d",{willReadFrequently:!1})),M},i=function(g,x,y){return e(g,x,y,a.CANVAS)},h=function(g,x,y){return e(g,x,y,a.WEBGL)},s=function(g){if(g===void 0&&(g=a.CANVAS),g===a.WEBGL)return null;for(var x=0;x{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m="",t=function(){var a=function(n){for(var e=["i","webkitI","msI","mozI","oI"],i=0;i{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return a===void 0&&(a="none"),t.style.msTouchAction=a,t.style["ms-touch-action"]=a,t.style["touch-action"]=a,t};c.exports=m},91610:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){a===void 0&&(a="none");var v=["-webkit-","-khtml-","-moz-","-ms-",""];return v.forEach(function(o){t.style[o+"user-select"]=a}),t.style["-webkit-touch-callout"]=a,t.style["-webkit-tap-highlight-color"]="rgba(0, 0, 0, 0)",t};c.exports=m},26253:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={CanvasInterpolation:t(20623),CanvasPool:t(27919),Smoothing:t(68703),TouchAction:t(65208),UserSelect:t(91610)}},40987:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(37589),o=t(1e3),r=t(7537),n=t(87837),e=new a({initialize:function(h,s,l,f){h===void 0&&(h=0),s===void 0&&(s=0),l===void 0&&(l=0),f===void 0&&(f=255),this.r=0,this.g=0,this.b=0,this.a=255,this._h=0,this._s=0,this._v=0,this._locked=!1,this.gl=[0,0,0,1],this._color=0,this._color32=0,this._rgba="",this.setTo(h,s,l,f)},transparent:function(){return this._locked=!0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this._locked=!1,this.update(!0)},setTo:function(i,h,s,l,f){return l===void 0&&(l=255),f===void 0&&(f=!0),this._locked=!0,this.red=i,this.green=h,this.blue=s,this.alpha=l,this._locked=!1,this.update(f)},setGLTo:function(i,h,s,l){return l===void 0&&(l=1),this._locked=!0,this.redGL=i,this.greenGL=h,this.blueGL=s,this.alphaGL=l,this._locked=!1,this.update(!0)},setFromRGB:function(i){return this._locked=!0,this.red=i.r,this.green=i.g,this.blue=i.b,i.hasOwnProperty("a")&&(this.alpha=i.a),this._locked=!1,this.update(!0)},setFromHSV:function(i,h,s){return r(i,h,s,this)},update:function(i){if(i===void 0&&(i=!1),this._locked)return this;var h=this.r,s=this.g,l=this.b,f=this.a;return this._color=v(h,s,l),this._color32=o(h,s,l,f),this._rgba="rgba("+h+","+s+","+l+","+f/255+")",i&&n(h,s,l,this),this},updateHSV:function(){var i=this.r,h=this.g,s=this.b;return n(i,h,s,this),this},clone:function(){return new e(this.r,this.g,this.b,this.a)},gray:function(i){return this.setTo(i,i,i)},random:function(i,h){i===void 0&&(i=0),h===void 0&&(h=255);var s=Math.floor(i+Math.random()*(h-i)),l=Math.floor(i+Math.random()*(h-i)),f=Math.floor(i+Math.random()*(h-i));return this.setTo(s,l,f)},randomGray:function(i,h){i===void 0&&(i=0),h===void 0&&(h=255);var s=Math.floor(i+Math.random()*(h-i));return this.setTo(s,s,s)},saturate:function(i){return this.s+=i/100,this},desaturate:function(i){return this.s-=i/100,this},lighten:function(i){return this.v+=i/100,this},darken:function(i){return this.v-=i/100,this},brighten:function(i){var h=this.r,s=this.g,l=this.b;return h=Math.max(0,Math.min(255,h-Math.round(255*-(i/100)))),s=Math.max(0,Math.min(255,s-Math.round(255*-(i/100)))),l=Math.max(0,Math.min(255,l-Math.round(255*-(i/100)))),this.setTo(h,s,l)},color:{get:function(){return this._color}},color32:{get:function(){return this._color32}},rgba:{get:function(){return this._rgba}},redGL:{get:function(){return this.gl[0]},set:function(i){this.gl[0]=Math.min(Math.abs(i),1),this.r=Math.floor(this.gl[0]*255),this.update(!0)}},greenGL:{get:function(){return this.gl[1]},set:function(i){this.gl[1]=Math.min(Math.abs(i),1),this.g=Math.floor(this.gl[1]*255),this.update(!0)}},blueGL:{get:function(){return this.gl[2]},set:function(i){this.gl[2]=Math.min(Math.abs(i),1),this.b=Math.floor(this.gl[2]*255),this.update(!0)}},alphaGL:{get:function(){return this.gl[3]},set:function(i){this.gl[3]=Math.min(Math.abs(i),1),this.a=Math.floor(this.gl[3]*255),this.update()}},red:{get:function(){return this.r},set:function(i){i=Math.floor(Math.abs(i)),this.r=Math.min(i,255),this.gl[0]=i/255,this.update(!0)}},green:{get:function(){return this.g},set:function(i){i=Math.floor(Math.abs(i)),this.g=Math.min(i,255),this.gl[1]=i/255,this.update(!0)}},blue:{get:function(){return this.b},set:function(i){i=Math.floor(Math.abs(i)),this.b=Math.min(i,255),this.gl[2]=i/255,this.update(!0)}},alpha:{get:function(){return this.a},set:function(i){i=Math.floor(Math.abs(i)),this.a=Math.min(i,255),this.gl[3]=i/255,this.update()}},h:{get:function(){return this._h},set:function(i){this._h=i,r(i,this._s,this._v,this)}},s:{get:function(){return this._s},set:function(i){this._s=i,r(this._h,i,this._v,this)}},v:{get:function(){return this._v},set:function(i){this._v=i,r(this._h,this._s,i,this)}}});c.exports=e},92728:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(37589),v=function(o){o===void 0&&(o=1024);var r=[],n=255,e,i=255,h=0,s=0;for(e=0;e<=n;e++)r.push({r:i,g:e,b:s,color:a(i,e,s)});for(h=255,e=n;e>=0;e--)r.push({r:e,g:h,b:s,color:a(e,h,s)});for(i=0,e=0;e<=n;e++,h--)r.push({r:i,g:h,b:e,color:a(i,h,e)});for(h=0,s=255,e=0;e<=n;e++,s--,i++)r.push({r:i,g:h,b:s,color:a(i,h,s)});if(o===1024)return r;var l=[],f=0,u=1024/o;for(e=0;e{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){var a={r:t>>16&255,g:t>>8&255,b:t&255,a:255};return t>16777215&&(a.a=t>>>24),a};c.exports=m},62957:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){var a=t.toString(16);return a.length===1?"0"+a:a};c.exports=m},37589:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){return t<<16|a<<8|v};c.exports=m},1e3:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){return o<<24|t<<16|a<<8|v};c.exports=m},62183:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(40987),v=t(89528),o=function(r,n,e){var i=e,h=e,s=e;if(n!==0){var l=e<.5?e*(1+n):e+n-e*n,f=2*e-l;i=v(f,l,r+1/3),h=v(f,l,r),s=v(f,l,r-1/3)}var u=new a;return u.setGLTo(i,h,s,1)};c.exports=o},27939:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(7537),v=function(o,r){o===void 0&&(o=1),r===void 0&&(r=1);for(var n=[],e=0;e<=359;e++)n.push(a(e/359,o,r));return n};c.exports=v},7537:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(37589);function v(r,n,e,i){var h=(r+n*6)%6,s=Math.min(h,4-h,1);return Math.round(255*(i-i*e*Math.max(0,s)))}var o=function(r,n,e,i){n===void 0&&(n=1),e===void 0&&(e=1);var h=v(5,r,n,e),s=v(3,r,n,e),l=v(1,r,n,e);return i?i.setTo?i.setTo(h,s,l,i.alpha,!0):(i.r=h,i.g=s,i.b=l,i.color=a(h,s,l),i):{r:h,g:s,b:l,color:a(h,s,l)}};c.exports=o},70238:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(40987),v=function(o){var r=new a;o=o.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,function(s,l,f,u){return l+l+f+f+u+u});var n=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(o);if(n){var e=parseInt(n[1],16),i=parseInt(n[2],16),h=parseInt(n[3],16);r.setTo(e,i,h)}return r};c.exports=v},89528:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){return v<0&&(v+=1),v>1&&(v-=1),v<.16666666666666666?t+(a-t)*6*v:v<.5?a:v<.6666666666666666?t+(a-t)*(.6666666666666666-v)*6:t};c.exports=m},30100:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(40987),v=t(90664),o=function(r){var n=v(r);return new a(n.r,n.g,n.b,n.a)};c.exports=o},90664:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return t>16777215?{a:t>>>24,r:t>>16&255,g:t>>8&255,b:t&255}:{a:255,r:t>>16&255,g:t>>8&255,b:t&255}};c.exports=m},13699:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(28915),v=function(n,e,i,h,s,l,f,u){f===void 0&&(f=100),u===void 0&&(u=0);var d=u/f;return{r:a(n,h,d),g:a(e,s,d),b:a(i,l,d)}},o=function(n,e,i,h){return i===void 0&&(i=100),h===void 0&&(h=0),v(n.r,n.g,n.b,e.r,e.g,e.b,i,h)},r=function(n,e,i,h,s,l){return s===void 0&&(s=100),l===void 0&&(l=0),v(n.r,n.g,n.b,e,i,h,s,l)};c.exports={RGBWithRGB:v,ColorWithRGB:r,ColorWithColor:o}},68957:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(40987),v=function(o){return new a(o.r,o.g,o.b,o.a)};c.exports=v},87388:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(40987),v=function(o){var r=new a,n=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(o.toLowerCase());if(n){var e=parseInt(n[1],10),i=parseInt(n[2],10),h=parseInt(n[3],10),s=n[4]!==void 0?parseFloat(n[4]):1;r.setTo(e,i,h,s*255)}return r};c.exports=v},87837:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){o===void 0&&(o={h:0,s:0,v:0}),t/=255,a/=255,v/=255;var r=Math.min(t,a,v),n=Math.max(t,a,v),e=n-r,i=0,h=n===0?0:e/n,s=n;return n!==r&&(n===t?i=(a-v)/e+(a{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(62957),v=function(o,r,n,e,i){return e===void 0&&(e=255),i===void 0&&(i="#"),i==="#"?"#"+((1<<24)+(o<<16)+(r<<8)+n).toString(16).slice(1,7):"0x"+a(e)+a(o)+a(r)+a(n)};c.exports=v},85386:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(30976),v=t(40987),o=function(r,n){return r===void 0&&(r=0),n===void 0&&(n=255),new v(a(r,n),a(r,n),a(r,n))};c.exports=o},80333:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(70238),v=t(30100),o=t(68957),r=t(87388),n=function(e){var i=typeof e;switch(i){case"string":return e.substr(0,3).toLowerCase()==="rgb"?r(e):a(e);case"number":return v(e);case"object":return o(e)}};c.exports=n},3956:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(40987);a.ColorSpectrum=t(92728),a.ColorToRGBA=t(91588),a.ComponentToHex=t(62957),a.GetColor=t(37589),a.GetColor32=t(1e3),a.HexStringToColor=t(70238),a.HSLToColor=t(62183),a.HSVColorWheel=t(27939),a.HSVToRGB=t(7537),a.HueToComponent=t(89528),a.IntegerToColor=t(30100),a.IntegerToRGB=t(90664),a.Interpolate=t(13699),a.ObjectToColor=t(68957),a.RandomRGB=t(85386),a.RGBStringToColor=t(87388),a.RGBToHSV=t(87837),a.RGBToString=t(75723),a.ValueToColor=t(80333),c.exports=a},27460:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={Align:t(71926),BaseShader:t(73894),Bounds:t(58724),Canvas:t(26253),Color:t(3956),ColorMatrix:t(89422),Masks:t(69781),RGB:t(51767)}},6858:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(39429),o=new a({initialize:function(n,e,i,h,s,l){e||(e=n.sys.make.image({x:i,y:h,key:s,frame:l,add:!1})),this.bitmapMask=e,this.invertAlpha=!1,this.isStencil=!1},setBitmap:function(r){this.bitmapMask=r},preRenderWebGL:function(r,n,e){r.pipelines.BITMAPMASK_PIPELINE.beginMask(this,n,e)},postRenderWebGL:function(r,n,e){r.pipelines.BITMAPMASK_PIPELINE.endMask(this,n,e)},preRenderCanvas:function(){},postRenderCanvas:function(){},destroy:function(){this.bitmapMask=null}});v.register("bitmapMask",function(r,n,e,i,h){return new o(this.scene,r,n,e,i,h)}),c.exports=o},80661:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=new a({initialize:function(r,n){this.geometryMask=n,this.invertAlpha=!1,this.isStencil=!0,this.level=0},setShape:function(o){return this.geometryMask=o,this},setInvertAlpha:function(o){return o===void 0&&(o=!0),this.invertAlpha=o,this},preRenderWebGL:function(o,r,n){var e=o.gl;o.flush(),o.maskStack.length===0&&(e.enable(e.STENCIL_TEST),e.clear(e.STENCIL_BUFFER_BIT),o.maskCount=0),o.currentCameraMask.mask!==this&&(o.currentMask.mask=this),o.maskStack.push({mask:this,camera:n}),this.applyStencil(o,n,!0),o.maskCount++},applyStencil:function(o,r,n){var e=o.gl,i=this.geometryMask,h=o.maskCount,s=255;e.colorMask(!1,!1,!1,!1),n?(e.stencilFunc(e.EQUAL,h,s),e.stencilOp(e.KEEP,e.KEEP,e.INCR),h++):(e.stencilFunc(e.EQUAL,h+1,s),e.stencilOp(e.KEEP,e.KEEP,e.DECR)),this.level=h,i.renderWebGL(o,i,r),o.flush(),e.colorMask(!0,!0,!0,!0),e.stencilOp(e.KEEP,e.KEEP,e.KEEP),this.invertAlpha?e.stencilFunc(e.NOTEQUAL,h,s):e.stencilFunc(e.EQUAL,h,s)},postRenderWebGL:function(o){var r=o.gl;o.maskStack.pop(),o.maskCount--,o.flush();var n=o.currentMask;if(o.maskStack.length===0)n.mask=null,r.disable(r.STENCIL_TEST);else{var e=o.maskStack[o.maskStack.length-1];e.mask.applyStencil(o,e.camera,!1),o.currentCameraMask.mask!==e.mask?(n.mask=e.mask,n.camera=e.camera):n.mask=null}},preRenderCanvas:function(o,r,n){var e=this.geometryMask;o.currentContext.save(),e.renderCanvas(o,e,n,null,null,!0),o.currentContext.clip()},postRenderCanvas:function(o){o.currentContext.restore()},destroy:function(){this.geometryMask=null}});c.exports=v},69781:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={BitmapMask:t(6858),GeometryMask:t(80661)}},73894:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=new a({initialize:function(r,n,e,i){(!n||n==="")&&(n=["precision mediump float;","uniform vec2 resolution;","varying vec2 fragCoord;","void main () {"," vec2 uv = fragCoord / resolution.xy;"," gl_FragColor = vec4(uv.xyx, 1.0);","}"].join(` -`)),(!e||e==="")&&(e=["precision mediump float;","uniform mat4 uProjectionMatrix;","uniform mat4 uViewMatrix;","uniform vec2 uResolution;","attribute vec2 inPosition;","varying vec2 fragCoord;","varying vec2 outTexCoord;","void main () {"," gl_Position = uProjectionMatrix * uViewMatrix * vec4(inPosition, 1.0, 1.0);"," fragCoord = vec2(inPosition.x, uResolution.y - inPosition.y);"," outTexCoord = vec2(inPosition.x / uResolution.x, fragCoord.y / uResolution.y);","}"].join(` -`)),i===void 0&&(i=null),this.key=r,this.fragmentSrc=n,this.vertexSrc=e,this.uniforms=i}});c.exports=v},40366:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){var v;if(a)typeof a=="string"?v=document.getElementById(a):typeof a=="object"&&a.nodeType===1&&(v=a);else if(t.parentElement||a===null)return t;return v||(v=document.body),v.appendChild(t),t};c.exports=m},83719:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(40366),v=function(o){var r=o.config;if(!(!r.parent||!r.domCreateContainer)){var n=document.createElement("div");n.style.cssText=["display: block;","width: "+o.scale.width+"px;","height: "+o.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: "+r.domPointerEvents+";","transform: scale(1);","transform-origin: left top;"].join(" "),o.domContainer=n,a(n,r.parent)}};c.exports=v},57264:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(25892),v=function(o){if(document.readyState==="complete"||document.readyState==="interactive"){o();return}var r=function(){document.removeEventListener("deviceready",r,!0),document.removeEventListener("DOMContentLoaded",r,!0),window.removeEventListener("load",r,!0),o()};document.body?a.cordova?document.addEventListener("deviceready",r,!1):(document.addEventListener("DOMContentLoaded",r,!0),window.addEventListener("load",r,!0)):window.setTimeout(r,20)};c.exports=v},57811:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){if(!t)return window.innerHeight;var a=Math.abs(window.orientation),v={w:0,h:0},o=document.createElement("div");return o.setAttribute("style","position: fixed; height: 100vh; width: 0; top: 0"),document.documentElement.appendChild(o),v.w=a===90?o.offsetHeight:window.innerWidth,v.h=a===90?window.innerWidth:o.offsetHeight,document.documentElement.removeChild(o),o=null,Math.abs(window.orientation)!==90?v.h:v.w};c.exports=m},45818:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(13560),v=function(o,r){var n=window.screen,e=n?n.orientation||n.mozOrientation||n.msOrientation:!1;if(e&&typeof e.type=="string")return e.type;if(typeof e=="string")return e;if(typeof window.orientation=="number")return window.orientation===0||window.orientation===180?a.ORIENTATION.PORTRAIT:a.ORIENTATION.LANDSCAPE;if(window.matchMedia){if(window.matchMedia("(orientation: portrait)").matches)return a.ORIENTATION.PORTRAIT;if(window.matchMedia("(orientation: landscape)").matches)return a.ORIENTATION.LANDSCAPE}else return r>o?a.ORIENTATION.PORTRAIT:a.ORIENTATION.LANDSCAPE};c.exports=v},74403:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){var a;return t!==""&&(typeof t=="string"?a=document.getElementById(t):t&&t.nodeType===1&&(a=t)),a||(a=document.body),a};c.exports=m},56836:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){var a="";try{if(window.DOMParser){var v=new DOMParser;a=v.parseFromString(t,"text/xml")}else a=new ActiveXObject("Microsoft.XMLDOM"),a.loadXML(t)}catch{a=null}return!a||!a.documentElement||a.getElementsByTagName("parsererror").length?null:a};c.exports=m},35846:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){t.parentNode&&t.parentNode.removeChild(t)};c.exports=m},43092:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(29747),o=new a({initialize:function(){this.isRunning=!1,this.callback=v,this.isSetTimeOut=!1,this.timeOutID=null,this.delay=0;var n=this;this.step=function e(i){n.callback(i),n.isRunning&&(n.timeOutID=window.requestAnimationFrame(e))},this.stepTimeout=function e(){n.isRunning&&(n.timeOutID=window.setTimeout(e,n.delay)),n.callback(window.performance.now())}},start:function(r,n,e){this.isRunning||(this.callback=r,this.isSetTimeOut=n,this.delay=e,this.isRunning=!0,this.timeOutID=n?window.setTimeout(this.stepTimeout,0):window.requestAnimationFrame(this.step))},stop:function(){this.isRunning=!1,this.isSetTimeOut?clearTimeout(this.timeOutID):window.cancelAnimationFrame(this.timeOutID)},destroy:function(){this.stop(),this.callback=v}});c.exports=o},84902:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a={AddToDOM:t(40366),DOMContentLoaded:t(57264),GetInnerHeight:t(57811),GetScreenOrientation:t(45818),GetTarget:t(74403),ParseXML:t(56836),RemoveFromDOM:t(35846),RequestAnimationFrame:t(43092)};c.exports=a},47565:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(50792),o=t(37277),r=new a({Extends:v,initialize:function(){v.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});o.register("EventEmitter",r,"events"),c.exports=r},93055:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={EventEmitter:t(47565)}},20122:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(72898),o=t(14811),r=new a({Extends:v,initialize:function(e,i){i===void 0&&(i=1),v.call(this,o.BARREL,e),this.amount=i}});c.exports=r},32251:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(72898),o=t(14811),r=new a({Extends:v,initialize:function(e,i,h,s,l,f,u){h===void 0&&(h=1),s===void 0&&(s=1),l===void 0&&(l=1),f===void 0&&(f=1),u===void 0&&(u=4),v.call(this,o.BLOOM,e),this.steps=u,this.offsetX=h,this.offsetY=s,this.blurStrength=l,this.strength=f,this.glcolor=[1,1,1],i!=null&&(this.color=i)},color:{get:function(){var n=this.glcolor;return(n[0]*255<<16)+(n[1]*255<<8)+(n[2]*255|0)},set:function(n){var e=this.glcolor;e[0]=(n>>16&255)/255,e[1]=(n>>8&255)/255,e[2]=(n&255)/255}}});c.exports=r},9047:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(72898),o=t(14811),r=new a({Extends:v,initialize:function(e,i,h,s,l,f,u){i===void 0&&(i=0),h===void 0&&(h=2),s===void 0&&(s=2),l===void 0&&(l=1),u===void 0&&(u=4),v.call(this,o.BLUR,e),this.quality=i,this.x=h,this.y=s,this.steps=u,this.strength=l,this.glcolor=[1,1,1],f!=null&&(this.color=f)},color:{get:function(){var n=this.glcolor;return(n[0]*255<<16)+(n[1]*255<<8)+(n[2]*255|0)},set:function(n){var e=this.glcolor;e[0]=(n>>16&255)/255,e[1]=(n>>8&255)/255,e[2]=(n&255)/255}}});c.exports=r},27885:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(72898),o=t(14811),r=new a({Extends:v,initialize:function(e,i,h,s,l,f,u,d){i===void 0&&(i=.5),h===void 0&&(h=1),s===void 0&&(s=.2),l===void 0&&(l=!1),f===void 0&&(f=1),u===void 0&&(u=1),d===void 0&&(d=1),v.call(this,o.BOKEH,e),this.radius=i,this.amount=h,this.contrast=s,this.isTiltShift=l,this.strength=d,this.blurX=f,this.blurY=u}});c.exports=r},12578:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(72898),o=t(14811),r=new a({Extends:v,initialize:function(e,i,h,s,l,f){i===void 0&&(i=8),l===void 0&&(l=1),f===void 0&&(f=.005),v.call(this,o.CIRCLE,e),this.scale=l,this.feather=f,this.thickness=i,this.glcolor=[1,.2,.7],this.glcolor2=[1,0,0,.4],h!=null&&(this.color=h),s!=null&&(this.backgroundColor=s)},color:{get:function(){var n=this.glcolor;return(n[0]*255<<16)+(n[1]*255<<8)+(n[2]*255|0)},set:function(n){var e=this.glcolor;e[0]=(n>>16&255)/255,e[1]=(n>>8&255)/255,e[2]=(n&255)/255}},backgroundColor:{get:function(){var n=this.glcolor2;return(n[0]*255<<16)+(n[1]*255<<8)+(n[2]*255|0)},set:function(n){var e=this.glcolor2;e[0]=(n>>16&255)/255,e[1]=(n>>8&255)/255,e[2]=(n&255)/255}},backgroundAlpha:{get:function(){return this.glcolor2[3]},set:function(n){this.glcolor2[3]=n}}});c.exports=r},15802:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(89422),o=t(14811),r=new a({Extends:v,initialize:function(e){v.call(this),this.type=o.COLOR_MATRIX,this.gameObject=e,this.active=!0},destroy:function(){this.gameObject=null,this._matrix=null,this._data=null}});c.exports=r},72898:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=new a({initialize:function(r,n){this.type=r,this.gameObject=n,this.active=!0},setActive:function(o){return this.active=o,this},destroy:function(){this.gameObject=null,this.active=!1}});c.exports=v},44553:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(72898),o=t(14811),r=new a({Extends:v,initialize:function(e,i,h,s){i===void 0&&(i="__WHITE"),h===void 0&&(h=.005),s===void 0&&(s=.005),v.call(this,o.DISPLACEMENT,e),this.x=h,this.y=s,this.glTexture,this.setTexture(i)},setTexture:function(n){var e=this.gameObject.scene.sys.textures.getFrame(n);return e&&(this.glTexture=e.glTexture),this}});c.exports=r},68531:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(72898),o=t(14811),r=new a({Extends:v,initialize:function(e,i,h,s,l){h===void 0&&(h=4),s===void 0&&(s=0),l===void 0&&(l=!1),v.call(this,o.GLOW,e),this.outerStrength=h,this.innerStrength=s,this.knockout=l,this.glcolor=[1,1,1,1],i!==void 0&&(this.color=i)},color:{get:function(){var n=this.glcolor;return(n[0]*255<<16)+(n[1]*255<<8)+(n[2]*255|0)},set:function(n){var e=this.glcolor;e[0]=(n>>16&255)/255,e[1]=(n>>8&255)/255,e[2]=(n&255)/255}}});c.exports=r},37102:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(72898),o=t(14811),r=new a({Extends:v,initialize:function(e,i,h,s,l,f,u,d,p){s===void 0&&(s=.2),l===void 0&&(l=0),f===void 0&&(f=0),u===void 0&&(u=0),d===void 0&&(d=1),p===void 0&&(p=0),v.call(this,o.GRADIENT,e),this.alpha=s,this.size=p,this.fromX=l,this.fromY=f,this.toX=u,this.toY=d,this.glcolor1=[255,0,0],this.glcolor2=[0,255,0],i!=null&&(this.color1=i),h!=null&&(this.color2=h)},color1:{get:function(){var n=this.glcolor1;return(n[0]<<16)+(n[1]<<8)+(n[2]|0)},set:function(n){var e=this.glcolor1;e[0]=n>>16&255,e[1]=n>>8&255,e[2]=n&255}},color2:{get:function(){var n=this.glcolor2;return(n[0]<<16)+(n[1]<<8)+(n[2]|0)},set:function(n){var e=this.glcolor2;e[0]=n>>16&255,e[1]=n>>8&255,e[2]=n&255}}});c.exports=r},86886:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(72898),o=t(14811),r=new a({Extends:v,initialize:function(e,i){i===void 0&&(i=1),v.call(this,o.PIXELATE,e),this.amount=i}});c.exports=r},92322:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(72898),o=t(14811),r=new a({Extends:v,initialize:function(e,i,h,s,l,f,u,d){i===void 0&&(i=0),h===void 0&&(h=0),s===void 0&&(s=.1),l===void 0&&(l=1),u===void 0&&(u=6),d===void 0&&(d=1),v.call(this,o.SHADOW,e),this.x=i,this.y=h,this.decay=s,this.power=l,this.glcolor=[0,0,0,1],this.samples=u,this.intensity=d,f!==void 0&&(this.color=f)},color:{get:function(){var n=this.glcolor;return(n[0]*255<<16)+(n[1]*255<<8)+(n[2]*255|0)},set:function(n){var e=this.glcolor;e[0]=(n>>16&255)/255,e[1]=(n>>8&255)/255,e[2]=(n&255)/255}}});c.exports=r},39563:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(72898),o=t(14811),r=new a({Extends:v,initialize:function(e,i,h,s,l){i===void 0&&(i=.5),h===void 0&&(h=.5),s===void 0&&(s=3),l===void 0&&(l=!1),v.call(this,o.SHINE,e),this.speed=i,this.lineWidth=h,this.gradient=s,this.reveal=l}});c.exports=r},56448:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(72898),o=t(14811),r=new a({Extends:v,initialize:function(e,i,h,s,l){i===void 0&&(i=.5),h===void 0&&(h=.5),s===void 0&&(s=.5),l===void 0&&(l=.5),v.call(this,o.VIGNETTE,e),this.x=i,this.y=h,this.radius=s,this.strength=l}});c.exports=r},38433:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(72898),o=t(14811),r=new a({Extends:v,initialize:function(e,i,h,s,l){i===void 0&&(i=.1),h===void 0&&(h=0),s===void 0&&(s=0),l===void 0&&(l=!1),v.call(this,o.WIPE,e),this.progress=0,this.wipeWidth=i,this.direction=h,this.axis=s,this.reveal=l}});c.exports=r},14811:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={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};c.exports=m},66064:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(79291),v=t(14811),o={Barrel:t(20122),Controller:t(72898),Bloom:t(32251),Blur:t(9047),Bokeh:t(27885),Circle:t(12578),ColorMatrix:t(15802),Displacement:t(44553),Glow:t(68531),Gradient:t(37102),Pixelate:t(86886),Shadow:t(92322),Shine:t(39563),Vignette:t(56448),Wipe:t(38433)};o=a(!1,o,v),c.exports=o},25305:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(10312),v=t(23568),o=function(r,n,e){n.x=v(e,"x",0),n.y=v(e,"y",0),n.depth=v(e,"depth",0),n.flipX=v(e,"flipX",!1),n.flipY=v(e,"flipY",!1);var i=v(e,"scale",null);typeof i=="number"?n.setScale(i):i!==null&&(n.scaleX=v(i,"x",1),n.scaleY=v(i,"y",1));var h=v(e,"scrollFactor",null);typeof h=="number"?n.setScrollFactor(h):h!==null&&(n.scrollFactorX=v(h,"x",1),n.scrollFactorY=v(h,"y",1)),n.rotation=v(e,"rotation",0);var s=v(e,"angle",null);s!==null&&(n.angle=s),n.alpha=v(e,"alpha",1);var l=v(e,"origin",null);if(typeof l=="number")n.setOrigin(l);else if(l!==null){var f=v(l,"x",.5),u=v(l,"y",.5);n.setOrigin(f,u)}n.blendMode=v(e,"blendMode",a.NORMAL),n.visible=v(e,"visible",!0);var d=v(e,"add",!0);return d&&r.sys.displayList.add(n),n.preUpdate&&r.sys.updateList.add(n),n};c.exports=o},13059:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(23568),v=function(o,r){var n=a(r,"anims",null);if(n===null)return o;if(typeof n=="string")o.anims.play(n);else if(typeof n=="object"){var e=o.anims,i=a(n,"key",void 0);if(i){var h=a(n,"startFrame",void 0),s=a(n,"delay",0),l=a(n,"repeat",0),f=a(n,"repeatDelay",0),u=a(n,"yoyo",!1),d=a(n,"play",!1),p=a(n,"delayedPlay",0),g={key:i,delay:s,repeat:l,repeatDelay:f,yoyo:u,startFrame:h};d?e.play(g):p>0?e.playAfterDelay(g,p):e.load(g)}}return o};c.exports=v},8050:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(73162),o=t(37277),r=t(51708),n=t(44594),e=t(19186),i=new a({Extends:v,initialize:function(s){v.call(this,s),this.sortChildrenFlag=!1,this.scene=s,this.systems=s.sys,this.events=s.sys.events,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.events.once(n.BOOT,this.boot,this),this.events.on(n.START,this.start,this)},boot:function(){this.events.once(n.DESTROY,this.destroy,this)},addChildCallback:function(h){h.displayList&&h.displayList!==this&&h.removeFromDisplayList(),h.parentContainer&&h.parentContainer.remove(h),h.displayList||(this.queueDepthSort(),h.displayList=this,h.emit(r.ADDED_TO_SCENE,h,this.scene),this.events.emit(n.ADDED_TO_SCENE,h,this.scene))},removeChildCallback:function(h){this.queueDepthSort(),h.displayList=null,h.emit(r.REMOVED_FROM_SCENE,h,this.scene),this.events.emit(n.REMOVED_FROM_SCENE,h,this.scene)},start:function(){this.events.once(n.SHUTDOWN,this.shutdown,this)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(e(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(h,s){return h._depth-s._depth},getChildren:function(){return this.list},shutdown:function(){for(var h=this.list;h.length;)h[0].destroy(!0);this.events.off(n.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(n.START,this.start,this),this.scene=null,this.systems=null,this.events=null}});o.register("DisplayList",i,"displayList"),c.exports=i},95643:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(53774),o=t(45893),r=t(50792),n=t(51708),e=t(44594),i=new a({Extends:r,initialize:function(s,l){r.call(this),this.scene=s,this.displayList=null,this.type=l,this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.on(n.ADDED_TO_SCENE,this.addedToScene,this),this.on(n.REMOVED_FROM_SCENE,this.removedFromScene,this),s.sys.queueDepthSort()},setActive:function(h){return this.active=h,this},setName:function(h){return this.name=h,this},setState:function(h){return this.state=h,this},setDataEnabled:function(){return this.data||(this.data=new o(this)),this},setData:function(h,s){return this.data||(this.data=new o(this)),this.data.set(h,s),this},incData:function(h,s){return this.data||(this.data=new o(this)),this.data.inc(h,s),this},toggleData:function(h){return this.data||(this.data=new o(this)),this.data.toggle(h),this},getData:function(h){return this.data||(this.data=new o(this)),this.data.get(h)},setInteractive:function(h,s,l){return this.scene.sys.input.enable(this,h,s,l),this},disableInteractive:function(){return this.scene.sys.input.disable(this),this},removeInteractive:function(){return this.scene.sys.input.clear(this),this.input=void 0,this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return v(this)},willRender:function(h){var s=this.displayList&&this.displayList.active?this.displayList.willRender(h):!0;return!(!s||i.RENDER_MASK!==this.renderFlags||this.cameraFilter!==0&&this.cameraFilter&h.id)},getIndexList:function(){for(var h=this,s=this.parentContainer,l=[];s&&(l.unshift(s.getIndex(h)),h=s,s.parentContainer);)s=s.parentContainer;return this.displayList?l.unshift(this.displayList.getIndex(h)):l.unshift(this.scene.sys.displayList.getIndex(h)),l},addToDisplayList:function(h){return h===void 0&&(h=this.scene.sys.displayList),this.displayList&&this.displayList!==h&&this.removeFromDisplayList(),h.exists(this)||(this.displayList=h,h.add(this,!0),h.queueDepthSort(),this.emit(n.ADDED_TO_SCENE,this,this.scene),h.events.emit(e.ADDED_TO_SCENE,this,this.scene)),this},addToUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.add(this),this},removeFromDisplayList:function(){var h=this.displayList||this.scene.sys.displayList;return h&&h.exists(this)&&(h.remove(this,!0),h.queueDepthSort(),this.displayList=null,this.emit(n.REMOVED_FROM_SCENE,this,this.scene),h.events.emit(e.REMOVED_FROM_SCENE,this,this.scene)),this},removeFromUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.remove(this),this},destroy:function(h){!this.scene||this.ignoreDestroy||(h===void 0&&(h=!1),this.preDestroy&&this.preDestroy.call(this),this.emit(n.DESTROY,this,h),this.removeAllListeners(),this.postPipelines&&this.resetPostPipeline(!0),this.removeFromDisplayList(),this.removeFromUpdateList(),this.input&&(this.scene.sys.input.clear(this),this.input=void 0),this.data&&(this.data.destroy(),this.data=void 0),this.body&&(this.body.destroy(),this.body=void 0),this.preFX&&(this.preFX.destroy(),this.preFX=void 0),this.postFX&&(this.postFX.destroy(),this.postFX=void 0),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0)}});i.RENDER_MASK=15,c.exports=i},44603:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(37277),o=t(44594),r=new a({initialize:function(e){this.scene=e,this.systems=e.sys,this.events=e.sys.events,this.displayList,this.updateList,this.events.once(o.BOOT,this.boot,this),this.events.on(o.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(o.DESTROY,this.destroy,this)},start:function(){this.events.once(o.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.events.off(o.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(o.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});r.register=function(n,e){r.prototype.hasOwnProperty(n)||(r.prototype[n]=e)},r.remove=function(n){r.prototype.hasOwnProperty(n)&&delete r.prototype[n]},v.register("GameObjectCreator",r,"make"),c.exports=r},39429:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(37277),o=t(44594),r=new a({initialize:function(e){this.scene=e,this.systems=e.sys,this.events=e.sys.events,this.displayList,this.updateList,this.events.once(o.BOOT,this.boot,this),this.events.on(o.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(o.DESTROY,this.destroy,this)},start:function(){this.events.once(o.SHUTDOWN,this.shutdown,this)},existing:function(n){return(n.renderCanvas||n.renderWebGL)&&this.displayList.add(n),n.preUpdate&&this.updateList.add(n),n},shutdown:function(){this.events.off(o.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(o.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});r.register=function(n,e){r.prototype.hasOwnProperty(n)||(r.prototype[n]=e)},r.remove=function(n){r.prototype.hasOwnProperty(n)&&delete r.prototype[n]},v.register("GameObjectFactory",r,"add"),c.exports=r},91296:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(61340),v=new a,o=new a,r=new a,n={camera:v,sprite:o,calc:r},e=function(i,h,s){var l=v,f=o,u=r;return f.applyITRS(i.x,i.y,i.rotation,i.scaleX,i.scaleY),l.copyFrom(h.matrix),s?(l.multiplyWithOffset(s,-h.scrollX*i.scrollFactorX,-h.scrollY*i.scrollFactorY),f.e=i.x,f.f=i.y):(f.e-=h.scrollX*i.scrollFactorX,f.f-=h.scrollY*i.scrollFactorY),l.multiply(f,u),n};c.exports=e},45027:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(25774),o=t(37277),r=t(44594),n=new a({Extends:v,initialize:function(i){v.call(this),this.checkQueue=!0,this.scene=i,this.systems=i.sys,i.sys.events.once(r.BOOT,this.boot,this),i.sys.events.on(r.START,this.start,this)},boot:function(){this.systems.events.once(r.DESTROY,this.destroy,this)},start:function(){var e=this.systems.events;e.on(r.PRE_UPDATE,this.update,this),e.on(r.UPDATE,this.sceneUpdate,this),e.once(r.SHUTDOWN,this.shutdown,this)},sceneUpdate:function(e,i){for(var h=this._active,s=h.length,l=0;l{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o,r,n,e,i,h,s,l,f,u,d,p){var g=v.x-a.displayOriginX+r,x=v.y-a.displayOriginY+n,y=g+v.w,C=x+v.h,P=e.getXRound(g,x,i),M=e.getYRound(g,x,i),R=e.getXRound(g,C,i),I=e.getYRound(g,C,i),L=e.getXRound(y,C,i),B=e.getYRound(y,C,i),N=e.getXRound(y,x,i),G=e.getYRound(y,x,i);t.batchQuad(a,P,M,R,I,L,B,N,G,o.u0,o.v0,o.u1,o.v1,h,s,l,f,u,d,p)};c.exports=m},53048:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){if(v===void 0&&(v=!1),o===void 0)return o={local:{x:0,y:0,width:0,height:0},global:{x:0,y:0,width:0,height:0},lines:{shortest:0,longest:0,lengths:null,height:0},wrappedText:"",words:[],characters:[],scaleX:0,scaleY:0},o;var r=t.text,n=r.length,e=t.maxWidth,i=t.wordWrapCharCode,h=Number.MAX_VALUE,s=Number.MAX_VALUE,l=0,f=0,u=t.fontData.chars,d=t.fontData.lineHeight,p=t.letterSpacing,g=t.lineSpacing,x=0,y=0,C=0,P=null,M=t._align,R=0,I=0,L=t.fontSize/t.fontData.size,B=L*t.scaleX,N=L*t.scaleY,G=null,V=0,K=[],j=Number.MAX_VALUE,J=0,X=0,Y=0,b,z=[],W=[],H=null;if(e>0){for(b=0;be||vt>e?(et.push(st.i-1),st.cr?(et.push(st.i+st.word.length),k=0,Q=null):Q=st):st.cr&&(et.push(st.i+st.word.length),k=0,Q=null)}var At=function(Qt,de,ve){return Qt.substr(0,de)+ve+Qt.substr(de+1)};for(b=et.length-1;b>=0;b--)r=At(r,et[b],` -`);o.wrappedText=r,n=r.length,z=[],H=null}var Et=0;for(b=0;bJ&&(J=Y),YR&&(h=R),s>I&&(s=I);var ct=R+P.xAdvance,Ct=I+d;lJ&&(J=Y),Y0)for(var wt=0;wt{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(21859),v=function(o,r,n,e,i,h,s){var l=o.sys.textures.get(n),f=l.get(e),u=o.sys.cache.xml.get(i);if(f&&u){var d=a(u,f,h,s,l);return o.sys.cache.bitmapFont.add(r,{data:d,texture:n,frame:e,fromAtlas:!0}),!0}else return!1};c.exports=v},6925:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(35154),v=function(o,r){var n=r.width,e=r.height,i=Math.floor(n/2),h=Math.floor(e/2),s=a(r,"chars","");if(s!==""){var l=a(r,"image",""),f=o.sys.textures.getFrame(l),u=f.cutX,d=f.cutY,p=f.source.width,g=f.source.height,x=a(r,"offset.x",0),y=a(r,"offset.y",0),C=a(r,"spacing.x",0),P=a(r,"spacing.y",0),M=a(r,"lineSpacing",0),R=a(r,"charsPerRow",null);R===null&&(R=p/n,R>s.length&&(R=s.length));for(var I=x,L=y,B={retroFont:!0,font:l,size:n,lineHeight:e+M,chars:{}},N=0,G=0;G{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */function m(a,v){return parseInt(a.getAttribute(v),10)}var t=function(a,v,o,r,n){o===void 0&&(o=0),r===void 0&&(r=0);var e=v.cutX,i=v.cutY,h=v.source.width,s=v.source.height,l=v.sourceIndex,f={},u=a.getElementsByTagName("info")[0],d=a.getElementsByTagName("common")[0];f.font=u.getAttribute("face"),f.size=m(u,"size"),f.lineHeight=m(d,"lineHeight")+r,f.chars={};var p=a.getElementsByTagName("char"),g=v!==void 0&&v.trimmed;if(g)var x=v.height,y=v.width;for(var C=0;C{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(87662),v=t(79291),o={Parse:t(6925)};o=v(!1,o,a),c.exports=o},87662:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={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`};c.exports=m},2638:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(22186),v=t(83419),o=t(12310),r=new v({Extends:a,Mixins:[o],initialize:function(e,i,h,s,l,f,u){a.call(this,e,i,h,s,l,f,u),this.type="DynamicBitmapText",this.scrollX=0,this.scrollY=0,this.cropWidth=0,this.cropHeight=0,this.displayCallback,this.callbackData={parent:this,color:0,tint:{topLeft:0,topRight:0,bottomLeft:0,bottomRight:0},index:0,charCode:0,x:0,y:0,scale:0,rotation:0,data:0}},setSize:function(n,e){return this.cropWidth=n,this.cropHeight=e,this},setDisplayCallback:function(n){return this.displayCallback=n,this},setScrollX:function(n){return this.scrollX=n,this},setScrollY:function(n){return this.scrollY=n,this}});c.exports=r},86741:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(20926),v=function(o,r,n,e){var i=r._text,h=i.length,s=o.currentContext;if(!(h===0||!a(o,s,r,n,e))){n.addToRenderList(r);var l=r.fromAtlas?r.frame:r.texture.frames.__BASE,f=r.displayCallback,u=r.callbackData,d=r.fontData.chars,p=r.fontData.lineHeight,g=r._letterSpacing,x=0,y=0,C=0,P=null,M=0,R=0,I=0,L=0,B=0,N=0,G=null,V=0,K=r.frame.source.image,j=l.cutX,J=l.cutY,X=0,Y=0,b=r._fontSize/r.fontData.size,z=r._align,W=0,H=0;r.getTextBounds(!1);var Z=r._bounds.lines;z===1?H=(Z.longest-Z.lengths[0])/2:z===2&&(H=Z.longest-Z.lengths[0]),s.translate(-r.displayOriginX,-r.displayOriginY);var Q=n.roundPixels;r.cropWidth>0&&r.cropHeight>0&&(s.beginPath(),s.rect(0,0,r.cropWidth,r.cropHeight),s.clip());for(var k=0;k{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2638),v=t(25305),o=t(44603),r=t(23568);o.register("dynamicBitmapText",function(n,e){n===void 0&&(n={});var i=r(n,"font",""),h=r(n,"text",""),s=r(n,"size",!1),l=new a(this.scene,0,0,i,h,s);return e!==void 0&&(n.add=e),v(this.scene,l,n),l})},72566:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2638),v=t(39429);v.register("dynamicBitmapText",function(o,r,n,e,i){return this.displayList.add(new a(this.scene,o,r,n,e,i))})},12310:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(73482),o=t(86741),c.exports={renderWebGL:v,renderCanvas:o}},73482:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(91296),v=t(61340),o=t(70554),r=new v,n=function(e,i,h,s){var l=i.text,f=l.length;if(f!==0){h.addToRenderList(i);var u=e.pipelines.set(i.pipeline,i),d=a(i,h,s);e.pipelines.preBatch(i);var p=d.sprite,g=d.calc,x=r,y=i.cropWidth>0||i.cropHeight>0;y&&(u.flush(),e.pushScissor(g.tx,g.ty,i.cropWidth*g.scaleX,i.cropHeight*g.scaleY));var C=i.frame,P=C.glTexture,M=i.tintFill,R=o.getTintAppendFloatAlpha(i.tintTopLeft,h.alpha*i._alphaTL),I=o.getTintAppendFloatAlpha(i.tintTopRight,h.alpha*i._alphaTR),L=o.getTintAppendFloatAlpha(i.tintBottomLeft,h.alpha*i._alphaBL),B=o.getTintAppendFloatAlpha(i.tintBottomRight,h.alpha*i._alphaBR),N=u.setGameObject(i),G=0,V=0,K=0,j=0,J=i.letterSpacing,X,Y=0,b=0,z,W=i.scrollX,H=i.scrollY,Z=i.fontData,Q=Z.chars,k=Z.lineHeight,et=i.fontSize/Z.size,st=0,rt=i._align,ot=0,ft=0,at=i.getTextBounds(!1);i.maxWidth>0&&(l=at.wrappedText,f=l.length);var vt=i._bounds.lines;rt===1?ft=(vt.longest-vt.lengths[0])/2:rt===2&&(ft=vt.longest-vt.lengths[0]);for(var At=h.roundPixels,Et=i.displayCallback,Pt=i.callbackData,ct=0;ct{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(45319),o=t(31401),r=t(95643),n=t(53048),e=t(61327),i=t(21859),h=t(87841),s=t(18658),l=new a({Extends:r,Mixins:[o.Alpha,o.BlendMode,o.Depth,o.GetBounds,o.Mask,o.Origin,o.Pipeline,o.PostPipeline,o.ScrollFactor,o.Texture,o.Tint,o.Transform,o.Visible,s],initialize:function(u,d,p,g,x,y,C){x===void 0&&(x=""),C===void 0&&(C=0),r.call(this,u,"BitmapText"),this.font=g;var P=this.scene.sys.cache.bitmapFont.get(g);P||console.warn("Invalid BitmapText key: "+g),this.fontData=P.data,this._text="",this._fontSize=y||this.fontData.size,this._letterSpacing=0,this._lineSpacing=0,this._align=C,this._bounds=n(),this._dirty=!0,this._maxWidth=0,this.wordWrapCharCode=32,this.charColors=[],this.dropShadowX=0,this.dropShadowY=0,this.dropShadowColor=0,this.dropShadowAlpha=.5,this.fromAtlas=P.fromAtlas,this.setTexture(P.texture,P.frame),this.setPosition(d,p),this.setOrigin(0,0),this.initPipeline(),this.initPostPipeline(),this.setText(x)},setLeftAlign:function(){return this._align=l.ALIGN_LEFT,this._dirty=!0,this},setCenterAlign:function(){return this._align=l.ALIGN_CENTER,this._dirty=!0,this},setRightAlign:function(){return this._align=l.ALIGN_RIGHT,this._dirty=!0,this},setFontSize:function(f){return this._fontSize=f,this._dirty=!0,this},setLetterSpacing:function(f){return f===void 0&&(f=0),this._letterSpacing=f,this._dirty=!0,this},setLineSpacing:function(f){return f===void 0&&(f=0),this.lineSpacing=f,this},setText:function(f){return!f&&f!==0&&(f=""),Array.isArray(f)&&(f=f.join(` -`)),f!==this.text&&(this._text=f.toString(),this._dirty=!0,this.updateDisplayOrigin()),this},setDropShadow:function(f,u,d,p){return f===void 0&&(f=0),u===void 0&&(u=0),d===void 0&&(d=0),p===void 0&&(p=.5),this.dropShadowX=f,this.dropShadowY=u,this.dropShadowColor=d,this.dropShadowAlpha=p,this},setCharacterTint:function(f,u,d,p,g,x,y){f===void 0&&(f=0),u===void 0&&(u=1),d===void 0&&(d=!1),p===void 0&&(p=-1),g===void 0&&(g=p,x=p,y=p);var C=this.text.length;u===-1&&(u=C),f<0&&(f=C+f),f=v(f,0,C-1);for(var P=v(f+u,f,C),M=this.charColors,R=f;R{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(20926),v=function(o,r,n,e){var i=r._text,h=i.length,s=o.currentContext;if(!(h===0||!a(o,s,r,n,e))){n.addToRenderList(r);var l=r.fromAtlas?r.frame:r.texture.frames.__BASE,f=r.fontData.chars,u=r.fontData.lineHeight,d=r._letterSpacing,p=r._lineSpacing,g=0,x=0,y=0,C=null,P=0,M=0,R=0,I=0,L=0,B=0,N=null,G=0,V=l.source.image,K=l.cutX,j=l.cutY,J=r._fontSize/r.fontData.size,X=r._align,Y=0,b=0,z=r.getTextBounds(!1);r.maxWidth>0&&(i=z.wrappedText,h=i.length);var W=r._bounds.lines;X===1?b=(W.longest-W.lengths[0])/2:X===2&&(b=W.longest-W.lengths[0]),s.translate(-r.displayOriginX,-r.displayOriginY);for(var H=n.roundPixels,Z=0;Z{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(22186),v=t(25305),o=t(44603),r=t(23568),n=t(35154);o.register("bitmapText",function(e,i){e===void 0&&(e={});var h=n(e,"font",""),s=r(e,"text",""),l=r(e,"size",!1),f=n(e,"align",0),u=new a(this.scene,0,0,h,s,l,f);return i!==void 0&&(e.add=i),v(this.scene,u,e),u})},34914:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(22186),v=t(39429);v.register("bitmapText",function(o,r,n,e,i,h){return this.displayList.add(new a(this.scene,o,r,n,e,i,h))})},18658:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(33590),o=t(37289),c.exports={renderWebGL:v,renderCanvas:o}},33590:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(3217),v=t(91296),o=t(70554),r=function(n,e,i,h){var s=e._text,l=s.length;if(l!==0){i.addToRenderList(e);var f=n.pipelines.set(e.pipeline,e),u=v(e,i,h).calc;n.pipelines.preBatch(e);var d=i.roundPixels,p=i.alpha,g=e.charColors,x=e.tintFill,y=o.getTintAppendFloatAlpha,C=y(e.tintTopLeft,p*e._alphaTL),P=y(e.tintTopRight,p*e._alphaTR),M=y(e.tintBottomLeft,p*e._alphaBL),R=y(e.tintBottomRight,p*e._alphaBR),I=e.frame.glTexture,L=f.setGameObject(e),B=e.getTextBounds(!1),N,G,V,K=B.characters,j=e.dropShadowX,J=e.dropShadowY,X=j!==0||J!==0;if(X){var Y=e.dropShadowColor,b=e.dropShadowAlpha,z=y(Y,p*b*e._alphaTL),W=y(Y,p*b*e._alphaTR),H=y(Y,p*b*e._alphaBL),Z=y(Y,p*b*e._alphaBR);for(N=0;N{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(48011),v=t(46590),o=t(83419),r=t(31401),n=t(4327),e=t(95643),i=t(73162),h=new o({Extends:e,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Mask,r.Pipeline,r.PostPipeline,r.ScrollFactor,r.Size,r.Texture,r.Transform,r.Visible,a],initialize:function(l,f,u,d,p){e.call(this,l,"Blitter"),this.setTexture(d,p),this.setPosition(f,u),this.initPipeline(),this.initPostPipeline(),this.children=new i,this.renderList=[],this.dirty=!1},create:function(s,l,f,u,d){u===void 0&&(u=!0),d===void 0&&(d=this.children.length),f===void 0?f=this.frame:f instanceof n||(f=this.texture.get(f));var p=new v(this,s,l,f,u);return this.children.addAt(p,d,!1),this.dirty=!0,p},createFromCallback:function(s,l,f,u){for(var d=this.createMultiple(l,f,u),p=0;p0},getRenderList:function(){return this.dirty&&(this.renderList=this.children.list.filter(this.childCanRender,this),this.dirty=!1),this.renderList},clear:function(){this.children.removeAll(),this.dirty=!0},preDestroy:function(){this.children.destroy(),this.renderList=[]}});c.exports=h},72396:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){var r=a.getRenderList();if(r.length!==0){var n=t.currentContext,e=v.alpha*a.alpha;if(e!==0){v.addToRenderList(a),n.globalCompositeOperation=t.blendModes[a.blendMode],n.imageSmoothingEnabled=!a.frame.source.scaleMode;var i=a.x-v.scrollX*a.scrollFactorX,h=a.y-v.scrollY*a.scrollFactorY;n.save(),o&&o.copyToContext(n);for(var s=v.roundPixels,l=0;l0&&p.height>0&&(n.save(),n.translate(f.x+i,f.y+h),n.scale(y,C),n.drawImage(d.source.image,p.x,p.y,p.width,p.height,g,x,p.width,p.height),n.restore())):(s&&(g=Math.round(g),x=Math.round(x)),p.width>0&&p.height>0&&n.drawImage(d.source.image,p.x,p.y,p.width,p.height,g+f.x+i,x+f.y+h,p.width,p.height)))}n.restore()}}};c.exports=m},9403:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(6107),v=t(25305),o=t(44603),r=t(23568);o.register("blitter",function(n,e){n===void 0&&(n={});var i=r(n,"key",null),h=r(n,"frame",null),s=new a(this.scene,0,0,i,h);return e!==void 0&&(n.add=e),v(this.scene,s,n),s})},12709:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(6107),v=t(39429);v.register("blitter",function(o,r,n,e){return this.displayList.add(new a(this.scene,o,r,n,e))})},48011:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(99485),o=t(72396),c.exports={renderWebGL:v,renderCanvas:o}},99485:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(61340),v=t(70554),o=new a,r=function(n,e,i,h){var s=e.getRenderList(),l=i.alpha*e.alpha;if(!(s.length===0||l===0)){i.addToRenderList(e);var f=n.pipelines.set(this.pipeline,e),u=i.scrollX*e.scrollFactorX,d=i.scrollY*e.scrollFactorY,p=o.copyFrom(i.matrix);h&&(p.multiplyWithOffset(h,-u,-d),u=0,d=0);var g=e.x-u,x=e.y-d,y=-1,C=!1;n.pipelines.preBatch(e);for(var P=0;P{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(4327),o=new a({initialize:function(n,e,i,h,s){this.parent=n,this.x=e,this.y=i,this.frame=h,this.data={},this.tint=16777215,this._visible=s,this._alpha=1,this.flipX=!1,this.flipY=!1,this.hasTransformComponent=!0},setFrame:function(r){return r===void 0?this.frame=this.parent.frame:r instanceof v&&r.texture===this.parent.texture?this.frame=r:this.frame=this.parent.texture.get(r),this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this},reset:function(r,n,e){return this.x=r,this.y=n,this.flipX=!1,this.flipY=!1,this._alpha=1,this._visible=!0,this.parent.dirty=!0,e&&this.setFrame(e),this},setPosition:function(r,n){return this.x=r,this.y=n,this},setFlipX:function(r){return this.flipX=r,this},setFlipY:function(r){return this.flipY=r,this},setFlip:function(r,n){return this.flipX=r,this.flipY=n,this},setVisible:function(r){return this.visible=r,this},setAlpha:function(r){return this.alpha=r,this},setTint:function(r){return this.tint=r,this},destroy:function(){this.parent.dirty=!0,this.parent.children.remove(this),this.parent=void 0,this.frame=void 0,this.data=void 0},visible:{get:function(){return this._visible},set:function(r){this.parent.dirty|=this._visible!==r,this._visible=r}},alpha:{get:function(){return this._alpha},set:function(r){this.parent.dirty|=this._alpha>0!=r>0,this._alpha=r}}});c.exports=o},16005:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(45319),v=2,o={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(r,n,e,i){return r===void 0&&(r=1),n===void 0?this.alpha=r:(this._alphaTL=a(r,0,1),this._alphaTR=a(n,0,1),this._alphaBL=a(e,0,1),this._alphaBR=a(i,0,1)),this},alpha:{get:function(){return this._alpha},set:function(r){var n=a(r,0,1);this._alpha=n,this._alphaTL=n,this._alphaTR=n,this._alphaBL=n,this._alphaBR=n,n===0?this.renderFlags&=~v:this.renderFlags|=v}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(r){var n=a(r,0,1);this._alphaTL=n,n!==0&&(this.renderFlags|=v)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(r){var n=a(r,0,1);this._alphaTR=n,n!==0&&(this.renderFlags|=v)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(r){var n=a(r,0,1);this._alphaBL=n,n!==0&&(this.renderFlags|=v)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(r){var n=a(r,0,1);this._alphaBR=n,n!==0&&(this.renderFlags|=v)}}};c.exports=o},88509:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(45319),v=2,o={_alpha:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(r){return r===void 0&&(r=1),this.alpha=r,this},alpha:{get:function(){return this._alpha},set:function(r){var n=a(r,0,1);this._alpha=n,n===0?this.renderFlags&=~v:this.renderFlags|=v}}};c.exports=o},90065:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(10312),v={_blendMode:a.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(o){typeof o=="string"&&(o=a[o]),o|=0,o>=-1&&(this._blendMode=o)}},setBlendMode:function(o){return this.blendMode=o,this}};c.exports=v},94215:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,a){return this.width=t,this.height=a,this},setDisplaySize:function(t,a){return this.displayWidth=t,this.displayHeight=a,this}};c.exports=m},61683:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={texture:null,frame:null,isCropped:!1,setCrop:function(t,a,v,o){if(t===void 0)this.isCropped=!1;else if(this.frame){if(typeof t=="number")this.frame.setCropUVs(this._crop,t,a,v,o,this.flipX,this.flipY);else{var r=t;this.frame.setCropUVs(this._crop,r.x,r.y,r.width,r.height,this.flipX,this.flipY)}this.isCropped=!0}return this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};c.exports=m},89272:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.displayList&&this.displayList.queueDepthSort(),this._depth=t}},setDepth:function(t){return t===void 0&&(t=0),this.depth=t,this}};c.exports=m},47059:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(66064),o=t(19133),r=new a({initialize:function(e,i){this.gameObject=e,this.isPost=i,this.enabled=!1,this.list=[],this.padding=0},setPadding:function(n){return n===void 0&&(n=0),this.padding=n,this.gameObject},onFXCopy:function(){},onFX:function(){},enable:function(n){if(!this.isPost){var e=this.gameObject.scene.sys.renderer;e&&e.pipelines?(this.gameObject.pipeline=e.pipelines.FX_PIPELINE,n!==void 0&&(this.padding=n),this.enabled=!0):this.enabled=!1}},clear:function(){if(this.isPost)this.gameObject.resetPostPipeline(!0);else{for(var n=this.list,e=0;e{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,a){return this.flipX=t,this.flipY=a,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}};c.exports=m},8004:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(87841),v=t(11520),o=t(26099),r={prepareBoundsOutput:function(n,e){if(e===void 0&&(e=!1),this.rotation!==0&&v(n,this.x,this.y,this.rotation),e&&this.parentContainer){var i=this.parentContainer.getBoundsTransformMatrix();i.transformPoint(n.x,n.y,n)}return n},getCenter:function(n,e){return n===void 0&&(n=new o),n.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,n.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(n,e)},getTopLeft:function(n,e){return n||(n=new o),n.x=this.x-this.displayWidth*this.originX,n.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(n,e)},getTopCenter:function(n,e){return n||(n=new o),n.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,n.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(n,e)},getTopRight:function(n,e){return n||(n=new o),n.x=this.x-this.displayWidth*this.originX+this.displayWidth,n.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(n,e)},getLeftCenter:function(n,e){return n||(n=new o),n.x=this.x-this.displayWidth*this.originX,n.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(n,e)},getRightCenter:function(n,e){return n||(n=new o),n.x=this.x-this.displayWidth*this.originX+this.displayWidth,n.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(n,e)},getBottomLeft:function(n,e){return n||(n=new o),n.x=this.x-this.displayWidth*this.originX,n.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(n,e)},getBottomCenter:function(n,e){return n||(n=new o),n.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,n.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(n,e)},getBottomRight:function(n,e){return n||(n=new o),n.x=this.x-this.displayWidth*this.originX+this.displayWidth,n.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(n,e)},getBounds:function(n){n===void 0&&(n=new a);var e,i,h,s,l,f,u,d;if(this.parentContainer){var p=this.parentContainer.getBoundsTransformMatrix();this.getTopLeft(n),p.transformPoint(n.x,n.y,n),e=n.x,i=n.y,this.getTopRight(n),p.transformPoint(n.x,n.y,n),h=n.x,s=n.y,this.getBottomLeft(n),p.transformPoint(n.x,n.y,n),l=n.x,f=n.y,this.getBottomRight(n),p.transformPoint(n.x,n.y,n),u=n.x,d=n.y}else this.getTopLeft(n),e=n.x,i=n.y,this.getTopRight(n),h=n.x,s=n.y,this.getBottomLeft(n),l=n.x,f=n.y,this.getBottomRight(n),u=n.x,d=n.y;return n.x=Math.min(e,h,l,u),n.y=Math.min(i,s,f,d),n.width=Math.max(e,h,l,u)-n.x,n.height=Math.max(i,s,f,d)-n.y,n}};c.exports=r},8573:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(6858),v=t(80661),o={mask:null,setMask:function(r){return this.mask=r,this},clearMask:function(r){return r===void 0&&(r=!1),r&&this.mask&&this.mask.destroy(),this.mask=null,this},createBitmapMask:function(r,n,e,i,h){return r===void 0&&(this.texture||this.shader||this.geom)&&(r=this),new a(this.scene,r,n,e,i,h)},createGeometryMask:function(r){return r===void 0&&(this.type==="Graphics"||this.geom)&&(r=this),new v(this.scene,r)}};c.exports=o},27387:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={_originComponent:!0,originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(t){this._displayOriginX=t,this.originX=t/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(t){this._displayOriginY=t,this.originY=t/this.height}},setOrigin:function(t,a){return t===void 0&&(t=.5),a===void 0&&(a=t),this.originX=t,this.originY=a,this.updateDisplayOrigin()},setOriginFromFrame:function(){return!this.frame||!this.frame.customPivot?this.setOrigin():(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin())},setDisplayOrigin:function(t,a){return t===void 0&&(t=0),a===void 0&&(a=t),this.displayOriginX=t,this.displayOriginY=a,this},updateDisplayOrigin:function(){return this._displayOriginX=this.originX*this.width,this._displayOriginY=this.originY*this.height,this}};c.exports=m},37640:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(39506),v=t(57355),o=t(35154),r=t(86353),n=t(26099),e={path:null,rotateToPath:!1,pathRotationOffset:0,pathOffset:null,pathVector:null,pathDelta:null,pathTween:null,pathConfig:null,_prevDirection:r.PLAYING_FORWARD,setPath:function(i,h){h===void 0&&(h=this.pathConfig);var s=this.pathTween;return s&&s.isPlaying()&&s.stop(),this.path=i,h&&this.startFollow(h),this},setRotateToPath:function(i,h){return h===void 0&&(h=0),this.rotateToPath=i,this.pathRotationOffset=h,this},isFollowing:function(){var i=this.pathTween;return i&&i.isPlaying()},startFollow:function(i,h){i===void 0&&(i={}),h===void 0&&(h=0);var s=this.pathTween;s&&s.isPlaying()&&s.stop(),typeof i=="number"&&(i={duration:i}),i.from=o(i,"from",0),i.to=o(i,"to",1);var l=v(i,"positionOnPath",!1);this.rotateToPath=v(i,"rotateToPath",!1),this.pathRotationOffset=o(i,"rotationOffset",0);var f=o(i,"startAt",h);if(f&&(i.onStart=function(d){var p=d.data[0];p.progress=f,p.elapsed=p.duration*f;var g=p.ease(p.progress);p.current=p.start+(p.end-p.start)*g,p.setTargetValue()}),this.pathOffset||(this.pathOffset=new n(this.x,this.y)),this.pathVector||(this.pathVector=new n),this.pathDelta||(this.pathDelta=new n),this.pathDelta.reset(),i.persist=!0,this.pathTween=this.scene.sys.tweens.addCounter(i),this.path.getStartPoint(this.pathOffset),l&&(this.x=this.pathOffset.x,this.y=this.pathOffset.y),this.pathOffset.x=this.x-this.pathOffset.x,this.pathOffset.y=this.y-this.pathOffset.y,this._prevDirection=r.PLAYING_FORWARD,this.rotateToPath){var u=this.path.getPoint(.1);this.rotation=Math.atan2(u.y-this.y,u.x-this.x)+a(this.pathRotationOffset)}return this.pathConfig=i,this},pauseFollow:function(){var i=this.pathTween;return i&&i.isPlaying()&&i.pause(),this},resumeFollow:function(){var i=this.pathTween;return i&&i.isPaused()&&i.resume(),this},stopFollow:function(){var i=this.pathTween;return i&&i.isPlaying()&&i.stop(),this},pathUpdate:function(){var i=this.pathTween;if(i&&i.data){var h=i.data[0],s=this.pathDelta,l=this.pathVector;if(s.copy(l).negate(),h.state===r.COMPLETE){this.path.getPoint(h.end,l),s.add(l),l.add(this.pathOffset),this.setPosition(l.x,l.y);return}else if(h.state!==r.PLAYING_FORWARD&&h.state!==r.PLAYING_BACKWARD)return;this.path.getPoint(i.getValue(),l),s.add(l),l.add(this.pathOffset);var f=this.x,u=this.y;this.setPosition(l.x,l.y);var d=this.x-f,p=this.y-u;if(d===0&&p===0)return;if(h.state!==this._prevDirection){this._prevDirection=h.state;return}this.rotateToPath&&(this.rotation=Math.atan2(p,d)+a(this.pathRotationOffset))}}};c.exports=e},72699:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(62644),v={defaultPipeline:null,pipeline:null,pipelineData:null,initPipeline:function(o){this.pipelineData={};var r=this.scene.sys.renderer;if(!r)return!1;var n=r.pipelines;if(n){o===void 0&&(o=n.default);var e=n.get(o);if(e)return this.defaultPipeline=e,this.pipeline=e,!0}return!1},setPipeline:function(o,r,n){var e=this.scene.sys.renderer;if(!e)return this;var i=e.pipelines;if(i){var h=i.get(o);h&&(this.pipeline=h),r&&(this.pipelineData=n?a(r):r)}return this},setPipelineData:function(o,r){var n=this.pipelineData;return r===void 0?delete n[o]:n[o]=r,this},resetPipeline:function(o){return o===void 0&&(o=!1),this.pipeline=this.defaultPipeline,o&&(this.pipelineData={}),this.pipeline!==null},getPipelineName:function(){return this.pipeline.name}};c.exports=v},17581:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(62644),v=t(47059),o=t(19133),r={hasPostPipeline:!1,postPipelines:null,postPipelineData:null,preFX:null,postFX:null,initPostPipeline:function(n){this.postPipelines=[],this.postPipelineData={},this.postFX=new v(this,!0),n&&(this.preFX=new v(this,!1))},setPostPipeline:function(n,e,i){var h=this.scene.sys.renderer;if(!h)return this;var s=h.pipelines;if(s){Array.isArray(n)||(n=[n]);for(var l=0;l0,this},setPostPipelineData:function(n,e){var i=this.postPipelineData;return e===void 0?delete i[n]:i[n]=e,this},getPostPipeline:function(n){for(var e=typeof n=="string",i=this.postPipelines,h=[],s=0;s=0;h--){var s=i[h];(e&&s.name===n||!e&&s===n)&&(s.destroy(),o(i,h))}return this.hasPostPipeline=this.postPipelines.length>0,this},clearFX:function(){return this.preFX&&this.preFX.clear(),this.postFX&&this.postFX.clear(),this}};c.exports=r},80227:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,a){return a===void 0&&(a=t),this.scrollFactorX=t,this.scrollFactorY=a,this}};c.exports=m},16736:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={_sizeComponent:!0,width:0,height:0,displayWidth:{get:function(){return Math.abs(this.scaleX*this.frame.realWidth)},set:function(t){this.scaleX=t/this.frame.realWidth}},displayHeight:{get:function(){return Math.abs(this.scaleY*this.frame.realHeight)},set:function(t){this.scaleY=t/this.frame.realHeight}},setSizeToFrame:function(t){t||(t=this.frame),this.width=t.realWidth,this.height=t.realHeight;var a=this.input;return a&&!a.customHitArea&&(a.hitArea.width=this.width,a.hitArea.height=this.height),this},setSize:function(t,a){return this.width=t,this.height=a,this},setDisplaySize:function(t,a){return this.displayWidth=t,this.displayHeight=a,this}};c.exports=m},37726:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(4327),v=8,o={texture:null,frame:null,isCropped:!1,setTexture:function(r,n,e,i){return this.texture=this.scene.sys.textures.get(r),this.setFrame(n,e,i)},setFrame:function(r,n,e){return n===void 0&&(n=!0),e===void 0&&(e=!0),r instanceof a?(this.texture=this.scene.sys.textures.get(r.texture.key),this.frame=r):this.frame=this.texture.get(r),!this.frame.cutWidth||!this.frame.cutHeight?this.renderFlags&=~v:this.renderFlags|=v,this._sizeComponent&&n&&this.setSizeToFrame(),this._originComponent&&e&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}};c.exports=o},79812:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(4327),v=8,o={texture:null,frame:null,isCropped:!1,setCrop:function(r,n,e,i){if(r===void 0)this.isCropped=!1;else if(this.frame){if(typeof r=="number")this.frame.setCropUVs(this._crop,r,n,e,i,this.flipX,this.flipY);else{var h=r;this.frame.setCropUVs(this._crop,h.x,h.y,h.width,h.height,this.flipX,this.flipY)}this.isCropped=!0}return this},setTexture:function(r,n){return this.texture=this.scene.sys.textures.get(r),this.setFrame(n)},setFrame:function(r,n,e){return n===void 0&&(n=!0),e===void 0&&(e=!0),r instanceof a?(this.texture=this.scene.sys.textures.get(r.texture.key),this.frame=r):this.frame=this.texture.get(r),!this.frame.cutWidth||!this.frame.cutHeight?this.renderFlags&=~v:this.renderFlags|=v,this._sizeComponent&&n&&this.setSizeToFrame(),this._originComponent&&e&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this.isCropped&&this.frame.updateCropUVs(this._crop,this.flipX,this.flipY),this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};c.exports=o},27472:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={tintTopLeft:16777215,tintTopRight:16777215,tintBottomLeft:16777215,tintBottomRight:16777215,tintFill:!1,clearTint:function(){return this.setTint(16777215),this},setTint:function(t,a,v,o){return t===void 0&&(t=16777215),a===void 0&&(a=t,v=t,o=t),this.tintTopLeft=t,this.tintTopRight=a,this.tintBottomLeft=v,this.tintBottomRight=o,this.tintFill=!1,this},setTintFill:function(t,a,v,o){return this.setTint(t,a,v,o),this.tintFill=!0,this},tint:{get:function(){return this.tintTopLeft},set:function(t){this.setTint(t,t,t,t)}},isTinted:{get:function(){var t=16777215;return this.tintFill||this.tintTopLeft!==t||this.tintTopRight!==t||this.tintBottomLeft!==t||this.tintBottomRight!==t}}};c.exports=m},53774:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){var a={name:t.name,type:t.type,x:t.x,y:t.y,depth:t.depth,scale:{x:t.scaleX,y:t.scaleY},origin:{x:t.originX,y:t.originY},flipX:t.flipX,flipY:t.flipY,rotation:t.rotation,alpha:t.alpha,visible:t.visible,blendMode:t.blendMode,textureKey:"",frameKey:"",data:{}};return t.texture&&(a.textureKey=t.texture.key,a.frameKey=t.frame.name),a};c.exports=m},16901:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(36383),v=t(61340),o=t(85955),r=t(86554),n=t(30954),e=t(26099),i=4,h={hasTransformComponent:!0,_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scale:{get:function(){return(this._scaleX+this._scaleY)/2},set:function(s){this._scaleX=s,this._scaleY=s,s===0?this.renderFlags&=~i:this.renderFlags|=i}},scaleX:{get:function(){return this._scaleX},set:function(s){this._scaleX=s,s===0?this.renderFlags&=~i:this._scaleY!==0&&(this.renderFlags|=i)}},scaleY:{get:function(){return this._scaleY},set:function(s){this._scaleY=s,s===0?this.renderFlags&=~i:this._scaleX!==0&&(this.renderFlags|=i)}},angle:{get:function(){return n(this._rotation*a.RAD_TO_DEG)},set:function(s){this.rotation=n(s)*a.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(s){this._rotation=r(s)}},setPosition:function(s,l,f,u){return s===void 0&&(s=0),l===void 0&&(l=s),f===void 0&&(f=0),u===void 0&&(u=0),this.x=s,this.y=l,this.z=f,this.w=u,this},copyPosition:function(s){return s.x!==void 0&&(this.x=s.x),s.y!==void 0&&(this.y=s.y),s.z!==void 0&&(this.z=s.z),s.w!==void 0&&(this.w=s.w),this},setRandomPosition:function(s,l,f,u){return s===void 0&&(s=0),l===void 0&&(l=0),f===void 0&&(f=this.scene.sys.scale.width),u===void 0&&(u=this.scene.sys.scale.height),this.x=s+Math.random()*f,this.y=l+Math.random()*u,this},setRotation:function(s){return s===void 0&&(s=0),this.rotation=s,this},setAngle:function(s){return s===void 0&&(s=0),this.angle=s,this},setScale:function(s,l){return s===void 0&&(s=1),l===void 0&&(l=s),this.scaleX=s,this.scaleY=l,this},setX:function(s){return s===void 0&&(s=0),this.x=s,this},setY:function(s){return s===void 0&&(s=0),this.y=s,this},setZ:function(s){return s===void 0&&(s=0),this.z=s,this},setW:function(s){return s===void 0&&(s=0),this.w=s,this},getLocalTransformMatrix:function(s){return s===void 0&&(s=new v),s.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(s,l){s===void 0&&(s=new v);var f=this.parentContainer;if(!f)return this.getLocalTransformMatrix(s);for(l||(l=new v),s.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY);f;)l.applyITRS(f.x,f.y,f._rotation,f._scaleX,f._scaleY),l.multiply(s,s),f=f.parentContainer;return s},getLocalPoint:function(s,l,f,u){f||(f=new e),u||(u=this.scene.sys.cameras.main);var d=u.scrollX,p=u.scrollY,g=s+d*this.scrollFactorX-d,x=l+p*this.scrollFactorY-p;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(g,x,f):o(g,x,this.x,this.y,this.rotation,this.scaleX,this.scaleY,f),this._originComponent&&(f.x+=this._displayOriginX,f.y+=this._displayOriginY),f},getParentRotation:function(){for(var s=0,l=this.parentContainer;l;)s+=l.rotation,l=l.parentContainer;return s}};c.exports=h},61340:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(36383),o=t(26099),r=new a({initialize:function(e,i,h,s,l,f){e===void 0&&(e=1),i===void 0&&(i=0),h===void 0&&(h=0),s===void 0&&(s=1),l===void 0&&(l=0),f===void 0&&(f=0),this.matrix=new Float32Array([e,i,h,s,l,f,0,0,1]),this.decomposedMatrix={translateX:0,translateY:0,scaleX:1,scaleY:1,rotation:0},this.quad=new Float32Array(8)},a:{get:function(){return this.matrix[0]},set:function(n){this.matrix[0]=n}},b:{get:function(){return this.matrix[1]},set:function(n){this.matrix[1]=n}},c:{get:function(){return this.matrix[2]},set:function(n){this.matrix[2]=n}},d:{get:function(){return this.matrix[3]},set:function(n){this.matrix[3]=n}},e:{get:function(){return this.matrix[4]},set:function(n){this.matrix[4]=n}},f:{get:function(){return this.matrix[5]},set:function(n){this.matrix[5]=n}},tx:{get:function(){return this.matrix[4]},set:function(n){this.matrix[4]=n}},ty:{get:function(){return this.matrix[5]},set:function(n){this.matrix[5]=n}},rotation:{get:function(){return Math.acos(this.a/this.scaleX)*(Math.atan(-this.c/this.a)<0?-1:1)}},rotationNormalized:{get:function(){var n=this.matrix,e=n[0],i=n[1],h=n[2],s=n[3];return e||i?i>0?Math.acos(e/this.scaleX):-Math.acos(e/this.scaleX):h||s?v.TAU-(s>0?Math.acos(-h/this.scaleY):-Math.acos(h/this.scaleY)):0}},scaleX:{get:function(){return Math.sqrt(this.a*this.a+this.b*this.b)}},scaleY:{get:function(){return Math.sqrt(this.c*this.c+this.d*this.d)}},loadIdentity:function(){var n=this.matrix;return n[0]=1,n[1]=0,n[2]=0,n[3]=1,n[4]=0,n[5]=0,this},translate:function(n,e){var i=this.matrix;return i[4]=i[0]*n+i[2]*e+i[4],i[5]=i[1]*n+i[3]*e+i[5],this},scale:function(n,e){var i=this.matrix;return i[0]*=n,i[1]*=n,i[2]*=e,i[3]*=e,this},rotate:function(n){var e=Math.sin(n),i=Math.cos(n),h=this.matrix,s=h[0],l=h[1],f=h[2],u=h[3];return h[0]=s*i+f*e,h[1]=l*i+u*e,h[2]=s*-e+f*i,h[3]=l*-e+u*i,this},multiply:function(n,e){var i=this.matrix,h=n.matrix,s=i[0],l=i[1],f=i[2],u=i[3],d=i[4],p=i[5],g=h[0],x=h[1],y=h[2],C=h[3],P=h[4],M=h[5],R=e===void 0?i:e.matrix;return R[0]=g*s+x*f,R[1]=g*l+x*u,R[2]=y*s+C*f,R[3]=y*l+C*u,R[4]=P*s+M*f+d,R[5]=P*l+M*u+p,R},multiplyWithOffset:function(n,e,i){var h=this.matrix,s=n.matrix,l=h[0],f=h[1],u=h[2],d=h[3],p=h[4],g=h[5],x=e*l+i*u+p,y=e*f+i*d+g,C=s[0],P=s[1],M=s[2],R=s[3],I=s[4],L=s[5];return h[0]=C*l+P*u,h[1]=C*f+P*d,h[2]=M*l+R*u,h[3]=M*f+R*d,h[4]=I*l+L*u+x,h[5]=I*f+L*d+y,this},transform:function(n,e,i,h,s,l){var f=this.matrix,u=f[0],d=f[1],p=f[2],g=f[3],x=f[4],y=f[5];return f[0]=n*u+e*p,f[1]=n*d+e*g,f[2]=i*u+h*p,f[3]=i*d+h*g,f[4]=s*u+l*p+x,f[5]=s*d+l*g+y,this},transformPoint:function(n,e,i){i===void 0&&(i={x:0,y:0});var h=this.matrix,s=h[0],l=h[1],f=h[2],u=h[3],d=h[4],p=h[5];return i.x=n*s+e*f+d,i.y=n*l+e*u+p,i},invert:function(){var n=this.matrix,e=n[0],i=n[1],h=n[2],s=n[3],l=n[4],f=n[5],u=e*s-i*h;return n[0]=s/u,n[1]=-i/u,n[2]=-h/u,n[3]=e/u,n[4]=(h*f-s*l)/u,n[5]=-(e*f-i*l)/u,this},copyFrom:function(n){var e=this.matrix;return e[0]=n.a,e[1]=n.b,e[2]=n.c,e[3]=n.d,e[4]=n.e,e[5]=n.f,this},copyFromArray:function(n){var e=this.matrix;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],this},copyToContext:function(n){var e=this.matrix;return n.transform(e[0],e[1],e[2],e[3],e[4],e[5]),n},setToContext:function(n){return n.setTransform(this),n},copyToArray:function(n){var e=this.matrix;return n===void 0?n=[e[0],e[1],e[2],e[3],e[4],e[5]]:(n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=e[4],n[5]=e[5]),n},setTransform:function(n,e,i,h,s,l){var f=this.matrix;return f[0]=n,f[1]=e,f[2]=i,f[3]=h,f[4]=s,f[5]=l,this},decomposeMatrix:function(){var n=this.decomposedMatrix,e=this.matrix,i=e[0],h=e[1],s=e[2],l=e[3],f=i*l-h*s;if(n.translateX=e[4],n.translateY=e[5],i||h){var u=Math.sqrt(i*i+h*h);n.rotation=h>0?Math.acos(i/u):-Math.acos(i/u),n.scaleX=u,n.scaleY=f/u}else if(s||l){var d=Math.sqrt(s*s+l*l);n.rotation=Math.PI*.5-(l>0?Math.acos(-s/d):-Math.acos(s/d)),n.scaleX=f/d,n.scaleY=d}else n.rotation=0,n.scaleX=0,n.scaleY=0;return n},applyITRS:function(n,e,i,h,s){var l=this.matrix,f=Math.sin(i),u=Math.cos(i);return l[4]=n,l[5]=e,l[0]=u*h,l[1]=f*h,l[2]=-f*s,l[3]=u*s,this},applyInverse:function(n,e,i){i===void 0&&(i=new o);var h=this.matrix,s=h[0],l=h[1],f=h[2],u=h[3],d=h[4],p=h[5],g=1/(s*u+f*-l);return i.x=u*g*n+-f*g*e+(p*f-d*u)*g,i.y=s*g*e+-l*g*n+(-p*s+d*l)*g,i},setQuad:function(n,e,i,h,s,l){s===void 0&&(s=!1),l===void 0&&(l=this.quad);var f=this.matrix,u=f[0],d=f[1],p=f[2],g=f[3],x=f[4],y=f[5];return s?(l[0]=Math.round(n*u+e*p+x),l[1]=Math.round(n*d+e*g+y),l[2]=Math.round(n*u+h*p+x),l[3]=Math.round(n*d+h*g+y),l[4]=Math.round(i*u+h*p+x),l[5]=Math.round(i*d+h*g+y),l[6]=Math.round(i*u+e*p+x),l[7]=Math.round(i*d+e*g+y)):(l[0]=n*u+e*p+x,l[1]=n*d+e*g+y,l[2]=n*u+h*p+x,l[3]=n*d+h*g+y,l[4]=i*u+h*p+x,l[5]=i*d+h*g+y,l[6]=i*u+e*p+x,l[7]=i*d+e*g+y),l},getX:function(n,e){return n*this.a+e*this.c+this.e},getY:function(n,e){return n*this.b+e*this.d+this.f},getXRound:function(n,e,i){var h=this.getX(n,e);return i&&(h=Math.round(h)),h},getYRound:function(n,e,i){var h=this.getY(n,e);return i&&(h=Math.round(h)),h},getCSSMatrix:function(){var n=this.matrix;return"matrix("+n[0]+","+n[1]+","+n[2]+","+n[3]+","+n[4]+","+n[5]+")"},destroy:function(){this.matrix=null,this.quad=null,this.decomposedMatrix=null}});c.exports=r},59715:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=1,t={_visible:!0,visible:{get:function(){return this._visible},set:function(a){a?(this._visible=!0,this.renderFlags|=m):(this._visible=!1,this.renderFlags&=~m)}},setVisible:function(a){return this.visible=a,this}};c.exports=t},31401:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={Alpha:t(16005),AlphaSingle:t(88509),BlendMode:t(90065),ComputedSize:t(94215),Crop:t(61683),Depth:t(89272),Flip:t(54434),FX:t(47059),GetBounds:t(8004),Mask:t(8573),Origin:t(27387),PathFollower:t(37640),Pipeline:t(72699),PostPipeline:t(17581),ScrollFactor:t(80227),Size:t(16736),Texture:t(37726),TextureCrop:t(79812),Tint:t(27472),ToJSON:t(53774),Transform:t(16901),TransformMatrix:t(61340),Visible:t(59715)}},31559:(c,m,t)=>{/** - * @author Richard Davey - * @author Felipe Alfonso <@bitnenfer> - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(37105),v=t(10312),o=t(83419),r=t(31401),n=t(51708),e=t(95643),i=t(87841),h=t(29959),s=t(36899),l=t(26099),f=new o({Extends:e,Mixins:[r.AlphaSingle,r.BlendMode,r.ComputedSize,r.Depth,r.Mask,r.PostPipeline,r.Transform,r.Visible,h],initialize:function(d,p,g,x){e.call(this,d,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new r.TransformMatrix,this.tempTransformMatrix=new r.TransformMatrix,this._sortKey="",this._sysEvents=d.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.initPostPipeline(),this.setPosition(p,g),this.setBlendMode(v.SKIP_CHECK),x&&this.add(x)},originX:{get:function(){return .5}},originY:{get:function(){return .5}},displayOriginX:{get:function(){return this.width*.5}},displayOriginY:{get:function(){return this.height*.5}},setExclusive:function(u){return u===void 0&&(u=!0),this.exclusive=u,this},getBounds:function(u){if(u===void 0&&(u=new i),u.setTo(this.x,this.y,0,0),this.parentContainer){var d=this.parentContainer.getBoundsTransformMatrix(),p=d.transformPoint(this.x,this.y);u.setTo(p.x,p.y,0,0)}if(this.list.length>0){var g=this.list,x=new i,y=!1;u.setEmpty();for(var C=0;C-1},setAll:function(u,d,p,g){return a.SetAll(this.list,u,d,p,g),this},each:function(u,d){var p=[null],g,x=this.list.slice(),y=x.length;for(g=2;g0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[]},onChildDestroyed:function(u){a.Remove(this.list,u),this.exclusive&&(u.parentContainer=null,u.removedFromScene())}});c.exports=f},53584:c=>{/** - * @author Richard Davey - * @author Felipe Alfonso <@bitnenfer> - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){v.addToRenderList(a);var r=a.list;if(r.length!==0){var n=a.localTransform;o?(n.loadIdentity(),n.multiply(o),n.translate(a.x,a.y),n.rotate(a.rotation),n.scale(a.scaleX,a.scaleY)):n.applyITRS(a.x,a.y,a.rotation,a.scaleX,a.scaleY);var e=a.blendMode!==-1;e||t.setBlendMode(0);var i=a._alpha,h=a.scrollFactorX,s=a.scrollFactorY;a.mask&&a.mask.preRenderCanvas(t,null,v);for(var l=0;l{/** - * @author Richard Davey - * @author Felipe Alfonso <@bitnenfer> - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(25305),v=t(31559),o=t(44603),r=t(23568),n=t(95540);o.register("container",function(e,i){e===void 0&&(e={});var h=r(e,"x",0),s=r(e,"y",0),l=n(e,"children",null),f=new v(this.scene,h,s,l);return i!==void 0&&(e.add=i),a(this.scene,f,e),f})},24961:(c,m,t)=>{/** - * @author Richard Davey - * @author Felipe Alfonso <@bitnenfer> - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(31559),v=t(39429);v.register("container",function(o,r,n){return this.displayList.add(new a(this.scene,o,r,n))})},29959:(c,m,t)=>{/** - * @author Richard Davey - * @author Felipe Alfonso <@bitnenfer> - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(72249),o=t(53584),c.exports={renderWebGL:v,renderCanvas:o}},72249:c=>{/** - * @author Richard Davey - * @author Felipe Alfonso <@bitnenfer> - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){v.addToRenderList(a);var r=a.list,n=r.length;if(n!==0){var e=a.localTransform;o?(e.loadIdentity(),e.multiply(o),e.translate(a.x,a.y),e.rotate(a.rotation),e.scale(a.scaleX,a.scaleY)):e.applyITRS(a.x,a.y,a.rotation,a.scaleX,a.scaleY),t.pipelines.preBatch(a);var i=a.blendMode!==-1;i||t.setBlendMode(0);for(var h=a.alpha,s=a.scrollFactorX,l=a.scrollFactorY,f=0;f{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports=["normal","multiply","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]},3069:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(31401),o=t(441),r=t(95643),n=t(41212),e=t(35846),i=t(44594),h=t(61369),s=new a({Extends:r,Mixins:[v.AlphaSingle,v.BlendMode,v.Depth,v.Origin,v.ScrollFactor,v.Transform,v.Visible,o],initialize:function(f,u,d,p,g,x){r.call(this,f,"DOMElement"),this.parent=f.sys.game.domContainer,this.cache=f.sys.cache.html,this.node,this.transformOnly=!1,this.skewX=0,this.skewY=0,this.rotate3d=new h,this.rotate3dAngle="deg",this.pointerEvents="auto",this.width=0,this.height=0,this.displayWidth=0,this.displayHeight=0,this.handler=this.dispatchNativeEvent.bind(this),this.setPosition(u,d),typeof p=="string"?p[0]==="#"?this.setElement(p.substr(1),g,x):this.createElement(p,g,x):p&&this.setElement(p,g,x),f.sys.events.on(i.SLEEP,this.handleSceneEvent,this),f.sys.events.on(i.WAKE,this.handleSceneEvent,this),f.sys.events.on(i.PRE_RENDER,this.preRender,this)},handleSceneEvent:function(l){var f=this.node,u=f.style;f&&(u.display=l.settings.visible?"block":"none")},setSkew:function(l,f){return l===void 0&&(l=0),f===void 0&&(f=l),this.skewX=l,this.skewY=f,this},setPerspective:function(l){return this.parent.style.perspective=l+"px",this},perspective:{get:function(){return parseFloat(this.parent.style.perspective)},set:function(l){this.parent.style.perspective=l+"px"}},addListener:function(l){if(this.node){l=l.split(" ");for(var f=0;f{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(47407),v=t(95643),o=t(61340),r=new o,n=new o,e=new o,i=function(h,s,l,f){if(s.node){var u=s.node.style,d=s.scene.sys.settings;if(!u||!d.visible||v.RENDER_MASK!==s.renderFlags||s.cameraFilter!==0&&s.cameraFilter&l.id||s.parentContainer&&!s.parentContainer.willRender()){u.display="none";return}var p=s.parentContainer,g=l.alpha*s.alpha;p&&(g*=p.alpha);var x=r,y=n,C=e,P=0,M=0,R="0%",I="0%";f?(P=s.width*s.scaleX*s.originX,M=s.height*s.scaleY*s.originY,y.applyITRS(s.x-P,s.y-M,s.rotation,s.scaleX,s.scaleY),x.copyFrom(l.matrix),x.multiplyWithOffset(f,-l.scrollX*s.scrollFactorX,-l.scrollY*s.scrollFactorY),y.e=s.x-P,y.f=s.y-M,x.multiply(y,C)):(P=s.width*s.originX,M=s.height*s.originY,y.applyITRS(s.x-P,s.y-M,s.rotation,s.scaleX,s.scaleY),x.copyFrom(l.matrix),R=100*s.originX+"%",I=100*s.originY+"%",y.e-=l.scrollX*s.scrollFactorX,y.f-=l.scrollY*s.scrollFactorY,x.multiply(y,C)),s.transformOnly||(u.display="block",u.opacity=g,u.zIndex=s._depth,u.pointerEvents=s.pointerEvents,u.mixBlendMode=a[s._blendMode]),u.transform=C.getCSSMatrix()+" skew("+s.skewX+"rad, "+s.skewY+"rad) rotate3d("+s.rotate3d.x+","+s.rotate3d.y+","+s.rotate3d.z+","+s.rotate3d.w+s.rotate3dAngle+")",u.transformOrigin=R+" "+I}};c.exports=i},2611:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(3069),v=t(39429);v.register("dom",function(o,r,n,e,i){var h=new a(this.scene,o,r,n,e,i);return this.displayList.add(h),h})},441:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(49381),o=t(49381),c.exports={renderWebGL:v,renderCanvas:o}},62980:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="addedtoscene"},41337:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="destroy"},44947:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="removedfromscene"},49358:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="complete"},35163:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="created"},97249:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="error"},19483:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="locked"},56059:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="loop"},26772:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="metadata"},64437:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="playing"},83411:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="play"},75780:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="seeked"},67799:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="seeking"},63500:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="stalled"},55541:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="stop"},53208:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="textureready"},4992:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="unlocked"},12:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="unsupported"},51708:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={ADDED_TO_SCENE:t(62980),DESTROY:t(41337),REMOVED_FROM_SCENE:t(44947),VIDEO_COMPLETE:t(49358),VIDEO_CREATED:t(35163),VIDEO_ERROR:t(97249),VIDEO_LOCKED:t(19483),VIDEO_LOOP:t(56059),VIDEO_METADATA:t(26772),VIDEO_PLAY:t(83411),VIDEO_PLAYING:t(64437),VIDEO_SEEKED:t(75780),VIDEO_SEEKING:t(67799),VIDEO_STALLED:t(63500),VIDEO_STOP:t(55541),VIDEO_TEXTURE:t(53208),VIDEO_UNLOCKED:t(4992),VIDEO_UNSUPPORTED:t(12)}},42421:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(31401),o=t(95643),r=t(64993),n=new a({Extends:o,Mixins:[v.Alpha,v.BlendMode,v.Depth,v.Flip,v.Origin,v.ScrollFactor,v.Size,v.Texture,v.Tint,v.Transform,v.Visible,r],initialize:function(i){o.call(this,i,"Extern")},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(){},render:function(){}});c.exports=n},70217:()=>{},56315:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(42421),v=t(39429);v.register("extern",function(){var o=new a(this.scene);return this.displayList.add(o),o})},64993:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(80287),o=t(70217),c.exports={renderWebGL:v,renderCanvas:o}},80287:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(91296),v=function(o,r,n,e){o.pipelines.clear();var i=a(r,n,e).calc;r.render.call(r,o,n,i),o.pipelines.rebind()};c.exports=v},85592:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.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:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(71911),v=t(83419),o=t(85592),r=t(31401),n=t(8497),e=t(95643),i=t(95540),h=t(35154),s=t(36383),l=t(84503),f=new v({Extends:e,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.Mask,r.Pipeline,r.PostPipeline,r.Transform,r.Visible,r.ScrollFactor,l],initialize:function(d,p){var g=h(p,"x",0),x=h(p,"y",0);e.call(this,d,"Graphics"),this.setPosition(g,x),this.initPipeline(),this.initPostPipeline(),this.displayOriginX=0,this.displayOriginY=0,this.commandBuffer=[],this.defaultFillColor=-1,this.defaultFillAlpha=1,this.defaultStrokeWidth=1,this.defaultStrokeColor=-1,this.defaultStrokeAlpha=1,this._lineWidth=1,this.lineStyle(1,0,0),this.fillStyle(0,0),this.setDefaultStyles(p)},setDefaultStyles:function(u){return h(u,"lineStyle",null)&&(this.defaultStrokeWidth=h(u,"lineStyle.width",1),this.defaultStrokeColor=h(u,"lineStyle.color",16777215),this.defaultStrokeAlpha=h(u,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),h(u,"fillStyle",null)&&(this.defaultFillColor=h(u,"fillStyle.color",16777215),this.defaultFillAlpha=h(u,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(u,d,p){return p===void 0&&(p=1),this.commandBuffer.push(o.LINE_STYLE,u,d,p),this._lineWidth=u,this},fillStyle:function(u,d){return d===void 0&&(d=1),this.commandBuffer.push(o.FILL_STYLE,u,d),this},fillGradientStyle:function(u,d,p,g,x,y,C,P){return x===void 0&&(x=1),y===void 0&&(y=x),C===void 0&&(C=x),P===void 0&&(P=x),this.commandBuffer.push(o.GRADIENT_FILL_STYLE,x,y,C,P,u,d,p,g),this},lineGradientStyle:function(u,d,p,g,x,y){return y===void 0&&(y=1),this.commandBuffer.push(o.GRADIENT_LINE_STYLE,u,y,d,p,g,x),this},beginPath:function(){return this.commandBuffer.push(o.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(o.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(o.FILL_PATH),this},fill:function(){return this.commandBuffer.push(o.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(o.STROKE_PATH),this},stroke:function(){return this.commandBuffer.push(o.STROKE_PATH),this},fillCircleShape:function(u){return this.fillCircle(u.x,u.y,u.radius)},strokeCircleShape:function(u){return this.strokeCircle(u.x,u.y,u.radius)},fillCircle:function(u,d,p){return this.beginPath(),this.arc(u,d,p,0,s.PI2),this.fillPath(),this},strokeCircle:function(u,d,p){return this.beginPath(),this.arc(u,d,p,0,s.PI2),this.strokePath(),this},fillRectShape:function(u){return this.fillRect(u.x,u.y,u.width,u.height)},strokeRectShape:function(u){return this.strokeRect(u.x,u.y,u.width,u.height)},fillRect:function(u,d,p,g){return this.commandBuffer.push(o.FILL_RECT,u,d,p,g),this},strokeRect:function(u,d,p,g){var x=this._lineWidth/2,y=u-x,C=u+x;return this.beginPath(),this.moveTo(u,d),this.lineTo(u,d+g),this.strokePath(),this.beginPath(),this.moveTo(u+p,d),this.lineTo(u+p,d+g),this.strokePath(),this.beginPath(),this.moveTo(y,d),this.lineTo(C+p,d),this.strokePath(),this.beginPath(),this.moveTo(y,d+g),this.lineTo(C+p,d+g),this.strokePath(),this},fillRoundedRect:function(u,d,p,g,x){x===void 0&&(x=20);var y=x,C=x,P=x,M=x;typeof x!="number"&&(y=i(x,"tl",20),C=i(x,"tr",20),P=i(x,"bl",20),M=i(x,"br",20));var R=y>=0,I=C>=0,L=P>=0,B=M>=0;return y=Math.abs(y),C=Math.abs(C),P=Math.abs(P),M=Math.abs(M),this.beginPath(),this.moveTo(u+y,d),this.lineTo(u+p-C,d),I?this.arc(u+p-C,d+C,C,-s.TAU,0):this.arc(u+p,d,C,Math.PI,s.TAU,!0),this.lineTo(u+p,d+g-M),B?this.arc(u+p-M,d+g-M,M,0,s.TAU):this.arc(u+p,d+g,M,-s.TAU,Math.PI,!0),this.lineTo(u+P,d+g),L?this.arc(u+P,d+g-P,P,s.TAU,Math.PI):this.arc(u,d+g,P,0,-s.TAU,!0),this.lineTo(u,d+y),R?this.arc(u+y,d+y,y,-Math.PI,-s.TAU):this.arc(u,d,y,s.TAU,0,!0),this.fillPath(),this},strokeRoundedRect:function(u,d,p,g,x){x===void 0&&(x=20);var y=x,C=x,P=x,M=x,R=Math.min(p,g)/2;typeof x!="number"&&(y=i(x,"tl",20),C=i(x,"tr",20),P=i(x,"bl",20),M=i(x,"br",20));var I=y>=0,L=C>=0,B=P>=0,N=M>=0;return y=Math.min(Math.abs(y),R),C=Math.min(Math.abs(C),R),P=Math.min(Math.abs(P),R),M=Math.min(Math.abs(M),R),this.beginPath(),this.moveTo(u+y,d),this.lineTo(u+p-C,d),this.moveTo(u+p-C,d),L?this.arc(u+p-C,d+C,C,-s.TAU,0):this.arc(u+p,d,C,Math.PI,s.TAU,!0),this.lineTo(u+p,d+g-M),this.moveTo(u+p,d+g-M),N?this.arc(u+p-M,d+g-M,M,0,s.TAU):this.arc(u+p,d+g,M,-s.TAU,Math.PI,!0),this.lineTo(u+P,d+g),this.moveTo(u+P,d+g),B?this.arc(u+P,d+g-P,P,s.TAU,Math.PI):this.arc(u,d+g,P,0,-s.TAU,!0),this.lineTo(u,d+y),this.moveTo(u,d+y),I?this.arc(u+y,d+y,y,-Math.PI,-s.TAU):this.arc(u,d,y,s.TAU,0,!0),this.strokePath(),this},fillPointShape:function(u,d){return this.fillPoint(u.x,u.y,d)},fillPoint:function(u,d,p){return!p||p<1?p=1:(u-=p/2,d-=p/2),this.commandBuffer.push(o.FILL_RECT,u,d,p,p),this},fillTriangleShape:function(u){return this.fillTriangle(u.x1,u.y1,u.x2,u.y2,u.x3,u.y3)},strokeTriangleShape:function(u){return this.strokeTriangle(u.x1,u.y1,u.x2,u.y2,u.x3,u.y3)},fillTriangle:function(u,d,p,g,x,y){return this.commandBuffer.push(o.FILL_TRIANGLE,u,d,p,g,x,y),this},strokeTriangle:function(u,d,p,g,x,y){return this.commandBuffer.push(o.STROKE_TRIANGLE,u,d,p,g,x,y),this},strokeLineShape:function(u){return this.lineBetween(u.x1,u.y1,u.x2,u.y2)},lineBetween:function(u,d,p,g){return this.beginPath(),this.moveTo(u,d),this.lineTo(p,g),this.strokePath(),this},lineTo:function(u,d){return this.commandBuffer.push(o.LINE_TO,u,d),this},moveTo:function(u,d){return this.commandBuffer.push(o.MOVE_TO,u,d),this},strokePoints:function(u,d,p,g){d===void 0&&(d=!1),p===void 0&&(p=!1),g===void 0&&(g=u.length),this.beginPath(),this.moveTo(u[0].x,u[0].y);for(var x=1;x-1&&this.fillStyle(this.defaultFillColor,this.defaultFillAlpha),this.defaultStrokeColor>-1&&this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha),this},generateTexture:function(u,d,p){var g=this.scene.sys,x=g.game.renderer;d===void 0&&(d=g.scale.width),p===void 0&&(p=g.scale.height),f.TargetCamera.setScene(this.scene),f.TargetCamera.setViewport(0,0,d,p),f.TargetCamera.scrollX=this.x,f.TargetCamera.scrollY=this.y;var y,C,P={willReadFrequently:!0};if(typeof u=="string")if(g.textures.exists(u)){y=g.textures.get(u);var M=y.getSourceImage();M instanceof HTMLCanvasElement&&(C=M.getContext("2d",P))}else y=g.textures.createCanvas(u,d,p),C=y.getSourceImage().getContext("2d",P);else u instanceof HTMLCanvasElement&&(C=u.getContext("2d",P));return C&&(this.renderCanvas(x,this,f.TargetCamera,null,C,!1),y&&y.refresh()),this},preDestroy:function(){this.commandBuffer=[]}});f.TargetCamera=new a,c.exports=f},32768:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(85592),v=t(20926),o=function(r,n,e,i,h,s){var l=n.commandBuffer,f=l.length,u=h||r.currentContext;if(!(f===0||!v(r,u,n,e,i))){e.addToRenderList(n);var d=1,p=1,g=0,x=0,y=1,C=0,P=0,M=0;u.beginPath();for(var R=0;R>>16,P=(g&65280)>>>8,M=g&255,u.strokeStyle="rgba("+C+","+P+","+M+","+d+")",u.lineWidth=y,R+=3;break;case a.FILL_STYLE:x=l[R+1],p=l[R+2],C=(x&16711680)>>>16,P=(x&65280)>>>8,M=x&255,u.fillStyle="rgba("+C+","+P+","+M+","+p+")",R+=2;break;case a.BEGIN_PATH:u.beginPath();break;case a.CLOSE_PATH:u.closePath();break;case a.FILL_PATH:s||u.fill();break;case a.STROKE_PATH:s||u.stroke();break;case a.FILL_RECT:s?u.rect(l[R+1],l[R+2],l[R+3],l[R+4]):u.fillRect(l[R+1],l[R+2],l[R+3],l[R+4]),R+=4;break;case a.FILL_TRIANGLE:u.beginPath(),u.moveTo(l[R+1],l[R+2]),u.lineTo(l[R+3],l[R+4]),u.lineTo(l[R+5],l[R+6]),u.closePath(),s||u.fill(),R+=6;break;case a.STROKE_TRIANGLE:u.beginPath(),u.moveTo(l[R+1],l[R+2]),u.lineTo(l[R+3],l[R+4]),u.lineTo(l[R+5],l[R+6]),u.closePath(),s||u.stroke(),R+=6;break;case a.LINE_TO:u.lineTo(l[R+1],l[R+2]),R+=2;break;case a.MOVE_TO:u.moveTo(l[R+1],l[R+2]),R+=2;break;case a.LINE_FX_TO:u.lineTo(l[R+1],l[R+2]),R+=5;break;case a.MOVE_FX_TO:u.moveTo(l[R+1],l[R+2]),R+=5;break;case a.SAVE:u.save();break;case a.RESTORE:u.restore();break;case a.TRANSLATE:u.translate(l[R+1],l[R+2]),R+=2;break;case a.SCALE:u.scale(l[R+1],l[R+2]),R+=2;break;case a.ROTATE:u.rotate(l[R+1]),R+=1;break;case a.GRADIENT_FILL_STYLE:R+=5;break;case a.GRADIENT_LINE_STYLE:R+=6;break}}u.restore()}};c.exports=o},87079:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(44603),v=t(43831);a.register("graphics",function(o,r){o===void 0&&(o={}),r!==void 0&&(o.add=r);var n=new v(this.scene,o);return o.add&&this.scene.sys.displayList.add(n),n})},1201:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(43831),v=t(39429);v.register("graphics",function(o){return this.displayList.add(new a(this.scene,o))})},84503:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(77545),o=t(32768),o=t(32768),c.exports={renderWebGL:v,renderCanvas:o}},77545:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(85592),v=t(91296),o=t(61340),r=t(70554),n=function(l,f,u){this.x=l,this.y=f,this.width=u},e=function(l,f,u){this.points=[],this.pointsLength=1,this.points[0]=new n(l,f,u)},i=[],h=new o,s=function(l,f,u,d){if(f.commandBuffer.length!==0){u.addToRenderList(f);var p=l.pipelines.set(f.pipeline,f);l.pipelines.preBatch(f);for(var g=v(f,u,d).calc,x=h.loadIdentity(),y=f.commandBuffer,C=u.alpha*f.alpha,P=1,M=p.fillTint,R=p.strokeTint,I=0,L=0,B=0,N=.01,G=Math.PI*2,V,K=[],j=0,J=!0,X=null,Y=r.getTintAppendFloatAlpha,b=0;b0&&(ct=-G+ct%G):ct>G?ct=G:ct<0&&(ct=G+ct%G),X===null&&(X=new e(vt+Math.cos(Pt)*Et,At+Math.sin(Pt)*Et,P),K.push(X),at+=N);at<1+pt;)B=ct*at+Pt,I=vt+Math.cos(B)*Et,L=At+Math.sin(B)*Et,X.points.push(new n(I,L,P)),at+=N;B=ct+Pt,I=vt+Math.cos(B)*Et,L=At+Math.sin(B)*Et,X.points.push(new n(I,L,P));break}case a.FILL_RECT:{p.batchFillRect(y[++b],y[++b],y[++b],y[++b],x,g);break}case a.FILL_TRIANGLE:{p.batchFillTriangle(y[++b],y[++b],y[++b],y[++b],y[++b],y[++b],x,g);break}case a.STROKE_TRIANGLE:{p.batchStrokeTriangle(y[++b],y[++b],y[++b],y[++b],y[++b],y[++b],P,x,g);break}case a.LINE_TO:{X!==null?X.points.push(new n(y[++b],y[++b],P)):(X=new e(y[++b],y[++b],P),K.push(X));break}case a.MOVE_TO:{X=new e(y[++b],y[++b],P),K.push(X);break}case a.SAVE:{i.push(x.copyToArray());break}case a.RESTORE:{x.copyFromArray(i.pop());break}case a.TRANSLATE:{vt=y[++b],At=y[++b],x.translate(vt,At);break}case a.SCALE:{vt=y[++b],At=y[++b],x.scale(vt,At);break}case a.ROTATE:{x.rotate(y[++b]);break}}l.pipelines.postBatch(f)}};c.exports=s},26479:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(61061),v=t(83419),o=t(51708),r=t(50792),n=t(46710),e=t(95540),i=t(35154),h=t(97022),s=t(41212),l=t(88492),f=t(35072),u=t(68287),d=new v({Extends:r,initialize:function(g,x,y){r.call(this),y?x&&!Array.isArray(x)&&(x=[x]):Array.isArray(x)?s(x[0])&&(y=x,x=null):s(x)&&(y=x,x=null),this.scene=g,this.children=new f,this.isParent=!0,this.type="Group",this.classType=e(y,"classType",u),this.name=e(y,"name",""),this.active=e(y,"active",!0),this.maxSize=e(y,"maxSize",-1),this.defaultKey=e(y,"defaultKey",null),this.defaultFrame=e(y,"defaultFrame",null),this.runChildUpdate=e(y,"runChildUpdate",!1),this.createCallback=e(y,"createCallback",null),this.removeCallback=e(y,"removeCallback",null),this.createMultipleCallback=e(y,"createMultipleCallback",null),this.internalCreateCallback=e(y,"internalCreateCallback",null),this.internalRemoveCallback=e(y,"internalRemoveCallback",null),x&&this.addMultiple(x),y&&this.createMultiple(y),this.on(o.ADDED_TO_SCENE,this.addedToScene,this),this.on(o.REMOVED_FROM_SCENE,this.removedFromScene,this)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},create:function(p,g,x,y,C,P){if(p===void 0&&(p=0),g===void 0&&(g=0),x===void 0&&(x=this.defaultKey),y===void 0&&(y=this.defaultFrame),C===void 0&&(C=!0),P===void 0&&(P=!0),this.isFull())return null;var M=new this.classType(this.scene,p,g,x,y);return M.addToDisplayList(this.scene.sys.displayList),M.addToUpdateList(),M.visible=C,M.setActive(P),this.add(M),M},createMultiple:function(p){if(this.isFull())return[];Array.isArray(p)||(p=[p]);var g=[];if(p[0].key)for(var x=0;x=0;B--)if(L=G[B],L.active===x){if(N++,N===g)break}else L=null;return L?(typeof C=="number"&&(L.x=C),typeof P=="number"&&(L.y=P),L):y?this.create(C,P,M,R,I):null},get:function(p,g,x,y,C){return this.getFirst(!1,!0,p,g,x,y,C)},getFirstAlive:function(p,g,x,y,C,P){return this.getFirst(!0,p,g,x,y,C,P)},getFirstDead:function(p,g,x,y,C,P){return this.getFirst(!1,p,g,x,y,C,P)},playAnimation:function(p,g){return a.PlayAnimation(this.children.entries,p,g),this},isFull:function(){return this.maxSize===-1?!1:this.children.size>=this.maxSize},countActive:function(p){p===void 0&&(p=!0);for(var g=0,x=0;x{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(44603),v=t(26479);a.register("group",function(o){return new v(this.scene,null,o)})},3385:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(26479),v=t(39429);v.register("group",function(o,r){return this.updateList.add(new a(this.scene,o,r))})},88571:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(31401),o=t(95643),r=t(59819),n=new a({Extends:o,Mixins:[v.Alpha,v.BlendMode,v.Depth,v.Flip,v.GetBounds,v.Mask,v.Origin,v.Pipeline,v.PostPipeline,v.ScrollFactor,v.Size,v.TextureCrop,v.Tint,v.Transform,v.Visible,r],initialize:function(i,h,s,l,f){o.call(this,i,"Image"),this._crop=this.resetCropObject(),this.setTexture(l,f),this.setPosition(h,s),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline(),this.initPostPipeline(!0)}});c.exports=n},40652:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){v.addToRenderList(a),t.batchSprite(a,a.frame,v,o)};c.exports=m},82459:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(25305),v=t(44603),o=t(23568),r=t(88571);v.register("image",function(n,e){n===void 0&&(n={});var i=o(n,"key",null),h=o(n,"frame",null),s=new r(this.scene,0,0,i,h);return e!==void 0&&(n.add=e),a(this.scene,s,n),s})},2117:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(88571),v=t(39429);v.register("image",function(o,r,n,e){return this.displayList.add(new a(this.scene,o,r,n,e))})},59819:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(99517),o=t(40652),c.exports={renderWebGL:v,renderCanvas:o}},99517:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){v.addToRenderList(a),this.pipeline.batchSprite(a,v,o)};c.exports=m},77856:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a={Events:t(51708),DisplayList:t(8050),GameObjectCreator:t(44603),GameObjectFactory:t(39429),UpdateList:t(45027),Components:t(31401),GetCalcMatrix:t(91296),BuildGameObject:t(25305),BuildGameObjectAnimation:t(13059),GameObject:t(95643),BitmapText:t(22186),Blitter:t(6107),Bob:t(46590),Container:t(31559),DOMElement:t(3069),DynamicBitmapText:t(2638),Extern:t(42421),Graphics:t(43831),Group:t(26479),Image:t(88571),Layer:t(93595),Particles:t(18404),PathFollower:t(1159),RenderTexture:t(591),RetroFont:t(196),Rope:t(77757),Sprite:t(68287),Text:t(50171),GetTextSize:t(14220),MeasureText:t(79557),TextStyle:t(35762),TileSprite:t(20839),Zone:t(41481),Video:t(18471),Shape:t(17803),Arc:t(23629),Curve:t(89),Ellipse:t(19921),Grid:t(30479),IsoBox:t(61475),IsoTriangle:t(16933),Line:t(57847),Polygon:t(24949),Rectangle:t(74561),Star:t(55911),Triangle:t(36931),Factories:{Blitter:t(12709),Container:t(24961),DOMElement:t(2611),DynamicBitmapText:t(72566),Extern:t(56315),Graphics:t(1201),Group:t(3385),Image:t(2117),Layer:t(20005),Particles:t(676),PathFollower:t(90145),RenderTexture:t(60505),Rope:t(96819),Sprite:t(46409),StaticBitmapText:t(34914),Text:t(68005),TileSprite:t(91681),Zone:t(84175),Video:t(89025),Arc:t(42563),Curve:t(40511),Ellipse:t(1543),Grid:t(34137),IsoBox:t(3933),IsoTriangle:t(49803),Line:t(2481),Polygon:t(64827),Rectangle:t(87959),Star:t(93697),Triangle:t(45245)},Creators:{Blitter:t(9403),Container:t(77143),DynamicBitmapText:t(11164),Graphics:t(87079),Group:t(94975),Image:t(82459),Layer:t(25179),Particles:t(92730),RenderTexture:t(34495),Rope:t(26209),Sprite:t(15567),StaticBitmapText:t(57336),Text:t(71259),TileSprite:t(14167),Zone:t(95261),Video:t(11511)}};a.Shader=t(20071),a.Mesh=t(4703),a.NineSlice=t(28103),a.PointLight=t(80321),a.Plane=t(33663),a.Factories.Shader=t(74177),a.Factories.Mesh=t(9225),a.Factories.NineSlice=t(47521),a.Factories.PointLight=t(71255),a.Factories.Plane=t(30985),a.Creators.Shader=t(54935),a.Creators.Mesh=t(20527),a.Creators.NineSlice=t(28279),a.Creators.PointLight=t(39829),a.Creators.Plane=t(56015),a.Light=t(41432),a.LightsManager=t(61356),a.LightsPlugin=t(88992),c.exports=a},93595:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(10312),v=t(83419),o=t(31401),r=t(53774),n=t(45893),e=t(50792),i=t(51708),h=t(73162),s=t(33963),l=t(44594),f=t(19186),u=new v({Extends:h,Mixins:[o.AlphaSingle,o.BlendMode,o.Depth,o.Mask,o.PostPipeline,o.Visible,e,s],initialize:function(p,g){h.call(this,p),e.call(this),this.scene=p,this.displayList=null,this.type="Layer",this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.systems=p.sys,this.events=p.sys.events,this.sortChildrenFlag=!1,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.initPostPipeline(),this.clearAlpha(),this.setBlendMode(a.SKIP_CHECK),g&&this.add(g),p.sys.queueDepthSort()},setActive:function(d){return this.active=d,this},setName:function(d){return this.name=d,this},setState:function(d){return this.state=d,this},setDataEnabled:function(){return this.data||(this.data=new n(this)),this},setData:function(d,p){return this.data||(this.data=new n(this)),this.data.set(d,p),this},incData:function(d,p){return this.data||(this.data=new n(this)),this.data.inc(d,p),this},toggleData:function(d){return this.data||(this.data=new n(this)),this.data.toggle(d),this},getData:function(d){return this.data||(this.data=new n(this)),this.data.get(d)},setInteractive:function(){return this},disableInteractive:function(){return this},removeInteractive:function(){return this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return r(this)},willRender:function(d){return!(this.renderFlags!==15||this.list.length===0||this.cameraFilter!==0&&this.cameraFilter&d.id)},getIndexList:function(){for(var d=this,p=this.parentContainer,g=[];p&&(g.unshift(p.getIndex(d)),d=p,p.parentContainer);)p=p.parentContainer;return g.unshift(this.displayList.getIndex(d)),g},addChildCallback:function(d){var p=d.displayList;p&&p!==this&&d.removeFromDisplayList(),d.displayList||(this.queueDepthSort(),d.displayList=this,d.emit(i.ADDED_TO_SCENE,d,this.scene),this.events.emit(l.ADDED_TO_SCENE,d,this.scene))},removeChildCallback:function(d){this.queueDepthSort(),d.displayList=null,d.emit(i.REMOVED_FROM_SCENE,d,this.scene),this.events.emit(l.REMOVED_FROM_SCENE,d,this.scene)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(f(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(d,p){return d._depth-p._depth},getChildren:function(){return this.list},addToDisplayList:function(d){return d===void 0&&(d=this.scene.sys.displayList),this.displayList&&this.displayList!==d&&this.removeFromDisplayList(),d.exists(this)||(this.displayList=d,d.add(this,!0),d.queueDepthSort(),this.emit(i.ADDED_TO_SCENE,this,this.scene),d.events.emit(l.ADDED_TO_SCENE,this,this.scene)),this},removeFromDisplayList:function(){var d=this.displayList||this.scene.sys.displayList;return d.exists(this)&&(d.remove(this,!0),d.queueDepthSort(),this.displayList=null,this.emit(i.REMOVED_FROM_SCENE,this,this.scene),d.events.emit(l.REMOVED_FROM_SCENE,this,this.scene)),this},destroy:function(d){if(!(!this.scene||this.ignoreDestroy)){this.emit(i.DESTROY,this);for(var p=this.list;p.length;)p[0].destroy(d);this.removeAllListeners(),this.resetPostPipeline(!0),this.displayList&&(this.displayList.remove(this,!0,!1),this.displayList.queueDepthSort()),this.data&&(this.data.destroy(),this.data=void 0),this.active=!1,this.visible=!1,this.list=void 0,this.scene=void 0,this.displayList=void 0,this.systems=void 0,this.events=void 0}}});c.exports=u},2956:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){var o=a.list;if(o.length!==0){a.depthSort();var r=a.blendMode!==-1;r||t.setBlendMode(0);var n=a._alpha;a.mask&&a.mask.preRenderCanvas(t,null,v);for(var e=0;e{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(25305),v=t(93595),o=t(44603),r=t(23568);o.register("layer",function(n,e){n===void 0&&(n={});var i=r(n,"children",null),h=new v(this.scene,i);return e!==void 0&&(n.add=e),a(this.scene,h,n),h})},20005:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(93595),v=t(39429);v.register("layer",function(o){return this.displayList.add(new a(this.scene,o))})},33963:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(15869),o=t(2956),c.exports={renderWebGL:v,renderCanvas:o}},15869:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){var o=a.list,r=o.length;if(r!==0){a.depthSort(),t.pipelines.preBatch(a);var n=a.blendMode!==-1;n||t.setBlendMode(0);for(var e=a.alpha,i=0;i{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(96503),v=t(83419),o=t(31401),r=t(51767),n=t(70554),e=new v({Extends:a,Mixins:[o.Origin,o.ScrollFactor,o.Visible],initialize:function(h,s,l,f,u,d,p){a.call(this,h,s,l),this.color=new r(f,u,d),this.intensity=p,this.renderFlags=15,this.cameraFilter=0,this.setScrollFactor(1,1),this.setOrigin(),this.setDisplayOrigin(l)},displayWidth:{get:function(){return this.diameter},set:function(i){this.diameter=i}},displayHeight:{get:function(){return this.diameter},set:function(i){this.diameter=i}},width:{get:function(){return this.diameter},set:function(i){this.diameter=i}},height:{get:function(){return this.diameter},set:function(i){this.diameter=i}},willRender:function(i){return!(e.RENDER_MASK!==this.renderFlags||this.cameraFilter!==0&&this.cameraFilter&i.id)},setColor:function(i){var h=n.getFloatsFromUintRGB(i);return this.color.set(h[0],h[1],h[2]),this},setIntensity:function(i){return this.intensity=i,this},setRadius:function(i){return this.radius=i,this}});e.RENDER_MASK=15,c.exports=e},61356:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(81491),v=t(83419),o=t(20339),r=t(41432),n=t(80321),e=t(51767),i=t(19133),h=t(19186),s=t(70554),l=new v({initialize:function(){this.lights=[],this.ambientColor=new e(.1,.1,.1),this.active=!1,this.maxLights=-1,this.visibleLights=0},addPointLight:function(f,u,d,p,g,x){return this.systems.displayList.add(new n(this.scene,f,u,d,p,g,x))},enable:function(){return this.maxLights===-1&&(this.maxLights=this.systems.renderer.config.maxLights),this.active=!0,this},disable:function(){return this.active=!1,this},getLights:function(f){for(var u=this.lights,d=f.worldView,p=[],g=0;gthis.maxLights&&(h(p,this.sortByDistance),p=p.slice(0,this.maxLights)),this.visibleLights=p.length,p},sortByDistance:function(f,u){return f.distance>=u.distance},setAmbientColor:function(f){var u=s.getFloatsFromUintRGB(f);return this.ambientColor.set(u[0],u[1],u[2]),this},getMaxVisibleLights:function(){return this.maxLights},getLightCount:function(){return this.lights.length},addLight:function(f,u,d,p,g){f===void 0&&(f=0),u===void 0&&(u=0),d===void 0&&(d=128),p===void 0&&(p=16777215),g===void 0&&(g=1);var x=s.getFloatsFromUintRGB(p),y=new r(f,u,d,x[0],x[1],x[2],g);return this.lights.push(y),y},removeLight:function(f){var u=this.lights.indexOf(f);return u>=0&&i(this.lights,u),this},shutdown:function(){this.lights.length=0},destroy:function(){this.shutdown()}});c.exports=l},88992:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(61356),o=t(37277),r=t(44594),n=new a({Extends:v,initialize:function(i){this.scene=i,this.systems=i.sys,i.sys.settings.isBooted||i.sys.events.once(r.BOOT,this.boot,this),v.call(this)},boot:function(){var e=this.systems.events;e.on(r.SHUTDOWN,this.shutdown,this),e.on(r.DESTROY,this.destroy,this)},destroy:function(){this.shutdown(),this.scene=void 0,this.systems=void 0}});o.register("LightsPlugin",n,"lights"),c.exports=n},4703:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(31401),o=t(39506),r=t(83997),n=t(95643),e=t(34684),i=t(92515),h=t(91296),s=t(37867),l=t(29807),f=t(43396),u=t(19186),d=t(25836),p=t(39318),g=new a({Extends:n,Mixins:[v.AlphaSingle,v.BlendMode,v.Depth,v.Mask,v.Pipeline,v.PostPipeline,v.ScrollFactor,v.Size,v.Texture,v.Transform,v.Visible,l],initialize:function(y,C,P,M,R,I,L,B,N,G,V,K){C===void 0&&(C=0),P===void 0&&(P=0),M===void 0&&(M="__WHITE"),n.call(this,y,"Mesh"),this.faces=[],this.vertices=[],this.tintFill=!1,this.debugCallback=null,this.debugGraphic=null,this.hideCCW=!0,this.modelPosition=new d,this.modelScale=new d(1,1,1),this.modelRotation=new d,this.dirtyCache=[0,0,0,0,0,0,0,0,0,0,0,0],this.transformMatrix=new s,this.viewPosition=new d,this.viewMatrix=new s,this.projectionMatrix=new s,this.totalRendered=0,this.totalFrame=0,this.ignoreDirtyCache=!1,this.fov,this.displayOriginX=0,this.displayOriginY=0;var j=y.sys.renderer;this.setPosition(C,P),this.setTexture(M,R),this.setSize(j.width,j.height),this.initPipeline(),this.initPostPipeline(),this.setPerspective(j.width,j.height),I&&this.addVertices(I,L,B,N,G,V,K)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},panX:function(x){return this.viewPosition.addScale(d.LEFT,x),this.dirtyCache[10]=1,this},panY:function(x){return this.viewPosition.y+=d.DOWN.y*x,this.dirtyCache[10]=1,this},panZ:function(x){return this.viewPosition.z+=x,this.dirtyCache[10]=1,this},setPerspective:function(x,y,C,P,M){return C===void 0&&(C=45),P===void 0&&(P=.01),M===void 0&&(M=1e3),this.fov=C,this.projectionMatrix.perspective(o(C),x/y,P,M),this.dirtyCache[10]=1,this.dirtyCache[11]=0,this},setOrtho:function(x,y,C,P){return x===void 0&&(x=this.scene.sys.renderer.getAspectRatio()),y===void 0&&(y=1),C===void 0&&(C=-1e3),P===void 0&&(P=1e3),this.fov=0,this.projectionMatrix.ortho(-x,x,-y,y,C,P),this.dirtyCache[10]=1,this.dirtyCache[11]=1,this},clear:function(){return this.faces.forEach(function(x){x.destroy()}),this.faces=[],this.vertices=[],this},addVerticesFromObj:function(x,y,C,P,M,R,I,L,B){var N=this.scene.sys.cache.obj.get(x),G;return N&&(G=e(N,this,y,C,P,M,R,I,L,B)),(!G||G.verts.length===0)&&console.warn("Mesh.addVerticesFromObj data empty:",x),this},sortByDepth:function(x,y){return x.depth-y.depth},depthSort:function(){return u(this.faces,this.sortByDepth),this},addVertex:function(x,y,C,P,M,R,I){var L=new p(x,y,C,P,M,R,I);return this.vertices.push(L),L},addFace:function(x,y,C){var P=new r(x,y,C);return this.faces.push(P),this.dirtyCache[9]=-1,P},addVertices:function(x,y,C,P,M,R,I){var L=i(x,y,C,P,M,R,I);return L?(this.faces=this.faces.concat(L.faces),this.vertices=this.vertices.concat(L.vertices)):console.warn("Mesh.addVertices data empty or invalid"),this.dirtyCache[9]=-1,this},getFaceCount:function(){return this.faces.length},getVertexCount:function(){return this.vertices.length},getFace:function(x){return this.faces[x]},hasFaceAt:function(x,y,C){C===void 0&&(C=this.scene.sys.cameras.main);for(var P=h(this,C).calc,M=this.faces,R=0;R{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(){};c.exports=m},20527:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(25305),v=t(44603),o=t(23568),r=t(35154),n=t(4703);v.register("mesh",function(e,i){e===void 0&&(e={});var h=o(e,"key",null),s=o(e,"frame",null),l=r(e,"vertices",[]),f=r(e,"uvs",[]),u=r(e,"indicies",[]),d=r(e,"containsZ",!1),p=r(e,"normals",[]),g=r(e,"colors",16777215),x=r(e,"alphas",1),y=new n(this.scene,0,0,h,s,l,f,u,d,p,g,x);return i!==void 0&&(e.add=i),a(this.scene,y,e),y})},9225:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(4703),v=t(39429);v.register("mesh",function(o,r,n,e,i,h,s,l,f,u,d){return this.displayList.add(new a(this.scene,o,r,n,e,i,h,s,l,f,u,d))})},29807:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(48833),o=t(36488),c.exports={renderWebGL:v,renderCanvas:o}},48833:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(91296),v=function(o,r,n,e){var i=r.faces,h=i.length;if(h!==0){n.addToRenderList(r);var s=o.pipelines.set(r.pipeline,r),l=a(r,n,e).calc;o.pipelines.preBatch(r);for(var f=s.setGameObject(r),u=s.vertexViewF32,d=s.vertexViewU32,p=s.vertexCount*s.currentShader.vertexComponentCount-1,g=r.tintFill,x=[],y=r.debugCallback,C=l.a,P=l.b,M=l.c,R=l.d,I=l.e,L=l.f,B=r.viewPosition.z,N=r.hideCCW,G=n.roundPixels,V=n.alpha*r.alpha,K=0,j=0;j{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(31401),o=t(95643),r=t(78023),n=t(39318),e=new a({Extends:o,Mixins:[v.AlphaSingle,v.BlendMode,v.Depth,v.GetBounds,v.Mask,v.Origin,v.Pipeline,v.PostPipeline,v.ScrollFactor,v.Texture,v.Transform,v.Visible,r],initialize:function(h,s,l,f,u,d,p,g,x,y,C){o.call(this,h,"NineSlice"),this._width,this._height,this._originX=.5,this._originY=.5,this._sizeComponent=!0,this.vertices=[],this.leftWidth,this.rightWidth,this.topHeight,this.bottomHeight,this.tint=16777215,this.tintFill=!1;var P=h.textures.getFrame(f,u);this.is3Slice=!y&&!C,P.scale9&&(this.is3Slice=P.is3Slice);for(var M=this.is3Slice?18:54,R=0;R{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(25305),v=t(44603),o=t(23568),r=t(35154),n=t(28103);v.register("nineslice",function(e,i){e===void 0&&(e={});var h=o(e,"key",null),s=o(e,"frame",null),l=r(e,"width",256),f=r(e,"height",256),u=r(e,"leftWidth",10),d=r(e,"rightWidth",10),p=r(e,"topHeight",0),g=r(e,"bottomHeight",0),x=new n(this.scene,0,0,h,s,l,f,u,d,p,g);return i!==void 0&&(e.add=i),a(this.scene,x,e),x})},47521:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(28103),v=t(39429);v.register("nineslice",function(o,r,n,e,i,h,s,l,f,u){return this.displayList.add(new a(this.scene,o,r,n,e,i,h,s,l,f,u))})},78023:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(52230),c.exports={renderWebGL:v,renderCanvas:o}},52230:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(91296),v=t(70554),o=function(r,n,e,i){var h=n.vertices,s=h.length;if(s!==0){e.addToRenderList(n);var l=r.pipelines.set(n.pipeline,n),f=a(n,e,i,!1).calc;r.pipelines.preBatch(n);var u=l.setGameObject(n),d=l.vertexViewF32,p=l.vertexViewU32,g=l.vertexCount*l.currentShader.vertexComponentCount-1,x=e.roundPixels,y=n.tintFill,C=e.alpha*n.alpha,P=v.getTintAppendFloatAlpha(n.tint,C),M=l.vertexAvailable(),R=-1;M{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(44777),o=t(37589),r=t(6113),n=t(91389),e=t(90664),i=new a({Extends:v,initialize:function(s){v.call(this,s,null,!1),this.active=!1,this.easeName="Linear",this.r=[],this.g=[],this.b=[]},getMethod:function(){return this.propertyValue===null?0:9},setMethods:function(){var h=this.propertyValue,s=h,l=this.defaultEmit,f=this.defaultUpdate;if(this.method===9){this.start=h[0],this.ease=r("Linear"),this.interpolation=n("linear"),l=this.easedValueEmit,f=this.easeValueUpdate,s=h[0],this.active=!0;for(var u=0;u{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(30976),v=t(45319),o=t(83419),r=t(99472),n=t(6113),e=t(95540),i=t(91389),h=t(77720),s=t(15994),l=new o({initialize:function(u,d,p){p===void 0&&(p=!1),this.propertyKey=u,this.propertyValue=d,this.defaultValue=d,this.steps=0,this.counter=0,this.yoyo=!1,this.direction=0,this.start=0,this.current=0,this.end=0,this.ease=null,this.interpolation=null,this.emitOnly=p,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.active=!0,this.method=0,this._onEmit,this._onUpdate},loadConfig:function(f,u){f===void 0&&(f={}),u&&(this.propertyKey=u),this.propertyValue=e(f,this.propertyKey,this.defaultValue),this.method=this.getMethod(),this.setMethods(),this.emitOnly&&(this.onUpdate=this.defaultUpdate)},toJSON:function(){return JSON.stringify(this.propertyValue)},onChange:function(f){var u;switch(this.method){case 1:case 3:case 8:u=f;break;case 2:this.propertyValue.indexOf(f)>=0&&(u=f);break;case 4:var d=(this.end-this.start)/this.steps;u=h(f,d),this.counter=u;break;case 5:case 6:case 7:u=v(f,this.start,this.end);break;case 9:u=this.start[0];break}return this.current=u,this},getMethod:function(){var f=this.propertyValue;if(f===null)return 0;var u=typeof f;if(u==="number")return 1;if(Array.isArray(f))return 2;if(u==="function")return 3;if(u==="object"){if(this.hasBoth(f,"start","end"))return this.has(f,"steps")?4:5;if(this.hasBoth(f,"min","max"))return 6;if(this.has(f,"random"))return 7;if(this.hasEither(f,"onEmit","onUpdate"))return 8;if(this.hasEither(f,"values","interpolation"))return 9}return 0},setMethods:function(){var f=this.propertyValue,u=f,d=this.defaultEmit,p=this.defaultUpdate;switch(this.method){case 1:d=this.staticValueEmit;break;case 2:d=this.randomStaticValueEmit,u=f[0];break;case 3:this._onEmit=f,d=this.proxyEmit;break;case 4:this.start=f.start,this.end=f.end,this.steps=f.steps,this.counter=this.start,this.yoyo=this.has(f,"yoyo")?f.yoyo:!1,this.direction=0,d=this.steppedEmit,u=this.start;break;case 5:this.start=f.start,this.end=f.end;var g=this.has(f,"ease")?f.ease:"Linear";this.ease=n(g,f.easeParams),d=this.has(f,"random")&&f.random?this.randomRangedValueEmit:this.easedValueEmit,p=this.easeValueUpdate,u=this.start;break;case 6:this.start=f.min,this.end=f.max,d=this.has(f,"int")&&f.int?this.randomRangedIntEmit:this.randomRangedValueEmit,u=this.start;break;case 7:var x=f.random;Array.isArray(x)&&(this.start=x[0],this.end=x[1]),d=this.randomRangedIntEmit,u=this.start;break;case 8:this._onEmit=this.has(f,"onEmit")?f.onEmit:this.defaultEmit,this._onUpdate=this.has(f,"onUpdate")?f.onUpdate:this.defaultUpdate,d=this.proxyEmit,p=this.proxyUpdate;break;case 9:this.start=f.values;var y=this.has(f,"ease")?f.ease:"Linear";this.ease=n(y,f.easeParams),this.interpolation=i(f.interpolation),d=this.easedValueEmit,p=this.easeValueUpdate,u=this.start[0];break}return this.onEmit=d,this.onUpdate=p,this.current=u,this},has:function(f,u){return f.hasOwnProperty(u)},hasBoth:function(f,u,d){return f.hasOwnProperty(u)&&f.hasOwnProperty(d)},hasEither:function(f,u,d){return f.hasOwnProperty(u)||f.hasOwnProperty(d)},defaultEmit:function(f,u,d){return d},defaultUpdate:function(f,u,d,p){return p},proxyEmit:function(f,u,d){var p=this._onEmit(f,u,d);return this.current=p,p},proxyUpdate:function(f,u,d,p){var g=this._onUpdate(f,u,d,p);return this.current=g,g},staticValueEmit:function(){return this.current},staticValueUpdate:function(){return this.current},randomStaticValueEmit:function(){var f=Math.floor(Math.random()*this.propertyValue.length);return this.current=this.propertyValue[f],this.current},randomRangedValueEmit:function(f,u){var d=r(this.start,this.end);return f&&f.data[u]&&(f.data[u].min=d,f.data[u].max=this.end),this.current=d,d},randomRangedIntEmit:function(f,u){var d=a(this.start,this.end);return f&&f.data[u]&&(f.data[u].min=d,f.data[u].max=this.end),this.current=d,d},steppedEmit:function(){var f=this.counter,u=f,d=(this.end-this.start)/this.steps;if(this.yoyo){var p;this.direction===0?(u+=d,u>=this.end&&(p=u-this.end,u=this.end-p,this.direction=1)):(u-=d,u<=this.start&&(p=this.start-u,u=this.start+p,this.direction=0)),this.counter=u}else this.counter=s(u+d,this.start,this.end);return this.current=f,f},easedValueEmit:function(f,u){if(f&&f.data[u]){var d=f.data[u];d.min=this.start,d.max=this.end}return this.current=this.start,this.start},easeValueUpdate:function(f,u,d){var p=f.data[u],g,x=this.ease(d);return this.interpolation?g=this.interpolation(this.start,x):g=(p.max-p.min)*x+p.min,this.current=g,g},destroy:function(){this.propertyValue=null,this.defaultValue=null,this.ease=null,this.interpolation=null,this._onEmit=null,this._onUpdate=null}});c.exports=l},24502:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(95540),o=t(20286),r=new a({Extends:o,initialize:function(e,i,h,s,l){if(typeof e=="object"){var f=e;e=v(f,"x",0),i=v(f,"y",0),h=v(f,"power",0),s=v(f,"epsilon",100),l=v(f,"gravity",50)}else e===void 0&&(e=0),i===void 0&&(i=0),h===void 0&&(h=0),s===void 0&&(s=100),l===void 0&&(l=50);o.call(this,e,i,!0),this._gravity=l,this._power=h*l,this._epsilon=s*s},update:function(n,e){var i=this.x-n.x,h=this.y-n.y,s=i*i+h*h;if(s!==0){var l=Math.sqrt(s);s{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(9674),v=t(45319),o=t(83419),r=t(39506),n=t(87841),e=t(11520),i=t(26099),h=new o({initialize:function(l){this.emitter=l,this.texture=null,this.frame=null,this.x=0,this.y=0,this.worldPosition=new i,this.velocityX=0,this.velocityY=0,this.accelerationX=0,this.accelerationY=0,this.maxVelocityX=1e4,this.maxVelocityY=1e4,this.bounce=0,this.scaleX=1,this.scaleY=1,this.alpha=1,this.angle=0,this.rotation=0,this.tint=16777215,this.life=1e3,this.lifeCurrent=1e3,this.delayCurrent=0,this.holdCurrent=0,this.lifeT=0,this.data={tint:{min:16777215,max:16777215},alpha:{min:1,max:1},rotate:{min:0,max:0},scaleX:{min:1,max:1},scaleY:{min:1,max:1},x:{min:0,max:0},y:{min:0,max:0},accelerationX:{min:0,max:0},accelerationY:{min:0,max:0},maxVelocityX:{min:0,max:0},maxVelocityY:{min:0,max:0},moveToX:{min:0,max:0},moveToY:{min:0,max:0},bounce:{min:0,max:0}},this.isCropped=!1,this.scene=l.scene,this.anims=new a(this),this.bounds=new n},emit:function(s,l,f,u,d,p){return this.emitter.emit(s,l,f,u,d,p)},isAlive:function(){return this.lifeCurrent>0},kill:function(){this.lifeCurrent=0},setPosition:function(s,l){s===void 0&&(s=0),l===void 0&&(l=0),this.x=s,this.y=l},fire:function(s,l){var f=this.emitter,u=f.ops,d=f.getAnim();if(d?this.anims.play(d):(this.frame=f.getFrame(),this.texture=this.frame.texture),!this.frame)throw new Error("Particle has no texture frame");if(f.getEmitZone(this),s===void 0?this.x+=u.x.onEmit(this,"x"):u.x.steps>0?this.x+=s+u.x.onEmit(this,"x"):this.x+=s,l===void 0?this.y+=u.y.onEmit(this,"y"):u.y.steps>0?this.y+=l+u.y.onEmit(this,"y"):this.y+=l,this.life=u.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0,this.delayCurrent=u.delay.onEmit(this,"delay"),this.holdCurrent=u.hold.onEmit(this,"hold"),this.scaleX=u.scaleX.onEmit(this,"scaleX"),this.scaleY=u.scaleY.active?u.scaleY.onEmit(this,"scaleY"):this.scaleX,this.angle=u.rotate.onEmit(this,"rotate"),this.rotation=r(this.angle),f.worldMatrix.transformPoint(this.x,this.y,this.worldPosition),this.delayCurrent===0&&f.getDeathZone(this))return this.lifeCurrent=0,!1;var p=u.speedX.onEmit(this,"speedX"),g=u.speedY.active?u.speedY.onEmit(this,"speedY"):p;if(f.radial){var x=r(u.angle.onEmit(this,"angle"));this.velocityX=Math.cos(x)*Math.abs(p),this.velocityY=Math.sin(x)*Math.abs(g)}else if(f.moveTo){var y=u.moveToX.onEmit(this,"moveToX"),C=u.moveToY.onEmit(this,"moveToY"),P=this.life/1e3;this.velocityX=(y-this.x)/P,this.velocityY=(C-this.y)/P}else this.velocityX=p,this.velocityY=g;return f.acceleration&&(this.accelerationX=u.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=u.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=u.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=u.maxVelocityY.onEmit(this,"maxVelocityY"),this.bounce=u.bounce.onEmit(this,"bounce"),this.alpha=u.alpha.onEmit(this,"alpha"),u.color.active?this.tint=u.color.onEmit(this,"tint"):this.tint=u.tint.onEmit(this,"tint"),!0},update:function(s,l,f){if(this.lifeCurrent<=0)return this.holdCurrent>0?(this.holdCurrent-=s,this.holdCurrent<=0):!0;if(this.delayCurrent>0)return this.delayCurrent-=s,!1;this.anims.update(0,s);var u=this.emitter,d=u.ops,p=1-this.lifeCurrent/this.life;if(this.lifeT=p,this.x=d.x.onUpdate(this,"x",p,this.x),this.y=d.y.onUpdate(this,"y",p,this.y),u.moveTo){var g=d.moveToX.onUpdate(this,"moveToX",p,u.moveToX),x=d.moveToY.onUpdate(this,"moveToY",p,u.moveToY),y=this.lifeCurrent/1e3;this.velocityX=(g-this.x)/y,this.velocityY=(x-this.y)/y}return this.computeVelocity(u,s,l,f,p),this.scaleX=d.scaleX.onUpdate(this,"scaleX",p,this.scaleX),d.scaleY.active?this.scaleY=d.scaleY.onUpdate(this,"scaleY",p,this.scaleY):this.scaleY=this.scaleX,this.angle=d.rotate.onUpdate(this,"rotate",p,this.angle),this.rotation=r(this.angle),u.getDeathZone(this)?(this.lifeCurrent=0,!0):(this.alpha=v(d.alpha.onUpdate(this,"alpha",p,this.alpha),0,1),d.color.active?this.tint=d.color.onUpdate(this,"color",p,this.tint):this.tint=d.tint.onUpdate(this,"tint",p,this.tint),this.lifeCurrent-=s,this.lifeCurrent<=0&&this.holdCurrent<=0)},computeVelocity:function(s,l,f,u,d){var p=s.ops,g=this.velocityX,x=this.velocityY,y=p.accelerationX.onUpdate(this,"accelerationX",d,this.accelerationX),C=p.accelerationY.onUpdate(this,"accelerationY",d,this.accelerationY),P=p.maxVelocityX.onUpdate(this,"maxVelocityX",d,this.maxVelocityX),M=p.maxVelocityY.onUpdate(this,"maxVelocityY",d,this.maxVelocityY);this.bounce=p.bounce.onUpdate(this,"bounce",d,this.bounce),g+=s.gravityX*f+y*f,x+=s.gravityY*f+C*f,g=v(g,-P,P),x=v(x,-M,M),this.velocityX=g,this.velocityY=x,this.x+=g*f,this.y+=x*f,s.worldMatrix.transformPoint(this.x,this.y,this.worldPosition);for(var R=0;R{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(20286),o=t(87841),r=new a({Extends:v,initialize:function(e,i,h,s,l,f,u,d){l===void 0&&(l=!0),f===void 0&&(f=!0),u===void 0&&(u=!0),d===void 0&&(d=!0),v.call(this,e,i,!0),this.bounds=new o(e,i,h,s),this.collideLeft=l,this.collideRight=f,this.collideTop=u,this.collideBottom=d},update:function(n){var e=this.bounds,i=-n.bounce,h=n.worldPosition;h.xe.right&&this.collideRight&&(n.x-=h.x-e.right,n.velocityX*=i),h.ye.bottom&&this.collideBottom&&(n.y-=h.y-e.bottom,n.velocityY*=i)}});c.exports=r},31600:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(31401),o=t(53774),r=t(43459),n=t(26388),e=t(19909),i=t(76472),h=t(44777),s=t(20696),l=t(95643),f=t(95540),u=t(26546),d=t(24502),p=t(1985),g=t(97022),x=t(86091),y=t(73162),C=t(20074),P=t(56480),M=t(68875),R=t(87841),I=t(59996),L=t(72905),B=t(90668),N=t(19186),G=t(61340),V=t(26099),K=t(15994),j=t(69601),J=["active","advance","blendMode","colorEase","deathCallback","deathCallbackScope","duration","emitCallback","emitCallbackScope","follow","frequency","gravityX","gravityY","maxAliveParticles","maxParticles","name","emitting","particleBringToTop","particleClass","radial","sortCallback","sortOrderAsc","sortProperty","stopAfter","tintFill","timeScale","trackVisible","visible"],X=["accelerationX","accelerationY","alpha","angle","bounce","color","delay","hold","lifespan","maxVelocityX","maxVelocityY","moveToX","moveToY","quantity","rotate","scaleX","scaleY","speedX","speedY","tint","x","y"],Y=new a({Extends:l,Mixins:[v.AlphaSingle,v.BlendMode,v.Depth,v.Mask,v.Pipeline,v.PostPipeline,v.ScrollFactor,v.Texture,v.Transform,v.Visible,B],initialize:function(z,W,H,Z,Q){l.call(this,z,"ParticleEmitter"),this.particleClass=P,this.ops={accelerationX:new h("accelerationX",0),accelerationY:new h("accelerationY",0),alpha:new h("alpha",1),angle:new h("angle",{min:0,max:360},!0),bounce:new h("bounce",0),color:new i("color"),delay:new h("delay",0,!0),hold:new h("hold",0,!0),lifespan:new h("lifespan",1e3,!0),maxVelocityX:new h("maxVelocityX",1e4),maxVelocityY:new h("maxVelocityY",1e4),moveToX:new h("moveToX",0),moveToY:new h("moveToY",0),quantity:new h("quantity",1,!0),rotate:new h("rotate",0),scaleX:new h("scaleX",1),scaleY:new h("scaleY",1),speedX:new h("speedX",0,!0),speedY:new h("speedY",0,!0),tint:new h("tint",16777215),x:new h("x",0),y:new h("y",0)},this.radial=!0,this.gravityX=0,this.gravityY=0,this.acceleration=!1,this.moveTo=!1,this.emitCallback=null,this.emitCallbackScope=null,this.deathCallback=null,this.deathCallbackScope=null,this.maxParticles=0,this.maxAliveParticles=0,this.stopAfter=0,this.duration=0,this.frequency=0,this.emitting=!0,this.particleBringToTop=!0,this.timeScale=1,this.emitZones=[],this.deathZones=[],this.viewBounds=null,this.follow=null,this.followOffset=new V,this.trackVisible=!1,this.frames=[],this.randomFrame=!0,this.frameQuantity=1,this.anims=[],this.randomAnim=!0,this.animQuantity=1,this.dead=[],this.alive=[],this.counters=new Float32Array(10),this.skipping=!1,this.worldMatrix=new G,this.sortProperty="",this.sortOrderAsc=!0,this.sortCallback=this.depthSortCallback,this.processors=new y(this),this.tintFill=!1,this.initPipeline(),this.initPostPipeline(),this.setPosition(W,H),this.setTexture(Z),Q&&this.setConfig(Q)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},setConfig:function(b){if(!b)return this;var z=0,W="",H=this.ops;for(z=0;z=this.animQuantity&&(this.animCounter=0,this.currentAnim=K(this.currentAnim+1,0,z)),W},setAnim:function(b,z,W){z===void 0&&(z=!0),W===void 0&&(W=1),this.randomAnim=z,this.animQuantity=W,this.currentAnim=0;var H=typeof b;if(this.anims.length=0,Array.isArray(b))this.anims=this.anims.concat(b);else if(H==="string")this.anims.push(b);else if(H==="object"){var Z=b;b=f(Z,"anims",null),b&&(this.anims=this.anims.concat(b));var Q=f(Z,"cycle",!1);this.randomAnim=!Q,this.animQuantity=f(Z,"quantity",W)}return this.anims.length===1&&(this.animQuantity=1,this.randomAnim=!1),this},setRadial:function(b){return b===void 0&&(b=!0),this.radial=b,this},addParticleBounds:function(b,z,W,H,Z,Q,k,et){if(typeof b=="object"){var st=b;b=st.x,z=st.y,W=g(st,"w")?st.w:st.width,H=g(st,"h")?st.h:st.height}return this.addParticleProcessor(new j(b,z,W,H,Z,Q,k,et))},setParticleSpeed:function(b,z){return z===void 0&&(z=b),this.ops.speedX.onChange(b),b===z?this.ops.speedY.active=!1:this.ops.speedY.onChange(z),this.radial=!0,this},setParticleScale:function(b,z){return b===void 0&&(b=1),z===void 0&&(z=b),this.ops.scaleX.onChange(b),this.ops.scaleY.onChange(z),this},setParticleGravity:function(b,z){return this.gravityX=b,this.gravityY=z,this},setParticleAlpha:function(b){return this.ops.alpha.onChange(b),this},setParticleTint:function(b){return this.ops.tint.onChange(b),this},setEmitterAngle:function(b){return this.ops.angle.onChange(b),this},setParticleLifespan:function(b){return this.ops.lifespan.onChange(b),this},setQuantity:function(b){return this.quantity=b,this},setFrequency:function(b,z){return this.frequency=b,this.flowCounter=b>0?b:0,z&&(this.quantity=z),this},addDeathZone:function(b){Array.isArray(b)||(b=[b]);for(var z,W=[],H=0;H-1&&(this.zoneTotal++,this.zoneTotal===H.total&&(this.zoneTotal=0,this.zoneIndex++,this.zoneIndex===W&&(this.zoneIndex=0)))}},getDeathZone:function(b){for(var z=this.deathZones,W=0;W=0&&(this.zoneIndex=z),this},addParticleProcessor:function(b){return this.processors.exists(b)||(b.emitter&&b.emitter.removeParticleProcessor(b),this.processors.add(b),b.emitter=this),b},removeParticleProcessor:function(b){return this.processors.exists(b)&&(this.processors.remove(b,!0),b.emitter=null),b},getProcessors:function(){return this.processors.getAll("active",!0)},createGravityWell:function(b){return this.addParticleProcessor(new d(b))},reserve:function(b){var z=this.dead;if(this.maxParticles>0){var W=this.getParticleCount();W+b>this.maxParticles&&(b=this.maxParticles-(W+b))}for(var H=0;H0&&this.getParticleCount()>=this.maxParticles?!0:this.maxAliveParticles>0&&this.getAliveParticleCount()>=this.maxAliveParticles},onParticleEmit:function(b,z){return b===void 0?(this.emitCallback=null,this.emitCallbackScope=null):typeof b=="function"&&(this.emitCallback=b,z&&(this.emitCallbackScope=z)),this},onParticleDeath:function(b,z){return b===void 0?(this.deathCallback=null,this.deathCallbackScope=null):typeof b=="function"&&(this.deathCallback=b,z&&(this.deathCallbackScope=z)),this},killAll:function(){for(var b=this.dead,z=this.alive;z.length>0;)b.push(z.pop());return this},forEachAlive:function(b,z){for(var W=this.alive,H=W.length,Z=0;Z0&&this.fastForward(b),this.emitting=!0,this.resetCounters(this.frequency,!0),z!==void 0&&(this.duration=Math.abs(z)),this.emit(s.START,this)),this},stop:function(b){return b===void 0&&(b=!1),this.emitting&&(this.emitting=!1,b&&this.killAll(),this.emit(s.STOP,this)),this},pause:function(){return this.active=!1,this},resume:function(){return this.active=!0,this},setSortProperty:function(b,z){return b===void 0&&(b=""),z===void 0&&(z=this.true),this.sortProperty=b,this.sortOrderAsc=z,this.sortCallback=this.depthSortCallback,this},setSortCallback:function(b){return this.sortProperty!==""?b=this.depthSortCallback:b=null,this.sortCallback=b,this},depthSort:function(){return N(this.alive,this.sortCallback.bind(this)),this},depthSortCallback:function(b,z){var W=this.sortProperty;return this.sortOrderAsc?b[W]-z[W]:z[W]-b[W]},flow:function(b,z,W){return z===void 0&&(z=1),this.emitting=!1,this.frequency=b,this.quantity=z,W!==void 0&&(this.stopAfter=W),this.start()},explode:function(b,z,W){this.frequency=-1,this.resetCounters(-1,!0);var H=this.emitParticle(b,z,W);return this.emit(s.EXPLODE,this,H),H},emitParticleAt:function(b,z,W){return this.emitParticle(W,b,z)},emitParticle:function(b,z,W){if(!this.atLimit()){b===void 0&&(b=this.ops.quantity.onEmit());for(var H=this.dead,Z=this.stopAfter,Q=this.follow?this.follow.x+this.followOffset.x:z,k=this.follow?this.follow.y+this.followOffset.y:W,et=0;et0&&(this.stopCounter++,this.stopCounter>=Z)||this.atLimit())break}return st}},fastForward:function(b,z){z===void 0&&(z=1e3/60);var W=0;for(this.skipping=!0;W0){var ot=this.deathCallback,ft=this.deathCallbackScope;for(k=st-1;k>=0;k--){var at=et[k];Z.splice(at.index,1),Q.push(at.particle),ot&&ot.call(ft,at.particle),at.particle.setPosition()}}if(!this.emitting&&!this.skipping){this.completeFlag===1&&Z.length===0&&(this.completeFlag=0,this.emit(s.COMPLETE,this));return}if(this.frequency===0)this.emitParticle();else if(this.frequency>0)for(this.flowCounter-=z;this.flowCounter<=0;)this.emitParticle(),this.flowCounter+=this.frequency;this.skipping||(this.duration>0&&(this.elapsed+=z,this.elapsed>=this.duration&&this.stop()),this.stopAfter>0&&this.stopCounter>=this.stopAfter&&this.stop())},overlap:function(b){for(var z=this.getWorldTransformMatrix(),W=this.alive,H=W.length,Z=[],Q=0;Q0){var rt=0;for(this.skipping=!0;rt0&&x(H,b,b),H},createEmitter:function(){throw new Error("createEmitter removed. See ParticleEmitter docs for info")},particleX:{get:function(){return this.ops.x.current},set:function(b){this.ops.x.onChange(b)}},particleY:{get:function(){return this.ops.y.current},set:function(b){this.ops.y.onChange(b)}},accelerationX:{get:function(){return this.ops.accelerationX.current},set:function(b){this.ops.accelerationX.onChange(b)}},accelerationY:{get:function(){return this.ops.accelerationY.current},set:function(b){this.ops.accelerationY.onChange(b)}},maxVelocityX:{get:function(){return this.ops.maxVelocityX.current},set:function(b){this.ops.maxVelocityX.onChange(b)}},maxVelocityY:{get:function(){return this.ops.maxVelocityY.current},set:function(b){this.ops.maxVelocityY.onChange(b)}},speed:{get:function(){return this.ops.speedX.current},set:function(b){this.ops.speedX.onChange(b),this.ops.speedY.onChange(b)}},speedX:{get:function(){return this.ops.speedX.current},set:function(b){this.ops.speedX.onChange(b)}},speedY:{get:function(){return this.ops.speedY.current},set:function(b){this.ops.speedY.onChange(b)}},moveToX:{get:function(){return this.ops.moveToX.current},set:function(b){this.ops.moveToX.onChange(b)}},moveToY:{get:function(){return this.ops.moveToY.current},set:function(b){this.ops.moveToY.onChange(b)}},bounce:{get:function(){return this.ops.bounce.current},set:function(b){this.ops.bounce.onChange(b)}},particleScaleX:{get:function(){return this.ops.scaleX.current},set:function(b){this.ops.scaleX.onChange(b)}},particleScaleY:{get:function(){return this.ops.scaleY.current},set:function(b){this.ops.scaleY.onChange(b)}},particleColor:{get:function(){return this.ops.color.current},set:function(b){this.ops.color.onChange(b)}},colorEase:{get:function(){return this.ops.color.easeName},set:function(b){this.ops.color.setEase(b)}},particleTint:{get:function(){return this.ops.tint.current},set:function(b){this.ops.tint.onChange(b)}},particleAlpha:{get:function(){return this.ops.alpha.current},set:function(b){this.ops.alpha.onChange(b)}},lifespan:{get:function(){return this.ops.lifespan.current},set:function(b){this.ops.lifespan.onChange(b)}},particleAngle:{get:function(){return this.ops.angle.current},set:function(b){this.ops.angle.onChange(b)}},particleRotate:{get:function(){return this.ops.rotate.current},set:function(b){this.ops.rotate.onChange(b)}},quantity:{get:function(){return this.ops.quantity.current},set:function(b){this.ops.quantity.onChange(b)}},delay:{get:function(){return this.ops.delay.current},set:function(b){this.ops.delay.onChange(b)}},hold:{get:function(){return this.ops.hold.current},set:function(b){this.ops.hold.onChange(b)}},flowCounter:{get:function(){return this.counters[0]},set:function(b){this.counters[0]=b}},frameCounter:{get:function(){return this.counters[1]},set:function(b){this.counters[1]=b}},animCounter:{get:function(){return this.counters[2]},set:function(b){this.counters[2]=b}},elapsed:{get:function(){return this.counters[3]},set:function(b){this.counters[3]=b}},stopCounter:{get:function(){return this.counters[4]},set:function(b){this.counters[4]=b}},completeFlag:{get:function(){return this.counters[5]},set:function(b){this.counters[5]=b}},zoneIndex:{get:function(){return this.counters[6]},set:function(b){this.counters[6]=b}},zoneTotal:{get:function(){return this.counters[7]},set:function(b){this.counters[7]=b}},currentFrame:{get:function(){return this.counters[8]},set:function(b){this.counters[8]=b}},currentAnim:{get:function(){return this.counters[9]},set:function(b){this.counters[9]=b}},preDestroy:function(){this.texture=null,this.frames=null,this.anims=null,this.emitCallback=null,this.emitCallbackScope=null,this.deathCallback=null,this.deathCallbackScope=null,this.emitZones=null,this.deathZones=null,this.bounds=null,this.follow=null,this.counters=null;var b,z=this.ops;for(b=0;b{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(59996),v=t(61340),o=new v,r=new v,n=new v,e=new v,i=function(h,s,l,f){var u=o,d=r,p=n,g=e;f?(g.loadIdentity(),g.multiply(f),g.translate(s.x,s.y),g.rotate(s.rotation),g.scale(s.scaleX,s.scaleY)):g.applyITRS(s.x,s.y,s.rotation,s.scaleX,s.scaleY);var x=h.currentContext,y=l.roundPixels,C=l.alpha,P=s.alpha,M=s.alive,R=M.length,I=s.viewBounds;if(!(!s.visible||R===0||I&&!a(I,l.worldView))){s.sortCallback&&s.depthSort(),l.addToRenderList(s);var L=s.scrollFactorX,B=s.scrollFactorY;x.save(),x.globalCompositeOperation=h.blendModes[s.blendMode];for(var N=0;N0&&j.height>0){var J=-K.halfWidth,X=-K.halfHeight;x.globalAlpha=V,x.save(),d.setToContext(x),y&&(J=Math.round(J),X=Math.round(X)),x.imageSmoothingEnabled=!K.source.scaleMode,x.drawImage(K.source.image,j.x,j.y,j.width,j.height,J,X,j.width,j.height),x.restore()}}}x.restore()}};c.exports=i},92730:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(25305),v=t(44603),o=t(23568),r=t(95540),n=t(31600);v.register("particles",function(e,i){e===void 0&&(e={});var h=o(e,"key",null),s=r(e,"config",null),l=new n(this.scene,0,0,h);return i!==void 0&&(e.add=i),a(this.scene,l,e),s&&l.setConfig(s),l})},676:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(39429),v=t(31600);a.register("particles",function(o,r,n,e){return o!==void 0&&typeof o=="string"&&console.warn("ParticleEmitterManager was removed in Phaser 3.60. See documentation for details"),this.displayList.add(new v(this.scene,o,r,n,e))})},90668:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(21188),o=t(9871),c.exports={renderWebGL:v,renderCanvas:o}},21188:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(59996),v=t(61340),o=t(70554),r=new v,n=new v,e=new v,i=new v,h=function(s,l,f,u){var d=s.pipelines.set(l.pipeline),p=r,g=n,x=e,y=i;u?(y.loadIdentity(),y.multiply(u),y.translate(l.x,l.y),y.rotate(l.rotation),y.scale(l.scaleX,l.scaleY)):y.applyITRS(l.x,l.y,l.rotation,l.scaleX,l.scaleY);var C=o.getTintAppendFloatAlpha,P=f.alpha,M=l.alpha;s.pipelines.preBatch(l);var R=l.alive,I=R.length,L=l.viewBounds;if(!(I===0||L&&!a(L,f.worldView))){l.sortCallback&&l.depthSort(),f.addToRenderList(l),p.copyFrom(f.matrix),p.multiplyWithOffset(y,-f.scrollX*l.scrollFactorX,-f.scrollY*l.scrollFactorY),s.setBlendMode(l.blendMode),l.mask&&(l.mask.preRenderWebGL(s,l,f),s.pipelines.set(l.pipeline));for(var B=l.tintFill,N,G,V=0;V{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=new a({initialize:function(r,n,e){r===void 0&&(r=0),n===void 0&&(n=0),e===void 0&&(e=!0),this.emitter,this.x=r,this.y=n,this.active=e},update:function(){},destroy:function(){this.emitter=null}});c.exports=v},9774:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="complete"},812:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="deathzone"},30522:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="explode"},96695:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="start"},18677:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="stop"},20696:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={COMPLETE:t(9774),DEATH_ZONE:t(812),EXPLODE:t(30522),START:t(96695),STOP:t(18677)}},18404:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={EmitterColorOp:t(76472),EmitterOp:t(44777),Events:t(20696),GravityWell:t(24502),Particle:t(56480),ParticleBounds:t(69601),ParticleEmitter:t(31600),ParticleProcessor:t(20286),Zones:t(21024)}},26388:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=new a({initialize:function(r,n){this.source=r,this.killOnEnter=n},willKill:function(o){var r=o.worldPosition,n=this.source.contains(r.x,r.y);return n&&this.killOnEnter||!n&&!this.killOnEnter}});c.exports=v},19909:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=new a({initialize:function(r,n,e,i,h,s){i===void 0&&(i=!1),h===void 0&&(h=!0),s===void 0&&(s=-1),this.source=r,this.points=[],this.quantity=n,this.stepRate=e,this.yoyo=i,this.counter=-1,this.seamless=h,this._length=0,this._direction=0,this.total=s,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var o=this.points[0],r=this.points[this.points.length-1];o.x===r.x&&o.y===r.y&&this.points.pop()}var n=this._length;return this._length=this.points.length,this._lengththis._length&&(this.counter=this._length-1),this},changeSource:function(o){return this.source=o,this.updateSource()},getPoint:function(o){this._direction===0?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,this.counter===-1&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var r=this.points[this.counter];r&&(o.x=r.x,o.y=r.y)}});c.exports=v},68875:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(26099),o=new a({initialize:function(n){this.source=n,this._tempVec=new v,this.total=-1},getPoint:function(r){var n=this._tempVec;this.source.getRandomPoint(n),r.x=n.x,r.y=n.y}});c.exports=o},21024:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={DeathZone:t(26388),EdgeZone:t(19909),RandomZone:t(68875)}},1159:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(31401),o=t(68287),r=new a({Extends:o,Mixins:[v.PathFollower],initialize:function(e,i,h,s,l,f){o.call(this,e,h,s,l,f),this.path=i},preUpdate:function(n,e){this.anims.update(n,e),this.pathUpdate(n)}});c.exports=r},90145:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(39429),v=t(1159);a.register("follower",function(o,r,n,e,i){var h=new v(this.scene,o,r,n,e,i);return this.displayList.add(h),this.updateList.add(h),h})},33663:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(9674),v=t(83419),o=t(48803),r=t(90664),n=t(4703),e=t(45650),i=new v({Extends:n,initialize:function(s,l,f,u,d,p,g,x){u||(u="__DEFAULT"),n.call(this,s,l,f,u,d),this.type="Plane",this.anims=new a(this),this.gridWidth,this.gridHeight,this.isTiled,this._checkerboard=null,this.hideCCW=!1,this.setGridSize(p,g,x),this.setSizeToFrame(!1),this.setViewHeight()},originX:{get:function(){return .5}},originY:{get:function(){return .5}},setGridSize:function(h,s,l){h===void 0&&(h=8),s===void 0&&(s=8),l===void 0&&(l=!1);var f=!1;return l&&(f=!0),this.gridWidth=h,this.gridHeight=s,this.isTiled=l,this.clear(),o({mesh:this,widthSegments:h,heightSegments:s,isOrtho:!1,tile:l,flipY:f}),this},setSizeToFrame:function(h){h===void 0&&(h=!0);var s=this.frame;if(this.setPerspective(this.width/s.width,this.height/s.height),this._checkerboard&&this._checkerboard!==this.texture&&this.removeCheckerboard(),!h)return this;var l=this.gridWidth,f=this.gridHeight,u=this.vertices,d=s.u0,p=s.u1,g=s.v0,x=s.v1,y,C,P=0;if(this.isTiled)for(g=s.v1,x=s.v0,C=0;C7&&y>7?g.push(d.r,d.g,d.b,l):g.push(p.r,p.g,p.b,f);var C=this.scene.sys.textures.addUint8Array(e(),new Uint8Array(g),16,16);return this.removeCheckerboard(),this.setTexture(C),this.setSizeToFrame(),this.setViewHeight(u),this},removeCheckerboard:function(){this._checkerboard&&(this._checkerboard.destroy(),this._checkerboard=null)},play:function(h,s){return this.anims.play(h,s)},playReverse:function(h,s){return this.anims.playReverse(h,s)},playAfterDelay:function(h,s){return this.anims.playAfterDelay(h,s)},playAfterRepeat:function(h,s){return this.anims.playAfterRepeat(h,s)},stop:function(){return this.anims.stop()},stopAfterDelay:function(h){return this.anims.stopAfterDelay(h)},stopAfterRepeat:function(h){return this.anims.stopAfterRepeat(h)},stopOnFrame:function(h){return this.anims.stopOnFrame(h)},preUpdate:function(h,s){n.prototype.preUpdate.call(this,h,s),this.anims.update(h,s)},preDestroy:function(){this.clear(),this.removeCheckerboard(),this.anims.destroy(),this.anims=void 0,this.debugCallback=null,this.debugGraphic=null}});c.exports=i},56015:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(25305),v=t(13059),o=t(44603),r=t(23568),n=t(35154),e=t(33663);o.register("plane",function(i,h){i===void 0&&(i={});var s=r(i,"key",null),l=r(i,"frame",null),f=n(i,"width",8),u=n(i,"height",8),d=n(i,"tile",!1),p=new e(this.scene,0,0,s,l,f,u,d);h!==void 0&&(i.add=h);var g=n(i,"checkerboard",null);if(g){var x=n(g,"color1",16777215),y=n(g,"color2",255),C=n(g,"alpha1",255),P=n(g,"alpha2",255),M=n(g,"height",128);p.createCheckerboard(x,y,C,P,M)}return a(this.scene,p,i),v(p,i),p})},30985:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(33663),v=t(39429);v.register("plane",function(o,r,n,e,i,h,s){return this.displayList.add(new a(this.scene,o,r,n,e,i,h,s))})},80321:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(31401),o=t(95643),r=t(30100),n=t(36060),e=t(67277),i=new a({Extends:o,Mixins:[v.AlphaSingle,v.BlendMode,v.Depth,v.Mask,v.Pipeline,v.PostPipeline,v.ScrollFactor,v.Transform,v.Visible,e],initialize:function(s,l,f,u,d,p,g){u===void 0&&(u=16777215),d===void 0&&(d=128),p===void 0&&(p=1),g===void 0&&(g=.1),o.call(this,s,"PointLight"),this.initPipeline(n.POINTLIGHT_PIPELINE),this.initPostPipeline(),this.setPosition(l,f),this.color=r(u),this.intensity=p,this.attenuation=g,this.width=d*2,this.height=d*2,this._radius=d},radius:{get:function(){return this._radius},set:function(h){this._radius=h,this.width=h*2,this.height=h*2}},originX:{get:function(){return .5}},originY:{get:function(){return .5}},displayOriginX:{get:function(){return this._radius}},displayOriginY:{get:function(){return this._radius}}});c.exports=i},39829:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(25305),v=t(44603),o=t(23568),r=t(80321);v.register("pointlight",function(n,e){n===void 0&&(n={});var i=o(n,"color",16777215),h=o(n,"radius",128),s=o(n,"intensity",1),l=o(n,"attenuation",.1),f=new r(this.scene,0,0,i,h,s,l);return e!==void 0&&(n.add=e),a(this.scene,f,n),f})},71255:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(39429),v=t(80321);a.register("pointlight",function(o,r,n,e,i,h){return this.displayList.add(new v(this.scene,o,r,n,e,i,h))})},67277:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(57787),c.exports={renderWebGL:v,renderCanvas:o}},57787:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(91296),v=function(o,r,n,e){n.addToRenderList(r);var i=o.pipelines.set(r.pipeline),h=a(r,n,e).calc,s=r.width,l=r.height,f=-r._radius,u=-r._radius,d=f+s,p=u+l,g=h.getX(0,0),x=h.getY(0,0),y=h.getX(f,u),C=h.getY(f,u),P=h.getX(f,p),M=h.getY(f,p),R=h.getX(d,p),I=h.getY(d,p),L=h.getX(d,u),B=h.getY(d,u);o.pipelines.preBatch(r),i.batchPointLight(r,n,y,C,P,M,R,I,L,B,g,x),o.pipelines.postBatch(r)};c.exports=v},591:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(81320),o=t(88571),r=new a({Extends:o,initialize:function(e,i,h,s,l){i===void 0&&(i=0),h===void 0&&(h=0),s===void 0&&(s=32),l===void 0&&(l=32);var f=new v(e.sys.textures,"",s,l);o.call(this,e,i,h,f),this.type="RenderTexture",this.camera=this.texture.camera,this._saved=!1},setSize:function(n,e){this.width=n,this.height=e,this.texture.setSize(n,e),this.updateDisplayOrigin();var i=this.input;return i&&!i.customHitArea&&(i.hitArea.width=n,i.hitArea.height=e),this},resize:function(n,e){return this.setSize(n,e),this},saveTexture:function(n){var e=this.texture;return e.key=n,e.manager.addDynamicTexture(e)&&(this._saved=!0),e},fill:function(n,e,i,h,s,l){return this.texture.fill(n,e,i,h,s,l),this},clear:function(){return this.texture.clear(),this},stamp:function(n,e,i,h,s){return this.texture.stamp(n,e,i,h,s),this},erase:function(n,e,i){return this.texture.erase(n,e,i),this},draw:function(n,e,i,h,s){return this.texture.draw(n,e,i,h,s),this},drawFrame:function(n,e,i,h,s,l){return this.texture.drawFrame(n,e,i,h,s,l),this},repeat:function(n,e,i,h,s,l,f,u,d){return this.texture.repeat(n,e,i,h,s,l,f,u,d),this},beginDraw:function(){return this.texture.beginDraw(),this},batchDraw:function(n,e,i,h,s){return this.texture.batchDraw(n,e,i,h,s),this},batchDrawFrame:function(n,e,i,h,s,l){return this.texture.batchDrawFrame(n,e,i,h,s,l),this},endDraw:function(n){return this.texture.endDraw(n),this},snapshotArea:function(n,e,i,h,s,l,f){return this.texture.snapshotArea(n,e,i,h,s,l,f),this},snapshot:function(n,e,i){return this.snapshotArea(0,0,this.width,this.height,n,e,i)},snapshotPixel:function(n,e,i){return this.snapshotArea(n,e,1,1,i,"pixel")},preDestroy:function(){this.camera=null,this._saved||this.texture.destroy()}});c.exports=r},34495:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(25305),v=t(44603),o=t(23568),r=t(591);v.register("renderTexture",function(n,e){n===void 0&&(n={});var i=o(n,"x",0),h=o(n,"y",0),s=o(n,"width",32),l=o(n,"height",32),f=new r(this.scene,i,h,s,l);return e!==void 0&&(n.add=e),a(this.scene,f,n),f})},60505:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(39429),v=t(591);a.register("renderTexture",function(o,r,n,e){return this.displayList.add(new v(this.scene,o,r,n,e))})},77757:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(9674),v=t(83419),o=t(31401),r=t(95643),n=t(36060),e=t(38745),i=t(26099),h=new v({Extends:r,Mixins:[o.AlphaSingle,o.BlendMode,o.Depth,o.Flip,o.Mask,o.Pipeline,o.PostPipeline,o.Size,o.Texture,o.Transform,o.Visible,o.ScrollFactor,e],initialize:function(l,f,u,d,p,g,x,y,C){d===void 0&&(d="__DEFAULT"),g===void 0&&(g=2),x===void 0&&(x=!0),r.call(this,l,"Rope"),this.anims=new a(this),this.points=g,this.vertices,this.uv,this.colors,this.alphas,this.tintFill=d==="__DEFAULT",this.dirty=!1,this.horizontal=x,this._flipX=!1,this._flipY=!1,this._perp=new i,this.debugCallback=null,this.debugGraphic=null,this.setTexture(d,p),this.setPosition(f,u),this.setSizeToFrame(),this.initPipeline(n.ROPE_PIPELINE),this.initPostPipeline(),Array.isArray(g)&&this.resizeArrays(g.length),this.setPoints(g,y,C),this.updateVertices()},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(s,l){var f=this.anims.currentFrame;this.anims.update(s,l),this.anims.currentFrame!==f&&(this.updateUVs(),this.updateVertices())},play:function(s,l,f){return this.anims.play(s,l,f),this},setDirty:function(){return this.dirty=!0,this},setHorizontal:function(s,l,f){return s===void 0&&(s=this.points.length),this.horizontal?this:(this.horizontal=!0,this.setPoints(s,l,f))},setVertical:function(s,l,f){return s===void 0&&(s=this.points.length),this.horizontal?(this.horizontal=!1,this.setPoints(s,l,f)):this},setTintFill:function(s){return s===void 0&&(s=!1),this.tintFill=s,this},setAlphas:function(s,l){var f=this.points.length;if(f<1)return this;var u=this.alphas;s===void 0?s=[1]:!Array.isArray(s)&&l===void 0&&(s=[s]);var d,p=0;if(l!==void 0)for(d=0;dp&&(g=s[p]),u[p]=g,s.length>p+1&&(g=s[p+1]),u[p+1]=g}return this},setColors:function(s){var l=this.points.length;if(l<1)return this;var f=this.colors;s===void 0?s=[16777215]:Array.isArray(s)||(s=[s]);var u,d=0;if(s.length===l)for(u=0;ud&&(p=s[d]),f[d]=p,s.length>d+1&&(p=s[d+1]),f[d+1]=p}return this},setPoints:function(s,l,f){if(s===void 0&&(s=2),typeof s=="number"){var u=s;u<2&&(u=2),s=[];var d,p,g;if(this.horizontal)for(g=-this.frame.halfWidth,p=this.frame.width/(u-1),d=0;d{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(){};c.exports=m},26209:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(25305),v=t(44603),o=t(23568),r=t(35154),n=t(77757);v.register("rope",function(e,i){e===void 0&&(e={});var h=o(e,"key",null),s=o(e,"frame",null),l=o(e,"horizontal",!0),f=r(e,"points",void 0),u=r(e,"colors",void 0),d=r(e,"alphas",void 0),p=new n(this.scene,0,0,h,s,f,l,u,d);return i!==void 0&&(e.add=i),a(this.scene,p,e),p})},96819:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(77757),v=t(39429);v.register("rope",function(o,r,n,e,i,h,s,l){return this.displayList.add(new a(this.scene,o,r,n,e,i,h,s,l))})},38745:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(20439),o=t(95262),c.exports={renderWebGL:v,renderCanvas:o}},20439:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(91296),v=t(70554),o=function(r,n,e,i){e.addToRenderList(n);var h=r.pipelines.set(n.pipeline,n),s=a(n,e,i).calc,l=n.vertices,f=n.uv,u=n.colors,d=n.alphas,p=n.alpha,g=v.getTintAppendFloatAlpha,x=e.roundPixels,y=l.length,C=Math.floor(y*.5);h.flush(),r.pipelines.preBatch(n);var P=h.setGameObject(n),M=h.vertexViewF32,R=h.vertexViewU32,I=h.vertexCount*h.currentShader.vertexComponentCount-1,L=0,B=n.tintFill;n.dirty&&n.updateVertices();for(var N=n.debugCallback,G=[],V=0;V{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(31401),o=t(95643),r=t(95540),n=t(79291),e=t(61622),i=t(25479),h=t(61340),s=t(95428),l=t(92503),f=new a({Extends:o,Mixins:[v.ComputedSize,v.Depth,v.GetBounds,v.Mask,v.Origin,v.ScrollFactor,v.Transform,v.Visible,i],initialize:function(d,p,g,x,y,C,P,M){g===void 0&&(g=0),x===void 0&&(x=0),y===void 0&&(y=128),C===void 0&&(C=128),o.call(this,d,"Shader"),this.blendMode=-1,this.shader;var R=d.sys.renderer;this.renderer=R,this.gl=R.gl,this.vertexData=new ArrayBuffer(6*(Float32Array.BYTES_PER_ELEMENT*2)),this.vertexBuffer=R.createVertexBuffer(this.vertexData.byteLength,this.gl.STREAM_DRAW),this._deferSetShader=null,this._deferProjOrtho=null,this.program=null,this.bytes=new Uint8Array(this.vertexData),this.vertexViewF32=new Float32Array(this.vertexData),this._tempMatrix1=new h,this._tempMatrix2=new h,this._tempMatrix3=new h,this.viewMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.projectionMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.uniforms={},this.pointer=null,this._rendererWidth=R.width,this._rendererHeight=R.height,this._textureCount=0,this.framebuffer=null,this.glTexture=null,this.renderToTexture=!1,this.texture=null,this.setPosition(g,x),this.setSize(y,C),this.setOrigin(.5,.5),this.setShader(p,P,M),this.renderer.on(l.RESTORE_WEBGL,this.onContextRestored,this)},willRender:function(u){return this.renderToTexture?!0:!(o.RENDER_MASK!==this.renderFlags||this.cameraFilter!==0&&this.cameraFilter&u.id)},setRenderToTexture:function(u,d){if(!this.renderToTexture){var p=this.width,g=this.height,x=this.renderer;this.glTexture=x.createTextureFromSource(null,p,g,0),this.framebuffer=x.createFramebuffer(p,g,this.glTexture,!1),this._rendererWidth=p,this._rendererHeight=g,this.renderToTexture=!0,this.projOrtho(0,this.width,this.height,0),u&&(this.texture=this.scene.sys.textures.addGLTexture(u,this.glTexture))}return this.shader&&(x.pipelines.clear(),this.load(),this.flush(),x.pipelines.rebind()),this},setShader:function(u,d,p){if(this.renderer.contextLost)return this._deferSetShader={key:u,textures:d,textureData:p},this;if(d===void 0&&(d=[]),typeof u=="string"){var g=this.scene.sys.cache.shader;if(!g.has(u))return console.warn("Shader missing: "+u),this;this.shader=g.get(u)}else this.shader=u;var x=this.gl,y=this.renderer;this.program&&y.deleteProgram(this.program);var C=y.createProgram(this.shader.vertexSrc,this.shader.fragmentSrc);x.uniformMatrix4fv(x.getUniformLocation(C.webGLProgram,"uViewMatrix"),!1,this.viewMatrix),x.uniformMatrix4fv(x.getUniformLocation(C.webGLProgram,"uProjectionMatrix"),!1,this.projectionMatrix),x.uniform2f(x.getUniformLocation(C.webGLProgram,"uResolution"),this.width,this.height),this.program=C;var P=new Date,M={resolution:{type:"2f",value:{x:this.width,y:this.height}},time:{type:"1f",value:0},mouse:{type:"2f",value:{x:this.width/2,y:this.height/2}},date:{type:"4fv",value:[P.getFullYear(),P.getMonth(),P.getDate(),P.getHours()*60*60+P.getMinutes()*60+P.getSeconds()]},sampleRate:{type:"1f",value:44100},iChannel0:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel1:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel2:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel3:{type:"sampler2D",value:null,textureData:{repeat:!0}}};this.shader.uniforms?this.uniforms=n(!0,{},this.shader.uniforms,M):this.uniforms=M;for(var R=0;R<4;R++)d[R]&&this.setSampler2D("iChannel"+R,d[R],R,p);return this.initUniforms(),this.projOrtho(0,this._rendererWidth,this._rendererHeight,0),this},setPointer:function(u){return this.pointer=u,this},projOrtho:function(u,d,p,g){if(this.renderer.contextLost){this._deferProjOrtho={left:u,right:d,bottom:p,top:g};return}var x=-1e3,y=1e3,C=1/(u-d),P=1/(p-g),M=1/(x-y),R=this.projectionMatrix;R[0]=-2*C,R[5]=-2*P,R[10]=2*M,R[12]=(u+d)*C,R[13]=(g+p)*P,R[14]=(y+x)*M;var I=this.program,L=this.gl,B=this.renderer;B.setProgram(I),L.uniformMatrix4fv(L.getUniformLocation(I.webGLProgram,"uProjectionMatrix"),!1,this.projectionMatrix),this._rendererWidth=d,this._rendererHeight=p},initUniforms:function(){var u=this.renderer.glFuncMap,d=this.program;this._textureCount=0;for(var p in this.uniforms){var g=this.uniforms[p],x=g.type,y=u[x];g.uniformLocation=this.renderer.createUniformLocation(d,p),x!=="sampler2D"&&(g.glMatrix=y.matrix,g.glValueLength=y.length,g.glFunc=y.func)}},setSampler2DBuffer:function(u,d,p,g,x,y){x===void 0&&(x=0),y===void 0&&(y={});var C=this.uniforms[u];return C.value=d,y.width=p,y.height=g,C.textureData=y,this._textureCount=x,this.initSampler2D(C),this},setSampler2D:function(u,d,p,g){p===void 0&&(p=0);var x=this.scene.sys.textures;if(x.exists(d)){var y=x.getFrame(d);if(y.glTexture&&y.glTexture.isRenderTexture)return this.setSampler2DBuffer(u,y.glTexture,y.width,y.height,p,g);var C=this.uniforms[u],P=y.source;C.textureKey=d,C.source=P.image,C.value=y.glTexture,P.isGLTexture&&(g||(g={}),g.width=P.width,g.height=P.height),g&&(C.textureData=g),this._textureCount=p,this.initSampler2D(C)}return this},setUniform:function(u,d){return e(this.uniforms,u,d),this},getUniform:function(u){return r(this.uniforms,u,null)},setChannel0:function(u,d){return this.setSampler2D("iChannel0",u,0,d)},setChannel1:function(u,d){return this.setSampler2D("iChannel1",u,1,d)},setChannel2:function(u,d){return this.setSampler2D("iChannel2",u,2,d)},setChannel3:function(u,d){return this.setSampler2D("iChannel3",u,3,d)},initSampler2D:function(u){if(u.value){var d=u.textureData;if(d&&!u.value.isRenderTexture){var p=this.gl,g=u.value,x=p[r(d,"magFilter","linear").toUpperCase()],y=p[r(d,"minFilter","linear").toUpperCase()],C=p[r(d,"wrapS","repeat").toUpperCase()],P=p[r(d,"wrapT","repeat").toUpperCase()],M=p[r(d,"format","rgba").toUpperCase()],R=r(d,"flipY",!1),I=r(d,"width",g.width),L=r(d,"height",g.height),B=r(d,"source",g.pixels);d.repeat&&(C=p.REPEAT,P=p.REPEAT),d.width&&(B=null),g.update(B,I,L,R,C,P,y,x,M)}this.renderer.setProgram(this.program),this._textureCount++}},syncUniforms:function(){var u=this.gl,d=this.uniforms,p,g,x,y,C,P=0;for(var M in d)p=d[M],x=p.glFunc,g=p.glValueLength,y=p.uniformLocation,C=p.value,C!==null&&(g===1?p.glMatrix?x.call(u,y.webGLUniformLocation,p.transpose,C):x.call(u,y.webGLUniformLocation,C):g===2?x.call(u,y.webGLUniformLocation,C.x,C.y):g===3?x.call(u,y.webGLUniformLocation,C.x,C.y,C.z):g===4?x.call(u,y.webGLUniformLocation,C.x,C.y,C.z,C.w):p.type==="sampler2D"&&(u.activeTexture(u.TEXTURE0+P),u.bindTexture(u.TEXTURE_2D,C.webGLTexture),u.uniform1i(y.webGLUniformLocation,P),P++))},load:function(u){var d=this.gl,p=this.width,g=this.height,x=this.renderer,y=this.program,C=this.viewMatrix;if(!this.renderToTexture){var P=-this._displayOriginX,M=-this._displayOriginY;C[0]=u[0],C[1]=u[1],C[4]=u[2],C[5]=u[3],C[8]=u[4],C[9]=u[5],C[12]=C[0]*P+C[4]*M,C[13]=C[1]*P+C[5]*M}d.useProgram(y.webGLProgram),d.uniformMatrix4fv(d.getUniformLocation(y.webGLProgram,"uViewMatrix"),!1,C),d.uniformMatrix4fv(d.getUniformLocation(y.webGLProgram,"uProjectionMatrix"),!1,this.projectionMatrix),d.uniform2f(d.getUniformLocation(y.webGLProgram,"uResolution"),this.width,this.height);var R=this.uniforms,I=R.resolution;I.value.x=p,I.value.y=g,R.time.value=x.game.loop.getDuration();var L=this.pointer;if(L){var B=R.mouse,N=L.x/p,G=1-L.y/g;B.value.x=N.toFixed(2),B.value.y=G.toFixed(2)}this.syncUniforms()},flush:function(){var u=this.width,d=this.height,p=this.program,g=this.gl,x=this.vertexBuffer,y=this.renderer,C=Float32Array.BYTES_PER_ELEMENT*2;this.renderToTexture&&(y.setFramebuffer(this.framebuffer),g.clearColor(0,0,0,0),g.clear(g.COLOR_BUFFER_BIT)),g.bindBuffer(g.ARRAY_BUFFER,x.webGLBuffer);var P=g.getAttribLocation(p.webGLProgram,"inPosition");P!==-1&&(g.enableVertexAttribArray(P),g.vertexAttribPointer(P,2,g.FLOAT,!1,C,0));var M=this.vertexViewF32;M[3]=d,M[4]=u,M[5]=d,M[8]=u,M[9]=d,M[10]=u;var R=6;g.bufferSubData(g.ARRAY_BUFFER,0,this.bytes.subarray(0,R*C)),g.drawArrays(g.TRIANGLES,0,R),this.renderToTexture&&y.setFramebuffer(null,!1)},setAlpha:function(){},setBlendMode:function(){},onContextRestored:function(){if(this._deferSetShader!==null){var u=this._deferSetShader.key,d=this._deferSetShader.textures,p=this._deferSetShader.textureData;this._deferSetShader=null,this.setShader(u,d,p)}if(this._deferProjOrtho!==null){var g=this._deferProjOrtho.left,x=this._deferProjOrtho.right,y=this._deferProjOrtho.bottom,C=this._deferProjOrtho.top;this._deferProjOrtho=null,this.projOrtho(g,x,y,C)}},preDestroy:function(){var u=this.renderer;u.off(l.RESTORE_WEBGL,this.onContextRestored,this),u.deleteProgram(this.program),u.deleteBuffer(this.vertexBuffer),this.renderToTexture&&(u.deleteFramebuffer(this.framebuffer),this.texture.destroy(),this.framebuffer=null,this.glTexture=null,this.texture=null),s(this.uniforms,function(d){u.deleteUniformLocation(d.uniformLocation),d.uniformLocation=null})}});c.exports=f},80464:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(){};c.exports=m},54935:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(25305),v=t(44603),o=t(23568),r=t(20071);v.register("shader",function(n,e){n===void 0&&(n={});var i=o(n,"key",null),h=o(n,"x",0),s=o(n,"y",0),l=o(n,"width",128),f=o(n,"height",128),u=new r(this.scene,i,h,s,l,f);return e!==void 0&&(n.add=e),a(this.scene,u,n),u})},74177:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(20071),v=t(39429);v.register("shader",function(o,r,n,e,i,h,s){return this.displayList.add(new a(this.scene,o,r,n,e,i,h,s))})},25479:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(19257),o=t(80464),c.exports={renderWebGL:v,renderCanvas:o}},19257:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(91296),v=function(o,r,n,e){if(r.shader){if(n.addToRenderList(r),o.pipelines.clear(),r.renderToTexture)r.load(),r.flush();else{var i=a(r,n,e).calc;(o.width!==r._rendererWidth||o.height!==r._rendererHeight)&&r.projOrtho(0,o.width,o.height,0),r.load(i.matrix),r.flush()}o.pipelines.rebind()}};c.exports=v},10441:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(70554),v=function(o,r,n,e,i,h){for(var s=a.getTintAppendFloatAlpha(n.fillColor,n.fillAlpha*e),l=n.pathData,f=n.pathIndexes,u=0;u{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){var r=v||a.fillColor,n=o||a.fillAlpha,e=(r&16711680)>>>16,i=(r&65280)>>>8,h=r&255;t.fillStyle="rgba("+e+","+i+","+h+","+n+")"};c.exports=m},75177:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){var r=v||a.strokeColor,n=o||a.strokeAlpha,e=(r&16711680)>>>16,i=(r&65280)>>>8,h=r&255;t.strokeStyle="rgba("+e+","+i+","+h+","+n+")",t.lineWidth=a.lineWidth};c.exports=m},17803:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(31401),o=t(95643),r=t(23031),n=new a({Extends:o,Mixins:[v.AlphaSingle,v.BlendMode,v.Depth,v.GetBounds,v.Mask,v.Origin,v.Pipeline,v.PostPipeline,v.ScrollFactor,v.Transform,v.Visible],initialize:function(i,h,s){h===void 0&&(h="Shape"),o.call(this,i,h),this.geom=s,this.pathData=[],this.pathIndexes=[],this.fillColor=16777215,this.fillAlpha=1,this.strokeColor=16777215,this.strokeAlpha=1,this.lineWidth=1,this.isFilled=!1,this.isStroked=!1,this.closePath=!0,this._tempLine=new r,this.width=0,this.height=0,this.initPipeline(),this.initPostPipeline()},setFillStyle:function(e,i){return i===void 0&&(i=1),e===void 0?this.isFilled=!1:(this.fillColor=e,this.fillAlpha=i,this.isFilled=!0),this},setStrokeStyle:function(e,i,h){return h===void 0&&(h=1),e===void 0?this.isStroked=!1:(this.lineWidth=e,this.strokeColor=i,this.strokeAlpha=h,this.isStroked=!0),this},setClosePath:function(e){return this.closePath=e,this},setSize:function(e,i){return this.width=e,this.height=i,this},setDisplaySize:function(e,i){return this.displayWidth=e,this.displayHeight=i,this},preDestroy:function(){this.geom=null,this._tempLine=null,this.pathData=[],this.pathIndexes=[]},displayWidth:{get:function(){return this.scaleX*this.width},set:function(e){this.scaleX=e/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(e){this.scaleY=e/this.height}}});c.exports=n},34682:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(70554),v=function(o,r,n,e,i){var h=o.strokeTint,s=a.getTintAppendFloatAlpha(r.strokeColor,r.strokeAlpha*n);h.TL=s,h.TR=s,h.BL=s,h.BR=s;var l=r.pathData,f=l.length-1,u=r.lineWidth,d=u/2,p=l[0]-e,g=l[1]-i;r.closePath||(f-=2);for(var x=2;x{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(13609),v=t(83419),o=t(39506),r=t(94811),n=t(96503),e=t(36383),i=t(17803),h=new v({Extends:i,Mixins:[a],initialize:function(l,f,u,d,p,g,x,y,C){f===void 0&&(f=0),u===void 0&&(u=0),d===void 0&&(d=128),p===void 0&&(p=0),g===void 0&&(g=360),x===void 0&&(x=!1),i.call(this,l,"Arc",new n(0,0,d)),this._startAngle=p,this._endAngle=g,this._anticlockwise=x,this._iterations=.01,this.setPosition(f,u);var P=this.geom.radius*2;this.setSize(P,P),y!==void 0&&this.setFillStyle(y,C),this.updateDisplayOrigin(),this.updateData()},iterations:{get:function(){return this._iterations},set:function(s){this._iterations=s,this.updateData()}},radius:{get:function(){return this.geom.radius},set:function(s){this.geom.radius=s;var l=s*2;this.setSize(l,l),this.updateDisplayOrigin(),this.updateData()}},startAngle:{get:function(){return this._startAngle},set:function(s){this._startAngle=s,this.updateData()}},endAngle:{get:function(){return this._endAngle},set:function(s){this._endAngle=s,this.updateData()}},anticlockwise:{get:function(){return this._anticlockwise},set:function(s){this._anticlockwise=s,this.updateData()}},setRadius:function(s){return this.radius=s,this},setIterations:function(s){return s===void 0&&(s=.01),this.iterations=s,this},setStartAngle:function(s,l){return this._startAngle=s,l!==void 0&&(this._anticlockwise=l),this.updateData()},setEndAngle:function(s,l){return this._endAngle=s,l!==void 0&&(this._anticlockwise=l),this.updateData()},updateData:function(){var s=this._iterations,l=s,f=this.geom.radius,u=o(this._startAngle),d=o(this._endAngle),p=this._anticlockwise,g=f,x=f;d-=u,p?d<-e.PI2?d=-e.PI2:d>0&&(d=-e.PI2+d%e.PI2):d>e.PI2?d=e.PI2:d<0&&(d=e.PI2+d%e.PI2);for(var y=[g+Math.cos(u)*f,x+Math.sin(u)*f],C;l<1;)C=d*l+u,y.push(g+Math.cos(C)*f,x+Math.sin(C)*f),l+=s;return C=d+u,y.push(g+Math.cos(C)*f,x+Math.sin(C)*f),y.push(g+Math.cos(u)*f,x+Math.sin(u)*f),this.pathIndexes=r(y),this.pathData=y,this}});c.exports=h},42542:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(39506),v=t(65960),o=t(75177),r=t(20926),n=function(e,i,h,s){h.addToRenderList(i);var l=e.currentContext;if(r(e,l,i,h,s)){var f=i.radius;l.beginPath(),l.arc(f-i.originX*(f*2),f-i.originY*(f*2),f,a(i._startAngle),a(i._endAngle),i.anticlockwise),i.closePath&&l.closePath(),i.isFilled&&(v(l,i),l.fill()),i.isStroked&&(o(l,i),l.stroke()),l.restore()}};c.exports=n},42563:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(23629),v=t(39429);v.register("arc",function(o,r,n,e,i,h,s,l){return this.displayList.add(new a(this.scene,o,r,n,e,i,h,s,l))}),v.register("circle",function(o,r,n,e,i){return this.displayList.add(new a(this.scene,o,r,n,0,360,!1,e,i))})},13609:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(41447),o=t(42542),c.exports={renderWebGL:v,renderCanvas:o}},41447:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(91296),v=t(10441),o=t(34682),r=function(n,e,i,h){i.addToRenderList(e);var s=n.pipelines.set(e.pipeline),l=a(e,i,h),f=s.calcMatrix.copyFrom(l.calc),u=e._displayOriginX,d=e._displayOriginY,p=i.alpha*e.alpha;n.pipelines.preBatch(e),e.isFilled&&v(s,f,e,p,u,d),e.isStroked&&o(s,e,p,u,d),n.pipelines.postBatch(e)};c.exports=r},89:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(33141),o=t(94811),r=t(87841),n=t(17803),e=new a({Extends:n,Mixins:[v],initialize:function(h,s,l,f,u,d){s===void 0&&(s=0),l===void 0&&(l=0),n.call(this,h,"Curve",f),this._smoothness=32,this._curveBounds=new r,this.closePath=!1,this.setPosition(s,l),u!==void 0&&this.setFillStyle(u,d),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(i){this._smoothness=i,this.updateData()}},setSmoothness:function(i){return this._smoothness=i,this.updateData()},updateData:function(){var i=this._curveBounds,h=this._smoothness;this.geom.getBounds(i,h),this.setSize(i.width,i.height),this.updateDisplayOrigin();for(var s=[],l=this.geom.getPoints(h),f=0;f{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(65960),v=t(75177),o=t(20926),r=function(n,e,i,h){i.addToRenderList(e);var s=n.currentContext;if(o(n,s,e,i,h)){var l=e._displayOriginX+e._curveBounds.x,f=e._displayOriginY+e._curveBounds.y,u=e.pathData,d=u.length-1,p=u[0]-l,g=u[1]-f;s.beginPath(),s.moveTo(p,g),e.closePath||(d-=2);for(var x=2;x{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(39429),v=t(89);a.register("curve",function(o,r,n,e,i){return this.displayList.add(new v(this.scene,o,r,n,e,i))})},33141:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(53987),o=t(3170),c.exports={renderWebGL:v,renderCanvas:o}},53987:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(10441),v=t(91296),o=t(34682),r=function(n,e,i,h){i.addToRenderList(e);var s=n.pipelines.set(e.pipeline),l=v(e,i,h),f=s.calcMatrix.copyFrom(l.calc),u=e._displayOriginX+e._curveBounds.x,d=e._displayOriginY+e._curveBounds.y,p=i.alpha*e.alpha;n.pipelines.preBatch(e),e.isFilled&&a(s,f,e,p,u,d),e.isStroked&&o(s,e,p,u,d),n.pipelines.postBatch(e)};c.exports=r},19921:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(94811),o=t(54205),r=t(8497),n=t(17803),e=new a({Extends:n,Mixins:[o],initialize:function(h,s,l,f,u,d,p){s===void 0&&(s=0),l===void 0&&(l=0),f===void 0&&(f=128),u===void 0&&(u=128),n.call(this,h,"Ellipse",new r(f/2,u/2,f,u)),this._smoothness=64,this.setPosition(s,l),this.width=f,this.height=u,d!==void 0&&this.setFillStyle(d,p),this.updateDisplayOrigin(),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(i){this._smoothness=i,this.updateData()}},setSize:function(i,h){return this.width=i,this.height=h,this.geom.setPosition(i/2,h/2),this.geom.setSize(i,h),this.updateData()},setSmoothness:function(i){return this._smoothness=i,this.updateData()},updateData:function(){for(var i=[],h=this.geom.getPoints(this._smoothness),s=0;s{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(65960),v=t(75177),o=t(20926),r=function(n,e,i,h){i.addToRenderList(e);var s=n.currentContext;if(o(n,s,e,i,h)){var l=e._displayOriginX,f=e._displayOriginY,u=e.pathData,d=u.length-1,p=u[0]-l,g=u[1]-f;s.beginPath(),s.moveTo(p,g),e.closePath||(d-=2);for(var x=2;x{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(19921),v=t(39429);v.register("ellipse",function(o,r,n,e,i,h){return this.displayList.add(new a(this.scene,o,r,n,e,i,h))})},54205:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(19467),o=t(7930),c.exports={renderWebGL:v,renderCanvas:o}},19467:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(10441),v=t(91296),o=t(34682),r=function(n,e,i,h){i.addToRenderList(e);var s=n.pipelines.set(e.pipeline),l=v(e,i,h),f=s.calcMatrix.copyFrom(l.calc),u=e._displayOriginX,d=e._displayOriginY,p=i.alpha*e.alpha;n.pipelines.preBatch(e),e.isFilled&&a(s,f,e,p,u,d),e.isStroked&&o(s,e,p,u,d),n.pipelines.postBatch(e)};c.exports=r},30479:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(17803),o=t(26015),r=new a({Extends:v,Mixins:[o],initialize:function(e,i,h,s,l,f,u,d,p,g,x){i===void 0&&(i=0),h===void 0&&(h=0),s===void 0&&(s=128),l===void 0&&(l=128),f===void 0&&(f=32),u===void 0&&(u=32),v.call(this,e,"Grid",null),this.cellWidth=f,this.cellHeight=u,this.showCells=!0,this.outlineFillColor=0,this.outlineFillAlpha=0,this.showOutline=!0,this.showAltCells=!1,this.altFillColor,this.altFillAlpha,this.setPosition(i,h),this.setSize(s,l),this.setFillStyle(d,p),g!==void 0&&this.setOutlineStyle(g,x),this.updateDisplayOrigin()},setFillStyle:function(n,e){return e===void 0&&(e=1),n===void 0?this.showCells=!1:(this.fillColor=n,this.fillAlpha=e,this.showCells=!0),this},setAltFillStyle:function(n,e){return e===void 0&&(e=1),n===void 0?this.showAltCells=!1:(this.altFillColor=n,this.altFillAlpha=e,this.showAltCells=!0),this},setOutlineStyle:function(n,e){return e===void 0&&(e=1),n===void 0?this.showOutline=!1:(this.outlineFillColor=n,this.outlineFillAlpha=e,this.showOutline=!0),this}});c.exports=r},49912:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(65960),v=t(75177),o=t(20926),r=function(n,e,i,h){i.addToRenderList(e);var s=n.currentContext;if(o(n,s,e,i,h)){var l=-e._displayOriginX,f=-e._displayOriginY,u=i.alpha*e.alpha,d=e.width,p=e.height,g=e.cellWidth,x=e.cellHeight,y=Math.ceil(d/g),C=Math.ceil(p/x),P=g,M=x,R=g-(y*g-d),I=x-(C*x-p),L=e.showCells,B=e.showAltCells,N=e.showOutline,G=0,V=0,K=0,j=0,J=0;if(N&&(P--,M--,R===g&&R--,I===x&&I--),L&&e.fillAlpha>0)for(a(s,e),V=0;V0)for(a(s,e,e.altFillColor,e.altFillAlpha*u),V=0;V0){for(v(s,e,e.outlineFillColor,e.outlineFillAlpha*u),G=1;G{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(39429),v=t(30479);a.register("grid",function(o,r,n,e,i,h,s,l,f,u){return this.displayList.add(new v(this.scene,o,r,n,e,i,h,s,l,f,u))})},26015:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(46161),o=t(49912),c.exports={renderWebGL:v,renderCanvas:o}},46161:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(91296),v=t(70554),o=function(r,n,e,i){e.addToRenderList(n);var h=r.pipelines.set(n.pipeline),s=a(n,e,i),l=h.calcMatrix.copyFrom(s.calc);l.translate(-n._displayOriginX,-n._displayOriginY);var f=e.alpha*n.alpha,u=n.width,d=n.height,p=n.cellWidth,g=n.cellHeight,x=Math.ceil(u/p),y=Math.ceil(d/g),C=p,P=g,M=p-(x*p-u),R=g-(y*g-d),I,L,B=n.showCells,N=n.showAltCells,G=n.showOutline,V=0,K=0,j=0,J=0,X=0;if(G&&(C--,P--,M===p&&M--,R===g&&R--),r.pipelines.preBatch(n),B&&n.fillAlpha>0)for(I=h.fillTint,L=v.getTintAppendFloatAlpha(n.fillColor,n.fillAlpha*f),I.TL=L,I.TR=L,I.BL=L,I.BR=L,K=0;K0)for(I=h.fillTint,L=v.getTintAppendFloatAlpha(n.altFillColor,n.altFillAlpha*f),I.TL=L,I.TR=L,I.BL=L,I.BR=L,K=0;K0){var Y=h.strokeTint,b=v.getTintAppendFloatAlpha(n.outlineFillColor,n.outlineFillAlpha*f);for(Y.TL=b,Y.TR=b,Y.BL=b,Y.BR=b,V=1;V{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(99651),v=t(83419),o=t(17803),r=new v({Extends:o,Mixins:[a],initialize:function(e,i,h,s,l,f,u,d){i===void 0&&(i=0),h===void 0&&(h=0),s===void 0&&(s=48),l===void 0&&(l=32),f===void 0&&(f=15658734),u===void 0&&(u=10066329),d===void 0&&(d=13421772),o.call(this,e,"IsoBox",null),this.projection=4,this.fillTop=f,this.fillLeft=u,this.fillRight=d,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isFilled=!0,this.setPosition(i,h),this.setSize(s,l),this.updateDisplayOrigin()},setProjection:function(n){return this.projection=n,this},setFaces:function(n,e,i){return n===void 0&&(n=!0),e===void 0&&(e=!0),i===void 0&&(i=!0),this.showTop=n,this.showLeft=e,this.showRight=i,this},setFillStyle:function(n,e,i){return this.fillTop=n,this.fillLeft=e,this.fillRight=i,this.isFilled=!0,this}});c.exports=r},11508:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(65960),v=t(20926),o=function(r,n,e,i){e.addToRenderList(n);var h=r.currentContext;if(v(r,h,n,e,i)&&n.isFilled){var s=n.width,l=n.height,f=s/2,u=s/n.projection;n.showTop&&(a(h,n,n.fillTop),h.beginPath(),h.moveTo(-f,-l),h.lineTo(0,-u-l),h.lineTo(f,-l),h.lineTo(f,-1),h.lineTo(0,u-1),h.lineTo(-f,-1),h.lineTo(-f,-l),h.fill()),n.showLeft&&(a(h,n,n.fillLeft),h.beginPath(),h.moveTo(-f,0),h.lineTo(0,u),h.lineTo(0,u-l),h.lineTo(-f,-l),h.lineTo(-f,0),h.fill()),n.showRight&&(a(h,n,n.fillRight),h.beginPath(),h.moveTo(f,0),h.lineTo(0,u),h.lineTo(0,u-l),h.lineTo(f,-l),h.lineTo(f,0),h.fill()),h.restore()}};c.exports=o},3933:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(39429),v=t(61475);a.register("isobox",function(o,r,n,e,i,h,s){return this.displayList.add(new v(this.scene,o,r,n,e,i,h,s))})},99651:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(68149),o=t(11508),c.exports={renderWebGL:v,renderCanvas:o}},68149:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(91296),v=t(70554),o=function(r,n,e,i){e.addToRenderList(n);var h=r.pipelines.set(n.pipeline),s=a(n,e,i),l=h.calcMatrix.copyFrom(s.calc),f=n.width,u=n.height,d=f/2,p=f/n.projection,g=e.alpha*n.alpha;if(n.isFilled){var x,y,C,P,M,R,I,L,B;r.pipelines.preBatch(n),n.showTop&&(x=v.getTintAppendFloatAlpha(n.fillTop,g),y=l.getX(-d,-u),C=l.getY(-d,-u),P=l.getX(0,-p-u),M=l.getY(0,-p-u),R=l.getX(d,-u),I=l.getY(d,-u),L=l.getX(0,p-u),B=l.getY(0,p-u),h.batchQuad(n,y,C,P,M,R,I,L,B,0,0,1,1,x,x,x,x,2)),n.showLeft&&(x=v.getTintAppendFloatAlpha(n.fillLeft,g),y=l.getX(-d,0),C=l.getY(-d,0),P=l.getX(0,p),M=l.getY(0,p),R=l.getX(0,p-u),I=l.getY(0,p-u),L=l.getX(-d,-u),B=l.getY(-d,-u),h.batchQuad(n,y,C,P,M,R,I,L,B,0,0,1,1,x,x,x,x,2)),n.showRight&&(x=v.getTintAppendFloatAlpha(n.fillRight,g),y=l.getX(d,0),C=l.getY(d,0),P=l.getX(0,p),M=l.getY(0,p),R=l.getX(0,p-u),I=l.getY(0,p-u),L=l.getX(d,-u),B=l.getY(d,-u),h.batchQuad(n,y,C,P,M,R,I,L,B,0,0,1,1,x,x,x,x,2)),r.pipelines.postBatch(n)}};c.exports=o},16933:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(60561),o=t(17803),r=new a({Extends:o,Mixins:[v],initialize:function(e,i,h,s,l,f,u,d,p){i===void 0&&(i=0),h===void 0&&(h=0),s===void 0&&(s=48),l===void 0&&(l=32),f===void 0&&(f=!1),u===void 0&&(u=15658734),d===void 0&&(d=10066329),p===void 0&&(p=13421772),o.call(this,e,"IsoTriangle",null),this.projection=4,this.fillTop=u,this.fillLeft=d,this.fillRight=p,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isReversed=f,this.isFilled=!0,this.setPosition(i,h),this.setSize(s,l),this.updateDisplayOrigin()},setProjection:function(n){return this.projection=n,this},setReversed:function(n){return this.isReversed=n,this},setFaces:function(n,e,i){return n===void 0&&(n=!0),e===void 0&&(e=!0),i===void 0&&(i=!0),this.showTop=n,this.showLeft=e,this.showRight=i,this},setFillStyle:function(n,e,i){return this.fillTop=n,this.fillLeft=e,this.fillRight=i,this.isFilled=!0,this}});c.exports=r},79590:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(65960),v=t(20926),o=function(r,n,e,i){e.addToRenderList(n);var h=r.currentContext;if(v(r,h,n,e,i)&&n.isFilled){var s=n.width,l=n.height,f=s/2,u=s/n.projection,d=n.isReversed;n.showTop&&d&&(a(h,n,n.fillTop),h.beginPath(),h.moveTo(-f,-l),h.lineTo(0,-u-l),h.lineTo(f,-l),h.lineTo(0,u-l),h.fill()),n.showLeft&&(a(h,n,n.fillLeft),h.beginPath(),d?(h.moveTo(-f,-l),h.lineTo(0,u),h.lineTo(0,u-l)):(h.moveTo(-f,0),h.lineTo(0,u),h.lineTo(0,u-l)),h.fill()),n.showRight&&(a(h,n,n.fillRight),h.beginPath(),d?(h.moveTo(f,-l),h.lineTo(0,u),h.lineTo(0,u-l)):(h.moveTo(f,0),h.lineTo(0,u),h.lineTo(0,u-l)),h.fill()),h.restore()}};c.exports=o},49803:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(39429),v=t(16933);a.register("isotriangle",function(o,r,n,e,i,h,s,l){return this.displayList.add(new v(this.scene,o,r,n,e,i,h,s,l))})},60561:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(51503),o=t(79590),c.exports={renderWebGL:v,renderCanvas:o}},51503:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(91296),v=t(70554),o=function(r,n,e,i){e.addToRenderList(n);var h=r.pipelines.set(n.pipeline),s=a(n,e,i),l=h.calcMatrix.copyFrom(s.calc),f=n.width,u=n.height,d=f/2,p=f/n.projection,g=n.isReversed,x=e.alpha*n.alpha;if(n.isFilled){r.pipelines.preBatch(n);var y,C,P,M,R,I,L;if(n.showTop&&g){y=v.getTintAppendFloatAlpha(n.fillTop,x),C=l.getX(-d,-u),P=l.getY(-d,-u),M=l.getX(0,-p-u),R=l.getY(0,-p-u),I=l.getX(d,-u),L=l.getY(d,-u);var B=l.getX(0,p-u),N=l.getY(0,p-u);h.batchQuad(n,C,P,M,R,I,L,B,N,0,0,1,1,y,y,y,y,2)}n.showLeft&&(y=v.getTintAppendFloatAlpha(n.fillLeft,x),g?(C=l.getX(-d,-u),P=l.getY(-d,-u),M=l.getX(0,p),R=l.getY(0,p),I=l.getX(0,p-u),L=l.getY(0,p-u)):(C=l.getX(-d,0),P=l.getY(-d,0),M=l.getX(0,p),R=l.getY(0,p),I=l.getX(0,p-u),L=l.getY(0,p-u)),h.batchTri(n,C,P,M,R,I,L,0,0,1,1,y,y,y,2)),n.showRight&&(y=v.getTintAppendFloatAlpha(n.fillRight,x),g?(C=l.getX(d,-u),P=l.getY(d,-u),M=l.getX(0,p),R=l.getY(0,p),I=l.getX(0,p-u),L=l.getY(0,p-u)):(C=l.getX(d,0),P=l.getY(d,0),M=l.getX(0,p),R=l.getY(0,p),I=l.getX(0,p-u),L=l.getY(0,p-u)),h.batchTri(n,C,P,M,R,I,L,0,0,1,1,y,y,y,2)),r.pipelines.postBatch(n)}};c.exports=o},57847:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(17803),o=t(23031),r=t(36823),n=new a({Extends:v,Mixins:[r],initialize:function(i,h,s,l,f,u,d,p,g){h===void 0&&(h=0),s===void 0&&(s=0),l===void 0&&(l=0),f===void 0&&(f=0),u===void 0&&(u=128),d===void 0&&(d=0),v.call(this,i,"Line",new o(l,f,u,d));var x=Math.max(1,this.geom.right-this.geom.left),y=Math.max(1,this.geom.bottom-this.geom.top);this.lineWidth=1,this._startWidth=1,this._endWidth=1,this.setPosition(h,s),this.setSize(x,y),p!==void 0&&this.setStrokeStyle(1,p,g),this.updateDisplayOrigin()},setLineWidth:function(e,i){return i===void 0&&(i=e),this._startWidth=e,this._endWidth=i,this.lineWidth=e,this},setTo:function(e,i,h,s){return this.geom.setTo(e,i,h,s),this}});c.exports=n},17440:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(75177),v=t(20926),o=function(r,n,e,i){e.addToRenderList(n);var h=r.currentContext;if(v(r,h,n,e,i)){var s=n._displayOriginX,l=n._displayOriginY;n.isStroked&&(a(h,n),h.beginPath(),h.moveTo(n.geom.x1-s,n.geom.y1-l),h.lineTo(n.geom.x2-s,n.geom.y2-l),h.stroke()),h.restore()}};c.exports=o},2481:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(39429),v=t(57847);a.register("line",function(o,r,n,e,i,h,s,l){return this.displayList.add(new v(this.scene,o,r,n,e,i,h,s,l))})},36823:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(77385),o=t(17440),c.exports={renderWebGL:v,renderCanvas:o}},77385:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(91296),v=t(70554),o=function(r,n,e,i){e.addToRenderList(n);var h=r.pipelines.set(n.pipeline),s=a(n,e,i);h.calcMatrix.copyFrom(s.calc);var l=n._displayOriginX,f=n._displayOriginY,u=e.alpha*n.alpha;if(r.pipelines.preBatch(n),n.isStroked){var d=h.strokeTint,p=v.getTintAppendFloatAlpha(n.strokeColor,n.strokeAlpha*u);d.TL=p,d.TR=p,d.BL=p,d.BR=p,h.batchLine(n.geom.x1-l,n.geom.y1-f,n.geom.x2-l,n.geom.y2-f,n._startWidth/2,n._endWidth/2,1,0,!1,s.sprite,s.camera)}r.pipelines.postBatch(n)};c.exports=o},24949:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(90273),v=t(83419),o=t(94811),r=t(13829),n=t(25717),e=t(17803),i=t(5469),h=new v({Extends:e,Mixins:[a],initialize:function(l,f,u,d,p,g){f===void 0&&(f=0),u===void 0&&(u=0),e.call(this,l,"Polygon",new n(d));var x=r(this.geom);this.setPosition(f,u),this.setSize(x.width,x.height),p!==void 0&&this.setFillStyle(p,g),this.updateDisplayOrigin(),this.updateData()},smooth:function(s){s===void 0&&(s=1);for(var l=0;l{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(65960),v=t(75177),o=t(20926),r=function(n,e,i,h){i.addToRenderList(e);var s=n.currentContext;if(o(n,s,e,i,h)){var l=e._displayOriginX,f=e._displayOriginY,u=e.pathData,d=u.length-1,p=u[0]-l,g=u[1]-f;s.beginPath(),s.moveTo(p,g),e.closePath||(d-=2);for(var x=2;x{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(39429),v=t(24949);a.register("polygon",function(o,r,n,e,i){return this.displayList.add(new v(this.scene,o,r,n,e,i))})},90273:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(73695),o=t(38710),c.exports={renderWebGL:v,renderCanvas:o}},73695:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(10441),v=t(91296),o=t(34682),r=function(n,e,i,h){i.addToRenderList(e);var s=n.pipelines.set(e.pipeline),l=v(e,i,h),f=s.calcMatrix.copyFrom(l.calc),u=e._displayOriginX,d=e._displayOriginY,p=i.alpha*e.alpha;n.pipelines.preBatch(e),e.isFilled&&a(s,f,e,p,u,d),e.isStroked&&o(s,e,p,u,d),n.pipelines.postBatch(e)};c.exports=r},74561:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(87841),o=t(17803),r=t(95597),n=new a({Extends:o,Mixins:[r],initialize:function(i,h,s,l,f,u,d){h===void 0&&(h=0),s===void 0&&(s=0),l===void 0&&(l=128),f===void 0&&(f=128),o.call(this,i,"Rectangle",new v(0,0,l,f)),this.setPosition(h,s),this.setSize(l,f),u!==void 0&&this.setFillStyle(u,d),this.updateDisplayOrigin(),this.updateData()},setSize:function(e,i){this.width=e,this.height=i,this.geom.setSize(e,i),this.updateData(),this.updateDisplayOrigin();var h=this.input;return h&&!h.customHitArea&&(h.hitArea.width=e,h.hitArea.height=i),this},updateData:function(){var e=[],i=this.geom,h=this._tempLine;return i.getLineA(h),e.push(h.x1,h.y1,h.x2,h.y2),i.getLineB(h),e.push(h.x2,h.y2),i.getLineC(h),e.push(h.x2,h.y2),i.getLineD(h),e.push(h.x2,h.y2),this.pathData=e,this}});c.exports=n},48682:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(65960),v=t(75177),o=t(20926),r=function(n,e,i,h){i.addToRenderList(e);var s=n.currentContext;if(o(n,s,e,i,h)){var l=e._displayOriginX,f=e._displayOriginY;e.isFilled&&(a(s,e),s.fillRect(-l,-f,e.width,e.height)),e.isStroked&&(v(s,e),s.beginPath(),s.rect(-l,-f,e.width,e.height),s.stroke()),s.restore()}};c.exports=r},87959:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(39429),v=t(74561);a.register("rectangle",function(o,r,n,e,i,h){return this.displayList.add(new v(this.scene,o,r,n,e,i,h))})},95597:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(52059),o=t(48682),c.exports={renderWebGL:v,renderCanvas:o}},52059:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(91296),v=t(34682),o=t(70554),r=function(n,e,i,h){i.addToRenderList(e);var s=n.pipelines.set(e.pipeline),l=a(e,i,h);s.calcMatrix.copyFrom(l.calc);var f=e._displayOriginX,u=e._displayOriginY,d=i.alpha*e.alpha;if(n.pipelines.preBatch(e),e.isFilled){var p=s.fillTint,g=o.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*d);p.TL=g,p.TR=g,p.BL=g,p.BR=g,s.batchFillRect(-f,-u,e.width,e.height)}e.isStroked&&v(s,e,d,f,u),n.pipelines.postBatch(e)};c.exports=r},55911:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(81991),v=t(83419),o=t(94811),r=t(17803),n=new v({Extends:r,Mixins:[a],initialize:function(i,h,s,l,f,u,d,p){h===void 0&&(h=0),s===void 0&&(s=0),l===void 0&&(l=5),f===void 0&&(f=32),u===void 0&&(u=64),r.call(this,i,"Star",null),this._points=l,this._innerRadius=f,this._outerRadius=u,this.setPosition(h,s),this.setSize(u*2,u*2),d!==void 0&&this.setFillStyle(d,p),this.updateDisplayOrigin(),this.updateData()},setPoints:function(e){return this._points=e,this.updateData()},setInnerRadius:function(e){return this._innerRadius=e,this.updateData()},setOuterRadius:function(e){return this._outerRadius=e,this.updateData()},points:{get:function(){return this._points},set:function(e){this._points=e,this.updateData()}},innerRadius:{get:function(){return this._innerRadius},set:function(e){this._innerRadius=e,this.updateData()}},outerRadius:{get:function(){return this._outerRadius},set:function(e){this._outerRadius=e,this.updateData()}},updateData:function(){var e=[],i=this._points,h=this._innerRadius,s=this._outerRadius,l=Math.PI/2*3,f=Math.PI/i,u=s,d=s;e.push(u,d+-s);for(var p=0;p{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(65960),v=t(75177),o=t(20926),r=function(n,e,i,h){i.addToRenderList(e);var s=n.currentContext;if(o(n,s,e,i,h)){var l=e._displayOriginX,f=e._displayOriginY,u=e.pathData,d=u.length-1,p=u[0]-l,g=u[1]-f;s.beginPath(),s.moveTo(p,g),e.closePath||(d-=2);for(var x=2;x{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(55911),v=t(39429);v.register("star",function(o,r,n,e,i,h,s){return this.displayList.add(new a(this.scene,o,r,n,e,i,h,s))})},81991:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(57017),o=t(64272),c.exports={renderWebGL:v,renderCanvas:o}},57017:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(10441),v=t(91296),o=t(34682),r=function(n,e,i,h){i.addToRenderList(e);var s=n.pipelines.set(e.pipeline),l=v(e,i,h),f=s.calcMatrix.copyFrom(l.calc),u=e._displayOriginX,d=e._displayOriginY,p=i.alpha*e.alpha;n.pipelines.preBatch(e),e.isFilled&&a(s,f,e,p,u,d),e.isStroked&&o(s,e,p,u,d),n.pipelines.postBatch(e)};c.exports=r},36931:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(17803),o=t(16483),r=t(96195),n=new a({Extends:v,Mixins:[r],initialize:function(i,h,s,l,f,u,d,p,g,x,y){h===void 0&&(h=0),s===void 0&&(s=0),l===void 0&&(l=0),f===void 0&&(f=128),u===void 0&&(u=64),d===void 0&&(d=0),p===void 0&&(p=128),g===void 0&&(g=128),v.call(this,i,"Triangle",new o(l,f,u,d,p,g));var C=this.geom.right-this.geom.left,P=this.geom.bottom-this.geom.top;this.setPosition(h,s),this.setSize(C,P),x!==void 0&&this.setFillStyle(x,y),this.updateDisplayOrigin(),this.updateData()},setTo:function(e,i,h,s,l,f){return this.geom.setTo(e,i,h,s,l,f),this.updateData()},updateData:function(){var e=[],i=this.geom,h=this._tempLine;return i.getLineA(h),e.push(h.x1,h.y1,h.x2,h.y2),i.getLineB(h),e.push(h.x2,h.y2),i.getLineC(h),e.push(h.x2,h.y2),this.pathData=e,this}});c.exports=n},85172:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(65960),v=t(75177),o=t(20926),r=function(n,e,i,h){i.addToRenderList(e);var s=n.currentContext;if(o(n,s,e,i,h)){var l=e._displayOriginX,f=e._displayOriginY,u=e.geom.x1-l,d=e.geom.y1-f,p=e.geom.x2-l,g=e.geom.y2-f,x=e.geom.x3-l,y=e.geom.y3-f;s.beginPath(),s.moveTo(u,d),s.lineTo(p,g),s.lineTo(x,y),s.closePath(),e.isFilled&&(a(s,e),s.fill()),e.isStroked&&(v(s,e),s.stroke()),s.restore()}};c.exports=r},45245:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(39429),v=t(36931);a.register("triangle",function(o,r,n,e,i,h,s,l,f,u){return this.displayList.add(new v(this.scene,o,r,n,e,i,h,s,l,f,u))})},96195:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(83253),o=t(85172),c.exports={renderWebGL:v,renderCanvas:o}},83253:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(91296),v=t(34682),o=t(70554),r=function(n,e,i,h){i.addToRenderList(e);var s=n.pipelines.set(e.pipeline),l=a(e,i,h);s.calcMatrix.copyFrom(l.calc);var f=e._displayOriginX,u=e._displayOriginY,d=i.alpha*e.alpha;if(n.pipelines.preBatch(e),e.isFilled){var p=s.fillTint,g=o.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*d);p.TL=g,p.TR=g,p.BL=g,p.BR=g;var x=e.geom.x1-f,y=e.geom.y1-u,C=e.geom.x2-f,P=e.geom.y2-u,M=e.geom.x3-f,R=e.geom.y3-u;s.batchFillTriangle(x,y,C,P,M,R,l.sprite,l.camera)}e.isStroked&&v(s,e,d,f,u),n.pipelines.postBatch(e)};c.exports=r},68287:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(9674),v=t(83419),o=t(31401),r=t(95643),n=t(92751),e=new v({Extends:r,Mixins:[o.Alpha,o.BlendMode,o.Depth,o.Flip,o.GetBounds,o.Mask,o.Origin,o.Pipeline,o.PostPipeline,o.ScrollFactor,o.Size,o.TextureCrop,o.Tint,o.Transform,o.Visible,n],initialize:function(h,s,l,f,u){r.call(this,h,"Sprite"),this._crop=this.resetCropObject(),this.anims=new a(this),this.setTexture(f,u),this.setPosition(s,l),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline(),this.initPostPipeline(!0)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(i,h){this.anims.update(i,h)},play:function(i,h){return this.anims.play(i,h)},playReverse:function(i,h){return this.anims.playReverse(i,h)},playAfterDelay:function(i,h){return this.anims.playAfterDelay(i,h)},playAfterRepeat:function(i,h){return this.anims.playAfterRepeat(i,h)},chain:function(i){return this.anims.chain(i)},stop:function(){return this.anims.stop()},stopAfterDelay:function(i){return this.anims.stopAfterDelay(i)},stopAfterRepeat:function(i){return this.anims.stopAfterRepeat(i)},stopOnFrame:function(i){return this.anims.stopOnFrame(i)},toJSON:function(){return o.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}});c.exports=e},76552:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){v.addToRenderList(a),t.batchSprite(a,a.frame,v,o)};c.exports=m},15567:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(25305),v=t(13059),o=t(44603),r=t(23568),n=t(68287);o.register("sprite",function(e,i){e===void 0&&(e={});var h=r(e,"key",null),s=r(e,"frame",null),l=new n(this.scene,0,0,h,s);return i!==void 0&&(e.add=i),a(this.scene,l,e),v(l,e),l})},46409:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(39429),v=t(68287);a.register("sprite",function(o,r,n,e){return this.displayList.add(new v(this.scene,o,r,n,e))})},92751:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(9409),o=t(76552),c.exports={renderWebGL:v,renderCanvas:o}},9409:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){v.addToRenderList(a),a.pipeline.batchSprite(a,v,o)};c.exports=m},14220:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){var o=t.canvas,r=t.context,n=t.style,e=[],i=0,h=v.length;n.maxLines>0&&n.maxLines1&&(l+=t.letterSpacing*(v[s].length-1)),n.wordWrap&&(l-=r.measureText(" ").width),e[s]=Math.ceil(l),i=Math.max(i,e[s])}var f=a.fontSize+n.strokeThickness,u=f*h,d=t.lineSpacing;return h>1&&(u+=d*(h-1)),{width:i,height:u,lines:h,lineWidths:e,lineSpacing:d,lineHeight:f}};c.exports=m},79557:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(27919),v=function(o){var r=a.create(this),n=r.getContext("2d",{willReadFrequently:!0});o.syncFont(r,n);var e=n.measureText(o.testString);if("actualBoundingBoxAscent"in e){var i=e.actualBoundingBoxAscent,h=e.actualBoundingBoxDescent;return a.remove(r),{ascent:i,descent:h,fontSize:i+h}}var s=Math.ceil(e.width*o.baselineX),l=s,f=2*l;l=l*o.baselineY|0,r.width=s,r.height=f,n.fillStyle="#f00",n.fillRect(0,0,s,f),n.font=o._font,n.textBaseline="alphabetic",n.fillStyle="#000",n.fillText(o.testString,0,l);var u={ascent:0,descent:0,fontSize:0},d=n.getImageData(0,0,s,f);if(!d)return u.ascent=l,u.descent=l+6,u.fontSize=u.ascent+u.descent,a.remove(r),u;var p=d.data,g=p.length,x=s*4,y,C,P=0,M=!1;for(y=0;yl;y--){for(C=0;C{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(40366),v=t(27919),o=t(83419),r=t(31401),n=t(95643),e=t(14220),i=t(35154),h=t(35846),s=t(61771),l=t(35762),f=t(45650),u=new o({Extends:n,Mixins:[r.Alpha,r.BlendMode,r.ComputedSize,r.Crop,r.Depth,r.Flip,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.PostPipeline,r.ScrollFactor,r.Tint,r.Transform,r.Visible,s],initialize:function(p,g,x,y,C){g===void 0&&(g=0),x===void 0&&(x=0),n.call(this,p,"Text"),this.renderer=p.sys.renderer,this.setPosition(g,x),this.setOrigin(0,0),this.initPipeline(),this.initPostPipeline(!0),this.canvas=v.create(this),this.context,this.style=new l(this,C),this.autoRound=!0,this.splitRegExp=/(?:\r\n|\r|\n)/,this._text=void 0,this.padding={left:0,right:0,top:0,bottom:0},this.width=1,this.height=1,this.lineSpacing=0,this.letterSpacing=0,this.style.resolution===0&&(this.style.resolution=1),this._crop=this.resetCropObject(),this._textureKey=f(),this.texture=p.sys.textures.addCanvas(this._textureKey,this.canvas),this.context=this.texture.context,this.frame=this.texture.get(),this.frame.source.resolution=this.style.resolution,this.renderer&&this.renderer.gl&&(this.renderer.deleteTexture(this.frame.source.glTexture),this.frame.source.glTexture=null),this.initRTL(),this.setText(y),C&&C.padding&&this.setPadding(C.padding),C&&C.lineSpacing&&this.setLineSpacing(C.lineSpacing)},initRTL:function(){this.style.rtl&&(this.canvas.dir="rtl",this.context.direction="rtl",this.canvas.style.display="none",a(this.canvas,this.scene.sys.canvas),this.originX=1)},runWordWrap:function(d){var p=this.style;if(p.wordWrapCallback){var g=p.wordWrapCallback.call(p.wordWrapCallbackScope,d,this);return Array.isArray(g)&&(g=g.join(` -`)),g}else return p.wordWrapWidth?p.wordWrapUseAdvanced?this.advancedWordWrap(d,this.context,this.style.wordWrapWidth):this.basicWordWrap(d,this.context,this.style.wordWrapWidth):d},advancedWordWrap:function(d,p,g){for(var x="",y=d.replace(/ +/gi," ").split(this.splitRegExp),C=y.length,P=0;PL){if(N===0){for(var j=V;j.length&&(j=j.slice(0,-1),K=p.measureText(j).width,!(K<=L)););if(!j.length)throw new Error("wordWrapWidth < a single character");var J=G.substr(j.length);B[N]=J,R+=j}var X=B[N].length?N:N+1,Y=B.slice(X).join(" ").replace(/[ \n]*$/gi,"");y.splice(P+1,0,Y),C=y.length;break}else R+=V,L-=K}x+=R.replace(/[ \n]*$/gi,"")+` -`}return x=x.replace(/[\s|\n]*$/gi,""),x},basicWordWrap:function(d,p,g){for(var x="",y=d.split(this.splitRegExp),C=y.length-1,P=p.measureText(" ").width,M=0;M<=C;M++){for(var R=g,I=y[M].split(" "),L=I.length-1,B=0;B<=L;B++){var N=I[B],G=p.measureText(N).width,V=G;BR&&B>0&&(x+=` -`,R=g),x+=N,B0&&(G+=M.lineSpacing*V),g.rtl)N=L-N-R.left-R.right;else if(g.align==="right")N+=I-M.lineWidths[V];else if(g.align==="center")N+=(I-M.lineWidths[V])/2;else if(g.align==="justify"){var K=.85;if(M.lineWidths[V]/M.width>=K){var j=M.width-M.lineWidths[V],J=p.measureText(" ").width,X=P[V].trim(),Y=X.split(" ");j+=(P[V].length-X.length)*J;for(var b=Math.floor(j/J),z=0;b>0;)Y[z]+=" ",z=(z+1)%(Y.length-1||1),--b;P[V]=Y.join(" ")}}if(this.autoRound&&(N=Math.round(N),G=Math.round(G)),g.strokeThickness&&(g.syncShadow(p,g.shadowStroke),p.strokeText(P[V],N,G)),g.color){g.syncShadow(p,g.shadowFill);var W=this.letterSpacing;if(W!==0)for(var H=0,Z=P[V].split(""),Q=0;Q{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){a.width===0||a.height===0||(v.addToRenderList(a),t.batchSprite(a,a.frame,v,o))};c.exports=m},71259:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(25305),v=t(44603),o=t(23568),r=t(50171);v.register("text",function(n,e){n===void 0&&(n={});var i=o(n,"text",""),h=o(n,"style",null),s=o(n,"padding",null);s!==null&&(h.padding=s);var l=new r(this.scene,0,0,i,h);return e!==void 0&&(n.add=e),a(this.scene,l,n),l.autoRound=o(n,"autoRound",!0),l.resolution=o(n,"resolution",1),l})},68005:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(50171),v=t(39429);v.register("text",function(o,r,n,e){return this.displayList.add(new a(this.scene,o,r,n,e))})},61771:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(34397),o=t(79724),c.exports={renderWebGL:v,renderCanvas:o}},35762:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(23568),o=t(35154),r=t(79557),n={fontFamily:["fontFamily","Courier"],fontSize:["fontSize","16px"],fontStyle:["fontStyle",""],backgroundColor:["backgroundColor",null],color:["color","#fff"],stroke:["stroke","#fff"],strokeThickness:["strokeThickness",0],shadowOffsetX:["shadow.offsetX",0],shadowOffsetY:["shadow.offsetY",0],shadowColor:["shadow.color","#000"],shadowBlur:["shadow.blur",0],shadowStroke:["shadow.stroke",!1],shadowFill:["shadow.fill",!1],align:["align","left"],maxLines:["maxLines",0],fixedWidth:["fixedWidth",0],fixedHeight:["fixedHeight",0],resolution:["resolution",0],rtl:["rtl",!1],testString:["testString","|MÉqgy"],baselineX:["baselineX",1.2],baselineY:["baselineY",1.4],wordWrapWidth:["wordWrap.width",null],wordWrapCallback:["wordWrap.callback",null],wordWrapCallbackScope:["wordWrap.callbackScope",null],wordWrapUseAdvanced:["wordWrap.useAdvancedWrap",!1]},e=new a({initialize:function(h,s){this.parent=h,this.fontFamily,this.fontSize,this.fontStyle,this.backgroundColor,this.color,this.stroke,this.strokeThickness,this.shadowOffsetX,this.shadowOffsetY,this.shadowColor,this.shadowBlur,this.shadowStroke,this.shadowFill,this.align,this.maxLines,this.fixedWidth,this.fixedHeight,this.resolution,this.rtl,this.testString,this.baselineX,this.baselineY,this.wordWrapWidth,this.wordWrapCallback,this.wordWrapCallbackScope,this.wordWrapUseAdvanced,this._font,this.setStyle(s,!1,!0)},setStyle:function(i,h,s){h===void 0&&(h=!0),s===void 0&&(s=!1),i&&i.hasOwnProperty("fontSize")&&typeof i.fontSize=="number"&&(i.fontSize=i.fontSize.toString()+"px");for(var l in n){var f=s?n[l][1]:this[l];l==="wordWrapCallback"||l==="wordWrapCallbackScope"?this[l]=o(i,n[l][0],f):this[l]=v(i,n[l][0],f)}var u=o(i,"font",null);u!==null&&this.setFont(u,!1),this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim();var d=o(i,"fill",null);d!==null&&(this.color=d);var p=o(i,"metrics",!1);return p?this.metrics={ascent:o(p,"ascent",0),descent:o(p,"descent",0),fontSize:o(p,"fontSize",0)}:(h||!this.metrics)&&(this.metrics=r(this)),h?this.parent.updateText():this.parent},syncFont:function(i,h){h.font=this._font},syncStyle:function(i,h){h.textBaseline="alphabetic",h.fillStyle=this.color,h.strokeStyle=this.stroke,h.lineWidth=this.strokeThickness,h.lineCap="round",h.lineJoin="round"},syncShadow:function(i,h){h?(i.shadowOffsetX=this.shadowOffsetX,i.shadowOffsetY=this.shadowOffsetY,i.shadowColor=this.shadowColor,i.shadowBlur=this.shadowBlur):(i.shadowOffsetX=0,i.shadowOffsetY=0,i.shadowColor=0,i.shadowBlur=0)},update:function(i){return i&&(this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim(),this.metrics=r(this)),this.parent.updateText()},setFont:function(i,h){h===void 0&&(h=!0);var s=i,l="",f="";if(typeof i!="string")s=o(i,"fontFamily","Courier"),l=o(i,"fontSize","16px"),f=o(i,"fontStyle","");else{var u=i.split(" "),d=0;f=u.length>2?u[d++]:"",l=u[d++]||"16px",s=u[d++]||"Courier"}return(s!==this.fontFamily||l!==this.fontSize||f!==this.fontStyle)&&(this.fontFamily=s,this.fontSize=l,this.fontStyle=f,h&&this.update(!0)),this.parent},setFontFamily:function(i){return this.fontFamily!==i&&(this.fontFamily=i,this.update(!0)),this.parent},setFontStyle:function(i){return this.fontStyle!==i&&(this.fontStyle=i,this.update(!0)),this.parent},setFontSize:function(i){return typeof i=="number"&&(i=i.toString()+"px"),this.fontSize!==i&&(this.fontSize=i,this.update(!0)),this.parent},setTestString:function(i){return this.testString=i,this.update(!0)},setFixedSize:function(i,h){return this.fixedWidth=i,this.fixedHeight=h,i&&(this.parent.width=i),h&&(this.parent.height=h),this.update(!1)},setBackgroundColor:function(i){return this.backgroundColor=i,this.update(!1)},setFill:function(i){return this.color=i,this.update(!1)},setColor:function(i){return this.color=i,this.update(!1)},setResolution:function(i){return this.resolution=i,this.update(!1)},setStroke:function(i,h){return h===void 0&&(h=this.strokeThickness),i===void 0&&this.strokeThickness!==0?(this.strokeThickness=0,this.update(!0)):(this.stroke!==i||this.strokeThickness!==h)&&(this.stroke=i,this.strokeThickness=h,this.update(!0)),this.parent},setShadow:function(i,h,s,l,f,u){return i===void 0&&(i=0),h===void 0&&(h=0),s===void 0&&(s="#000"),l===void 0&&(l=0),f===void 0&&(f=!1),u===void 0&&(u=!0),this.shadowOffsetX=i,this.shadowOffsetY=h,this.shadowColor=s,this.shadowBlur=l,this.shadowStroke=f,this.shadowFill=u,this.update(!1)},setShadowOffset:function(i,h){return i===void 0&&(i=0),h===void 0&&(h=i),this.shadowOffsetX=i,this.shadowOffsetY=h,this.update(!1)},setShadowColor:function(i){return i===void 0&&(i="#000"),this.shadowColor=i,this.update(!1)},setShadowBlur:function(i){return i===void 0&&(i=0),this.shadowBlur=i,this.update(!1)},setShadowStroke:function(i){return this.shadowStroke=i,this.update(!1)},setShadowFill:function(i){return this.shadowFill=i,this.update(!1)},setWordWrapWidth:function(i,h){return h===void 0&&(h=!1),this.wordWrapWidth=i,this.wordWrapUseAdvanced=h,this.update(!1)},setWordWrapCallback:function(i,h){return h===void 0&&(h=null),this.wordWrapCallback=i,this.wordWrapCallbackScope=h,this.update(!1)},setAlign:function(i){return i===void 0&&(i="left"),this.align=i,this.update(!1)},setMaxLines:function(i){return i===void 0&&(i=0),this.maxLines=i,this.update(!1)},getTextMetrics:function(){var i=this.metrics;return{ascent:i.ascent,descent:i.descent,fontSize:i.fontSize}},toJSON:function(){var i={};for(var h in n)i[h]=this[h];return i.metrics=this.getTextMetrics(),i},destroy:function(){this.parent=void 0}});c.exports=e},34397:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(70554),v=function(o,r,n,e){if(!(r.width===0||r.height===0)){n.addToRenderList(r);var i=r.frame,h=i.width,s=i.height,l=a.getTintAppendFloatAlpha,f=o.pipelines.set(r.pipeline,r),u=f.setTexture2D(i.glTexture,r);f.batchTexture(r,i.glTexture,h,s,r.x,r.y,h/r.style.resolution,s/r.style.resolution,r.scaleX,r.scaleY,r.rotation,r.flipX,r.flipY,r.scrollFactorX,r.scrollFactorY,r.displayOriginX,r.displayOriginY,0,0,h,s,l(r.tintTopLeft,n.alpha*r._alphaTL),l(r.tintTopRight,n.alpha*r._alphaTR),l(r.tintBottomLeft,n.alpha*r._alphaBL),l(r.tintBottomRight,n.alpha*r._alphaBR),r.tintFill,0,0,n,e,!1,u)}};c.exports=v},20839:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(27919),v=t(83419),o=t(31401),r=t(95643),n=t(98439),e=t(68703),i=t(56295),h=t(45650),s=t(26099),l=8,f=new v({Extends:r,Mixins:[o.Alpha,o.BlendMode,o.ComputedSize,o.Crop,o.Depth,o.Flip,o.GetBounds,o.Mask,o.Origin,o.Pipeline,o.PostPipeline,o.ScrollFactor,o.Tint,o.Transform,o.Visible,i],initialize:function(d,p,g,x,y,C,P){var M=d.sys.renderer;r.call(this,d,"TileSprite");var R=d.sys.textures.get(C),I=R.get(P);I.source.compressionAlgorithm&&(console.warn("TileSprite cannot use compressed texture"),R=d.sys.textures.get("__MISSING"),I=R.get()),R.type==="DynamicTexture"&&(console.warn("TileSprite cannot use Dynamic Texture"),R=d.sys.textures.get("__MISSING"),I=R.get()),!x||!y?(x=I.width,y=I.height):(x=Math.floor(x),y=Math.floor(y)),this._tilePosition=new s,this._tileScale=new s(1,1),this.dirty=!1,this.renderer=M,this.canvas=a.create(this,x,y),this.context=this.canvas.getContext("2d",{willReadFrequently:!1}),this.displayTexture=R,this.displayFrame=I,this._crop=this.resetCropObject(),this._textureKey=h(),this.texture=d.sys.textures.addCanvas(this._textureKey,this.canvas),this.frame=this.texture.get(),this.potWidth=n(I.width),this.potHeight=n(I.height),this.fillCanvas=a.create2D(this,this.potWidth,this.potHeight),this.fillContext=this.fillCanvas.getContext("2d",{willReadFrequently:!1}),this.fillPattern=null,this.setPosition(p,g),this.setSize(x,y),this.setFrame(P),this.setOriginFromFrame(),this.initPipeline(),this.initPostPipeline(!0)},setTexture:function(u,d){return this.displayTexture=this.scene.sys.textures.get(u),this.setFrame(d)},setFrame:function(u){var d=this.displayTexture.get(u);return this.potWidth=n(d.width),this.potHeight=n(d.height),this.canvas.width=0,!d.cutWidth||!d.cutHeight?this.renderFlags&=~l:this.renderFlags|=l,this.displayFrame=d,this.dirty=!0,this.updateTileTexture(),this},setTilePosition:function(u,d){return u!==void 0&&(this.tilePositionX=u),d!==void 0&&(this.tilePositionY=d),this},setTileScale:function(u,d){return u===void 0&&(u=this.tileScaleX),d===void 0&&(d=u),this.tileScaleX=u,this.tileScaleY=d,this},updateTileTexture:function(){if(!(!this.dirty||!this.renderer)){var u=this.displayFrame;if(u.source.isRenderTexture||u.source.isGLTexture){console.warn("TileSprites can only use Image or Canvas based textures"),this.dirty=!1;return}var d=this.fillContext,p=this.fillCanvas,g=this.potWidth,x=this.potHeight;(!this.renderer||!this.renderer.gl)&&(g=u.cutWidth,x=u.cutHeight),d.clearRect(0,0,g,x),p.width=g,p.height=x,d.drawImage(u.source.image,u.cutX,u.cutY,u.cutWidth,u.cutHeight,0,0,g,x),this.renderer&&this.renderer.gl?this.fillPattern=this.renderer.canvasToTexture(p,this.fillPattern):this.fillPattern=d.createPattern(p,"repeat"),this.updateCanvas(),this.dirty=!1}},updateCanvas:function(){var u=this.canvas;if((u.width!==this.width||u.height!==this.height)&&(u.width=this.width,u.height=this.height,this.frame.setSize(this.width,this.height),this.updateDisplayOrigin(),this.dirty=!0),!this.dirty||this.renderer&&this.renderer.gl){this.dirty=!1;return}var d=this.context;this.scene.sys.game.config.antialias||e.disable(d);var p=this._tileScale.x,g=this._tileScale.y,x=this._tilePosition.x,y=this._tilePosition.y;d.clearRect(0,0,this.width,this.height),d.save(),d.scale(p,g),d.translate(-x,-y),d.fillStyle=this.fillPattern,d.fillRect(x,y,this.width/p,this.height/g),d.restore(),this.dirty=!1},preDestroy:function(){this.renderer&&this.renderer.gl&&this.renderer.deleteTexture(this.fillPattern),a.remove(this.canvas),a.remove(this.fillCanvas),this.fillPattern=null,this.fillContext=null,this.fillCanvas=null,this.displayTexture=null,this.displayFrame=null;var u=this.texture;u&&u.destroy(),this.renderer=null},tilePositionX:{get:function(){return this._tilePosition.x},set:function(u){this._tilePosition.x=u,this.dirty=!0}},tilePositionY:{get:function(){return this._tilePosition.y},set:function(u){this._tilePosition.y=u,this.dirty=!0}},tileScaleX:{get:function(){return this._tileScale.x},set:function(u){this._tileScale.x=u,this.dirty=!0}},tileScaleY:{get:function(){return this._tileScale.y},set:function(u){this._tileScale.y=u,this.dirty=!0}}});c.exports=f},46992:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){a.updateCanvas(),v.addToRenderList(a),t.batchSprite(a,a.frame,v,o)};c.exports=m},14167:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(25305),v=t(44603),o=t(23568),r=t(20839);v.register("tileSprite",function(n,e){n===void 0&&(n={});var i=o(n,"x",0),h=o(n,"y",0),s=o(n,"width",512),l=o(n,"height",512),f=o(n,"key",""),u=o(n,"frame",""),d=new r(this.scene,i,h,s,l,f,u);return e!==void 0&&(n.add=e),a(this.scene,d,n),d})},91681:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(20839),v=t(39429);v.register("tileSprite",function(o,r,n,e,i,h){return this.displayList.add(new a(this.scene,o,r,n,e,i,h))})},56295:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(18553),o=t(46992),c.exports={renderWebGL:v,renderCanvas:o}},18553:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(70554),v=function(o,r,n,e){r.updateCanvas();var i=r.width,h=r.height;if(!(i===0||h===0)){n.addToRenderList(r);var s=a.getTintAppendFloatAlpha,l=o.pipelines.set(r.pipeline,r),f=l.setTexture2D(r.fillPattern,r);l.batchTexture(r,r.fillPattern,r.displayFrame.width*r.tileScaleX,r.displayFrame.height*r.tileScaleY,r.x,r.y,i,h,r.scaleX,r.scaleY,r.rotation,r.flipX,r.flipY,r.scrollFactorX,r.scrollFactorY,r.originX*i,r.originY*h,0,0,i,h,s(r.tintTopLeft,n.alpha*r._alphaTL),s(r.tintTopRight,n.alpha*r._alphaTR),s(r.tintBottomLeft,n.alpha*r._alphaBL),s(r.tintBottomRight,n.alpha*r._alphaBR),r.tintFill,r.tilePositionX%r.displayFrame.width/r.displayFrame.width,r.tilePositionY%r.displayFrame.height/r.displayFrame.height,n,e,!1,f)}};c.exports=v},18471:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(45319),v=t(83419),o=t(31401),r=t(51708),n=t(8443),e=t(95643),i=t(36383),h=t(14463),s=t(45650),l=t(10247),f=new v({Extends:e,Mixins:[o.Alpha,o.BlendMode,o.ComputedSize,o.Depth,o.Flip,o.GetBounds,o.Mask,o.Origin,o.Pipeline,o.PostPipeline,o.ScrollFactor,o.TextureCrop,o.Tint,o.Transform,o.Visible,l],initialize:function(d,p,g,x){e.call(this,d,"Video"),this.video,this.videoTexture,this.videoTextureSource,this.snapshotTexture,this.flipY=!1,this._key=s(),this.touchLocked=!1,this.playWhenUnlocked=!1,this.frameReady=!1,this.isStalled=!1,this.failedPlayAttempts=0,this.metadata,this.retry=0,this.retryInterval=500,this._systemMuted=!1,this._codeMuted=!1,this._systemPaused=!1,this._codePaused=!1,this._callbacks={ended:this.completeHandler.bind(this),legacy:this.legacyPlayHandler.bind(this),playing:this.playingHandler.bind(this),seeked:this.seekedHandler.bind(this),seeking:this.seekingHandler.bind(this),stalled:this.stalledHandler.bind(this),suspend:this.stalledHandler.bind(this),waiting:this.stalledHandler.bind(this)},this._loadCallbackHandler=this.loadErrorHandler.bind(this),this._metadataCallbackHandler=this.metadataHandler.bind(this),this._crop=this.resetCropObject(),this.markers={},this._markerIn=0,this._markerOut=0,this._playingMarker=!1,this._lastUpdate=0,this.cacheKey="",this.isSeeking=!1,this._playCalled=!1,this._rfvCallbackId=0;var y=d.sys.game;this._device=y.device.video,this.setPosition(p,g),this.setSize(256,256),this.initPipeline(),this.initPostPipeline(!0),y.events.on(n.PAUSE,this.globalPause,this),y.events.on(n.RESUME,this.globalResume,this);var C=d.sys.sound;C&&C.on(h.GLOBAL_MUTE,this.globalMute,this),x&&this.load(x)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},load:function(u){var d=this.scene.sys.cache.video.get(u);return d?(this.cacheKey=u,this.loadHandler(d.url,d.noAudio,d.crossOrigin)):console.warn("No video in cache for key: "+u),this},changeSource:function(u,d,p,g,x){d===void 0&&(d=!0),p===void 0&&(p=!1),this.cacheKey!==u&&(this.load(u),d&&this.play(p,g,x))},getVideoKey:function(){return this.cacheKey},loadURL:function(u,d,p){d===void 0&&(d=!1);var g=this._device.getVideoURL(u);return g?(this.cacheKey="",this.loadHandler(g.url,d,p)):console.warn("No supported video format found for "+u),this},loadMediaStream:function(u,d,p){return this.loadHandler(null,d,p,u)},loadHandler:function(u,d,p,g){d||(d=!1);var x=this.video;if(x?(this.removeLoadEventHandlers(),this.stop()):(x=document.createElement("video"),x.controls=!1,x.setAttribute("playsinline","playsinline"),x.setAttribute("preload","auto"),x.setAttribute("disablePictureInPicture","true")),d?(x.muted=!0,x.defaultMuted=!0,x.setAttribute("autoplay","autoplay")):(x.muted=!1,x.defaultMuted=!1,x.removeAttribute("autoplay")),p?x.setAttribute("crossorigin",p):x.removeAttribute("crossorigin"),g)if("srcObject"in x)try{x.srcObject=g}catch(C){if(C.name!=="TypeError")throw C;x.src=URL.createObjectURL(g)}else x.src=URL.createObjectURL(g);else x.src=u;this.retry=0,this.video=x,this._playCalled=!1,x.load(),this.addLoadEventHandlers();var y=this.scene.sys.textures.get(this._key);return this.setTexture(y),this},requestVideoFrame:function(u,d){var p=this.video;if(p){var g=d.width,x=d.height,y=this.videoTexture,C=this.videoTextureSource,P=!y||C.source!==p;P?(this._codePaused=p.paused,this._codeMuted=p.muted,y?(C.source=p,C.width=g,C.height=x,y.get().setSize(g,x)):(y=this.scene.sys.textures.create(this._key,p,g,x),y.add("__BASE",0,0,0,g,x),this.setTexture(y),this.videoTexture=y,this.videoTextureSource=y.source[0],this.videoTextureSource.setFlipY(this.flipY),this.emit(r.VIDEO_TEXTURE,this,y)),this.setSizeToFrame(),this.updateDisplayOrigin()):C.update(),this.isStalled=!1,this.metadata=d;var M=d.mediaTime;P&&(this._lastUpdate=M,this.emit(r.VIDEO_CREATED,this,g,x),this.frameReady||(this.frameReady=!0,this.emit(r.VIDEO_PLAY,this))),this._playingMarker?M>=this._markerOut&&(p.loop?(p.currentTime=this._markerIn,this.emit(r.VIDEO_LOOP,this)):(this.stop(!1),this.emit(r.VIDEO_COMPLETE,this))):M-1&&p>d&&p=0&&!isNaN(p)&&p>d&&(this.markers[u]=[d,p]),this},playMarker:function(u,d){var p=this.markers[u];return p&&this.play(d,p[0],p[1]),this},removeMarker:function(u){return delete this.markers[u],this},snapshot:function(u,d){return u===void 0&&(u=this.width),d===void 0&&(d=this.height),this.snapshotArea(0,0,this.width,this.height,u,d)},snapshotArea:function(u,d,p,g,x,y){u===void 0&&(u=0),d===void 0&&(d=0),p===void 0&&(p=this.width),g===void 0&&(g=this.height),x===void 0&&(x=p),y===void 0&&(y=g);var C=this.video,P=this.snapshotTexture;return P?(P.setSize(x,y),C&&P.context.drawImage(C,u,d,p,g,0,0,x,y)):(P=this.scene.sys.textures.createCanvas(s(),x,y),this.snapshotTexture=P,C&&P.context.drawImage(C,u,d,p,g,0,0,x,y)),P.update()},saveSnapshotTexture:function(u){return this.snapshotTexture?this.scene.sys.textures.renameTexture(this.snapshotTexture.key,u):this.snapshotTexture=this.scene.sys.textures.createCanvas(u,this.width,this.height),this.snapshotTexture},playSuccess:function(){if(this._playCalled){this.addEventHandlers(),this._codePaused=!1,this.touchLocked&&(this.touchLocked=!1,this.emit(r.VIDEO_UNLOCKED,this));var u=this.scene.sys.sound;u&&u.mute&&this.setMute(!0),this._markerIn>-1&&(this.video.currentTime=this._markerIn)}},playError:function(u){var d=u.name;d==="NotAllowedError"?(this.touchLocked=!0,this.playWhenUnlocked=!0,this.failedPlayAttempts=1,this.emit(r.VIDEO_LOCKED,this)):d==="NotSupportedError"?(this.stop(!1),this.emit(r.VIDEO_UNSUPPORTED,this,u)):(this.stop(!1),this.emit(r.VIDEO_ERROR,this,u))},legacyPlayHandler:function(){var u=this.video;u&&(this.playSuccess(),u.removeEventListener("playing",this._callbacks.legacy))},playingHandler:function(){this.isStalled=!1,this.emit(r.VIDEO_PLAYING,this)},loadErrorHandler:function(u){this.stop(!1),this.emit(r.VIDEO_ERROR,this,u)},metadataHandler:function(u){this.emit(r.VIDEO_METADATA,this,u)},setSizeToFrame:function(u){u||(u=this.frame),this.width=u.realWidth,this.height=u.realHeight,this.scaleX!==1&&(this.scaleX=this.displayWidth/this.width),this.scaleY!==1&&(this.scaleY=this.displayHeight/this.height);var d=this.input;return d&&!d.customHitArea&&(d.hitArea.width=this.width,d.hitArea.height=this.height),this},stalledHandler:function(u){this.isStalled=!0,this.emit(r.VIDEO_STALLED,this,u)},completeHandler:function(){this._playCalled=!1,this.emit(r.VIDEO_COMPLETE,this)},preUpdate:function(u,d){var p=this.video;!p||!this._playCalled||this.touchLocked&&this.playWhenUnlocked&&(this.retry+=d,this.retry>=this.retryInterval&&(this.createPlayPromise(!1),this.retry=0))},seekTo:function(u){var d=this.video;if(d){var p=d.duration;if(p!==1/0&&!isNaN(p)){var g=p*u;this.setCurrentTime(g)}}return this},getCurrentTime:function(){return this.video?this.video.currentTime:0},setCurrentTime:function(u){var d=this.video;if(d){if(typeof u=="string"){var p=u[0],g=parseFloat(u.substr(1));p==="+"?u=d.currentTime+g:p==="-"&&(u=d.currentTime-g)}d.currentTime=u}return this},seekingHandler:function(){this.isSeeking=!0,this.emit(r.VIDEO_SEEKING,this)},seekedHandler:function(){this.isSeeking=!1,this.emit(r.VIDEO_SEEKED,this)},getProgress:function(){var u=this.video;if(u){var d=u.duration;if(d!==1/0&&!isNaN(d))return u.currentTime/d}return-1},getDuration:function(){return this.video?this.video.duration:0},setMute:function(u){u===void 0&&(u=!0),this._codeMuted=u;var d=this.video;return d&&(d.muted=this._systemMuted?!0:u),this},isMuted:function(){return this._codeMuted},globalMute:function(u,d){this._systemMuted=d;var p=this.video;p&&(p.muted=this._codeMuted?!0:d)},globalPause:function(){this._systemPaused=!0,this.video&&!this.video.ended&&(this.removeEventHandlers(),this.video.pause())},globalResume:function(){this._systemPaused=!1,this.video&&!this._codePaused&&!this.video.ended&&this.createPlayPromise()},setPaused:function(u){u===void 0&&(u=!0);var d=this.video;return this._codePaused=u,d&&!d.ended&&(u?d.paused||(this.removeEventHandlers(),d.pause()):u||(this._playCalled?d.paused&&!this._systemPaused&&this.createPlayPromise():this.play())),this},pause:function(){return this.setPaused(!0)},resume:function(){return this.setPaused(!1)},getVolume:function(){return this.video?this.video.volume:1},setVolume:function(u){return u===void 0&&(u=1),this.video&&(this.video.volume=a(u,0,1)),this},getPlaybackRate:function(){return this.video?this.video.playbackRate:1},setPlaybackRate:function(u){return this.video&&(this.video.playbackRate=u),this},getLoop:function(){return this.video?this.video.loop:!1},setLoop:function(u){return u===void 0&&(u=!0),this.video&&(this.video.loop=u),this},isPlaying:function(){return this.video?!(this.video.paused||this.video.ended):!1},isPaused:function(){return this.video&&this._playCalled&&this.video.paused||this._codePaused||this._systemPaused},saveTexture:function(u,d){return d===void 0&&(d=!1),this.videoTexture&&(this.scene.sys.textures.renameTexture(this._key,u),this.videoTextureSource.setFlipY(d)),this._key=u,this.flipY=d,!!this.videoTexture},stop:function(u){u===void 0&&(u=!0);var d=this.video;return d&&(this.removeEventHandlers(),d.cancelVideoFrameCallback(this._rfvCallbackId),d.pause()),this.retry=0,this._playCalled=!1,u&&this.emit(r.VIDEO_STOP,this),this},removeVideoElement:function(){var u=this.video;if(u){for(u.parentNode&&u.parentNode.removeChild(u);u.hasChildNodes();)u.removeChild(u.firstChild);u.removeAttribute("autoplay"),u.removeAttribute("src"),this.video=null}},preDestroy:function(){this.stop(!1),this.removeLoadEventHandlers(),this.removeVideoElement();var u=this.scene.sys.game.events;u.off(n.PAUSE,this.globalPause,this),u.off(n.RESUME,this.globalResume,this);var d=this.scene.sys.sound;d&&d.off(h.GLOBAL_MUTE,this.globalMute,this)}});c.exports=f},58352:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){a.videoTexture&&(v.addToRenderList(a),t.batchSprite(a,a.frame,v,o))};c.exports=m},11511:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(25305),v=t(44603),o=t(23568),r=t(18471);v.register("video",function(n,e){n===void 0&&(n={});var i=o(n,"key",null),h=new r(this.scene,0,0,i);return e!==void 0&&(n.add=e),a(this.scene,h,n),h})},89025:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(18471),v=t(39429);v.register("video",function(o,r,n){return this.displayList.add(new a(this.scene,o,r,n))})},10247:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(29849),o=t(58352),c.exports={renderWebGL:v,renderCanvas:o}},29849:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){a.videoTexture&&(v.addToRenderList(a),a.pipeline.batchSprite(a,v,o))};c.exports=m},41481:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(10312),v=t(96503),o=t(87902),r=t(83419),n=t(31401),e=t(95643),i=t(87841),h=t(37303),s=new r({Extends:e,Mixins:[n.Depth,n.GetBounds,n.Origin,n.Transform,n.ScrollFactor,n.Visible],initialize:function(f,u,d,p,g){p===void 0&&(p=1),g===void 0&&(g=p),e.call(this,f,"Zone"),this.setPosition(u,d),this.width=p,this.height=g,this.blendMode=a.NORMAL,this.updateDisplayOrigin()},displayWidth:{get:function(){return this.scaleX*this.width},set:function(l){this.scaleX=l/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(l){this.scaleY=l/this.height}},setSize:function(l,f,u){u===void 0&&(u=!0),this.width=l,this.height=f,this.updateDisplayOrigin();var d=this.input;return u&&d&&!d.customHitArea&&(d.hitArea.width=l,d.hitArea.height=f),this},setDisplaySize:function(l,f){return this.displayWidth=l,this.displayHeight=f,this},setCircleDropZone:function(l){return this.setDropZone(new v(0,0,l),o)},setRectangleDropZone:function(l,f){return this.setDropZone(new i(0,0,l,f),h)},setDropZone:function(l,f){return this.input||this.setInteractive(l,f,!0),this},setAlpha:function(){},setBlendMode:function(){},renderCanvas:function(l,f,u){u.addToRenderList(f)},renderWebGL:function(l,f,u){u.addToRenderList(f)}});c.exports=s},95261:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(44603),v=t(23568),o=t(41481);a.register("zone",function(r){var n=v(r,"x",0),e=v(r,"y",0),i=v(r,"width",1),h=v(r,"height",i);return new o(this.scene,n,e,i,h)})},84175:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(41481),v=t(39429);v.register("zone",function(o,r,n,e){return this.displayList.add(new a(this.scene,o,r,n,e))})},95166:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return t.radius>0?Math.PI*t.radius*t.radius:0};c.exports=m},96503:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(87902),o=t(26241),r=t(79124),n=t(23777),e=t(28176),i=new a({initialize:function(s,l,f){s===void 0&&(s=0),l===void 0&&(l=0),f===void 0&&(f=0),this.type=n.CIRCLE,this.x=s,this.y=l,this._radius=f,this._diameter=f*2},contains:function(h,s){return v(this,h,s)},getPoint:function(h,s){return o(this,h,s)},getPoints:function(h,s,l){return r(this,h,s,l)},getRandomPoint:function(h){return e(this,h)},setTo:function(h,s,l){return this.x=h,this.y=s,this._radius=l,this._diameter=l*2,this},setEmpty:function(){return this._radius=0,this._diameter=0,this},setPosition:function(h,s){return s===void 0&&(s=h),this.x=h,this.y=s,this},isEmpty:function(){return this._radius<=0},radius:{get:function(){return this._radius},set:function(h){this._radius=h,this._diameter=h*2}},diameter:{get:function(){return this._diameter},set:function(h){this._diameter=h,this._radius=h*.5}},left:{get:function(){return this.x-this._radius},set:function(h){this.x=h+this._radius}},right:{get:function(){return this.x+this._radius},set:function(h){this.x=h-this._radius}},top:{get:function(){return this.y-this._radius},set:function(h){this.y=h+this._radius}},bottom:{get:function(){return this.y+this._radius},set:function(h){this.y=h-this._radius}}});c.exports=i},71562:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return 2*(Math.PI*t.radius)};c.exports=m},92110:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2141),v=function(o,r,n){return n===void 0&&(n=new a),n.x=o.x+o.radius*Math.cos(r),n.y=o.y+o.radius*Math.sin(r),n};c.exports=v},42250:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(96503),v=function(o){return new a(o.x,o.y,o.radius)};c.exports=v},87902:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){if(t.radius>0&&a>=t.left&&a<=t.right&&v>=t.top&&v<=t.bottom){var o=(t.x-a)*(t.x-a),r=(t.y-v)*(t.y-v);return o+r<=t.radius*t.radius}else return!1};c.exports=m},5698:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(87902),v=function(o,r){return a(o,r.x,r.y)};c.exports=v},70588:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(87902),v=function(o,r){return a(o,r.x,r.y)&&a(o,r.right,r.y)&&a(o,r.x,r.bottom)&&a(o,r.right,r.bottom)};c.exports=v},26394:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return a.setTo(t.x,t.y,t.radius)};c.exports=m},76278:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return t.x===a.x&&t.y===a.y&&t.radius===a.radius};c.exports=m},2074:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(87841),v=function(o,r){return r===void 0&&(r=new a),r.x=o.left,r.y=o.top,r.width=o.diameter,r.height=o.diameter,r};c.exports=v},26241:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(92110),v=t(62945),o=t(36383),r=t(2141),n=function(e,i,h){h===void 0&&(h=new r);var s=v(i,0,o.PI2);return a(e,s,h)};c.exports=n},79124:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(71562),v=t(92110),o=t(62945),r=t(36383),n=function(e,i,h,s){s===void 0&&(s=[]),!i&&h>0&&(i=a(e)/h);for(var l=0;l{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){return t.x+=a,t.y+=v,t};c.exports=m},39212:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return t.x+=a.x,t.y+=a.y,t};c.exports=m},28176:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2141),v=function(o,r){r===void 0&&(r=new a);var n=2*Math.PI*Math.random(),e=Math.random()+Math.random(),i=e>1?2-e:e,h=i*Math.cos(n),s=i*Math.sin(n);return r.x=o.x+h*o.radius,r.y=o.y+s*o.radius,r};c.exports=v},88911:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(96503);a.Area=t(95166),a.Circumference=t(71562),a.CircumferencePoint=t(92110),a.Clone=t(42250),a.Contains=t(87902),a.ContainsPoint=t(5698),a.ContainsRect=t(70588),a.CopyFrom=t(26394),a.Equals=t(76278),a.GetBounds=t(2074),a.GetPoint=t(26241),a.GetPoints=t(79124),a.Offset=t(50884),a.OffsetPoint=t(39212),a.Random=t(28176),c.exports=a},23777:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6};c.exports=m},78874:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return t.isEmpty()?0:t.getMajorRadius()*t.getMinorRadius()*Math.PI};c.exports=m},92990:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){var a=t.width/2,v=t.height/2,o=Math.pow(a-v,2)/Math.pow(a+v,2);return Math.PI*(a+v)*(1+3*o/(10+Math.sqrt(4-3*o)))};c.exports=m},79522:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2141),v=function(o,r,n){n===void 0&&(n=new a);var e=o.width/2,i=o.height/2;return n.x=o.x+e*Math.cos(r),n.y=o.y+i*Math.sin(r),n};c.exports=v},58102:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(8497),v=function(o){return new a(o.x,o.y,o.width,o.height)};c.exports=v},81154:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){if(t.width<=0||t.height<=0)return!1;var o=(a-t.x)/t.width,r=(v-t.y)/t.height;return o*=o,r*=r,o+r<.25};c.exports=m},46662:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(81154),v=function(o,r){return a(o,r.x,r.y)};c.exports=v},1632:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(81154),v=function(o,r){return a(o,r.x,r.y)&&a(o,r.right,r.y)&&a(o,r.x,r.bottom)&&a(o,r.right,r.bottom)};c.exports=v},65534:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return a.setTo(t.x,t.y,t.width,t.height)};c.exports=m},8497:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(81154),o=t(90549),r=t(48320),n=t(23777),e=t(24820),i=new a({initialize:function(s,l,f,u){s===void 0&&(s=0),l===void 0&&(l=0),f===void 0&&(f=0),u===void 0&&(u=0),this.type=n.ELLIPSE,this.x=s,this.y=l,this.width=f,this.height=u},contains:function(h,s){return v(this,h,s)},getPoint:function(h,s){return o(this,h,s)},getPoints:function(h,s,l){return r(this,h,s,l)},getRandomPoint:function(h){return e(this,h)},setTo:function(h,s,l,f){return this.x=h,this.y=s,this.width=l,this.height=f,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(h,s){return s===void 0&&(s=h),this.x=h,this.y=s,this},setSize:function(h,s){return s===void 0&&(s=h),this.width=h,this.height=s,this},isEmpty:function(){return this.width<=0||this.height<=0},getMinorRadius:function(){return Math.min(this.width,this.height)/2},getMajorRadius:function(){return Math.max(this.width,this.height)/2},left:{get:function(){return this.x-this.width/2},set:function(h){this.x=h+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(h){this.x=h-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(h){this.y=h+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(h){this.y=h-this.height/2}}});c.exports=i},36146:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return t.x===a.x&&t.y===a.y&&t.width===a.width&&t.height===a.height};c.exports=m},23694:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(87841),v=function(o,r){return r===void 0&&(r=new a),r.x=o.left,r.y=o.top,r.width=o.width,r.height=o.height,r};c.exports=v},90549:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(79522),v=t(62945),o=t(36383),r=t(2141),n=function(e,i,h){h===void 0&&(h=new r);var s=v(i,0,o.PI2);return a(e,s,h)};c.exports=n},48320:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(92990),v=t(79522),o=t(62945),r=t(36383),n=function(e,i,h,s){s===void 0&&(s=[]),!i&&h>0&&(i=a(e)/h);for(var l=0;l{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){return t.x+=a,t.y+=v,t};c.exports=m},44808:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return t.x+=a.x,t.y+=a.y,t};c.exports=m},24820:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2141),v=function(o,r){r===void 0&&(r=new a);var n=Math.random()*Math.PI*2,e=Math.sqrt(Math.random());return r.x=o.x+e*Math.cos(n)*o.width/2,r.y=o.y+e*Math.sin(n)*o.height/2,r};c.exports=v},49203:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(8497);a.Area=t(78874),a.Circumference=t(92990),a.CircumferencePoint=t(79522),a.Clone=t(58102),a.Contains=t(81154),a.ContainsPoint=t(46662),a.ContainsRect=t(1632),a.CopyFrom=t(65534),a.Equals=t(36146),a.GetBounds=t(23694),a.GetPoint=t(90549),a.GetPoints=t(48320),a.Offset=t(73424),a.OffsetPoint=t(44808),a.Random=t(24820),c.exports=a},55738:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(23777),v=t(79291),o={Circle:t(88911),Ellipse:t(49203),Intersects:t(91865),Line:t(2529),Mesh:t(73090),Point:t(43711),Polygon:t(58423),Rectangle:t(93232),Triangle:t(84435)};o=v(!1,o,a),c.exports=o},2044:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(20339),v=function(o,r){return a(o.x,o.y,r.x,r.y)<=o.radius+r.radius};c.exports=v},81491:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){var v=a.width/2,o=a.height/2,r=Math.abs(t.x-a.x-v),n=Math.abs(t.y-a.y-o),e=v+t.radius,i=o+t.radius;if(r>e||n>i)return!1;if(r<=v||n<=o)return!0;var h=r-v,s=n-o,l=h*h,f=s*s,u=t.radius*t.radius;return l+f<=u};c.exports=m},63376:(c,m,t)=>{/** - * @author Florian Vazelle - * @author Geoffrey Glaive - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2141),v=t(2044),o=function(r,n,e){if(e===void 0&&(e=[]),v(r,n)){var i=r.x,h=r.y,s=r.radius,l=n.x,f=n.y,u=n.radius,d,p,g,x,y;if(h===f)y=(u*u-s*s-l*l+i*i)/(2*(i-l)),d=1,p=-2*f,g=l*l+y*y-2*l*y+f*f-u*u,x=p*p-4*d*g,x===0?e.push(new a(y,-p/(2*d))):x>0&&(e.push(new a(y,(-p+Math.sqrt(x))/(2*d))),e.push(new a(y,(-p-Math.sqrt(x))/(2*d))));else{var C=(i-l)/(h-f),P=(u*u-s*s-l*l+i*i-f*f+h*h)/(2*(h-f));d=C*C+1,p=2*h*C-2*P*C-2*i,g=i*i+h*h+P*P-s*s-2*h*P,x=p*p-4*d*g,x===0?(y=-p/(2*d),e.push(new a(y,P-y*C))):x>0&&(y=(-p+Math.sqrt(x))/(2*d),e.push(new a(y,P-y*C)),y=(-p-Math.sqrt(x))/(2*d),e.push(new a(y,P-y*C)))}}return e};c.exports=o},97439:(c,m,t)=>{/** - * @author Florian Vazelle - * @author Geoffrey Glaive - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(4042),v=t(81491),o=function(r,n,e){if(e===void 0&&(e=[]),v(r,n)){var i=n.getLineA(),h=n.getLineB(),s=n.getLineC(),l=n.getLineD();a(i,r,e),a(h,r,e),a(s,r,e),a(l,r,e)}return e};c.exports=o},4042:(c,m,t)=>{/** - * @author Florian Vazelle - * @author Geoffrey Glaive - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2141),v=t(80462),o=function(r,n,e){if(e===void 0&&(e=[]),v(r,n)){var i=r.x1,h=r.y1,s=r.x2,l=r.y2,f=n.x,u=n.y,d=n.radius,p=s-i,g=l-h,x=i-f,y=h-u,C=p*p+g*g,P=2*(p*x+g*y),M=x*x+y*y-d*d,R=P*P-4*C*M,I,L;if(R===0){var B=-P/(2*C);I=i+B*p,L=h+B*g,B>=0&&B<=1&&e.push(new a(I,L))}else if(R>0){var N=(-P-Math.sqrt(R))/(2*C);I=i+N*p,L=h+N*g,N>=0&&N<=1&&e.push(new a(I,L));var G=(-P+Math.sqrt(R))/(2*C);I=i+G*p,L=h+G*g,G>=0&&G<=1&&e.push(new a(I,L))}}return e};c.exports=o},36100:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(25836),v=function(o,r,n,e){n===void 0&&(n=!1);var i=o.x1,h=o.y1,s=o.x2,l=o.y2,f=r.x1,u=r.y1,d=r.x2,p=r.y2,g=s-i,x=l-h,y=d-f,C=p-u,P=g*C-x*y;if(P===0)return null;var M,R,I;if(n){if(M=(g*(u-h)+x*(i-f))/(y*x-C*g),R=(f+y*M-i)/g,R<0||M<0||M>1)return null;I=R}else{if(M=((f-i)*C-(u-h)*y)/P,R=((h-u)*g-(i-f)*x)/P,M<0||M>1||R<0||R>1)return null;I=M}return e===void 0&&(e=new a),e.set(i+g*I,h+x*I,I)};c.exports=v},3073:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(36100),v=t(23031),o=t(25836),r=new v,n=new o,e=function(i,h,s,l){s===void 0&&(s=!1),l===void 0&&(l=new o);var f=!1;l.set(),n.set();for(var u=h[h.length-1],d=0;d{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(25836),v=t(61369),o=t(3073),r=new a,n=function(e,i,h,s){s===void 0&&(s=new v),Array.isArray(i)||(i=[i]);var l=!1;s.set(),r.set();for(var f=0;f{/** - * @author Florian Vazelle - * @author Geoffrey Glaive - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2141),v=t(76112),o=t(92773),r=function(n,e,i){if(i===void 0&&(i=[]),o(n,e))for(var h=e.getLineA(),s=e.getLineB(),l=e.getLineC(),f=e.getLineD(),u=[new a,new a,new a,new a],d=[v(h,n,u[0]),v(s,n,u[1]),v(l,n,u[2]),v(f,n,u[3])],p=0;p<4;p++)d[p]&&i.push(u[p]);return i};c.exports=r},71147:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(61369),v=t(56362),o=t(23031),r=new o;function n(h,s,l,f,u){var d=Math.cos(h),p=Math.sin(h);r.setTo(s,l,s+d,l+p);var g=v(r,f,!0);g&&u.push(new a(g.x,g.y,h,g.w))}function e(h,s){return h.z-s.z}var i=function(h,s,l){Array.isArray(l)||(l=[l]);for(var f=[],u=[],d=0;d{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(87841),v=t(59996),o=function(r,n,e){return e===void 0&&(e=new a),v(r,n)&&(e.x=Math.max(r.x,n.x),e.y=Math.max(r.y,n.y),e.width=Math.min(r.right,n.right)-e.x,e.height=Math.min(r.bottom,n.bottom)-e.y),e};c.exports=o},52784:(c,m,t)=>{/** - * @author Florian Vazelle - * @author Geoffrey Glaive - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(60646),v=t(59996),o=function(r,n,e){if(e===void 0&&(e=[]),v(r,n)){var i=r.getLineA(),h=r.getLineB(),s=r.getLineC(),l=r.getLineD();a(i,n,e),a(h,n,e),a(s,n,e),a(l,n,e)}return e};c.exports=o},26341:(c,m,t)=>{/** - * @author Florian Vazelle - * @author Geoffrey Glaive - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(89265),v=t(60646),o=function(r,n,e){if(e===void 0&&(e=[]),a(r,n)){var i=n.getLineA(),h=n.getLineB(),s=n.getLineC();v(i,r,e),v(h,r,e),v(s,r,e)}return e};c.exports=o},38720:(c,m,t)=>{/** - * @author Florian Vazelle - * @author Geoffrey Glaive - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(4042),v=t(67636),o=function(r,n,e){if(e===void 0&&(e=[]),v(r,n)){var i=r.getLineA(),h=r.getLineB(),s=r.getLineC();a(i,n,e),a(h,n,e),a(s,n,e)}return e};c.exports=o},13882:(c,m,t)=>{/** - * @author Florian Vazelle - * @author Geoffrey Glaive - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2141),v=t(2822),o=t(76112),r=function(n,e,i){if(i===void 0&&(i=[]),v(n,e))for(var h=n.getLineA(),s=n.getLineB(),l=n.getLineC(),f=[new a,new a,new a],u=[o(h,e,f[0]),o(s,e,f[1]),o(l,e,f[2])],d=0;d<3;d++)u[d]&&i.push(f[d]);return i};c.exports=r},75636:(c,m,t)=>{/** - * @author Florian Vazelle - * @author Geoffrey Glaive - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(82944),v=t(13882),o=function(r,n,e){if(e===void 0&&(e=[]),a(r,n)){var i=n.getLineA(),h=n.getLineB(),s=n.getLineC();v(r,i,e),v(r,h,e),v(r,s,e)}return e};c.exports=o},80462:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(87902),v=t(2141),o=new v,r=function(n,e,i){if(i===void 0&&(i=o),a(e,n.x1,n.y1))return i.x=n.x1,i.y=n.y1,!0;if(a(e,n.x2,n.y2))return i.x=n.x2,i.y=n.y2,!0;var h=n.x2-n.x1,s=n.y2-n.y1,l=e.x-n.x1,f=e.y-n.y1,u=h*h+s*s,d=h,p=s;if(u>0){var g=(l*h+f*s)/u;d*=g,p*=g}i.x=n.x1+d,i.y=n.y1+p;var x=d*d+p*p;return x<=u&&d*h+p*s>=0&&a(e,i.x,i.y)};c.exports=r},76112:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){var o=t.x1,r=t.y1,n=t.x2,e=t.y2,i=a.x1,h=a.y1,s=a.x2,l=a.y2;if(o===n&&r===e||i===s&&h===l)return!1;var f=(l-h)*(n-o)-(s-i)*(e-r);if(f===0)return!1;var u=((s-i)*(r-h)-(l-h)*(o-i))/f,d=((n-o)*(r-h)-(e-r)*(o-i))/f;return u<0||u>1||d<0||d>1?!1:(v&&(v.x=o+u*(n-o),v.y=r+u*(e-r)),!0)};c.exports=m},92773:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){var v=t.x1,o=t.y1,r=t.x2,n=t.y2,e=a.x,i=a.y,h=a.right,s=a.bottom,l=0;if(v>=e&&v<=h&&o>=i&&o<=s||r>=e&&r<=h&&n>=i&&n<=s)return!0;if(v=e){if(l=o+(n-o)*(e-v)/(r-v),l>i&&l<=s)return!0}else if(v>h&&r<=h&&(l=o+(n-o)*(h-v)/(r-v),l>=i&&l<=s))return!0;if(o=i){if(l=v+(r-v)*(i-o)/(n-o),l>=e&&l<=h)return!0}else if(o>s&&n<=s&&(l=v+(r-v)*(s-o)/(n-o),l>=e&&l<=h))return!0;return!1};c.exports=m},16204:c=>{/** - * @author Richard Davey - * @author Florian Mertens - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){v===void 0&&(v=1);var o=a.x1,r=a.y1,n=a.x2,e=a.y2,i=t.x,h=t.y,s=(n-o)*(n-o)+(e-r)*(e-r);if(s===0)return!1;var l=((i-o)*(n-o)+(h-r)*(e-r))/s;if(l<0)return Math.sqrt((o-i)*(o-i)+(r-h)*(r-h))<=v;if(l>=0&&l<=1){var f=((r-h)*(n-o)-(o-i)*(e-r))/s;return Math.abs(f)*Math.sqrt(s)<=v}else return Math.sqrt((n-i)*(n-i)+(e-h)*(e-h))<=v};c.exports=m},14199:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(16204),v=function(o,r){if(!a(o,r))return!1;var n=Math.min(r.x1,r.x2),e=Math.max(r.x1,r.x2),i=Math.min(r.y1,r.y2),h=Math.max(r.y1,r.y2);return o.x>=n&&o.x<=e&&o.y>=i&&o.y<=h};c.exports=v},59996:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return t.width<=0||t.height<=0||a.width<=0||a.height<=0?!1:!(t.righta.right||t.y>a.bottom)};c.exports=m},89265:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(76112),v=t(37303),o=t(48653),r=t(77493),n=function(e,i){if(i.left>e.right||i.righte.bottom||i.bottom0};c.exports=n},84411:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o,r,n){return n===void 0&&(n=0),!(a>t.right+n||vt.bottom+n||r{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(80462),v=t(10690),o=function(r,n){return r.left>n.right||r.rightn.bottom||r.bottom{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(76112),v=function(o,r){return!!(o.contains(r.x1,r.y1)||o.contains(r.x2,r.y2)||a(o.getLineA(),r)||a(o.getLineB(),r)||a(o.getLineC(),r))};c.exports=v},82944:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(48653),v=t(71694),o=t(76112),r=function(n,e){if(n.left>e.right||n.righte.bottom||n.bottom0||(d=v(e),p=a(n,d,!0),p.length>0)};c.exports=r},91865:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={CircleToCircle:t(2044),CircleToRectangle:t(81491),GetCircleToCircle:t(63376),GetCircleToRectangle:t(97439),GetLineToCircle:t(4042),GetLineToLine:t(36100),GetLineToPoints:t(3073),GetLineToPolygon:t(56362),GetLineToRectangle:t(60646),GetRaysFromPointToPolygon:t(71147),GetRectangleIntersection:t(68389),GetRectangleToRectangle:t(52784),GetRectangleToTriangle:t(26341),GetTriangleToCircle:t(38720),GetTriangleToLine:t(13882),GetTriangleToTriangle:t(75636),LineToCircle:t(80462),LineToLine:t(76112),LineToRectangle:t(92773),PointToLine:t(16204),PointToLineSegment:t(14199),RectangleToRectangle:t(59996),RectangleToTriangle:t(89265),RectangleToValues:t(84411),TriangleToCircle:t(67636),TriangleToLine:t(2822),TriangleToTriangle:t(82944)}},91938:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return Math.atan2(t.y2-t.y1,t.x2-t.x1)};c.exports=m},84993:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){a===void 0&&(a=1),v===void 0&&(v=[]);var o=Math.round(t.x1),r=Math.round(t.y1),n=Math.round(t.x2),e=Math.round(t.y2),i=Math.abs(n-o),h=Math.abs(e-r),s=o-h&&(f-=h,o+=s),d{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){var o=a-(t.x1+t.x2)/2,r=v-(t.y1+t.y2)/2;return t.x1+=o,t.y1+=r,t.x2+=o,t.y2+=r,t};c.exports=m},31116:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(23031),v=function(o){return new a(o.x1,o.y1,o.x2,o.y2)};c.exports=v},59944:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return a.setTo(t.x1,t.y1,t.x2,t.y2)};c.exports=m},59220:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return t.x1===a.x1&&t.y1===a.y1&&t.x2===a.x2&&t.y2===a.y2};c.exports=m},78177:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(35001),v=function(o,r,n){n===void 0&&(n=r);var e=a(o),i=o.x2-o.x1,h=o.y2-o.y1;return r&&(o.x1=o.x1-i/e*r,o.y1=o.y1-h/e*r),n&&(o.x2=o.x2+i/e*n,o.y2=o.y2+h/e*n),o};c.exports=v},26708:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(52816),v=t(6113),o=t(2141),r=function(n,e,i,h,s){h===void 0&&(h=0),s===void 0&&(s=[]);var l=[],f=n.x1,u=n.y1,d=n.x2-f,p=n.y2-u,g=v(e,s),x,y,C=i-1;for(x=0;x0){var P=l[0],M=[P];for(x=1;x=h&&(M.push(R),P=R)}var I=l[l.length-1];return a(P,I){/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2141),v=function(o,r){return r===void 0&&(r=new a),r.x=(o.x1+o.x2)/2,r.y=(o.y1+o.y2)/2,r};c.exports=v},99569:(c,m,t)=>{/** - * @author Richard Davey - * @author Florian Mertens - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2141),v=function(o,r,n){n===void 0&&(n=new a);var e=o.x1,i=o.y1,h=o.x2,s=o.y2,l=(h-e)*(h-e)+(s-i)*(s-i);if(l===0)return n;var f=((r.x-e)*(h-e)+(r.y-i)*(s-i))/l;return n.x=e+f*(h-e),n.y=i+f*(s-i),n};c.exports=v},34638:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(36383),v=t(91938),o=t(2141),r=function(n,e){e===void 0&&(e=new o);var i=v(n)-a.TAU;return e.x=Math.cos(i),e.y=Math.sin(i),e};c.exports=r},13151:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2141),v=function(o,r,n){return n===void 0&&(n=new a),n.x=o.x1+(o.x2-o.x1)*r,n.y=o.y1+(o.y2-o.y1)*r,n};c.exports=v},15258:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(35001),v=t(2141),o=function(r,n,e,i){i===void 0&&(i=[]),!n&&e>0&&(n=a(r)/e);for(var h=r.x1,s=r.y1,l=r.x2,f=r.y2,u=0;u{/** - * @author Richard Davey - * @author Florian Mertens - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){var v=t.x1,o=t.y1,r=t.x2,n=t.y2,e=(r-v)*(r-v)+(n-o)*(n-o);if(e===0)return!1;var i=((o-a.y)*(r-v)-(v-a.x)*(n-o))/e;return Math.abs(i)*Math.sqrt(e)};c.exports=m},98770:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return Math.abs(t.y1-t.y2)};c.exports=m},35001:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))};c.exports=m},23031:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(13151),o=t(15258),r=t(23777),n=t(65822),e=t(26099),i=new a({initialize:function(s,l,f,u){s===void 0&&(s=0),l===void 0&&(l=0),f===void 0&&(f=0),u===void 0&&(u=0),this.type=r.LINE,this.x1=s,this.y1=l,this.x2=f,this.y2=u},getPoint:function(h,s){return v(this,h,s)},getPoints:function(h,s,l){return o(this,h,s,l)},getRandomPoint:function(h){return n(this,h)},setTo:function(h,s,l,f){return h===void 0&&(h=0),s===void 0&&(s=0),l===void 0&&(l=0),f===void 0&&(f=0),this.x1=h,this.y1=s,this.x2=l,this.y2=f,this},setFromObjects:function(h,s){return this.x1=h.x,this.y1=h.y,this.x2=s.x,this.y2=s.y,this},getPointA:function(h){return h===void 0&&(h=new e),h.set(this.x1,this.y1),h},getPointB:function(h){return h===void 0&&(h=new e),h.set(this.x2,this.y2),h},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(h){this.x1<=this.x2?this.x1=h:this.x2=h}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(h){this.x1>this.x2?this.x1=h:this.x2=h}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(h){this.y1<=this.y2?this.y1=h:this.y2=h}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(h){this.y1>this.y2?this.y1=h:this.y2=h}}});c.exports=i},64795:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(36383),v=t(15994),o=t(91938),r=function(n){var e=o(n)-a.TAU;return v(e,-Math.PI,Math.PI)};c.exports=r},52616:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(36383),v=t(91938),o=function(r){return Math.cos(v(r)-a.TAU)};c.exports=o},87231:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(36383),v=t(91938),o=function(r){return Math.sin(v(r)-a.TAU)};c.exports=o},89662:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){return t.x1+=a,t.y1+=v,t.x2+=a,t.y2+=v,t};c.exports=m},71165:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return-((t.x2-t.x1)/(t.y2-t.y1))};c.exports=m},65822:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2141),v=function(o,r){r===void 0&&(r=new a);var n=Math.random();return r.x=o.x1+n*(o.x2-o.x1),r.y=o.y1+n*(o.y2-o.y1),r};c.exports=v},69777:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(91938),v=t(64795),o=function(r,n){return 2*v(n)-Math.PI-a(r)};c.exports=o},39706:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(64400),v=function(o,r){var n=(o.x1+o.x2)/2,e=(o.y1+o.y2)/2;return a(o,n,e,r)};c.exports=v},82585:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(64400),v=function(o,r,n){return a(o,r.x,r.y,n)};c.exports=v},64400:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){var r=Math.cos(o),n=Math.sin(o),e=t.x1-a,i=t.y1-v;return t.x1=e*r-i*n+a,t.y1=e*n+i*r+v,e=t.x2-a,i=t.y2-v,t.x2=e*r-i*n+a,t.y2=e*n+i*r+v,t};c.exports=m},62377:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o,r){return t.x1=a,t.y1=v,t.x2=a+Math.cos(o)*r,t.y2=v+Math.sin(o)*r,t};c.exports=m},71366:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return(t.y2-t.y1)/(t.x2-t.x1)};c.exports=m},10809:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return Math.abs(t.x1-t.x2)};c.exports=m},2529:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(23031);a.Angle=t(91938),a.BresenhamPoints=t(84993),a.CenterOn=t(36469),a.Clone=t(31116),a.CopyFrom=t(59944),a.Equals=t(59220),a.Extend=t(78177),a.GetEasedPoints=t(26708),a.GetMidPoint=t(32125),a.GetNearestPoint=t(99569),a.GetNormal=t(34638),a.GetPoint=t(13151),a.GetPoints=t(15258),a.GetShortestDistance=t(26408),a.Height=t(98770),a.Length=t(35001),a.NormalAngle=t(64795),a.NormalX=t(52616),a.NormalY=t(87231),a.Offset=t(89662),a.PerpSlope=t(71165),a.Random=t(65822),a.ReflectAngle=t(69777),a.Rotate=t(39706),a.RotateAroundPoint=t(82585),a.RotateAroundXY=t(64400),a.SetToAngle=t(62377),a.Slope=t(71366),a.Width=t(10809),c.exports=a},83997:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(87841),o=t(26099);function r(e,i,h,s){var l=e-h,f=i-s,u=l*l+f*f;return Math.sqrt(u)}var n=new a({initialize:function(i,h,s){this.vertex1=i,this.vertex2=h,this.vertex3=s,this.bounds=new v,this._inCenter=new o},getInCenter:function(e){e===void 0&&(e=!0);var i=this.vertex1,h=this.vertex2,s=this.vertex3,l,f,u,d,p,g;e?(l=i.x,f=i.y,u=h.x,d=h.y,p=s.x,g=s.y):(l=i.vx,f=i.vy,u=h.vx,d=h.vy,p=s.vx,g=s.vy);var x=r(p,g,u,d),y=r(l,f,p,g),C=r(u,d,l,f),P=x+y+C;return this._inCenter.set((l*x+u*y+p*C)/P,(f*x+d*y+g*C)/P)},contains:function(e,i,h){var s=this.vertex1,l=this.vertex2,f=this.vertex3,u=s.vx,d=s.vy,p=l.vx,g=l.vy,x=f.vx,y=f.vy;if(h){var C=h.a,P=h.b,M=h.c,R=h.d,I=h.e,L=h.f;u=s.vx*C+s.vy*M+I,d=s.vx*P+s.vy*R+L,p=l.vx*C+l.vy*M+I,g=l.vx*P+l.vy*R+L,x=f.vx*C+f.vy*M+I,y=f.vx*P+f.vy*R+L}var B=x-u,N=y-d,G=p-u,V=g-d,K=e-u,j=i-d,J=B*B+N*N,X=B*G+N*V,Y=B*K+N*j,b=G*G+V*V,z=G*K+V*j,W=J*b-X*X,H=W===0?0:1/W,Z=(b*Y-X*z)*H,Q=(J*z-X*Y)*H;return Z>=0&&Q>=0&&Z+Q<1},isCounterClockwise:function(e){var i=this.vertex1,h=this.vertex2,s=this.vertex3,l=(h.vx-i.vx)*(s.vy-i.vy)-(h.vy-i.vy)*(s.vx-i.vx);return e<=0?l>=0:l<0},load:function(e,i,h,s,l){return h=this.vertex1.load(e,i,h,s,l),h=this.vertex2.load(e,i,h,s,l),h=this.vertex3.load(e,i,h,s,l),h},transformCoordinatesLocal:function(e,i,h,s){return this.vertex1.transformCoordinatesLocal(e,i,h,s),this.vertex2.transformCoordinatesLocal(e,i,h,s),this.vertex3.transformCoordinatesLocal(e,i,h,s),this},updateBounds:function(){var e=this.vertex1,i=this.vertex2,h=this.vertex3,s=this.bounds;return s.x=Math.min(e.vx,i.vx,h.vx),s.y=Math.min(e.vy,i.vy,h.vy),s.width=Math.max(e.vx,i.vx,h.vx)-s.x,s.height=Math.max(e.vy,i.vy,h.vy)-s.y,this},isInView:function(e,i,h,s,l,f,u,d,p,g,x){this.update(s,l,f,u,d,p,g,x);var y=this.vertex1,C=this.vertex2,P=this.vertex3;if(y.ta<=0&&C.ta<=0&&P.ta<=0||i&&!this.isCounterClockwise(h))return!1;var M=this.bounds;M.x=Math.min(y.tx,C.tx,P.tx),M.y=Math.min(y.ty,C.ty,P.ty),M.width=Math.max(y.tx,C.tx,P.tx)-M.x,M.height=Math.max(y.ty,C.ty,P.ty)-M.y;var R=e.x+e.width,I=e.y+e.height;return M.width<=0||M.height<=0||e.width<=0||e.height<=0?!1:!(M.rightR||M.y>I)},scrollUV:function(e,i){return this.vertex1.scrollUV(e,i),this.vertex2.scrollUV(e,i),this.vertex3.scrollUV(e,i),this},scaleUV:function(e,i){return this.vertex1.scaleUV(e,i),this.vertex2.scaleUV(e,i),this.vertex3.scaleUV(e,i),this},setColor:function(e){return this.vertex1.color=e,this.vertex2.color=e,this.vertex3.color=e,this},update:function(e,i,h,s,l,f,u,d){return this.vertex1.update(i,h,s,l,f,u,d,e),this.vertex2.update(i,h,s,l,f,u,d,e),this.vertex3.update(i,h,s,l,f,u,d,e),this},translate:function(e,i){i===void 0&&(i=0);var h=this.vertex1,s=this.vertex2,l=this.vertex3;return h.x+=e,h.y+=i,s.x+=e,s.y+=i,l.x+=e,l.y+=i,this},x:{get:function(){return this.getInCenter().x},set:function(e){var i=this.getInCenter();this.translate(e-i.x,0)}},y:{get:function(){return this.getInCenter().y},set:function(e){var i=this.getInCenter();this.translate(0,e-i.y)}},alpha:{get:function(){var e=this.vertex1,i=this.vertex2,h=this.vertex3;return(e.alpha+i.alpha+h.alpha)/3},set:function(e){this.vertex1.alpha=e,this.vertex2.alpha=e,this.vertex3.alpha=e}},depth:{get:function(){var e=this.vertex1,i=this.vertex2,h=this.vertex3;return(e.vz+i.vz+h.vz)/3}},destroy:function(){this.vertex1=null,this.vertex2=null,this.vertex3=null}});c.exports=n},48803:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83997),v=t(95540),o=t(37867),r=t(25836),n=t(39318),e=new r,i=new r,h=new o,s=function(l){var f=v(l,"mesh"),u=v(l,"texture",null),d=v(l,"frame"),p=v(l,"width",1),g=v(l,"height",p),x=v(l,"widthSegments",1),y=v(l,"heightSegments",x),C=v(l,"x",0),P=v(l,"y",0),M=v(l,"z",0),R=v(l,"rotateX",0),I=v(l,"rotateY",0),L=v(l,"rotateZ",0),B=v(l,"zIsUp",!0),N=v(l,"isOrtho",f?f.dirtyCache[11]:!1),G=v(l,"colors",[16777215]),V=v(l,"alphas",[1]),K=v(l,"tile",!1),j=v(l,"flipY",!1),J=v(l,"width",null),X={faces:[],verts:[]};e.set(C,P,M),i.set(R,I,L),h.fromRotationXYTranslation(i,e,B);var Y;if(!u&&f)u=f.texture,d||(Y=f.frame);else if(f&&typeof u=="string")u=f.scene.sys.textures.get(u);else if(!u)return X;Y||(Y=u.get(d)),!J&&N&&u&&f&&(p=Y.width/f.height,g=Y.height/f.height);var b=p/2,z=g/2,W=Math.floor(x),H=Math.floor(y),Z=W+1,Q=H+1,k=p/W,et=g/H,st=[],rt=[],ot,ft,at=0,vt=1,At=0,Et=1;Y&&(at=Y.u0,vt=Y.u1,j?(At=Y.v1,Et=Y.v0):(At=Y.v0,Et=Y.v1));var Pt=vt-at,ct=Et-At;for(ft=0;ft{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83997),v=t(37867),o=t(25836),r=t(39318),n=new o,e=new o,i=new v,h=function(s,l,f,u,d,p,g,x,y,C){f===void 0&&(f=1),u===void 0&&(u=0),d===void 0&&(d=0),p===void 0&&(p=0),g===void 0&&(g=0),x===void 0&&(x=0),y===void 0&&(y=0),C===void 0&&(C=!0);var P={faces:[],verts:[]},M=s.materials;n.set(u,d,p),e.set(g,x,y),i.fromRotationXYTranslation(e,n,C);for(var R=0;R{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83997),v=t(39318),o=function(r,n,e,i,h,s,l,f){if(i===void 0&&(i=!1),s===void 0&&(s=16777215),l===void 0&&(l=1),f===void 0&&(f=!1),r.length!==n.length&&!i){console.warn("GenerateVerts: vertices and uvs count not equal");return}var u={faces:[],vertices:[]},d,p,g,x,y,C,P,M,R,I,L,B=i?3:2,N=Array.isArray(s),G=Array.isArray(l);if(Array.isArray(e)&&e.length>0)for(d=0;d{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=!0,t="untitled",a="",v="";function o(p){var g=p.indexOf("#");return g>-1?p.substring(0,g):p}function r(p){return p.models.length===0&&p.models.push({faces:[],name:t,textureCoords:[],vertexNormals:[],vertices:[]}),a="",p.models[p.models.length-1]}function n(p,g){var x=p.length>=2?p[1]:t;g.models.push({faces:[],name:x,textureCoords:[],vertexNormals:[],vertices:[]}),a=""}function e(p){p.length===2&&(a=p[1])}function i(p,g){var x=p.length,y=x>=2?parseFloat(p[1]):0,C=x>=3?parseFloat(p[2]):0,P=x>=4?parseFloat(p[3]):0;r(g).vertices.push({x:y,y:C,z:P})}function h(p,g){var x=p.length,y=x>=2?parseFloat(p[1]):0,C=x>=3?parseFloat(p[2]):0,P=x>=4?parseFloat(p[3]):0;isNaN(y)&&(y=0),isNaN(C)&&(C=0),isNaN(P)&&(P=0),m&&(C=1-C),r(g).textureCoords.push({u:y,v:C,w:P})}function s(p,g){var x=p.length,y=x>=2?parseFloat(p[1]):0,C=x>=3?parseFloat(p[2]):0,P=x>=4?parseFloat(p[3]):0;r(g).vertexNormals.push({x:y,y:C,z:P})}function l(p,g){var x=p.length-1;if(!(x<3)){for(var y={group:a,material:v,vertices:[]},C=0;C3)){var I=0,L=0,B=0;I=parseInt(M[0],10),R>1&&M[1]!==""&&(L=parseInt(M[1],10)),R>2&&(B=parseInt(M[2],10)),I!==0&&(I<0&&(I=r(g).vertices.length+1+I),L-=1,I-=1,B-=1,y.vertices.push({textureCoordsIndex:L,vertexIndex:I,vertexNormalIndex:B}))}}r(g).faces.push(y)}}function f(p,g){p.length>=2&&g.materialLibraries.push(p[1])}function u(p){p.length>=2&&(v=p[1])}var d=function(p,g){g===void 0&&(g=!0),m=g;var x={materials:{},materialLibraries:[],models:[]};a="",v="";for(var y=p.split(` -`),C=0;C{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(37589),v=function(o){for(var r={},n=o.split(` -`),e="",i=0;i=2?Math.floor(s[2]*255):l,u=s.length>=3?Math.floor(s[3]*255):l;r[e]=a(l,f,u);break}}}}return r};c.exports=v},92570:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){var r,n;if(v===void 0&&o===void 0){var e=t.getInCenter();r=e.x,n=e.y}var i=Math.cos(a),h=Math.sin(a),s=t.vertex1,l=t.vertex2,f=t.vertex3,u=s.x-r,d=s.y-n;s.set(u*i-d*h+r,u*h+d*i+n),u=l.x-r,d=l.y-n,l.set(u*i-d*h+r,u*h+d*i+n),u=f.x-r,d=f.y-n,f.set(u*i-d*h+r,u*h+d*i+n)};c.exports=m},39318:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(70554),o=t(25836),r=new a({Extends:o,initialize:function(e,i,h,s,l,f,u,d,p,g){f===void 0&&(f=16777215),u===void 0&&(u=1),d===void 0&&(d=0),p===void 0&&(p=0),g===void 0&&(g=0),o.call(this,e,i,h),this.vx=0,this.vy=0,this.vz=0,this.nx=d,this.ny=p,this.nz=g,this.u=s,this.v=l,this.color=f,this.alpha=u,this.tx=0,this.ty=0,this.ta=0,this.tu=s,this.tv=l},setUVs:function(n,e){return this.u=n,this.v=e,this.tu=n,this.tv=e,this},scrollUV:function(n,e){return this.tu+=n,this.tv+=e,this},scaleUV:function(n,e){return this.tu=this.u*n,this.tv=this.v*e,this},transformCoordinatesLocal:function(n,e,i,h){var s=this.x,l=this.y,f=this.z,u=n.val,d=s*u[0]+l*u[4]+f*u[8]+u[12],p=s*u[1]+l*u[5]+f*u[9]+u[13],g=s*u[2]+l*u[6]+f*u[10]+u[14],x=s*u[3]+l*u[7]+f*u[11]+u[15];this.vx=d/x*e,this.vy=-(p/x)*i,h<=0?this.vz=g/x:this.vz=-(g/x)},resize:function(n,e,i,h,s,l){return this.x=n,this.y=e,this.vx=this.x*i,this.vy=-this.y*h,this.vz=0,s<.5?this.vx+=i*(.5-s):s>.5&&(this.vx-=i*(s-.5)),l<.5?this.vy+=h*(.5-l):l>.5&&(this.vy-=h*(l-.5)),this},update:function(n,e,i,h,s,l,f,u){var d=this.vx*n+this.vy*i+s,p=this.vx*e+this.vy*h+l;return f&&(d=Math.round(d),p=Math.round(p)),this.tx=d,this.ty=p,this.ta=this.alpha*u,this},load:function(n,e,i,h,s){return n[++i]=this.tx,n[++i]=this.ty,n[++i]=this.tu,n[++i]=this.tv,n[++i]=h,n[++i]=s,e[++i]=v.getTintAppendFloatAlpha(this.color,this.ta),i}});c.exports=r},73090:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a={Face:t(83997),GenerateGridVerts:t(48803),GenerateObjVerts:t(34684),GenerateVerts:t(92515),ParseObj:t(85048),ParseObjMaterial:t(61485),RotateFace:t(92570),Vertex:t(39318)};c.exports=a},96550:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return t.setTo(Math.ceil(t.x),Math.ceil(t.y))};c.exports=m},99706:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2141),v=function(o){return new a(o.x,o.y)};c.exports=v},68010:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return a.setTo(t.x,t.y)};c.exports=m},27814:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return t.x===a.x&&t.y===a.y};c.exports=m},73565:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return t.setTo(Math.floor(t.x),Math.floor(t.y))};c.exports=m},87555:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2141),v=function(o,r){if(r===void 0&&(r=new a),!Array.isArray(o))throw new Error("GetCentroid points argument must be an array");var n=o.length;if(n<1)throw new Error("GetCentroid points array must not be empty");if(n===1)r.x=o[0].x,r.y=o[0].y;else{for(var e=0;e{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)};c.exports=m},44405:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return t.x*t.x+t.y*t.y};c.exports=m},20873:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(87841),v=function(o,r){r===void 0&&(r=new a);for(var n=Number.NEGATIVE_INFINITY,e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,h=Number.POSITIVE_INFINITY,s=0;sn&&(n=l.x),l.xi&&(i=l.y),l.y{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2141),v=function(o,r,n,e){return n===void 0&&(n=0),e===void 0&&(e=new a),e.x=o.x+(r.x-o.x)*n,e.y=o.y+(r.y-o.y)*n,e};c.exports=v},55767:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return t.setTo(t.y,t.x)};c.exports=m},79432:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2141),v=function(o,r){return r===void 0&&(r=new a),r.setTo(-o.x,-o.y)};c.exports=v},2141:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(23777),o=new a({initialize:function(n,e){n===void 0&&(n=0),e===void 0&&(e=n),this.type=v.POINT,this.x=n,this.y=e},setTo:function(r,n){return r===void 0&&(r=0),n===void 0&&(n=r),this.x=r,this.y=n,this}});c.exports=o},72930:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2141),v=t(44405),o=function(r,n,e){e===void 0&&(e=new a);var i=r.x*n.x+r.y*n.y,h=i/v(n);return h!==0&&(e.x=h*n.x,e.y=h*n.y),e};c.exports=o},62880:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2141),v=function(o,r,n){n===void 0&&(n=new a);var e=o.x*r.x+o.y*r.y;return e!==0&&(n.x=e*r.x,n.y=e*r.y),n};c.exports=v},15093:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(28793),v=function(o,r){if(o.x!==0||o.y!==0){var n=a(o);o.x/=n,o.y/=n}return o.x*=r,o.y*=r,o};c.exports=v},43711:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2141);a.Ceil=t(96550),a.Clone=t(99706),a.CopyFrom=t(68010),a.Equals=t(27814),a.Floor=t(73565),a.GetCentroid=t(87555),a.GetMagnitude=t(28793),a.GetMagnitudeSq=t(44405),a.GetRectangleFromPoints=t(20873),a.Interpolate=t(26152),a.Invert=t(55767),a.Negative=t(79432),a.Project=t(72930),a.ProjectUnit=t(62880),a.SetMagnitude=t(15093),c.exports=a},12306:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(25717),v=function(o){return new a(o.points)};c.exports=v},63814:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){for(var o=!1,r=-1,n=t.points.length-1;++r{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(63814),v=function(o,r){return a(o,r.x,r.y)};c.exports=v},94811:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */function m(X,Y,b){b=b||2;var z=Y&&Y.length,W=z?Y[0]*b:X.length,H=t(X,0,W,b,!0),Z=[];if(!H||H.next===H.prev)return Z;var Q,k,et,st,rt,ot,ft;if(z&&(H=i(X,Y,H,b)),X.length>80*b){Q=et=X[0],k=st=X[1];for(var at=b;atet&&(et=rt),ot>st&&(st=ot);ft=Math.max(et-Q,st-k),ft=ft!==0?32767/ft:0}return v(H,Z,b,Q,k,ft,0),Z}function t(X,Y,b,z,W){var H,Z;if(W===J(X,Y,b,z)>0)for(H=Y;H=Y;H-=z)Z=V(H,X[H],X[H+1],Z);return Z&&P(Z,Z.next)&&(K(Z),Z=Z.next),Z}function a(X,Y){if(!X)return X;Y||(Y=X);var b=X,z;do if(z=!1,!b.steiner&&(P(b,b.next)||C(b.prev,b,b.next)===0)){if(K(b),b=Y=b.prev,b===b.next)break;z=!0}else b=b.next;while(z||b!==Y);return Y}function v(X,Y,b,z,W,H,Z){if(X){!Z&&H&&u(X,z,W,H);for(var Q=X,k,et;X.prev!==X.next;){if(k=X.prev,et=X.next,H?r(X,z,W,H):o(X)){Y.push(k.i/b|0),Y.push(X.i/b|0),Y.push(et.i/b|0),K(X),X=et.next,Q=et.next;continue}if(X=et,X===Q){Z?Z===1?(X=n(a(X),Y,b),v(X,Y,b,z,W,H,2)):Z===2&&e(X,Y,b,z,W,H):v(a(X),Y,b,z,W,H,1);break}}}}function o(X){var Y=X.prev,b=X,z=X.next;if(C(Y,b,z)>=0)return!1;for(var W=Y.x,H=b.x,Z=z.x,Q=Y.y,k=b.y,et=z.y,st=WH?W>Z?W:Z:H>Z?H:Z,ft=Q>k?Q>et?Q:et:k>et?k:et,at=z.next;at!==Y;){if(at.x>=st&&at.x<=ot&&at.y>=rt&&at.y<=ft&&x(W,Q,H,k,Z,et,at.x,at.y)&&C(at.prev,at,at.next)>=0)return!1;at=at.next}return!0}function r(X,Y,b,z){var W=X.prev,H=X,Z=X.next;if(C(W,H,Z)>=0)return!1;for(var Q=W.x,k=H.x,et=Z.x,st=W.y,rt=H.y,ot=Z.y,ft=Qk?Q>et?Q:et:k>et?k:et,At=st>rt?st>ot?st:ot:rt>ot?rt:ot,Et=p(ft,at,Y,b,z),Pt=p(vt,At,Y,b,z),ct=X.prevZ,Ct=X.nextZ;ct&&ct.z>=Et&&Ct&&Ct.z<=Pt;){if(ct.x>=ft&&ct.x<=vt&&ct.y>=at&&ct.y<=At&&ct!==W&&ct!==Z&&x(Q,st,k,rt,et,ot,ct.x,ct.y)&&C(ct.prev,ct,ct.next)>=0||(ct=ct.prevZ,Ct.x>=ft&&Ct.x<=vt&&Ct.y>=at&&Ct.y<=At&&Ct!==W&&Ct!==Z&&x(Q,st,k,rt,et,ot,Ct.x,Ct.y)&&C(Ct.prev,Ct,Ct.next)>=0))return!1;Ct=Ct.nextZ}for(;ct&&ct.z>=Et;){if(ct.x>=ft&&ct.x<=vt&&ct.y>=at&&ct.y<=At&&ct!==W&&ct!==Z&&x(Q,st,k,rt,et,ot,ct.x,ct.y)&&C(ct.prev,ct,ct.next)>=0)return!1;ct=ct.prevZ}for(;Ct&&Ct.z<=Pt;){if(Ct.x>=ft&&Ct.x<=vt&&Ct.y>=at&&Ct.y<=At&&Ct!==W&&Ct!==Z&&x(Q,st,k,rt,et,ot,Ct.x,Ct.y)&&C(Ct.prev,Ct,Ct.next)>=0)return!1;Ct=Ct.nextZ}return!0}function n(X,Y,b){var z=X;do{var W=z.prev,H=z.next.next;!P(W,H)&&M(W,z,z.next,H)&&B(W,H)&&B(H,W)&&(Y.push(W.i/b|0),Y.push(z.i/b|0),Y.push(H.i/b|0),K(z),K(z.next),z=X=H),z=z.next}while(z!==X);return a(z)}function e(X,Y,b,z,W,H){var Z=X;do{for(var Q=Z.next.next;Q!==Z.prev;){if(Z.i!==Q.i&&y(Z,Q)){var k=G(Z,Q);Z=a(Z,Z.next),k=a(k,k.next),v(Z,Y,b,z,W,H,0),v(k,Y,b,z,W,H,0);return}Q=Q.next}Z=Z.next}while(Z!==X)}function i(X,Y,b,z){var W=[],H,Z,Q,k,et;for(H=0,Z=Y.length;H=b.next.y&&b.next.y!==b.y){var Q=b.x+(W-b.y)*(b.next.x-b.x)/(b.next.y-b.y);if(Q<=z&&Q>H&&(H=Q,Z=b.x=b.x&&b.x>=et&&z!==b.x&&x(WZ.x||b.x===Z.x&&f(Z,b)))&&(Z=b,rt=ot)),b=b.next;while(b!==k);return Z}function f(X,Y){return C(X.prev,X,Y.prev)<0&&C(Y.next,X,X.next)<0}function u(X,Y,b,z){var W=X;do W.z===0&&(W.z=p(W.x,W.y,Y,b,z)),W.prevZ=W.prev,W.nextZ=W.next,W=W.next;while(W!==X);W.prevZ.nextZ=null,W.prevZ=null,d(W)}function d(X){var Y,b,z,W,H,Z,Q,k,et=1;do{for(b=X,X=null,H=null,Z=0;b;){for(Z++,z=b,Q=0,Y=0;Y0||k>0&&z;)Q!==0&&(k===0||!z||b.z<=z.z)?(W=b,b=b.nextZ,Q--):(W=z,z=z.nextZ,k--),H?H.nextZ=W:X=W,W.prevZ=H,H=W;b=z}H.nextZ=null,et*=2}while(Z>1);return X}function p(X,Y,b,z,W){return X=(X-b)*W|0,Y=(Y-z)*W|0,X=(X|X<<8)&16711935,X=(X|X<<4)&252645135,X=(X|X<<2)&858993459,X=(X|X<<1)&1431655765,Y=(Y|Y<<8)&16711935,Y=(Y|Y<<4)&252645135,Y=(Y|Y<<2)&858993459,Y=(Y|Y<<1)&1431655765,X|Y<<1}function g(X){var Y=X,b=X;do(Y.x=(X-Z)*(H-Q)&&(X-Z)*(z-Q)>=(b-Z)*(Y-Q)&&(b-Z)*(H-Q)>=(W-Z)*(z-Q)}function y(X,Y){return X.next.i!==Y.i&&X.prev.i!==Y.i&&!L(X,Y)&&(B(X,Y)&&B(Y,X)&&N(X,Y)&&(C(X.prev,X,Y.prev)||C(X,Y.prev,Y))||P(X,Y)&&C(X.prev,X,X.next)>0&&C(Y.prev,Y,Y.next)>0)}function C(X,Y,b){return(Y.y-X.y)*(b.x-Y.x)-(Y.x-X.x)*(b.y-Y.y)}function P(X,Y){return X.x===Y.x&&X.y===Y.y}function M(X,Y,b,z){var W=I(C(X,Y,b)),H=I(C(X,Y,z)),Z=I(C(b,z,X)),Q=I(C(b,z,Y));return!!(W!==H&&Z!==Q||W===0&&R(X,b,Y)||H===0&&R(X,z,Y)||Z===0&&R(b,X,z)||Q===0&&R(b,Y,z))}function R(X,Y,b){return Y.x<=Math.max(X.x,b.x)&&Y.x>=Math.min(X.x,b.x)&&Y.y<=Math.max(X.y,b.y)&&Y.y>=Math.min(X.y,b.y)}function I(X){return X>0?1:X<0?-1:0}function L(X,Y){var b=X;do{if(b.i!==X.i&&b.next.i!==X.i&&b.i!==Y.i&&b.next.i!==Y.i&&M(b,b.next,X,Y))return!0;b=b.next}while(b!==X);return!1}function B(X,Y){return C(X.prev,X,X.next)<0?C(X,Y,X.next)>=0&&C(X,X.prev,Y)>=0:C(X,Y,X.prev)<0||C(X,X.next,Y)<0}function N(X,Y){var b=X,z=!1,W=(X.x+Y.x)/2,H=(X.y+Y.y)/2;do b.y>H!=b.next.y>H&&b.next.y!==b.y&&W<(b.next.x-b.x)*(H-b.y)/(b.next.y-b.y)+b.x&&(z=!z),b=b.next;while(b!==X);return z}function G(X,Y){var b=new j(X.i,X.x,X.y),z=new j(Y.i,Y.x,Y.y),W=X.next,H=Y.prev;return X.next=Y,Y.prev=X,b.next=W,W.prev=b,z.next=b,b.prev=z,H.next=z,z.prev=H,z}function V(X,Y,b,z){var W=new j(X,Y,b);return z?(W.next=z.next,W.prev=z,z.next.prev=W,z.next=W):(W.prev=W,W.next=W),W}function K(X){X.next.prev=X.prev,X.prev.next=X.next,X.prevZ&&(X.prevZ.nextZ=X.nextZ),X.nextZ&&(X.nextZ.prevZ=X.prevZ)}function j(X,Y,b){this.i=X,this.x=Y,this.y=b,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}m.deviation=function(X,Y,b,z){var W=Y&&Y.length,H=W?Y[0]*b:X.length,Z=Math.abs(J(X,0,H,b));if(W)for(var Q=0,k=Y.length;Q0&&(z+=X[W-1].length,b.holes.push(z))}return b},c.exports=m},13829:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(87841),v=function(o,r){r===void 0&&(r=new a);for(var n=1/0,e=1/0,i=-n,h=-e,s,l=0;l{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){a===void 0&&(a=[]);for(var v=0;v{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(35001),v=t(23031),o=t(30052),r=function(n,e,i,h){h===void 0&&(h=[]);var s=n.points,l=o(n);!e&&i>0&&(e=l/i);for(var f=0;fd+C){d+=C;continue}var P=y.getPoint((u-d)/C);h.push(P);break}return h};c.exports=r},30052:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(35001),v=t(23031),o=function(r){for(var n=r.points,e=0,i=0;i{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(63814),o=t(9564),r=t(23777),n=new a({initialize:function(i){this.type=r.POLYGON,this.area=0,this.points=[],i&&this.setTo(i)},contains:function(e,i){return v(this,e,i)},setTo:function(e){if(this.area=0,this.points=[],typeof e=="string"&&(e=e.split(" ")),!Array.isArray(e))return this;for(var i,h=0;h{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return t.points.reverse(),t};c.exports=m},29524:c=>{function m(n,e){var i=n.x-e.x,h=n.y-e.y;return i*i+h*h}function t(n,e,i){var h=e.x,s=e.y,l=i.x-h,f=i.y-s;if(l!==0||f!==0){var u=((n.x-h)*l+(n.y-s)*f)/(l*l+f*f);u>1?(h=i.x,s=i.y):u>0&&(h+=l*u,s+=f*u)}return l=n.x-h,f=n.y-s,l*l+f*f}function a(n,e){for(var i=n[0],h=[i],s,l=1,f=n.length;le&&(h.push(s),i=s);return i!==s&&h.push(s),h}function v(n,e,i,h,s){for(var l=h,f,u=e+1;ul&&(f=u,l=d)}l>h&&(f-e>1&&v(n,e,f,h,s),s.push(n[f]),i-f>1&&v(n,f,i,h,s))}function o(n,e){var i=n.length-1,h=[n[0]];return v(n,0,i,e,h),h.push(n[i]),h}var r=function(n,e,i){e===void 0&&(e=1),i===void 0&&(i=!1);var h=n.points;if(h.length>2){var s=e*e;i||(h=a(h,s)),n.setTo(o(h,s))}return n};c.exports=r},5469:c=>{/** - * @author Richard Davey - * @author Igor Ognichenko - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(a,v){return a[0]=v[0],a[1]=v[1],a},t=function(a){var v,o=[],r=a.points;for(v=0;v0&&n.push(m([0,0],o[0])),v=0;v1&&n.push(m([0,0],o[o.length-1])),a.setTo(n)};c.exports=t},24709:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){for(var o=t.points,r=0;r{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(25717);a.Clone=t(12306),a.Contains=t(63814),a.ContainsPoint=t(99338),a.Earcut=t(94811),a.GetAABB=t(13829),a.GetNumberArray=t(26173),a.GetPoints=t(9564),a.Perimeter=t(30052),a.Reverse=t(8133),a.Simplify=t(29524),a.Smooth=t(5469),a.Translate=t(24709),c.exports=a},62224:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return t.width*t.height};c.exports=m},98615:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return t.x=Math.ceil(t.x),t.y=Math.ceil(t.y),t};c.exports=m},31688:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return t.x=Math.ceil(t.x),t.y=Math.ceil(t.y),t.width=Math.ceil(t.width),t.height=Math.ceil(t.height),t};c.exports=m},67502:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){return t.x=a-t.width/2,t.y=v-t.height/2,t};c.exports=m},65085:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(87841),v=function(o){return new a(o.x,o.y,o.width,o.height)};c.exports=v},37303:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){return t.width<=0||t.height<=0?!1:t.x<=a&&t.x+t.width>=a&&t.y<=v&&t.y+t.height>=v};c.exports=m},96553:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(37303),v=function(o,r){return a(o,r.x,r.y)};c.exports=v},70273:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return a.width*a.height>t.width*t.height?!1:a.x>t.x&&a.xt.x&&a.rightt.y&&a.yt.y&&a.bottom{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return a.setTo(t.x,t.y,t.width,t.height)};c.exports=m},77493:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return a===void 0&&(a=[]),a.push({x:t.x,y:t.y}),a.push({x:t.right,y:t.y}),a.push({x:t.right,y:t.bottom}),a.push({x:t.x,y:t.bottom}),a};c.exports=m},9219:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return t.x===a.x&&t.y===a.y&&t.width===a.width&&t.height===a.height};c.exports=m},53751:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(8249),v=function(o,r){var n=a(o);return n{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(8249),v=function(o,r){var n=a(o);return n>a(r)?o.setSize(r.height*n,r.height):o.setSize(r.width,r.width/n),o.setPosition(r.centerX-o.width/2,r.centerY-o.height/2)};c.exports=v},80774:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t};c.exports=m},83859:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t.width=Math.floor(t.width),t.height=Math.floor(t.height),t};c.exports=m},19217:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(87841),v=t(36383),o=function(r,n){if(n===void 0&&(n=new a),r.length===0)return n;for(var e=Number.MAX_VALUE,i=Number.MAX_VALUE,h=v.MIN_SAFE_INTEGER,s=v.MIN_SAFE_INTEGER,l,f,u,d=0;d{/** - * @author samme - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(87841),v=function(o,r,n,e,i){return i===void 0&&(i=new a),i.setTo(Math.min(o,n),Math.min(r,e),Math.abs(o-n),Math.abs(r-e))};c.exports=v},8249:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return t.height===0?NaN:t.width/t.height};c.exports=m},27165:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2141),v=function(o,r){return r===void 0&&(r=new a),r.x=o.centerX,r.y=o.centerY,r};c.exports=v},20812:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(13019),v=t(2141),o=function(r,n,e){if(e===void 0&&(e=new v),n<=0||n>=1)return e.x=r.x,e.y=r.y,e;var i=a(r)*n;return n>.5?(i-=r.width+r.height,i<=r.width?(e.x=r.right-i,e.y=r.bottom):(e.x=r.x,e.y=r.bottom-(i-r.width))):i<=r.width?(e.x=r.x+i,e.y=r.y):(e.x=r.right,e.y=r.y+(i-r.width)),e};c.exports=o},34819:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(20812),v=t(13019),o=function(r,n,e,i){i===void 0&&(i=[]),!n&&e>0&&(n=v(r)/e);for(var h=0;h{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2141),v=function(o,r){return r===void 0&&(r=new a),r.x=o.width,r.y=o.height,r};c.exports=v},86091:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(67502),v=function(o,r,n){var e=o.centerX,i=o.centerY;return o.setSize(o.width+r*2,o.height+n*2),a(o,e,i)};c.exports=v},53951:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(87841),v=t(59996),o=function(r,n,e){return e===void 0&&(e=new a),v(r,n)?(e.x=Math.max(r.x,n.x),e.y=Math.max(r.y,n.y),e.width=Math.min(r.right,n.right)-e.x,e.height=Math.min(r.bottom,n.bottom)-e.y):e.setEmpty(),e};c.exports=o},14649:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(13019),v=t(2141),o=function(r,n,e,i){if(i===void 0&&(i=[]),!n&&!e)return i;n?e=Math.round(a(r)/n):n=a(r)/e;for(var h=r.x,s=r.y,l=0,f=0;f=r.right&&(l=1,s+=h-r.right,h=r.right);break;case 1:s+=n,s>=r.bottom&&(l=2,h-=s-r.bottom,s=r.bottom);break;case 2:h-=n,h<=r.left&&(l=3,s-=r.left-h,h=r.left);break;case 3:s-=n,s<=r.top&&(l=0,s=r.top);break}return i};c.exports=o},33595:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){for(var v=t.x,o=t.right,r=t.y,n=t.bottom,e=0;e{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){var v=Math.min(t.x,a.x),o=Math.max(t.right,a.right);t.x=v,t.width=o-v;var r=Math.min(t.y,a.y),n=Math.max(t.bottom,a.bottom);return t.y=r,t.height=n-r,t};c.exports=m},92171:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){var o=Math.min(t.x,a),r=Math.max(t.right,a);t.x=o,t.width=r-o;var n=Math.min(t.y,v),e=Math.max(t.bottom,v);return t.y=n,t.height=e-n,t};c.exports=m},42981:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){return t.x+=a,t.y+=v,t};c.exports=m},46907:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return t.x+=a.x,t.y+=a.y,t};c.exports=m},60170:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return t.xa.x&&t.ya.y};c.exports=m},13019:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return 2*(t.width+t.height)};c.exports=m},85133:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2141),v=t(39506),o=function(r,n,e){e===void 0&&(e=new a),n=v(n);var i=Math.sin(n),h=Math.cos(n),s=h>0?r.width/2:r.width/-2,l=i>0?r.height/2:r.height/-2;return Math.abs(s*i){/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2141),v=function(o,r){return r===void 0&&(r=new a),r.x=o.x+Math.random()*o.width,r.y=o.y+Math.random()*o.height,r};c.exports=v},86470:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(30976),v=t(70273),o=t(2141),r=function(n,e,i){if(i===void 0&&(i=new o),v(n,e))switch(a(0,3)){case 0:i.x=n.x+Math.random()*(e.right-n.x),i.y=n.y+Math.random()*(e.top-n.y);break;case 1:i.x=e.x+Math.random()*(n.right-e.x),i.y=e.bottom+Math.random()*(n.bottom-e.bottom);break;case 2:i.x=n.x+Math.random()*(e.x-n.x),i.y=e.y+Math.random()*(n.bottom-e.y);break;case 3:i.x=e.right+Math.random()*(n.right-e.right),i.y=n.y+Math.random()*(e.bottom-n.y);break}return i};c.exports=r},87841:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(37303),o=t(20812),r=t(34819),n=t(23777),e=t(23031),i=t(26597),h=new a({initialize:function(l,f,u,d){l===void 0&&(l=0),f===void 0&&(f=0),u===void 0&&(u=0),d===void 0&&(d=0),this.type=n.RECTANGLE,this.x=l,this.y=f,this.width=u,this.height=d},contains:function(s,l){return v(this,s,l)},getPoint:function(s,l){return o(this,s,l)},getPoints:function(s,l,f){return r(this,s,l,f)},getRandomPoint:function(s){return i(this,s)},setTo:function(s,l,f,u){return this.x=s,this.y=l,this.width=f,this.height=u,this},setEmpty:function(){return this.setTo(0,0,0,0)},setPosition:function(s,l){return l===void 0&&(l=s),this.x=s,this.y=l,this},setSize:function(s,l){return l===void 0&&(l=s),this.width=s,this.height=l,this},isEmpty:function(){return this.width<=0||this.height<=0},getLineA:function(s){return s===void 0&&(s=new e),s.setTo(this.x,this.y,this.right,this.y),s},getLineB:function(s){return s===void 0&&(s=new e),s.setTo(this.right,this.y,this.right,this.bottom),s},getLineC:function(s){return s===void 0&&(s=new e),s.setTo(this.right,this.bottom,this.x,this.bottom),s},getLineD:function(s){return s===void 0&&(s=new e),s.setTo(this.x,this.bottom,this.x,this.y),s},left:{get:function(){return this.x},set:function(s){s>=this.right?this.width=0:this.width=this.right-s,this.x=s}},right:{get:function(){return this.x+this.width},set:function(s){s<=this.x?this.width=0:this.width=s-this.x}},top:{get:function(){return this.y},set:function(s){s>=this.bottom?this.height=0:this.height=this.bottom-s,this.y=s}},bottom:{get:function(){return this.y+this.height},set:function(s){s<=this.y?this.height=0:this.height=s-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(s){this.x=s-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(s){this.y=s-this.height/2}}});c.exports=h},94845:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return t.width===a.width&&t.height===a.height};c.exports=m},31730:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){return v===void 0&&(v=a),t.width*=a,t.height*=v,t};c.exports=m},36899:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(87841),v=function(o,r,n){n===void 0&&(n=new a);var e=Math.min(o.x,r.x),i=Math.min(o.y,r.y),h=Math.max(o.right,r.right)-e,s=Math.max(o.bottom,r.bottom)-i;return n.setTo(e,i,h,s)};c.exports=v},93232:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(87841);a.Area=t(62224),a.Ceil=t(98615),a.CeilAll=t(31688),a.CenterOn=t(67502),a.Clone=t(65085),a.Contains=t(37303),a.ContainsPoint=t(96553),a.ContainsRect=t(70273),a.CopyFrom=t(43459),a.Decompose=t(77493),a.Equals=t(9219),a.FitInside=t(53751),a.FitOutside=t(16088),a.Floor=t(80774),a.FloorAll=t(83859),a.FromPoints=t(19217),a.FromXY=t(9477),a.GetAspectRatio=t(8249),a.GetCenter=t(27165),a.GetPoint=t(20812),a.GetPoints=t(34819),a.GetSize=t(51313),a.Inflate=t(86091),a.Intersection=t(53951),a.MarchingAnts=t(14649),a.MergePoints=t(33595),a.MergeRect=t(20074),a.MergeXY=t(92171),a.Offset=t(42981),a.OffsetPoint=t(46907),a.Overlaps=t(60170),a.Perimeter=t(13019),a.PerimeterPoint=t(85133),a.Random=t(26597),a.RandomOutside=t(86470),a.SameDimensions=t(94845),a.Scale=t(31730),a.Union=t(36899),c.exports=a},41658:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){var a=t.x1,v=t.y1,o=t.x2,r=t.y2,n=t.x3,e=t.y3;return Math.abs(((n-a)*(r-v)-(o-a)*(e-v))/2)};c.exports=m},39208:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(16483),v=function(o,r,n){var e=n*(Math.sqrt(3)/2),i=o,h=r,s=o+n/2,l=r+e,f=o-n/2,u=r+e;return new a(i,h,s,l,f,u)};c.exports=v},39545:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(94811),v=t(16483),o=function(r,n,e,i,h){n===void 0&&(n=null),e===void 0&&(e=1),i===void 0&&(i=1),h===void 0&&(h=[]);for(var s=a(r,n),l,f,u,d,p,g,x,y,C,P=0;P{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(16483),v=function(o,r,n,e){e===void 0&&(e=n);var i=o,h=r,s=o,l=r-e,f=o+n,u=r;return new a(i,h,s,l,f,u)};c.exports=v},23707:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(97523),v=t(13584),o=function(r,n,e,i){i===void 0&&(i=a);var h=i(r),s=n-h.x,l=e-h.y;return v(r,s,l)};c.exports=o},97523:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2141),v=function(o,r){return r===void 0&&(r=new a),r.x=(o.x1+o.x2+o.x3)/3,r.y=(o.y1+o.y2+o.y3)/3,r};c.exports=v},24951:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(26099);function v(r,n,e,i){return r*i-n*e}var o=function(r,n){n===void 0&&(n=new a);var e=r.x3,i=r.y3,h=r.x1-e,s=r.y1-i,l=r.x2-e,f=r.y2-i,u=2*v(h,s,l,f),d=v(s,h*h+s*s,f,l*l+f*f),p=v(h,h*h+s*s,l,l*l+f*f);return n.x=e-d/u,n.y=i+p/u,n};c.exports=o},85614:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(96503),v=function(o,r){r===void 0&&(r=new a);var n=o.x1,e=o.y1,i=o.x2,h=o.y2,s=o.x3,l=o.y3,f=i-n,u=h-e,d=s-n,p=l-e,g=f*(n+i)+u*(e+h),x=d*(n+s)+p*(e+l),y=2*(f*(l-h)-u*(s-i)),C,P;if(Math.abs(y)<1e-6){var M=Math.min(n,i,s),R=Math.min(e,h,l);C=(Math.max(n,i,s)-M)*.5,P=(Math.max(e,h,l)-R)*.5,r.x=M+C,r.y=R+P,r.radius=Math.sqrt(C*C+P*P)}else r.x=(p*g-u*x)/y,r.y=(f*x-d*g)/y,C=r.x-n,P=r.y-e,r.radius=Math.sqrt(C*C+P*P);return r};c.exports=v},74422:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(16483),v=function(o){return new a(o.x1,o.y1,o.x2,o.y2,o.x3,o.y3)};c.exports=v},10690:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){var o=t.x3-t.x1,r=t.y3-t.y1,n=t.x2-t.x1,e=t.y2-t.y1,i=a-t.x1,h=v-t.y1,s=o*o+r*r,l=o*n+r*e,f=o*i+r*h,u=n*n+e*e,d=n*i+e*h,p=s*u-l*l,g=p===0?0:1/p,x=(u*f-l*d)*g,y=(s*d-l*f)*g;return x>=0&&y>=0&&x+y<1};c.exports=m},48653:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){v===void 0&&(v=!1),o===void 0&&(o=[]);for(var r=t.x3-t.x1,n=t.y3-t.y1,e=t.x2-t.x1,i=t.y2-t.y1,h=r*r+n*n,s=r*e+n*i,l=e*e+i*i,f=h*l-s*s,u=f===0?0:1/f,d,p,g,x,y,C,P=t.x1,M=t.y1,R=0;R=0&&p>=0&&d+p<1&&(o.push({x:a[R].x,y:a[R].y}),v)));R++);return o};c.exports=m},96006:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(10690),v=function(o,r){return a(o,r.x,r.y)};c.exports=v},71326:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return a.setTo(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)};c.exports=m},71694:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return a===void 0&&(a=[]),a.push({x:t.x1,y:t.y1}),a.push({x:t.x2,y:t.y2}),a.push({x:t.x3,y:t.y3}),a};c.exports=m},33522:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return t.x1===a.x1&&t.y1===a.y1&&t.x2===a.x2&&t.y2===a.y2&&t.x3===a.x3&&t.y3===a.y3};c.exports=m},20437:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2141),v=t(35001),o=function(r,n,e){e===void 0&&(e=new a);var i=r.getLineA(),h=r.getLineB(),s=r.getLineC();if(n<=0||n>=1)return e.x=i.x1,e.y=i.y1,e;var l=v(i),f=v(h),u=v(s),d=l+f+u,p=d*n,g=0;return pl+f?(p-=l+f,g=p/u,e.x=s.x1+(s.x2-s.x1)*g,e.y=s.y1+(s.y2-s.y1)*g):(p-=l,g=p/f,e.x=h.x1+(h.x2-h.x1)*g,e.y=h.y1+(h.y2-h.y1)*g),e};c.exports=o},80672:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(35001),v=t(2141),o=function(r,n,e,i){i===void 0&&(i=[]);var h=r.getLineA(),s=r.getLineB(),l=r.getLineC(),f=a(h),u=a(s),d=a(l),p=f+u+d;!n&&e>0&&(n=p/e);for(var g=0;gf+u?(x-=f+u,y=x/d,C.x=l.x1+(l.x2-l.x1)*y,C.y=l.y1+(l.y2-l.y1)*y):(x-=f,y=x/u,C.x=s.x1+(s.x2-s.x1)*y,C.y=s.y1+(s.y2-s.y1)*y),i.push(C)}return i};c.exports=o},39757:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2141);function v(r,n,e,i){var h=r-e,s=n-i,l=h*h+s*s;return Math.sqrt(l)}var o=function(r,n){n===void 0&&(n=new a);var e=r.x1,i=r.y1,h=r.x2,s=r.y2,l=r.x3,f=r.y3,u=v(l,f,h,s),d=v(e,i,l,f),p=v(h,s,e,i),g=u+d+p;return n.x=(e*u+h*d+l*p)/g,n.y=(i*u+s*d+f*p)/g,n};c.exports=o},13584:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){return t.x1+=a,t.y1+=v,t.x2+=a,t.y2+=v,t.x3+=a,t.y3+=v,t};c.exports=m},1376:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(35001),v=function(o){var r=o.getLineA(),n=o.getLineB(),e=o.getLineC();return a(r)+a(n)+a(e)};c.exports=v},90260:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2141),v=function(o,r){r===void 0&&(r=new a);var n=o.x2-o.x1,e=o.y2-o.y1,i=o.x3-o.x1,h=o.y3-o.y1,s=Math.random(),l=Math.random();return s+l>=1&&(s=1-s,l=1-l),r.x=o.x1+(n*s+i*l),r.y=o.y1+(e*s+h*l),r};c.exports=v},52172:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(99614),v=t(39757),o=function(r,n){var e=v(r);return a(r,e.x,e.y,n)};c.exports=o},49907:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(99614),v=function(o,r,n){return a(o,r.x,r.y,n)};c.exports=v},99614:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){var r=Math.cos(o),n=Math.sin(o),e=t.x1-a,i=t.y1-v;return t.x1=e*r-i*n+a,t.y1=e*n+i*r+v,e=t.x2-a,i=t.y2-v,t.x2=e*r-i*n+a,t.y2=e*n+i*r+v,e=t.x3-a,i=t.y3-v,t.x3=e*r-i*n+a,t.y3=e*n+i*r+v,t};c.exports=m},16483:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(10690),o=t(20437),r=t(80672),n=t(23777),e=t(23031),i=t(90260),h=new a({initialize:function(l,f,u,d,p,g){l===void 0&&(l=0),f===void 0&&(f=0),u===void 0&&(u=0),d===void 0&&(d=0),p===void 0&&(p=0),g===void 0&&(g=0),this.type=n.TRIANGLE,this.x1=l,this.y1=f,this.x2=u,this.y2=d,this.x3=p,this.y3=g},contains:function(s,l){return v(this,s,l)},getPoint:function(s,l){return o(this,s,l)},getPoints:function(s,l,f){return r(this,s,l,f)},getRandomPoint:function(s){return i(this,s)},setTo:function(s,l,f,u,d,p){return s===void 0&&(s=0),l===void 0&&(l=0),f===void 0&&(f=0),u===void 0&&(u=0),d===void 0&&(d=0),p===void 0&&(p=0),this.x1=s,this.y1=l,this.x2=f,this.y2=u,this.x3=d,this.y3=p,this},getLineA:function(s){return s===void 0&&(s=new e),s.setTo(this.x1,this.y1,this.x2,this.y2),s},getLineB:function(s){return s===void 0&&(s=new e),s.setTo(this.x2,this.y2,this.x3,this.y3),s},getLineC:function(s){return s===void 0&&(s=new e),s.setTo(this.x3,this.y3,this.x1,this.y1),s},left:{get:function(){return Math.min(this.x1,this.x2,this.x3)},set:function(s){var l=0;this.x1<=this.x2&&this.x1<=this.x3?l=this.x1-s:this.x2<=this.x1&&this.x2<=this.x3?l=this.x2-s:l=this.x3-s,this.x1-=l,this.x2-=l,this.x3-=l}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(s){var l=0;this.x1>=this.x2&&this.x1>=this.x3?l=this.x1-s:this.x2>=this.x1&&this.x2>=this.x3?l=this.x2-s:l=this.x3-s,this.x1-=l,this.x2-=l,this.x3-=l}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(s){var l=0;this.y1<=this.y2&&this.y1<=this.y3?l=this.y1-s:this.y2<=this.y1&&this.y2<=this.y3?l=this.y2-s:l=this.y3-s,this.y1-=l,this.y2-=l,this.y3-=l}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(s){var l=0;this.y1>=this.y2&&this.y1>=this.y3?l=this.y1-s:this.y2>=this.y1&&this.y2>=this.y3?l=this.y2-s:l=this.y3-s,this.y1-=l,this.y2-=l,this.y3-=l}}});c.exports=h},84435:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(16483);a.Area=t(41658),a.BuildEquilateral=t(39208),a.BuildFromPolygon=t(39545),a.BuildRight=t(90301),a.CenterOn=t(23707),a.Centroid=t(97523),a.CircumCenter=t(24951),a.CircumCircle=t(85614),a.Clone=t(74422),a.Contains=t(10690),a.ContainsArray=t(48653),a.ContainsPoint=t(96006),a.CopyFrom=t(71326),a.Decompose=t(71694),a.Equals=t(33522),a.GetPoint=t(20437),a.GetPoints=t(80672),a.InCenter=t(39757),a.Perimeter=t(1376),a.Offset=t(13584),a.Random=t(90260),a.Rotate=t(52172),a.RotateAroundPoint=t(49907),a.RotateAroundXY=t(99614),c.exports=a},74457:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){return{gameObject:t,enabled:!0,draggable:!1,dropZone:!1,cursor:!1,target:null,camera:null,hitArea:a,hitAreaCallback:v,hitAreaDebug:null,customHitArea:!1,localX:0,localY:0,dragState:0,dragStartX:0,dragStartY:0,dragStartXGlobal:0,dragStartYGlobal:0,dragX:0,dragY:0}};c.exports=m},84409:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return function(v,o,r,n){var e=t.getPixelAlpha(o,r,n.texture.key,n.frame.name);return e&&e>=a}};c.exports=m},7003:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(93301),o=t(50792),r=t(8214),n=t(8443),e=t(78970),i=t(85098),h=t(42515),s=t(36210),l=t(61340),f=t(85955),u=new a({initialize:function(p,g){this.game=p,this.scaleManager,this.canvas,this.config=g,this.enabled=!0,this.events=new o,this.isOver=!0,this.defaultCursor="",this.keyboard=g.inputKeyboard?new e(this):null,this.mouse=g.inputMouse?new i(this):null,this.touch=g.inputTouch?new s(this):null,this.pointers=[],this.pointersTotal=g.inputActivePointers,g.inputTouch&&this.pointersTotal===1&&(this.pointersTotal=2);for(var x=0;x<=this.pointersTotal;x++){var y=new h(this,x);y.smoothFactor=g.inputSmoothFactor,this.pointers.push(y)}this.mousePointer=g.inputMouse?this.pointers[0]:null,this.activePointer=this.pointers[0],this.globalTopOnly=!0,this.time=0,this._tempPoint={x:0,y:0},this._tempHitTest=[],this._tempMatrix=new l,this._tempMatrix2=new l,this._tempSkip=!1,this.mousePointerContainer=[this.mousePointer],p.events.once(n.BOOT,this.boot,this)},boot:function(){var d=this.game,p=d.events;this.canvas=d.canvas,this.scaleManager=d.scale,this.events.emit(r.MANAGER_BOOT),p.on(n.PRE_RENDER,this.preRender,this),p.once(n.DESTROY,this.destroy,this)},setCanvasOver:function(d){this.isOver=!0,this.events.emit(r.GAME_OVER,d)},setCanvasOut:function(d){this.isOver=!1,this.events.emit(r.GAME_OUT,d)},preRender:function(){var d=this.game.loop.now,p=this.game.loop.delta,g=this.game.scene.getScenes(!0,!0);this.time=d,this.events.emit(r.MANAGER_UPDATE);for(var x=0;x10&&(d=10-this.pointersTotal);for(var g=0;g{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(96503),v=t(87902),o=t(83419),r=t(93301),n=t(74457),e=t(84409),i=t(20339),h=t(8497),s=t(81154),l=t(8214),f=t(50792),u=t(95540),d=t(23777),p=t(89639),g=t(41212),x=t(37277),y=t(87841),C=t(37303),P=t(44594),M=t(16483),R=t(10690),I=new o({Extends:f,initialize:function(B){f.call(this),this.scene=B,this.systems=B.sys,this.settings=B.sys.settings,this.manager=B.sys.game.input,this.pluginEvents=new f,this.enabled=!0,this.displayList,this.cameras,p.install(this),this.mouse=this.manager.mouse,this.topOnly=!0,this.pollRate=-1,this._pollTimer=0;var N={cancelled:!1};this._eventContainer={stopPropagation:function(){N.cancelled=!0}},this._eventData=N,this.dragDistanceThreshold=0,this.dragTimeThreshold=0,this._temp=[],this._tempZones=[],this._list=[],this._pendingInsertion=[],this._pendingRemoval=[],this._draggable=[],this._drag={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._dragState=[],this._over={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._validTypes=["onDown","onUp","onOver","onOut","onMove","onDragStart","onDrag","onDragEnd","onDragEnter","onDragLeave","onDragOver","onDrop"],this._updatedThisFrame=!1,B.sys.events.once(P.BOOT,this.boot,this),B.sys.events.on(P.START,this.start,this)},boot:function(){this.cameras=this.systems.cameras,this.displayList=this.systems.displayList,this.systems.events.once(P.DESTROY,this.destroy,this),this.pluginEvents.emit(l.BOOT)},start:function(){var L=this.systems.events;L.on(P.TRANSITION_START,this.transitionIn,this),L.on(P.TRANSITION_OUT,this.transitionOut,this),L.on(P.TRANSITION_COMPLETE,this.transitionComplete,this),L.on(P.PRE_UPDATE,this.preUpdate,this),L.once(P.SHUTDOWN,this.shutdown,this),this.manager.events.on(l.GAME_OUT,this.onGameOut,this),this.manager.events.on(l.GAME_OVER,this.onGameOver,this),this.enabled=!0,this._dragState=[0,0,0,0,0,0,0,0,0,0],this.pluginEvents.emit(l.START)},onGameOver:function(L){this.isActive()&&this.emit(l.GAME_OVER,L.timeStamp,L)},onGameOut:function(L){this.isActive()&&this.emit(l.GAME_OUT,L.timeStamp,L)},preUpdate:function(){this.pluginEvents.emit(l.PRE_UPDATE);var L=this._pendingRemoval,B=this._pendingInsertion,N=L.length,G=B.length;if(!(N===0&&G===0)){for(var V=this._list,K=0;K-1&&(V.splice(J,1),this.clear(j,!0))}this._pendingRemoval.length=0,this._list=V.concat(B.splice(0))}},isActive:function(){return this.enabled&&this.scene.sys.canInput()},updatePoll:function(L,B){if(!this.isActive())return!1;if(this.pluginEvents.emit(l.UPDATE,L,B),this._updatedThisFrame)return this._updatedThisFrame=!1,!1;var N,G=this.manager,V=G.pointers,K=G.pointersTotal;for(N=0;N0)if(this._pollTimer-=B,this._pollTimer<0)this._pollTimer=this.pollRate;else return!1;var J=!1;for(N=0;N0&&(J=!0)}return J},update:function(L,B){if(!this.isActive())return!1;for(var N=B.length,G=!1,V=0;V0&&(G=!0)}return this._updatedThisFrame=!0,G},clear:function(L,B){B===void 0&&(B=!1),this.disable(L);var N=L.input;N&&(this.removeDebug(L),this.manager.resetCursor(N),N.gameObject=void 0,N.target=void 0,N.hitArea=void 0,N.hitAreaCallback=void 0,N.callbackContext=void 0,L.input=null),B||this.queueForRemoval(L);var G=this._draggable.indexOf(L);return G>-1&&this._draggable.splice(G,1),L},disable:function(L){var B=L.input;B&&(B.enabled=!1,B.dragState=0);for(var N=this._drag,G=this._over,V=this.manager,K=0,j;K-1&&N[K].splice(j,1),j=G[K].indexOf(L),j>-1&&G[K].splice(j,1);return this},enable:function(L,B,N,G){return G===void 0&&(G=!1),L.input?L.input.enabled=!0:this.setHitArea(L,B,N),L.input&&G&&!L.input.dropZone&&(L.input.dropZone=G),this},hitTestPointer:function(L){for(var B=this.cameras.getCamerasBelowPointer(L),N=0;N0)return L.camera=G,V}return L.camera=B[0],[]},processDownEvents:function(L){var B=0,N=this._temp,G=this._eventData,V=this._eventContainer;G.cancelled=!1;for(var K=!1,j=0;j0&&i(L.x,L.y,L.downX,L.downY)>=V||G>0&&B>=L.downTime+G)&&(N=!0),N)return this.setDragState(L,3),this.processDragStartList(L)},processDragStartList:function(L){if(this.getDragState(L)!==3)return 0;for(var B=this._drag[L.id],N=0;N1&&(this.sortGameObjects(N,L),this.topOnly&&N.splice(1)),this._drag[L.id]=N,this.dragDistanceThreshold===0&&this.dragTimeThreshold===0?(this.setDragState(L,3),this.processDragStartList(L)):(this.setDragState(L,2),0))},processDragMoveEvent:function(L){if(this.getDragState(L)===2&&this.processDragThresholdEvent(L,this.manager.game.loop.now),this.getDragState(L)!==4)return 0;for(var B=this._tempZones,N=this._drag[L.id],G=0;G0?(V.emit(l.GAMEOBJECT_DRAG_LEAVE,L,j),this.emit(l.DRAG_LEAVE,L,V,j),K.target=B[0],j=K.target,V.emit(l.GAMEOBJECT_DRAG_ENTER,L,j),this.emit(l.DRAG_ENTER,L,V,j)):(V.emit(l.GAMEOBJECT_DRAG_LEAVE,L,j),this.emit(l.DRAG_LEAVE,L,V,j),B[0]?(K.target=B[0],j=K.target,V.emit(l.GAMEOBJECT_DRAG_ENTER,L,j),this.emit(l.DRAG_ENTER,L,V,j)):K.target=null)}else!j&&B[0]&&(K.target=B[0],j=K.target,V.emit(l.GAMEOBJECT_DRAG_ENTER,L,j),this.emit(l.DRAG_ENTER,L,V,j));var X,Y;if(!V.parentContainer)X=L.worldX-K.dragX,Y=L.worldY-K.dragY;else{var b=L.worldX-K.dragStartXGlobal,z=L.worldY-K.dragStartYGlobal,W=V.getParentRotation(),H=b*Math.cos(W)+z*Math.sin(W),Z=z*Math.cos(W)-b*Math.sin(W);H*=1/V.parentContainer.scaleX,Z*=1/V.parentContainer.scaleY,X=H+K.dragStartX,Y=Z+K.dragStartY}V.emit(l.GAMEOBJECT_DRAG,L,X,Y),this.emit(l.DRAG,L,V,X,Y)}return N.length},processDragUpEvent:function(L){for(var B=this._drag[L.id],N=0;N0){var K=this.manager,j=this._eventData,J=this._eventContainer;j.cancelled=!1;for(var X=!1,Y=0;Y0){var V=this.manager,K=this._eventData,j=this._eventContainer;K.cancelled=!1;var J=!1;this.sortGameObjects(B,L);for(var X=0;X0){for(this.sortGameObjects(V,L),N=0;N0){for(this.sortGameObjects(K,L),N=0;N-1&&this._draggable.splice(V,1)}return this},makePixelPerfect:function(L){L===void 0&&(L=1);var B=this.systems.textures;return e(B,L)},setHitArea:function(L,B,N){if(B===void 0)return this.setHitAreaFromTexture(L);Array.isArray(L)||(L=[L]);var G=!1,V=!1,K=!1,j=!1,J=!1,X=!0;if(g(B)&&Object.keys(B).length){var Y=B,b=L.some(function(Q){return Q.hasOwnProperty("faces")});if(!b){B=u(Y,"hitArea",null),N=u(Y,"hitAreaCallback",null),J=u(Y,"pixelPerfect",!1);var z=u(Y,"alphaTolerance",1);J&&(B={},N=this.makePixelPerfect(z))}G=u(Y,"draggable",!1),V=u(Y,"dropZone",!1),K=u(Y,"cursor",!1),j=u(Y,"useHandCursor",!1),(!B||!N)&&(this.setHitAreaFromTexture(L),X=!1)}else typeof B=="function"&&!N&&(N=B,B={});for(var W=0;W{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(35154),v={},o={};o.register=function(r,n,e,i,h){v[r]={plugin:n,mapping:e,settingsKey:i,configKey:h}},o.getPlugin=function(r){return v[r]},o.install=function(r){var n=r.scene.sys,e=n.settings.input,i=n.game.config;for(var h in v){var s=v[h].plugin,l=v[h].mapping,f=v[h].settingsKey,u=v[h].configKey;a(e,f,i[u])&&(r[l]=new s(r))}},o.remove=function(r){v.hasOwnProperty(r)&&delete v[r]},c.exports=o},42515:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(31040),v=t(83419),o=t(20339),r=t(43855),n=t(47235),e=t(26099),i=t(25892),h=new v({initialize:function(l,f){this.manager=l,this.id=f,this.event,this.downElement,this.upElement,this.camera=null,this.button=0,this.buttons=0,this.position=new e,this.prevPosition=new e,this.midPoint=new e(-1,-1),this.velocity=new e,this.angle=0,this.distance=0,this.smoothFactor=0,this.motionFactor=.2,this.worldX=0,this.worldY=0,this.moveTime=0,this.downX=0,this.downY=0,this.downTime=0,this.upX=0,this.upY=0,this.upTime=0,this.primaryDown=!1,this.isDown=!1,this.wasTouch=!1,this.wasCanceled=!1,this.movementX=0,this.movementY=0,this.identifier=0,this.pointerId=null,this.active=f===0,this.locked=!1,this.deltaX=0,this.deltaY=0,this.deltaZ=0},updateWorldPoint:function(s){var l=s.getWorldPoint(this.x,this.y);return this.worldX=l.x,this.worldY=l.y,this},positionToCamera:function(s,l){return s.getWorldPoint(this.x,this.y,l)},updateMotion:function(){var s=this.position.x,l=this.position.y,f=this.midPoint.x,u=this.midPoint.y;if(!(s===f&&l===u)){var d=n(this.motionFactor,f,s),p=n(this.motionFactor,u,l);r(d,s,.1)&&(d=s),r(p,l,.1)&&(p=l),this.midPoint.set(d,p);var g=s-d,x=l-p;this.velocity.set(g,x),this.angle=a(d,p,s,l),this.distance=Math.sqrt(g*g+x*x)}},up:function(s){"buttons"in s&&(this.buttons=s.buttons),this.event=s,this.button=s.button,this.upElement=s.target,this.manager.transformPointer(this,s.pageX,s.pageY,!1),s.button===0&&(this.primaryDown=!1,this.upX=this.x,this.upY=this.y),this.buttons===0&&(this.isDown=!1,this.upTime=s.timeStamp,this.wasTouch=!1)},down:function(s){"buttons"in s&&(this.buttons=s.buttons),this.event=s,this.button=s.button,this.downElement=s.target,this.manager.transformPointer(this,s.pageX,s.pageY,!1),s.button===0&&(this.primaryDown=!0,this.downX=this.x,this.downY=this.y),i.macOS&&s.ctrlKey&&(this.buttons=2,this.primaryDown=!1),this.isDown||(this.isDown=!0,this.downTime=s.timeStamp),this.wasTouch=!1},move:function(s){"buttons"in s&&(this.buttons=s.buttons),this.event=s,this.manager.transformPointer(this,s.pageX,s.pageY,!0),this.locked&&(this.movementX=s.movementX||s.mozMovementX||s.webkitMovementX||0,this.movementY=s.movementY||s.mozMovementY||s.webkitMovementY||0),this.moveTime=s.timeStamp,this.wasTouch=!1},wheel:function(s){"buttons"in s&&(this.buttons=s.buttons),this.event=s,this.manager.transformPointer(this,s.pageX,s.pageY,!1),this.deltaX=s.deltaX,this.deltaY=s.deltaY,this.deltaZ=s.deltaZ,this.wasTouch=!1},touchstart:function(s,l){s.pointerId&&(this.pointerId=s.pointerId),this.identifier=s.identifier,this.target=s.target,this.active=!0,this.buttons=1,this.event=l,this.downElement=s.target,this.manager.transformPointer(this,s.pageX,s.pageY,!1),this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=l.timeStamp,this.isDown=!0,this.wasTouch=!0,this.wasCanceled=!1,this.updateMotion()},touchmove:function(s,l){this.event=l,this.manager.transformPointer(this,s.pageX,s.pageY,!0),this.moveTime=l.timeStamp,this.wasTouch=!0,this.updateMotion()},touchend:function(s,l){this.buttons=0,this.event=l,this.upElement=s.target,this.manager.transformPointer(this,s.pageX,s.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=l.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!1,this.active=!1,this.updateMotion()},touchcancel:function(s,l){this.buttons=0,this.event=l,this.upElement=s.target,this.manager.transformPointer(this,s.pageX,s.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=l.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!0,this.active=!1},noButtonDown:function(){return this.buttons===0},leftButtonDown:function(){return!!(this.buttons&1)},rightButtonDown:function(){return!!(this.buttons&2)},middleButtonDown:function(){return!!(this.buttons&4)},backButtonDown:function(){return!!(this.buttons&8)},forwardButtonDown:function(){return!!(this.buttons&16)},leftButtonReleased:function(){return this.button===0&&!this.isDown},rightButtonReleased:function(){return this.button===2&&!this.isDown},middleButtonReleased:function(){return this.button===1&&!this.isDown},backButtonReleased:function(){return this.button===3&&!this.isDown},forwardButtonReleased:function(){return this.button===4&&!this.isDown},getDistance:function(){return this.isDown?o(this.downX,this.downY,this.x,this.y):o(this.downX,this.downY,this.upX,this.upY)},getDistanceX:function(){return this.isDown?Math.abs(this.downX-this.x):Math.abs(this.downX-this.upX)},getDistanceY:function(){return this.isDown?Math.abs(this.downY-this.y):Math.abs(this.downY-this.upY)},getDuration:function(){return this.isDown?this.manager.time-this.downTime:this.upTime-this.downTime},getAngle:function(){return this.isDown?a(this.downX,this.downY,this.x,this.y):a(this.downX,this.downY,this.upX,this.upY)},getInterpolatedPosition:function(s,l){s===void 0&&(s=10),l===void 0&&(l=[]);for(var f=this.prevPosition.x,u=this.prevPosition.y,d=this.position.x,p=this.position.y,g=0;g{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={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};c.exports=m},7179:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="boot"},85375:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="destroy"},39843:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="dragend"},23388:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="dragenter"},16133:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="drag"},27829:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="dragleave"},53904:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="dragover"},56058:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="dragstart"},2642:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="drop"},88171:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="gameobjectdown"},36147:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="dragend"},71692:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="dragenter"},96149:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="drag"},81285:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="dragleave"},74048:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="dragover"},21322:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="dragstart"},49378:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="drop"},86754:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="gameobjectmove"},86433:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="gameobjectout"},60709:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="gameobjectover"},24081:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="pointerdown"},11172:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="pointermove"},18907:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="pointerout"},95579:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="pointerover"},35368:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="pointerup"},26972:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="wheel"},47078:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="gameobjectup"},73802:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="gameobjectwheel"},56718:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="gameout"},25936:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="gameover"},27503:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="boot"},50852:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="process"},96438:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="update"},59152:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="pointerlockchange"},47777:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="pointerdown"},27957:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="pointerdownoutside"},19444:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="pointermove"},54251:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="pointerout"},18667:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="pointerover"},27192:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="pointerup"},24652:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="pointerupoutside"},45132:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="wheel"},44512:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="preupdate"},15757:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="shutdown"},41637:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="start"},93802:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="update"},8214:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={BOOT:t(7179),DESTROY:t(85375),DRAG_END:t(39843),DRAG_ENTER:t(23388),DRAG:t(16133),DRAG_LEAVE:t(27829),DRAG_OVER:t(53904),DRAG_START:t(56058),DROP:t(2642),GAME_OUT:t(56718),GAME_OVER:t(25936),GAMEOBJECT_DOWN:t(88171),GAMEOBJECT_DRAG_END:t(36147),GAMEOBJECT_DRAG_ENTER:t(71692),GAMEOBJECT_DRAG:t(96149),GAMEOBJECT_DRAG_LEAVE:t(81285),GAMEOBJECT_DRAG_OVER:t(74048),GAMEOBJECT_DRAG_START:t(21322),GAMEOBJECT_DROP:t(49378),GAMEOBJECT_MOVE:t(86754),GAMEOBJECT_OUT:t(86433),GAMEOBJECT_OVER:t(60709),GAMEOBJECT_POINTER_DOWN:t(24081),GAMEOBJECT_POINTER_MOVE:t(11172),GAMEOBJECT_POINTER_OUT:t(18907),GAMEOBJECT_POINTER_OVER:t(95579),GAMEOBJECT_POINTER_UP:t(35368),GAMEOBJECT_POINTER_WHEEL:t(26972),GAMEOBJECT_UP:t(47078),GAMEOBJECT_WHEEL:t(73802),MANAGER_BOOT:t(27503),MANAGER_PROCESS:t(50852),MANAGER_UPDATE:t(96438),POINTER_DOWN:t(47777),POINTER_DOWN_OUTSIDE:t(27957),POINTER_MOVE:t(19444),POINTER_OUT:t(54251),POINTER_OVER:t(18667),POINTER_UP:t(27192),POINTER_UP_OUTSIDE:t(24652),POINTER_WHEEL:t(45132),POINTERLOCK_CHANGE:t(59152),PRE_UPDATE:t(44512),SHUTDOWN:t(15757),START:t(41637),UPDATE:t(93802)}},97421:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=new a({initialize:function(r,n){this.pad=r,this.events=r.events,this.index=n,this.value=0,this.threshold=.1},update:function(o){this.value=o},getValue:function(){return Math.abs(this.value){/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(92734),o=new a({initialize:function(n,e){this.pad=n,this.events=n.manager,this.index=e,this.value=0,this.threshold=1,this.pressed=!1},update:function(r){this.value=r;var n=this.pad,e=this.index;r>=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(v.BUTTON_DOWN,n,this,r),this.pad.emit(v.GAMEPAD_BUTTON_DOWN,e,r,this)):this.pressed&&(this.pressed=!1,this.events.emit(v.BUTTON_UP,n,this,r),this.pad.emit(v.GAMEPAD_BUTTON_UP,e,r,this))},destroy:function(){this.pad=null,this.events=null}});c.exports=o},99125:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(97421),v=t(28884),o=t(83419),r=t(50792),n=t(26099),e=new o({Extends:r,initialize:function(h,s){r.call(this),this.manager=h,this.pad=s,this.id=s.id,this.index=s.index;for(var l=[],f=0;f=2&&(this.leftStick.set(u[0].getValue(),u[1].getValue()),f>=4&&this.rightStick.set(u[2].getValue(),u[3].getValue()))}},destroy:function(){this.removeAllListeners(),this.manager=null,this.pad=null;var i;for(i=0;i{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(50792),o=t(92734),r=t(99125),n=t(35154),e=t(89639),i=t(8214),h=new a({Extends:v,initialize:function(l){v.call(this),this.scene=l.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=l,this.enabled=!0,this.target,this.gamepads=[],this.queue=[],this.onGamepadHandler,this._pad1,this._pad2,this._pad3,this._pad4,l.pluginEvents.once(i.BOOT,this.boot,this),l.pluginEvents.on(i.START,this.start,this)},boot:function(){var s=this.scene.sys.game,l=this.settings.input,f=s.config;this.enabled=n(l,"gamepad",f.inputGamepad)&&s.device.input.gamepads,this.target=n(l,"gamepad.target",f.inputGamepadEventTarget),this.sceneInputPlugin.pluginEvents.once(i.DESTROY,this.destroy,this)},start:function(){this.enabled&&(this.startListeners(),this.refreshPads()),this.sceneInputPlugin.pluginEvents.once(i.SHUTDOWN,this.shutdown,this)},isActive:function(){return this.enabled&&this.scene.sys.isActive()},startListeners:function(){var s=this,l=this.target,f=function(u){u.defaultPrevented||!s.isActive()||(s.refreshPads(),s.queue.push(u))};this.onGamepadHandler=f,l.addEventListener("gamepadconnected",f,!1),l.addEventListener("gamepaddisconnected",f,!1),this.sceneInputPlugin.pluginEvents.on(i.UPDATE,this.update,this)},stopListeners:function(){this.target.removeEventListener("gamepadconnected",this.onGamepadHandler),this.target.removeEventListener("gamepaddisconnected",this.onGamepadHandler),this.sceneInputPlugin.pluginEvents.off(i.UPDATE,this.update);for(var s=0;s{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SELECT:8,START:9,B:0,A:1,Y:2,X:3,LEFT_SHOULDER:4,RIGHT_SHOULDER:5}},65294:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SHARE:8,OPTIONS:9,PS:16,TOUCHBAR:17,X:0,CIRCLE:1,SQUARE:2,TRIANGLE:3,L1:4,R1:5,L2:6,R2:7,L3:10,R3:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}},90089:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.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:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={DUALSHOCK_4:t(65294),SNES_USB:t(89651),XBOX_360:t(90089)}},46008:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="down"},7629:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="up"},42206:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="connected"},86544:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="disconnected"},94784:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="down"},14325:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="up"},92734:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={BUTTON_DOWN:t(46008),BUTTON_UP:t(7629),CONNECTED:t(42206),DISCONNECTED:t(86544),GAMEPAD_BUTTON_DOWN:t(94784),GAMEPAD_BUTTON_UP:t(14325)}},48646:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={Axis:t(97421),Button:t(28884),Events:t(92734),Gamepad:t(99125),GamepadPlugin:t(56654),Configs:t(64894)}},14350:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(93301),v=t(79291),o={CreatePixelPerfectHandler:t(84409),CreateInteractiveObject:t(74457),Events:t(8214),Gamepad:t(48646),InputManager:t(7003),InputPlugin:t(48205),InputPluginCache:t(89639),Keyboard:t(51442),Mouse:t(87078),Pointer:t(42515),Touch:t(95618)};o=v(!1,o,a),c.exports=o},78970:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(72905),v=t(83419),o=t(8443),r=t(8214),n=t(46032),e=t(29747),i=new v({initialize:function(s){this.manager=s,this.queue=[],this.preventDefault=!0,this.captures=[],this.enabled=!1,this.target,this.onKeyDown=e,this.onKeyUp=e,s.events.once(r.MANAGER_BOOT,this.boot,this)},boot:function(){var h=this.manager.config;this.enabled=h.inputKeyboard,this.target=h.inputKeyboardEventTarget,this.addCapture(h.inputKeyboardCapture),!this.target&&window&&(this.target=window),this.enabled&&this.target&&this.startListeners(),this.manager.game.events.on(o.POST_STEP,this.postUpdate,this)},startListeners:function(){var h=this;this.onKeyDown=function(l){if(!(l.defaultPrevented||!h.enabled||!h.manager)){h.queue.push(l),h.manager.events.emit(r.MANAGER_PROCESS);var f=l.altKey||l.ctrlKey||l.shiftKey||l.metaKey;h.preventDefault&&!f&&h.captures.indexOf(l.keyCode)>-1&&l.preventDefault()}},this.onKeyUp=function(l){if(!(l.defaultPrevented||!h.enabled||!h.manager)){h.queue.push(l),h.manager.events.emit(r.MANAGER_PROCESS);var f=l.altKey||l.ctrlKey||l.shiftKey||l.metaKey;h.preventDefault&&!f&&h.captures.indexOf(l.keyCode)>-1&&l.preventDefault()}};var s=this.target;s&&(s.addEventListener("keydown",this.onKeyDown,!1),s.addEventListener("keyup",this.onKeyUp,!1),this.enabled=!0)},stopListeners:function(){var h=this.target;h.removeEventListener("keydown",this.onKeyDown,!1),h.removeEventListener("keyup",this.onKeyUp,!1),this.enabled=!1},postUpdate:function(){this.queue=[]},addCapture:function(h){typeof h=="string"&&(h=h.split(",")),Array.isArray(h)||(h=[h]);for(var s=this.captures,l=0;l0},removeCapture:function(h){typeof h=="string"&&(h=h.split(",")),Array.isArray(h)||(h=[h]);for(var s=this.captures,l=0;l0},clearCaptures:function(){this.captures=[],this.preventDefault=!1},destroy:function(){this.stopListeners(),this.clearCaptures(),this.queue=[],this.manager.game.events.off(o.POST_RENDER,this.postUpdate,this),this.target=null,this.enabled=!1,this.manager=null}});c.exports=i},28846:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(50792),o=t(95922),r=t(8443),n=t(35154),e=t(8214),i=t(89639),h=t(30472),s=t(46032),l=t(87960),f=t(74600),u=t(44594),d=t(56583),p=new a({Extends:v,initialize:function(x){v.call(this),this.game=x.systems.game,this.scene=x.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=x,this.manager=x.manager.keyboard,this.enabled=!0,this.keys=[],this.combos=[],this.prevCode=null,this.prevTime=0,this.prevType=null,x.pluginEvents.once(e.BOOT,this.boot,this),x.pluginEvents.on(e.START,this.start,this)},boot:function(){var g=this.settings.input;this.enabled=n(g,"keyboard",!0);var x=n(g,"keyboard.capture",null);x&&this.addCaptures(x),this.sceneInputPlugin.pluginEvents.once(e.DESTROY,this.destroy,this)},start:function(){this.sceneInputPlugin.manager.events.on(e.MANAGER_PROCESS,this.update,this),this.sceneInputPlugin.pluginEvents.once(e.SHUTDOWN,this.shutdown,this),this.game.events.on(r.BLUR,this.resetKeys,this),this.scene.sys.events.on(u.PAUSE,this.resetKeys,this),this.scene.sys.events.on(u.SLEEP,this.resetKeys,this)},isActive:function(){return this.enabled&&this.scene.sys.canInput()},addCapture:function(g){return this.manager.addCapture(g),this},removeCapture:function(g){return this.manager.removeCapture(g),this},getCaptures:function(){return this.manager.captures},enableGlobalCapture:function(){return this.manager.preventDefault=!0,this},disableGlobalCapture:function(){return this.manager.preventDefault=!1,this},clearCaptures:function(){return this.manager.clearCaptures(),this},createCursorKeys:function(){return this.addKeys({up:s.UP,down:s.DOWN,left:s.LEFT,right:s.RIGHT,space:s.SPACE,shift:s.SHIFT})},addKeys:function(g,x,y){x===void 0&&(x=!0),y===void 0&&(y=!1);var C={};if(typeof g=="string"){g=g.split(",");for(var P=0;P-1?C[P]=g:C[g.keyCode]=g,x&&this.addCapture(g.keyCode),g.setEmitOnRepeat(y),g}return typeof g=="string"&&(g=s[g.toUpperCase()]),C[g]||(C[g]=new h(this,g),x&&this.addCapture(g),C[g].setEmitOnRepeat(y)),C[g]},removeKey:function(g,x,y){x===void 0&&(x=!1),y===void 0&&(y=!1);var C=this.keys,P;if(g instanceof h){var M=C.indexOf(g);M>-1&&(P=this.keys[M],this.keys[M]=void 0)}else typeof g=="string"&&(g=s[g.toUpperCase()]);return C[g]&&(P=C[g],C[g]=void 0),P&&(P.plugin=null,y&&this.removeCapture(P.keyCode),x&&P.destroy()),this},removeAllKeys:function(g,x){g===void 0&&(g=!1),x===void 0&&(x=!1);for(var y=this.keys,C=0;Cg._tick)return g._tick=y,!0}return!1},update:function(){var g=this.manager.queue,x=g.length;if(!(!this.isActive()||x===0))for(var y=this.keys,C=0;C{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return a.timeLastMatched=t.timeStamp,a.index++,a.index===a.size?!0:(a.current=a.keyCodes[a.index],!1)};c.exports=m},87960:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(95922),o=t(95540),r=t(68769),n=t(92803),e=new a({initialize:function(h,s,l){if(l===void 0&&(l={}),s.length<2)return!1;this.manager=h,this.enabled=!0,this.keyCodes=[];for(var f=0;f{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(66970),v=function(o,r){if(r.matched)return!0;var n=!1,e=!1;if(o.keyCode===r.current)if(r.index>0&&r.maxKeyDelay>0){var i=r.timeLastMatched+r.maxKeyDelay;o.timeStamp<=i&&(e=!0,n=a(o,r))}else e=!0,n=a(o,r);return!e&&r.resetOnWrongKey&&(r.index=0,r.current=r.keyCodes[0]),n&&(r.timeLastMatched=o.timeStamp,r.matched=!0,r.timeMatched=o.timeStamp),n};c.exports=v},92803:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return t.current=t.keyCodes[0],t.index=0,t.timeLastMatched=0,t.matched=!1,t.timeMatched=0,t};c.exports=m},92612:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="keydown"},23345:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="keyup"},21957:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="keycombomatch"},44743:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="down"},3771:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="keydown-"},46358:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="keyup-"},75674:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="up"},95922:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={ANY_KEY_DOWN:t(92612),ANY_KEY_UP:t(23345),COMBO_MATCH:t(21957),DOWN:t(44743),KEY_DOWN:t(3771),KEY_UP:t(46358),UP:t(75674)}},51442:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={Events:t(95922),KeyboardManager:t(78970),KeyboardPlugin:t(28846),Key:t(30472),KeyCodes:t(46032),KeyCombo:t(87960),AdvanceKeyCombo:t(66970),ProcessKeyCombo:t(68769),ResetKeyCombo:t(92803),JustDown:t(90229),JustUp:t(38796),DownDuration:t(37015),UpDuration:t(41170)}},37015:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){a===void 0&&(a=50);var v=t.plugin.game.loop.time-t.timeDown;return t.isDown&&v{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return t._justDown?(t._justDown=!1,!0):!1};c.exports=m},38796:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return t._justUp?(t._justUp=!1,!0):!1};c.exports=m},30472:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(50792),o=t(95922),r=new a({Extends:v,initialize:function(e,i){v.call(this),this.plugin=e,this.keyCode=i,this.originalEvent=void 0,this.enabled=!0,this.isDown=!1,this.isUp=!0,this.altKey=!1,this.ctrlKey=!1,this.shiftKey=!1,this.metaKey=!1,this.location=0,this.timeDown=0,this.duration=0,this.timeUp=0,this.emitOnRepeat=!1,this.repeats=0,this._justDown=!1,this._justUp=!1,this._tick=-1},setEmitOnRepeat:function(n){return this.emitOnRepeat=n,this},onDown:function(n){this.originalEvent=n,this.enabled&&(this.altKey=n.altKey,this.ctrlKey=n.ctrlKey,this.shiftKey=n.shiftKey,this.metaKey=n.metaKey,this.location=n.location,this.repeats++,this.isDown?this.emitOnRepeat&&this.emit(o.DOWN,this,n):(this.isDown=!0,this.isUp=!1,this.timeDown=n.timeStamp,this.duration=0,this._justDown=!0,this._justUp=!1,this.emit(o.DOWN,this,n)))},onUp:function(n){this.originalEvent=n,this.enabled&&(this.isDown=!1,this.isUp=!0,this.timeUp=n.timeStamp,this.duration=this.timeUp-this.timeDown,this.repeats=0,this._justDown=!1,this._justUp=!0,this._tick=-1,this.emit(o.UP,this,n))},reset:function(){return this.isDown=!1,this.isUp=!0,this.altKey=!1,this.ctrlKey=!1,this.shiftKey=!1,this.metaKey=!1,this.timeDown=0,this.duration=0,this.timeUp=0,this.repeats=0,this._justDown=!1,this._justUp=!1,this._tick=-1,this},getDuration:function(){return this.isDown?this.plugin.game.loop.time-this.timeDown:0},destroy:function(){this.removeAllListeners(),this.originalEvent=null,this.plugin=null}});c.exports=r},46032:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={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};c.exports=m},74600:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(46032),v={};for(var o in a)v[a[o]]=o;c.exports=v},41170:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){a===void 0&&(a=50);var v=t.plugin.game.loop.time-t.timeUp;return t.isUp&&v{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(89357),o=t(8214),r=t(29747),n=new a({initialize:function(i){this.manager=i,this.preventDefaultDown=!0,this.preventDefaultUp=!0,this.preventDefaultMove=!0,this.preventDefaultWheel=!1,this.enabled=!1,this.target,this.locked=!1,this.onMouseMove=r,this.onMouseDown=r,this.onMouseUp=r,this.onMouseDownWindow=r,this.onMouseUpWindow=r,this.onMouseOver=r,this.onMouseOut=r,this.onMouseWheel=r,this.pointerLockChange=r,this.isTop=!0,i.events.once(o.MANAGER_BOOT,this.boot,this)},boot:function(){var e=this.manager.config;this.enabled=e.inputMouse,this.target=e.inputMouseEventTarget,this.passive=e.inputMousePassive,this.preventDefaultDown=e.inputMousePreventDefaultDown,this.preventDefaultUp=e.inputMousePreventDefaultUp,this.preventDefaultMove=e.inputMousePreventDefaultMove,this.preventDefaultWheel=e.inputMousePreventDefaultWheel,this.target?typeof this.target=="string"&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,e.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return this.target.addEventListener("contextmenu",function(e){return e.preventDefault(),!1}),this},requestPointerLock:function(){if(v.pointerLock){var e=this.target;e.requestPointerLock=e.requestPointerLock||e.mozRequestPointerLock||e.webkitRequestPointerLock,e.requestPointerLock()}},releasePointerLock:function(){v.pointerLock&&(document.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock,document.exitPointerLock())},startListeners:function(){var e=this.target;if(e){var i=this,h=this.manager,s=h.canvas,l=window&&window.focus&&h.game.config.autoFocus;this.onMouseMove=function(u){!u.defaultPrevented&&i.enabled&&h&&h.enabled&&(h.onMouseMove(u),i.preventDefaultMove&&u.preventDefault())},this.onMouseDown=function(u){l&&window.focus(),!u.defaultPrevented&&i.enabled&&h&&h.enabled&&(h.onMouseDown(u),i.preventDefaultDown&&u.target===s&&u.preventDefault())},this.onMouseDownWindow=function(u){u.sourceCapabilities&&u.sourceCapabilities.firesTouchEvents||!u.defaultPrevented&&i.enabled&&h&&h.enabled&&u.target!==s&&h.onMouseDown(u)},this.onMouseUp=function(u){!u.defaultPrevented&&i.enabled&&h&&h.enabled&&(h.onMouseUp(u),i.preventDefaultUp&&u.target===s&&u.preventDefault())},this.onMouseUpWindow=function(u){u.sourceCapabilities&&u.sourceCapabilities.firesTouchEvents||!u.defaultPrevented&&i.enabled&&h&&h.enabled&&u.target!==s&&h.onMouseUp(u)},this.onMouseOver=function(u){!u.defaultPrevented&&i.enabled&&h&&h.enabled&&h.setCanvasOver(u)},this.onMouseOut=function(u){!u.defaultPrevented&&i.enabled&&h&&h.enabled&&h.setCanvasOut(u)},this.onMouseWheel=function(u){!u.defaultPrevented&&i.enabled&&h&&h.enabled&&h.onMouseWheel(u),i.preventDefaultWheel&&u.target===s&&u.preventDefault()};var f={passive:!0};if(e.addEventListener("mousemove",this.onMouseMove),e.addEventListener("mousedown",this.onMouseDown),e.addEventListener("mouseup",this.onMouseUp),e.addEventListener("mouseover",this.onMouseOver,f),e.addEventListener("mouseout",this.onMouseOut,f),this.preventDefaultWheel?e.addEventListener("wheel",this.onMouseWheel,{passive:!1}):e.addEventListener("wheel",this.onMouseWheel,f),window&&h.game.config.inputWindowEvents)try{window.top.addEventListener("mousedown",this.onMouseDownWindow,f),window.top.addEventListener("mouseup",this.onMouseUpWindow,f)}catch{window.addEventListener("mousedown",this.onMouseDownWindow,f),window.addEventListener("mouseup",this.onMouseUpWindow,f),this.isTop=!1}v.pointerLock&&(this.pointerLockChange=function(u){var d=i.target;i.locked=document.pointerLockElement===d||document.mozPointerLockElement===d||document.webkitPointerLockElement===d,h.onPointerLockChange(u)},document.addEventListener("pointerlockchange",this.pointerLockChange,!0),document.addEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.addEventListener("webkitpointerlockchange",this.pointerLockChange,!0)),this.enabled=!0}},stopListeners:function(){var e=this.target;e.removeEventListener("mousemove",this.onMouseMove),e.removeEventListener("mousedown",this.onMouseDown),e.removeEventListener("mouseup",this.onMouseUp),e.removeEventListener("mouseover",this.onMouseOver),e.removeEventListener("mouseout",this.onMouseOut),window&&(e=this.isTop?window.top:window,e.removeEventListener("mousedown",this.onMouseDownWindow),e.removeEventListener("mouseup",this.onMouseUpWindow)),v.pointerLock&&(document.removeEventListener("pointerlockchange",this.pointerLockChange,!0),document.removeEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.removeEventListener("webkitpointerlockchange",this.pointerLockChange,!0))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});c.exports=n},87078:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={MouseManager:t(85098)}},36210:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(8214),o=t(29747),r=new a({initialize:function(e){this.manager=e,this.capture=!0,this.enabled=!1,this.target,this.onTouchStart=o,this.onTouchStartWindow=o,this.onTouchMove=o,this.onTouchEnd=o,this.onTouchEndWindow=o,this.onTouchCancel=o,this.onTouchCancelWindow=o,this.isTop=!0,e.events.once(v.MANAGER_BOOT,this.boot,this)},boot:function(){var n=this.manager.config;this.enabled=n.inputTouch,this.target=n.inputTouchEventTarget,this.capture=n.inputTouchCapture,this.target?typeof this.target=="string"&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,n.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return this.target.addEventListener("contextmenu",function(n){return n.preventDefault(),!1}),this},startListeners:function(){var n=this.target;if(n){var e=this,i=this.manager,h=i.canvas,s=window&&window.focus&&i.game.config.autoFocus;this.onTouchMove=function(d){!d.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onTouchMove(d),e.capture&&d.cancelable&&d.preventDefault())},this.onTouchStart=function(d){s&&window.focus(),!d.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onTouchStart(d),e.capture&&d.cancelable&&d.target===h&&d.preventDefault())},this.onTouchStartWindow=function(d){!d.defaultPrevented&&e.enabled&&i&&i.enabled&&d.target!==h&&i.onTouchStart(d)},this.onTouchEnd=function(d){!d.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onTouchEnd(d),e.capture&&d.cancelable&&d.target===h&&d.preventDefault())},this.onTouchEndWindow=function(d){!d.defaultPrevented&&e.enabled&&i&&i.enabled&&d.target!==h&&i.onTouchEnd(d)},this.onTouchCancel=function(d){!d.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onTouchCancel(d),e.capture&&d.preventDefault())},this.onTouchCancelWindow=function(d){!d.defaultPrevented&&e.enabled&&i&&i.enabled&&i.onTouchCancel(d)};var l=this.capture,f={passive:!0},u={passive:!1};if(n.addEventListener("touchstart",this.onTouchStart,l?u:f),n.addEventListener("touchmove",this.onTouchMove,l?u:f),n.addEventListener("touchend",this.onTouchEnd,l?u:f),n.addEventListener("touchcancel",this.onTouchCancel,l?u:f),window&&i.game.config.inputWindowEvents)try{window.top.addEventListener("touchstart",this.onTouchStartWindow,u),window.top.addEventListener("touchend",this.onTouchEndWindow,u),window.top.addEventListener("touchcancel",this.onTouchCancelWindow,u)}catch{window.addEventListener("touchstart",this.onTouchStartWindow,u),window.addEventListener("touchend",this.onTouchEndWindow,u),window.addEventListener("touchcancel",this.onTouchCancelWindow,u),this.isTop=!1}this.enabled=!0}},stopListeners:function(){var n=this.target;n.removeEventListener("touchstart",this.onTouchStart),n.removeEventListener("touchmove",this.onTouchMove),n.removeEventListener("touchend",this.onTouchEnd),n.removeEventListener("touchcancel",this.onTouchCancel),window&&(n=this.isTop?window.top:window,n.removeEventListener("touchstart",this.onTouchStartWindow),n.removeEventListener("touchend",this.onTouchEndWindow),n.removeEventListener("touchcancel",this.onTouchCancelWindow))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});c.exports=r},95618:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={TouchManager:t(36210)}},41299:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(23906),o=t(54899),r=t(95540),n=t(98356),e=t(3374),i=t(84376),h=t(92638),s=new a({initialize:function(f,u){if(this.loader=f,this.cache=r(u,"cache",!1),this.type=r(u,"type",!1),!this.type)throw new Error("Invalid File type: "+this.type);this.key=r(u,"key",!1);var d=this.key;if(f.prefix&&f.prefix!==""&&(this.key=f.prefix+d),!this.key)throw new Error("Invalid File key: "+this.key);var p=r(u,"url");p===void 0?p=f.path+d+"."+r(u,"extension",""):typeof p=="string"&&!p.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)&&(p=f.path+p),this.url=p,this.src="",this.xhrSettings=h(r(u,"responseType",void 0)),r(u,"xhrSettings",!1)&&(this.xhrSettings=e(this.xhrSettings,r(u,"xhrSettings",{}))),this.xhrLoader=null,this.state=typeof this.url=="function"?v.FILE_POPULATED:v.FILE_PENDING,this.bytesTotal=0,this.bytesLoaded=-1,this.percentComplete=-1,this.crossOrigin=void 0,this.data=void 0,this.config=r(u,"config",{}),this.multiFile,this.linkFile,this.base64=typeof p=="string"&&p.indexOf("data:")===0},setLink:function(l){this.linkFile=l,l.linkFile=this},resetXHR:function(){this.xhrLoader&&(this.xhrLoader.onload=void 0,this.xhrLoader.onerror=void 0,this.xhrLoader.onprogress=void 0)},load:function(){this.state===v.FILE_POPULATED?this.loader.nextFile(this,!0):(this.state=v.FILE_LOADING,this.src=n(this,this.loader.baseURL),this.src.indexOf("data:")===0&&(this.base64=!0),this.xhrLoader=i(this,this.loader.xhr))},onLoad:function(l,f){var u=l.responseURL&&this.loader.localSchemes.some(function(g){return l.responseURL.indexOf(g)===0}),d=u&&f.target.status===0,p=!(f.target&&f.target.status!==200)||d;l.readyState===4&&l.status>=400&&l.status<=599&&(p=!1),this.state=v.FILE_LOADED,this.resetXHR(),this.loader.nextFile(this,p)},onBase64Load:function(l){this.xhrLoader=l,this.state=v.FILE_LOADED,this.percentComplete=1,this.loader.emit(o.FILE_PROGRESS,this,this.percentComplete),this.loader.nextFile(this,!0)},onError:function(){this.resetXHR(),this.loader.nextFile(this,!1)},onProgress:function(l){l.lengthComputable&&(this.bytesLoaded=l.loaded,this.bytesTotal=l.total,this.percentComplete=Math.min(this.bytesLoaded/this.bytesTotal,1),this.loader.emit(o.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=v.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=v.FILE_COMPLETE,this.multiFile&&this.multiFile.onFileComplete(this),this.loader.fileProcessComplete(this)},onProcessError:function(){console.error('Failed to process file: %s "%s"',this.type,this.key),this.state=v.FILE_ERRORED,this.multiFile&&this.multiFile.onFileFailed(this),this.loader.fileProcessComplete(this)},hasCacheConflict:function(){return this.cache&&this.cache.exists(this.key)},addToCache:function(){this.cache&&this.data&&this.cache.add(this.key,this.data)},pendingDestroy:function(l){if(this.state!==v.FILE_PENDING_DESTROY){l===void 0&&(l=this.data);var f=this.key,u=this.type;this.loader.emit(o.FILE_COMPLETE,f,u,l),this.loader.emit(o.FILE_KEY_COMPLETE+u+"-"+f,f,u,l),this.loader.flagForRemoval(this),this.state=v.FILE_PENDING_DESTROY}},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});s.createObjectURL=function(l,f,u){if(typeof URL=="function")l.src=URL.createObjectURL(f);else{var d=new FileReader;d.onload=function(){l.removeAttribute("crossOrigin"),l.src="data:"+(f.type||u)+";base64,"+d.result.split(",")[1]},d.onerror=l.onerror,d.readAsDataURL(f)}},s.revokeObjectURL=function(l){typeof URL=="function"&&URL.revokeObjectURL(l.src)},c.exports=s},74099:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={},t={install:function(a){for(var v in m)a[v]=m[v]},register:function(a,v){m[a]=v},destroy:function(){m={}}};c.exports=t},98356:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return t.url?t.url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)?t.url:a+t.url:!1};c.exports=m},74261:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(23906),o=t(35072),r=t(50792),n=t(54899),e=t(74099),i=t(95540),h=t(35154),s=t(37277),l=t(44594),f=t(92638),u=new a({Extends:r,initialize:function(p){r.call(this);var g=p.sys.game.config,x=p.sys.settings.loader;this.scene=p,this.systems=p.sys,this.cacheManager=p.sys.cache,this.textureManager=p.sys.textures,this.sceneManager=p.sys.game.scene,e.install(this),this.prefix="",this.path="",this.baseURL="",this.setBaseURL(i(x,"baseURL",g.loaderBaseURL)),this.setPath(i(x,"path",g.loaderPath)),this.setPrefix(i(x,"prefix",g.loaderPrefix)),this.maxParallelDownloads=i(x,"maxParallelDownloads",g.loaderMaxParallelDownloads),this.xhr=f(i(x,"responseType",g.loaderResponseType),i(x,"async",g.loaderAsync),i(x,"user",g.loaderUser),i(x,"password",g.loaderPassword),i(x,"timeout",g.loaderTimeout),i(x,"withCredentials",g.loaderWithCredentials)),this.crossOrigin=i(x,"crossOrigin",g.loaderCrossOrigin),this.imageLoadType=i(x,"imageLoadType",g.loaderImageLoadType),this.localSchemes=i(x,"localScheme",g.loaderLocalScheme),this.totalToLoad=0,this.progress=0,this.list=new o,this.inflight=new o,this.queue=new o,this._deleteQueue=new o,this.totalFailed=0,this.totalComplete=0,this.state=v.LOADER_IDLE,this.multiKeyIndex=0,p.sys.events.once(l.BOOT,this.boot,this),p.sys.events.on(l.START,this.pluginStart,this)},boot:function(){this.systems.events.once(l.DESTROY,this.destroy,this)},pluginStart:function(){this.systems.events.once(l.SHUTDOWN,this.shutdown,this)},setBaseURL:function(d){return d===void 0&&(d=""),d!==""&&d.substr(-1)!=="/"&&(d=d.concat("/")),this.baseURL=d,this},setPath:function(d){return d===void 0&&(d=""),d!==""&&d.substr(-1)!=="/"&&(d=d.concat("/")),this.path=d,this},setPrefix:function(d){return d===void 0&&(d=""),this.prefix=d,this},setCORS:function(d){return this.crossOrigin=d,this},addFile:function(d){Array.isArray(d)||(d=[d]);for(var p=0;p0},isLoading:function(){return this.state===v.LOADER_LOADING||this.state===v.LOADER_PROCESSING},isReady:function(){return this.state===v.LOADER_IDLE||this.state===v.LOADER_COMPLETE},start:function(){this.isReady()&&(this.progress=0,this.totalFailed=0,this.totalComplete=0,this.totalToLoad=this.list.size,this.emit(n.START,this),this.list.size===0?this.loadComplete():(this.state=v.LOADER_LOADING,this.inflight.clear(),this.queue.clear(),this.updateProgress(),this.checkLoadQueue(),this.systems.events.on(l.UPDATE,this.update,this)))},updateProgress:function(){this.progress=1-(this.list.size+this.inflight.size)/this.totalToLoad,this.emit(n.PROGRESS,this.progress)},update:function(){this.state===v.LOADER_LOADING&&this.list.size>0&&this.inflight.size{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(79291),v=t(92638),o=function(r,n){var e=r===void 0?v():a({},r);if(n)for(var i in n)n[i]!==void 0&&(e[i]=n[i]);return e};c.exports=o},26430:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(23906),o=t(54899),r=new a({initialize:function(e,i,h,s){var l=[];s.forEach(function(d){d&&l.push(d)}),this.loader=e,this.type=i,this.key=h;var f=this.key;e.prefix&&e.prefix!==""&&(this.key=e.prefix+f),this.multiKeyIndex=e.multiKeyIndex++,this.files=l,this.state=v.FILE_PENDING,this.complete=!1,this.pending=l.length,this.failed=0,this.config={},this.baseURL=e.baseURL,this.path=e.path,this.prefix=e.prefix;for(var u=0;u{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(3374),v=function(o,r){var n=a(r,o.xhrSettings);if(o.base64){var e=o.url.split(";base64,").pop()||o.url.split(",").pop(),i={responseText:atob(e)};o.onBase64Load(i);return}var h=new XMLHttpRequest;if(h.open("GET",o.src,n.async,n.user,n.password),h.responseType=o.xhrSettings.responseType,h.timeout=n.timeout,n.headers)for(var s in n.headers)h.setRequestHeader(s,n.headers[s]);return n.header&&n.headerValue&&h.setRequestHeader(n.header,n.headerValue),n.requestedWith&&h.setRequestHeader("X-Requested-With",n.requestedWith),n.overrideMimeType&&h.overrideMimeType(n.overrideMimeType),n.withCredentials&&(h.withCredentials=!0),h.onload=o.onLoad.bind(o,h),h.onerror=o.onError.bind(o,h),h.onprogress=o.onProgress.bind(o),h.ontimeout=o.onError.bind(o,h),h.send(),h};c.exports=v},92638:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o,r,n){return t===void 0&&(t=""),a===void 0&&(a=!0),v===void 0&&(v=""),o===void 0&&(o=""),r===void 0&&(r=0),n===void 0&&(n=!1),{responseType:t,async:a,user:v,password:o,timeout:r,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:n}};c.exports=m},23906:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={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};c.exports=m},42155:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="addfile"},38991:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="complete"},27540:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="filecomplete"},87464:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="filecomplete-"},94486:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="loaderror"},13035:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="load"},38144:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="fileprogress"},97520:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="postprocess"},85595:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="progress"},55680:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="start"},54899:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={ADD:t(42155),COMPLETE:t(38991),FILE_COMPLETE:t(27540),FILE_KEY_COMPLETE:t(87464),FILE_LOAD_ERROR:t(94486),FILE_LOAD:t(13035),FILE_PROGRESS:t(38144),POST_PROCESS:t(97520),PROGRESS:t(85595),START:t(55680)}},14135:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(74099),o=t(518),r=t(54899),n=new a({Extends:o,initialize:function(i,h,s,l,f){o.call(this,i,h,s,l,f),this.type="animationJSON"},onProcess:function(){this.loader.once(r.POST_PROCESS,this.onLoadComplete,this),o.prototype.onProcess.call(this)},onLoadComplete:function(){this.loader.systems.anims.fromJSON(this.data)}});v.register("animation",function(e,i,h,s){if(Array.isArray(e))for(var l=0;l{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(74099),o=t(95540),r=t(19550),n=t(41212),e=t(518),i=t(26430),h=new a({Extends:i,initialize:function(l,f,u,d,p,g){var x,y;if(n(f)){var C=f;f=o(C,"key"),x=new r(l,{key:f,url:o(C,"textureURL"),extension:o(C,"textureExtension","png"),normalMap:o(C,"normalMap"),xhrSettings:o(C,"textureXhrSettings")}),y=new e(l,{key:f,url:o(C,"atlasURL"),extension:o(C,"atlasExtension","json"),xhrSettings:o(C,"atlasXhrSettings")})}else x=new r(l,f,u,p),y=new e(l,f,d,g);x.linkFile?i.call(this,l,"atlasjson",f,[x,y,x.linkFile]):i.call(this,l,"atlasjson",f,[x,y])},addToCache:function(){if(this.isReadyToProcess()){var s=this.files[0],l=this.files[1],f=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(s.key,s.data,l.data,f),l.addToCache(),this.complete=!0}}});v.register("aseprite",function(s,l,f,u,d){var p;if(Array.isArray(s))for(var g=0;g{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(74099),o=t(95540),r=t(19550),n=t(41212),e=t(518),i=t(26430),h=new a({Extends:i,initialize:function(l,f,u,d,p,g){var x,y;if(n(f)){var C=f;f=o(C,"key"),x=new r(l,{key:f,url:o(C,"textureURL"),extension:o(C,"textureExtension","png"),normalMap:o(C,"normalMap"),xhrSettings:o(C,"textureXhrSettings")}),y=new e(l,{key:f,url:o(C,"atlasURL"),extension:o(C,"atlasExtension","json"),xhrSettings:o(C,"atlasXhrSettings")})}else x=new r(l,f,u,p),y=new e(l,f,d,g);x.linkFile?i.call(this,l,"atlasjson",f,[x,y,x.linkFile]):i.call(this,l,"atlasjson",f,[x,y])},addToCache:function(){if(this.isReadyToProcess()){var s=this.files[0],l=this.files[1],f=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(s.key,s.data,l.data,f),this.complete=!0}}});v.register("atlas",function(s,l,f,u,d){var p;if(Array.isArray(s))for(var g=0;g{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(74099),o=t(95540),r=t(19550),n=t(41212),e=t(26430),i=t(57318),h=new a({Extends:e,initialize:function(l,f,u,d,p,g){var x,y;if(n(f)){var C=f;f=o(C,"key"),x=new r(l,{key:f,url:o(C,"textureURL"),extension:o(C,"textureExtension","png"),normalMap:o(C,"normalMap"),xhrSettings:o(C,"textureXhrSettings")}),y=new i(l,{key:f,url:o(C,"atlasURL"),extension:o(C,"atlasExtension","xml"),xhrSettings:o(C,"atlasXhrSettings")})}else x=new r(l,f,u,p),y=new i(l,f,d,g);x.linkFile?e.call(this,l,"atlasxml",f,[x,y,x.linkFile]):e.call(this,l,"atlasxml",f,[x,y])},addToCache:function(){if(this.isReadyToProcess()){var s=this.files[0],l=this.files[1],f=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlasXML(s.key,s.data,l.data,f),this.complete=!0}}});v.register("atlasXML",function(s,l,f,u,d){var p;if(Array.isArray(s))for(var g=0;g{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(23906),o=t(41299),r=t(74099),n=t(95540),e=t(89749),i=t(41212),h=new a({Extends:o,initialize:function(l,f,u,d,p){if(i(f)){var g=f;f=n(g,"key"),d=n(g,"xhrSettings"),p=n(g,"context",p)}var x={type:"audio",cache:l.cacheManager.audio,extension:u.type,responseType:"arraybuffer",key:f,url:u.url,xhrSettings:d,config:{context:p}};o.call(this,l,x)},onProcess:function(){this.state=v.FILE_PROCESSING;var s=this;this.config.context.decodeAudioData(this.xhrLoader.response,function(l){s.data=l,s.onProcessComplete()},function(l){console.error("Error decoding audio: "+s.key+" - ",l?l.message:null),s.onProcessError()}),this.config.context=null}});h.create=function(s,l,f,u,d){var p=s.systems.game,g=p.config.audio,x=p.device.audio;i(l)&&(f=n(l,"url",[]),u=n(l,"config",{}));var y=h.getAudioURL(p,f);return y?x.webAudio&&!g.disableWebAudio?new h(s,l,y,d,p.sound.context):new e(s,l,y,u):(console.warn('No audio URLs for "%s" matched this device',l),null)},h.getAudioURL=function(s,l){Array.isArray(l)||(l=[l]);for(var f=0;f{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(21097),v=t(83419),o=t(74099),r=t(95540),n=t(41212),e=t(518),i=t(26430),h=new v({Extends:i,initialize:function(l,f,u,d,p,g,x){if(n(f)){var y=f;f=r(y,"key"),u=r(y,"jsonURL"),d=r(y,"audioURL"),p=r(y,"audioConfig"),g=r(y,"audioXhrSettings"),x=r(y,"jsonXhrSettings")}var C;if(!d)C=new e(l,f,u,x),i.call(this,l,"audiosprite",f,[C]),this.config.resourceLoad=!0,this.config.audioConfig=p,this.config.audioXhrSettings=g;else{var P=a.create(l,f,d,p,g);P&&(C=new e(l,f,u,x),i.call(this,l,"audiosprite",f,[P,C]),this.config.resourceLoad=!1)}},onFileComplete:function(s){var l=this.files.indexOf(s);if(l!==-1&&(this.pending--,this.config.resourceLoad&&s.type==="json"&&s.data.hasOwnProperty("resources"))){var f=s.data.resources,u=r(this.config,"audioConfig"),d=r(this.config,"audioXhrSettings"),p=a.create(this.loader,s.key,f,u,d);p&&(this.addToMultiFile(p),this.loader.addFile(p))}},addToCache:function(){if(this.isReadyToProcess()){var s=this.files[0],l=this.files[1];s.addToCache(),l.addToCache(),this.complete=!0}}});o.register("audioSprite",function(s,l,f,u,d,p){var g=this.systems.game,x=g.config.audio,y=g.device.audio;if(x&&x.noAudio||!y.webAudio&&!y.audioData)return this;var C;if(Array.isArray(s))for(var P=0;P{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(23906),o=t(41299),r=t(74099),n=t(95540),e=t(41212),i=new a({Extends:o,initialize:function(s,l,f,u,d){var p="bin";if(e(l)){var g=l;l=n(g,"key"),f=n(g,"url"),u=n(g,"xhrSettings"),p=n(g,"extension",p),d=n(g,"dataType",d)}var x={type:"binary",cache:s.cacheManager.binary,extension:p,responseType:"arraybuffer",key:l,url:f,xhrSettings:u,config:{dataType:d}};o.call(this,s,x)},onProcess:function(){this.state=v.FILE_PROCESSING;var h=this.config.dataType;this.data=h?new h(this.xhrLoader.response):this.xhrLoader.response,this.onProcessComplete()}});r.register("binary",function(h,s,l,f){if(Array.isArray(h))for(var u=0;u{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(74099),o=t(95540),r=t(19550),n=t(41212),e=t(26430),i=t(21859),h=t(57318),s=new a({Extends:e,initialize:function(f,u,d,p,g,x){var y,C;if(n(u)){var P=u;u=o(P,"key"),y=new r(f,{key:u,url:o(P,"textureURL"),extension:o(P,"textureExtension","png"),normalMap:o(P,"normalMap"),xhrSettings:o(P,"textureXhrSettings")}),C=new h(f,{key:u,url:o(P,"fontDataURL"),extension:o(P,"fontDataExtension","xml"),xhrSettings:o(P,"fontDataXhrSettings")})}else y=new r(f,u,d,g),C=new h(f,u,p,x);y.linkFile?e.call(this,f,"bitmapfont",u,[y,C,y.linkFile]):e.call(this,f,"bitmapfont",u,[y,C])},addToCache:function(){if(this.isReadyToProcess()){var l=this.files[0],f=this.files[1];l.addToCache();var u=l.cache.get(l.key),d=i(f.data,l.cache.getFrame(l.key),0,0,u);this.loader.cacheManager.bitmapFont.add(l.key,{data:d,texture:l.key,frame:null}),this.complete=!0}}});v.register("bitmapFont",function(l,f,u,d,p){var g;if(Array.isArray(l))for(var x=0;x{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(23906),o=t(41299),r=t(74099),n=t(95540),e=t(41212),i=new a({Extends:o,initialize:function(s,l,f,u){var d="css";if(e(l)){var p=l;l=n(p,"key"),f=n(p,"url"),u=n(p,"xhrSettings"),d=n(p,"extension",d)}var g={type:"script",cache:!1,extension:d,responseType:"text",key:l,url:f,xhrSettings:u};o.call(this,s,g)},onProcess:function(){this.state=v.FILE_PROCESSING,this.data=document.createElement("style"),this.data.defer=!1,this.data.innerHTML=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});r.register("css",function(h,s,l){if(Array.isArray(h))for(var f=0;f{/** - * @author Richard Davey - * @copyright 2021 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(38734),v=t(85722),o=t(83419),r=t(74099),n=t(95540),e=t(19550),i=t(41212),h=t(518),s=t(31403),l=t(46975),f=t(59327),u=t(26430),d=t(82038),p=t(55222),g=new o({Extends:u,initialize:function(y,C,P,M){if(P.multiAtlasURL){var R=new h(y,{key:C,url:P.multiAtlasURL,xhrSettings:M,config:P});u.call(this,y,"texture",C,[R])}else{var I=P.textureURL.substr(P.textureURL.length-3);P.type||(P.type=I.toLowerCase()==="ktx"?"KTX":"PVR");var L=new v(y,{key:C,url:P.textureURL,extension:I,xhrSettings:M,config:P});if(P.atlasURL){var B=new h(y,{key:C,url:P.atlasURL,xhrSettings:M,config:P});u.call(this,y,"texture",C,[L,B])}else u.call(this,y,"texture",C,[L])}this.config=P},onFileComplete:function(x){var y=this.files.indexOf(x);if(y!==-1){if(this.pending--,!this.config.multiAtlasURL)return;if(x.type==="json"&&x.data.hasOwnProperty("textures")){var C=x.data.textures,P=this.config,M=this.loader,R=M.baseURL,I=M.path,L=M.prefix,B=n(P,"multiBaseURL",this.baseURL),N=n(P,"multiPath",this.path),G=n(P,"prefix",this.prefix),V=n(P,"textureXhrSettings");B&&M.setBaseURL(B),N&&M.setPath(N),G&&M.setPrefix(G);for(var K=0;K{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(23906),o=t(41299),r=t(74099),n=t(95540),e=t(41212),i=t(73894),h=new a({Extends:o,initialize:function(l,f,u,d,p){var g="glsl";if(e(f)){var x=f;f=n(x,"key"),u=n(x,"url"),d=n(x,"shaderType","fragment"),p=n(x,"xhrSettings"),g=n(x,"extension",g)}else d===void 0&&(d="fragment");var y={type:"glsl",cache:l.cacheManager.shader,extension:g,responseType:"text",key:f,url:u,config:{shaderType:d},xhrSettings:p};o.call(this,l,y)},onProcess:function(){this.state=v.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var s=this.data.split(` -`),l=this.extractBlock(s,0);if(l)for(;l;){var f=this.getShaderName(l.header),u=this.getShaderType(l.header),d=this.getShaderUniforms(l.header),p=l.shader;if(this.cache.has(f)){var g=this.cache.get(f);u==="fragment"?g.fragmentSrc=p:g.vertexSrc=p,g.uniforms||(g.uniforms=d)}else u==="fragment"?this.cache.add(f,new i(f,p,"",d)):this.cache.add(f,new i(f,"",p,d));l=this.extractBlock(s,l.offset)}else this.config.shaderType==="fragment"?this.cache.add(this.key,new i(this.key,this.data)):this.cache.add(this.key,new i(this.key,"",this.data))},getShaderName:function(s){for(var l=0;l{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(54899),o=t(41299),r=t(95540),n=t(98356),e=t(41212),i=new a({Extends:o,initialize:function(s,l,f,u){if(e(l)){var d=l;l=r(d,"key"),u=r(d,"config",u)}var p={type:"audio",cache:s.cacheManager.audio,extension:f.type,key:l,url:f.url,config:u};o.call(this,s,p),this.locked="ontouchstart"in window,this.loaded=!1,this.filesLoaded=0,this.filesTotal=0},onLoad:function(){this.loaded||(this.loaded=!0,this.loader.nextFile(this,!0))},onError:function(){for(var h=0;h{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(23906),o=t(41299),r=t(74099),n=t(95540),e=t(41212),i=new a({Extends:o,initialize:function(s,l,f,u){var d="html";if(e(l)){var p=l;l=n(p,"key"),f=n(p,"url"),u=n(p,"xhrSettings"),d=n(p,"extension",d)}var g={type:"text",cache:s.cacheManager.html,extension:d,responseType:"text",key:l,url:f,xhrSettings:u};o.call(this,s,g)},onProcess:function(){this.state=v.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});r.register("html",function(h,s,l){if(Array.isArray(h))for(var f=0;f{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(23906),o=t(41299),r=t(74099),n=t(95540),e=t(41212),i=new a({Extends:o,initialize:function(s,l,f,u,d,p){u===void 0&&(u=512),d===void 0&&(d=512);var g="html";if(e(l)){var x=l;l=n(x,"key"),f=n(x,"url"),p=n(x,"xhrSettings"),g=n(x,"extension",g),u=n(x,"width",u),d=n(x,"height",d)}var y={type:"html",cache:s.textureManager,extension:g,responseType:"text",key:l,url:f,xhrSettings:p,config:{width:u,height:d}};o.call(this,s,y)},onProcess:function(){this.state=v.FILE_PROCESSING;var h=this.config.width,s=this.config.height,l=[];l.push(''),l.push(''),l.push(''),l.push(this.xhrLoader.responseText),l.push(""),l.push(""),l.push("");var f=[l.join(` -`)],u=this;try{var d=new window.Blob(f,{type:"image/svg+xml;charset=utf-8"})}catch{u.state=v.FILE_ERRORED,u.onProcessComplete();return}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){o.revokeObjectURL(u.data),u.onProcessComplete()},this.data.onerror=function(){o.revokeObjectURL(u.data),u.onProcessError()},o.createObjectURL(this.data,d,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});r.register("htmlTexture",function(h,s,l,f,u){if(Array.isArray(h))for(var d=0;d{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(23906),o=t(41299),r=t(74099),n=t(95540),e=t(41212),i=t(98356),h=new a({Extends:o,initialize:function s(l,f,u,d,p){var g="png",x;if(e(f)){var y=f;f=n(y,"key"),u=n(y,"url"),x=n(y,"normalMap"),d=n(y,"xhrSettings"),g=n(y,"extension",g),p=n(y,"frameConfig")}Array.isArray(u)&&(x=u[1],u=u[0]);var C={type:"image",cache:l.textureManager,extension:g,responseType:"blob",key:f,url:u,xhrSettings:d,config:p};if(o.call(this,l,C),x){var P=new s(l,this.key,x,d,p);P.type="normalMap",this.setLink(P),l.addFile(P)}this.useImageElementLoad=l.imageLoadType==="HTMLImageElement"||this.base64,this.useImageElementLoad&&(this.load=this.loadImage,this.onProcess=this.onProcessImage)},onProcess:function(){this.state=v.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var s=this;this.data.onload=function(){o.revokeObjectURL(s.data),s.onProcessComplete()},this.data.onerror=function(){o.revokeObjectURL(s.data),s.onProcessError()},o.createObjectURL(this.data,this.xhrLoader.response,"image/png")},onProcessImage:function(){var s=this.state;this.state=v.FILE_PROCESSING,s===v.FILE_LOADED?this.onProcessComplete():this.onProcessError()},loadImage:function(){this.state=v.FILE_LOADING,this.src=i(this,this.loader.baseURL),this.data=new Image,this.data.crossOrigin=this.crossOrigin;var s=this;this.data.onload=function(){s.state=v.FILE_LOADED,s.loader.nextFile(s,!0)},this.data.onerror=function(){s.loader.nextFile(s,!1)},this.data.src=this.src},addToCache:function(){var s=this.linkFile;s?s.state>=v.FILE_COMPLETE&&(s.type==="spritesheet"?s.addToCache():this.type==="normalMap"?this.cache.addImage(this.key,s.data,this.data):this.cache.addImage(this.key,this.data,s.data)):this.cache.addImage(this.key,this.data)}});r.register("image",function(s,l,f){if(Array.isArray(s))for(var u=0;u{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(23906),o=t(41299),r=t(74099),n=t(95540),e=t(35154),i=t(41212),h=new a({Extends:o,initialize:function(l,f,u,d,p){var g="json";if(i(f)){var x=f;f=n(x,"key"),u=n(x,"url"),d=n(x,"xhrSettings"),g=n(x,"extension",g),p=n(x,"dataKey",p)}var y={type:"json",cache:l.cacheManager.json,extension:g,responseType:"text",key:f,url:u,xhrSettings:d,config:p};o.call(this,l,y),i(u)&&(p?this.data=e(u,p):this.data=u,this.state=v.FILE_POPULATED)},onProcess:function(){if(this.state!==v.FILE_POPULATED){this.state=v.FILE_PROCESSING;try{var s=JSON.parse(this.xhrLoader.responseText)}catch(f){throw this.onProcessError(),f}var l=this.config;typeof l=="string"?this.data=e(s,l,s):this.data=s}this.onProcessComplete()}});r.register("json",function(s,l,f,u){if(Array.isArray(s))for(var d=0;d{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(74099),o=t(95540),r=t(19550),n=t(41212),e=t(518),i=t(26430),h=new a({Extends:i,initialize:function(l,f,u,d,p,g,x){if(n(f)){var y=f;f=o(y,"key"),o(y,"url",!1)?u=o(y,"url"):u=o(y,"atlasURL"),g=o(y,"xhrSettings"),d=o(y,"path"),p=o(y,"baseURL"),x=o(y,"textureXhrSettings")}var C=new e(l,f,u,g);i.call(this,l,"multiatlas",f,[C]),this.config.path=d,this.config.baseURL=p,this.config.textureXhrSettings=x},onFileComplete:function(s){var l=this.files.indexOf(s);if(l!==-1&&(this.pending--,s.type==="json"&&s.data.hasOwnProperty("textures"))){var f=s.data.textures,u=this.config,d=this.loader,p=d.baseURL,g=d.path,x=d.prefix,y=o(u,"baseURL",this.baseURL),C=o(u,"path",this.path),P=o(u,"prefix",this.prefix),M=o(u,"textureXhrSettings");d.setBaseURL(y),d.setPath(C),d.setPrefix(P);for(var R=0;R{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(74099),o=t(95540),r=t(41212),n=t(26430),e=t(34328),i=new a({Extends:n,initialize:function(s,l,f,u){var d="js",p=[];if(r(l)){var g=l;l=o(g,"key"),f=o(g,"url"),u=o(g,"xhrSettings"),d=o(g,"extension",d)}Array.isArray(f)||(f=[f]);for(var x=0;x{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(74099),o=t(95540),r=t(41212),n=t(26430),e=t(85048),i=t(61485),h=t(78776),s=new a({Extends:n,initialize:function(f,u,d,p,g,x){var y,C,P=f.cacheManager.obj;if(r(u)){var M=u;u=o(M,"key"),y=new h(f,{key:u,type:"obj",cache:P,url:o(M,"url"),extension:o(M,"extension","obj"),xhrSettings:o(M,"xhrSettings"),config:{flipUV:o(M,"flipUV",g)}}),p=o(M,"matURL"),p&&(C=new h(f,{key:u,type:"mat",cache:P,url:p,extension:o(M,"matExtension","mat"),xhrSettings:o(M,"xhrSettings")}))}else y=new h(f,{key:u,url:d,type:"obj",cache:P,extension:"obj",xhrSettings:x,config:{flipUV:g}}),p&&(C=new h(f,{key:u,url:p,type:"mat",cache:P,extension:"mat",xhrSettings:x}));n.call(this,f,"obj",u,[y,C])},addToCache:function(){if(this.isReadyToProcess()){var l=this.files[0],f=this.files[1],u=e(l.data,l.config.flipUV);f&&(u.materials=i(f.data)),l.cache.add(l.key,u),this.complete=!0}}});v.register("obj",function(l,f,u,d,p){var g;if(Array.isArray(l))for(var x=0;x{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(23906),o=t(74099),r=t(518),n=new a({Extends:r,initialize:function(i,h,s,l,f){r.call(this,i,h,s,l,f),this.type="packfile"},onProcess:function(){if(this.state!==v.FILE_POPULATED&&(this.state=v.FILE_PROCESSING,this.data=JSON.parse(this.xhrLoader.responseText)),this.data.hasOwnProperty("files")&&this.config){var e={};e[this.config]=this.data,this.data=e}this.loader.addPack(this.data,this.config),this.onProcessComplete()}});o.register("pack",function(e,i,h,s){if(Array.isArray(e))for(var l=0;l{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(23906),o=t(41299),r=t(74099),n=t(95540),e=t(41212),i=new a({Extends:o,initialize:function(s,l,f,u,d,p){var g="js";if(e(l)){var x=l;l=n(x,"key"),f=n(x,"url"),p=n(x,"xhrSettings"),g=n(x,"extension",g),u=n(x,"start"),d=n(x,"mapping")}var y={type:"plugin",cache:!1,extension:g,responseType:"text",key:l,url:f,xhrSettings:p,config:{start:u,mapping:d}};o.call(this,s,y),typeof f=="function"&&(this.data=f,this.state=v.FILE_POPULATED)},onProcess:function(){var h=this.loader.systems.plugins,s=this.config,l=n(s,"start",!1),f=n(s,"mapping",null);if(this.state===v.FILE_POPULATED)h.install(this.key,this.data,l,f);else{this.state=v.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data);var u=h.install(this.key,window[this.key],l,f);(l||f)&&(this.loader.systems[f]=u,this.loader.scene[f]=u)}this.onProcessComplete()}});r.register("plugin",function(h,s,l,f,u){if(Array.isArray(h))for(var d=0;d{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(23906),o=t(41299),r=t(74099),n=t(95540),e=t(41212),i=new a({Extends:o,initialize:function(s,l,f,u,d){var p="svg";if(e(l)){var g=l;l=n(g,"key"),f=n(g,"url"),u=n(g,"svgConfig",{}),d=n(g,"xhrSettings"),p=n(g,"extension",p)}var x={type:"svg",cache:s.textureManager,extension:p,responseType:"text",key:l,url:f,xhrSettings:d,config:{width:n(u,"width"),height:n(u,"height"),scale:n(u,"scale")}};o.call(this,s,x)},onProcess:function(){this.state=v.FILE_PROCESSING;var h=this.xhrLoader.responseText,s=[h],l=this.config.width,f=this.config.height,u=this.config.scale;t:if(l&&f||u){var d=null,p=new DOMParser;d=p.parseFromString(h,"text/xml");var g=d.getElementsByTagName("svg")[0],x=g.hasAttribute("viewBox"),y=parseFloat(g.getAttribute("width")),C=parseFloat(g.getAttribute("height"));if(!x&&y&&C)g.setAttribute("viewBox","0 0 "+y+" "+C);else if(x&&!y&&!C){var P=g.getAttribute("viewBox").split(/\s+|,/);y=P[2],C=P[3]}if(u)if(y&&C)l=y*u,f=C*u;else break t;g.setAttribute("width",l.toString()+"px"),g.setAttribute("height",f.toString()+"px"),s=[new XMLSerializer().serializeToString(g)]}try{var M=new window.Blob(s,{type:"image/svg+xml;charset=utf-8"})}catch{this.onProcessError();return}this.data=new Image,this.data.crossOrigin=this.crossOrigin;var R=this,I=!1;this.data.onload=function(){I||o.revokeObjectURL(R.data),R.onProcessComplete()},this.data.onerror=function(){I?R.onProcessError():(I=!0,o.revokeObjectURL(R.data),R.data.src="data:image/svg+xml,"+encodeURIComponent(s.join("")))},o.createObjectURL(this.data,M,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});r.register("svg",function(h,s,l,f){if(Array.isArray(h))for(var u=0;u{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(23906),o=t(41299),r=t(74099),n=t(95540),e=t(41212),i=new a({Extends:o,initialize:function(s,l,f,u){var d="js";if(e(l)){var p=l;l=n(p,"key"),f=n(p,"url"),u=n(p,"xhrSettings"),d=n(p,"extension",d)}var g={type:"text",extension:d,responseType:"text",key:l,url:f,xhrSettings:u};o.call(this,s,g)},onProcess:function(){this.state=v.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var h=this.data.concat(`(function(){ -return new `+this.key+`(); -}).call(this);`),s=eval;this.loader.sceneManager.add(this.key,s(h)),this.complete=!0}});r.register("sceneFile",function(h,s,l){if(Array.isArray(h))for(var f=0;f{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(23906),o=t(41299),r=t(74099),n=t(95540),e=t(41212),i=new a({Extends:o,initialize:function(s,l,f,u,d,p){var g="js";if(e(l)){var x=l;l=n(x,"key"),f=n(x,"url"),p=n(x,"xhrSettings"),g=n(x,"extension",g),u=n(x,"systemKey"),d=n(x,"sceneKey")}var y={type:"scenePlugin",cache:!1,extension:g,responseType:"text",key:l,url:f,xhrSettings:p,config:{systemKey:u,sceneKey:d}};o.call(this,s,y),typeof f=="function"&&(this.data=f,this.state=v.FILE_POPULATED)},onProcess:function(){var h=this.loader.systems.plugins,s=this.config,l=this.key,f=n(s,"systemKey",l),u=n(s,"sceneKey",l);this.state===v.FILE_POPULATED?h.installScenePlugin(f,this.data,u,this.loader.scene,!0):(this.state=v.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data),h.installScenePlugin(f,window[this.key],u,this.loader.scene,!0)),this.onProcessComplete()}});r.register("scenePlugin",function(h,s,l,f,u){if(Array.isArray(h))for(var d=0;d{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(23906),o=t(41299),r=t(74099),n=t(95540),e=t(41212),i=new a({Extends:o,initialize:function(s,l,f,u,d){var p="js";if(e(l)){var g=l;l=n(g,"key"),f=n(g,"url"),u=n(g,"type","script"),d=n(g,"xhrSettings"),p=n(g,"extension",p)}else u===void 0&&(u="script");var x={type:u,cache:!1,extension:p,responseType:"text",key:l,url:f,xhrSettings:d};o.call(this,s,x)},onProcess:function(){this.state=v.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});r.register("script",function(h,s,l,f){if(Array.isArray(h))for(var u=0;u{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(23906),o=t(74099),r=t(19550),n=new a({Extends:r,initialize:function(i,h,s,l,f){r.call(this,i,h,s,f,l),this.type="spritesheet"},addToCache:function(){var e=this.linkFile;e?e.state>=v.FILE_COMPLETE&&(this.type==="normalMap"?this.cache.addSpriteSheet(this.key,e.data,this.config,this.data):this.cache.addSpriteSheet(this.key,this.data,this.config,e.data)):this.cache.addSpriteSheet(this.key,this.data,this.config)}});o.register("spritesheet",function(e,i,h,s){if(Array.isArray(e))for(var l=0;l{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(23906),o=t(41299),r=t(74099),n=t(95540),e=t(41212),i=new a({Extends:o,initialize:function(s,l,f,u){var d="text",p="txt",g=s.cacheManager.text;if(e(l)){var x=l;l=n(x,"key"),f=n(x,"url"),u=n(x,"xhrSettings"),p=n(x,"extension",p),d=n(x,"type",d),g=n(x,"cache",g)}var y={type:d,cache:g,extension:p,responseType:"text",key:l,url:f,xhrSettings:u};o.call(this,s,y)},onProcess:function(){this.state=v.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});r.register("text",function(h,s,l){if(Array.isArray(h))for(var f=0;f{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(23906),o=t(41299),r=t(74099),n=t(95540),e=t(41212),i=t(80341),h=new a({Extends:o,initialize:function(l,f,u,d){var p="csv";if(e(f)){var g=f;f=n(g,"key"),u=n(g,"url"),d=n(g,"xhrSettings"),p=n(g,"extension",p)}var x={type:"tilemapCSV",cache:l.cacheManager.tilemap,extension:p,responseType:"text",key:f,url:u,xhrSettings:d};o.call(this,l,x),this.tilemapFormat=i.CSV},onProcess:function(){this.state=v.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var s={format:this.tilemapFormat,data:this.data};this.cache.add(this.key,s)}});r.register("tilemapCSV",function(s,l,f){if(Array.isArray(s))for(var u=0;u{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(74099),o=t(518),r=t(80341),n=new a({Extends:o,initialize:function(i,h,s,l){o.call(this,i,h,s,l),this.type="tilemapJSON",this.cache=i.cacheManager.tilemap},addToCache:function(){var e={format:r.WELTMEISTER,data:this.data};this.cache.add(this.key,e)}});v.register("tilemapImpact",function(e,i,h){if(Array.isArray(e))for(var s=0;s{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(74099),o=t(518),r=t(80341),n=new a({Extends:o,initialize:function(i,h,s,l){o.call(this,i,h,s,l),this.type="tilemapJSON",this.cache=i.cacheManager.tilemap},addToCache:function(){var e={format:r.TILED_JSON,data:this.data};this.cache.add(this.key,e)}});v.register("tilemapTiledJSON",function(e,i,h){if(Array.isArray(e))for(var s=0;s{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(74099),o=t(95540),r=t(19550),n=t(41212),e=t(26430),i=t(78776),h=new a({Extends:e,initialize:function(l,f,u,d,p,g){var x,y;if(n(f)){var C=f;f=o(C,"key"),x=new r(l,{key:f,url:o(C,"textureURL"),extension:o(C,"textureExtension","png"),normalMap:o(C,"normalMap"),xhrSettings:o(C,"textureXhrSettings")}),y=new i(l,{key:f,url:o(C,"atlasURL"),extension:o(C,"atlasExtension","txt"),xhrSettings:o(C,"atlasXhrSettings")})}else x=new r(l,f,u,p),y=new i(l,f,d,g);x.linkFile?e.call(this,l,"unityatlas",f,[x,y,x.linkFile]):e.call(this,l,"unityatlas",f,[x,y])},addToCache:function(){if(this.isReadyToProcess()){var s=this.files[0],l=this.files[1],f=this.files[2]?this.files[2].data:null;this.loader.textureManager.addUnityAtlas(s.key,s.data,l.data,f),this.complete=!0}}});v.register("unityAtlas",function(s,l,f,u,d){var p;if(Array.isArray(s))for(var g=0;g{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(23906),o=t(41299),r=t(74099),n=t(98356),e=t(95540),i=t(41212),h=new a({Extends:o,initialize:function(l,f,u,d){if(d===void 0&&(d=!1),i(f)){var p=f;f=e(p,"key"),u=e(p,"url",[]),d=e(p,"noAudio",!1)}var g=l.systems.game.device.video.getVideoURL(u);g||console.warn("VideoFile: No supported format for "+f);var x={type:"video",cache:l.cacheManager.video,extension:g.type,key:f,url:g.url,config:{noAudio:d}};o.call(this,l,x)},onProcess:function(){this.data={url:this.src,noAudio:this.config.noAudio,crossOrigin:this.crossOrigin},this.onProcessComplete()},load:function(){this.src=n(this,this.loader.baseURL),this.state=v.FILE_LOADED,this.loader.nextFile(this,!0)}});r.register("video",function(s,l,f){if(Array.isArray(s))for(var u=0;u{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(23906),o=t(41299),r=t(74099),n=t(95540),e=t(41212),i=t(56836),h=new a({Extends:o,initialize:function(l,f,u,d){var p="xml";if(e(f)){var g=f;f=n(g,"key"),u=n(g,"url"),d=n(g,"xhrSettings"),p=n(g,"extension",p)}var x={type:"xml",cache:l.cacheManager.xml,extension:p,responseType:"text",key:f,url:u,xhrSettings:d};o.call(this,l,x)},onProcess:function(){this.state=v.FILE_PROCESSING,this.data=i(this.xhrLoader.responseText),this.data?this.onProcessComplete():this.onProcessError()}});r.register("xml",function(s,l,f){if(Array.isArray(s))for(var u=0;u{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={AnimationJSONFile:t(14135),AsepriteFile:t(76272),AtlasJSONFile:t(38734),AtlasXMLFile:t(74599),AudioFile:t(21097),AudioSpriteFile:t(89524),BinaryFile:t(85722),BitmapFontFile:t(97025),CompressedTextureFile:t(69559),CSSFile:t(16024),GLSLFile:t(47931),HTML5AudioFile:t(89749),HTMLFile:t(88470),HTMLTextureFile:t(14643),ImageFile:t(19550),JSONFile:t(518),MultiAtlasFile:t(59327),MultiScriptFile:t(99297),OBJFile:t(41846),PackFile:t(58610),PluginFile:t(48988),SceneFile:t(88423),ScenePluginFile:t(56812),ScriptFile:t(34328),SpriteSheetFile:t(85035),SVGFile:t(67397),TextFile:t(78776),TilemapCSVFile:t(49477),TilemapImpactFile:t(40807),TilemapJSONFile:t(56775),UnityAtlasFile:t(25771),VideoFile:t(33720),XMLFile:t(57318)}},57777:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(23906),v=t(79291),o={Events:t(54899),FileTypes:t(64589),File:t(41299),FileTypesManager:t(74099),GetURL:t(98356),LoaderPlugin:t(74261),MergeXHRSettings:t(3374),MultiFile:t(26430),XHRLoader:t(84376),XHRSettings:t(92638)};o=v(!1,o,a),c.exports=o},53307:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){for(var a=0,v=0;v{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(6411),v=function(o,r){return a(o)/a(r)/a(o-r)};c.exports=v},30976:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return Math.floor(Math.random()*(a-t+1)+t)};c.exports=m},87842:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o,r){var n=(o-a)*.5,e=(r-v)*.5,i=t*t,h=t*i;return(2*v-2*o+n+e)*h+(-3*v+3*o-2*n-e)*i+n*t+v};c.exports=m},26302:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){a===void 0&&(a=0),v===void 0&&(v=10);var o=Math.pow(v,-a);return Math.ceil(t*o)/o};c.exports=m},45319:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){return Math.max(a,Math.min(v,t))};c.exports=m},39506:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(36383),v=function(o){return o*a.DEG_TO_RAD};c.exports=v},61241:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return Math.abs(t-a)};c.exports=m},38857:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(45319),v=t(83419),o=t(37867),r=t(29747),n=new o,e=new v({initialize:function i(h,s,l,f){h===void 0&&(h=0),s===void 0&&(s=0),l===void 0&&(l=0),f===void 0&&(f=i.DefaultOrder),this._x=h,this._y=s,this._z=l,this._order=f,this.onChangeCallback=r},x:{get:function(){return this._x},set:function(i){this._x=i,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(i){this._y=i,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(i){this._z=i,this.onChangeCallback(this)}},order:{get:function(){return this._order},set:function(i){this._order=i,this.onChangeCallback(this)}},set:function(i,h,s,l){return l===void 0&&(l=this._order),this._x=i,this._y=h,this._z=s,this._order=l,this.onChangeCallback(this),this},copy:function(i){return this.set(i.x,i.y,i.z,i.order)},setFromQuaternion:function(i,h,s){return h===void 0&&(h=this._order),s===void 0&&(s=!1),n.fromQuat(i),this.setFromRotationMatrix(n,h,s)},setFromRotationMatrix:function(i,h,s){h===void 0&&(h=this._order),s===void 0&&(s=!1);var l=i.val,f=l[0],u=l[4],d=l[8],p=l[1],g=l[5],x=l[9],y=l[2],C=l[6],P=l[10],M=0,R=0,I=0,L=.99999;switch(h){case"XYZ":{R=Math.asin(a(d,-1,1)),Math.abs(d){/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){if(t===0)return 1;for(var a=t;--t;)a*=t;return a};c.exports=m},99472:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return Math.random()*(a-t)+t};c.exports=m},77623:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){a===void 0&&(a=0),v===void 0&&(v=10);var o=Math.pow(v,-a);return Math.floor(t*o)/o};c.exports=m},62945:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(45319),v=function(o,r,n){return o=a(o,0,1),(n-r)*o+r};c.exports=v},38265:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return t/a/1e3};c.exports=m},78702:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return t==parseFloat(t)?!(t%2):void 0};c.exports=m},94883:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return t===parseFloat(t)?!(t%2):void 0};c.exports=m},28915:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){return(a-t)*v+t};c.exports=m},94908:c=>{/** - * @author Greg McLean - * @copyright 2021 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){return v===void 0&&(v=0),t.clone().lerp(a,v)};c.exports=m},94434:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=new a({initialize:function(r){this.val=new Float32Array(9),r?this.copy(r):this.identity()},clone:function(){return new v(this)},set:function(o){return this.copy(o)},copy:function(o){var r=this.val,n=o.val;return r[0]=n[0],r[1]=n[1],r[2]=n[2],r[3]=n[3],r[4]=n[4],r[5]=n[5],r[6]=n[6],r[7]=n[7],r[8]=n[8],this},fromMat4:function(o){var r=o.val,n=this.val;return n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=r[4],n[4]=r[5],n[5]=r[6],n[6]=r[8],n[7]=r[9],n[8]=r[10],this},fromArray:function(o){var r=this.val;return r[0]=o[0],r[1]=o[1],r[2]=o[2],r[3]=o[3],r[4]=o[4],r[5]=o[5],r[6]=o[6],r[7]=o[7],r[8]=o[8],this},identity:function(){var o=this.val;return o[0]=1,o[1]=0,o[2]=0,o[3]=0,o[4]=1,o[5]=0,o[6]=0,o[7]=0,o[8]=1,this},transpose:function(){var o=this.val,r=o[1],n=o[2],e=o[5];return o[1]=o[3],o[2]=o[6],o[3]=r,o[5]=o[7],o[6]=n,o[7]=e,this},invert:function(){var o=this.val,r=o[0],n=o[1],e=o[2],i=o[3],h=o[4],s=o[5],l=o[6],f=o[7],u=o[8],d=u*h-s*f,p=-u*i+s*l,g=f*i-h*l,x=r*d+n*p+e*g;return x?(x=1/x,o[0]=d*x,o[1]=(-u*n+e*f)*x,o[2]=(s*n-e*h)*x,o[3]=p*x,o[4]=(u*r-e*l)*x,o[5]=(-s*r+e*i)*x,o[6]=g*x,o[7]=(-f*r+n*l)*x,o[8]=(h*r-n*i)*x,this):null},adjoint:function(){var o=this.val,r=o[0],n=o[1],e=o[2],i=o[3],h=o[4],s=o[5],l=o[6],f=o[7],u=o[8];return o[0]=h*u-s*f,o[1]=e*f-n*u,o[2]=n*s-e*h,o[3]=s*l-i*u,o[4]=r*u-e*l,o[5]=e*i-r*s,o[6]=i*f-h*l,o[7]=n*l-r*f,o[8]=r*h-n*i,this},determinant:function(){var o=this.val,r=o[0],n=o[1],e=o[2],i=o[3],h=o[4],s=o[5],l=o[6],f=o[7],u=o[8];return r*(u*h-s*f)+n*(-u*i+s*l)+e*(f*i-h*l)},multiply:function(o){var r=this.val,n=r[0],e=r[1],i=r[2],h=r[3],s=r[4],l=r[5],f=r[6],u=r[7],d=r[8],p=o.val,g=p[0],x=p[1],y=p[2],C=p[3],P=p[4],M=p[5],R=p[6],I=p[7],L=p[8];return r[0]=g*n+x*h+y*f,r[1]=g*e+x*s+y*u,r[2]=g*i+x*l+y*d,r[3]=C*n+P*h+M*f,r[4]=C*e+P*s+M*u,r[5]=C*i+P*l+M*d,r[6]=R*n+I*h+L*f,r[7]=R*e+I*s+L*u,r[8]=R*i+I*l+L*d,this},translate:function(o){var r=this.val,n=o.x,e=o.y;return r[6]=n*r[0]+e*r[3]+r[6],r[7]=n*r[1]+e*r[4]+r[7],r[8]=n*r[2]+e*r[5]+r[8],this},rotate:function(o){var r=this.val,n=r[0],e=r[1],i=r[2],h=r[3],s=r[4],l=r[5],f=Math.sin(o),u=Math.cos(o);return r[0]=u*n+f*h,r[1]=u*e+f*s,r[2]=u*i+f*l,r[3]=u*h-f*n,r[4]=u*s-f*e,r[5]=u*l-f*i,this},scale:function(o){var r=this.val,n=o.x,e=o.y;return r[0]=n*r[0],r[1]=n*r[1],r[2]=n*r[2],r[3]=e*r[3],r[4]=e*r[4],r[5]=e*r[5],this},fromQuat:function(o){var r=o.x,n=o.y,e=o.z,i=o.w,h=r+r,s=n+n,l=e+e,f=r*h,u=r*s,d=r*l,p=n*s,g=n*l,x=e*l,y=i*h,C=i*s,P=i*l,M=this.val;return M[0]=1-(p+x),M[3]=u+P,M[6]=d-C,M[1]=u-P,M[4]=1-(f+x),M[7]=g+y,M[2]=d+C,M[5]=g-y,M[8]=1-(f+p),this},normalFromMat4:function(o){var r=o.val,n=this.val,e=r[0],i=r[1],h=r[2],s=r[3],l=r[4],f=r[5],u=r[6],d=r[7],p=r[8],g=r[9],x=r[10],y=r[11],C=r[12],P=r[13],M=r[14],R=r[15],I=e*f-i*l,L=e*u-h*l,B=e*d-s*l,N=i*u-h*f,G=i*d-s*f,V=h*d-s*u,K=p*P-g*C,j=p*M-x*C,J=p*R-y*C,X=g*M-x*P,Y=g*R-y*P,b=x*R-y*M,z=I*b-L*Y+B*X+N*J-G*j+V*K;return z?(z=1/z,n[0]=(f*b-u*Y+d*X)*z,n[1]=(u*J-l*b-d*j)*z,n[2]=(l*Y-f*J+d*K)*z,n[3]=(h*Y-i*b-s*X)*z,n[4]=(e*b-h*J+s*j)*z,n[5]=(i*J-e*Y-s*K)*z,n[6]=(P*V-M*G+R*N)*z,n[7]=(M*B-C*V-R*L)*z,n[8]=(C*G-P*B+R*I)*z,this):null}});c.exports=v},37867:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(25836),o=1e-6,r=new a({initialize:function(f){this.val=new Float32Array(16),f?this.copy(f):this.identity()},clone:function(){return new r(this)},set:function(l){return this.copy(l)},setValues:function(l,f,u,d,p,g,x,y,C,P,M,R,I,L,B,N){var G=this.val;return G[0]=l,G[1]=f,G[2]=u,G[3]=d,G[4]=p,G[5]=g,G[6]=x,G[7]=y,G[8]=C,G[9]=P,G[10]=M,G[11]=R,G[12]=I,G[13]=L,G[14]=B,G[15]=N,this},copy:function(l){var f=l.val;return this.setValues(f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7],f[8],f[9],f[10],f[11],f[12],f[13],f[14],f[15])},fromArray:function(l){return this.setValues(l[0],l[1],l[2],l[3],l[4],l[5],l[6],l[7],l[8],l[9],l[10],l[11],l[12],l[13],l[14],l[15])},zero:function(){return this.setValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)},transform:function(l,f,u){var d=n.fromQuat(u),p=d.val,g=f.x,x=f.y,y=f.z;return this.setValues(p[0]*g,p[1]*g,p[2]*g,0,p[4]*x,p[5]*x,p[6]*x,0,p[8]*y,p[9]*y,p[10]*y,0,l.x,l.y,l.z,1)},xyz:function(l,f,u){this.identity();var d=this.val;return d[12]=l,d[13]=f,d[14]=u,this},scaling:function(l,f,u){this.zero();var d=this.val;return d[0]=l,d[5]=f,d[10]=u,d[15]=1,this},identity:function(){return this.setValues(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)},transpose:function(){var l=this.val,f=l[1],u=l[2],d=l[3],p=l[6],g=l[7],x=l[11];return l[1]=l[4],l[2]=l[8],l[3]=l[12],l[4]=f,l[6]=l[9],l[7]=l[13],l[8]=u,l[9]=p,l[11]=l[14],l[12]=d,l[13]=g,l[14]=x,this},getInverse:function(l){return this.copy(l),this.invert()},invert:function(){var l=this.val,f=l[0],u=l[1],d=l[2],p=l[3],g=l[4],x=l[5],y=l[6],C=l[7],P=l[8],M=l[9],R=l[10],I=l[11],L=l[12],B=l[13],N=l[14],G=l[15],V=f*x-u*g,K=f*y-d*g,j=f*C-p*g,J=u*y-d*x,X=u*C-p*x,Y=d*C-p*y,b=P*B-M*L,z=P*N-R*L,W=P*G-I*L,H=M*N-R*B,Z=M*G-I*B,Q=R*G-I*N,k=V*Q-K*Z+j*H+J*W-X*z+Y*b;return k?(k=1/k,this.setValues((x*Q-y*Z+C*H)*k,(d*Z-u*Q-p*H)*k,(B*Y-N*X+G*J)*k,(R*X-M*Y-I*J)*k,(y*W-g*Q-C*z)*k,(f*Q-d*W+p*z)*k,(N*j-L*Y-G*K)*k,(P*Y-R*j+I*K)*k,(g*Z-x*W+C*b)*k,(u*W-f*Z-p*b)*k,(L*X-B*j+G*V)*k,(M*j-P*X-I*V)*k,(x*z-g*H-y*b)*k,(f*H-u*z+d*b)*k,(B*K-L*J-N*V)*k,(P*J-M*K+R*V)*k)):this},adjoint:function(){var l=this.val,f=l[0],u=l[1],d=l[2],p=l[3],g=l[4],x=l[5],y=l[6],C=l[7],P=l[8],M=l[9],R=l[10],I=l[11],L=l[12],B=l[13],N=l[14],G=l[15];return this.setValues(x*(R*G-I*N)-M*(y*G-C*N)+B*(y*I-C*R),-(u*(R*G-I*N)-M*(d*G-p*N)+B*(d*I-p*R)),u*(y*G-C*N)-x*(d*G-p*N)+B*(d*C-p*y),-(u*(y*I-C*R)-x*(d*I-p*R)+M*(d*C-p*y)),-(g*(R*G-I*N)-P*(y*G-C*N)+L*(y*I-C*R)),f*(R*G-I*N)-P*(d*G-p*N)+L*(d*I-p*R),-(f*(y*G-C*N)-g*(d*G-p*N)+L*(d*C-p*y)),f*(y*I-C*R)-g*(d*I-p*R)+P*(d*C-p*y),g*(M*G-I*B)-P*(x*G-C*B)+L*(x*I-C*M),-(f*(M*G-I*B)-P*(u*G-p*B)+L*(u*I-p*M)),f*(x*G-C*B)-g*(u*G-p*B)+L*(u*C-p*x),-(f*(x*I-C*M)-g*(u*I-p*M)+P*(u*C-p*x)),-(g*(M*N-R*B)-P*(x*N-y*B)+L*(x*R-y*M)),f*(M*N-R*B)-P*(u*N-d*B)+L*(u*R-d*M),-(f*(x*N-y*B)-g*(u*N-d*B)+L*(u*y-d*x)),f*(x*R-y*M)-g*(u*R-d*M)+P*(u*y-d*x))},determinant:function(){var l=this.val,f=l[0],u=l[1],d=l[2],p=l[3],g=l[4],x=l[5],y=l[6],C=l[7],P=l[8],M=l[9],R=l[10],I=l[11],L=l[12],B=l[13],N=l[14],G=l[15],V=f*x-u*g,K=f*y-d*g,j=f*C-p*g,J=u*y-d*x,X=u*C-p*x,Y=d*C-p*y,b=P*B-M*L,z=P*N-R*L,W=P*G-I*L,H=M*N-R*B,Z=M*G-I*B,Q=R*G-I*N;return V*Q-K*Z+j*H+J*W-X*z+Y*b},multiply:function(l){var f=this.val,u=f[0],d=f[1],p=f[2],g=f[3],x=f[4],y=f[5],C=f[6],P=f[7],M=f[8],R=f[9],I=f[10],L=f[11],B=f[12],N=f[13],G=f[14],V=f[15],K=l.val,j=K[0],J=K[1],X=K[2],Y=K[3];return f[0]=j*u+J*x+X*M+Y*B,f[1]=j*d+J*y+X*R+Y*N,f[2]=j*p+J*C+X*I+Y*G,f[3]=j*g+J*P+X*L+Y*V,j=K[4],J=K[5],X=K[6],Y=K[7],f[4]=j*u+J*x+X*M+Y*B,f[5]=j*d+J*y+X*R+Y*N,f[6]=j*p+J*C+X*I+Y*G,f[7]=j*g+J*P+X*L+Y*V,j=K[8],J=K[9],X=K[10],Y=K[11],f[8]=j*u+J*x+X*M+Y*B,f[9]=j*d+J*y+X*R+Y*N,f[10]=j*p+J*C+X*I+Y*G,f[11]=j*g+J*P+X*L+Y*V,j=K[12],J=K[13],X=K[14],Y=K[15],f[12]=j*u+J*x+X*M+Y*B,f[13]=j*d+J*y+X*R+Y*N,f[14]=j*p+J*C+X*I+Y*G,f[15]=j*g+J*P+X*L+Y*V,this},multiplyLocal:function(l){var f=this.val,u=l.val;return this.setValues(f[0]*u[0]+f[1]*u[4]+f[2]*u[8]+f[3]*u[12],f[0]*u[1]+f[1]*u[5]+f[2]*u[9]+f[3]*u[13],f[0]*u[2]+f[1]*u[6]+f[2]*u[10]+f[3]*u[14],f[0]*u[3]+f[1]*u[7]+f[2]*u[11]+f[3]*u[15],f[4]*u[0]+f[5]*u[4]+f[6]*u[8]+f[7]*u[12],f[4]*u[1]+f[5]*u[5]+f[6]*u[9]+f[7]*u[13],f[4]*u[2]+f[5]*u[6]+f[6]*u[10]+f[7]*u[14],f[4]*u[3]+f[5]*u[7]+f[6]*u[11]+f[7]*u[15],f[8]*u[0]+f[9]*u[4]+f[10]*u[8]+f[11]*u[12],f[8]*u[1]+f[9]*u[5]+f[10]*u[9]+f[11]*u[13],f[8]*u[2]+f[9]*u[6]+f[10]*u[10]+f[11]*u[14],f[8]*u[3]+f[9]*u[7]+f[10]*u[11]+f[11]*u[15],f[12]*u[0]+f[13]*u[4]+f[14]*u[8]+f[15]*u[12],f[12]*u[1]+f[13]*u[5]+f[14]*u[9]+f[15]*u[13],f[12]*u[2]+f[13]*u[6]+f[14]*u[10]+f[15]*u[14],f[12]*u[3]+f[13]*u[7]+f[14]*u[11]+f[15]*u[15])},premultiply:function(l){return this.multiplyMatrices(l,this)},multiplyMatrices:function(l,f){var u=l.val,d=f.val,p=u[0],g=u[4],x=u[8],y=u[12],C=u[1],P=u[5],M=u[9],R=u[13],I=u[2],L=u[6],B=u[10],N=u[14],G=u[3],V=u[7],K=u[11],j=u[15],J=d[0],X=d[4],Y=d[8],b=d[12],z=d[1],W=d[5],H=d[9],Z=d[13],Q=d[2],k=d[6],et=d[10],st=d[14],rt=d[3],ot=d[7],ft=d[11],at=d[15];return this.setValues(p*J+g*z+x*Q+y*rt,C*J+P*z+M*Q+R*rt,I*J+L*z+B*Q+N*rt,G*J+V*z+K*Q+j*rt,p*X+g*W+x*k+y*ot,C*X+P*W+M*k+R*ot,I*X+L*W+B*k+N*ot,G*X+V*W+K*k+j*ot,p*Y+g*H+x*et+y*ft,C*Y+P*H+M*et+R*ft,I*Y+L*H+B*et+N*ft,G*Y+V*H+K*et+j*ft,p*b+g*Z+x*st+y*at,C*b+P*Z+M*st+R*at,I*b+L*Z+B*st+N*at,G*b+V*Z+K*st+j*at)},translate:function(l){return this.translateXYZ(l.x,l.y,l.z)},translateXYZ:function(l,f,u){var d=this.val;return d[12]=d[0]*l+d[4]*f+d[8]*u+d[12],d[13]=d[1]*l+d[5]*f+d[9]*u+d[13],d[14]=d[2]*l+d[6]*f+d[10]*u+d[14],d[15]=d[3]*l+d[7]*f+d[11]*u+d[15],this},scale:function(l){return this.scaleXYZ(l.x,l.y,l.z)},scaleXYZ:function(l,f,u){var d=this.val;return d[0]=d[0]*l,d[1]=d[1]*l,d[2]=d[2]*l,d[3]=d[3]*l,d[4]=d[4]*f,d[5]=d[5]*f,d[6]=d[6]*f,d[7]=d[7]*f,d[8]=d[8]*u,d[9]=d[9]*u,d[10]=d[10]*u,d[11]=d[11]*u,this},makeRotationAxis:function(l,f){var u=Math.cos(f),d=Math.sin(f),p=1-u,g=l.x,x=l.y,y=l.z,C=p*g,P=p*x;return this.setValues(C*g+u,C*x-d*y,C*y+d*x,0,C*x+d*y,P*x+u,P*y-d*g,0,C*y-d*x,P*y+d*g,p*y*y+u,0,0,0,0,1)},rotate:function(l,f){var u=this.val,d=f.x,p=f.y,g=f.z,x=Math.sqrt(d*d+p*p+g*g);if(Math.abs(x){/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){return Math.min(t+a,v)};c.exports=m},50040:c=>{/** - * @author Vladislav Forsh - * @copyright 2021 RoboWhale - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){var a=t.length;if(a===0)return 0;t.sort(function(o,r){return o-r});var v=Math.floor(a/2);return a%2===0?(t[v]+t[v-1])/2:t[v]};c.exports=m},37204:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){return Math.max(t-a,v)};c.exports=m},65201:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){v===void 0&&(v=a+1);var r=(t-a)/(v-a);return r>1?o!==void 0?(r=(o-t)/(o-v),r<0&&(r=0)):r=1:r<0&&(r=0),r};c.exports=m},15746:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(94434),o=t(29747),r=t(25836),n=1e-6,e=new Int8Array([1,2,0]),i=new Float32Array([0,0,0]),h=new r(1,0,0),s=new r(0,1,0),l=new r,f=new v,u=new a({initialize:function(p,g,x,y){this.onChangeCallback=o,this.set(p,g,x,y)},x:{get:function(){return this._x},set:function(d){this._x=d,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(d){this._y=d,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(d){this._z=d,this.onChangeCallback(this)}},w:{get:function(){return this._w},set:function(d){this._w=d,this.onChangeCallback(this)}},copy:function(d){return this.set(d)},set:function(d,p,g,x,y){return y===void 0&&(y=!0),typeof d=="object"?(this._x=d.x||0,this._y=d.y||0,this._z=d.z||0,this._w=d.w||0):(this._x=d||0,this._y=p||0,this._z=g||0,this._w=x||0),y&&this.onChangeCallback(this),this},add:function(d){return this._x+=d.x,this._y+=d.y,this._z+=d.z,this._w+=d.w,this.onChangeCallback(this),this},subtract:function(d){return this._x-=d.x,this._y-=d.y,this._z-=d.z,this._w-=d.w,this.onChangeCallback(this),this},scale:function(d){return this._x*=d,this._y*=d,this._z*=d,this._w*=d,this.onChangeCallback(this),this},length:function(){var d=this.x,p=this.y,g=this.z,x=this.w;return Math.sqrt(d*d+p*p+g*g+x*x)},lengthSq:function(){var d=this.x,p=this.y,g=this.z,x=this.w;return d*d+p*p+g*g+x*x},normalize:function(){var d=this.x,p=this.y,g=this.z,x=this.w,y=d*d+p*p+g*g+x*x;return y>0&&(y=1/Math.sqrt(y),this._x=d*y,this._y=p*y,this._z=g*y,this._w=x*y),this.onChangeCallback(this),this},dot:function(d){return this.x*d.x+this.y*d.y+this.z*d.z+this.w*d.w},lerp:function(d,p){p===void 0&&(p=0);var g=this.x,x=this.y,y=this.z,C=this.w;return this.set(g+p*(d.x-g),x+p*(d.y-x),y+p*(d.z-y),C+p*(d.w-C))},rotationTo:function(d,p){var g=d.x*p.x+d.y*p.y+d.z*p.z;return g<-.999999?(l.copy(h).cross(d).length().999999?this.set(0,0,0,1):(l.copy(d).cross(p),this._x=l.x,this._y=l.y,this._z=l.z,this._w=1+g,this.normalize())},setAxes:function(d,p,g){var x=f.val;return x[0]=p.x,x[3]=p.y,x[6]=p.z,x[1]=g.x,x[4]=g.y,x[7]=g.z,x[2]=-d.x,x[5]=-d.y,x[8]=-d.z,this.fromMat3(f).normalize()},identity:function(){return this.set(0,0,0,1)},setAxisAngle:function(d,p){p=p*.5;var g=Math.sin(p);return this.set(g*d.x,g*d.y,g*d.z,Math.cos(p))},multiply:function(d){var p=this.x,g=this.y,x=this.z,y=this.w,C=d.x,P=d.y,M=d.z,R=d.w;return this.set(p*R+y*C+g*M-x*P,g*R+y*P+x*C-p*M,x*R+y*M+p*P-g*C,y*R-p*C-g*P-x*M)},slerp:function(d,p){var g=this.x,x=this.y,y=this.z,C=this.w,P=d.x,M=d.y,R=d.z,I=d.w,L=g*P+x*M+y*R+C*I;L<0&&(L=-L,P=-P,M=-M,R=-R,I=-I);var B=1-p,N=p;if(1-L>n){var G=Math.acos(L),V=Math.sin(G);B=Math.sin((1-p)*G)/V,N=Math.sin(p*G)/V}return this.set(B*g+N*P,B*x+N*M,B*y+N*R,B*C+N*I)},invert:function(){var d=this.x,p=this.y,g=this.z,x=this.w,y=d*d+p*p+g*g+x*x,C=y?1/y:0;return this.set(-d*C,-p*C,-g*C,x*C)},conjugate:function(){return this._x=-this.x,this._y=-this.y,this._z=-this.z,this.onChangeCallback(this),this},rotateX:function(d){d*=.5;var p=this.x,g=this.y,x=this.z,y=this.w,C=Math.sin(d),P=Math.cos(d);return this.set(p*P+y*C,g*P+x*C,x*P-g*C,y*P-p*C)},rotateY:function(d){d*=.5;var p=this.x,g=this.y,x=this.z,y=this.w,C=Math.sin(d),P=Math.cos(d);return this.set(p*P-x*C,g*P+y*C,x*P+p*C,y*P-g*C)},rotateZ:function(d){d*=.5;var p=this.x,g=this.y,x=this.z,y=this.w,C=Math.sin(d),P=Math.cos(d);return this.set(p*P+g*C,g*P-p*C,x*P+y*C,y*P-x*C)},calculateW:function(){var d=this.x,p=this.y,g=this.z;return this.w=-Math.sqrt(1-d*d-p*p-g*g),this},setFromEuler:function(d,p){var g=d.x/2,x=d.y/2,y=d.z/2,C=Math.cos(g),P=Math.cos(x),M=Math.cos(y),R=Math.sin(g),I=Math.sin(x),L=Math.sin(y);switch(d.order){case"XYZ":{this.set(R*P*M+C*I*L,C*I*M-R*P*L,C*P*L+R*I*M,C*P*M-R*I*L,p);break}case"YXZ":{this.set(R*P*M+C*I*L,C*I*M-R*P*L,C*P*L-R*I*M,C*P*M+R*I*L,p);break}case"ZXY":{this.set(R*P*M-C*I*L,C*I*M+R*P*L,C*P*L+R*I*M,C*P*M-R*I*L,p);break}case"ZYX":{this.set(R*P*M-C*I*L,C*I*M+R*P*L,C*P*L-R*I*M,C*P*M+R*I*L,p);break}case"YZX":{this.set(R*P*M+C*I*L,C*I*M+R*P*L,C*P*L-R*I*M,C*P*M-R*I*L,p);break}case"XZY":{this.set(R*P*M-C*I*L,C*I*M-R*P*L,C*P*L+R*I*M,C*P*M+R*I*L,p);break}}return this},setFromRotationMatrix:function(d){var p=d.val,g=p[0],x=p[4],y=p[8],C=p[1],P=p[5],M=p[9],R=p[2],I=p[6],L=p[10],B=g+P+L,N;return B>0?(N=.5/Math.sqrt(B+1),this.set((I-M)*N,(y-R)*N,(C-x)*N,.25/N)):g>P&&g>L?(N=2*Math.sqrt(1+g-P-L),this.set(.25*N,(x+C)/N,(y+R)/N,(I-M)/N)):P>L?(N=2*Math.sqrt(1+P-g-L),this.set((x+C)/N,.25*N,(M+I)/N,(y-R)/N)):(N=2*Math.sqrt(1+L-g-P),this.set((y+R)/N,(M+I)/N,.25*N,(C-x)/N)),this},fromMat3:function(d){var p=d.val,g=p[0]+p[4]+p[8],x;if(g>0)x=Math.sqrt(g+1),this.w=.5*x,x=.5/x,this._x=(p[7]-p[5])*x,this._y=(p[2]-p[6])*x,this._z=(p[3]-p[1])*x;else{var y=0;p[4]>p[0]&&(y=1),p[8]>p[y*3+y]&&(y=2);var C=e[y],P=e[C];x=Math.sqrt(p[y*3+y]-p[C*3+C]-p[P*3+P]+1),i[y]=.5*x,x=.5/x,i[C]=(p[C*3+y]+p[y*3+C])*x,i[P]=(p[P*3+y]+p[y*3+P])*x,this._x=i[0],this._y=i[1],this._z=i[2],this._w=(p[P*3+C]-p[C*3+P])*x}return this.onChangeCallback(this),this}});c.exports=u},43396:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(36383),v=function(o){return o*a.RAD_TO_DEG};c.exports=v},74362:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){a===void 0&&(a=1);var v=Math.random()*2*Math.PI;return t.x=Math.cos(v)*a,t.y=Math.sin(v)*a,t};c.exports=m},60706:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){a===void 0&&(a=1);var v=Math.random()*2*Math.PI,o=Math.random()*2-1,r=Math.sqrt(1-o*o)*a;return t.x=Math.cos(v)*r,t.y=Math.sin(v)*r,t.z=o*a,t};c.exports=m},67421:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return a===void 0&&(a=1),t.x=(Math.random()*2-1)*a,t.y=(Math.random()*2-1)*a,t.z=(Math.random()*2-1)*a,t.w=(Math.random()*2-1)*a,t};c.exports=m},36305:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){var v=t.x,o=t.y;return t.x=v*Math.cos(a)-o*Math.sin(a),t.y=v*Math.sin(a)+o*Math.cos(a),t};c.exports=m},11520:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){var r=Math.cos(o),n=Math.sin(o),e=t.x-a,i=t.y-v;return t.x=e*r-i*n+a,t.y=e*n+i*r+v,t};c.exports=m},1163:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o,r){var n=o+Math.atan2(t.y-v,t.x-a);return t.x=a+r*Math.cos(n),t.y=v+r*Math.sin(n),t};c.exports=m},70336:c=>{/** - * @author samme - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o,r){return t.x=a+r*Math.cos(o),t.y=v+r*Math.sin(o),t};c.exports=m},72678:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(25836),v=t(37867),o=t(15746),r=new v,n=new o,e=new a,i=function(h,s,l){return n.setAxisAngle(s,l),r.fromRotationTranslation(n,e.set(0,0,0)),h.transformMat4(r)};c.exports=i},2284:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return t>0?Math.ceil(t):Math.floor(t)};c.exports=m},41013:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){a===void 0&&(a=0),v===void 0&&(v=10);var o=Math.pow(v,-a);return Math.round(t*o)/o};c.exports=m},16922:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){a===void 0&&(a=1),v===void 0&&(v=1),o===void 0&&(o=1),o*=Math.PI/t;for(var r=[],n=[],e=0;e{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){return t<=a?0:t>=v?1:(t=(t-a)/(v-a),t*t*(3-2*t))};c.exports=m},54261:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){return t=Math.max(0,Math.min(1,(t-a)/(v-a))),t*t*t*(t*(t*6-15)+10)};c.exports=m},44408:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(26099),v=function(o,r,n,e){e===void 0&&(e=new a);var i=0,h=0,s=r*n;return o>0&&o<=s&&(o>r-1?(h=Math.floor(o/r),i=o-h*r):i=o),e.set(i,h)};c.exports=v},85955:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(26099),v=function(o,r,n,e,i,h,s,l){l===void 0&&(l=new a);var f=Math.sin(i),u=Math.cos(i),d=u*h,p=f*h,g=-f*s,x=u*s,y=1/(d*x+g*-p);return l.x=x*y*o+-g*y*r+(e*g-n*x)*y,l.y=d*y*r+-p*y*o+(-e*d+n*p)*y,l};c.exports=v},26099:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(43855),o=new a({initialize:function(n,e){this.x=0,this.y=0,typeof n=="object"?(this.x=n.x||0,this.y=n.y||0):(e===void 0&&(e=n),this.x=n||0,this.y=e||0)},clone:function(){return new o(this.x,this.y)},copy:function(r){return this.x=r.x||0,this.y=r.y||0,this},setFromObject:function(r){return this.x=r.x||0,this.y=r.y||0,this},set:function(r,n){return n===void 0&&(n=r),this.x=r,this.y=n,this},setTo:function(r,n){return this.set(r,n)},setToPolar:function(r,n){return n==null&&(n=1),this.x=Math.cos(r)*n,this.y=Math.sin(r)*n,this},equals:function(r){return this.x===r.x&&this.y===r.y},fuzzyEquals:function(r,n){return v(this.x,r.x,n)&&v(this.y,r.y,n)},angle:function(){var r=Math.atan2(this.y,this.x);return r<0&&(r+=2*Math.PI),r},setAngle:function(r){return this.setToPolar(r,this.length())},add:function(r){return this.x+=r.x,this.y+=r.y,this},subtract:function(r){return this.x-=r.x,this.y-=r.y,this},multiply:function(r){return this.x*=r.x,this.y*=r.y,this},scale:function(r){return isFinite(r)?(this.x*=r,this.y*=r):(this.x=0,this.y=0),this},divide:function(r){return this.x/=r.x,this.y/=r.y,this},negate:function(){return this.x=-this.x,this.y=-this.y,this},distance:function(r){var n=r.x-this.x,e=r.y-this.y;return Math.sqrt(n*n+e*e)},distanceSq:function(r){var n=r.x-this.x,e=r.y-this.y;return n*n+e*e},length:function(){var r=this.x,n=this.y;return Math.sqrt(r*r+n*n)},setLength:function(r){return this.normalize().scale(r)},lengthSq:function(){var r=this.x,n=this.y;return r*r+n*n},normalize:function(){var r=this.x,n=this.y,e=r*r+n*n;return e>0&&(e=1/Math.sqrt(e),this.x=r*e,this.y=n*e),this},normalizeRightHand:function(){var r=this.x;return this.x=this.y*-1,this.y=r,this},normalizeLeftHand:function(){var r=this.x;return this.x=this.y,this.y=r*-1,this},dot:function(r){return this.x*r.x+this.y*r.y},cross:function(r){return this.x*r.y-this.y*r.x},lerp:function(r,n){n===void 0&&(n=0);var e=this.x,i=this.y;return this.x=e+n*(r.x-e),this.y=i+n*(r.y-i),this},transformMat3:function(r){var n=this.x,e=this.y,i=r.val;return this.x=i[0]*n+i[3]*e+i[6],this.y=i[1]*n+i[4]*e+i[7],this},transformMat4:function(r){var n=this.x,e=this.y,i=r.val;return this.x=i[0]*n+i[4]*e+i[12],this.y=i[1]*n+i[5]*e+i[13],this},reset:function(){return this.x=0,this.y=0,this},limit:function(r){var n=this.length();return n&&n>r&&this.scale(r/n),this},reflect:function(r){return r=r.clone().normalize(),this.subtract(r.scale(2*this.dot(r)))},mirror:function(r){return this.reflect(r).negate()},rotate:function(r){var n=Math.cos(r),e=Math.sin(r);return this.set(n*this.x-e*this.y,e*this.x+n*this.y)},project:function(r){var n=this.dot(r)/r.dot(r);return this.copy(r).scale(n)}});o.ZERO=new o,o.RIGHT=new o(1,0),o.LEFT=new o(-1,0),o.UP=new o(0,-1),o.DOWN=new o(0,1),o.ONE=new o(1,1),c.exports=o},25836:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=new a({initialize:function(r,n,e){this.x=0,this.y=0,this.z=0,typeof r=="object"?(this.x=r.x||0,this.y=r.y||0,this.z=r.z||0):(this.x=r||0,this.y=n||0,this.z=e||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},min:function(o){return this.x=Math.min(this.x,o.x),this.y=Math.min(this.y,o.y),this.z=Math.min(this.z,o.z),this},max:function(o){return this.x=Math.max(this.x,o.x),this.y=Math.max(this.y,o.y),this.z=Math.max(this.z,o.z),this},clone:function(){return new v(this.x,this.y,this.z)},addVectors:function(o,r){return this.x=o.x+r.x,this.y=o.y+r.y,this.z=o.z+r.z,this},crossVectors:function(o,r){var n=o.x,e=o.y,i=o.z,h=r.x,s=r.y,l=r.z;return this.x=e*l-i*s,this.y=i*h-n*l,this.z=n*s-e*h,this},equals:function(o){return this.x===o.x&&this.y===o.y&&this.z===o.z},copy:function(o){return this.x=o.x,this.y=o.y,this.z=o.z||0,this},set:function(o,r,n){return typeof o=="object"?(this.x=o.x||0,this.y=o.y||0,this.z=o.z||0):(this.x=o||0,this.y=r||0,this.z=n||0),this},setFromMatrixPosition:function(o){return this.fromArray(o.val,12)},setFromMatrixColumn:function(o,r){return this.fromArray(o.val,r*4)},fromArray:function(o,r){return r===void 0&&(r=0),this.x=o[r],this.y=o[r+1],this.z=o[r+2],this},add:function(o){return this.x+=o.x,this.y+=o.y,this.z+=o.z||0,this},addScalar:function(o){return this.x+=o,this.y+=o,this.z+=o,this},addScale:function(o,r){return this.x+=o.x*r,this.y+=o.y*r,this.z+=o.z*r||0,this},subtract:function(o){return this.x-=o.x,this.y-=o.y,this.z-=o.z||0,this},multiply:function(o){return this.x*=o.x,this.y*=o.y,this.z*=o.z||1,this},scale:function(o){return isFinite(o)?(this.x*=o,this.y*=o,this.z*=o):(this.x=0,this.y=0,this.z=0),this},divide:function(o){return this.x/=o.x,this.y/=o.y,this.z/=o.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(o){var r=o.x-this.x,n=o.y-this.y,e=o.z-this.z||0;return Math.sqrt(r*r+n*n+e*e)},distanceSq:function(o){var r=o.x-this.x,n=o.y-this.y,e=o.z-this.z||0;return r*r+n*n+e*e},length:function(){var o=this.x,r=this.y,n=this.z;return Math.sqrt(o*o+r*r+n*n)},lengthSq:function(){var o=this.x,r=this.y,n=this.z;return o*o+r*r+n*n},normalize:function(){var o=this.x,r=this.y,n=this.z,e=o*o+r*r+n*n;return e>0&&(e=1/Math.sqrt(e),this.x=o*e,this.y=r*e,this.z=n*e),this},dot:function(o){return this.x*o.x+this.y*o.y+this.z*o.z},cross:function(o){var r=this.x,n=this.y,e=this.z,i=o.x,h=o.y,s=o.z;return this.x=n*s-e*h,this.y=e*i-r*s,this.z=r*h-n*i,this},lerp:function(o,r){r===void 0&&(r=0);var n=this.x,e=this.y,i=this.z;return this.x=n+r*(o.x-n),this.y=e+r*(o.y-e),this.z=i+r*(o.z-i),this},applyMatrix3:function(o){var r=this.x,n=this.y,e=this.z,i=o.val;return this.x=i[0]*r+i[3]*n+i[6]*e,this.y=i[1]*r+i[4]*n+i[7]*e,this.z=i[2]*r+i[5]*n+i[8]*e,this},applyMatrix4:function(o){var r=this.x,n=this.y,e=this.z,i=o.val,h=1/(i[3]*r+i[7]*n+i[11]*e+i[15]);return this.x=(i[0]*r+i[4]*n+i[8]*e+i[12])*h,this.y=(i[1]*r+i[5]*n+i[9]*e+i[13])*h,this.z=(i[2]*r+i[6]*n+i[10]*e+i[14])*h,this},transformMat3:function(o){var r=this.x,n=this.y,e=this.z,i=o.val;return this.x=r*i[0]+n*i[3]+e*i[6],this.y=r*i[1]+n*i[4]+e*i[7],this.z=r*i[2]+n*i[5]+e*i[8],this},transformMat4:function(o){var r=this.x,n=this.y,e=this.z,i=o.val;return this.x=i[0]*r+i[4]*n+i[8]*e+i[12],this.y=i[1]*r+i[5]*n+i[9]*e+i[13],this.z=i[2]*r+i[6]*n+i[10]*e+i[14],this},transformCoordinates:function(o){var r=this.x,n=this.y,e=this.z,i=o.val,h=r*i[0]+n*i[4]+e*i[8]+i[12],s=r*i[1]+n*i[5]+e*i[9]+i[13],l=r*i[2]+n*i[6]+e*i[10]+i[14],f=r*i[3]+n*i[7]+e*i[11]+i[15];return this.x=h/f,this.y=s/f,this.z=l/f,this},transformQuat:function(o){var r=this.x,n=this.y,e=this.z,i=o.x,h=o.y,s=o.z,l=o.w,f=l*r+h*e-s*n,u=l*n+s*r-i*e,d=l*e+i*n-h*r,p=-i*r-h*n-s*e;return this.x=f*l+p*-i+u*-s-d*-h,this.y=u*l+p*-h+d*-i-f*-s,this.z=d*l+p*-s+f*-h-u*-i,this},project:function(o){var r=this.x,n=this.y,e=this.z,i=o.val,h=i[0],s=i[1],l=i[2],f=i[3],u=i[4],d=i[5],p=i[6],g=i[7],x=i[8],y=i[9],C=i[10],P=i[11],M=i[12],R=i[13],I=i[14],L=i[15],B=1/(r*f+n*g+e*P+L);return this.x=(r*h+n*u+e*x+M)*B,this.y=(r*s+n*d+e*y+R)*B,this.z=(r*l+n*p+e*C+I)*B,this},projectViewMatrix:function(o,r){return this.applyMatrix4(o).applyMatrix4(r)},unprojectViewMatrix:function(o,r){return this.applyMatrix4(o).applyMatrix4(r)},unproject:function(o,r){var n=o.x,e=o.y,i=o.z,h=o.w,s=this.x-n,l=h-this.y-1-e,f=this.z;return this.x=2*s/i-1,this.y=2*l/h-1,this.z=2*f-1,this.project(r)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});v.ZERO=new v,v.RIGHT=new v(1,0,0),v.LEFT=new v(-1,0,0),v.UP=new v(0,-1,0),v.DOWN=new v(0,1,0),v.FORWARD=new v(0,0,1),v.BACK=new v(0,0,-1),v.ONE=new v(1,1,1),c.exports=v},61369:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=new a({initialize:function(r,n,e,i){this.x=0,this.y=0,this.z=0,this.w=0,typeof r=="object"?(this.x=r.x||0,this.y=r.y||0,this.z=r.z||0,this.w=r.w||0):(this.x=r||0,this.y=n||0,this.z=e||0,this.w=i||0)},clone:function(){return new v(this.x,this.y,this.z,this.w)},copy:function(o){return this.x=o.x,this.y=o.y,this.z=o.z||0,this.w=o.w||0,this},equals:function(o){return this.x===o.x&&this.y===o.y&&this.z===o.z&&this.w===o.w},set:function(o,r,n,e){return typeof o=="object"?(this.x=o.x||0,this.y=o.y||0,this.z=o.z||0,this.w=o.w||0):(this.x=o||0,this.y=r||0,this.z=n||0,this.w=e||0),this},add:function(o){return this.x+=o.x,this.y+=o.y,this.z+=o.z||0,this.w+=o.w||0,this},subtract:function(o){return this.x-=o.x,this.y-=o.y,this.z-=o.z||0,this.w-=o.w||0,this},scale:function(o){return this.x*=o,this.y*=o,this.z*=o,this.w*=o,this},length:function(){var o=this.x,r=this.y,n=this.z,e=this.w;return Math.sqrt(o*o+r*r+n*n+e*e)},lengthSq:function(){var o=this.x,r=this.y,n=this.z,e=this.w;return o*o+r*r+n*n+e*e},normalize:function(){var o=this.x,r=this.y,n=this.z,e=this.w,i=o*o+r*r+n*n+e*e;return i>0&&(i=1/Math.sqrt(i),this.x=o*i,this.y=r*i,this.z=n*i,this.w=e*i),this},dot:function(o){return this.x*o.x+this.y*o.y+this.z*o.z+this.w*o.w},lerp:function(o,r){r===void 0&&(r=0);var n=this.x,e=this.y,i=this.z,h=this.w;return this.x=n+r*(o.x-n),this.y=e+r*(o.y-e),this.z=i+r*(o.z-i),this.w=h+r*(o.w-h),this},multiply:function(o){return this.x*=o.x,this.y*=o.y,this.z*=o.z||1,this.w*=o.w||1,this},divide:function(o){return this.x/=o.x,this.y/=o.y,this.z/=o.z||1,this.w/=o.w||1,this},distance:function(o){var r=o.x-this.x,n=o.y-this.y,e=o.z-this.z||0,i=o.w-this.w||0;return Math.sqrt(r*r+n*n+e*e+i*i)},distanceSq:function(o){var r=o.x-this.x,n=o.y-this.y,e=o.z-this.z||0,i=o.w-this.w||0;return r*r+n*n+e*e+i*i},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(o){var r=this.x,n=this.y,e=this.z,i=this.w,h=o.val;return this.x=h[0]*r+h[4]*n+h[8]*e+h[12]*i,this.y=h[1]*r+h[5]*n+h[9]*e+h[13]*i,this.z=h[2]*r+h[6]*n+h[10]*e+h[14]*i,this.w=h[3]*r+h[7]*n+h[11]*e+h[15]*i,this},transformQuat:function(o){var r=this.x,n=this.y,e=this.z,i=o.x,h=o.y,s=o.z,l=o.w,f=l*r+h*e-s*n,u=l*n+s*r-i*e,d=l*e+i*n-h*r,p=-i*r-h*n-s*e;return this.x=f*l+p*-i+u*-s-d*-h,this.y=u*l+p*-h+d*-i-f*-s,this.z=d*l+p*-s+f*-h-u*-i,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});v.prototype.sub=v.prototype.subtract,v.prototype.mul=v.prototype.multiply,v.prototype.div=v.prototype.divide,v.prototype.dist=v.prototype.distance,v.prototype.distSq=v.prototype.distanceSq,v.prototype.len=v.prototype.length,v.prototype.lenSq=v.prototype.lengthSq,c.exports=v},60417:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){return Math.abs(t-a)<=v};c.exports=m},15994:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){var o=v-a;return a+((t-a)%o+o)%o};c.exports=m},31040:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){return Math.atan2(o-a,v-t)};c.exports=m},55495:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return Math.atan2(a.y-t.y,a.x-t.x)};c.exports=m},128:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return Math.atan2(a.x-t.x,a.y-t.y)};c.exports=m},41273:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){return Math.atan2(v-t,o-a)};c.exports=m},1432:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(36383),v=function(o){return o>Math.PI&&(o-=a.PI2),Math.abs(((o+a.TAU)%a.PI2-a.PI2)%a.PI2)};c.exports=v},12407:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return t=t%(2*Math.PI),t>=0?t:t+2*Math.PI};c.exports=m},53993:(c,m,t)=>{/** - * @author Richard Davey - * @author @samme - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(99472),v=function(){return a(-Math.PI,Math.PI)};c.exports=v},86564:(c,m,t)=>{/** - * @author Richard Davey - * @author @samme - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(99472),v=function(){return a(-180,180)};c.exports=v},90154:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(12407),v=function(o){return a(o+Math.PI)};c.exports=v},48736:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(36383),v=function(o,r,n){return n===void 0&&(n=.05),o===r||(Math.abs(r-o)<=n||Math.abs(r-o)>=a.PI2-n?o=r:(Math.abs(r-o)>Math.PI&&(ro?o+=n:r{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){var v=a-t;if(v===0)return 0;var o=Math.floor((v- -180)/360);return v-o*360};c.exports=m},86554:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(15994),v=function(o){return a(o,-Math.PI,Math.PI)};c.exports=v},30954:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(15994),v=function(o){return a(o,-180,180)};c.exports=v},25588:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={Between:t(31040),BetweenPoints:t(55495),BetweenPointsY:t(128),BetweenY:t(41273),CounterClockwise:t(1432),Normalize:t(12407),Random:t(53993),RandomDegrees:t(86564),Reverse:t(90154),RotateTo:t(48736),ShortestBetween:t(61430),Wrap:t(86554),WrapDegrees:t(30954)}},36383:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={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};c.exports=m},20339:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){var r=t-v,n=a-o;return Math.sqrt(r*r+n*n)};c.exports=m},52816:c=>{/** - * @author samme - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){var v=t.x-a.x,o=t.y-a.y;return Math.sqrt(v*v+o*o)};c.exports=m},64559:c=>{/** - * @author samme - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){var v=t.x-a.x,o=t.y-a.y;return v*v+o*o};c.exports=m},82340:c=>{/** - * @author samme - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){return Math.max(Math.abs(t-v),Math.abs(a-o))};c.exports=m},14390:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o,r){return r===void 0&&(r=2),Math.sqrt(Math.pow(v-t,r)+Math.pow(o-a,r))};c.exports=m},2243:c=>{/** - * @author samme - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){return Math.abs(t-v)+Math.abs(a-o)};c.exports=m},89774:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){var r=t-v,n=a-o;return r*r+n*n};c.exports=m},50994:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={Between:t(20339),BetweenPoints:t(52816),BetweenPointsSquared:t(64559),Chebyshev:t(82340),Power:t(14390),Snake:t(2243),Squared:t(89774)}},62640:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(54178),v=t(41521),o=t(79980),r=t(85433),n=t(99140),e=t(48857),i=t(81596),h=t(59133),s=t(98516),l=t(35248),f=t(82500),u=t(49752);c.exports={Power0:i,Power1:h.Out,Power2:r.Out,Power3:s.Out,Power4:l.Out,Linear:i,Quad:h.Out,Cubic:r.Out,Quart:s.Out,Quint:l.Out,Sine:f.Out,Expo:e.Out,Circ:o.Out,Elastic:n.Out,Back:a.Out,Bounce:v.Out,Stepped:u,"Quad.easeIn":h.In,"Cubic.easeIn":r.In,"Quart.easeIn":s.In,"Quint.easeIn":l.In,"Sine.easeIn":f.In,"Expo.easeIn":e.In,"Circ.easeIn":o.In,"Elastic.easeIn":n.In,"Back.easeIn":a.In,"Bounce.easeIn":v.In,"Quad.easeOut":h.Out,"Cubic.easeOut":r.Out,"Quart.easeOut":s.Out,"Quint.easeOut":l.Out,"Sine.easeOut":f.Out,"Expo.easeOut":e.Out,"Circ.easeOut":o.Out,"Elastic.easeOut":n.Out,"Back.easeOut":a.Out,"Bounce.easeOut":v.Out,"Quad.easeInOut":h.InOut,"Cubic.easeInOut":r.InOut,"Quart.easeInOut":s.InOut,"Quint.easeInOut":l.InOut,"Sine.easeInOut":f.InOut,"Expo.easeInOut":e.InOut,"Circ.easeInOut":o.InOut,"Elastic.easeInOut":n.InOut,"Back.easeInOut":a.InOut,"Bounce.easeInOut":v.InOut}},1639:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return a===void 0&&(a=1.70158),t*t*((a+1)*t-a)};c.exports=m},50099:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){a===void 0&&(a=1.70158);var v=a*1.525;return(t*=2)<1?.5*(t*t*((v+1)*t-v)):.5*((t-=2)*t*((v+1)*t+v)+2)};c.exports=m},41286:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return a===void 0&&(a=1.70158),--t*t*((a+1)*t+a)+1};c.exports=m},54178:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={In:t(1639),Out:t(41286),InOut:t(50099)}},59590:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return t=1-t,t<.36363636363636365?1-7.5625*t*t:t<.7272727272727273?1-(7.5625*(t-=.5454545454545454)*t+.75):t<.9090909090909091?1-(7.5625*(t-=.8181818181818182)*t+.9375):1-(7.5625*(t-=.9545454545454546)*t+.984375)};c.exports=m},41788:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){var a=!1;return t<.5?(t=1-t*2,a=!0):t=t*2-1,t<.36363636363636365?t=7.5625*t*t:t<.7272727272727273?t=7.5625*(t-=.5454545454545454)*t+.75:t<.9090909090909091?t=7.5625*(t-=.8181818181818182)*t+.9375:t=7.5625*(t-=.9545454545454546)*t+.984375,a?(1-t)*.5:t*.5+.5};c.exports=m},69905:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return t<.36363636363636365?7.5625*t*t:t<.7272727272727273?7.5625*(t-=.5454545454545454)*t+.75:t<.9090909090909091?7.5625*(t-=.8181818181818182)*t+.9375:7.5625*(t-=.9545454545454546)*t+.984375};c.exports=m},41521:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={In:t(59590),Out:t(69905),InOut:t(41788)}},91861:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return 1-Math.sqrt(1-t*t)};c.exports=m},4177:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)};c.exports=m},57512:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return Math.sqrt(1- --t*t)};c.exports=m},79980:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={In:t(91861),Out:t(57512),InOut:t(4177)}},51150:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return t*t*t};c.exports=m},82820:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)};c.exports=m},35033:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return--t*t*t+1};c.exports=m},85433:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={In:t(51150),Out:t(35033),InOut:t(82820)}},69965:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){if(a===void 0&&(a=.1),v===void 0&&(v=.1),t===0)return 0;if(t===1)return 1;var o=v/4;return a<1?a=1:o=v*Math.asin(1/a)/(2*Math.PI),-(a*Math.pow(2,10*(t-=1))*Math.sin((t-o)*(2*Math.PI)/v))};c.exports=m},50665:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){if(a===void 0&&(a=.1),v===void 0&&(v=.1),t===0)return 0;if(t===1)return 1;var o=v/4;return a<1?a=1:o=v*Math.asin(1/a)/(2*Math.PI),(t*=2)<1?-.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t-o)*(2*Math.PI)/v)):a*Math.pow(2,-10*(t-=1))*Math.sin((t-o)*(2*Math.PI)/v)*.5+1};c.exports=m},7744:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){if(a===void 0&&(a=.1),v===void 0&&(v=.1),t===0)return 0;if(t===1)return 1;var o=v/4;return a<1?a=1:o=v*Math.asin(1/a)/(2*Math.PI),a*Math.pow(2,-10*t)*Math.sin((t-o)*(2*Math.PI)/v)+1};c.exports=m},99140:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={In:t(69965),Out:t(7744),InOut:t(50665)}},24590:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return Math.pow(2,10*(t-1))-.001};c.exports=m},87844:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))};c.exports=m},89433:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return 1-Math.pow(2,-10*t)};c.exports=m},48857:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={In:t(24590),Out:t(89433),InOut:t(87844)}},48820:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={Back:t(54178),Bounce:t(41521),Circular:t(79980),Cubic:t(85433),Elastic:t(99140),Expo:t(48857),Linear:t(81596),Quadratic:t(59133),Quartic:t(98516),Quintic:t(35248),Sine:t(82500),Stepped:t(49752)}},7147:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return t};c.exports=m},81596:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports=t(7147)},34826:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return t*t};c.exports=m},20544:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)};c.exports=m},92029:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return t*(2-t)};c.exports=m},59133:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={In:t(34826),Out:t(92029),InOut:t(20544)}},64413:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return t*t*t*t};c.exports=m},78137:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)};c.exports=m},45840:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return 1- --t*t*t*t};c.exports=m},98516:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={In:t(64413),Out:t(45840),InOut:t(78137)}},87745:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return t*t*t*t*t};c.exports=m},16509:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)};c.exports=m},17868:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return--t*t*t*t*t+1};c.exports=m},35248:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={In:t(87745),Out:t(17868),InOut:t(16509)}},80461:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return t===0?0:t===1?1:1-Math.cos(t*Math.PI/2)};c.exports=m},34025:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return t===0?0:t===1?1:.5*(1-Math.cos(Math.PI*t))};c.exports=m},52768:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return t===0?0:t===1?1:Math.sin(t*Math.PI/2)};c.exports=m},82500:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={In:t(80461),Out:t(52768),InOut:t(34025)}},72251:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return a===void 0&&(a=1),t<=0?0:t>=1?1:((a*t|0)+1)*(1/a)};c.exports=m},49752:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports=t(72251)},75698:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return a===void 0&&(a=1e-4),Math.ceil(t-a)};c.exports=m},43855:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){return v===void 0&&(v=1e-4),Math.abs(t-a){/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return a===void 0&&(a=1e-4),Math.floor(t+a)};c.exports=m},5470:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){return v===void 0&&(v=1e-4),t>a-v};c.exports=m},94977:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){return v===void 0&&(v=1e-4),t{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={Ceil:t(75698),Equal:t(43855),Floor:t(25777),GreaterThan:t(5470),LessThan:t(94977)}},75508:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(36383),v=t(79291),o={Angle:t(25588),Distance:t(50994),Easing:t(48820),Fuzzy:t(48379),Interpolation:t(38289),Pow2:t(49001),Snap:t(73697),RandomDataGenerator:t(28453),Average:t(53307),Bernstein:t(85710),Between:t(30976),CatmullRom:t(87842),CeilTo:t(26302),Clamp:t(45319),DegToRad:t(39506),Difference:t(61241),Euler:t(38857),Factorial:t(6411),FloatBetween:t(99472),FloorTo:t(77623),FromPercent:t(62945),GetSpeed:t(38265),IsEven:t(78702),IsEvenStrict:t(94883),Linear:t(28915),LinearXY:t(94908),MaxAdd:t(86883),Median:t(50040),MinSub:t(37204),Percent:t(65201),RadToDeg:t(43396),RandomXY:t(74362),RandomXYZ:t(60706),RandomXYZW:t(67421),Rotate:t(36305),RotateAround:t(11520),RotateAroundDistance:t(1163),RotateTo:t(70336),RoundAwayFromZero:t(2284),RoundTo:t(41013),SinCosTableGenerator:t(16922),SmootherStep:t(54261),SmoothStep:t(7602),ToXY:t(44408),TransformXY:t(85955),Within:t(60417),Wrap:t(15994),Vector2:t(26099),Vector3:t(25836),Vector4:t(61369),Matrix3:t(94434),Matrix4:t(37867),Quaternion:t(15746),RotateVec3:t(72678)};o=v(!1,o,a),c.exports=o},89318:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(85710),v=function(o,r){for(var n=0,e=o.length-1,i=0;i<=e;i++)n+=Math.pow(1-r,e-i)*Math.pow(r,i)*o[i]*a(e,i);return n};c.exports=v},77259:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(87842),v=function(o,r){var n=o.length-1,e=n*r,i=Math.floor(e);return o[0]===o[n]?(r<0&&(i=Math.floor(e=n*(1+r))),a(e-i,o[(i-1+n)%n],o[i],o[(i+1)%n],o[(i+2)%n])):r<0?o[0]-(a(-e,o[0],o[0],o[1],o[1])-o[0]):r>1?o[n]-(a(e-n,o[n],o[n],o[n-1],o[n-1])-o[n]):a(e-i,o[i?i-1:0],o[i],o[n{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */function m(r,n){var e=1-r;return e*e*e*n}function t(r,n){var e=1-r;return 3*e*e*r*n}function a(r,n){return 3*(1-r)*r*r*n}function v(r,n){return r*r*r*n}var o=function(r,n,e,i,h){return m(r,n)+t(r,e)+a(r,i)+v(r,h)};c.exports=o},28392:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(28915),v=function(o,r){var n=o.length-1,e=n*r,i=Math.floor(e);return r<0?a(o[0],o[1],e):r>1?a(o[n],o[n-1],n-e):a(o[i],o[i+1>n?n:i+1],e-i)};c.exports=v},32112:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */function m(o,r){var n=1-o;return n*n*r}function t(o,r){return 2*(1-o)*o*r}function a(o,r){return o*o*r}var v=function(o,r,n,e){return m(o,r)+t(o,n)+a(o,e)};c.exports=v},47235:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(7602),v=function(o,r,n){return r+(n-r)*a(o,0,1)};c.exports=v},50178:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(54261),v=function(o,r,n){return r+(n-r)*a(o,0,1)};c.exports=v},38289:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={Bezier:t(89318),CatmullRom:t(77259),CubicBezier:t(36316),Linear:t(28392),QuadraticBezier:t(32112),SmoothStep:t(47235),SmootherStep:t(50178)}},98439:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){var a=Math.log(t)/.6931471805599453;return 1<{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return t>0&&(t&t-1)===0&&a>0&&(a&a-1)===0};c.exports=m},81230:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return t>0&&(t&t-1)===0};c.exports=m},49001:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={GetNext:t(98439),IsSize:t(50030),IsValue:t(81230)}},28453:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=new a({initialize:function(r){r===void 0&&(r=[(Date.now()*Math.random()).toString()]),this.c=1,this.s0=0,this.s1=0,this.s2=0,this.n=0,this.signs=[-1,1],r&&this.init(r)},rnd:function(){var o=2091639*this.s0+this.c*23283064365386963e-26;return this.c=o|0,this.s0=this.s1,this.s1=this.s2,this.s2=o-this.c,this.s2},hash:function(o){var r,n=this.n;o=o.toString();for(var e=0;e>>0,r-=n,r*=n,n=r>>>0,r-=n,n+=r*4294967296;return this.n=n,(n>>>0)*23283064365386963e-26},init:function(o){typeof o=="string"?this.state(o):this.sow(o)},sow:function(o){if(this.n=4022871197,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,!!o)for(var r=0;r0;n--){var e=Math.floor(this.frac()*(n+1)),i=o[e];o[e]=o[n],o[n]=i}return o}});c.exports=v},63448:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){return v===void 0&&(v=0),a===0?t:(t-=v,t=a*Math.ceil(t/a),o?(v+t)/a:v+t)};c.exports=m},56583:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){return v===void 0&&(v=0),a===0?t:(t-=v,t=a*Math.floor(t/a),o?(v+t)/a:v+t)};c.exports=m},77720:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){return v===void 0&&(v=0),a===0?t:(t-=v,t=a*Math.round(t/a),o?(v+t)/a:v+t)};c.exports=m},73697:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={Ceil:t(63448),Floor:t(56583),To:t(77720)}},85454:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */t(63595);var a=t(8054),v=t(79291),o={Actions:t(61061),Animations:t(60421),BlendModes:t(10312),Cache:t(83388),Cameras:t(26638),Core:t(42857),Class:t(83419),Create:t(15822),Curves:t(25410),Data:t(44965),Display:t(27460),DOM:t(84902),Events:t(93055),FX:t(66064),Game:t(50127),GameObjects:t(77856),Geom:t(55738),Input:t(14350),Loader:t(57777),Math:t(75508),Physics:t(44563),Plugins:t(18922),Renderer:t(36909),Scale:t(93364),ScaleModes:t(29795),Scene:t(97482),Scenes:t(62194),Structs:t(41392),Textures:t(27458),Tilemaps:t(62501),Time:t(90291),Tweens:t(43066),Utils:t(91799)};o.Sound=t(23717),o=v(!1,o,a),c.exports=o,t.g.Phaser=o},71289:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(92209),o=t(88571),r=new a({Extends:o,Mixins:[v.Acceleration,v.Angular,v.Bounce,v.Collision,v.Debug,v.Drag,v.Enable,v.Friction,v.Gravity,v.Immovable,v.Mass,v.Pushable,v.Size,v.Velocity],initialize:function(e,i,h,s,l){o.call(this,e,i,h,s,l),this.body=null}});c.exports=r},86689:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(39506),o=t(20339),r=t(89774),n=t(66022),e=t(95540),i=t(46975),h=t(72441),s=t(47956),l=t(37277),f=t(44594),u=t(26099),d=t(82248),p=new a({initialize:function(x){this.scene=x,this.systems=x.sys,this.config=this.getConfig(),this.world,this.add,this._category=1,x.sys.events.once(f.BOOT,this.boot,this),x.sys.events.on(f.START,this.start,this)},boot:function(){this.world=new d(this.scene,this.config),this.add=new n(this.world),this.systems.events.once(f.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new d(this.scene,this.config),this.add=new n(this.world));var g=this.systems.events;e(this.config,"customUpdate",!1)||g.on(f.UPDATE,this.world.update,this.world),g.on(f.POST_UPDATE,this.world.postUpdate,this.world),g.once(f.SHUTDOWN,this.shutdown,this)},enableUpdate:function(){this.systems.events.on(f.UPDATE,this.world.update,this.world)},disableUpdate:function(){this.systems.events.off(f.UPDATE,this.world.update,this.world)},getConfig:function(){var g=this.systems.game.config.physics,x=this.systems.settings.physics,y=i(e(x,"arcade",{}),e(g,"arcade",{}));return y},nextCategory:function(){return this._category=this._category<<1,this._category},overlap:function(g,x,y,C,P){return y===void 0&&(y=null),C===void 0&&(C=null),P===void 0&&(P=y),this.world.collideObjects(g,x,y,C,P,!0)},collide:function(g,x,y,C,P){return y===void 0&&(y=null),C===void 0&&(C=null),P===void 0&&(P=y),this.world.collideObjects(g,x,y,C,P,!1)},collideTiles:function(g,x,y,C,P){return this.world.collideTiles(g,x,y,C,P)},overlapTiles:function(g,x,y,C,P){return this.world.overlapTiles(g,x,y,C,P)},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},accelerateTo:function(g,x,y,C,P,M){C===void 0&&(C=60);var R=Math.atan2(y-g.y,x-g.x);return g.body.acceleration.setToPolar(R,C),P!==void 0&&M!==void 0&&g.body.maxVelocity.set(P,M),R},accelerateToObject:function(g,x,y,C,P){return this.accelerateTo(g,x.x,x.y,y,C,P)},closest:function(g,x){x||(x=this.world.bodies.entries);for(var y=Number.MAX_VALUE,C=null,P=g.x,M=g.y,R=x.length,I=0;Iy&&(C=L,y=N)}}return C},moveTo:function(g,x,y,C,P){C===void 0&&(C=60),P===void 0&&(P=0);var M=Math.atan2(y-g.y,x-g.x);return P>0&&(C=o(g.x,g.y,x,y)/(P/1e3)),g.body.velocity.setToPolar(M,C),M},moveToObject:function(g,x,y,C){return this.moveTo(g,x.x,x.y,y,C)},velocityFromAngle:function(g,x,y){return x===void 0&&(x=60),y===void 0&&(y=new u),y.setToPolar(v(g),x)},velocityFromRotation:function(g,x,y){return x===void 0&&(x=60),y===void 0&&(y=new u),y.setToPolar(g,x)},overlapRect:function(g,x,y,C,P,M){return s(this.world,g,x,y,C,P,M)},overlapCirc:function(g,x,y,C,P){return h(this.world,g,x,y,C,P)},shutdown:function(){if(this.world){var g=this.systems.events;g.off(f.UPDATE,this.world.update,this.world),g.off(f.POST_UPDATE,this.world.postUpdate,this.world),g.off(f.SHUTDOWN,this.shutdown,this),this.add.destroy(),this.world.destroy(),this.add=null,this.world=null,this._category=1}},destroy:function(){this.shutdown(),this.scene.sys.events.off(f.START,this.start,this),this.scene=null,this.systems=null}});l.register("ArcadePhysics",p,"arcadePhysics"),c.exports=p},13759:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(92209),o=t(68287),r=new a({Extends:o,Mixins:[v.Acceleration,v.Angular,v.Bounce,v.Collision,v.Debug,v.Drag,v.Enable,v.Friction,v.Gravity,v.Immovable,v.Mass,v.Pushable,v.Size,v.Velocity],initialize:function(e,i,h,s,l){o.call(this,e,i,h,s,l),this.body=null}});c.exports=r},37742:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(78389),o=t(37747),r=t(63012),n=t(43396),e=t(87841),i=t(37303),h=t(95829),s=t(26099),l=new a({Mixins:[v],initialize:function(u,d){var p=64,g=64,x={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0},y=d!==void 0;y&&d.displayWidth&&(p=d.displayWidth,g=d.displayHeight),y||(d=x),this.world=u,this.gameObject=y?d:void 0,this.isBody=!0,this.transform={x:d.x,y:d.y,rotation:d.angle,scaleX:d.scaleX,scaleY:d.scaleY,displayOriginX:d.displayOriginX,displayOriginY:d.displayOriginY},this.debugShowBody=u.defaults.debugShowBody,this.debugShowVelocity=u.defaults.debugShowVelocity,this.debugBodyColor=u.defaults.bodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new s,this.position=new s(d.x-d.scaleX*d.displayOriginX,d.y-d.scaleY*d.displayOriginY),this.prev=this.position.clone(),this.prevFrame=this.position.clone(),this.allowRotation=!0,this.rotation=d.angle,this.preRotation=d.angle,this.width=p,this.height=g,this.sourceWidth=p,this.sourceHeight=g,d.frame&&(this.sourceWidth=d.frame.realWidth,this.sourceHeight=d.frame.realHeight),this.halfWidth=Math.abs(p/2),this.halfHeight=Math.abs(g/2),this.center=new s(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=new s,this.newVelocity=new s,this.deltaMax=new s,this.acceleration=new s,this.allowDrag=!0,this.drag=new s,this.allowGravity=!0,this.gravity=new s,this.bounce=new s,this.worldBounce=null,this.customBoundsRectangle=u.bounds,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.maxVelocity=new s(1e4,1e4),this.maxSpeed=-1,this.friction=new s(1,0),this.useDamping=!1,this.angularVelocity=0,this.angularAcceleration=0,this.angularDrag=0,this.maxAngular=1e3,this.mass=1,this.angle=0,this.speed=0,this.facing=o.FACING_NONE,this.immovable=!1,this.pushable=!0,this.slideFactor=new s(1,1),this.moves=!0,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision=h(!1),this.touching=h(!0),this.wasTouching=h(!0),this.blocked=h(!0),this.syncBounds=!1,this.physicsType=o.DYNAMIC_BODY,this.collisionCategory=1,this.collisionMask=1,this._sx=d.scaleX,this._sy=d.scaleY,this._dx=0,this._dy=0,this._tx=0,this._ty=0,this._bounds=new e,this.directControl=!1,this.autoFrame=this.position.clone()},updateBounds:function(){var f=this.gameObject,u=this.transform;if(f.parentContainer){var d=f.getWorldTransformMatrix(this.world._tempMatrix,this.world._tempMatrix2);u.x=d.tx,u.y=d.ty,u.rotation=n(d.rotation),u.scaleX=d.scaleX,u.scaleY=d.scaleY,u.displayOriginX=f.displayOriginX,u.displayOriginY=f.displayOriginY}else u.x=f.x,u.y=f.y,u.rotation=f.angle,u.scaleX=f.scaleX,u.scaleY=f.scaleY,u.displayOriginX=f.displayOriginX,u.displayOriginY=f.displayOriginY;var p=!1;if(this.syncBounds){var g=f.getBounds(this._bounds);this.width=g.width,this.height=g.height,p=!0}else{var x=Math.abs(u.scaleX),y=Math.abs(u.scaleY);(this._sx!==x||this._sy!==y)&&(this.width=this.sourceWidth*x,this.height=this.sourceHeight*y,this._sx=x,this._sy=y,p=!0)}p&&(this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter())},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},updateFromGameObject:function(){this.updateBounds();var f=this.transform;this.position.x=f.x+f.scaleX*(this.offset.x-f.displayOriginX),this.position.y=f.y+f.scaleY*(this.offset.y-f.displayOriginY),this.updateCenter()},resetFlags:function(f){f===void 0&&(f=!1);var u=this.wasTouching,d=this.touching,p=this.blocked;f?h(!0,u):(u.none=d.none,u.up=d.up,u.down=d.down,u.left=d.left,u.right=d.right),h(!0,d),h(!0,p),this.overlapR=0,this.overlapX=0,this.overlapY=0,this.embedded=!1},preUpdate:function(f,u){if(f&&this.resetFlags(),this.gameObject&&this.updateFromGameObject(),this.rotation=this.transform.rotation,this.preRotation=this.rotation,this.moves){var d=this.position;this.prev.x=d.x,this.prev.y=d.y,this.prevFrame.x=d.x,this.prevFrame.y=d.y}f&&this.update(u)},update:function(f){var u=this.prev,d=this.position,p=this.velocity;if(u.set(d.x,d.y),!this.moves){this._dx=d.x-u.x,this._dy=d.y-u.y;return}if(this.directControl){var g=this.autoFrame;p.set((d.x-g.x)/f,(d.y-g.y)/f),this.world.updateMotion(this,f),this._dx=d.x-g.x,this._dy=d.y-g.y}else this.world.updateMotion(this,f),this.newVelocity.set(p.x*f,p.y*f),d.add(this.newVelocity),this._dx=d.x-u.x,this._dy=d.y-u.y;var x=p.x,y=p.y;if(this.updateCenter(),this.angle=Math.atan2(y,x),this.speed=Math.sqrt(x*x+y*y),this.collideWorldBounds&&this.checkWorldBounds()&&this.onWorldBounds){var C=this.blocked;this.world.emit(r.WORLD_BOUNDS,this,C.up,C.down,C.left,C.right)}},postUpdate:function(){var f=this.position,u=f.x-this.prevFrame.x,d=f.y-this.prevFrame.y,p=this.gameObject;if(this.moves){var g=this.deltaMax.x,x=this.deltaMax.y;g!==0&&u!==0&&(u<0&&u<-g?u=-g:u>0&&u>g&&(u=g)),x!==0&&d!==0&&(d<0&&d<-x?d=-x:d>0&&d>x&&(d=x)),p&&(p.x+=u,p.y+=d)}u<0?this.facing=o.FACING_LEFT:u>0&&(this.facing=o.FACING_RIGHT),d<0?this.facing=o.FACING_UP:d>0&&(this.facing=o.FACING_DOWN),this.allowRotation&&p&&(p.angle+=this.deltaZ()),this._tx=u,this._ty=d,this.autoFrame.set(f.x,f.y)},setBoundsRectangle:function(f){return this.customBoundsRectangle=f||this.world.bounds,this},checkWorldBounds:function(){var f=this.position,u=this.velocity,d=this.blocked,p=this.customBoundsRectangle,g=this.world.checkCollision,x=this.worldBounce?-this.worldBounce.x:-this.bounce.x,y=this.worldBounce?-this.worldBounce.y:-this.bounce.y,C=!1;return f.xp.right&&g.right&&(f.x=p.right-this.width,u.x*=x,d.right=!0,C=!0),f.yp.bottom&&g.down&&(f.y=p.bottom-this.height,u.y*=y,d.down=!0,C=!0),C&&(this.blocked.none=!1,this.updateCenter()),C},setOffset:function(f,u){return u===void 0&&(u=f),this.offset.set(f,u),this},setGameObject:function(f,u){return u===void 0&&(u=!0),this.world.remove(this),this.gameObject&&this.gameObject.body&&(this.gameObject.body=null),this.gameObject=f,f.body&&(f.body=this),this.setSize(),this.world.add(this),this.enable=u,this},setSize:function(f,u,d){d===void 0&&(d=!0);var p=this.gameObject;if(p&&(!f&&p.frame&&(f=p.frame.realWidth),!u&&p.frame&&(u=p.frame.realHeight)),this.sourceWidth=f,this.sourceHeight=u,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter(),d&&p&&p.getCenter){var g=(p.width-f)/2,x=(p.height-u)/2;this.offset.set(g,x)}return this.isCircle=!1,this.radius=0,this},setCircle:function(f,u,d){return u===void 0&&(u=this.offset.x),d===void 0&&(d=this.offset.y),f>0?(this.isCircle=!0,this.radius=f,this.sourceWidth=f*2,this.sourceHeight=f*2,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(u,d),this.updateCenter()):this.isCircle=!1,this},reset:function(f,u){this.stop();var d=this.gameObject;d&&(d.setPosition(f,u),this.rotation=d.angle,this.preRotation=d.angle);var p=this.position;d&&d.getTopLeft?d.getTopLeft(p):p.set(f,u),this.prev.copy(p),this.prevFrame.copy(p),this.autoFrame.copy(p),d&&this.updateBounds(),this.updateCenter(),this.collideWorldBounds&&this.checkWorldBounds(),this.resetFlags(!0)},stop:function(){return this.velocity.set(0),this.acceleration.set(0),this.speed=0,this.angularVelocity=0,this.angularAcceleration=0,this},getBounds:function(f){return f.x=this.x,f.y=this.y,f.right=this.right,f.bottom=this.bottom,f},hitTest:function(f,u){if(!this.isCircle)return i(this,f,u);if(this.radius>0&&f>=this.left&&f<=this.right&&u>=this.top&&u<=this.bottom){var d=(this.center.x-f)*(this.center.x-f),p=(this.center.y-u)*(this.center.y-u);return d+p<=this.radius*this.radius}return!1},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return this._dx>0?this._dx:-this._dx},deltaAbsY:function(){return this._dy>0?this._dy:-this._dy},deltaX:function(){return this._dx},deltaY:function(){return this._dy},deltaXFinal:function(){return this._tx},deltaYFinal:function(){return this._ty},deltaZ:function(){return this.rotation-this.preRotation},destroy:function(){this.enable=!1,this.world&&this.world.pendingDestroy.set(this)},drawDebug:function(f){var u=this.position,d=u.x+this.halfWidth,p=u.y+this.halfHeight;this.debugShowBody&&(f.lineStyle(f.defaultStrokeWidth,this.debugBodyColor),this.isCircle?f.strokeCircle(d,p,this.width/2):(this.checkCollision.up&&f.lineBetween(u.x,u.y,u.x+this.width,u.y),this.checkCollision.right&&f.lineBetween(u.x+this.width,u.y,u.x+this.width,u.y+this.height),this.checkCollision.down&&f.lineBetween(u.x,u.y+this.height,u.x+this.width,u.y+this.height),this.checkCollision.left&&f.lineBetween(u.x,u.y,u.x,u.y+this.height))),this.debugShowVelocity&&(f.lineStyle(f.defaultStrokeWidth,this.world.defaults.velocityDebugColor,1),f.lineBetween(d,p,d+this.velocity.x/2,p+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setDirectControl:function(f){return f===void 0&&(f=!0),this.directControl=f,this},setCollideWorldBounds:function(f,u,d,p){f===void 0&&(f=!0),this.collideWorldBounds=f;var g=u!==void 0,x=d!==void 0;return(g||x)&&(this.worldBounce||(this.worldBounce=new s),g&&(this.worldBounce.x=u),x&&(this.worldBounce.y=d)),p!==void 0&&(this.onWorldBounds=p),this},setVelocity:function(f,u){return this.velocity.set(f,u),f=this.velocity.x,u=this.velocity.y,this.speed=Math.sqrt(f*f+u*u),this},setVelocityX:function(f){return this.setVelocity(f,this.velocity.y)},setVelocityY:function(f){return this.setVelocity(this.velocity.x,f)},setMaxVelocity:function(f,u){return this.maxVelocity.set(f,u),this},setMaxVelocityX:function(f){return this.maxVelocity.x=f,this},setMaxVelocityY:function(f){return this.maxVelocity.y=f,this},setMaxSpeed:function(f){return this.maxSpeed=f,this},setSlideFactor:function(f,u){return this.slideFactor.set(f,u),this},setBounce:function(f,u){return this.bounce.set(f,u),this},setBounceX:function(f){return this.bounce.x=f,this},setBounceY:function(f){return this.bounce.y=f,this},setAcceleration:function(f,u){return this.acceleration.set(f,u),this},setAccelerationX:function(f){return this.acceleration.x=f,this},setAccelerationY:function(f){return this.acceleration.y=f,this},setAllowDrag:function(f){return f===void 0&&(f=!0),this.allowDrag=f,this},setAllowGravity:function(f){return f===void 0&&(f=!0),this.allowGravity=f,this},setAllowRotation:function(f){return f===void 0&&(f=!0),this.allowRotation=f,this},setDrag:function(f,u){return this.drag.set(f,u),this},setDamping:function(f){return this.useDamping=f,this},setDragX:function(f){return this.drag.x=f,this},setDragY:function(f){return this.drag.y=f,this},setGravity:function(f,u){return this.gravity.set(f,u),this},setGravityX:function(f){return this.gravity.x=f,this},setGravityY:function(f){return this.gravity.y=f,this},setFriction:function(f,u){return this.friction.set(f,u),this},setFrictionX:function(f){return this.friction.x=f,this},setFrictionY:function(f){return this.friction.y=f,this},setAngularVelocity:function(f){return this.angularVelocity=f,this},setAngularAcceleration:function(f){return this.angularAcceleration=f,this},setAngularDrag:function(f){return this.angularDrag=f,this},setMass:function(f){return this.mass=f,this},setImmovable:function(f){return f===void 0&&(f=!0),this.immovable=f,this},setEnable:function(f){return f===void 0&&(f=!0),this.enable=f,this},processX:function(f,u,d,p){this.x+=f,this.updateCenter(),u!==null&&(this.velocity.x=u*this.slideFactor.x);var g=this.blocked;d&&(g.left=!0,g.none=!1),p&&(g.right=!0,g.none=!1)},processY:function(f,u,d,p){this.y+=f,this.updateCenter(),u!==null&&(this.velocity.y=u*this.slideFactor.y);var g=this.blocked;d&&(g.up=!0,g.none=!1),p&&(g.down=!0,g.none=!1)},x:{get:function(){return this.position.x},set:function(f){this.position.x=f}},y:{get:function(){return this.position.y},set:function(f){this.position.y=f}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});c.exports=l},79342:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=new a({initialize:function(r,n,e,i,h,s,l){this.world=r,this.name="",this.active=!0,this.overlapOnly=n,this.object1=e,this.object2=i,this.collideCallback=h,this.processCallback=s,this.callbackContext=l},setName:function(o){return this.name=o,this},update:function(){this.world.collideObjects(this.object1,this.object2,this.collideCallback,this.processCallback,this.callbackContext,this.overlapOnly)},destroy:function(){this.world.removeCollider(this),this.active=!1,this.world=null,this.object1=null,this.object2=null,this.collideCallback=null,this.processCallback=null,this.callbackContext=null}});c.exports=v},66022:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(71289),v=t(13759),o=t(37742),r=t(83419),n=t(37747),e=t(60758),i=t(72624),h=t(71464),s=new r({initialize:function(f){this.world=f,this.scene=f.scene,this.sys=f.scene.sys},collider:function(l,f,u,d,p){return this.world.addCollider(l,f,u,d,p)},overlap:function(l,f,u,d,p){return this.world.addOverlap(l,f,u,d,p)},existing:function(l,f){var u=f?n.STATIC_BODY:n.DYNAMIC_BODY;return this.world.enableBody(l,u),l},staticImage:function(l,f,u,d){var p=new a(this.scene,l,f,u,d);return this.sys.displayList.add(p),this.world.enableBody(p,n.STATIC_BODY),p},image:function(l,f,u,d){var p=new a(this.scene,l,f,u,d);return this.sys.displayList.add(p),this.world.enableBody(p,n.DYNAMIC_BODY),p},staticSprite:function(l,f,u,d){var p=new v(this.scene,l,f,u,d);return this.sys.displayList.add(p),this.sys.updateList.add(p),this.world.enableBody(p,n.STATIC_BODY),p},sprite:function(l,f,u,d){var p=new v(this.scene,l,f,u,d);return this.sys.displayList.add(p),this.sys.updateList.add(p),this.world.enableBody(p,n.DYNAMIC_BODY),p},staticGroup:function(l,f){return this.sys.updateList.add(new h(this.world,this.world.scene,l,f))},group:function(l,f){return this.sys.updateList.add(new e(this.world,this.world.scene,l,f))},body:function(l,f,u,d){var p=new o(this.world);return p.position.set(l,f),u&&d&&p.setSize(u,d),this.world.add(p,n.DYNAMIC_BODY),p},staticBody:function(l,f,u,d){var p=new i(this.world);return p.position.set(l,f),u&&d&&p.setSize(u,d),this.world.add(p,n.STATIC_BODY),p},destroy:function(){this.world=null,this.scene=null,this.sys=null}});c.exports=s},79599:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){var a=0;if(!Array.isArray(t))a=t;else for(var v=0;v{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(37747),v=function(o,r,n,e){var i=0,h=o.deltaAbsX()+r.deltaAbsX()+e;return o._dx===0&&r._dx===0?(o.embedded=!0,r.embedded=!0):o._dx>r._dx?(i=o.right-r.x,i>h&&!n||o.checkCollision.right===!1||r.checkCollision.left===!1?i=0:(o.touching.none=!1,o.touching.right=!0,r.touching.none=!1,r.touching.left=!0,r.physicsType===a.STATIC_BODY&&!n&&(o.blocked.none=!1,o.blocked.right=!0),o.physicsType===a.STATIC_BODY&&!n&&(r.blocked.none=!1,r.blocked.left=!0))):o._dxh&&!n||o.checkCollision.left===!1||r.checkCollision.right===!1?i=0:(o.touching.none=!1,o.touching.left=!0,r.touching.none=!1,r.touching.right=!0,r.physicsType===a.STATIC_BODY&&!n&&(o.blocked.none=!1,o.blocked.left=!0),o.physicsType===a.STATIC_BODY&&!n&&(r.blocked.none=!1,r.blocked.right=!0))),o.overlapX=i,r.overlapX=i,i};c.exports=v},45170:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(37747),v=function(o,r,n,e){var i=0,h=o.deltaAbsY()+r.deltaAbsY()+e;return o._dy===0&&r._dy===0?(o.embedded=!0,r.embedded=!0):o._dy>r._dy?(i=o.bottom-r.y,i>h&&!n||o.checkCollision.down===!1||r.checkCollision.up===!1?i=0:(o.touching.none=!1,o.touching.down=!0,r.touching.none=!1,r.touching.up=!0,r.physicsType===a.STATIC_BODY&&!n&&(o.blocked.none=!1,o.blocked.down=!0),o.physicsType===a.STATIC_BODY&&!n&&(r.blocked.none=!1,r.blocked.up=!0))):o._dyh&&!n||o.checkCollision.up===!1||r.checkCollision.down===!1?i=0:(o.touching.none=!1,o.touching.up=!0,r.touching.none=!1,r.touching.down=!0,r.physicsType===a.STATIC_BODY&&!n&&(o.blocked.none=!1,o.blocked.up=!0),o.physicsType===a.STATIC_BODY&&!n&&(r.blocked.none=!1,r.blocked.down=!0))),o.overlapY=i,r.overlapY=i,i};c.exports=v},60758:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(13759),v=t(83419),o=t(78389),r=t(37747),n=t(95540),e=t(26479),i=t(41212),h=new v({Extends:e,Mixins:[o],initialize:function(l,f,u,d){if(!u&&!d)d={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};else if(i(u))d=u,u=null,d.internalCreateCallback=this.createCallbackHandler,d.internalRemoveCallback=this.removeCallbackHandler;else if(Array.isArray(u)&&i(u[0])){var p=this;u.forEach(function(g){g.internalCreateCallback=p.createCallbackHandler,g.internalRemoveCallback=p.removeCallbackHandler,g.classType=n(g,"classType",a)}),d=null}else d={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};this.world=l,d&&(d.classType=n(d,"classType",a)),this.physicsType=r.DYNAMIC_BODY,this.collisionCategory=1,this.collisionMask=1,this.defaults={setCollideWorldBounds:n(d,"collideWorldBounds",!1),setBoundsRectangle:n(d,"customBoundsRectangle",null),setAccelerationX:n(d,"accelerationX",0),setAccelerationY:n(d,"accelerationY",0),setAllowDrag:n(d,"allowDrag",!0),setAllowGravity:n(d,"allowGravity",!0),setAllowRotation:n(d,"allowRotation",!0),setDamping:n(d,"useDamping",!1),setBounceX:n(d,"bounceX",0),setBounceY:n(d,"bounceY",0),setDragX:n(d,"dragX",0),setDragY:n(d,"dragY",0),setEnable:n(d,"enable",!0),setGravityX:n(d,"gravityX",0),setGravityY:n(d,"gravityY",0),setFrictionX:n(d,"frictionX",0),setFrictionY:n(d,"frictionY",0),setMaxSpeed:n(d,"maxSpeed",-1),setMaxVelocityX:n(d,"maxVelocityX",1e4),setMaxVelocityY:n(d,"maxVelocityY",1e4),setVelocityX:n(d,"velocityX",0),setVelocityY:n(d,"velocityY",0),setAngularVelocity:n(d,"angularVelocity",0),setAngularAcceleration:n(d,"angularAcceleration",0),setAngularDrag:n(d,"angularDrag",0),setMass:n(d,"mass",1),setImmovable:n(d,"immovable",!1)},e.call(this,f,u,d),this.type="PhysicsGroup"},createCallbackHandler:function(s){s.body||this.world.enableBody(s,r.DYNAMIC_BODY);var l=s.body;for(var f in this.defaults)l[f](this.defaults[f])},removeCallbackHandler:function(s){s.body&&this.world.disableBody(s)},setVelocity:function(s,l,f){f===void 0&&(f=0);for(var u=this.getChildren(),d=0;d{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m,t,a,v,o,r,n,e,i,h,s,l,f,u,d,p,g,x=function(I,L,B){m=I,t=L;var N=m.velocity.x,G=t.velocity.x;return a=m.pushable,i=m._dx<0,h=m._dx>0,s=m._dx===0,d=Math.abs(m.right-t.x)<=Math.abs(t.right-m.x),n=G-N*m.bounce.x,v=t.pushable,l=t._dx<0,f=t._dx>0,u=t._dx===0,p=!d,e=N-G*t.bounce.x,g=Math.abs(B),y()},y=function(){return h&&d&&t.blocked.right?(m.processX(-g,n,!1,!0),1):i&&p&&t.blocked.left?(m.processX(g,n,!0),1):f&&p&&m.blocked.right?(t.processX(-g,e,!1,!0),2):l&&d&&m.blocked.left?(t.processX(g,e,!0),2):0},C=function(){var I=m.velocity.x,L=t.velocity.x,B=Math.sqrt(L*L*t.mass/m.mass)*(L>0?1:-1),N=Math.sqrt(I*I*m.mass/t.mass)*(I>0?1:-1),G=(B+N)*.5;return B-=G,N-=G,o=G+B*m.bounce.x,r=G+N*t.bounce.x,i&&p?P(0):l&&d?P(1):h&&d?P(2):f&&p?P(3):!1},P=function(I){if(a&&v)g*=.5,I===0||I===3?(m.processX(g,o),t.processX(-g,r)):(m.processX(-g,o),t.processX(g,r));else if(a&&!v)I===0||I===3?m.processX(g,n,!0):m.processX(-g,n,!1,!0);else if(!a&&v)I===0||I===3?t.processX(-g,e,!1,!0):t.processX(g,e,!0);else{var L=g*.5;I===0?u?(m.processX(g,0,!0),t.processX(0,null,!1,!0)):f?(m.processX(L,0,!0),t.processX(-L,0,!1,!0)):(m.processX(L,t.velocity.x,!0),t.processX(-L,null,!1,!0)):I===1?s?(m.processX(0,null,!1,!0),t.processX(g,0,!0)):h?(m.processX(-L,0,!1,!0),t.processX(L,0,!0)):(m.processX(-L,null,!1,!0),t.processX(L,m.velocity.x,!0)):I===2?u?(m.processX(-g,0,!1,!0),t.processX(0,null,!0)):l?(m.processX(-L,0,!1,!0),t.processX(L,0,!0)):(m.processX(-L,t.velocity.x,!1,!0),t.processX(L,null,!0)):I===3&&(s?(m.processX(0,null,!0),t.processX(-g,0,!1,!0)):i?(m.processX(L,0,!0),t.processX(-L,0,!1,!0)):(m.processX(L,t.velocity.y,!0),t.processX(-L,null,!1,!0)))}return!0},M=function(I){I===1?t.velocity.x=0:d?t.processX(g,e,!0):t.processX(-g,e,!1,!0),m.moves&&(t.y+=(m.y-m.prev.y)*m.friction.y,t._dy=t.y-t.prev.y)},R=function(I){I===2?m.velocity.x=0:p?m.processX(g,n,!0):m.processX(-g,n,!1,!0),t.moves&&(m.y+=(t.y-t.prev.y)*t.friction.y,m._dy=m.y-m.prev.y)};c.exports={BlockCheck:y,Check:C,Set:x,Run:P,RunImmovableBody1:M,RunImmovableBody2:R}},47962:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m,t,a,v,o,r,n,e,i,h,s,l,f,u,d,p,g,x=function(I,L,B){m=I,t=L;var N=m.velocity.y,G=t.velocity.y;return a=m.pushable,i=m._dy<0,h=m._dy>0,s=m._dy===0,d=Math.abs(m.bottom-t.y)<=Math.abs(t.bottom-m.y),n=G-N*m.bounce.y,v=t.pushable,l=t._dy<0,f=t._dy>0,u=t._dy===0,p=!d,e=N-G*t.bounce.y,g=Math.abs(B),y()},y=function(){return h&&d&&t.blocked.down?(m.processY(-g,n,!1,!0),1):i&&p&&t.blocked.up?(m.processY(g,n,!0),1):f&&p&&m.blocked.down?(t.processY(-g,e,!1,!0),2):l&&d&&m.blocked.up?(t.processY(g,e,!0),2):0},C=function(){var I=m.velocity.y,L=t.velocity.y,B=Math.sqrt(L*L*t.mass/m.mass)*(L>0?1:-1),N=Math.sqrt(I*I*m.mass/t.mass)*(I>0?1:-1),G=(B+N)*.5;return B-=G,N-=G,o=G+B*m.bounce.y,r=G+N*t.bounce.y,i&&p?P(0):l&&d?P(1):h&&d?P(2):f&&p?P(3):!1},P=function(I){if(a&&v)g*=.5,I===0||I===3?(m.processY(g,o),t.processY(-g,r)):(m.processY(-g,o),t.processY(g,r));else if(a&&!v)I===0||I===3?m.processY(g,n,!0):m.processY(-g,n,!1,!0);else if(!a&&v)I===0||I===3?t.processY(-g,e,!1,!0):t.processY(g,e,!0);else{var L=g*.5;I===0?u?(m.processY(g,0,!0),t.processY(0,null,!1,!0)):f?(m.processY(L,0,!0),t.processY(-L,0,!1,!0)):(m.processY(L,t.velocity.y,!0),t.processY(-L,null,!1,!0)):I===1?s?(m.processY(0,null,!1,!0),t.processY(g,0,!0)):h?(m.processY(-L,0,!1,!0),t.processY(L,0,!0)):(m.processY(-L,null,!1,!0),t.processY(L,m.velocity.y,!0)):I===2?u?(m.processY(-g,0,!1,!0),t.processY(0,null,!0)):l?(m.processY(-L,0,!1,!0),t.processY(L,0,!0)):(m.processY(-L,t.velocity.y,!1,!0),t.processY(L,null,!0)):I===3&&(s?(m.processY(0,null,!0),t.processY(-g,0,!1,!0)):i?(m.processY(L,0,!0),t.processY(-L,0,!1,!0)):(m.processY(L,t.velocity.y,!0),t.processY(-L,null,!1,!0)))}return!0},M=function(I){I===1?t.velocity.y=0:d?t.processY(g,e,!0):t.processY(-g,e,!1,!0),m.moves&&(t.x+=(m.x-m.prev.x)*m.friction.x,t._dx=t.x-t.prev.x)},R=function(I){I===2?m.velocity.y=0:p?m.processY(g,n,!0):m.processY(-g,n,!1,!0),t.moves&&(m.x+=(t.x-t.prev.x)*t.friction.x,m._dx=m.x-m.prev.x)};c.exports={BlockCheck:y,Check:C,Set:x,Run:P,RunImmovableBody1:M,RunImmovableBody2:R}},14087:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(64897),v=t(3017),o=function(r,n,e,i,h){h===void 0&&(h=a(r,n,e,i));var s=r.immovable,l=n.immovable;if(e||h===0||s&&l||r.customSeparateX||n.customSeparateX)return h!==0||r.embedded&&n.embedded;var f=v.Set(r,n,h);return!s&&!l?f>0?!0:v.Check():(s?v.RunImmovableBody1(f):l&&v.RunImmovableBody2(f),!0)};c.exports=o},89936:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(45170),v=t(47962),o=function(r,n,e,i,h){h===void 0&&(h=a(r,n,e,i));var s=r.immovable,l=n.immovable;if(e||h===0||s&&l||r.customSeparateY||n.customSeparateY)return h!==0||r.embedded&&n.embedded;var f=v.Set(r,n,h);return!s&&!l?f>0?!0:v.Check():(s?v.RunImmovableBody1(f):l&&v.RunImmovableBody2(f),!0)};c.exports=o},95829:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return a===void 0&&(a={}),a.none=t,a.up=!1,a.down=!1,a.left=!1,a.right=!1,t||(a.up=!0,a.down=!0,a.left=!0,a.right=!0),a};c.exports=m},72624:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(87902),v=t(83419),o=t(78389),r=t(37747),n=t(37303),e=t(95829),i=t(26099),h=new v({Mixins:[o],initialize:function(l,f){var u=64,d=64,p={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0},g=f!==void 0;g&&f.displayWidth&&(u=f.displayWidth,d=f.displayHeight),g||(f=p),this.world=l,this.gameObject=g?f:void 0,this.isBody=!0,this.debugShowBody=l.defaults.debugShowStaticBody,this.debugBodyColor=l.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new i,this.position=new i(f.x-u*f.originX,f.y-d*f.originY),this.width=u,this.height=d,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center=new i(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=i.ZERO,this.allowGravity=!1,this.gravity=i.ZERO,this.bounce=i.ZERO,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.mass=1,this.immovable=!0,this.pushable=!1,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision=e(!1),this.touching=e(!0),this.wasTouching=e(!0),this.blocked=e(!0),this.physicsType=r.STATIC_BODY,this.collisionCategory=1,this.collisionMask=1,this._dx=0,this._dy=0},setGameObject:function(s,l){return s&&s!==this.gameObject&&(this.gameObject.body=null,s.body=this,this.gameObject=s),l&&this.updateFromGameObject(),this},updateFromGameObject:function(){this.world.staticTree.remove(this);var s=this.gameObject;return s.getTopLeft(this.position),this.width=s.displayWidth,this.height=s.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.world.staticTree.insert(this),this},setOffset:function(s,l){return l===void 0&&(l=s),this.world.staticTree.remove(this),this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(s,l),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this),this},setSize:function(s,l,f){f===void 0&&(f=!0);var u=this.gameObject;if(u&&u.frame&&(s||(s=u.frame.realWidth),l||(l=u.frame.realHeight)),this.world.staticTree.remove(this),this.width=s,this.height=l,this.halfWidth=Math.floor(s/2),this.halfHeight=Math.floor(l/2),f&&u&&u.getCenter){var d=u.displayWidth/2,p=u.displayHeight/2;this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(d-this.halfWidth,p-this.halfHeight),this.position.x+=this.offset.x,this.position.y+=this.offset.y}return this.updateCenter(),this.isCircle=!1,this.radius=0,this.world.staticTree.insert(this),this},setCircle:function(s,l,f){return l===void 0&&(l=this.offset.x),f===void 0&&(f=this.offset.y),s>0?(this.world.staticTree.remove(this),this.isCircle=!0,this.radius=s,this.width=s*2,this.height=s*2,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(l,f),this.updateCenter(),this.world.staticTree.insert(this)):this.isCircle=!1,this},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},reset:function(s,l){var f=this.gameObject;s===void 0&&(s=f.x),l===void 0&&(l=f.y),this.world.staticTree.remove(this),f.setPosition(s,l),f.getTopLeft(this.position),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this)},stop:function(){return this},getBounds:function(s){return s.x=this.x,s.y=this.y,s.right=this.right,s.bottom=this.bottom,s},hitTest:function(s,l){return this.isCircle?a(this,s,l):n(this,s,l)},postUpdate:function(){},deltaAbsX:function(){return 0},deltaAbsY:function(){return 0},deltaX:function(){return 0},deltaY:function(){return 0},deltaZ:function(){return 0},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(s){var l=this.position,f=l.x+this.halfWidth,u=l.y+this.halfHeight;this.debugShowBody&&(s.lineStyle(s.defaultStrokeWidth,this.debugBodyColor,1),this.isCircle?s.strokeCircle(f,u,this.width/2):s.strokeRect(l.x,l.y,this.width,this.height))},willDrawDebug:function(){return this.debugShowBody},setMass:function(s){return s<=0&&(s=.1),this.mass=s,this},x:{get:function(){return this.position.x},set:function(s){this.world.staticTree.remove(this),this.position.x=s,this.world.staticTree.insert(this)}},y:{get:function(){return this.position.y},set:function(s){this.world.staticTree.remove(this),this.position.y=s,this.world.staticTree.insert(this)}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});c.exports=h},71464:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(13759),v=t(83419),o=t(78389),r=t(37747),n=t(95540),e=t(26479),i=t(41212),h=new v({Extends:e,Mixins:[o],initialize:function(l,f,u,d){!u&&!d?d={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler,createMultipleCallback:this.createMultipleCallbackHandler,classType:a}:i(u)?(d=u,u=null,d.internalCreateCallback=this.createCallbackHandler,d.internalRemoveCallback=this.removeCallbackHandler,d.createMultipleCallback=this.createMultipleCallbackHandler,d.classType=n(d,"classType",a)):Array.isArray(u)&&i(u[0])?(d=u,u=null,d.forEach(function(p){p.internalCreateCallback=this.createCallbackHandler,p.internalRemoveCallback=this.removeCallbackHandler,p.createMultipleCallback=this.createMultipleCallbackHandler,p.classType=n(p,"classType",a)})):d={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler},this.world=l,this.physicsType=r.STATIC_BODY,this.collisionCategory=1,this.collisionMask=1,e.call(this,f,u,d),this.type="StaticPhysicsGroup"},createCallbackHandler:function(s){s.body||this.world.enableBody(s,r.STATIC_BODY)},removeCallbackHandler:function(s){s.body&&this.world.disableBody(s)},createMultipleCallbackHandler:function(){this.refresh()},refresh:function(){for(var s=this.children.entries,l=0;l{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(55495),v=t(37742),o=t(45319),r=t(83419),n=t(79342),e=t(37747),i=t(20339),h=t(52816),s=t(50792),l=t(63012),f=t(43855),u=t(5470),d=t(94977),p=t(64897),g=t(45170),x=t(96523),y=t(35154),C=t(36383),P=t(25774),M=t(96602),R=t(87841),I=t(59542),L=t(40012),B=t(14087),N=t(89936),G=t(35072),V=t(72624),K=t(2483),j=t(61340),J=t(26099),X=t(15994),Y=new r({Extends:s,initialize:function(z,W){s.call(this),this.scene=z,this.bodies=new G,this.staticBodies=new G,this.pendingDestroy=new G,this.colliders=new P,this.gravity=new J(y(W,"gravity.x",0),y(W,"gravity.y",0)),this.bounds=new R(y(W,"x",0),y(W,"y",0),y(W,"width",z.sys.scale.width),y(W,"height",z.sys.scale.height)),this.checkCollision={up:y(W,"checkCollision.up",!0),down:y(W,"checkCollision.down",!0),left:y(W,"checkCollision.left",!0),right:y(W,"checkCollision.right",!0)},this.fps=y(W,"fps",60),this.fixedStep=y(W,"fixedStep",!0),this._elapsed=0,this._frameTime=1/this.fps,this._frameTimeMS=1e3*this._frameTime,this.stepsLastFrame=0,this.timeScale=y(W,"timeScale",1),this.OVERLAP_BIAS=y(W,"overlapBias",4),this.TILE_BIAS=y(W,"tileBias",16),this.forceX=y(W,"forceX",!1),this.isPaused=y(W,"isPaused",!1),this._total=0,this.drawDebug=y(W,"debug",!1),this.debugGraphic,this.defaults={debugShowBody:y(W,"debugShowBody",!0),debugShowStaticBody:y(W,"debugShowStaticBody",!0),debugShowVelocity:y(W,"debugShowVelocity",!0),bodyDebugColor:y(W,"debugBodyColor",16711935),staticBodyDebugColor:y(W,"debugStaticBodyColor",255),velocityDebugColor:y(W,"debugVelocityColor",65280)},this.maxEntries=y(W,"maxEntries",16),this.useTree=y(W,"useTree",!0),this.tree=new I(this.maxEntries),this.staticTree=new I(this.maxEntries),this.treeMinMax={minX:0,minY:0,maxX:0,maxY:0},this._tempMatrix=new j,this._tempMatrix2=new j,this.tileFilterOptions={isColliding:!0,isNotEmpty:!0,hasInterestingFace:!0},this.drawDebug&&this.createDebugGraphic()},enable:function(b,z){z===void 0&&(z=e.DYNAMIC_BODY),Array.isArray(b)||(b=[b]);for(var W=0;W=Z;for(this.fixedStep||(H=z*.001,et=!0,this._elapsed=0),W=0;W=Z;)this._elapsed-=Z,this.step(H)}},step:function(b){var z,W,H=this.bodies.entries,Z=H.length;for(z=0;z0){var st=this.tree,rt=this.staticTree;for(W=et.entries,H=W.length,b=0;b-1&&b.velocity.length()>ft&&(b.velocity.normalize().scale(ft),ot=ft),b.speed=ot},separate:function(b,z,W,H,Z){var Q,k,et=!1,st=!0;if(!b.enable||!z.enable||b.checkCollision.none||z.checkCollision.none||!this.intersects(b,z)||W&&W.call(H,b.gameObject,z.gameObject)===!1)return et;if(b.isCircle||z.isCircle){var rt=this.separateCircle(b,z,Z);rt.result?(et=!0,st=!1):(Q=rt.x,k=rt.y,st=!0)}if(st){var ot=!1,ft=!1,at=this.OVERLAP_BIAS;Z?(ot=B(b,z,Z,at,Q),ft=N(b,z,Z,at,k)):this.forceX||Math.abs(this.gravity.y+b.gravity.y)Ct&&(ft=i(vt,At,Ct,ct)-Et):At>pt&&(vtCt&&(ft=i(vt,At,Ct,pt)-Et)),ft*=-1}else ft=b.halfWidth+z.halfWidth-h(Q,k);b.overlapR=ft,z.overlapR=ft;var wt=a(Q,k),Bt=(ft+C.EPSILON)*Math.cos(wt),jt=(ft+C.EPSILON)*Math.sin(wt),zt={overlap:ft,result:!1,x:Bt,y:jt};if(W&&(!at||at&&ft!==0))return zt.result=!0,zt;if(!at&&ft===0||et&&st||b.customSeparateX||z.customSeparateX)return zt.x=void 0,zt.y=void 0,zt;var Yt=!b.pushable&&!z.pushable;if(at){var bt=Q.x-k.x,re=Q.y-k.y,Qt=Math.sqrt(Math.pow(bt,2)+Math.pow(re,2)),de=(k.x-Q.x)/Qt||0,ve=(k.y-Q.y)/Qt||0,Ae=2*(rt.x*de+rt.y*ve-ot.x*de-ot.y*ve)/(b.mass+z.mass);(et||st)&&(Ae*=2),et||(rt.x=rt.x-Ae/b.mass*de,rt.y=rt.y-Ae/b.mass*ve,rt.multiply(b.bounce)),st||(ot.x=ot.x+Ae/z.mass*de,ot.y=ot.y+Ae/z.mass*ve,ot.multiply(z.bounce)),!et&&!st&&(Bt*=.5,jt*=.5),et||(b.x-=Bt,b.y-=jt,b.updateCenter()),st||(z.x+=Bt,z.y+=jt,z.updateCenter()),zt.result=!0}else!et||b.pushable||Yt?(b.x-=Bt,b.y-=jt,b.updateCenter()):(!st||z.pushable||Yt)&&(z.x+=Bt,z.y+=jt,z.updateCenter()),zt.x=void 0,zt.y=void 0;return zt},intersects:function(b,z){return b===z?!1:!b.isCircle&&!z.isCircle?!(b.right<=z.left||b.bottom<=z.top||b.left>=z.right||b.top>=z.bottom):b.isCircle?z.isCircle?h(b.center,z.center)<=b.halfWidth+z.halfWidth:this.circleBodyIntersects(b,z):this.circleBodyIntersects(z,b)},circleBodyIntersects:function(b,z){var W=o(b.center.x,z.left,z.right),H=o(b.center.y,z.top,z.bottom),Z=(b.center.x-W)*(b.center.x-W),Q=(b.center.y-H)*(b.center.y-H);return Z+Q<=b.halfWidth*b.halfWidth},overlap:function(b,z,W,H,Z){return W===void 0&&(W=null),H===void 0&&(H=null),Z===void 0&&(Z=W),this.collideObjects(b,z,W,H,Z,!0)},collide:function(b,z,W,H,Z){return W===void 0&&(W=null),H===void 0&&(H=null),Z===void 0&&(Z=W),this.collideObjects(b,z,W,H,Z,!1)},collideObjects:function(b,z,W,H,Z,Q){var k,et;b.isParent&&(b.physicsType===void 0||z===void 0||b===z)&&(b=b.children.entries),z&&z.isParent&&z.physicsType===void 0&&(z=z.children.entries);var st=Array.isArray(b),rt=Array.isArray(z);if(this._total=0,!st&&!rt)this.collideHandler(b,z,W,H,Z,Q);else if(!st&&rt)for(k=0;k0},collideHandler:function(b,z,W,H,Z,Q){if(z===void 0&&b.isParent)return this.collideGroupVsGroup(b,b,W,H,Z,Q);if(!b||!z)return!1;if(b.body||b.isBody){if(z.body||z.isBody)return this.collideSpriteVsSprite(b,z,W,H,Z,Q);if(z.isParent)return this.collideSpriteVsGroup(b,z,W,H,Z,Q);if(z.isTilemap)return this.collideSpriteVsTilemapLayer(b,z,W,H,Z,Q)}else if(b.isParent){if(z.body||z.isBody)return this.collideSpriteVsGroup(z,b,W,H,Z,Q);if(z.isParent)return this.collideGroupVsGroup(b,z,W,H,Z,Q);if(z.isTilemap)return this.collideGroupVsTilemapLayer(b,z,W,H,Z,Q)}else if(b.isTilemap){if(z.body||z.isBody)return this.collideSpriteVsTilemapLayer(z,b,W,H,Z,Q);if(z.isParent)return this.collideGroupVsTilemapLayer(z,b,W,H,Z,Q)}},canCollide:function(b,z){return b&&z&&(b.collisionMask&z.collisionCategory)!==0&&(z.collisionMask&b.collisionCategory)!==0},collideSpriteVsSprite:function(b,z,W,H,Z,Q){var k=b.isBody?b:b.body,et=z.isBody?z:z.body;return this.canCollide(k,et)?(this.separate(k,et,H,Z,Q)&&(W&&W.call(Z,b,z),this._total++),!0):!1},collideSpriteVsGroup:function(b,z,W,H,Z,Q){var k=b.isBody?b:b.body;if(!(z.length===0||!k||!k.enable||k.checkCollision.none||!this.canCollide(k,z))){var et,st,rt;if(this.useTree||z.physicsType===e.STATIC_BODY){var ot=this.treeMinMax;ot.minX=k.left,ot.minY=k.top,ot.maxX=k.right,ot.maxY=k.bottom;var ft=z.physicsType===e.DYNAMIC_BODY?this.tree.search(ot):this.staticTree.search(ot);for(st=ft.length,et=0;et{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={setAcceleration:function(t,a){return this.body.acceleration.set(t,a),this},setAccelerationX:function(t){return this.body.acceleration.x=t,this},setAccelerationY:function(t){return this.body.acceleration.y=t,this}};c.exports=m},59023:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={setAngularVelocity:function(t){return this.body.angularVelocity=t,this},setAngularAcceleration:function(t){return this.body.angularAcceleration=t,this},setAngularDrag:function(t){return this.body.angularDrag=t,this}};c.exports=m},62069:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={setBounce:function(t,a){return this.body.bounce.set(t,a),this},setBounceX:function(t){return this.body.bounce.x=t,this},setBounceY:function(t){return this.body.bounce.y=t,this},setCollideWorldBounds:function(t,a,v,o){return this.body.setCollideWorldBounds(t,a,v,o),this}};c.exports=m},78389:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(79599),v={setCollisionCategory:function(o){var r=this.body?this.body:this;return r.collisionCategory=o,this},willCollideWith:function(o){var r=this.body?this.body:this;return(r.collisionMask&o)!==0},addCollidesWith:function(o){var r=this.body?this.body:this;return r.collisionMask=r.collisionMask|o,this},removeCollidesWith:function(o){var r=this.body?this.body:this;return r.collisionMask=r.collisionMask&~o,this},setCollidesWith:function(o){var r=this.body?this.body:this;return r.collisionMask=a(o),this},resetCollisionCategory:function(){var o=this.body?this.body:this;return o.collisionCategory=1,o.collisionMask=1,this}};c.exports=v},87118:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={setDebug:function(t,a,v){return this.debugShowBody=t,this.debugShowVelocity=a,this.debugBodyColor=v,this},setDebugBodyColor:function(t){return this.body.debugBodyColor=t,this},debugShowBody:{get:function(){return this.body.debugShowBody},set:function(t){this.body.debugShowBody=t}},debugShowVelocity:{get:function(){return this.body.debugShowVelocity},set:function(t){this.body.debugShowVelocity=t}},debugBodyColor:{get:function(){return this.body.debugBodyColor},set:function(t){this.body.debugBodyColor=t}}};c.exports=m},52819:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={setDrag:function(t,a){return this.body.drag.set(t,a),this},setDragX:function(t){return this.body.drag.x=t,this},setDragY:function(t){return this.body.drag.y=t,this},setDamping:function(t){return this.body.useDamping=t,this}};c.exports=m},4074:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={setDirectControl:function(t){return this.body.setDirectControl(t),this},enableBody:function(t,a,v,o,r){return t&&this.body.reset(a,v),o&&(this.body.gameObject.active=!0),r&&(this.body.gameObject.visible=!0),this.body.enable=!0,this},disableBody:function(t,a){return t===void 0&&(t=!1),a===void 0&&(a=!1),this.body.stop(),this.body.enable=!1,t&&(this.body.gameObject.active=!1),a&&(this.body.gameObject.visible=!1),this},refreshBody:function(){return this.body.updateFromGameObject(),this}};c.exports=m},40831:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={setFriction:function(t,a){return this.body.friction.set(t,a),this},setFrictionX:function(t){return this.body.friction.x=t,this},setFrictionY:function(t){return this.body.friction.y=t,this}};c.exports=m},26775:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={setGravity:function(t,a){return this.body.gravity.set(t,a),this},setGravityX:function(t){return this.body.gravity.x=t,this},setGravityY:function(t){return this.body.gravity.y=t,this}};c.exports=m},9437:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={setImmovable:function(t){return t===void 0&&(t=!0),this.body.immovable=t,this}};c.exports=m},30621:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={setMass:function(t){return this.body.mass=t,this}};c.exports=m},72441:(c,m,t)=>{var a=t(47956),v=t(96503),o=t(2044),r=t(81491),n=function(e,i,h,s,l,f){var u=a(e,i-s,h-s,2*s,2*s,l,f);if(u.length===0)return u;for(var d=new v(i,h,s),p=new v,g=[],x=0;x{var m=function(t,a,v,o,r,n,e){n===void 0&&(n=!0),e===void 0&&(e=!1);var i=[],h=[],s=t.treeMinMax;if(s.minX=a,s.minY=v,s.maxX=a+o,s.maxY=v+r,e&&(h=t.staticTree.search(s)),n&&t.useTree)i=t.tree.search(s);else if(n){var l=t.bodies,f={position:{x:a,y:v},left:a,top:v,right:a+o,bottom:v+r,isCircle:!1},u=t.intersects;l.iterate(function(d){u(d,f)&&i.push(d)})}return h.concat(i)};c.exports=m},62121:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={setPushable:function(t){return t===void 0&&(t=!0),this.body.pushable=t,this}};c.exports=m},29384:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={setOffset:function(t,a){return this.body.setOffset(t,a),this},setSize:function(t,a,v){return this.body.setSize(t,a,v),this},setBodySize:function(t,a,v){return this.body.setSize(t,a,v),this},setCircle:function(t,a,v){return this.body.setCircle(t,a,v),this}};c.exports=m},15098:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={setVelocity:function(t,a){return this.body.setVelocity(t,a),this},setVelocityX:function(t){return this.body.setVelocityX(t),this},setVelocityY:function(t){return this.body.setVelocityY(t),this},setMaxVelocity:function(t,a){return this.body.maxVelocity.set(t,a),this}};c.exports=m},92209:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={Acceleration:t(1093),Angular:t(59023),Bounce:t(62069),Collision:t(78389),Debug:t(87118),Drag:t(52819),Enable:t(4074),Friction:t(40831),Gravity:t(26775),Immovable:t(9437),Mass:t(30621),OverlapCirc:t(72441),OverlapRect:t(47956),Pushable:t(62121),Size:t(29384),Velocity:t(15098)}},37747:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={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};c.exports=m},20009:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="collide"},36768:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="overlap"},60473:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="pause"},89954:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="resume"},61804:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="tilecollide"},7161:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="tileoverlap"},34689:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="worldbounds"},16006:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="worldstep"},63012:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={COLLIDE:t(20009),OVERLAP:t(36768),PAUSE:t(60473),RESUME:t(89954),TILE_COLLIDE:t(61804),TILE_OVERLAP:t(7161),WORLD_BOUNDS:t(34689),WORLD_STEP:t(16006)}},27064:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(37747),v=t(79291),o={ArcadePhysics:t(86689),Body:t(37742),Collider:t(79342),Components:t(92209),Events:t(63012),Factory:t(66022),GetCollidesWith:t(79599),GetOverlapX:t(64897),GetOverlapY:t(45170),SeparateX:t(14087),SeparateY:t(89936),Group:t(60758),Image:t(71289),Sprite:t(13759),StaticBody:t(72624),StaticGroup:t(71464),Tilemap:t(55173),World:t(82248)};o=v(!1,o,a),c.exports=o},96602:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return t.collisionCallback?!t.collisionCallback.call(t.collisionCallbackContext,a,t):t.layer.callbacks[t.index]?!t.layer.callbacks[t.index].callback.call(t.layer.callbacks[t.index].callbackContext,a,t):!0};c.exports=m},36294:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){a<0?(t.blocked.none=!1,t.blocked.left=!0):a>0&&(t.blocked.none=!1,t.blocked.right=!0),t.position.x-=a,t.updateCenter(),t.bounce.x===0?t.velocity.x=0:t.velocity.x=-t.velocity.x*t.bounce.x};c.exports=m},67013:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){a<0?(t.blocked.none=!1,t.blocked.up=!0):a>0&&(t.blocked.none=!1,t.blocked.down=!0),t.position.y-=a,t.updateCenter(),t.bounce.y===0?t.velocity.y=0:t.velocity.y=-t.velocity.y*t.bounce.y};c.exports=m},40012:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(21329),v=t(53442),o=t(2483),r=function(n,e,i,h,s,l,f){var u=h.left,d=h.top,p=h.right,g=h.bottom,x=i.faceLeft||i.faceRight,y=i.faceTop||i.faceBottom;if(f||(x=!0,y=!0),!x&&!y)return!1;var C=0,P=0,M=0,R=1;if(e.deltaAbsX()>e.deltaAbsY()?M=-1:e.deltaAbsX(){/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(36294),v=function(o,r,n,e,i,h){var s=0,l=r.faceLeft,f=r.faceRight,u=r.collideLeft,d=r.collideRight;return h||(l=!0,f=!0,u=!0,d=!0),o.deltaX()<0&&d&&o.checkCollision.left?f&&o.x0&&u&&o.checkCollision.right&&l&&o.right>n&&(s=o.right-n,s>i&&(s=0)),s!==0&&(o.customSeparateX?o.overlapX=s:a(o,s)),s};c.exports=v},53442:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(67013),v=function(o,r,n,e,i,h){var s=0,l=r.faceTop,f=r.faceBottom,u=r.collideUp,d=r.collideDown;return h||(l=!0,f=!0,u=!0,d=!0),o.deltaY()<0&&d&&o.checkCollision.up?f&&o.y0&&u&&o.checkCollision.down&&l&&o.bottom>n&&(s=o.bottom-n,s>i&&(s=0)),s!==0&&(o.customSeparateY?o.overlapY=s:a(o,s)),s};c.exports=v},2483:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return!(a.right<=t.left||a.bottom<=t.top||a.position.x>=t.right||a.position.y>=t.bottom)};c.exports=m},55173:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a={ProcessTileCallbacks:t(96602),ProcessTileSeparationX:t(36294),ProcessTileSeparationY:t(67013),SeparateTile:t(40012),TileCheckX:t(21329),TileCheckY:t(53442),TileIntersectsBody:t(2483)};c.exports=a},44563:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={Arcade:t(27064),Matter:t(3875)}},68174:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(26099),o=new a({initialize:function(){this.boundsCenter=new v,this.centerDiff=new v},parseBody:function(r){if(r=r.hasOwnProperty("body")?r.body:r,!r.hasOwnProperty("bounds")||!r.hasOwnProperty("centerOfMass"))return!1;var n=this.boundsCenter,e=this.centerDiff,i=r.bounds.max.x-r.bounds.min.x,h=r.bounds.max.y-r.bounds.min.y,s=i*r.centerOfMass.x,l=h*r.centerOfMass.y;return n.set(i/2,h/2),e.set(s-n.x,l-n.y),!0},getTopLeft:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var i=this.boundsCenter,h=this.centerDiff;return new v(n+i.x+h.x,e+i.y+h.y)}return!1},getTopCenter:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var i=this.boundsCenter,h=this.centerDiff;return new v(n+h.x,e+i.y+h.y)}return!1},getTopRight:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var i=this.boundsCenter,h=this.centerDiff;return new v(n-(i.x-h.x),e+i.y+h.y)}return!1},getLeftCenter:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var i=this.boundsCenter,h=this.centerDiff;return new v(n+i.x+h.x,e+h.y)}return!1},getCenter:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var i=this.centerDiff;return new v(n+i.x,e+i.y)}return!1},getRightCenter:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var i=this.boundsCenter,h=this.centerDiff;return new v(n-(i.x-h.x),e+h.y)}return!1},getBottomLeft:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var i=this.boundsCenter,h=this.centerDiff;return new v(n+i.x+h.x,e-(i.y-h.y))}return!1},getBottomCenter:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var i=this.boundsCenter,h=this.centerDiff;return new v(n+h.x,e-(i.y-h.y))}return!1},getBottomRight:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var i=this.boundsCenter,h=this.centerDiff;return new v(n-(i.x-h.x),e-(i.y-h.y))}return!1}});c.exports=o},19933:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(6790);a.Body=t(22562),a.Composite=t(69351),a.World=t(4372),a.Collision=t(52284),a.Detector=t(81388),a.Pairs=t(99561),a.Pair=t(4506),a.Query=t(73296),a.Resolver=t(66272),a.Constraint=t(48140),a.Common=t(53402),a.Engine=t(48413),a.Events=t(35810),a.Sleeping=t(53614),a.Plugin=t(73832),a.Bodies=t(66280),a.Composites=t(74116),a.Axes=t(66615),a.Bounds=t(15647),a.Svg=t(74058),a.Vector=t(31725),a.Vertices=t(41598),a.World.add=a.Composite.add,a.World.remove=a.Composite.remove,a.World.addComposite=a.Composite.addComposite,a.World.addBody=a.Composite.addBody,a.World.addConstraint=a.Composite.addConstraint,a.World.clear=a.Composite.clear,c.exports=a},28137:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(66280),v=t(83419),o=t(74116),r=t(48140),n=t(74058),e=t(75803),i=t(23181),h=t(34803),s=t(73834),l=t(19496),f=t(85791),u=t(98713),d=t(41598),p=new v({initialize:function(x){this.world=x,this.scene=x.scene,this.sys=x.scene.sys},rectangle:function(g,x,y,C,P){var M=a.rectangle(g,x,y,C,P);return this.world.add(M),M},trapezoid:function(g,x,y,C,P,M){var R=a.trapezoid(g,x,y,C,P,M);return this.world.add(R),R},circle:function(g,x,y,C,P){var M=a.circle(g,x,y,C,P);return this.world.add(M),M},polygon:function(g,x,y,C,P){var M=a.polygon(g,x,y,C,P);return this.world.add(M),M},fromVertices:function(g,x,y,C,P,M,R){typeof y=="string"&&(y=d.fromPath(y));var I=a.fromVertices(g,x,y,C,P,M,R);return this.world.add(I),I},fromPhysicsEditor:function(g,x,y,C,P){P===void 0&&(P=!0);var M=l.parseBody(g,x,y,C);return P&&!this.world.has(M)&&this.world.add(M),M},fromSVG:function(g,x,y,C,P,M){C===void 0&&(C=1),P===void 0&&(P={}),M===void 0&&(M=!0);for(var R=y.getElementsByTagName("path"),I=[],L=0;L{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(31884),v=t(95540),o=t(26099);function r(e){return!!e.get&&typeof e.get=="function"||!!e.set&&typeof e.set=="function"}var n=function(e,i,h,s){h===void 0&&(h={}),s===void 0&&(s=!0);var l=i.x,f=i.y;i.body={temp:!0,position:{x:l,y:f}};var u=[a.Bounce,a.Collision,a.Force,a.Friction,a.Gravity,a.Mass,a.Sensor,a.SetBody,a.Sleep,a.Static,a.Transform,a.Velocity];if(u.forEach(function(p){for(var g in p)r(p[g])?Object.defineProperty(i,g,{get:p[g].get,set:p[g].set}):Object.defineProperty(i,g,{value:p[g]})}),i.world=e,i._tempVec2=new o(l,f),h.hasOwnProperty("type")&&h.type==="body")i.setExistingBody(h,s);else{var d=v(h,"shape",null);d||(d="rectangle"),h.addToWorld=s,i.setBody(d,h)}return i};c.exports=n},23181:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(31884),o=t(95643),r=t(95540),n=t(88571),e=t(72699),i=t(26099),h=new a({Extends:n,Mixins:[v.Bounce,v.Collision,v.Force,v.Friction,v.Gravity,v.Mass,v.Sensor,v.SetBody,v.Sleep,v.Static,v.Transform,v.Velocity,e],initialize:function(l,f,u,d,p,g){o.call(this,l.scene,"Image"),this._crop=this.resetCropObject(),this.setTexture(d,p),this.setSizeToFrame(),this.setOrigin(),this.world=l,this._tempVec2=new i(f,u);var x=r(g,"shape",null);x?this.setBody(x,g):this.setRectangle(this.width,this.height,g),this.setPosition(f,u),this.initPipeline(),this.initPostPipeline(!0)}});c.exports=h},42045:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(60461),v=t(66615),o=t(66280),r=t(22562),n=t(68174),e=t(15647),i=t(83419),h=t(52284),s=t(53402),l=t(69351),f=t(74116),u=t(48140),d=t(81388),p=t(20339),g=t(28137),x=t(95540),y=t(35154),C=t(18210),P=t(40178),M=t(6790),R=t(74507),I=t(46975),L=t(4506),B=t(99561),N=t(73832),G=t(37277),V=t(73296),K=t(66272),j=t(44594),J=t(74058),X=t(31725),Y=t(41598),b=t(68243);s.setDecomp(t(55973));var z=new i({initialize:function(H){this.scene=H,this.systems=H.sys,this.config=this.getConfig(),this.world,this.add,this.bodyBounds,this.body=r,this.composite=l,this.collision=h,this.detector=d,this.pair=L,this.pairs=B,this.query=V,this.resolver=K,this.constraint=u,this.bodies=o,this.composites=f,this.axes=v,this.bounds=e,this.svg=J,this.vector=X,this.vertices=Y,this.verts=Y,this._tempVec2=X.create(),y(this.config,"plugins.collisionevents",!0)&&this.enableCollisionEventsPlugin(),y(this.config,"plugins.attractors",!1)&&this.enableAttractorPlugin(),y(this.config,"plugins.wrap",!1)&&this.enableWrapPlugin(),K._restingThresh=y(this.config,"restingThresh",4),K._restingThreshTangent=y(this.config,"restingThreshTangent",6),K._positionDampen=y(this.config,"positionDampen",.9),K._positionWarming=y(this.config,"positionWarming",.8),K._frictionNormalMultiplier=y(this.config,"frictionNormalMultiplier",5),H.sys.events.once(j.BOOT,this.boot,this),H.sys.events.on(j.START,this.start,this)},boot:function(){this.world=new b(this.scene,this.config),this.add=new g(this.world),this.bodyBounds=new n,this.systems.events.once(j.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new b(this.scene,this.config),this.add=new g(this.world));var W=this.systems.events;W.on(j.UPDATE,this.world.update,this.world),W.on(j.POST_UPDATE,this.world.postUpdate,this.world),W.once(j.SHUTDOWN,this.shutdown,this)},getConfig:function(){var W=this.systems.game.config.physics,H=this.systems.settings.physics,Z=I(x(H,"matter",{}),x(W,"matter",{}));return Z},enableAttractorPlugin:function(){return N.register(C),N.use(M,C),this},enableWrapPlugin:function(){return N.register(R),N.use(M,R),this},enableCollisionEventsPlugin:function(){return N.register(P),N.use(M,P),this},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},set60Hz:function(){return this.world.getDelta=this.world.update60Hz,this.world.autoUpdate=!0,this},set30Hz:function(){return this.world.getDelta=this.world.update30Hz,this.world.autoUpdate=!0,this},step:function(W,H){this.world.step(W,H)},containsPoint:function(W,H,Z){W=this.getMatterBodies(W);var Q=X.create(H,Z),k=V.point(W,Q);return k.length>0},intersectPoint:function(W,H,Z){Z=this.getMatterBodies(Z);var Q=X.create(W,H),k=[],et=V.point(Z,Q);return et.forEach(function(st){k.indexOf(st)===-1&&k.push(st)}),k},intersectRect:function(W,H,Z,Q,k,et){k===void 0&&(k=!1),et=this.getMatterBodies(et);var st={min:{x:W,y:H},max:{x:W+Z,y:H+Q}},rt=[],ot=V.region(et,st,k);return ot.forEach(function(ft){rt.indexOf(ft)===-1&&rt.push(ft)}),rt},intersectRay:function(W,H,Z,Q,k,et){k===void 0&&(k=1),et=this.getMatterBodies(et);for(var st=[],rt=V.ray(et,X.create(W,H),X.create(Z,Q),k),ot=0;ot{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(9674),v=t(83419),o=t(31884),r=t(95643),n=t(95540),e=t(72699),i=t(68287),h=t(26099),s=new v({Extends:i,Mixins:[o.Bounce,o.Collision,o.Force,o.Friction,o.Gravity,o.Mass,o.Sensor,o.SetBody,o.Sleep,o.Static,o.Transform,o.Velocity,e],initialize:function(f,u,d,p,g,x){r.call(this,f.scene,"Sprite"),this._crop=this.resetCropObject(),this.anims=new a(this),this.setTexture(p,g),this.setSizeToFrame(),this.setOrigin(),this.world=f,this._tempVec2=new h(u,d);var y=n(x,"shape",null);y?this.setBody(y,x):this.setRectangle(this.width,this.height,x),this.setPosition(u,d),this.initPipeline(),this.initPostPipeline(!0)}});c.exports=s},73834:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(66280),v=t(22562),o=t(83419),r=t(31884),n=t(62644),e=t(50792),i=t(95540),h=t(97022),s=t(41598),l=new o({Extends:e,Mixins:[r.Bounce,r.Collision,r.Friction,r.Gravity,r.Mass,r.Sensor,r.Sleep,r.Static],initialize:function(u,d,p){e.call(this),this.tile=d,this.world=u,d.physics.matterBody&&d.physics.matterBody.destroy(),d.physics.matterBody=this;var g=i(p,"body",null),x=i(p,"addToWorld",!0);if(g)this.setBody(g,x);else{var y=d.getCollisionGroup(),C=i(y,"objects",[]);C.length>0?this.setFromTileCollision(p):this.setFromTileRectangle(p)}if(d.flipX||d.flipY){var P={x:d.getCenterX(),y:d.getCenterY()},M=d.flipX?-1:1,R=d.flipY?-1:1;v.scale(g,M,R,P)}},setFromTileRectangle:function(f){f===void 0&&(f={}),h(f,"isStatic")||(f.isStatic=!0),h(f,"addToWorld")||(f.addToWorld=!0);var u=this.tile.getBounds(),d=u.x+u.width/2,p=u.y+u.height/2,g=a.rectangle(d,p,u.width,u.height,f);return this.setBody(g,f.addToWorld),this},setFromTileCollision:function(f){f===void 0&&(f={}),h(f,"isStatic")||(f.isStatic=!0),h(f,"addToWorld")||(f.addToWorld=!0);for(var u=this.tile.tilemapLayer.scaleX,d=this.tile.tilemapLayer.scaleY,p=this.tile.getLeft(),g=this.tile.getTop(),x=this.tile.getCollisionGroup(),y=i(x,"objects",[]),C=[],P=0;P1){var J=n(f);J.parts=C,this.setBody(v.create(J),J.addToWorld)}return this},setBody:function(f,u){return u===void 0&&(u=!0),this.body&&this.removeBody(),this.body=f,this.body.gameObject=this,u&&this.world.add(this.body),this},removeBody:function(){return this.body&&(this.world.remove(this.body),this.body.gameObject=void 0,this.body=void 0),this},destroy:function(){this.removeBody(),this.tile.physics.matterBody=void 0,this.removeAllListeners()}});c.exports=l},19496:(c,m,t)=>{/** - * @author Joachim Grill - * @author Richard Davey - * @copyright 2018 CodeAndWeb GmbH - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(66280),v=t(22562),o=t(53402),r=t(95540),n=t(41598),e={parseBody:function(i,h,s,l){l===void 0&&(l={});for(var f=r(s,"fixtures",[]),u=[],d=0;d{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(66280),v=t(22562),o={parseBody:function(r,n,e,i){i===void 0&&(i={});var h,s=e.vertices;if(s.length===1)i.vertices=s[0],h=v.create(i),a.flagCoincidentParts(h.parts);else{for(var l=[],f=0;f{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(15647),v=t(83419),o=t(69351),r=t(48140),n=t(81388),e=t(1121),i=t(8214),h=t(46975),s=t(53614),l=t(26099),f=t(41598),u=new v({initialize:function(p,g,x){x===void 0&&(x={});var y={label:"Pointer Constraint",pointA:{x:0,y:0},pointB:{x:0,y:0},length:.01,stiffness:.1,angularStiffness:1,collisionFilter:{category:1,mask:4294967295,group:0}};this.scene=p,this.world=g,this.camera=null,this.pointer=null,this.active=!0,this.position=new l,this.body=null,this.part=null,this.constraint=r.create(h(x,y)),this.world.on(e.BEFORE_UPDATE,this.update,this),p.sys.input.on(i.POINTER_DOWN,this.onDown,this),p.sys.input.on(i.POINTER_UP,this.onUp,this)},onDown:function(d){this.pointer||(this.pointer=d,this.camera=d.camera)},onUp:function(d){d===this.pointer&&(this.pointer=null)},getBody:function(d){var p=this.position,g=this.constraint;this.camera.getWorldPoint(d.x,d.y,p);for(var x=o.allBodies(this.world.localWorld),y=0;y1?1:0,C=y;C{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(66280),v=t(22562),o=t(83419),r=t(53402),n=t(69351),e=t(48413),i=t(50792),h=t(1121),s=t(95540),l=t(35154),f=t(22562),u=t(35810),d=t(73834),p=t(4372),g=t(31725),x=new o({Extends:i,initialize:function(C,P){i.call(this),this.scene=C,this.engine=e.create(P),this.localWorld=this.engine.world;var M=l(P,"gravity",null);M?this.setGravity(M.x,M.y,M.scale):M===!1&&this.setGravity(0,0,0),this.walls={left:null,right:null,top:null,bottom:null},this.enabled=l(P,"enabled",!0),this.getDelta=l(P,"getDelta",this.update60Hz);var R=s(P,"runner",{}),I=s(R,"fps",!1),L=s(R,"fps",60),B=s(R,"delta",1e3/L),N=s(R,"deltaMin",1e3/L),G=s(R,"deltaMax",1e3/(L*.5));I||(L=1e3/B),this.runner={fps:L,deltaSampleSize:s(R,"deltaSampleSize",60),counterTimestamp:0,frameCounter:0,deltaHistory:[],timePrev:null,timeScalePrev:1,frameRequestId:null,isFixed:s(R,"isFixed",!1),delta:B,deltaMin:N,deltaMax:G},this.autoUpdate=l(P,"autoUpdate",!0);var V=l(P,"debug",!1);if(this.drawDebug=typeof V=="object"?!0:V,this.debugGraphic,this.debugConfig={showAxes:s(V,"showAxes",!1),showAngleIndicator:s(V,"showAngleIndicator",!1),angleColor:s(V,"angleColor",15208787),showBroadphase:s(V,"showBroadphase",!1),broadphaseColor:s(V,"broadphaseColor",16757760),showBounds:s(V,"showBounds",!1),boundsColor:s(V,"boundsColor",16777215),showVelocity:s(V,"showVelocity",!1),velocityColor:s(V,"velocityColor",44783),showCollisions:s(V,"showCollisions",!1),collisionColor:s(V,"collisionColor",16094476),showSeparations:s(V,"showSeparations",!1),separationColor:s(V,"separationColor",16753920),showBody:s(V,"showBody",!0),showStaticBody:s(V,"showStaticBody",!0),showInternalEdges:s(V,"showInternalEdges",!1),renderFill:s(V,"renderFill",!1),renderLine:s(V,"renderLine",!0),fillColor:s(V,"fillColor",1075465),fillOpacity:s(V,"fillOpacity",1),lineColor:s(V,"lineColor",2678297),lineOpacity:s(V,"lineOpacity",1),lineThickness:s(V,"lineThickness",1),staticFillColor:s(V,"staticFillColor",857979),staticLineColor:s(V,"staticLineColor",1255396),showSleeping:s(V,"showSleeping",!1),staticBodySleepOpacity:s(V,"staticBodySleepOpacity",.7),sleepFillColor:s(V,"sleepFillColor",4605510),sleepLineColor:s(V,"sleepLineColor",10066585),showSensors:s(V,"showSensors",!0),sensorFillColor:s(V,"sensorFillColor",857979),sensorLineColor:s(V,"sensorLineColor",1255396),showPositions:s(V,"showPositions",!0),positionSize:s(V,"positionSize",4),positionColor:s(V,"positionColor",14697178),showJoint:s(V,"showJoint",!0),jointColor:s(V,"jointColor",14737474),jointLineOpacity:s(V,"jointLineOpacity",1),jointLineThickness:s(V,"jointLineThickness",2),pinSize:s(V,"pinSize",4),pinColor:s(V,"pinColor",4382944),springColor:s(V,"springColor",14697184),anchorColor:s(V,"anchorColor",15724527),anchorSize:s(V,"anchorSize",4),showConvexHulls:s(V,"showConvexHulls",!1),hullColor:s(V,"hullColor",14091216)},this.drawDebug&&this.createDebugGraphic(),this.setEventsProxy(),s(P,"setBounds",!1)){var K=P.setBounds;if(typeof K=="boolean")this.setBounds();else{var j=s(K,"x",0),J=s(K,"y",0),X=s(K,"width",C.sys.scale.width),Y=s(K,"height",C.sys.scale.height),b=s(K,"thickness",64),z=s(K,"left",!0),W=s(K,"right",!0),H=s(K,"top",!0),Z=s(K,"bottom",!0);this.setBounds(j,J,X,Y,b,z,W,H,Z)}}},setCompositeRenderStyle:function(y){var C=y.bodies,P=y.constraints,M=y.composites,R,I,L;for(R=0;R0&&(I=R[0].bodyA,L=R[0].bodyB),y.emit(h.COLLISION_START,M,I,L)}),u.on(C,"collisionActive",function(M){var R=M.pairs,I,L;R.length>0&&(I=R[0].bodyA,L=R[0].bodyB),y.emit(h.COLLISION_ACTIVE,M,I,L)}),u.on(C,"collisionEnd",function(M){var R=M.pairs,I,L;R.length>0&&(I=R[0].bodyA,L=R[0].bodyB),y.emit(h.COLLISION_END,M,I,L)})},setBounds:function(y,C,P,M,R,I,L,B,N){return y===void 0&&(y=0),C===void 0&&(C=0),P===void 0&&(P=this.scene.sys.scale.width),M===void 0&&(M=this.scene.sys.scale.height),R===void 0&&(R=64),I===void 0&&(I=!0),L===void 0&&(L=!0),B===void 0&&(B=!0),N===void 0&&(N=!0),this.updateWall(I,"left",y-R,C-R,R,M+R*2),this.updateWall(L,"right",y+P,C-R,R,M+R*2),this.updateWall(B,"top",y,C-R,P,R),this.updateWall(N,"bottom",y,C+M,P,R),this},updateWall:function(y,C,P,M,R,I){var L=this.walls[C];y?(L&&p.remove(this.localWorld,L),P+=R/2,M+=I/2,this.walls[C]=this.create(P,M,R,I,{isStatic:!0,friction:0,frictionStatic:0})):(L&&p.remove(this.localWorld,L),this.walls[C]=null)},createDebugGraphic:function(){var y=this.scene.sys.add.graphics({x:0,y:0});return y.setDepth(Number.MAX_VALUE),this.debugGraphic=y,this.drawDebug=!0,y},disableGravity:function(){return this.localWorld.gravity.x=0,this.localWorld.gravity.y=0,this.localWorld.gravity.scale=0,this},setGravity:function(y,C,P){return y===void 0&&(y=0),C===void 0&&(C=1),P===void 0&&(P=.001),this.localWorld.gravity.x=y,this.localWorld.gravity.y=C,this.localWorld.gravity.scale=P,this},create:function(y,C,P,M,R){var I=a.rectangle(y,C,P,M,R);return p.add(this.localWorld,I),I},add:function(y){return p.add(this.localWorld,y),this},remove:function(y,C){Array.isArray(y)||(y=[y]);for(var P=0;PM.deltaMax?M.deltaMax:C,M.delta=C),M.timeScalePrev=R.timeScale,M.frameCounter+=1,y-M.counterTimestamp>=1e3&&(M.fps=M.frameCounter*((y-M.counterTimestamp)/1e3),M.counterTimestamp=y,M.frameCounter=0),e.update(P,C)}},step:function(y){e.update(this.engine,y)},update60Hz:function(){return 1e3/60},update30Hz:function(){return 1e3/30},has:function(y){var C=y.hasOwnProperty("body")?y.body:y;return n.get(this.localWorld,C.id,C.type)!==null},getAllBodies:function(){return n.allBodies(this.localWorld)},getAllConstraints:function(){return n.allConstraints(this.localWorld)},getAllComposites:function(){return n.allComposites(this.localWorld)},postUpdate:function(){if(this.drawDebug){var y=this.debugConfig,C=this.engine,P=this.debugGraphic,M=n.allBodies(this.localWorld);this.debugGraphic.clear(),y.showBroadphase&&C.broadphase.controller&&this.renderGrid(C.broadphase,P,y.broadphaseColor,.5),y.showBounds&&this.renderBodyBounds(M,P,y.boundsColor,.5),(y.showBody||y.showStaticBody)&&this.renderBodies(M),y.showJoint&&this.renderJoints(),(y.showAxes||y.showAngleIndicator)&&this.renderBodyAxes(M,P,y.showAxes,y.angleColor,.5),y.showVelocity&&this.renderBodyVelocity(M,P,y.velocityColor,1,2),y.showSeparations&&this.renderSeparations(C.pairs.list,P,y.separationColor),y.showCollisions&&this.renderCollisions(C.pairs.list,P,y.collisionColor)}},renderGrid:function(y,C,P,M){C.lineStyle(1,P,M);for(var R=r.keys(y.buckets),I=0;I0){var V=G[0].vertex.x,K=G[0].vertex.y;G.length===2&&(V=(G[0].vertex.x+G[1].vertex.x)/2,K=(G[0].vertex.y+G[1].vertex.y)/2),N.bodyB===N.supports[0].body||N.bodyA.isStatic?C.lineBetween(V-N.normal.x*8,K-N.normal.y*8,V,K):C.lineBetween(V+N.normal.x*8,K+N.normal.y*8,V,K)}}return this},renderBodyBounds:function(y,C,P,M){C.lineStyle(1,P,M);for(var R=0;R1?1:0;N1?1:0;G1?1:0;G1&&this.renderConvexHull(Y,C,J,W)}}},renderBody:function(y,C,P,M,R,I,L,B){M===void 0&&(M=null),R===void 0&&(R=null),I===void 0&&(I=1),L===void 0&&(L=null),B===void 0&&(B=null);for(var N=this.debugConfig,G=N.sensorFillColor,V=N.sensorLineColor,K=y.parts,j=K.length,J=j>1?1:0;J1){var L=y.vertices;C.lineStyle(M,P),C.beginPath(),C.moveTo(L[0].x,L[0].y);for(var B=1;B0&&(C.fillStyle(L),C.fillCircle(K.x,K.y,B),C.fillCircle(j.x,j.y,B)),this},resetCollisionIDs:function(){return v._nextCollidingGroupId=1,v._nextNonCollidingGroupId=-1,v._nextCategory=1,this},shutdown:function(){u.off(this.engine),this.removeAllListeners(),p.clear(this.localWorld,!1),e.clear(this.engine),this.drawDebug&&this.debugGraphic.destroy()},destroy:function(){this.shutdown()}});c.exports=x},70410:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={setBounce:function(t){return this.body.restitution=t,this}};c.exports=m},66968:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={setCollisionCategory:function(t){return this.body.collisionFilter.category=t,this},setCollisionGroup:function(t){return this.body.collisionFilter.group=t,this},setCollidesWith:function(t){var a=0;if(!Array.isArray(t))a=t;else for(var v=0;v{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(22562),v={applyForce:function(o){return this._tempVec2.set(this.body.position.x,this.body.position.y),a.applyForce(this.body,this._tempVec2,o),this},applyForceFrom:function(o,r){return a.applyForce(this.body,o,r),this},thrust:function(o){var r=this.body.angle;return this._tempVec2.set(o*Math.cos(r),o*Math.sin(r)),a.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustLeft:function(o){var r=this.body.angle-Math.PI/2;return this._tempVec2.set(o*Math.cos(r),o*Math.sin(r)),a.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustRight:function(o){var r=this.body.angle+Math.PI/2;return this._tempVec2.set(o*Math.cos(r),o*Math.sin(r)),a.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustBack:function(o){var r=this.body.angle-Math.PI;return this._tempVec2.set(o*Math.cos(r),o*Math.sin(r)),a.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this}};c.exports=v},5436:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={setFriction:function(t,a,v){return this.body.friction=t,a!==void 0&&(this.body.frictionAir=a),v!==void 0&&(this.body.frictionStatic=v),this},setFrictionAir:function(t){return this.body.frictionAir=t,this},setFrictionStatic:function(t){return this.body.frictionStatic=t,this}};c.exports=m},39858:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={setIgnoreGravity:function(t){return this.body.ignoreGravity=t,this}};c.exports=m},37302:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(22562),v=t(26099),o={setMass:function(r){return a.setMass(this.body,r),this},setDensity:function(r){return a.setDensity(this.body,r),this},centerOfMass:{get:function(){return new v(this.body.centerOfMass.x,this.body.centerOfMass.y)}}};c.exports=o},39132:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={setSensor:function(t){return this.body.isSensor=t,this},isSensor:function(){return this.body.isSensor}};c.exports=m},57772:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(66280),v=t(22562),o=t(43855),r=t(95540),n=t(19496),e=t(85791),i=t(41598),h={setRectangle:function(s,l,f){return this.setBody({type:"rectangle",width:s,height:l},f)},setCircle:function(s,l){return this.setBody({type:"circle",radius:s},l)},setPolygon:function(s,l,f){return this.setBody({type:"polygon",sides:l,radius:s},f)},setTrapezoid:function(s,l,f,u){return this.setBody({type:"trapezoid",width:s,height:l,slope:f},u)},setExistingBody:function(s,l){l===void 0&&(l=!0),this.body&&this.world.remove(this.body,!0),this.body=s;for(var f=0;f{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(1121),v=t(53614),o=t(35810),r={setToSleep:function(){return v.set(this.body,!0),this},setAwake:function(){return v.set(this.body,!1),this},setSleepThreshold:function(n){return n===void 0&&(n=60),this.body.sleepThreshold=n,this},setSleepEvents:function(n,e){return this.setSleepStartEvent(n),this.setSleepEndEvent(e),this},setSleepStartEvent:function(n){if(n){var e=this.world;o.on(this.body,"sleepStart",function(i){e.emit(a.SLEEP_START,i,this)})}else o.off(this.body,"sleepStart");return this},setSleepEndEvent:function(n){if(n){var e=this.world;o.on(this.body,"sleepEnd",function(i){e.emit(a.SLEEP_END,i,this)})}else o.off(this.body,"sleepEnd");return this}};c.exports=r},90556:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(22562),v={setStatic:function(o){return a.setStatic(this.body,o),this},isStatic:function(){return this.body.isStatic}};c.exports=v},85436:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(22562),v=t(36383),o=t(86554),r=t(30954),n=4,e={x:{get:function(){return this.body.position.x},set:function(i){this._tempVec2.set(i,this.y),a.setPosition(this.body,this._tempVec2)}},y:{get:function(){return this.body.position.y},set:function(i){this._tempVec2.set(this.x,i),a.setPosition(this.body,this._tempVec2)}},scaleX:{get:function(){return this._scaleX},set:function(i){var h=1/this._scaleX,s=1/this._scaleY;this._scaleX=i,this._scaleX===0?this.renderFlags&=~n:this.renderFlags|=n,a.scale(this.body,h,s),a.scale(this.body,i,this._scaleY)}},scaleY:{get:function(){return this._scaleY},set:function(i){var h=1/this._scaleX,s=1/this._scaleY;this._scaleY=i,this._scaleY===0?this.renderFlags&=~n:this.renderFlags|=n,a.scale(this.body,h,s),a.scale(this.body,this._scaleX,i)}},angle:{get:function(){return r(this.body.angle*v.RAD_TO_DEG)},set:function(i){this.rotation=r(i)*v.DEG_TO_RAD}},rotation:{get:function(){return this.body.angle},set:function(i){this._rotation=o(i),a.setAngle(this.body,this._rotation)}},setPosition:function(i,h){return i===void 0&&(i=0),h===void 0&&(h=i),this._tempVec2.set(i,h),a.setPosition(this.body,this._tempVec2),this},setRotation:function(i){return i===void 0&&(i=0),this._rotation=o(i),a.setAngle(this.body,i),this},setFixedRotation:function(){return a.setInertia(this.body,1/0),this},setAngle:function(i){return i===void 0&&(i=0),this.angle=i,a.setAngle(this.body,this.rotation),this},setScale:function(i,h,s){i===void 0&&(i=1),h===void 0&&(h=i);var l=1/this._scaleX,f=1/this._scaleY;return this._scaleX=i,this._scaleY=h,a.scale(this.body,l,f,s),a.scale(this.body,i,h,s),this}};c.exports=e},42081:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(22562),v={setVelocityX:function(o){return this._tempVec2.set(o,this.body.velocity.y),a.setVelocity(this.body,this._tempVec2),this},setVelocityY:function(o){return this._tempVec2.set(this.body.velocity.x,o),a.setVelocity(this.body,this._tempVec2),this},setVelocity:function(o,r){return this._tempVec2.set(o,r),a.setVelocity(this.body,this._tempVec2),this},getVelocity:function(){return a.getVelocity(this.body)},setAngularVelocity:function(o){return a.setAngularVelocity(this.body,o),this},getAngularVelocity:function(){return a.getAngularVelocity(this.body)},setAngularSpeed:function(o){return a.setAngularSpeed(this.body,o),this},getAngularSpeed:function(){return a.getAngularSpeed(this.body)}};c.exports=v},31884:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={Bounce:t(70410),Collision:t(66968),Force:t(51607),Friction:t(5436),Gravity:t(39858),Mass:t(37302),Sensor:t(39132),SetBody:t(57772),Sleep:t(38083),Static:t(90556),Transform:t(85436),Velocity:t(42081)}},85608:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="afteradd"},1213:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="afterremove"},25968:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="afterupdate"},67205:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="beforeadd"},39438:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="beforeremove"},44823:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="beforeupdate"},92593:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="collisionactive"},60128:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="collisionend"},76861:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="collisionstart"},92362:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="dragend"},76408:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="drag"},93971:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="dragstart"},5656:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="pause"},47861:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="resume"},79099:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="sleepend"},35906:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="sleepstart"},1121:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={AFTER_ADD:t(85608),AFTER_REMOVE:t(1213),AFTER_UPDATE:t(25968),BEFORE_ADD:t(67205),BEFORE_REMOVE:t(39438),BEFORE_UPDATE:t(44823),COLLISION_ACTIVE:t(92593),COLLISION_END:t(60128),COLLISION_START:t(76861),DRAG_END:t(92362),DRAG:t(76408),DRAG_START:t(93971),PAUSE:t(5656),RESUME:t(47861),SLEEP_END:t(79099),SLEEP_START:t(35906)}},3875:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={BodyBounds:t(68174),Components:t(31884),Events:t(1121),Factory:t(28137),MatterGameObject:t(75803),Image:t(23181),Matter:t(19933),MatterPhysics:t(42045),PolyDecomp:t(55973),Sprite:t(34803),TileBody:t(73834),PhysicsEditorParser:t(19496),PhysicsJSONParser:t(85791),PointerConstraint:t(98713),World:t(68243)}},22562:(c,m,t)=>{var a={};c.exports=a;var v=t(41598),o=t(31725),r=t(53614),n=t(53402),e=t(15647),i=t(66615);(function(){a._timeCorrection=!0,a._inertiaScale=4,a._nextCollidingGroupId=1,a._nextNonCollidingGroupId=-1,a._nextCategory=1,a._baseDelta=16.666666666666668,a.create=function(s){var l={id:n.nextId(),type:"body",label:"Body",parts:[],plugin:{},angle:0,vertices:null,position:{x:0,y:0},force:{x:0,y:0},torque:0,positionImpulse:{x:0,y:0},constraintImpulse:{x:0,y:0,angle:0},totalContacts:0,speed:0,angularSpeed:0,velocity:{x:0,y:0},angularVelocity:0,isSensor:!1,isStatic:!1,isSleeping:!1,motion:0,sleepThreshold:60,density:.001,restitution:0,friction:.1,frictionStatic:.5,frictionAir:.01,collisionFilter:{category:1,mask:4294967295,group:0},slop:.05,timeScale:1,events:null,bounds:null,chamfer:null,circleRadius:0,positionPrev:null,anglePrev:0,parent:null,axes:null,area:0,mass:0,inverseMass:0,inertia:0,deltaTime:16.666666666666668,inverseInertia:0,_original:null,render:{visible:!0,opacity:1,sprite:{xOffset:0,yOffset:0},fillColor:null,fillOpacity:null,lineColor:null,lineOpacity:null,lineThickness:null},gameObject:null,scale:{x:1,y:1},centerOfMass:{x:0,y:0},centerOffset:{x:0,y:0},gravityScale:{x:1,y:1},ignoreGravity:!1,ignorePointer:!1,onCollideCallback:null,onCollideEndCallback:null,onCollideActiveCallback:null,onCollideWith:{}};!s.hasOwnProperty("position")&&s.hasOwnProperty("vertices")?s.position=v.centre(s.vertices):s.hasOwnProperty("vertices")||(l.vertices=v.fromPath("L 0 0 L 40 0 L 40 40 L 0 40"));var f=n.extend(l,s);return h(f,s),f.setOnCollideWith=function(u,d){return d?this.onCollideWith[u.id]=d:delete this.onCollideWith[u.id],this},f},a.nextGroup=function(s){return s?a._nextNonCollidingGroupId--:a._nextCollidingGroupId++},a.nextCategory=function(){return a._nextCategory=a._nextCategory<<1,a._nextCategory};var h=function(s,l){if(l=l||{},a.set(s,{bounds:s.bounds||e.create(s.vertices),positionPrev:s.positionPrev||o.clone(s.position),anglePrev:s.anglePrev||s.angle,vertices:s.vertices,parts:s.parts||[s],isStatic:s.isStatic,isSleeping:s.isSleeping,parent:s.parent||s}),v.rotate(s.vertices,s.angle,s.position),i.rotate(s.axes,s.angle),e.update(s.bounds,s.vertices,s.velocity),a.set(s,{axes:l.axes||s.axes,area:l.area||s.area,mass:l.mass||s.mass,inertia:l.inertia||s.inertia}),s.parts.length===1){var f=s.bounds,u=s.centerOfMass,d=s.centerOffset,p=f.max.x-f.min.x,g=f.max.y-f.min.y;u.x=-(f.min.x-s.position.x)/p,u.y=-(f.min.y-s.position.y)/g,d.x=p*u.x,d.y=g*u.y}};a.set=function(s,l,f){var u;typeof l=="string"&&(u=l,l={},l[u]=f);for(u in l)if(Object.prototype.hasOwnProperty.call(l,u))switch(f=l[u],u){case"isStatic":a.setStatic(s,f);break;case"isSleeping":r.set(s,f);break;case"mass":a.setMass(s,f);break;case"density":a.setDensity(s,f);break;case"inertia":a.setInertia(s,f);break;case"vertices":a.setVertices(s,f);break;case"position":a.setPosition(s,f);break;case"angle":a.setAngle(s,f);break;case"velocity":a.setVelocity(s,f);break;case"angularVelocity":a.setAngularVelocity(s,f);break;case"speed":a.setSpeed(s,f);break;case"angularSpeed":a.setAngularSpeed(s,f);break;case"parts":a.setParts(s,f);break;case"centre":a.setCentre(s,f);break;default:s[u]=f}},a.setStatic=function(s,l){for(var f=0;f0&&o.rotateAbout(p.position,u,s.position,p.position)}},a.setVelocity=function(s,l){var f=s.deltaTime/a._baseDelta;s.positionPrev.x=s.position.x-l.x*f,s.positionPrev.y=s.position.y-l.y*f,s.velocity.x=(s.position.x-s.positionPrev.x)/f,s.velocity.y=(s.position.y-s.positionPrev.y)/f,s.speed=o.magnitude(s.velocity)},a.getVelocity=function(s){var l=a._baseDelta/s.deltaTime;return{x:(s.position.x-s.positionPrev.x)*l,y:(s.position.y-s.positionPrev.y)*l}},a.getSpeed=function(s){return o.magnitude(a.getVelocity(s))},a.setSpeed=function(s,l){a.setVelocity(s,o.mult(o.normalise(a.getVelocity(s)),l))},a.setAngularVelocity=function(s,l){var f=s.deltaTime/a._baseDelta;s.anglePrev=s.angle-l*f,s.angularVelocity=(s.angle-s.anglePrev)/f,s.angularSpeed=Math.abs(s.angularVelocity)},a.getAngularVelocity=function(s){return(s.angle-s.anglePrev)*a._baseDelta/s.deltaTime},a.getAngularSpeed=function(s){return Math.abs(a.getAngularVelocity(s))},a.setAngularSpeed=function(s,l){a.setAngularVelocity(s,n.sign(a.getAngularVelocity(s))*l)},a.translate=function(s,l,f){a.setPosition(s,o.add(s.position,l),f)},a.rotate=function(s,l,f,u){if(!f)a.setAngle(s,s.angle+l,u);else{var d=Math.cos(l),p=Math.sin(l),g=s.position.x-f.x,x=s.position.y-f.y;a.setPosition(s,{x:f.x+(g*d-x*p),y:f.y+(g*p+x*d)},u),a.setAngle(s,s.angle+l,u)}},a.scale=function(s,l,f,u){var d=0,p=0;u=u||s.position;for(var g=s.inertia===1/0,x=0;x0&&(d+=y.area,p+=y.inertia),y.position.x=u.x+(y.position.x-u.x)*l,y.position.y=u.y+(y.position.y-u.y)*f,e.update(y.bounds,y.vertices,s.velocity)}s.parts.length>1&&(s.area=d,s.isStatic||(a.setMass(s,s.density*d),a.setInertia(s,p))),s.circleRadius&&(l===f?s.circleRadius*=l:s.circleRadius=null),g&&a.setInertia(s,1/0)},a.update=function(s,l){l=(typeof l<"u"?l:16.666666666666668)*s.timeScale;var f=l*l,u=a._timeCorrection?l/(s.deltaTime||l):1,d=1-s.frictionAir*(l/n._baseDelta),p=(s.position.x-s.positionPrev.x)*u,g=(s.position.y-s.positionPrev.y)*u;s.velocity.x=p*d+s.force.x/s.mass*f,s.velocity.y=g*d+s.force.y/s.mass*f,s.positionPrev.x=s.position.x,s.positionPrev.y=s.position.y,s.position.x+=s.velocity.x,s.position.y+=s.velocity.y,s.deltaTime=l,s.angularVelocity=(s.angle-s.anglePrev)*d*u+s.torque/s.inertia*f,s.anglePrev=s.angle,s.angle+=s.angularVelocity,s.speed=o.magnitude(s.velocity),s.angularSpeed=Math.abs(s.angularVelocity);for(var x=0;x0&&(y.position.x+=s.velocity.x,y.position.y+=s.velocity.y),s.angularVelocity!==0&&(v.rotate(y.vertices,s.angularVelocity,s.position),i.rotate(y.axes,s.angularVelocity),x>0&&o.rotateAbout(y.position,s.angularVelocity,s.position,y.position)),e.update(y.bounds,y.vertices,s.velocity)}},a.updateVelocities=function(s){var l=a._baseDelta/s.deltaTime,f=s.velocity;f.x=(s.position.x-s.positionPrev.x)*l,f.y=(s.position.y-s.positionPrev.y)*l,s.speed=Math.sqrt(f.x*f.x+f.y*f.y),s.angularVelocity=(s.angle-s.anglePrev)*l,s.angularSpeed=Math.abs(s.angularVelocity)},a.applyForce=function(s,l,f){var u={x:l.x-s.position.x,y:l.y-s.position.y};s.force.x+=f.x,s.force.y+=f.y,s.torque+=u.x*f.y-u.y*f.x},a._totalProperties=function(s){for(var l={mass:0,area:0,inertia:0,centre:{x:0,y:0}},f=s.parts.length===1?0:1;f{var a={};c.exports=a;var v=t(35810),o=t(53402),r=t(15647),n=t(22562);(function(){a.create=function(e){return o.extend({id:o.nextId(),type:"composite",parent:null,isModified:!1,bodies:[],constraints:[],composites:[],label:"Composite",plugin:{},cache:{allBodies:null,allConstraints:null,allComposites:null}},e)},a.setModified=function(e,i,h,s){if(v.trigger(e,"compositeModified",e),e.isModified=i,i&&e.cache&&(e.cache.allBodies=null,e.cache.allConstraints=null,e.cache.allComposites=null),h&&e.parent&&a.setModified(e.parent,i,h,s),s)for(var l=0;l{var a={};c.exports=a;var v=t(69351);(function(){a.create=v.create,a.add=v.add,a.remove=v.remove,a.clear=v.clear,a.addComposite=v.addComposite,a.addBody=v.addBody,a.addConstraint=v.addConstraint})()},52284:(c,m,t)=>{var a={};c.exports=a;var v=t(41598),o=t(4506);(function(){var r=[],n={overlap:0,axis:null},e={overlap:0,axis:null};a.create=function(i,h){return{pair:null,collided:!1,bodyA:i,bodyB:h,parentA:i.parent,parentB:h.parent,depth:0,normal:{x:0,y:0},tangent:{x:0,y:0},penetration:{x:0,y:0},supports:[]}},a.collides=function(i,h,s){if(a._overlapAxes(n,i.vertices,h.vertices,i.axes),n.overlap<=0||(a._overlapAxes(e,h.vertices,i.vertices,h.axes),e.overlap<=0))return null;var l=s&&s.table[o.id(i,h)],f;l?f=l.collision:(f=a.create(i,h),f.collided=!0,f.bodyA=i.idX?X=L:LY?Y=L:Lf?f=d:d{var m={};c.exports=m,function(){m.create=function(t){return{vertex:t,normalImpulse:0,tangentImpulse:0}}}()},81388:(c,m,t)=>{var a={};c.exports=a;var v=t(53402),o=t(52284);(function(){a.create=function(r){var n={bodies:[],pairs:null};return v.extend(n,r)},a.setBodies=function(r,n){r.bodies=n.slice(0)},a.clear=function(r){r.bodies=[]},a.collisions=function(r){var n=[],e=r.pairs,i=r.bodies,h=i.length,s=a.canCollide,l=o.collides,f,u;for(i.sort(a._compareBoundsX),f=0;fg)break;if(!(xI.max.y)&&!(C&&(R.isStatic||R.isSleeping))&&s(d.collisionFilter,R.collisionFilter)){var L=R.parts.length;if(M&&L===1){var B=l(d,R,e);B&&n.push(B)}else for(var N=P>1?1:0,G=L>1?1:0,V=N;VI.max.x||p.max.xI.max.y)){var B=l(K,J,e);B&&n.push(B)}}}}}return n},a.canCollide=function(r,n){return r.group===n.group&&r.group!==0?r.group>0:(r.mask&n.category)!==0&&(n.mask&r.category)!==0},a._compareBoundsX=function(r,n){return r.bounds.min.x-n.bounds.min.x}})()},4506:(c,m,t)=>{var a={};c.exports=a;var v=t(43424);(function(){a.create=function(o,r){var n=o.bodyA,e=o.bodyB,i={id:a.id(n,e),bodyA:n,bodyB:e,collision:o,contacts:[],activeContacts:[],separation:0,isActive:!0,confirmedActive:!0,isSensor:n.isSensor||e.isSensor,timeCreated:r,timeUpdated:r,inverseMass:0,friction:0,frictionStatic:0,restitution:0,slop:0};return a.update(i,o,r),i},a.update=function(o,r,n){var e=o.contacts,i=r.supports,h=o.activeContacts,s=r.parentA,l=r.parentB,f=s.vertices.length;o.isActive=!0,o.timeUpdated=n,o.collision=r,o.separation=r.depth,o.inverseMass=s.inverseMass+l.inverseMass,o.friction=s.frictionl.frictionStatic?s.frictionStatic:l.frictionStatic,o.restitution=s.restitution>l.restitution?s.restitution:l.restitution,o.slop=s.slop>l.slop?s.slop:l.slop,r.pair=o,h.length=0;for(var u=0;u{var a={};c.exports=a;var v=t(4506),o=t(53402);(function(){a.create=function(r){return o.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},r)},a.update=function(r,n,e){var i=r.list,h=i.length,s=r.table,l=n.length,f=r.collisionStart,u=r.collisionEnd,d=r.collisionActive,p,g,x,y;for(f.length=0,u.length=0,d.length=0,y=0;y{var a={};c.exports=a;var v=t(31725),o=t(52284),r=t(15647),n=t(66280),e=t(41598);(function(){a.collides=function(i,h){for(var s=[],l=h.length,f=i.bounds,u=o.collides,d=r.overlaps,p=0;p{var a={};c.exports=a;var v=t(41598),o=t(53402),r=t(15647);(function(){a._restingThresh=2,a._restingThreshTangent=Math.sqrt(6),a._positionDampen=.9,a._positionWarming=.8,a._frictionNormalMultiplier=5,a._frictionMaxStatic=Number.MAX_VALUE,a.preSolvePosition=function(n){var e,i,h,s=n.length;for(e=0;ect?(x=At>0?At:-At,g=P.friction*(At>0?1:-1)*s,g<-x?g=-x:g>x&&(g=x)):(g=At,x=d);var Ct=H*G-Z*N,pt=Q*G-k*N,wt=X/(Y+R.inverseInertia*Ct*Ct+I.inverseInertia*pt*pt),Bt=(1+P.restitution)*vt*wt;if(g*=wt,vt0&&(z.normalImpulse=0),Bt=z.normalImpulse-jt}if(At<-f||At>f)z.tangentImpulse=0;else{var zt=z.tangentImpulse;z.tangentImpulse+=g,z.tangentImpulse<-x&&(z.tangentImpulse=-x),z.tangentImpulse>x&&(z.tangentImpulse=x),g=z.tangentImpulse-zt}var Yt=N*Bt+V*g,bt=G*Bt+K*g;R.isStatic||R.isSleeping||(R.positionPrev.x+=Yt*R.inverseMass,R.positionPrev.y+=bt*R.inverseMass,R.anglePrev+=(H*bt-Z*Yt)*R.inverseInertia),I.isStatic||I.isSleeping||(I.positionPrev.x-=Yt*I.inverseMass,I.positionPrev.y-=bt*I.inverseMass,I.anglePrev-=(Q*bt-k*Yt)*I.inverseInertia)}}}}})()},48140:(c,m,t)=>{var a={};c.exports=a;var v=t(41598),o=t(31725),r=t(53614),n=t(15647),e=t(66615),i=t(53402);(function(){a._warming=.4,a._torqueDampen=1,a._minLength=1e-6,a.create=function(h){var s=h;s.bodyA&&!s.pointA&&(s.pointA={x:0,y:0}),s.bodyB&&!s.pointB&&(s.pointB={x:0,y:0});var l=s.bodyA?o.add(s.bodyA.position,s.pointA):s.pointA,f=s.bodyB?o.add(s.bodyB.position,s.pointB):s.pointB,u=o.magnitude(o.sub(l,f));s.length=typeof s.length<"u"?s.length:u,s.id=s.id||i.nextId(),s.label=s.label||"Constraint",s.type="constraint",s.stiffness=s.stiffness||(s.length>0?1:.7),s.damping=s.damping||0,s.angularStiffness=s.angularStiffness||0,s.angleA=s.bodyA?s.bodyA.angle:s.angleA,s.angleB=s.bodyB?s.bodyB.angle:s.angleB,s.plugin={};var d={visible:!0,type:"line",anchors:!0,lineColor:null,lineOpacity:null,lineThickness:null,pinSize:null,anchorColor:null,anchorSize:null};return s.length===0&&s.stiffness>.1?(d.type="pin",d.anchors=!1):s.stiffness<.9&&(d.type="spring"),s.render=i.extend(d,s.render),s},a.preSolveAll=function(h){for(var s=0;s=1||h.length===0,M=P?h.stiffness*s:h.stiffness*s*s,R=h.damping*s,I=o.mult(x,C*M),L=(l?l.inverseMass:0)+(f?f.inverseMass:0),B=(l?l.inverseInertia:0)+(f?f.inverseInertia:0),N=L+B,G,V,K,j,J;if(R>0){var X=o.create();K=o.div(x,y),J=o.sub(f&&o.sub(f.position,f.positionPrev)||X,l&&o.sub(l.position,l.positionPrev)||X),j=o.dot(K,J)}l&&!l.isStatic&&(V=l.inverseMass/L,l.constraintImpulse.x-=I.x*V,l.constraintImpulse.y-=I.y*V,l.position.x-=I.x*V,l.position.y-=I.y*V,R>0&&(l.positionPrev.x-=R*K.x*j*V,l.positionPrev.y-=R*K.y*j*V),G=o.cross(u,I)/N*a._torqueDampen*l.inverseInertia*(1-h.angularStiffness),l.constraintImpulse.angle-=G,l.angle-=G),f&&!f.isStatic&&(V=f.inverseMass/L,f.constraintImpulse.x+=I.x*V,f.constraintImpulse.y+=I.y*V,f.position.x+=I.x*V,f.position.y+=I.y*V,R>0&&(f.positionPrev.x+=R*K.x*j*V,f.positionPrev.y+=R*K.y*j*V),G=o.cross(d,I)/N*a._torqueDampen*f.inverseInertia*(1-h.angularStiffness),f.constraintImpulse.angle+=G,f.angle+=G)}}},a.postSolveAll=function(h){for(var s=0;s0&&(d.position.x+=f.x,d.position.y+=f.y),f.angle!==0&&(v.rotate(d.vertices,f.angle,l.position),e.rotate(d.axes,f.angle),u>0&&o.rotateAbout(d.position,f.angle,l.position,d.position)),n.update(d.bounds,d.vertices,l.velocity)}f.angle*=a._warming,f.x*=a._warming,f.y*=a._warming}}},a.pointAWorld=function(h){return{x:(h.bodyA?h.bodyA.position.x:0)+(h.pointA?h.pointA.x:0),y:(h.bodyA?h.bodyA.position.y:0)+(h.pointA?h.pointA.y:0)}},a.pointBWorld=function(h){return{x:(h.bodyB?h.bodyB.position.x:0)+(h.pointB?h.pointB.x:0),y:(h.bodyB?h.bodyB.position.y:0)+(h.pointB?h.pointB.y:0)}},a.currentLength=function(h){var s=(h.bodyA?h.bodyA.position.x:0)+(h.pointA?h.pointA.x:0),l=(h.bodyA?h.bodyA.position.y:0)+(h.pointA?h.pointA.y:0),f=(h.bodyB?h.bodyB.position.x:0)+(h.pointB?h.pointB.x:0),u=(h.bodyB?h.bodyB.position.y:0)+(h.pointB?h.pointB.y:0),d=s-f,p=l-u;return Math.sqrt(d*d+p*p)}})()},53402:(c,m,t)=>{var a={};c.exports=a,function(){a._baseDelta=16.666666666666668,a._nextId=0,a._seed=0,a._nowStartTime=+new Date,a._warnedOnce={},a._decomp=null,a.extend=function(o,r){var n,e;typeof r=="boolean"?(n=2,e=r):(n=1,e=!0);for(var i=n;i0;r--){var n=Math.floor(a.random()*(r+1)),e=o[r];o[r]=o[n],o[n]=e}return o},a.choose=function(o){return o[Math.floor(a.random()*o.length)]},a.isElement=function(o){return typeof HTMLElement<"u"?o instanceof HTMLElement:!!(o&&o.nodeType&&o.nodeName)},a.isArray=function(o){return Object.prototype.toString.call(o)==="[object Array]"},a.isFunction=function(o){return typeof o=="function"},a.isPlainObject=function(o){return typeof o=="object"&&o.constructor===Object},a.isString=function(o){return toString.call(o)==="[object String]"},a.clamp=function(o,r,n){return on?n:o},a.sign=function(o){return o<0?-1:1},a.now=function(){if(typeof window<"u"&&window.performance){if(window.performance.now)return window.performance.now();if(window.performance.webkitNow)return window.performance.webkitNow()}return Date.now?Date.now():new Date-a._nowStartTime},a.random=function(o,r){return o=typeof o<"u"?o:0,r=typeof r<"u"?r:1,o+v()*(r-o)};var v=function(){return a._seed=(a._seed*9301+49297)%233280,a._seed/233280};a.colorToNumber=function(o){return o=o.replace("#",""),o.length==3&&(o=o.charAt(0)+o.charAt(0)+o.charAt(1)+o.charAt(1)+o.charAt(2)+o.charAt(2)),parseInt(o,16)},a.logLevel=1,a.log=function(){console&&a.logLevel>0&&a.logLevel<=3&&console.log.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},a.info=function(){console&&a.logLevel>0&&a.logLevel<=2&&console.info.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},a.warn=function(){console&&a.logLevel>0&&a.logLevel<=3&&console.warn.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},a.warnOnce=function(){var o=Array.prototype.slice.call(arguments).join(" ");a._warnedOnce[o]||(a.warn(o),a._warnedOnce[o]=!0)},a.deprecated=function(o,r,n){o[r]=a.chain(function(){a.warnOnce("🔅 deprecated 🔅",n)},o[r])},a.nextId=function(){return a._nextId++},a.indexOf=function(o,r){if(o.indexOf)return o.indexOf(r);for(var n=0;n{var a={};c.exports=a;var v=t(53614),o=t(66272),r=t(81388),n=t(99561),e=t(35810),i=t(69351),h=t(48140),s=t(53402),l=t(22562);(function(){a.create=function(f){f=f||{};var u={positionIterations:6,velocityIterations:4,constraintIterations:2,enableSleeping:!1,events:[],plugin:{},gravity:{x:0,y:1,scale:.001},timing:{timestamp:0,timeScale:1,lastDelta:0,lastElapsed:0}},d=s.extend(u,f);return d.world=f.world||i.create({label:"World"}),d.pairs=f.pairs||n.create(),d.detector=f.detector||r.create(),d.grid={buckets:[]},d.world.gravity=d.gravity,d.broadphase=d.grid,d.metrics={},d},a.update=function(f,u){var d=s.now(),p=f.world,g=f.detector,x=f.pairs,y=f.timing,C=y.timestamp,P;u=typeof u<"u"?u:s._baseDelta,u*=y.timeScale,y.timestamp+=u,y.lastDelta=u;var M={timestamp:y.timestamp,delta:u};e.trigger(f,"beforeUpdate",M);var R=i.allBodies(p),I=i.allConstraints(p);for(p.isModified&&(r.setBodies(g,R),i.setModified(p,!1,!1,!0)),f.enableSleeping&&v.update(R,u),a._bodiesApplyGravity(R,f.gravity),u>0&&a._bodiesUpdate(R,u),e.trigger(f,"beforeSolve",M),h.preSolveAll(R),P=0;P0&&e.trigger(f,"collisionStart",{pairs:x.collisionStart,timestamp:y.timestamp,delta:u});var B=s.clamp(20/f.positionIterations,0,1);for(o.preSolvePosition(x.list),P=0;P0&&e.trigger(f,"collisionActive",{pairs:x.collisionActive,timestamp:y.timestamp,delta:u}),x.collisionEnd.length>0&&e.trigger(f,"collisionEnd",{pairs:x.collisionEnd,timestamp:y.timestamp,delta:u}),a._bodiesClearForces(R),e.trigger(f,"afterUpdate",M),f.timing.lastElapsed=s.now()-d,f},a.merge=function(f,u){if(s.extend(f,u),u.world){f.world=u.world,a.clear(f);for(var d=i.allBodies(f.world),p=0;p{var a={};c.exports=a;var v=t(53402);(function(){a.on=function(o,r,n){for(var e=r.split(" "),i,h=0;h0){n||(n={}),e=r.split(" ");for(var f=0;f{var a={};c.exports=a;var v=t(73832),o=t(53402);(function(){a.name="matter-js",a.version="0.19.0",a.uses=[],a.used=[],a.use=function(){v.use(a,Array.prototype.slice.call(arguments))},a.before=function(r,n){return r=r.replace(/^Matter./,""),o.chainPathBefore(a,r,n)},a.after=function(r,n){return r=r.replace(/^Matter./,""),o.chainPathAfter(a,r,n)}})()},73832:(c,m,t)=>{var a={};c.exports=a;var v=t(53402);(function(){a._registry={},a.register=function(o){if(a.isPlugin(o)||v.warn("Plugin.register:",a.toString(o),"does not implement all required fields."),o.name in a._registry){var r=a._registry[o.name],n=a.versionParse(o.version).number,e=a.versionParse(r.version).number;n>e?(v.warn("Plugin.register:",a.toString(r),"was upgraded to",a.toString(o)),a._registry[o.name]=o):n-1},a.isFor=function(o,r){var n=o.for&&a.dependencyParse(o.for);return!o.for||r.name===n.name&&a.versionSatisfies(r.version,n.range)},a.use=function(o,r){if(o.uses=(o.uses||[]).concat(r||[]),o.uses.length===0){v.warn("Plugin.use:",a.toString(o),"does not specify any dependencies to install.");return}for(var n=a.dependencies(o),e=v.topologicalSort(n),i=[],h=0;h0&&!s.silent&&v.info(i.join(" "))},a.dependencies=function(o,r){var n=a.dependencyParse(o),e=n.name;if(r=r||{},!(e in r)){o=a.resolve(o)||o,r[e]=v.map(o.uses||[],function(h){a.isPlugin(h)&&a.register(h);var s=a.dependencyParse(h),l=a.resolve(h);return l&&!a.versionSatisfies(l.version,s.range)?(v.warn("Plugin.dependencies:",a.toString(l),"does not satisfy",a.toString(s),"used by",a.toString(n)+"."),l._warned=!0,o._warned=!0):l||(v.warn("Plugin.dependencies:",a.toString(h),"used by",a.toString(n),"could not be resolved."),o._warned=!0),s.name});for(var i=0;i=|>)?\s*((\d+)\.(\d+)\.(\d+))(-[0-9A-Za-z-+]+)?$/;r.test(o)||v.warn("Plugin.versionParse:",o,"is not a valid version or range.");var n=r.exec(o),e=Number(n[4]),i=Number(n[5]),h=Number(n[6]);return{isRange:!!(n[1]||n[2]),version:n[3],range:o,operator:n[1]||n[2]||"",major:e,minor:i,patch:h,parts:[e,i,h],prerelease:n[7],number:e*1e8+i*1e4+h}},a.versionSatisfies=function(o,r){r=r||"*";var n=a.versionParse(r),e=a.versionParse(o);if(n.isRange){if(n.operator==="*"||o==="*")return!0;if(n.operator===">")return e.number>n.number;if(n.operator===">=")return e.number>=n.number;if(n.operator==="~")return e.major===n.major&&e.minor===n.minor&&e.patch>=n.patch;if(n.operator==="^")return n.major>0?e.major===n.major&&e.number>=n.number:n.minor>0?e.minor===n.minor&&e.patch>=n.patch:e.patch===n.patch}return o===r||o==="*"}})()},53614:(c,m,t)=>{var a={};c.exports=a;var v=t(22562),o=t(35810),r=t(53402);(function(){a._motionWakeThreshold=.18,a._motionSleepThreshold=.08,a._minBias=.9,a.update=function(n,e){for(var i=e/r._baseDelta,h=a._motionSleepThreshold,s=0;s0&&l.motion=l.sleepThreshold/i&&a.set(l,!0)):l.sleepCounter>0&&(l.sleepCounter-=1)}},a.afterCollisions=function(n){for(var e=a._motionSleepThreshold,i=0;ie&&a.set(u,!1)}}}},a.set=function(n,e){var i=n.isSleeping;e?(n.isSleeping=!0,n.sleepCounter=n.sleepThreshold,n.positionImpulse.x=0,n.positionImpulse.y=0,n.positionPrev.x=n.position.x,n.positionPrev.y=n.position.y,n.anglePrev=n.angle,n.speed=0,n.angularSpeed=0,n.motion=0,i||o.trigger(n,"sleepStart")):(n.isSleeping=!1,n.sleepCounter=0,i&&o.trigger(n,"sleepEnd"))}})()},66280:(c,m,t)=>{var a={};c.exports=a;var v=t(41598),o=t(53402),r=t(22562),n=t(15647),e=t(31725);(function(){a.rectangle=function(i,h,s,l,f){f=f||{};var u={label:"Rectangle Body",position:{x:i,y:h},vertices:v.fromPath("L 0 0 L "+s+" 0 L "+s+" "+l+" L 0 "+l)};if(f.chamfer){var d=f.chamfer;u.vertices=v.chamfer(u.vertices,d.radius,d.quality,d.qualityMin,d.qualityMax),delete f.chamfer}return r.create(o.extend({},u,f))},a.trapezoid=function(i,h,s,l,f,u){u=u||{},f*=.5;var d=(1-f*2)*s,p=s*f,g=p+d,x=g+p,y;f<.5?y="L 0 0 L "+p+" "+-l+" L "+g+" "+-l+" L "+x+" 0":y="L 0 0 L "+g+" "+-l+" L "+x+" 0";var C={label:"Trapezoid Body",position:{x:i,y:h},vertices:v.fromPath(y)};if(u.chamfer){var P=u.chamfer;C.vertices=v.chamfer(C.vertices,P.radius,P.quality,P.qualityMin,P.qualityMax),delete u.chamfer}return r.create(o.extend({},C,u))},a.circle=function(i,h,s,l,f){l=l||{};var u={label:"Circle Body",circleRadius:s};f=f||25;var d=Math.ceil(Math.max(10,Math.min(f,s)));return d%2===1&&(d+=1),a.polygon(i,h,d,s,o.extend({},u,l))},a.polygon=function(i,h,s,l,f){if(f=f||{},s<3)return a.circle(i,h,l,f);for(var u=2*Math.PI/s,d="",p=u*.5,g=0;g0&&v.area(J)1?(y=r.create(o.extend({parts:C.slice(0)},l)),r.setPosition(y,{x:i,y:h}),y):C[0]},a.flagCoincidentParts=function(i,h){h===void 0&&(h=5);for(var s=0;s{var a={};c.exports=a;var v=t(69351),o=t(48140),r=t(53402),n=t(22562),e=t(66280);(function(){a.stack=function(i,h,s,l,f,u,d){for(var p=v.create({label:"Stack"}),g=i,x=h,y,C=0,P=0;PM&&(M=L),n.translate(I,{x:B*.5,y:L*.5}),g=I.bounds.max.x+f,v.addBody(p,I),y=I,C+=1}else g+=f}x+=M+u,g=i}return p},a.chain=function(i,h,s,l,f,u){for(var d=i.bodies,p=1;p0)for(p=0;p0&&(y=u[p-1+(d-1)*h],v.addConstraint(i,o.create(r.extend({bodyA:y,bodyB:x},f)))),l&&pM)){y=M-y;var I=y,L=s-1-y;if(!(xL)){P===1&&n.translate(C,{x:(x+(s%2===1?1:-1))*R,y:0});var B=C?x*R:0;return d(i+B+x*f,g,x,y,C,P)}}})},a.newtonsCradle=function(i,h,s,l,f){for(var u=v.create({label:"Newtons Cradle"}),d=0;d{var a={};c.exports=a;var v=t(31725),o=t(53402);(function(){a.fromVertices=function(r){for(var n={},e=0;e{var m={};c.exports=m,function(){m.create=function(t){var a={min:{x:0,y:0},max:{x:0,y:0}};return t&&m.update(a,t),a},m.update=function(t,a,v){t.min.x=1/0,t.max.x=-1/0,t.min.y=1/0,t.max.y=-1/0;for(var o=0;ot.max.x&&(t.max.x=r.x),r.xt.max.y&&(t.max.y=r.y),r.y0?t.max.x+=v.x:t.min.x+=v.x,v.y>0?t.max.y+=v.y:t.min.y+=v.y)},m.contains=function(t,a){return a.x>=t.min.x&&a.x<=t.max.x&&a.y>=t.min.y&&a.y<=t.max.y},m.overlaps=function(t,a){return t.min.x<=a.max.x&&t.max.x>=a.min.x&&t.max.y>=a.min.y&&t.min.y<=a.max.y},m.translate=function(t,a){t.min.x+=a.x,t.max.x+=a.x,t.min.y+=a.y,t.max.y+=a.y},m.shift=function(t,a){var v=t.max.x-t.min.x,o=t.max.y-t.min.y;t.min.x=a.x,t.max.x=a.x+v,t.min.y=a.y,t.max.y=a.y+o}}()},74058:(c,m,t)=>{var a={};c.exports=a,t(15647);var v=t(53402);(function(){a.pathToVertices=function(o,r){typeof window<"u"&&!("SVGPathSeg"in window)&&v.warn("Svg.pathToVertices: SVGPathSeg not defined, a polyfill is required.");var n,e,i,h,s,l,f,u,d,p,g=[],x,y,C=0,P=0,M=0;r=r||15;var R=function(L,B,N){var G=N%2===1&&N>1;if(!d||L!=d.x||B!=d.y){d&&G?(x=d.x,y=d.y):(x=0,y=0);var V={x:x+L,y:y+B};(G||!d)&&(d=V),g.push(V),P=x+L,M=y+B}},I=function(L){var B=L.pathSegTypeAsLetter.toUpperCase();if(B!=="Z"){switch(B){case"M":case"L":case"T":case"C":case"S":case"Q":P=L.x,M=L.y;break;case"H":P=L.x;break;case"V":M=L.y;break}R(P,M,L.pathSegType)}};for(a._svgPathToAbsolute(o),i=o.getTotalLength(),l=[],n=0;n{var m={};c.exports=m,function(){m.create=function(t,a){return{x:t||0,y:a||0}},m.clone=function(t){return{x:t.x,y:t.y}},m.magnitude=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},m.magnitudeSquared=function(t){return t.x*t.x+t.y*t.y},m.rotate=function(t,a,v){var o=Math.cos(a),r=Math.sin(a);v||(v={});var n=t.x*o-t.y*r;return v.y=t.x*r+t.y*o,v.x=n,v},m.rotateAbout=function(t,a,v,o){var r=Math.cos(a),n=Math.sin(a);o||(o={});var e=v.x+((t.x-v.x)*r-(t.y-v.y)*n);return o.y=v.y+((t.x-v.x)*n+(t.y-v.y)*r),o.x=e,o},m.normalise=function(t){var a=m.magnitude(t);return a===0?{x:0,y:0}:{x:t.x/a,y:t.y/a}},m.dot=function(t,a){return t.x*a.x+t.y*a.y},m.cross=function(t,a){return t.x*a.y-t.y*a.x},m.cross3=function(t,a,v){return(a.x-t.x)*(v.y-t.y)-(a.y-t.y)*(v.x-t.x)},m.add=function(t,a,v){return v||(v={}),v.x=t.x+a.x,v.y=t.y+a.y,v},m.sub=function(t,a,v){return v||(v={}),v.x=t.x-a.x,v.y=t.y-a.y,v},m.mult=function(t,a){return{x:t.x*a,y:t.y*a}},m.div=function(t,a){return{x:t.x/a,y:t.y/a}},m.perp=function(t,a){return a=a===!0?-1:1,{x:a*-t.y,y:a*t.x}},m.neg=function(t){return{x:-t.x,y:-t.y}},m.angle=function(t,a){return Math.atan2(a.y-t.y,a.x-t.x)},m._temp=[m.create(),m.create(),m.create(),m.create(),m.create(),m.create()]}()},41598:(c,m,t)=>{var a={};c.exports=a;var v=t(31725),o=t(53402);(function(){a.create=function(r,n){for(var e=[],i=0;i0)return!1;s=l}return!0},a.scale=function(r,n,e,i){if(n===1&&e===1)return r;i=i||a.centre(r);for(var h,s,l=0;l=0?l-1:r.length-1],u=r[l],d=r[(l+1)%r.length],p=n[l0&&(n|=2),n===3)return!1;return n!==0?!0:null},a.hull=function(r){var n=[],e=[],i,h;for(r=r.slice(0),r.sort(function(s,l){var f=s.x-l.x;return f!==0?f:s.y-l.y}),h=0;h=2&&v.cross3(e[e.length-2],e[e.length-1],i)<=0;)e.pop();e.push(i)}for(h=r.length-1;h>=0;h-=1){for(i=r[h];n.length>=2&&v.cross3(n[n.length-2],n[n.length-1],i)<=0;)n.pop();n.push(i)}return n.pop(),e.pop(),n.concat(e)}})()},18210:(c,m,t)=>{var a=t(19933),v={name:"matter-attractors",version:"0.1.7",for:"matter-js@^0.19.0",silent:!0,install:function(o){o.after("Body.create",function(){v.Body.init(this)}),o.before("Engine.update",function(r){v.Engine.update(r)})},Body:{init:function(o){o.plugin.attractors=o.plugin.attractors||[]}},Engine:{update:function(o){for(var r=a.Composite.allBodies(o.world),n=0;n0)for(var h=0;h{/** - * @author @dxu https://github.com/dxu/matter-collision-events - * @author Richard Davey - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={name:"matter-collision-events",version:"0.1.6",for:"matter-js@^0.19.0",silent:!0,install:function(t){t.after("Engine.create",function(){t.Events.on(this,"collisionStart",function(a){a.pairs.map(function(v){var o=v.bodyA,r=v.bodyB;o.gameObject&&o.gameObject.emit("collide",o,r,v),r.gameObject&&r.gameObject.emit("collide",r,o,v),t.Events.trigger(o,"onCollide",{pair:v}),t.Events.trigger(r,"onCollide",{pair:v}),o.onCollideCallback&&o.onCollideCallback(v),r.onCollideCallback&&r.onCollideCallback(v),o.onCollideWith[r.id]&&o.onCollideWith[r.id](r,v),r.onCollideWith[o.id]&&r.onCollideWith[o.id](o,v)})}),t.Events.on(this,"collisionActive",function(a){a.pairs.map(function(v){var o=v.bodyA,r=v.bodyB;o.gameObject&&o.gameObject.emit("collideActive",o,r,v),r.gameObject&&r.gameObject.emit("collideActive",r,o,v),t.Events.trigger(o,"onCollideActive",{pair:v}),t.Events.trigger(r,"onCollideActive",{pair:v}),o.onCollideActiveCallback&&o.onCollideActiveCallback(v),r.onCollideActiveCallback&&r.onCollideActiveCallback(v)})}),t.Events.on(this,"collisionEnd",function(a){a.pairs.map(function(v){var o=v.bodyA,r=v.bodyB;o.gameObject&&o.gameObject.emit("collideEnd",o,r,v),r.gameObject&&r.gameObject.emit("collideEnd",r,o,v),t.Events.trigger(o,"onCollideEnd",{pair:v}),t.Events.trigger(r,"onCollideEnd",{pair:v}),o.onCollideEndCallback&&o.onCollideEndCallback(v),r.onCollideEndCallback&&r.onCollideEndCallback(v)})})})}};c.exports=m},74507:(c,m,t)=>{var a=t(19933),v={name:"matter-wrap",version:"0.1.4",for:"matter-js@^0.19.0",silent:!0,install:function(o){o.after("Engine.update",function(){v.Engine.update(this)})},Engine:{update:function(o){for(var r=o.world,n=a.Composite.allBodies(r),e=a.Composite.allComposites(r),i=0;ir.max.x?n=r.min.x-o.max.x:o.max.xr.max.y?e=r.min.y-o.max.y:o.max.y{/** - * @author Stefan Hedman (http://steffe.se) - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={decomp:I,quickDecomp:G,isSimple:B,removeCollinearPoints:V,removeDuplicatePoints:K,makeCCW:d};function m(X,Y,b){b=b||0;var z=[0,0],W,H,Z,Q,k,et,st;return W=X[1][1]-X[0][1],H=X[0][0]-X[1][0],Z=W*X[0][0]+H*X[0][1],Q=Y[1][1]-Y[0][1],k=Y[0][0]-Y[1][0],et=Q*Y[0][0]+k*Y[0][1],st=W*k-Q*H,j(st,0,b)||(z[0]=(k*Z-H*et)/st,z[1]=(W*et-Q*Z)/st),z}function t(X,Y,b,z){var W=Y[0]-X[0],H=Y[1]-X[1],Z=z[0]-b[0],Q=z[1]-b[1];if(Z*H-Q*W===0)return!1;var k=(W*(b[1]-X[1])+H*(X[0]-b[0]))/(Z*H-Q*W),et=(Z*(X[1]-b[1])+Q*(b[0]-X[0]))/(Q*W-Z*H);return k>=0&&k<=1&&et>=0&&et<=1}function a(X,Y,b){return(Y[0]-X[0])*(b[1]-X[1])-(b[0]-X[0])*(Y[1]-X[1])}function v(X,Y,b){return a(X,Y,b)>0}function o(X,Y,b){return a(X,Y,b)>=0}function r(X,Y,b){return a(X,Y,b)<0}function n(X,Y,b){return a(X,Y,b)<=0}var e=[],i=[];function h(X,Y,b,z){if(z){var W=e,H=i;W[0]=Y[0]-X[0],W[1]=Y[1]-X[1],H[0]=b[0]-Y[0],H[1]=b[1]-Y[1];var Z=W[0]*H[0]+W[1]*H[1],Q=Math.sqrt(W[0]*W[0]+W[1]*W[1]),k=Math.sqrt(H[0]*H[0]+H[1]*H[1]),et=Math.acos(Z/(Q*k));return etb[Y][0])&&(Y=z);return v(l(X,Y-1),l(X,Y),l(X,Y+1))?!1:(p(X),!0)}function p(X){for(var Y=[],b=X.length,z=0;z!==b;z++)Y.push(X.pop());for(var z=0;z!==b;z++)X[z]=Y[z]}function g(X,Y){return r(l(X,Y-1),l(X,Y),l(X,Y+1))}var x=[],y=[];function C(X,Y,b){var z,W,H=x,Z=y;if(o(l(X,Y+1),l(X,Y),l(X,b))&&n(l(X,Y-1),l(X,Y),l(X,b)))return!1;W=s(l(X,Y),l(X,b));for(var Q=0;Q!==X.length;++Q)if(!((Q+1)%X.length===Y||Q===Y)&&o(l(X,Y),l(X,b),l(X,Q+1))&&n(l(X,Y),l(X,b),l(X,Q))&&(H[0]=l(X,Y),H[1]=l(X,b),Z[0]=l(X,Q),Z[1]=l(X,Q+1),z=m(H,Z),s(l(X,Y),z)0?L(X,Y):[X]}function L(X,Y){if(Y.length===0)return[X];if(Y instanceof Array&&Y.length&&Y[0]instanceof Array&&Y[0].length===2&&Y[0][0]instanceof Array){for(var b=[X],z=0;zH)return console.warn("quickDecomp: max level ("+H+") reached."),Y;for(var pt=0;ptat&&(at+=X.length),ft=Number.MAX_VALUE,at3&&z>=0;--z)h(l(X,z-1),l(X,z),l(X,z+1),Y)&&(X.splice(z%X.length,1),b++);return b}function K(X,Y){for(var b=X.length-1;b>=1;--b)for(var z=X[b],W=b-1;W>=0;--W)if(J(z,X[W],Y)){X.splice(b,1);continue}}function j(X,Y,b){return b=b||0,Math.abs(X-Y)<=b}function J(X,Y,b){return j(X[0],Y[0],b)&&j(X[1],Y[1],b)}},52018:(c,m,t)=>{/** -* @author Richard Davey -* @copyright 2013-2024 Phaser Studio Inc. -* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} -*/var a=t(83419),v=new a({initialize:function(r){this.pluginManager=r,this.game=r.game},init:function(){},start:function(){},stop:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});c.exports=v},42363:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={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"]};c.exports=m},37277:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={},t={},a={};a.register=function(v,o,r,n){n===void 0&&(n=!1),m[v]={plugin:o,mapping:r,custom:n}},a.registerCustom=function(v,o,r,n){t[v]={plugin:o,mapping:r,data:n}},a.hasCore=function(v){return m.hasOwnProperty(v)},a.hasCustom=function(v){return t.hasOwnProperty(v)},a.getCore=function(v){return m[v]},a.getCustom=function(v){return t[v]},a.getCustomClass=function(v){return t.hasOwnProperty(v)?t[v].plugin:null},a.remove=function(v){m.hasOwnProperty(v)&&delete m[v]},a.removeCustom=function(v){t.hasOwnProperty(v)&&delete t[v]},a.destroyCorePlugins=function(){for(var v in m)m.hasOwnProperty(v)&&delete m[v]},a.destroyCustomPlugins=function(){for(var v in t)t.hasOwnProperty(v)&&delete t[v]},c.exports=a},77332:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(8443),o=t(50792),r=t(74099),n=t(44603),e=t(39429),i=t(95540),h=t(37277),s=t(72905),l=new a({Extends:o,initialize:function(u){o.call(this),this.game=u,this.plugins=[],this.scenePlugins=[],this._pendingGlobal=[],this._pendingScene=[],u.isBooted?this.boot():u.events.once(v.BOOT,this.boot,this)},boot:function(){var f,u,d,p,g,x,y,C=this.game.config,P=C.installGlobalPlugins;for(P=P.concat(this._pendingGlobal),f=0;f{/** -* @author Richard Davey -* @copyright 2013-2024 Phaser Studio Inc. -* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} -*/var a=t(52018),v=t(83419),o=t(44594),r=new v({Extends:a,initialize:function(e,i,h){a.call(this,i),this.scene=e,this.systems=e.sys,this.pluginKey=h,e.sys.events.once(o.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});c.exports=r},18922:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={BasePlugin:t(52018),DefaultPlugins:t(42363),PluginCache:t(37277),PluginManager:t(77332),ScenePlugin:t(45145)}},63595:()=>{HTMLVideoElement&&!("requestVideoFrameCallback"in HTMLVideoElement.prototype)&&"getVideoPlaybackQuality"in HTMLVideoElement.prototype&&(HTMLVideoElement.prototype._rvfcpolyfillmap={},HTMLVideoElement.prototype.requestVideoFrameCallback=function(c){const m=performance.now(),t=this.getVideoPlaybackQuality(),a=this.mozPresentedFrames||this.mozPaintedFrames||t.totalVideoFrames-t.droppedVideoFrames,v=(o,r)=>{const n=this.getVideoPlaybackQuality(),e=this.mozPresentedFrames||this.mozPaintedFrames||n.totalVideoFrames-n.droppedVideoFrames;if(e>a){const i=this.mozFrameDelay||n.totalFrameDelay-t.totalFrameDelay||0,h=r-o;c(r,{presentationTime:r+i*1e3,expectedDisplayTime:r+h,width:this.videoWidth,height:this.videoHeight,mediaTime:Math.max(0,this.currentTime||0)+h/1e3,presentedFrames:e,processingDuration:i}),delete this._rvfcpolyfillmap[m]}else this._rvfcpolyfillmap[m]=requestAnimationFrame(i=>v(r,i))};return this._rvfcpolyfillmap[m]=requestAnimationFrame(o=>v(m,o)),m},HTMLVideoElement.prototype.cancelVideoFrameCallback=function(c){cancelAnimationFrame(this._rvfcpolyfillmap[c]),delete this._rvfcpolyfillmap[c]})},10312:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={SKIP_CHECK:-1,NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16,ERASE:17,SOURCE_IN:18,SOURCE_OUT:19,SOURCE_ATOP:20,DESTINATION_OVER:21,DESTINATION_IN:22,DESTINATION_OUT:23,DESTINATION_ATOP:24,LIGHTER:25,COPY:26,XOR:27}},29795:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={DEFAULT:0,LINEAR:0,NEAREST:1};c.exports=m},68627:(c,m,t)=>{/** - * @author Richard Davey - * @author Felipe Alfonso <@bitnenfer> - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(19715),v=t(32880),o=t(83419),r=t(8054),n=t(50792),e=t(92503),i=t(56373),h=t(97480),s=t(69442),l=t(61340),f=new o({Extends:n,initialize:function(d){n.call(this);var p=d.config;this.config={clearBeforeRender:p.clearBeforeRender,backgroundColor:p.backgroundColor,antialias:p.antialias,roundPixels:p.roundPixels},this.game=d,this.type=r.CANVAS,this.drawCount=0,this.width=0,this.height=0,this.gameCanvas=d.canvas;var g={alpha:d.config.transparent,desynchronized:d.config.desynchronized,willReadFrequently:!1};this.gameContext=p.context?p.context:this.gameCanvas.getContext("2d",g),this.currentContext=this.gameContext,this.antialias=d.config.antialias,this.blendModes=i(),this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92},this._tempMatrix1=new l,this._tempMatrix2=new l,this._tempMatrix3=new l,this.isBooted=!1,this.init()},init:function(){this.game.textures.once(s.READY,this.boot,this)},boot:function(){var u=this.game,d=u.scale.baseSize;this.width=d.width,this.height=d.height,this.isBooted=!0,u.scale.on(h.RESIZE,this.onResize,this),this.resize(d.width,d.height)},onResize:function(u,d){(d.width!==this.width||d.height!==this.height)&&this.resize(d.width,d.height)},resize:function(u,d){this.width=u,this.height=d,this.emit(e.RESIZE,u,d)},resetTransform:function(){this.currentContext.setTransform(1,0,0,1,0,0)},setBlendMode:function(u){return this.currentContext.globalCompositeOperation=u,this},setContext:function(u){return this.currentContext=u||this.gameContext,this},setAlpha:function(u){return this.currentContext.globalAlpha=u,this},preRender:function(){var u=this.gameContext,d=this.config,p=this.width,g=this.height;u.globalAlpha=1,u.globalCompositeOperation="source-over",u.setTransform(1,0,0,1,0,0),d.clearBeforeRender&&(u.clearRect(0,0,p,g),d.transparent||(u.fillStyle=d.backgroundColor.rgba,u.fillRect(0,0,p,g))),u.save(),this.drawCount=0,this.emit(e.PRE_RENDER)},render:function(u,d,p){var g=d.length;this.emit(e.RENDER,u,p);var x=p.x,y=p.y,C=p.width,P=p.height,M=p.renderToTexture?p.context:u.sys.context;M.save(),this.game.scene.customViewports&&(M.beginPath(),M.rect(x,y,C,P),M.clip()),p.emit(a.PRE_RENDER,p),this.currentContext=M;var R=p.mask;R&&R.preRenderCanvas(this,null,p._maskCamera),p.transparent||(M.fillStyle=p.backgroundColor.rgba,M.fillRect(x,y,C,P)),M.globalAlpha=p.alpha,M.globalCompositeOperation="source-over",this.drawCount+=g,p.renderToTexture&&p.emit(a.PRE_RENDER,p),p.matrix.copyToContext(M);for(var I=0;I=0?j=-(j+L):j<0&&(j=Math.abs(j)-L)),u.flipY&&(J>=0?J=-(J+B):J<0&&(J=Math.abs(J)-B))}var Y=1,b=1;u.flipX&&(N||(j+=-d.realWidth+V*2),Y=-1),u.flipY&&(N||(J+=-d.realHeight+K*2),b=-1);var z=u.x,W=u.y;P.applyITRS(z,W,u.rotation,u.scaleX*Y,u.scaleY*b),C.copyFrom(p.matrix),g?(C.multiplyWithOffset(g,-p.scrollX*u.scrollFactorX,-p.scrollY*u.scrollFactorY),P.e=z,P.f=W):(P.e-=p.scrollX*u.scrollFactorX,P.f-=p.scrollY*u.scrollFactorY),C.multiply(P),p.roundPixels&&(C.e=Math.round(C.e),C.f=Math.round(C.f)),y.save(),C.setToContext(y),y.globalCompositeOperation=this.blendModes[u.blendMode],y.globalAlpha=x,y.imageSmoothingEnabled=!d.source.scaleMode,u.mask&&u.mask.preRenderCanvas(this,u,p),L>0&&B>0&&(p.roundPixels?y.drawImage(d.source.image,R,I,L,B,Math.round(j),Math.round(J),Math.round(L/G),Math.round(B/G)):y.drawImage(d.source.image,R,I,L,B,j,J,L/G,B/G)),u.mask&&u.mask.postRenderCanvas(this,u,p),y.restore()}},destroy:function(){this.removeAllListeners(),this.game=null,this.gameCanvas=null,this.gameContext=null}});c.exports=f},55830:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={CanvasRenderer:t(68627),GetBlendModes:t(56373),SetTransform:t(20926)}},56373:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(10312),v=t(89289),o=function(){var r=[],n=v.supportNewBlendModes,e="source-over";return r[a.NORMAL]=e,r[a.ADD]="lighter",r[a.MULTIPLY]=n?"multiply":e,r[a.SCREEN]=n?"screen":e,r[a.OVERLAY]=n?"overlay":e,r[a.DARKEN]=n?"darken":e,r[a.LIGHTEN]=n?"lighten":e,r[a.COLOR_DODGE]=n?"color-dodge":e,r[a.COLOR_BURN]=n?"color-burn":e,r[a.HARD_LIGHT]=n?"hard-light":e,r[a.SOFT_LIGHT]=n?"soft-light":e,r[a.DIFFERENCE]=n?"difference":e,r[a.EXCLUSION]=n?"exclusion":e,r[a.HUE]=n?"hue":e,r[a.SATURATION]=n?"saturation":e,r[a.COLOR]=n?"color":e,r[a.LUMINOSITY]=n?"luminosity":e,r[a.ERASE]="destination-out",r[a.SOURCE_IN]="source-in",r[a.SOURCE_OUT]="source-out",r[a.SOURCE_ATOP]="source-atop",r[a.DESTINATION_OVER]="destination-over",r[a.DESTINATION_IN]="destination-in",r[a.DESTINATION_OUT]="destination-out",r[a.DESTINATION_ATOP]="destination-atop",r[a.LIGHTER]="lighter",r[a.COPY]="copy",r[a.XOR]="xor",r};c.exports=o},20926:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(91296),v=function(o,r,n,e,i){var h=e.alpha*n.alpha;if(h<=0)return!1;var s=a(n,e,i).calc;return r.globalCompositeOperation=o.blendModes[n.blendMode],r.globalAlpha=h,r.save(),s.setToContext(r),r.imageSmoothingEnabled=n.frame?!n.frame.source.scaleMode:o.antialias,!0};c.exports=v},63899:c=>{/** - * @author Benjamin D. Richards - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="losewebgl"},6119:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="postrender"},48070:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="prerender"},15640:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="render"},8912:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="resize"},87124:c=>{/** - * @author Benjamin D. Richards - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="restorewebgl"},92503:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={LOSE_WEBGL:t(63899),POST_RENDER:t(6119),PRE_RENDER:t(48070),RENDER:t(15640),RESIZE:t(8912),RESTORE_WEBGL:t(87124)}},36909:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={Events:t(92503),Snapshot:t(89966)},c.exports.Canvas=t(55830),c.exports.WebGL=t(4159)},32880:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(27919),v=t(40987),o=t(95540),r=function(n,e){var i=o(e,"callback"),h=o(e,"type","image/png"),s=o(e,"encoder",.92),l=Math.abs(Math.round(o(e,"x",0))),f=Math.abs(Math.round(o(e,"y",0))),u=Math.floor(o(e,"width",n.width)),d=Math.floor(o(e,"height",n.height)),p=o(e,"getPixel",!1);if(p){var g=n.getContext("2d",{willReadFrequently:!1}),x=g.getImageData(l,f,1,1),y=x.data;i.call(null,new v(y[0],y[1],y[2],y[3]))}else if(l!==0||f!==0||u!==n.width||d!==n.height){var C=a.createWebGL(this,u,d),P=C.getContext("2d",{willReadFrequently:!0});u>0&&d>0&&P.drawImage(n,l,f,u,d,0,0,u,d);var M=new Image;M.onerror=function(){i.call(null),a.remove(C)},M.onload=function(){i.call(null,M),a.remove(C)},M.src=C.toDataURL(h,s)}else{var R=new Image;R.onerror=function(){i.call(null)},R.onload=function(){i.call(null,R)},R.src=n.toDataURL(h,s)}};c.exports=r},88815:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(27919),v=t(40987),o=t(95540),r=function(n,e){var i=n,h=o(e,"callback"),s=o(e,"type","image/png"),l=o(e,"encoder",.92),f=Math.abs(Math.round(o(e,"x",0))),u=Math.abs(Math.round(o(e,"y",0))),d=o(e,"getPixel",!1),p=o(e,"isFramebuffer",!1),g=p?o(e,"bufferWidth",1):i.drawingBufferWidth,x=p?o(e,"bufferHeight",1):i.drawingBufferHeight;if(d){var y=new Uint8Array(4),C=p?u:x-u;i.readPixels(f,C,1,1,i.RGBA,i.UNSIGNED_BYTE,y),h.call(null,new v(y[0],y[1],y[2],y[3]))}else{var P=Math.floor(o(e,"width",g)),M=Math.floor(o(e,"height",x)),R=P*M*4,I=new Uint8Array(R);i.readPixels(f,x-u-M,P,M,i.RGBA,i.UNSIGNED_BYTE,I);for(var L=a.createWebGL(this,P,M),B=L.getContext("2d",{willReadFrequently:!0}),N=B.getImageData(0,0,P,M),G=N.data,V=0;V{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={Canvas:t(32880),WebGL:t(88815)}},7530:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(36060),o=t(90330),r=t(82264),n=t(95540),e=t(32302),i=t(63448),h=t(31302),s=t(58918),l=t(14811),f=t(92651),u=t(96569),d=t(56527),p=t(57516),g=t(43439),x=t(81041),y=t(12385),C=t(7589),P=t(95428),M=t(72905),R=new a({initialize:function(L){this.game=L.game,this.renderer=L,this.classes=new o([[v.UTILITY_PIPELINE,C],[v.MULTI_PIPELINE,p],[v.BITMAPMASK_PIPELINE,h],[v.SINGLE_PIPELINE,y],[v.ROPE_PIPELINE,x],[v.LIGHT_PIPELINE,u],[v.POINTLIGHT_PIPELINE,g],[v.MOBILE_PIPELINE,d]]),this.postPipelineClasses=new o,this.pipelines=new o,this.postPipelineInstances=[],this.default=null,this.current=null,this.previous=null,this.MULTI_PIPELINE=null,this.BITMAPMASK_PIPELINE=null,this.UTILITY_PIPELINE=null,this.MOBILE_PIPELINE=null,this.FX_PIPELINE=null,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2,this.renderTargets=[],this.maxDimension=0,this.frameInc=32,this.targetIndex=0},boot:function(I,L,B){var N=this.renderer,G=this.renderTargets;this.frameInc=Math.floor(n(I,"frameInc",32));var V=N.width,K=N.height,j=this.game.config.disablePreFX,J=this.game.config.disablePostFX;if(J||this.postPipelineClasses.setAll([[String(l.BARREL),s.Barrel],[String(l.BLOOM),s.Bloom],[String(l.BLUR),s.Blur],[String(l.BOKEH),s.Bokeh],[String(l.CIRCLE),s.Circle],[String(l.COLOR_MATRIX),s.ColorMatrix],[String(l.DISPLACEMENT),s.Displacement],[String(l.GLOW),s.Glow],[String(l.GRADIENT),s.Gradient],[String(l.PIXELATE),s.Pixelate],[String(l.SHADOW),s.Shadow],[String(l.SHINE),s.Shine],[String(l.VIGNETTE),s.Vignette],[String(l.WIPE),s.Wipe]]),!j){this.classes.set(v.FX_PIPELINE,f);for(var X=Math.min(V,K),Y=Math.ceil(X/this.frameInc),b=1;b=0;B--){var N=L[B];N.active&&N.preBatch(I)}}},postBatch:function(I){if(I.hasPostPipeline){this.flush();for(var L=I.postPipelines,B=0;B=0;B--){var N=L[B];N.active&&N.preBatch(I)}}},postBatchCamera:function(I){if(I.hasPostPipeline){this.flush();for(var L=I.postPipelines,B=0;Bthis.maxDimension)return this.targetIndex=L.length-B,L[this.targetIndex];var N=(i(I,this.frameInc,0,!0)-1)*B;return this.targetIndex=N,L[N]},getSwapRenderTarget:function(){return this.renderTargets[this.targetIndex+1]},getAltSwapRenderTarget:function(){return this.renderTargets[this.targetIndex+2]},destroy:function(){this.flush(),this.classes.clear(),this.postPipelineClasses.clear(),this.pipelines.clear(),this.renderer=null,this.game=null,this.classes=null,this.postPipelineClasses=null,this.pipelines=null,this.default=null,this.current=null,this.previous=null}});c.exports=R},32302:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(92503),o=new a({initialize:function(n,e,i,h,s,l,f,u,d){h===void 0&&(h=1),s===void 0&&(s=0),l===void 0&&(l=!0),f===void 0&&(f=!1),u===void 0&&(u=!0),d===void 0&&(d=!0),this.renderer=n,this.framebuffer=null,this.texture=null,this.width=0,this.height=0,this.scale=h,this.minFilter=s,this.autoClear=l,this.autoResize=!0,this.hasDepthBuffer=u,this.forceClamp=d,this.resize(e,i),f?this.setAutoResize(!0):this.autoResize=!1},setAutoResize:function(r){return r&&!this.autoResize?(this.renderer.on(v.RESIZE,this.resize,this),this.autoResize=!0):!r&&this.autoResize&&(this.renderer.off(v.RESIZE,this.resize,this),this.autoResize=!1),this},resize:function(r,n){if(r=Math.round(r*this.scale),n=Math.round(n*this.scale),r<=0&&(r=1),n<=0&&(n=1),this.autoResize&&(r!==this.width||n!==this.height)){var e=this.renderer;e.deleteFramebuffer(this.framebuffer),e.deleteTexture(this.texture),this.texture=e.createTextureFromSource(null,r,n,this.minFilter,this.forceClamp),this.framebuffer=e.createFramebuffer(r,n,this.texture,this.hasDepthBuffer),this.width=r,this.height=n}return this},willResize:function(r,n){return r=Math.round(r*this.scale),n=Math.round(n*this.scale),r<=0&&(r=1),n<=0&&(n=1),r!==this.width||n!==this.height},bind:function(r,n,e){r===void 0&&(r=!1);var i=this.renderer;if(r&&i.flush(),n&&e&&this.resize(n,e),i.pushFramebuffer(this.framebuffer,!1,!1),r&&this.adjustViewport(),this.autoClear){var h=this.renderer.gl;h.clearColor(0,0,0,0),h.clear(h.COLOR_BUFFER_BIT)}i.clearStencilMask()},adjustViewport:function(){var r=this.renderer.gl;r.viewport(0,0,this.width,this.height),r.disable(r.SCISSOR_TEST)},clear:function(){var r=this.renderer,n=r.gl;r.pushFramebuffer(this.framebuffer),n.disable(n.SCISSOR_TEST),n.clearColor(0,0,0,0),n.clear(n.COLOR_BUFFER_BIT),r.popFramebuffer(),r.resetScissor()},unbind:function(r){r===void 0&&(r=!1);var n=this.renderer;return r&&n.flush(),n.popFramebuffer()},destroy:function(){var r=this.renderer;r.off(v.RESIZE,this.resize,this),r.deleteFramebuffer(this.framebuffer),r.deleteTexture(this.texture),this.renderer=null,this.framebuffer=null,this.texture=null}});c.exports=o},70554:c=>{/** - * @author Richard Davey - * @author Felipe Alfonso <@bitnenfer> - * @author Matthew Groves <@doormat> - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={getTintFromFloats:function(m,t,a,v){var o=(m*255|0)&255,r=(t*255|0)&255,n=(a*255|0)&255,e=(v*255|0)&255;return(e<<24|o<<16|r<<8|n)>>>0},getTintAppendFloatAlpha:function(m,t){var a=(t*255|0)&255;return(a<<24|m)>>>0},getTintAppendFloatAlphaAndSwap:function(m,t){var a=(m>>16|0)&255,v=(m>>8|0)&255,o=(m|0)&255,r=(t*255|0)&255;return(r<<24|o<<16|v<<8|a)>>>0},getFloatsFromUintRGB:function(m){var t=(m>>16|0)&255,a=(m>>8|0)&255,v=(m|0)&255;return[t/255,a/255,v/255]},checkShaderMax:function(m,t){var a=Math.min(16,m.getParameter(m.MAX_TEXTURE_IMAGE_UNITS));return!t||t===-1?a:Math.min(a,t)},parseFragmentShaderMaxTextures:function(m,t){if(!m)return"";for(var a="",v=0;v0&&(a+=` - else `),v{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(62644),o=t(50792),r=t(77085),n=t(95540),e=t(37867),i=t(92503),h=t(32302),s=t(70554),l=t(38683),f=new a({Extends:o,initialize:function(d){o.call(this);var p=d.game,g=p.renderer,x=g.gl;this.name=n(d,"name","WebGLPipeline"),this.game=p,this.renderer=g,this.manager,this.gl=x,this.view=p.canvas,this.width=0,this.height=0,this.vertexCount=0,this.vertexCapacity=0,this.vertexData,this.vertexBuffer,this.activeBuffer,this.topology=n(d,"topology",x.TRIANGLES),this.bytes,this.vertexViewF32,this.vertexViewU32,this.active=!0,this.forceZero=n(d,"forceZero",!1),this.hasBooted=!1,this.isPostFX=!1,this.isPreFX=!1,this.renderTargets=[],this.currentRenderTarget,this.shaders=[],this.currentShader,this.projectionMatrix,this.projectionWidth=0,this.projectionHeight=0,this.config=d,this.glReset=!1,this.batch=[],this.currentBatch=null,this.currentTexture=null,this.currentUnit=0,this.activeTextures=[],this.resizeUniform=n(d,"resizeUniform","")},boot:function(){var u,d=this.gl,p=this.config,g=this.renderer;this.isPostFX||(this.projectionMatrix=new e().identity());var x=this.renderTargets,y=n(p,"renderTarget",!1);typeof y=="boolean"&&y&&(y=1);var C=g.width,P=g.height;if(typeof y=="number")for(u=0;uV&&(V=G[u].vertexSize);var K=n(p,"batchSize",g.config.batchSize);this.vertexCapacity=K*6;var j=new ArrayBuffer(this.vertexCapacity*V);this.vertexData=j,this.bytes=new Uint8Array(j),this.vertexViewF32=new Float32Array(j),this.vertexViewU32=new Uint32Array(j);var J=n(p,"vertices",null);for(J?(this.vertexViewF32.set(J),this.vertexBuffer=g.createVertexBuffer(j,d.STATIC_DRAW)):this.vertexBuffer=g.createVertexBuffer(j.byteLength,d.DYNAMIC_DRAW),this.setVertexBuffer(),u=G.length-1;u>=0;u--)G[u].rebind();this.hasBooted=!0,g.on(i.RESIZE,this.resize,this),g.on(i.PRE_RENDER,this.onPreRender,this),g.on(i.RENDER,this.onRender,this),g.on(i.POST_RENDER,this.onPostRender,this),this.emit(r.BOOT,this),this.onBoot()},onBoot:function(){},onResize:function(){},setShader:function(u,d,p){var g=this.renderer;if(u!==this.currentShader||g.currentProgram!==this.currentShader.program){this.flush();var x=this.setVertexBuffer(p);x&&!d&&(d=!0),u.bind(d,!1),this.currentShader=u}return this},getShaderByName:function(u){for(var d=this.shaders,p=0;p-1&&(G=X.substring(20))}V&&K&&B.push(new l(this,G,V,K,v(j)))}this.shaders=B}return this.shaders.length===0?console.warn("Pipeline: "+this.name+" - Invalid shader config"):this.currentShader=this.shaders[0],this},createBatch:function(u){return this.currentBatch={start:this.vertexCount,count:0,texture:[u],unit:0,maxUnit:0},this.currentUnit=0,this.currentTexture=u,this.batch.push(this.currentBatch),0},addTextureToBatch:function(u){var d=this.currentBatch;d&&(d.texture.push(u),d.unit++,d.maxUnit++)},pushBatch:function(u){if(!this.currentBatch||this.forceZero&&u!==this.currentTexture)return this.createBatch(u);if(u===this.currentTexture)return this.currentUnit;var d=this.currentBatch,p=d.texture.indexOf(u);return p===-1?d.texture.length===this.renderer.maxTextures?this.createBatch(u):(d.unit++,d.maxUnit++,d.texture.push(u),this.currentUnit=d.unit,this.currentTexture=u,d.unit):(this.currentUnit=p,this.currentTexture=u,p)},setGameObject:function(u,d){return d===void 0&&(d=u.frame),this.pushBatch(d.source.glTexture)},shouldFlush:function(u){return u===void 0&&(u=0),this.vertexCount+u>this.vertexCapacity},vertexAvailable:function(){return this.vertexCapacity-this.vertexCount},resize:function(u,d){(u!==this.width||d!==this.height)&&this.flush(),this.width=u,this.height=d;for(var p=this.renderTargets,g=0;g=0;p--){var g=d[p].rebind();(!u||g===u)&&(this.currentShader=g)}return this.activeTextures.length=0,this.emit(r.REBIND,this.currentShader),this.onActive(this.currentShader),this.onRebind(),this.glReset=!1,this},restoreContext:function(){var u=this.shaders,d=!!this.vertexBuffer;this.activeBuffer=null,this.activeTextures.length=0,this.batch.length=0,this.currentBatch=null,this.currentTexture=null,this.currentUnit=0,d&&this.setVertexBuffer();for(var p=0;p0){this.emit(r.BEFORE_FLUSH,this,u),this.onBeforeFlush(u);var d=this.gl,p=this.vertexCount,g=this.currentShader.vertexSize,x=this.topology;if(this.active){this.setVertexBuffer(),p===this.vertexCapacity?d.bufferData(d.ARRAY_BUFFER,this.vertexData,d.DYNAMIC_DRAW):d.bufferSubData(d.ARRAY_BUFFER,0,this.bytes.subarray(0,p*g));var y,C,P,M=this.batch,R=this.activeTextures;if(this.forceZero)for(R[0]||d.activeTexture(d.TEXTURE0),y=0;y{/** - * @author Richard Davey - * @author Felipe Alfonso <@bitnenfer> - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(95428),v=t(72905),o=t(19715),r=t(83419),n=t(8054),e=t(50792),i=t(92503),h=t(50030),s=t(37867),l=t(29747),f=t(7530),u=t(32302),d=t(97480),p=t(69442),g=t(70554),x=t(88815),y=t(26128),C=t(1482),P=t(82751),M=t(84387),R=t(93567),I=t(57183),L=new r({Extends:e,initialize:function(N){e.call(this);var G=N.config,V={alpha:G.transparent,desynchronized:G.desynchronized,depth:!0,antialias:G.antialiasGL,premultipliedAlpha:G.premultipliedAlpha,stencil:!0,failIfMajorPerformanceCaveat:G.failIfMajorPerformanceCaveat,powerPreference:G.powerPreference,preserveDrawingBuffer:G.preserveDrawingBuffer,willReadFrequently:!1};this.config={clearBeforeRender:G.clearBeforeRender,antialias:G.antialias,backgroundColor:G.backgroundColor,contextCreation:V,roundPixels:G.roundPixels,maxTextures:G.maxTextures,maxTextureSize:G.maxTextureSize,batchSize:G.batchSize,maxLights:G.maxLights,mipmapFilter:G.mipmapFilter},this.game=N,this.type=n.WEBGL,this.pipelines=null,this.width=0,this.height=0,this.canvas=N.canvas,this.blendModes=[],this.contextLost=!1,this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92,isFramebuffer:!1,bufferWidth:0,bufferHeight:0},this.maxTextures=0,this.textureIndexes,this.glBufferWrappers=[],this.glProgramWrappers=[],this.glTextureWrappers=[],this.glFramebufferWrappers=[],this.glAttribLocationWrappers=[],this.glUniformLocationWrappers=[],this.currentFramebuffer=null,this.fboStack=[],this.currentProgram=null,this.currentBlendMode=1/0,this.currentScissorEnabled=!1,this.currentScissor=null,this.scissorStack=[],this.contextLostHandler=l,this.contextRestoredHandler=l,this.gl=null,this.supportedExtensions=null,this.instancedArraysExtension=null,this.vaoExtension=null,this.extensions={},this.glFormats,this.compression,this.drawingBufferHeight=0,this.blankTexture=null,this.normalTexture=null,this.whiteTexture=null,this.maskCount=0,this.maskStack=[],this.currentMask={mask:null,camera:null},this.currentCameraMask={mask:null,camera:null},this.glFuncMap=null,this.currentType="",this.newType=!1,this.nextTypeMatch=!1,this.finalType=!1,this.mipmapFilter=null,this.defaultScissor=[0,0,0,0],this.isBooted=!1,this.renderTarget=null,this.projectionMatrix,this.projectionWidth=0,this.projectionHeight=0,this.maskSource=null,this.maskTarget=null,this.spector=null,this._debugCapture=!1,this.init(this.config)},init:function(B){var N,G=this.game,V=this.canvas,K=B.backgroundColor;if(G.config.context?N=G.config.context:N=V.getContext("webgl",B.contextCreation)||V.getContext("experimental-webgl",B.contextCreation),!N||N.isContextLost())throw this.contextLost=!0,new Error("WebGL unsupported");this.gl=N;var j=this,J=function(){var b=N.getSupportedExtensions();j.supportedExtensions=b;var z="ANGLE_instanced_arrays";j.instancedArraysExtension=b.indexOf(z)>-1?N.getExtension(z):null;var W="OES_vertex_array_object";j.vaoExtension=b.indexOf(W)>-1?N.getExtension(W):null};J(),this.contextLostHandler=function(b){j.contextLost=!0,console&&console.warn("WebGL Context lost. Renderer disabled"),j.emit(i.LOSE_WEBGL,j),b.preventDefault()},V.addEventListener("webglcontextlost",this.contextLostHandler,!1),this.contextRestoredHandler=function(b){if(N.isContextLost()){console&&console.log("WebGL Context restored, but context is still lost");return}j.currentProgram=null,j.currentFramebuffer=null,j.setBlendMode(n.BlendModes.NORMAL),N.disable(N.BLEND),N.disable(N.DEPTH_TEST),N.enable(N.CULL_FACE),j.compression=j.getCompressedTextures();var z=function(W){W.createResource()};a(j.glTextureWrappers,z),a(j.glBufferWrappers,z),a(j.glFramebufferWrappers,z),a(j.glProgramWrappers,z),a(j.glAttribLocationWrappers,z),a(j.glUniformLocationWrappers,z),j.createTemporaryTextures(),j.pipelines.restoreContext(),j.resize(j.game.scale.baseSize.width,j.game.scale.baseSize.height),J(),j.contextLost=!1,console&&console.warn("WebGL Context restored. Renderer running again."),j.emit(i.RESTORE_WEBGL,j),b.preventDefault()},V.addEventListener("webglcontextrestored",this.contextRestoredHandler,!1),G.context=N;for(var X=0;X<=27;X++)this.blendModes.push({func:[N.ONE,N.ONE_MINUS_SRC_ALPHA],equation:N.FUNC_ADD});this.blendModes[1].func=[N.ONE,N.DST_ALPHA],this.blendModes[2].func=[N.DST_COLOR,N.ONE_MINUS_SRC_ALPHA],this.blendModes[3].func=[N.ONE,N.ONE_MINUS_SRC_COLOR],this.blendModes[17]={func:[N.ZERO,N.ONE_MINUS_SRC_ALPHA],equation:N.FUNC_REVERSE_SUBTRACT},this.glFormats=[N.BYTE,N.SHORT,N.UNSIGNED_BYTE,N.UNSIGNED_SHORT,N.FLOAT],this.glFuncMap={mat2:{func:N.uniformMatrix2fv,length:1,matrix:!0},mat3:{func:N.uniformMatrix3fv,length:1,matrix:!0},mat4:{func:N.uniformMatrix4fv,length:1,matrix:!0},"1f":{func:N.uniform1f,length:1},"1fv":{func:N.uniform1fv,length:1},"1i":{func:N.uniform1i,length:1},"1iv":{func:N.uniform1iv,length:1},"2f":{func:N.uniform2f,length:2},"2fv":{func:N.uniform2fv,length:1},"2i":{func:N.uniform2i,length:2},"2iv":{func:N.uniform2iv,length:1},"3f":{func:N.uniform3f,length:3},"3fv":{func:N.uniform3fv,length:1},"3i":{func:N.uniform3i,length:3},"3iv":{func:N.uniform3iv,length:1},"4f":{func:N.uniform4f,length:4},"4fv":{func:N.uniform4fv,length:1},"4i":{func:N.uniform4i,length:4},"4iv":{func:N.uniform4iv,length:1}},(!B.maxTextures||B.maxTextures===-1)&&(B.maxTextures=N.getParameter(N.MAX_TEXTURE_IMAGE_UNITS)),B.maxTextureSize||(B.maxTextureSize=N.getParameter(N.MAX_TEXTURE_SIZE)),this.compression=this.getCompressedTextures(),N.disable(N.DEPTH_TEST),N.disable(N.CULL_FACE),N.enable(N.BLEND),N.clearColor(K.redGL,K.greenGL,K.blueGL,K.alphaGL);var Y=["NEAREST","LINEAR","NEAREST_MIPMAP_NEAREST","LINEAR_MIPMAP_NEAREST","NEAREST_MIPMAP_LINEAR","LINEAR_MIPMAP_LINEAR"];return Y.indexOf(B.mipmapFilter)!==-1&&(this.mipmapFilter=N[B.mipmapFilter]),this.maxTextures=g.checkShaderMax(N,B.maxTextures),this.textureIndexes=[],this.createTemporaryTextures(),this.pipelines=new f(this),this.setBlendMode(n.BlendModes.NORMAL),this.projectionMatrix=new s().identity(),G.textures.once(p.READY,this.boot,this),this},boot:function(){var B=this.game,N=this.pipelines,G=B.scale.baseSize,V=G.width,K=G.height;this.width=V,this.height=K,this.isBooted=!0,this.renderTarget=new u(this,V,K,1,0,!0,!0),this.maskTarget=new u(this,V,K,1,0,!0,!0),this.maskSource=new u(this,V,K,1,0,!0,!0);var j=B.config;N.boot(j.pipeline,j.defaultPipeline,j.autoMobilePipeline),this.blankTexture=B.textures.getFrame("__DEFAULT").glTexture,this.normalTexture=B.textures.getFrame("__NORMAL").glTexture,this.whiteTexture=B.textures.getFrame("__WHITE").glTexture;var J=this.gl;J.bindFramebuffer(J.FRAMEBUFFER,null),J.enable(J.SCISSOR_TEST),B.scale.on(d.RESIZE,this.onResize,this),this.resize(V,K)},createTemporaryTextures:function(){for(var B=this.gl,N=0;N0&&V>0;if(J&&X){var Y=J[0],b=J[1],z=J[2],W=J[3];X=Y!==B||b!==N||z!==G||W!==V}X&&(this.flush(),j.scissor(B,K-N-V,G,V))},resetScissor:function(){var B=this.gl;B.enable(B.SCISSOR_TEST);var N=this.currentScissor;if(N){var G=N[0],V=N[1],K=N[2],j=N[3];K>0&&j>0&&B.scissor(G,this.drawingBufferHeight-V-j,K,j)}},popScissor:function(){var B=this.scissorStack;B.pop();var N=B[B.length-1];N&&this.setScissor(N[0],N[1],N[2],N[3]),this.currentScissor=N},hasActiveStencilMask:function(){var B=this.currentMask.mask,N=this.currentCameraMask.mask;return B&&B.isStencil||N&&N.isStencil},resetViewport:function(){var B=this.gl;B.viewport(0,0,this.width,this.height),this.drawingBufferHeight=B.drawingBufferHeight},setBlendMode:function(B,N){N===void 0&&(N=!1);var G=this.gl,V=this.blendModes[B];return N||B!==n.BlendModes.SKIP_CHECK&&this.currentBlendMode!==B?(this.flush(),G.enable(G.BLEND),G.blendEquation(V.equation),V.func.length>2?G.blendFuncSeparate(V.func[0],V.func[1],V.func[2],V.func[3]):G.blendFunc(V.func[0],V.func[1]),this.currentBlendMode=B,!0):!1},addBlendMode:function(B,N){var G=this.blendModes.push({func:B,equation:N});return G-1},updateBlendMode:function(B,N,G){return this.blendModes[B]&&(this.blendModes[B].func=N,G&&(this.blendModes[B].equation=G)),this},removeBlendMode:function(B){return B>17&&this.blendModes[B]&&this.blendModes.splice(B,1),this},pushFramebuffer:function(B,N,G,V,K){return B===this.currentFramebuffer?this:(this.fboStack.push(B),this.setFramebuffer(B,N,G,V,K))},setFramebuffer:function(B,N,G,V,K){if(N===void 0&&(N=!1),G===void 0&&(G=!0),V===void 0&&(V=null),K===void 0&&(K=!1),B===this.currentFramebuffer)return this;var j=this.gl,J=this.width,X=this.height;return B&&B.renderTexture&&G?(J=B.renderTexture.width,X=B.renderTexture.height):this.flush(),B?j.bindFramebuffer(j.FRAMEBUFFER,B.webGLFramebuffer):j.bindFramebuffer(j.FRAMEBUFFER,null),G&&j.viewport(0,0,J,X),V&&j.framebufferTexture2D(j.FRAMEBUFFER,j.COLOR_ATTACHMENT0,j.TEXTURE_2D,V.webGLTexture,0),K&&(j.clearColor(0,0,0,0),j.clear(j.COLOR_BUFFER_BIT)),N&&(B?(this.drawingBufferHeight=X,this.pushScissor(0,0,J,X)):(this.drawingBufferHeight=this.height,this.popScissor())),this.currentFramebuffer=B,this},popFramebuffer:function(B,N){B===void 0&&(B=!1),N===void 0&&(N=!0);var G=this.fboStack;G.pop();var V=G[G.length-1];return V||(V=null),this.setFramebuffer(V,B,N),V},restoreFramebuffer:function(B,N){B===void 0&&(B=!1),N===void 0&&(N=!0);var G=this.fboStack,V=G[G.length-1];V||(V=null),this.currentFramebuffer=null,this.setFramebuffer(V,B,N)},setProgram:function(B){return B!==this.currentProgram?(this.flush(),this.gl.useProgram(B.webGLProgram),this.currentProgram=B,!0):!1},resetProgram:function(){return this.gl.useProgram(this.currentProgram.webGLProgramWrapper),this},createTextureFromSource:function(B,N,G,V,K){K===void 0&&(K=!1);var j=this.gl,J=j.NEAREST,X=j.NEAREST,Y=j.CLAMP_TO_EDGE,b=null;N=B?B.width:N,G=B?B.height:G;var z=h(N,G);if(z&&!K&&(Y=j.REPEAT),V===n.ScaleModes.LINEAR&&this.config.antialias){var W=B&&B.compressed,H=!W&&z||W&&B.mipmaps.length>1;J=this.mipmapFilter&&H?this.mipmapFilter:j.LINEAR,X=j.LINEAR}return!B&&typeof N=="number"&&typeof G=="number"?b=this.createTexture2D(0,J,X,Y,Y,j.RGBA,null,N,G):b=this.createTexture2D(0,J,X,Y,Y,j.RGBA,B),b},createTexture2D:function(B,N,G,V,K,j,J,X,Y,b,z,W){typeof X!="number"&&(X=J?J.width:1),typeof Y!="number"&&(Y=J?J.height:1);var H=new P(this.gl,B,N,G,V,K,j,J,X,Y,b,z,W);return this.glTextureWrappers.push(H),H},createFramebuffer:function(B,N,G,V){this.currentFramebuffer=null;var K=new M(this.gl,B,N,G,V);return this.glFramebufferWrappers.push(K),K},beginBitmapMask:function(B,N){var G=this.gl;G&&(this.flush(),this.maskTarget.bind(!0),this.currentCameraMask.mask!==B&&(this.currentMask.mask=B,this.currentMask.camera=N))},drawBitmapMask:function(B,N,G){this.flush(),this.maskSource.bind(),this.setBlendMode(0,!0),B.renderWebGL(this,B,N),this.maskSource.unbind(!0),this.maskTarget.unbind();var V=this.gl,K=this.getCurrentStencilMask();K?(V.enable(V.STENCIL_TEST),K.mask.applyStencil(this,K.camera,!0)):this.currentMask.mask=null,this.pipelines.set(G),V.activeTexture(V.TEXTURE0),V.bindTexture(V.TEXTURE_2D,this.maskTarget.texture.webGLTexture),V.activeTexture(V.TEXTURE1),V.bindTexture(V.TEXTURE_2D,this.maskSource.texture.webGLTexture)},createProgram:function(B,N){var G=new C(this.gl,B,N);return this.glProgramWrappers.push(G),G},createVertexBuffer:function(B,N){var G=this.gl,V=new y(G,B,G.ARRAY_BUFFER,N);return this.glBufferWrappers.push(V),V},createAttribLocation:function(B,N){var G=new R(this.gl,B,N);return this.glAttribLocationWrappers.push(G),G},createUniformLocation:function(B,N){var G=new I(this.gl,B,N);return this.glUniformLocationWrappers.push(G),G},createIndexBuffer:function(B,N){var G=this.gl,V=new y(G,B,G.ELEMENT_ARRAY_BUFFER,N);return this.glBufferWrappers.push(V),V},deleteTexture:function(B){if(B)return v(this.glTextureWrappers,B),B.destroy(),this},deleteFramebuffer:function(B){return B?(v(this.fboStack,B),v(this.glFramebufferWrappers,B),B.destroy(),this):this},deleteProgram:function(B){return B&&(v(this.glProgramWrappers,B),B.destroy()),this},deleteAttribLocation:function(B){return B&&(v(this.glAttribLocationWrappers,B),B.destroy()),this},deleteUniformLocation:function(B){return B&&(v(this.glUniformLocationWrappers,B),B.destroy()),this},deleteBuffer:function(B){return B?(v(this.glBufferWrappers,B),B.destroy(),this):this},preRenderCamera:function(B){var N=B.x,G=B.y,V=B.width,K=B.height,j=B.backgroundColor;if(B.emit(o.PRE_RENDER,B),this.pipelines.preBatchCamera(B),this.pushScissor(N,G,V,K),B.mask&&(this.currentCameraMask.mask=B.mask,this.currentCameraMask.camera=B._maskCamera,B.mask.preRenderWebGL(this,B,B._maskCamera)),j.alphaGL>0){var J=this.pipelines.setMulti();J.drawFillRect(N,G,V,K,g.getTintFromFloats(j.blueGL,j.greenGL,j.redGL,1),j.alphaGL)}},getCurrentStencilMask:function(){var B=null,N=this.maskStack,G=this.currentCameraMask;return N.length>0?B=N[N.length-1]:G.mask&&G.mask.isStencil&&(B=G),B},postRenderCamera:function(B){var N=B.flashEffect,G=B.fadeEffect;if(N.isRunning||G.isRunning||G.isComplete){var V=this.pipelines.setMulti();N.postRenderWebGL(V,g.getTintFromFloats),G.postRenderWebGL(V,g.getTintFromFloats)}B.dirty=!1,this.popScissor(),B.mask&&(this.currentCameraMask.mask=null,B.mask.postRenderWebGL(this,B._maskCamera)),this.pipelines.postBatchCamera(B),B.emit(o.POST_RENDER,B)},preRender:function(){if(!this.contextLost){var B=this.gl;if(B.bindFramebuffer(B.FRAMEBUFFER,null),this.config.clearBeforeRender){var N=this.config.backgroundColor;B.clearColor(N.redGL,N.greenGL,N.blueGL,N.alphaGL),B.clear(B.COLOR_BUFFER_BIT|B.DEPTH_BUFFER_BIT|B.STENCIL_BUFFER_BIT)}B.enable(B.SCISSOR_TEST),this.currentScissor=this.defaultScissor,this.scissorStack.length=0,this.scissorStack.push(this.currentScissor),this.game.scene.customViewports&&B.scissor(0,this.drawingBufferHeight-this.height,this.width,this.height),this.currentMask.mask=null,this.currentCameraMask.mask=null,this.maskStack.length=0,this.emit(i.PRE_RENDER)}},render:function(B,N,G){if(!this.contextLost){var V=N.length;if(this.emit(i.RENDER,B,G),this.preRenderCamera(G),V===0){this.setBlendMode(n.BlendModes.NORMAL),this.postRenderCamera(G);return}this.currentType="";for(var K=this.currentMask,j=0;j{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(95428),o=t(95540),r=t(14500),n=new a({initialize:function(i,h,s,l,f){this.pipeline=i,this.name=h,this.renderer=i.renderer,this.gl=this.renderer.gl,this.fragSrc=l,this.vertSrc=s,this.program=this.renderer.createProgram(s,l),this.attributes,this.vertexComponentCount=0,this.vertexSize=0,this.uniforms={},this.createAttributes(f),this.createUniforms()},createAttributes:function(e){var i=0,h=0,s=[];this.vertexComponentCount=0;for(var l=0;l=0?(i.enableVertexAttribArray(M.webGLAttribLocation),i.vertexAttribPointer(M.webGLAttribLocation,p,g,P,s,x),d.enabled=!0,d.location=M):M.webGLAttribLocation!==-1&&i.disableVertexAttribArray(M.webGLAttribLocation)}else y?i.vertexAttribPointer(C.webGLAttribLocation,p,g,P,s,x):!y&&C!==-1&&C.webGLAttribLocation>-1&&(i.disableVertexAttribArray(C.webGLAttribLocation),d.location=-1)}return this},createUniforms:function(){var e=this.gl,i=this.program,h=this.uniforms,s,l,f,u=e.getProgramParameter(i.webGLProgram,e.ACTIVE_UNIFORMS);for(s=0;s0&&(l=l.substr(0,p),h.hasOwnProperty(l)||(f=this.renderer.createUniformLocation(i,l),f!==null&&(h[l]={name:l,location:f,setter:null,value1:null,value2:null,value3:null,value4:null})))}}return this},syncUniforms:function(){var e=this.gl;this.renderer.setProgram(this.program);for(var i in this.uniforms){var h=this.uniforms[i];h.setter&&h.setter.call(e,h.location.webGLUniformLocation,h.value1,h.value2,h.value3,h.value4)}},hasUniform:function(e){return this.uniforms.hasOwnProperty(e)},resetUniform:function(e){var i=this.uniforms[e];return i&&(i.value1=null,i.value2=null,i.value3=null,i.value4=null),this},setUniform1:function(e,i,h,s){var l=this.uniforms[i];return l?((s||l.value1!==h)&&(l.setter||(l.setter=e),l.value1=h,this.renderer.setProgram(this.program),e.call(this.gl,l.location.webGLUniformLocation,h),this.pipeline.currentShader=this),this):this},setUniform2:function(e,i,h,s,l){var f=this.uniforms[i];return f?((l||f.value1!==h||f.value2!==s)&&(f.setter||(f.setter=e),f.value1=h,f.value2=s,this.renderer.setProgram(this.program),e.call(this.gl,f.location.webGLUniformLocation,h,s),this.pipeline.currentShader=this),this):this},setUniform3:function(e,i,h,s,l,f){var u=this.uniforms[i];return u?((f||u.value1!==h||u.value2!==s||u.value3!==l)&&(u.setter||(u.setter=e),u.value1=h,u.value2=s,u.value3=l,this.renderer.setProgram(this.program),e.call(this.gl,u.location.webGLUniformLocation,h,s,l),this.pipeline.currentShader=this),this):this},setUniform4:function(e,i,h,s,l,f,u){var d=this.uniforms[i];return d?((u||d.value1!==h||d.value2!==s||d.value3!==l||d.value4!==f)&&(d.setter||(d.setter=e),d.value1=h,d.value2=s,d.value3=l,d.value4=f,this.renderer.setProgram(this.program),e.call(this.gl,d.location.webGLUniformLocation,h,s,l,f),this.pipeline.currentShader=this),this):this},setBoolean:function(e,i){return this.setUniform1(this.gl.uniform1i,e,Number(i))},set1f:function(e,i){return this.setUniform1(this.gl.uniform1f,e,i)},set2f:function(e,i,h){return this.setUniform2(this.gl.uniform2f,e,i,h)},set3f:function(e,i,h,s){return this.setUniform3(this.gl.uniform3f,e,i,h,s)},set4f:function(e,i,h,s,l){return this.setUniform4(this.gl.uniform4f,e,i,h,s,l)},set1fv:function(e,i){return this.setUniform1(this.gl.uniform1fv,e,i,!0)},set2fv:function(e,i){return this.setUniform1(this.gl.uniform2fv,e,i,!0)},set3fv:function(e,i){return this.setUniform1(this.gl.uniform3fv,e,i,!0)},set4fv:function(e,i){return this.setUniform1(this.gl.uniform4fv,e,i,!0)},set1iv:function(e,i){return this.setUniform1(this.gl.uniform1iv,e,i,!0)},set2iv:function(e,i){return this.setUniform1(this.gl.uniform2iv,e,i,!0)},set3iv:function(e,i){return this.setUniform1(this.gl.uniform3iv,e,i,!0)},set4iv:function(e,i){return this.setUniform1(this.gl.uniform4iv,e,i,!0)},set1i:function(e,i){return this.setUniform1(this.gl.uniform1i,e,i)},set2i:function(e,i,h){return this.setUniform2(this.gl.uniform2i,e,i,h)},set3i:function(e,i,h,s){return this.setUniform3(this.gl.uniform3i,e,i,h,s)},set4i:function(e,i,h,s,l){return this.setUniform4(this.gl.uniform4i,e,i,h,s,l)},setMatrix2fv:function(e,i,h){return this.setUniform2(this.gl.uniformMatrix2fv,e,i,h,!0)},setMatrix3fv:function(e,i,h){return this.setUniform2(this.gl.uniformMatrix3fv,e,i,h,!0)},setMatrix4fv:function(e,i,h){return this.setUniform2(this.gl.uniformMatrix4fv,e,i,h,!0)},createProgram:function(e,i){return e===void 0&&(e=this.vertSrc),i===void 0&&(i=this.fragSrc),this.program&&this.renderer.deleteProgram(this.program),this.vertSrc=e,this.fragSrc=i,this.program=this.renderer.createProgram(e,i),this.createUniforms(),this.rebind()},destroy:function(){var e=this.renderer;v(this.uniforms,function(i){e.deleteUniformLocation(i.location)}),this.uniforms=null,v(this.attributes,function(i){e.deleteAttribLocation(i.location)}),this.attributes=null,e.deleteProgram(this.program),this.pipeline=null,this.renderer=null,this.gl=null,this.program=null}});c.exports=n},14500:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={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}};c.exports=m},4159:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(14500),v=t(79291),o={PipelineManager:t(7530),Pipelines:t(96615),RenderTarget:t(32302),Utils:t(70554),WebGLPipeline:t(29100),WebGLRenderer:t(74797),WebGLShader:t(38683),Wrappers:t(9503)};o=v(!1,o,a),c.exports=o},31302:(c,m,t)=>{/** - * @author Richard Davey - * @author Felipe Alfonso <@bitnenfer> - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(95540),o=t(78908),r=t(85191),n=t(14500),e=t(29100),i=new a({Extends:e,initialize:function(s){s.fragShader=v(s,"fragShader",o),s.vertShader=v(s,"vertShader",r),s.batchSize=v(s,"batchSize",1),s.vertices=v(s,"vertices",[-1,1,-1,-7,7,1]),s.attributes=v(s,"attributes",[{name:"inPosition",size:2,type:n.FLOAT}]),e.call(this,s)},boot:function(){e.prototype.boot.call(this),this.set1i("uMainSampler",0),this.set1i("uMaskSampler",1)},resize:function(h,s){e.prototype.resize.call(this,h,s),this.set2f("uResolution",h,s)},beginMask:function(h,s,l){this.renderer.beginBitmapMask(h,l)},endMask:function(h,s,l){var f=this.gl,u=this.renderer,d=h.bitmapMask;d&&f&&(u.drawBitmapMask(d,s,this),l&&this.set2f("uResolution",l.width,l.height),this.set1i("uInvertMaskAlpha",h.invertAlpha),f.drawArrays(this.topology,0,3),l&&this.set2f("uResolution",this.width,this.height),f.bindTexture(f.TEXTURE_2D,null))}});c.exports=i},92651:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(58918),o=t(14811),r=t(95540),n=t(43558),e=t(89350),i=t(70554),h=new a({Extends:n,initialize:function(l){l.shaders=[i.setGlowQuality(e.FXGlowFrag,l.game),e.FXShadowFrag,e.FXPixelateFrag,e.FXVignetteFrag,e.FXShineFrag,e.FXBlurLowFrag,e.FXBlurMedFrag,e.FXBlurHighFrag,e.FXGradientFrag,e.FXBloomFrag,e.ColorMatrixFrag,e.FXCircleFrag,e.FXBarrelFrag,e.FXDisplacementFrag,e.FXWipeFrag,e.FXBokehFrag],n.call(this,l);var f=this.game;this.glow=new v.Glow(f),this.shadow=new v.Shadow(f),this.pixelate=new v.Pixelate(f),this.vignette=new v.Vignette(f),this.shine=new v.Shine(f),this.gradient=new v.Gradient(f),this.circle=new v.Circle(f),this.barrel=new v.Barrel(f),this.wipe=new v.Wipe(f),this.bokeh=new v.Bokeh(f);var u=[];u[o.GLOW]=this.onGlow,u[o.SHADOW]=this.onShadow,u[o.PIXELATE]=this.onPixelate,u[o.VIGNETTE]=this.onVignette,u[o.SHINE]=this.onShine,u[o.BLUR]=this.onBlur,u[o.GRADIENT]=this.onGradient,u[o.BLOOM]=this.onBloom,u[o.COLOR_MATRIX]=this.onColorMatrix,u[o.CIRCLE]=this.onCircle,u[o.BARREL]=this.onBarrel,u[o.DISPLACEMENT]=this.onDisplacement,u[o.WIPE]=this.onWipe,u[o.BOKEH]=this.onBokeh,this.fxHandlers=u,this.source,this.target,this.swap},onDraw:function(s,l,f){this.source=s,this.target=l,this.swap=f;var u=s.width,d=s.height,p=this.tempSprite,g=this.fxHandlers;if(p&&p.preFX)for(var x=p.preFX.list,y=0;y{/** - * @author Richard Davey - * @author Felipe Alfonso <@bitnenfer> - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(95540),o=t(31063),r=t(57516),n=t(61340),e=t(26099),i=t(29100),h=new a({Extends:r,initialize:function(l){var f=v(l,"fragShader",o);l.fragShader=f.replace("%LIGHT_COUNT%",l.game.renderer.config.maxLights),r.call(this,l),this.inverseRotationMatrix=new Float32Array([1,0,0,0,1,0,0,0,1]),this.currentNormalMap,this.lightsActive=!0,this.tempVec2=new e,this._tempMatrix=new n,this._tempMatrix2=new n},boot:function(){i.prototype.boot.call(this)},onRender:function(s,l){var f=s.sys.lights;if(this.lightsActive=!1,!(!f||!f.active)){var u=f.getLights(l),d=u.length;this.lightsActive=!0;var p,g=this.renderer,x=g.height,y=l.matrix,C=this.tempVec2;for(this.set1i("uMainSampler",0),this.set1i("uNormSampler",1),this.set2f("uResolution",this.width/2,this.height/2),this.set4f("uCamera",l.x,l.y,l.rotation,l.zoom),this.set3f("uAmbientLightColor",f.ambientColor.r,f.ambientColor.g,f.ambientColor.b),this.set1i("uLightCount",d),p=0;p0&&this.flush();var l=this.inverseRotationMatrix;if(s){var f=-s,u=Math.cos(f),d=Math.sin(f);l[1]=d,l[3]=-d,l[0]=l[4]=u}else l[0]=l[4]=1,l[1]=l[3]=0;this.setMatrix3fv("uInverseRotationMatrix",!1,l),this.currentNormalMapRotation=s}},setTexture2D:function(s,l){var f=this.renderer;s===void 0&&(s=f.whiteTexture);var u=this.getNormalMap(l);this.isNewNormalMap(s,u)&&(this.flush(),this.createBatch(s),this.addTextureToBatch(u),this.currentNormalMap=u);var d=0;if(l&&l.parentContainer){var p=l.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2);d=p.rotationNormalized}else l&&(d=l.rotation);return this.setNormalMapRotation(d),0},setGameObject:function(s,l){l===void 0&&(l=s.frame);var f=l.glTexture,u=this.getNormalMap(s);if(this.isNewNormalMap(f,u)&&(this.flush(),this.createBatch(f),this.addTextureToBatch(u),this.currentNormalMap=u),s.parentContainer){var d=s.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2);this.setNormalMapRotation(d.rotationNormalized)}else this.setNormalMapRotation(s.rotation);return 0},isNewNormalMap:function(s,l){return this.currentTexture!==s||this.currentNormalMap!==l},getNormalMap:function(s){var l;if(s)s.displayTexture?l=s.displayTexture.dataSource[s.displayFrame.sourceIndex]:s.texture?l=s.texture.dataSource[s.frame.sourceIndex]:s.tileset&&(Array.isArray(s.tileset)?l=s.tileset[0].image.dataSource[0]:l=s.tileset.image.dataSource[0]);else return this.renderer.normalTexture;return l?l.glTexture:this.renderer.normalTexture},batchSprite:function(s,l,f){this.lightsActive&&r.prototype.batchSprite.call(this,s,l,f)},batchTexture:function(s,l,f,u,d,p,g,x,y,C,P,M,R,I,L,B,N,G,V,K,j,J,X,Y,b,z,W,H,Z,Q,k,et){this.lightsActive&&r.prototype.batchTexture.call(this,s,l,f,u,d,p,g,x,y,C,P,M,R,I,L,B,N,G,V,K,j,J,X,Y,b,z,W,H,Z,Q,k,et)},batchTextureFrame:function(s,l,f,u,d,p,g){this.lightsActive&&r.prototype.batchTextureFrame.call(this,s,l,f,u,d,p,g)}});c.exports=h},56527:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(95540),o=t(57516),r=t(45561),n=t(60722),e=t(14500),i=t(29100),h=new a({Extends:o,initialize:function(l){l.fragShader=v(l,"fragShader",r),l.vertShader=v(l,"vertShader",n),l.attributes=v(l,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:e.UNSIGNED_BYTE,normalized:!0}]),l.forceZero=!0,l.resizeUniform="uResolution",o.call(this,l)},boot:function(){i.prototype.boot.call(this);var s=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",s.width,s.height),this.set1i("uRoundPixels",s.config.roundPixels)}});c.exports=h},57516:(c,m,t)=>{/** - * @author Richard Davey - * @author Felipe Alfonso <@bitnenfer> - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(94811),o=t(95540),r=t(98840),n=t(44667),e=t(61340),i=t(70554),h=t(14500),s=t(29100),l=new a({Extends:s,initialize:function(u){var d=u.game.renderer,p=o(u,"fragShader",r);u.fragShader=i.parseFragmentShaderMaxTextures(p,d.maxTextures),u.vertShader=o(u,"vertShader",n),u.attributes=o(u,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:h.UNSIGNED_BYTE,normalized:!0}]),u.resizeUniform="uResolution",s.call(this,u),this._tempMatrix1=new e,this._tempMatrix2=new e,this._tempMatrix3=new e,this.calcMatrix=new e,this.tempTriangle=[{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0}],this.strokeTint={TL:0,TR:0,BL:0,BR:0},this.fillTint={TL:0,TR:0,BL:0,BR:0},this.currentFrame={u0:0,v0:0,u1:1,v1:1},this.firstQuad=[0,0,0,0,0],this.prevQuad=[0,0,0,0,0],this.polygonCache=[]},boot:function(){s.prototype.boot.call(this);var f=this.renderer;this.set1iv("uMainSampler",f.textureIndexes),this.set2f("uResolution",f.width,f.height),this.set1i("uRoundPixels",f.config.roundPixels)},batchSprite:function(f,u,d){this.manager.set(this,f);var p=this._tempMatrix1,g=this._tempMatrix2,x=this._tempMatrix3,y=f.frame,C=y.glTexture,P=y.u0,M=y.v0,R=y.u1,I=y.v1,L=y.x,B=y.y,N=y.cutWidth,G=y.cutHeight,V=y.customPivot,K=f.displayOriginX,j=f.displayOriginY,J=-K+L,X=-j+B;if(f.isCropped){var Y=f._crop;(Y.flipX!==f.flipX||Y.flipY!==f.flipY)&&y.updateCropUVs(Y,f.flipX,f.flipY),P=Y.u0,M=Y.v0,R=Y.u1,I=Y.v1,N=Y.width,G=Y.height,L=Y.x,B=Y.y,J=-K+L,X=-j+B}var b=1,z=1;f.flipX&&(V||(J+=-y.realWidth+K*2),b=-1),f.flipY&&(V||(X+=-y.realHeight+j*2),z=-1);var W=f.x,H=f.y;g.applyITRS(W,H,f.rotation,f.scaleX*b,f.scaleY*z),p.copyFrom(u.matrix),d?(p.multiplyWithOffset(d,-u.scrollX*f.scrollFactorX,-u.scrollY*f.scrollFactorY),g.e=W,g.f=H):(g.e-=u.scrollX*f.scrollFactorX,g.f-=u.scrollY*f.scrollFactorY),p.multiply(g,x);var Z=x.setQuad(J,X,J+N,X+G),Q=i.getTintAppendFloatAlpha,k=u.alpha,et=Q(f.tintTopLeft,k*f._alphaTL),st=Q(f.tintTopRight,k*f._alphaTR),rt=Q(f.tintBottomLeft,k*f._alphaBL),ot=Q(f.tintBottomRight,k*f._alphaBR);this.shouldFlush(6)&&this.flush();var ft=this.setGameObject(f,y);this.manager.preBatch(f),this.currentShader.set1i("uRoundPixels",u.roundPixels),this.batchQuad(f,Z[0],Z[1],Z[2],Z[3],Z[4],Z[5],Z[6],Z[7],P,M,R,I,et,st,rt,ot,f.tintFill,C,ft),this.manager.postBatch(f)},batchTexture:function(f,u,d,p,g,x,y,C,P,M,R,I,L,B,N,G,V,K,j,J,X,Y,b,z,W,H,Z,Q,k,et,st,rt,ot){ot===void 0&&(ot=!1),this.manager.set(this,f);var ft=this._tempMatrix1,at=this._tempMatrix2,vt=this._tempMatrix3,At=K/d+Z,Et=j/p+Q,Pt=(K+J)/d+Z,ct=(j+X)/p+Q,Ct=y,pt=C,wt=-G,Bt=-V;if(f.isCropped){var jt=f._crop,zt=jt.width,Yt=jt.height;Ct=zt,pt=Yt,y=zt,C=Yt,K=jt.x,j=jt.y;var bt=K,re=j;I&&(bt=J-jt.x-zt),L&&(re=X-jt.y-Yt),At=bt/d+Z,Et=re/p+Q,Pt=(bt+zt)/d+Z,ct=(re+Yt)/p+Q,wt=-G+K,Bt=-V+j}L=L^(!st&&u.isRenderTexture?1:0),I&&(Ct*=-1,wt+=y),L&&(pt*=-1,Bt+=C),at.applyITRS(g,x,R,P,M),ft.copyFrom(k.matrix),et?(ft.multiplyWithOffset(et,-k.scrollX*B,-k.scrollY*N),at.e=g,at.f=x):(at.e-=k.scrollX*B,at.f-=k.scrollY*N),ft.multiply(at,vt);var Qt=vt.setQuad(wt,Bt,wt+Ct,Bt+pt);rt==null&&(rt=this.setTexture2D(u)),f&&!ot&&this.manager.preBatch(f),this.currentShader.set1i("uRoundPixels",k.roundPixels),this.batchQuad(f,Qt[0],Qt[1],Qt[2],Qt[3],Qt[4],Qt[5],Qt[6],Qt[7],At,Et,Pt,ct,Y,b,z,W,H,u,rt),f&&!ot&&this.manager.postBatch(f)},batchTextureFrame:function(f,u,d,p,g,x,y){this.manager.set(this);var C=this._tempMatrix1.copyFrom(x),P=this._tempMatrix2;y?C.multiply(y,P):P=C;var M=P.setQuad(u,d,u+f.width,d+f.height),R=this.setTexture2D(f.source.glTexture);p=i.getTintAppendFloatAlpha(p,g),this.batchQuad(null,M[0],M[1],M[2],M[3],M[4],M[5],M[6],M[7],f.u0,f.v0,f.u1,f.v1,p,p,p,p,0,f.glTexture,R)},batchFillRect:function(f,u,d,p,g,x){this.renderer.pipelines.set(this);var y=this.calcMatrix;x&&x.multiply(g,y);var C=y.setQuad(f,u,f+d,u+p),P=this.fillTint;this.batchQuad(null,C[0],C[1],C[2],C[3],C[4],C[5],C[6],C[7],0,0,1,1,P.TL,P.TR,P.BL,P.BR,2)},batchFillTriangle:function(f,u,d,p,g,x,y,C){this.renderer.pipelines.set(this);var P=this.calcMatrix;C&&C.multiply(y,P);var M=P.getX(f,u),R=P.getY(f,u),I=P.getX(d,p),L=P.getY(d,p),B=P.getX(g,x),N=P.getY(g,x),G=this.fillTint;this.currentShader.set1i("uRoundPixels",!1),this.batchTri(null,M,R,I,L,B,N,0,0,1,1,G.TL,G.TR,G.BL,2)},batchStrokeTriangle:function(f,u,d,p,g,x,y,C,P){var M=this.tempTriangle;M[0].x=f,M[0].y=u,M[0].width=y,M[1].x=d,M[1].y=p,M[1].width=y,M[2].x=g,M[2].y=x,M[2].width=y,M[3].x=f,M[3].y=u,M[3].width=y,this.batchStrokePath(M,y,!1,C,P)},batchFillPath:function(f,u,d){this.renderer.pipelines.set(this);var p=this.calcMatrix;d&&d.multiply(u,p);for(var g=f.length,x=this.polygonCache,y,C,P=this.fillTint.TL,M=this.fillTint.TR,R=this.fillTint.BL,I=0;I0&&Ct[4]?this.batchQuad(null,ft,at,et,st,Ct[0],Ct[1],Ct[2],Ct[3],0,0,1,1,At,Et,Pt,ct,2):(pt[0]=ft,pt[1]=at,pt[2]=et,pt[3]=st,pt[4]=1),P&&pt[4]?this.batchQuad(null,Q,k,rt,ot,pt[0],pt[1],pt[2],pt[3],0,0,1,1,At,Et,Pt,ct,2):(Ct[0]=Q,Ct[1]=k,Ct[2]=rt,Ct[3]=ot,Ct[4]=1)}}},destroy:function(){return this._tempMatrix1.destroy(),this._tempMatrix2.destroy(),this._tempMatrix3.destroy(),this._tempMatrix1=null,this._tempMatrix1=null,this._tempMatrix1=null,s.prototype.destroy.call(this),this}});c.exports=l},43439:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(95540),o=t(4127),r=t(89924),n=t(29100),e=new a({Extends:n,initialize:function(h){h.vertShader=v(h,"vertShader",r),h.fragShader=v(h,"fragShader",o),h.attributes=v(h,"attributes",[{name:"inPosition",size:2},{name:"inLightPosition",size:2},{name:"inLightRadius"},{name:"inLightAttenuation"},{name:"inLightColor",size:4}]),n.call(this,h)},onRender:function(i,h){this.set2f("uResolution",this.width,this.height),this.set1f("uCameraZoom",h.zoom)},batchPointLight:function(i,h,s,l,f,u,d,p,g,x,y,C){var P=i.color,M=i.intensity,R=i.radius,I=i.attenuation,L=P.r*M,B=P.g*M,N=P.b*M,G=h.alpha*i.alpha;this.shouldFlush(6)&&this.flush(),this.currentBatch||this.setTexture2D(),this.batchLightVert(s,l,y,C,R,I,L,B,N,G),this.batchLightVert(f,u,y,C,R,I,L,B,N,G),this.batchLightVert(d,p,y,C,R,I,L,B,N,G),this.batchLightVert(s,l,y,C,R,I,L,B,N,G),this.batchLightVert(d,p,y,C,R,I,L,B,N,G),this.batchLightVert(g,x,y,C,R,I,L,B,N,G),this.currentBatch.count=this.vertexCount-this.currentBatch.start},batchLightVert:function(i,h,s,l,f,u,d,p,g,x){var y=this.vertexViewF32,C=this.vertexCount*this.currentShader.vertexComponentCount-1;y[++C]=i,y[++C]=h,y[++C]=s,y[++C]=l,y[++C]=f,y[++C]=u,y[++C]=d,y[++C]=p,y[++C]=g,y[++C]=x,this.vertexCount++}});c.exports=e},84057:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(89422),o=t(95540),r=t(27681),n=t(49627),e=t(29100),i=new a({Extends:e,initialize:function(s){s.renderTarget=o(s,"renderTarget",1),s.fragShader=o(s,"fragShader",r),s.vertShader=o(s,"vertShader",n),s.attributes=o(s,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),s.batchSize=1,s.vertices=[-1,-1,0,0,-1,1,0,1,1,1,1,1,-1,-1,0,0,1,1,1,1,1,-1,1,0],e.call(this,s),this.isPostFX=!0,this.gameObject,this.controller,this.colorMatrix=new v,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2,this.renderer.isBooted&&(this.manager=this.renderer.pipelines)},bootFX:function(){e.prototype.boot.call(this);var h=this.manager.UTILITY_PIPELINE;this.fullFrame1=h.fullFrame1,this.fullFrame2=h.fullFrame2,this.halfFrame1=h.halfFrame1,this.halfFrame2=h.halfFrame2;var s=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",s.width,s.height),this.set1i("uRoundPixels",s.config.roundPixels);for(var l=this.renderTargets,f=0;f{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(10312),v=t(67502),o=t(83419),r=t(96293),n=t(95540),e=t(57516),i=t(27681),h=t(87841),s=t(32302),l=t(45561),f=t(60722),u=t(29100),d=new o({Extends:e,initialize:function(g){var x=n(g,"fragShader",i),y=n(g,"vertShader",f),C=n(g,"drawShader",i),P=[{name:"DrawSprite",fragShader:l,vertShader:f},{name:"CopySprite",fragShader:x,vertShader:y},{name:"DrawGame",fragShader:C,vertShader:f},{name:"ColorMatrix",fragShader:r}],M=n(g,"shaders",[]);g.shaders=P.concat(M),g.vertShader||(g.vertShader=y),g.batchSize=1,e.call(this,g),this.isPreFX=!0,this.customMainSampler=null,this.drawSpriteShader,this.copyShader,this.gameShader,this.colorMatrixShader,this.quadVertexData,this.quadVertexBuffer,this.quadVertexViewF32,this.spriteBounds=new h,this.targetBounds=new h,this.fsTarget,this.tempSprite,this.renderer.isBooted&&(this.manager=this.renderer.pipelines,this.boot())},boot:function(){u.prototype.boot.call(this);var p=this.shaders,g=this.renderer;this.drawSpriteShader=p[0],this.copyShader=p[1],this.gameShader=p[2],this.colorMatrixShader=p[3],this.fsTarget=new s(g,g.width,g.height,1,0,!0,!0),this.renderTargets=this.manager.renderTargets.concat(this.fsTarget);var x=new ArrayBuffer(168);this.quadVertexData=x,this.quadVertexViewF32=new Float32Array(x),this.quadVertexBuffer=g.createVertexBuffer(x,this.gl.STATIC_DRAW),this.onResize(g.width,g.height),this.currentShader=this.copyShader,this.set2f("uResolution",g.width,g.height),this.set1i("uRoundPixels",g.config.roundPixels)},onResize:function(p,g){var x=this.quadVertexViewF32;x[1]=g,x[22]=g,x[14]=p,x[28]=p,x[35]=p,x[36]=g},batchQuad:function(p,g,x,y,C,P,M,R,I,L,B,N,G,V,K,j,J,X,Y){var b=Math.min(g,y,P,R),z=Math.min(x,C,M,I),W=Math.max(g,y,P,R),H=Math.max(x,C,M,I),Z=W-b,Q=H-z,k=this.spriteBounds.setTo(b,z,Z,Q),et=p?p.preFX.padding:0,st=Z+et*2,rt=Q+et*2,ot=Math.abs(Math.max(st,rt)),ft=this.manager.getRenderTarget(ot),at=this.targetBounds.setTo(0,0,ft.width,ft.height);v(at,k.centerX,k.centerY),this.tempSprite=p;var vt=this.gl,At=this.renderer;At.clearStencilMask(),this.setShader(this.drawSpriteShader),this.set1i("uMainSampler",0),this.set2f("uResolution",At.width,At.height),this.set1i("uRoundPixels",At.config.roundPixels),this.flipProjectionMatrix(!0),p&&(this.onDrawSprite(p,ft),p.preFX.onFX(this));var Et=this.fsTarget;return this.flush(),vt.viewport(0,0,At.width,At.height),vt.bindFramebuffer(vt.FRAMEBUFFER,Et.framebuffer.webGLFramebuffer),vt.framebufferTexture2D(vt.FRAMEBUFFER,vt.COLOR_ATTACHMENT0,vt.TEXTURE_2D,Et.texture.webGLTexture,0),vt.clearColor(0,0,0,0),vt.clear(vt.COLOR_BUFFER_BIT),this.setTexture2D(Y),this.batchVert(g,x,L,B,0,X,V),this.batchVert(y,C,L,G,0,X,j),this.batchVert(P,M,N,G,0,X,J),this.batchVert(g,x,L,B,0,X,V),this.batchVert(P,M,N,G,0,X,J),this.batchVert(R,I,N,B,0,X,K),this.flush(),this.flipProjectionMatrix(!1),vt.activeTexture(vt.TEXTURE0),vt.bindTexture(vt.TEXTURE_2D,ft.texture.webGLTexture),vt.copyTexSubImage2D(vt.TEXTURE_2D,0,0,0,at.x,at.y,at.width,at.height),vt.bindFramebuffer(vt.FRAMEBUFFER,null),vt.bindTexture(vt.TEXTURE_2D,null),this.onBatch(p),this.currentShader=this.copyShader,this.onDraw(ft,this.manager.getSwapRenderTarget(),this.manager.getAltSwapRenderTarget()),!0},onDrawSprite:function(){},onCopySprite:function(){},copySprite:function(p,g,x,y,C,P,M){x===void 0&&(x=!0),y===void 0&&(y=!0),C===void 0&&(C=!1),M===void 0&&(M=this.copyShader);var R=this.gl,I=this.tempSprite;P&&(M=this.colorMatrixShader),this.currentShader=M;var L=this.setVertexBuffer(this.quadVertexBuffer);M.bind(L,!1);var B=this.renderer;if(this.set1i("uMainSampler",0),this.set2f("uResolution",B.width,B.height),this.set1i("uRoundPixels",B.config.roundPixels),I.preFX.onFXCopy(this),this.onCopySprite(p,g,I),P&&(this.set1fv("uColorMatrix",P.getData()),this.set1f("uAlpha",P.alpha)),R.activeTexture(R.TEXTURE0),R.bindTexture(R.TEXTURE_2D,p.texture.webGLTexture),p.height>g.height)R.viewport(0,0,p.width,p.height),this.setTargetUVs(p,g);else{var N=g.height-p.height;R.viewport(0,N,p.width,p.height),this.resetUVs()}if(R.bindFramebuffer(R.FRAMEBUFFER,g.framebuffer.webGLFramebuffer),R.framebufferTexture2D(R.FRAMEBUFFER,R.COLOR_ATTACHMENT0,R.TEXTURE_2D,g.texture.webGLTexture,0),x&&(R.clearColor(0,0,0,+!y),R.clear(R.COLOR_BUFFER_BIT)),C){var G=this.renderer.currentBlendMode;this.renderer.setBlendMode(a.ERASE)}R.bufferData(R.ARRAY_BUFFER,this.quadVertexData,R.STATIC_DRAW),R.drawArrays(R.TRIANGLES,0,6),C&&this.renderer.setBlendMode(G),R.bindFramebuffer(R.FRAMEBUFFER,null)},copy:function(p,g){var x=this.gl;this.set1i("uMainSampler",0),x.activeTexture(x.TEXTURE0),x.bindTexture(x.TEXTURE_2D,p.texture.webGLTexture),x.viewport(0,0,p.width,p.height),this.setUVs(0,0,0,1,1,1,1,0),x.bindFramebuffer(x.FRAMEBUFFER,g.framebuffer.webGLFramebuffer),x.framebufferTexture2D(x.FRAMEBUFFER,x.COLOR_ATTACHMENT0,x.TEXTURE_2D,g.texture.webGLTexture,0),x.clearColor(0,0,0,0),x.clear(x.COLOR_BUFFER_BIT),x.bufferData(x.ARRAY_BUFFER,this.quadVertexData,x.STATIC_DRAW),x.drawArrays(x.TRIANGLES,0,6),x.bindFramebuffer(x.FRAMEBUFFER,null)},blendFrames:function(p,g,x,y,C){this.manager.blendFrames(p,g,x,y,C)},blendFramesAdditive:function(p,g,x,y,C){this.manager.blendFramesAdditive(p,g,x,y,C)},drawToGame:function(p){this.currentShader=null,this.setShader(this.copyShader),this.bindAndDraw(p)},copyToGame:function(p){this.currentShader=null,this.setShader(this.gameShader),this.bindAndDraw(p)},bindAndDraw:function(p){var g=this.gl,x=this.renderer;this.set1i("uMainSampler",0),this.customMainSampler?this.setTexture2D(this.customMainSampler):this.setTexture2D(p.texture);var y=this._tempMatrix1.loadIdentity(),C=this.targetBounds.x,P=this.targetBounds.y,M=C+p.width,R=P+p.height,I=y.getX(C,P),L=y.getX(C,R),B=y.getX(M,R),N=y.getX(M,P),G=y.getY(C,P),V=y.getY(C,R),K=y.getY(M,R),j=y.getY(M,P),J=16777215;this.batchVert(I,G,0,0,0,0,J),this.batchVert(L,V,0,1,0,0,J),this.batchVert(B,K,1,1,0,0,J),this.batchVert(I,G,0,0,0,0,J),this.batchVert(B,K,1,1,0,0,J),this.batchVert(N,j,1,0,0,0,J),x.restoreFramebuffer(!1,!0),x.currentFramebuffer||g.viewport(0,0,x.width,x.height),x.restoreStencilMask(),this.flush(),this.tempSprite=null},onDraw:function(p){this.drawToGame(p)},setUVs:function(p,g,x,y,C,P,M,R){var I=this.quadVertexViewF32;I[2]=p,I[3]=g,I[9]=x,I[10]=y,I[16]=C,I[17]=P,I[23]=p,I[24]=g,I[30]=C,I[31]=P,I[37]=M,I[38]=R},setTargetUVs:function(p,g){var x=g.height/p.height;x>.5?x=.5-(x-.5):x=.5+(.5-x),this.setUVs(0,x,0,1+x,1,1+x,1,x)},resetUVs:function(){this.setUVs(0,0,0,1,1,1,1,0)},destroy:function(){return this.renderer.deleteBuffer(this.quadVertexBuffer),this.drawSpriteShader=null,this.copyShader=null,this.gameShader=null,this.colorMatrixShader=null,this.quadVertexData=null,this.quadVertexBuffer=null,this.quadVertexViewF32=null,this.fsTarget=null,this.tempSprite=null,e.prototype.destroy.call(this),this}});c.exports=d},81041:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(95540),o=t(57516),r=new a({Extends:o,initialize:function(e){e.topology=5,e.batchSize=v(e,"batchSize",256),o.call(this,e)}});c.exports=r},12385:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(95540),o=t(57516),r=t(45561),n=t(60722),e=t(29100),i=new a({Extends:o,initialize:function(s){s.fragShader=v(s,"fragShader",r),s.vertShader=v(s,"vertShader",n),s.forceZero=!0,o.call(this,s)},boot:function(){e.prototype.boot.call(this);var h=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",h.width,h.height),this.set1i("uRoundPixels",h.config.roundPixels)}});c.exports=i},7589:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(35407),v=t(10312),o=t(83419),r=t(89422),n=t(96293),e=t(36682),i=t(95540),h=t(48247),s=t(49627),l=t(29100),f=new o({Extends:l,initialize:function(d){d.renderTarget=i(d,"renderTarget",[{scale:1,autoResize:!0},{scale:1,autoResize:!0},{scale:.5,autoResize:!0},{scale:.5,autoResize:!0}]),d.vertShader=i(d,"vertShader",s),d.shaders=i(d,"shaders",[{name:"Copy",fragShader:e},{name:"AddBlend",fragShader:a},{name:"LinearBlend",fragShader:h},{name:"ColorMatrix",fragShader:n}]),d.attributes=i(d,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),d.vertices=[-1,-1,0,0,-1,1,0,1,1,1,1,1,-1,-1,0,0,1,1,1,1,1,-1,1,0],d.batchSize=1,l.call(this,d),this.colorMatrix=new r,this.copyShader,this.addShader,this.linearShader,this.colorMatrixShader,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2},boot:function(){l.prototype.boot.call(this);var u=this.shaders,d=this.renderTargets;this.copyShader=u[0],this.addShader=u[1],this.linearShader=u[2],this.colorMatrixShader=u[3],this.fullFrame1=d[0],this.fullFrame2=d[1],this.halfFrame1=d[2],this.halfFrame2=d[3]},copyFrame:function(u,d,p,g,x){p===void 0&&(p=1),g===void 0&&(g=!0),x===void 0&&(x=!0);var y=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",p),y.activeTexture(y.TEXTURE0),y.bindTexture(y.TEXTURE_2D,u.texture.webGLTexture),d?(y.viewport(0,0,d.width,d.height),y.bindFramebuffer(y.FRAMEBUFFER,d.framebuffer.webGLFramebuffer),y.framebufferTexture2D(y.FRAMEBUFFER,y.COLOR_ATTACHMENT0,y.TEXTURE_2D,d.texture.webGLTexture,0)):y.viewport(0,0,u.width,u.height),g&&(x?y.clearColor(0,0,0,0):y.clearColor(0,0,0,1),y.clear(y.COLOR_BUFFER_BIT)),y.bufferData(y.ARRAY_BUFFER,this.vertexData,y.STATIC_DRAW),y.drawArrays(y.TRIANGLES,0,6),y.bindFramebuffer(y.FRAMEBUFFER,null),y.bindTexture(y.TEXTURE_2D,null)},blitFrame:function(u,d,p,g,x,y,C){p===void 0&&(p=1),g===void 0&&(g=!0),x===void 0&&(x=!0),y===void 0&&(y=!1),C===void 0&&(C=!1);var P=this.gl;if(this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",p),P.activeTexture(P.TEXTURE0),P.bindTexture(P.TEXTURE_2D,u.texture.webGLTexture),u.height>d.height)P.viewport(0,0,u.width,u.height),this.setTargetUVs(u,d);else{var M=d.height-u.height;P.viewport(0,M,u.width,u.height)}if(P.bindFramebuffer(P.FRAMEBUFFER,d.framebuffer.webGLFramebuffer),P.framebufferTexture2D(P.FRAMEBUFFER,P.COLOR_ATTACHMENT0,P.TEXTURE_2D,d.texture.webGLTexture,0),g&&(x?P.clearColor(0,0,0,0):P.clearColor(0,0,0,1),P.clear(P.COLOR_BUFFER_BIT)),y){var R=this.renderer.currentBlendMode;this.renderer.setBlendMode(v.ERASE)}C&&this.flipY(),P.bufferData(P.ARRAY_BUFFER,this.vertexData,P.STATIC_DRAW),P.drawArrays(P.TRIANGLES,0,6),y&&this.renderer.setBlendMode(R),P.bindFramebuffer(P.FRAMEBUFFER,null),P.bindTexture(P.TEXTURE_2D,null),this.resetUVs()},copyFrameRect:function(u,d,p,g,x,y,C,P){C===void 0&&(C=!0),P===void 0&&(P=!0);var M=this.gl;M.bindFramebuffer(M.FRAMEBUFFER,u.framebuffer.webGLFramebuffer),M.framebufferTexture2D(M.FRAMEBUFFER,M.COLOR_ATTACHMENT0,M.TEXTURE_2D,u.texture.webGLTexture,0),C&&(P?M.clearColor(0,0,0,0):M.clearColor(0,0,0,1),M.clear(M.COLOR_BUFFER_BIT)),M.activeTexture(M.TEXTURE0),M.bindTexture(M.TEXTURE_2D,d.texture.webGLTexture),M.copyTexSubImage2D(M.TEXTURE_2D,0,0,0,p,g,x,y),M.bindFramebuffer(M.FRAMEBUFFER,null),M.bindTexture(M.TEXTURE_2D,null)},copyToGame:function(u){var d=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",1),this.renderer.popFramebuffer(),d.activeTexture(d.TEXTURE0),d.bindTexture(d.TEXTURE_2D,u.texture.webGLTexture),d.bufferData(d.ARRAY_BUFFER,this.vertexData,d.STATIC_DRAW),d.drawArrays(d.TRIANGLES,0,6)},drawFrame:function(u,d,p,g){p===void 0&&(p=!0),g===void 0&&(g=this.colorMatrix);var x=this.gl;this.setShader(this.colorMatrixShader),this.set1i("uMainSampler",0),this.set1fv("uColorMatrix",g.getData()),this.set1f("uAlpha",g.alpha),x.activeTexture(x.TEXTURE0),x.bindTexture(x.TEXTURE_2D,u.texture.webGLTexture),d?(x.viewport(0,0,d.width,d.height),x.bindFramebuffer(x.FRAMEBUFFER,d.framebuffer.webGLFramebuffer),x.framebufferTexture2D(x.FRAMEBUFFER,x.COLOR_ATTACHMENT0,x.TEXTURE_2D,d.texture.webGLTexture,0)):x.viewport(0,0,u.width,u.height),p?x.clearColor(0,0,0,0):x.clearColor(0,0,0,1),x.clear(x.COLOR_BUFFER_BIT),x.bufferData(x.ARRAY_BUFFER,this.vertexData,x.STATIC_DRAW),x.drawArrays(x.TRIANGLES,0,6),x.bindFramebuffer(x.FRAMEBUFFER,null),x.bindTexture(x.TEXTURE_2D,null)},blendFrames:function(u,d,p,g,x,y){g===void 0&&(g=1),x===void 0&&(x=!0),y===void 0&&(y=this.linearShader);var C=this.gl;this.setShader(y),this.set1i("uMainSampler1",0),this.set1i("uMainSampler2",1),this.set1f("uStrength",g),C.activeTexture(C.TEXTURE0),C.bindTexture(C.TEXTURE_2D,u.texture.webGLTexture),C.activeTexture(C.TEXTURE1),C.bindTexture(C.TEXTURE_2D,d.texture.webGLTexture),p?(C.bindFramebuffer(C.FRAMEBUFFER,p.framebuffer.webGLFramebuffer),C.framebufferTexture2D(C.FRAMEBUFFER,C.COLOR_ATTACHMENT0,C.TEXTURE_2D,p.texture.webGLTexture,0),C.viewport(0,0,p.width,p.height)):C.viewport(0,0,u.width,u.height),x?C.clearColor(0,0,0,0):C.clearColor(0,0,0,1),C.clear(C.COLOR_BUFFER_BIT),C.bufferData(C.ARRAY_BUFFER,this.vertexData,C.STATIC_DRAW),C.drawArrays(C.TRIANGLES,0,6),C.bindFramebuffer(C.FRAMEBUFFER,null),C.bindTexture(C.TEXTURE_2D,null)},blendFramesAdditive:function(u,d,p,g,x){this.blendFrames(u,d,p,g,x,this.addShader)},clearFrame:function(u,d){d===void 0&&(d=!0);var p=this.gl;p.viewport(0,0,u.width,u.height),p.bindFramebuffer(p.FRAMEBUFFER,u.framebuffer.webGLFramebuffer),d?p.clearColor(0,0,0,0):p.clearColor(0,0,0,1),p.clear(p.COLOR_BUFFER_BIT);var g=this.renderer.currentFramebuffer;p.bindFramebuffer(p.FRAMEBUFFER,g.webGLFramebuffer)},setUVs:function(u,d,p,g,x,y,C,P){var M=this.vertexViewF32;M[2]=u,M[3]=d,M[6]=p,M[7]=g,M[10]=x,M[11]=y,M[14]=u,M[15]=d,M[18]=x,M[19]=y,M[22]=C,M[23]=P},setTargetUVs:function(u,d){var p=d.height/u.height;p>.5?p=.5-(p-.5):p=.5+(.5-p),this.setUVs(0,p,0,1+p,1,1+p,1,p)},flipX:function(){this.setUVs(1,0,1,1,0,1,0,0)},flipY:function(){this.setUVs(0,1,0,0,1,0,1,1)},resetUVs:function(){this.setUVs(0,0,0,1,1,1,1,0)}});c.exports=f},36060:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={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"};c.exports=m},84817:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="pipelineafterflush"},36712:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="pipelinebeforeflush"},40285:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="pipelinebind"},65918:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="pipelineboot"},92852:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="pipelinedestroy"},56072:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="pipelinerebind"},57566:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="pipelineresize"},77085:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={AFTER_FLUSH:t(84817),BEFORE_FLUSH:t(36712),BIND:t(40285),BOOT:t(65918),DESTROY:t(92852),REBIND:t(56072),RESIZE:t(57566)}},54812:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(99155),o=t(84057),r=new a({Extends:o,initialize:function(e){o.call(this,{game:e,fragShader:v}),this.amount=1},onPreRender:function(n,e){n=this.getController(n),this.set1f("amount",n.amount,e)}});c.exports=r},67329:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(24400),o=t(84057),r=new a({Extends:o,initialize:function(e){o.call(this,{game:e,fragShader:v}),this.steps=4,this.offsetX=1,this.offsetY=1,this.blurStrength=1,this.strength=1,this.glcolor=[1,1,1]},onPreRender:function(n){n=this.getController(n),this.set1f("strength",n.blurStrength),this.set3fv("color",n.glcolor)},onDraw:function(n){var e=this.getController(),i=this.fullFrame1,h=this.fullFrame2;this.copyFrame(n,h);for(var s=2/n.width*e.offsetX,l=2/n.height*e.offsetY,f=0;f{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(41514),o=t(51078),r=t(94328),n=t(84057),e=new a({Extends:n,initialize:function(h){n.call(this,{game:h,shaders:[{name:"Gaussian5",fragShader:v},{name:"Gaussian9",fragShader:o},{name:"Gaussian13",fragShader:r}]}),this.activeShader=this.shaders[0],this.x=2,this.y=2,this.steps=4,this.strength=1,this.glcolor=[1,1,1]},setQualityLow:function(){return this.activeShader=this.shaders[0],this},setQualityMedium:function(){return this.activeShader=this.shaders[1],this},setQualityHigh:function(){return this.activeShader=this.shaders[2],this},onDraw:function(i){var h=this.getController(),s=this.gl,l=this.fullFrame1,f=s.getParameter(s.FRAMEBUFFER_BINDING);this.bind(this.shaders[h.quality]),s.activeTexture(s.TEXTURE0),s.viewport(0,0,i.width,i.height),this.set1i("uMainSampler",0),this.set2f("resolution",i.width,i.height),this.set1f("strength",h.strength),this.set3fv("color",h.glcolor);for(var u=0;u{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(90610),o=t(84057),r=new a({Extends:o,initialize:function(e){o.call(this,{game:e,fragShader:v}),this.isTiltShift=!1,this.strength=1,this.blurX=1,this.blurY=1,this.radius=.5,this.amount=1,this.contrast=.2},onPreRender:function(n,e,i,h){n=this.getController(n),this.set1f("radius",n.radius,e),this.set1f("amount",n.amount,e),this.set1f("contrast",n.contrast,e),this.set1f("strength",n.strength,e),this.set2f("blur",n.blurX,n.blurY,e),this.setBoolean("isTiltShift",n.isTiltShift,e),i&&h&&this.set2f("resolution",i,h,e)},onDraw:function(n){this.set2f("resolution",n.width,n.height),this.bindAndDraw(n)}});c.exports=r},89428:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(91899),o=t(84057),r=new a({Extends:o,initialize:function(e){o.call(this,{game:e,fragShader:v}),this.scale=1,this.feather=.005,this.thickness=8,this.glcolor=[1,.2,.7],this.glcolor2=[1,0,0,.4]},onPreRender:function(n,e,i,h){n=this.getController(n),this.set1f("scale",n.scale,e),this.set1f("feather",n.feather,e),this.set1f("thickness",n.thickness,e),this.set3fv("color",n.glcolor,e),this.set4fv("backgroundColor",n.glcolor2,e),i&&h&&this.set2f("resolution",i,h,e)},onDraw:function(n){this.set2f("resolution",n.width,n.height),this.bindAndDraw(n)}});c.exports=r},88904:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(84057),o=new a({Extends:v,initialize:function(n){v.call(this,{game:n})},onDraw:function(r){var n=this.fullFrame1;this.controller?this.manager.drawFrame(r,n,!0,this.controller):this.drawFrame(r,n),this.copyToGame(n)}});c.exports=o},63563:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(47838),o=t(84057),r=new a({Extends:o,initialize:function(e){o.call(this,{game:e,fragShader:v}),this.x=.005,this.y=.005,this.glTexture},onBoot:function(){this.setTexture("__WHITE")},setTexture:function(n){var e=this.game.textures.getFrame(n);e&&(this.glTexture=e.glTexture)},onDraw:function(n){var e=this.getController(),i=this.fullFrame1;this.bind(),this.set1i("uMainSampler",0),this.set1i("uDisplacementSampler",1),this.set2f("amount",e.x,e.y),this.bindTexture(e.glTexture,1),this.copySprite(n,i),this.copyToGame(i)}});c.exports=r},94045:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(95540),o=t(98656),r=t(84057),n=t(70554),e=new a({Extends:r,initialize:function(h,s){var l=v(s,"quality",.1),f=v(s,"distance",10);r.call(this,{game:h,fragShader:n.setGlowQuality(o,h,l,f)}),this.outerStrength=4,this.innerStrength=0,this.knockout=!1,this.glcolor=[1,1,1,1]},onPreRender:function(i,h,s,l){i=this.getController(i),this.set1f("outerStrength",i.outerStrength,h),this.set1f("innerStrength",i.innerStrength,h),this.set4fv("glowColor",i.glcolor,h),this.setBoolean("knockout",i.knockout,h),s&&l&&this.set2f("resolution",s,l,h)},onDraw:function(i){this.set2f("resolution",i.width,i.height),this.bindAndDraw(i)}});c.exports=e},74088:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(70463),o=t(84057),r=new a({Extends:o,initialize:function(e){o.call(this,{game:e,fragShader:v}),this.alpha=.2,this.size=0,this.fromX=0,this.fromY=0,this.toX=0,this.toY=1,this.glcolor1=[255,0,0],this.glcolor2=[0,255,0]},onPreRender:function(n,e){n=this.getController(n),this.set1f("alpha",n.alpha,e),this.set1i("size",n.size,e),this.set3fv("color1",n.glcolor1,e),this.set3fv("color2",n.glcolor2,e),this.set2f("positionFrom",n.fromX,n.fromY,e),this.set2f("positionTo",n.toX,n.toY,e)}});c.exports=r},99636:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(50831),o=t(84057),r=new a({Extends:o,initialize:function(e){o.call(this,{game:e,fragShader:v}),this.amount=1},onPreRender:function(n,e,i,h){n=this.getController(n),this.set1f("amount",n.amount,e),i&&h&&this.set2f("resolution",i,h,e)},onDraw:function(n){this.set2f("resolution",n.width,n.height),this.bindAndDraw(n)}});c.exports=r},34700:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(92595),o=t(84057),r=new a({Extends:o,initialize:function(e){o.call(this,{game:e,fragShader:v}),this.x=0,this.y=0,this.decay=.1,this.power=1,this.glcolor=[0,0,0,1],this.samples=6,this.intensity=1},onPreRender:function(n,e){n=this.getController(n);var i=n.samples;this.set1i("samples",i,e),this.set1f("intensity",n.intensity,e),this.set1f("decay",n.decay,e),this.set1f("power",n.power/i,e),this.set2f("lightPosition",n.x,n.y,e),this.set4fv("color",n.glcolor,e)}});c.exports=r},91157:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(72464),o=t(84057),r=new a({Extends:o,initialize:function(e){o.call(this,{game:e,fragShader:v}),this.speed=.5,this.lineWidth=.5,this.gradient=3,this.reveal=!1},onPreRender:function(n,e,i,h){n=this.getController(n),this.setTime("time",e),this.set1f("speed",n.speed,e),this.set1f("lineWidth",n.lineWidth,e),this.set1f("gradient",n.gradient,e),this.setBoolean("reveal",n.reveal,e),i&&h&&this.set2f("resolution",i,h,e)},onDraw:function(n){this.set2f("resolution",n.width,n.height),this.bindAndDraw(n)}});c.exports=r},27797:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(39249),o=t(84057),r=new a({Extends:o,initialize:function(e){o.call(this,{game:e,fragShader:v}),this.x=.5,this.y=.5,this.radius=.5,this.strength=.5},onPreRender:function(n,e){n=this.getController(n),this.set1f("radius",n.radius,e),this.set1f("strength",n.strength,e),this.set2f("position",n.x,n.y,e)}});c.exports=r},67603:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(2878),o=t(84057),r=new a({Extends:o,initialize:function(e){o.call(this,{game:e,fragShader:v}),this.progress=0,this.wipeWidth=.1,this.direction=0,this.axis=0,this.reveal=!1},onPreRender:function(n,e){n=this.getController(n);var i=n.progress,h=n.wipeWidth,s=n.direction,l=n.axis;this.set4f("config",i,h,s,l,e),this.setBoolean("reveal",n.reveal,e)}});c.exports=r},58918:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a={Barrel:t(54812),Bloom:t(67329),Blur:t(8861),Bokeh:t(51051),Circle:t(89428),ColorMatrix:t(88904),Displacement:t(63563),Glow:t(94045),Gradient:t(74088),Pixelate:t(99636),Shadow:t(34700),Shine:t(91157),Vignette:t(27797),Wipe:t(67603)};c.exports=a},96615:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(36060),v=t(79291),o={FX:t(58918),BitmapMaskPipeline:t(31302),Events:t(77085),FXPipeline:t(92651),LightPipeline:t(96569),MobilePipeline:t(56527),MultiPipeline:t(57516),PointLightPipeline:t(43439),PostFXPipeline:t(84057),PreFXPipeline:t(43558),RopePipeline:t(81041),SinglePipeline:t(12385),UtilityPipeline:t(7589)};o=v(!1,o,a),c.exports=o},35407:c=>{c.exports=["#define SHADER_NAME PHASER_ADD_BLEND_FS","precision mediump float;","uniform sampler2D uMainSampler1;","uniform sampler2D uMainSampler2;","uniform float uStrength;","varying vec2 outTexCoord;","void main ()","{"," vec4 frame1 = texture2D(uMainSampler1, outTexCoord);"," vec4 frame2 = texture2D(uMainSampler2, outTexCoord);"," gl_FragColor = frame1 + frame2 * uStrength;","}"].join(` -`)},78908:c=>{c.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_FS","precision mediump float;","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uMaskSampler;","uniform bool uInvertMaskAlpha;","void main ()","{"," vec2 uv = gl_FragCoord.xy / uResolution;"," vec4 mainColor = texture2D(uMainSampler, uv);"," vec4 maskColor = texture2D(uMaskSampler, uv);"," if (!uInvertMaskAlpha)"," {"," mainColor *= maskColor.a;"," }"," else"," {"," mainColor *= (1.0 - maskColor.a);"," }"," gl_FragColor = mainColor;","}"].join(` -`)},85191:c=>{c.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_VS","precision mediump float;","attribute vec2 inPosition;","void main ()","{"," gl_Position = vec4(inPosition, 0.0, 1.0);","}"].join(` -`)},96293:c=>{c.exports=["#define SHADER_NAME PHASER_COLORMATRIX_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform float uColorMatrix[20];","uniform float uAlpha;","varying vec2 outTexCoord;","void main ()","{"," vec4 c = texture2D(uMainSampler, outTexCoord);"," if (uAlpha == 0.0)"," {"," gl_FragColor = c;"," return;"," }"," if (c.a > 0.0)"," {"," c.rgb /= c.a;"," }"," vec4 result;"," result.r = (uColorMatrix[0] * c.r) + (uColorMatrix[1] * c.g) + (uColorMatrix[2] * c.b) + (uColorMatrix[3] * c.a) + uColorMatrix[4];"," result.g = (uColorMatrix[5] * c.r) + (uColorMatrix[6] * c.g) + (uColorMatrix[7] * c.b) + (uColorMatrix[8] * c.a) + uColorMatrix[9];"," result.b = (uColorMatrix[10] * c.r) + (uColorMatrix[11] * c.g) + (uColorMatrix[12] * c.b) + (uColorMatrix[13] * c.a) + uColorMatrix[14];"," result.a = (uColorMatrix[15] * c.r) + (uColorMatrix[16] * c.g) + (uColorMatrix[17] * c.b) + (uColorMatrix[18] * c.a) + uColorMatrix[19];"," vec3 rgb = mix(c.rgb, result.rgb, uAlpha);"," rgb *= result.a;"," gl_FragColor = vec4(rgb, result.a);","}"].join(` -`)},36682:c=>{c.exports=["#define SHADER_NAME PHASER_COPY_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform float uBrightness;","varying vec2 outTexCoord;","void main ()","{"," gl_FragColor = texture2D(uMainSampler, outTexCoord) * uBrightness;","}"].join(` -`)},99155:c=>{c.exports=["#define SHADER_NAME BARREL_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform float amount;","varying vec2 outTexCoord;","vec2 Distort(vec2 p)","{"," float theta = atan(p.y, p.x);"," float radius = length(p);"," radius = pow(radius, amount);"," p.x = radius * cos(theta);"," p.y = radius * sin(theta);"," return 0.5 * (p + 1.0);","}","void main()","{"," vec2 xy = 2.0 * outTexCoord - 1.0;"," vec2 texCoord = outTexCoord;"," if (length(xy) < 1.0)"," {"," texCoord = Distort(xy);"," }"," gl_FragColor = texture2D(uMainSampler, texCoord);","}"].join(` -`)},24400:c=>{c.exports=["#define SHADER_NAME BLOOM_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","void main ()","{"," vec4 sum = texture2D(uMainSampler, outTexCoord) * 0.204164 * strength;"," sum = sum + texture2D(uMainSampler, outTexCoord + offset * 1.407333) * 0.304005;"," sum = sum + texture2D(uMainSampler, outTexCoord - offset * 1.407333) * 0.304005;"," sum = sum + texture2D(uMainSampler, outTexCoord + offset * 3.294215) * 0.093913;"," gl_FragColor = (sum + texture2D(uMainSampler, outTexCoord - offset * 3.294215) * 0.093913) * vec4(color, 1);","}"].join(` -`)},94328:c=>{c.exports=["#define SHADER_NAME BLUR_HIGH_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = outTexCoord;"," vec4 col = vec4(0.0);"," vec2 off1 = vec2(1.411764705882353) * offset * strength;"," vec2 off2 = vec2(3.2941176470588234) * offset * strength;"," vec2 off3 = vec2(5.176470588235294) * offset * strength;"," col += texture2D(uMainSampler, uv) * 0.1964825501511404;"," col += texture2D(uMainSampler, uv + (off1 / resolution)) * 0.2969069646728344;"," col += texture2D(uMainSampler, uv - (off1 / resolution)) * 0.2969069646728344;"," col += texture2D(uMainSampler, uv + (off2 / resolution)) * 0.09447039785044732;"," col += texture2D(uMainSampler, uv - (off2 / resolution)) * 0.09447039785044732;"," col += texture2D(uMainSampler, uv + (off3 / resolution)) * 0.010381362401148057;"," col += texture2D(uMainSampler, uv - (off3 / resolution)) * 0.010381362401148057;"," gl_FragColor = col * vec4(color, 1.0);","}"].join(` -`)},41514:c=>{c.exports=["#define SHADER_NAME BLUR_LOW_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = outTexCoord;"," vec4 col = vec4(0.0);"," vec2 offset = vec2(1.333) * offset * strength;"," col += texture2D(uMainSampler, uv) * 0.29411764705882354;"," col += texture2D(uMainSampler, uv + (offset / resolution)) * 0.35294117647058826;"," col += texture2D(uMainSampler, uv - (offset / resolution)) * 0.35294117647058826;"," gl_FragColor = col * vec4(color, 1.0);","}"].join(` -`)},51078:c=>{c.exports=["#define SHADER_NAME BLUR_MED_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = outTexCoord;"," vec4 col = vec4(0.0);"," vec2 off1 = vec2(1.3846153846) * offset * strength;"," vec2 off2 = vec2(3.2307692308) * offset * strength;"," col += texture2D(uMainSampler, uv) * 0.2270270270;"," col += texture2D(uMainSampler, uv + (off1 / resolution)) * 0.3162162162;"," col += texture2D(uMainSampler, uv - (off1 / resolution)) * 0.3162162162;"," col += texture2D(uMainSampler, uv + (off2 / resolution)) * 0.0702702703;"," col += texture2D(uMainSampler, uv - (off2 / resolution)) * 0.0702702703;"," gl_FragColor = col * vec4(color, 1.0);","}"].join(` -`)},90610:c=>{c.exports=["#define SHADER_NAME BOKEH_FS","precision mediump float;","#define ITERATIONS 100.0","#define ONEOVER_ITR 1.0 / ITERATIONS","#define PI 3.141596","#define GOLDEN_ANGLE 2.39996323","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform float radius;","uniform float amount;","uniform float contrast;","uniform bool isTiltShift;","uniform float strength;","uniform vec2 blur;","varying vec2 outTexCoord;","vec2 Sample (in float theta, inout float r)","{"," r += 1.0 / r;"," return (r - 1.0) * vec2(cos(theta), sin(theta)) * 0.06;","}","vec3 Bokeh (sampler2D tex, vec2 uv, float radius)","{"," vec3 acc = vec3(0.0);"," vec3 div = vec3(0.0);"," vec2 pixel = vec2(resolution.y / resolution.x, 1.0) * radius * .025;"," float r = 1.0;"," for (float j = 0.0; j < GOLDEN_ANGLE * ITERATIONS; j += GOLDEN_ANGLE)"," {"," vec3 col = texture2D(tex, uv + pixel * Sample(j, r)).xyz;"," col = contrast > 0.0 ? col * col * (1.0 + contrast) : col;"," vec3 bokeh = vec3(0.5) + pow(col, vec3(10.0)) * amount;"," acc += col * bokeh;"," div += bokeh;"," }"," return acc / div;","}","void main ()","{"," float shift = 1.0;"," if (isTiltShift)"," {"," vec2 uv = vec2(gl_FragCoord.xy / resolution + vec2(-0.5, -0.5)) * 2.0;"," float centerStrength = 1.0;"," shift = length(uv * blur * strength) * centerStrength;"," }"," gl_FragColor = vec4(Bokeh(uMainSampler, outTexCoord * vec2(1.0, 1.0), radius * shift), 0.0);","}"].join(` -`)},91899:c=>{c.exports=["#define SHADER_NAME CIRCLE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec3 color;","uniform vec4 backgroundColor;","uniform float thickness;","uniform float scale;","uniform float feather;","varying vec2 outTexCoord;","void main ()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec2 position = (gl_FragCoord.xy / resolution.xy) * 2.0 - 1.0;"," float aspectRatio = resolution.x / resolution.y;"," position.x *= aspectRatio;"," float grad = length(position);"," float outer = aspectRatio;"," float inner = outer - (thickness * 2.0 / resolution.y);"," if (aspectRatio >= 1.0)"," {"," float f = 2.0 + (resolution.y / resolution.x);"," outer = 1.0;"," inner = 1.0 - (thickness * f / resolution.x);"," }"," outer *= scale;"," inner *= scale;"," float circle = smoothstep(outer, outer - 0.01, grad);"," float ring = circle - smoothstep(inner, inner - feather, grad);"," texture = mix(backgroundColor * backgroundColor.a, texture, texture.a);"," texture = (texture * (circle - ring));"," gl_FragColor = vec4(texture.rgb + (ring * color), texture.a);","}"].join(` -`)},47838:c=>{c.exports=["#define SHADER_NAME DISPLACEMENT_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform sampler2D uDisplacementSampler;","uniform vec2 amount;","varying vec2 outTexCoord;","void main ()","{"," vec2 disp = (-vec2(0.5, 0.5) + texture2D(uDisplacementSampler, outTexCoord).rr) * amount;"," gl_FragColor = texture2D(uMainSampler, outTexCoord + disp).rgba;","}"].join(` -`)},98656:c=>{c.exports=["#define SHADER_NAME GLOW_FS","precision mediump float;","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","uniform float outerStrength;","uniform float innerStrength;","uniform vec2 resolution;","uniform vec4 glowColor;","uniform bool knockout;","const float PI = 3.14159265358979323846264;","const float DIST = __DIST__;","const float SIZE = min(__SIZE__, PI * 2.0);","const float STEP = ceil(PI * 2.0 / SIZE);","const float MAX_ALPHA = STEP * DIST * (DIST + 1.0) / 2.0;","void main ()","{"," vec2 px = vec2(1.0 / resolution.x, 1.0 / resolution.y);"," float totalAlpha = 0.0;"," vec2 direction;"," vec2 displaced;"," vec4 color;"," for (float angle = 0.0; angle < PI * 2.0; angle += SIZE)"," {"," direction = vec2(cos(angle), sin(angle)) * px;"," for (float curDistance = 0.0; curDistance < DIST; curDistance++)"," {"," displaced = outTexCoord + direction * (curDistance + 1.0);"," color = texture2D(uMainSampler, displaced);"," totalAlpha += (DIST - curDistance) * color.a;"," }"," }"," color = texture2D(uMainSampler, outTexCoord);"," float alphaRatio = (totalAlpha / MAX_ALPHA);"," float innerGlowAlpha = (1.0 - alphaRatio) * innerStrength * color.a;"," float innerGlowStrength = min(1.0, innerGlowAlpha);"," vec4 innerColor = mix(color, glowColor, innerGlowStrength);"," float outerGlowAlpha = alphaRatio * outerStrength * (1.0 - color.a);"," float outerGlowStrength = min(1.0 - innerColor.a, outerGlowAlpha);"," vec4 outerGlowColor = outerGlowStrength * glowColor.rgba;"," if (knockout)"," {"," float resultAlpha = outerGlowAlpha + innerGlowAlpha;"," gl_FragColor = vec4(glowColor.rgb * resultAlpha, resultAlpha);"," }"," else"," {"," gl_FragColor = innerColor + outerGlowColor;"," }","}"].join(` -`)},70463:c=>{c.exports=["#define SHADER_NAME GRADIENT_FS","#define SRGB_TO_LINEAR(c) pow((c), vec3(2.2))","#define LINEAR_TO_SRGB(c) pow((c), vec3(1.0 / 2.2))","#define SRGB(r, g, b) SRGB_TO_LINEAR(vec3(float(r), float(g), float(b)) / 255.0)","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 positionFrom;","uniform vec2 positionTo;","uniform vec3 color1;","uniform vec3 color2;","uniform float alpha;","uniform int size;","varying vec2 outTexCoord;","float gradientNoise(in vec2 uv)","{"," const vec3 magic = vec3(0.06711056, 0.00583715, 52.9829189);"," return fract(magic.z * fract(dot(uv, magic.xy)));","}","float stepped (in float s, in float scale, in int steps)","{"," return steps > 0 ? floor( s / ((1.0 * scale) / float(steps))) * 1.0 / float(steps - 1) : s;","}","void main ()","{"," vec2 a = positionFrom;"," vec2 b = positionTo;"," vec2 ba = b - a;"," float d = dot(outTexCoord - a, ba) / dot(ba, ba);"," float t = size > 0 ? stepped(d, 1.0, size) : d;"," t = smoothstep(0.0, 1.0, clamp(t, 0.0, 1.0));"," vec3 color = mix(SRGB(color1.r, color1.g, color1.b), SRGB(color2.r, color2.g, color2.b), t);"," color = LINEAR_TO_SRGB(color);"," color += (1.0 / 255.0) * gradientNoise(outTexCoord) - (0.5 / 255.0);"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," gl_FragColor = vec4(mix(color.rgb, texture.rgb, alpha), 1.0) * texture.a;","}"].join(` -`)},50831:c=>{c.exports=["#define SHADER_NAME PIXELATE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform float amount;","varying vec2 outTexCoord;","void main ()","{"," float pixelSize = floor(2.0 + amount);"," vec2 center = pixelSize * floor(outTexCoord * resolution / pixelSize) + pixelSize * vec2(0.5, 0.5);"," vec2 corner1 = center + pixelSize * vec2(-0.5, -0.5);"," vec2 corner2 = center + pixelSize * vec2(+0.5, -0.5);"," vec2 corner3 = center + pixelSize * vec2(+0.5, +0.5);"," vec2 corner4 = center + pixelSize * vec2(-0.5, +0.5);"," vec4 pixel = 0.4 * texture2D(uMainSampler, center / resolution);"," pixel += 0.15 * texture2D(uMainSampler, corner1 / resolution);"," pixel += 0.15 * texture2D(uMainSampler, corner2 / resolution);"," pixel += 0.15 * texture2D(uMainSampler, corner3 / resolution);"," pixel += 0.15 * texture2D(uMainSampler, corner4 / resolution);"," gl_FragColor = pixel;","}"].join(` -`)},92595:c=>{c.exports=["#define SHADER_NAME SHADOW_FS","precision mediump float;","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","uniform vec2 lightPosition;","uniform vec4 color;","uniform float decay;","uniform float power;","uniform float intensity;","uniform int samples;","const int MAX = 12;","void main ()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec2 pc = (lightPosition - outTexCoord) * intensity;"," float shadow = 0.0;"," float limit = max(float(MAX), float(samples));"," for (int i = 0; i < MAX; ++i)"," {"," if (i >= samples)"," {"," break;"," }"," shadow += texture2D(uMainSampler, outTexCoord + float(i) * decay / limit * pc).a * power;"," }"," float mask = 1.0 - texture.a;"," gl_FragColor = mix(texture, color, shadow * mask);","}"].join(` -`)},72464:c=>{c.exports=["#define SHADER_NAME SHINE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform bool reveal;","uniform float speed;","uniform float time;","uniform float lineWidth;","uniform float gradient;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = gl_FragCoord.xy / resolution.xy;"," vec4 tex = texture2D(uMainSampler, outTexCoord);"," vec4 col1 = vec4(0.3, 0.0, 0.0, 1.0);"," vec4 col2 = vec4(0.85, 0.85, 0.85, 1.0);"," uv.x = uv.x - mod(time * speed, 2.0) + 0.5;"," float y = uv.x * gradient;"," float s = smoothstep(y - lineWidth, y, uv.y) - smoothstep(y, y + lineWidth, uv.y);"," gl_FragColor = (((s * col1) + (s * col2)) * tex);"," if (!reveal)"," {"," gl_FragColor += tex;"," }","}"].join(` -`)},39249:c=>{c.exports=["#define SHADER_NAME VIGNETTE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform float radius;","uniform float strength;","uniform vec2 position;","varying vec2 outTexCoord;","void main ()","{"," vec4 col = vec4(1.0);"," float d = length(outTexCoord - position);"," if (d <= radius)"," {"," float g = d / radius;"," g = sin(g * 3.14 * strength);"," col = vec4(g * g * g);"," }"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," gl_FragColor = texture * (1.0 - col);","}"].join(` -`)},2878:c=>{c.exports=["#define SHADER_NAME WIPE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec4 config;","uniform bool reveal;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = outTexCoord;"," vec4 color0;"," vec4 color1;"," if (reveal)"," {"," color0 = vec4(0);"," color1 = texture2D(uMainSampler, uv);"," }"," else"," {"," color0 = texture2D(uMainSampler, uv);"," color1 = vec4(0);"," }"," float distance = config.x;"," float width = config.y;"," float direction = config.z;"," float axis = uv.x;"," if (config.w == 1.0)"," {"," axis = uv.y;"," }"," float adjust = mix(width, -width, distance);"," float value = smoothstep(distance - width, distance + width, abs(direction - axis) + adjust);"," gl_FragColor = mix(color1, color0, value);","}"].join(` -`)},31063:c=>{c.exports=["#define SHADER_NAME PHASER_LIGHT_FS","precision mediump float;","struct Light","{"," vec2 position;"," vec3 color;"," float intensity;"," float radius;","};","const int kMaxLights = %LIGHT_COUNT%;","uniform vec4 uCamera; /* x, y, rotation, zoom */","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uNormSampler;","uniform vec3 uAmbientLightColor;","uniform Light uLights[kMaxLights];","uniform mat3 uInverseRotationMatrix;","uniform int uLightCount;","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," vec3 finalColor = vec3(0.0, 0.0, 0.0);"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 color = texture * texel;"," if (outTintEffect == 1.0)"," {"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," color = texel;"," }"," vec3 normalMap = texture2D(uNormSampler, outTexCoord).rgb;"," vec3 normal = normalize(uInverseRotationMatrix * vec3(normalMap * 2.0 - 1.0));"," vec2 res = vec2(min(uResolution.x, uResolution.y)) * uCamera.w;"," for (int index = 0; index < kMaxLights; ++index)"," {"," if (index < uLightCount)"," {"," Light light = uLights[index];"," vec3 lightDir = vec3((light.position.xy / res) - (gl_FragCoord.xy / res), 0.1);"," vec3 lightNormal = normalize(lightDir);"," float distToSurf = length(lightDir) * uCamera.w;"," float diffuseFactor = max(dot(normal, lightNormal), 0.0);"," float radius = (light.radius / res.x * uCamera.w) * uCamera.w;"," float attenuation = clamp(1.0 - distToSurf * distToSurf / (radius * radius), 0.0, 1.0);"," vec3 diffuse = light.color * diffuseFactor;"," finalColor += (attenuation * diffuse) * light.intensity;"," }"," }"," vec4 colorOutput = vec4(uAmbientLightColor + finalColor, 1.0);"," gl_FragColor = color * vec4(colorOutput.rgb * colorOutput.a, colorOutput.a);","}"].join(` -`)},48247:c=>{c.exports=["#define SHADER_NAME PHASER_LINEAR_BLEND_FS","precision mediump float;","uniform sampler2D uMainSampler1;","uniform sampler2D uMainSampler2;","uniform float uStrength;","varying vec2 outTexCoord;","void main ()","{"," vec4 frame1 = texture2D(uMainSampler1, outTexCoord);"," vec4 frame2 = texture2D(uMainSampler2, outTexCoord);"," gl_FragColor = mix(frame1, frame2 * uStrength, 0.5);","}"].join(` -`)},41214:c=>{c.exports=["#define SHADER_NAME PHASER_MESH_FS","precision mediump float;","uniform vec3 uLightPosition;","uniform vec3 uLightAmbient;","uniform vec3 uLightDiffuse;","uniform vec3 uLightSpecular;","uniform vec3 uFogColor;","uniform float uFogNear;","uniform float uFogFar;","uniform vec3 uMaterialAmbient;","uniform vec3 uMaterialDiffuse;","uniform vec3 uMaterialSpecular;","uniform float uMaterialShine;","uniform vec3 uCameraPosition;","uniform sampler2D uTexture;","varying vec2 vTextureCoord;","varying vec3 vNormal;","varying vec3 vPosition;","void main (void)","{"," vec4 color = texture2D(uTexture, vTextureCoord);"," vec3 ambient = uLightAmbient * uMaterialAmbient;"," vec3 norm = normalize(vNormal);"," vec3 lightDir = normalize(uLightPosition - vPosition);"," float diff = max(dot(norm, lightDir), 0.0);"," vec3 diffuse = uLightDiffuse * (diff * uMaterialDiffuse);"," vec3 viewDir = normalize(uCameraPosition - vPosition);"," vec3 reflectDir = reflect(-lightDir, norm);"," float spec = pow(max(dot(viewDir, reflectDir), 0.0), uMaterialShine);"," vec3 specular = uLightSpecular * (spec * uMaterialSpecular);"," vec3 result = (ambient + diffuse + specular) * color.rgb;"," float depth = gl_FragCoord.z / gl_FragCoord.w;"," float fogFactor = smoothstep(uFogNear, uFogFar, depth);"," gl_FragColor.rgb = mix(result.rgb, uFogColor, fogFactor);"," gl_FragColor.a = color.a;","}"].join(` -`)},39653:c=>{c.exports=["#define SHADER_NAME PHASER_MESH_VS","precision mediump float;","attribute vec3 aVertexPosition;","attribute vec3 aVertexNormal;","attribute vec2 aTextureCoord;","uniform mat4 uViewProjectionMatrix;","uniform mat4 uModelMatrix;","uniform mat4 uNormalMatrix;","varying vec2 vTextureCoord;","varying vec3 vNormal;","varying vec3 vPosition;","void main ()","{"," vTextureCoord = aTextureCoord;"," vPosition = vec3(uModelMatrix * vec4(aVertexPosition, 1.0));"," vNormal = vec3(uNormalMatrix * vec4(aVertexNormal, 1.0));"," gl_Position = uViewProjectionMatrix * uModelMatrix * vec4(aVertexPosition, 1.0);","}"].join(` -`)},62143:c=>{c.exports=["#define SHADER_NAME PHASER_MOBILE_FS","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 color = texture * texel;"," if (outTintEffect == 1.0)"," {"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," color = texel;"," }"," gl_FragColor = color;","}"].join(` -`)},47940:c=>{c.exports=["#define SHADER_NAME PHASER_MOBILE_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(` -`)},98840:c=>{c.exports=["#define SHADER_NAME PHASER_MULTI_FS","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","uniform sampler2D uMainSampler[%count%];","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," vec4 texture;"," %forloop%"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);"," vec4 color = texture * texel;"," if (outTintEffect == 1.0)"," {"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," color = texel;"," }"," gl_FragColor = color;","}"].join(` -`)},44667:c=>{c.exports=["#define SHADER_NAME PHASER_MULTI_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 outTexId;","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;"," outTexId = inTexId;"," outTint = inTint;"," outTintEffect = inTintEffect;","}"].join(` -`)},4127:c=>{c.exports=["#define SHADER_NAME PHASER_POINTLIGHT_FS","precision mediump float;","uniform vec2 uResolution;","uniform float uCameraZoom;","varying vec4 lightPosition;","varying vec4 lightColor;","varying float lightRadius;","varying float lightAttenuation;","void main ()","{"," vec2 center = (lightPosition.xy + 1.0) * (uResolution.xy * 0.5);"," float distToSurf = length(center - gl_FragCoord.xy);"," float radius = 1.0 - distToSurf / (lightRadius * uCameraZoom);"," float intensity = smoothstep(0.0, 1.0, radius * lightAttenuation);"," vec4 color = vec4(intensity, intensity, intensity, 0.0) * lightColor;"," gl_FragColor = vec4(color.rgb * lightColor.a, color.a);","}"].join(` -`)},89924:c=>{c.exports=["#define SHADER_NAME PHASER_POINTLIGHT_VS","precision mediump float;","uniform mat4 uProjectionMatrix;","attribute vec2 inPosition;","attribute vec2 inLightPosition;","attribute vec4 inLightColor;","attribute float inLightRadius;","attribute float inLightAttenuation;","varying vec4 lightPosition;","varying vec4 lightColor;","varying float lightRadius;","varying float lightAttenuation;","void main ()","{"," lightColor = inLightColor;"," lightRadius = inLightRadius;"," lightAttenuation = inLightAttenuation;"," lightPosition = uProjectionMatrix * vec4(inLightPosition, 1.0, 1.0);"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);","}"].join(` -`)},27681:c=>{c.exports=["#define SHADER_NAME PHASER_POSTFX_FS","precision mediump float;","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","void main ()","{"," gl_FragColor = texture2D(uMainSampler, outTexCoord);","}"].join(` -`)},49627:c=>{c.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:c=>{c.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:c=>{c.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:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={AddBlendFrag:t(35407),BitmapMaskFrag:t(78908),BitmapMaskVert:t(85191),ColorMatrixFrag:t(96293),CopyFrag:t(36682),FXBarrelFrag:t(99155),FXBloomFrag:t(24400),FXBlurHighFrag:t(94328),FXBlurLowFrag:t(41514),FXBlurMedFrag:t(51078),FXBokehFrag:t(90610),FXCircleFrag:t(91899),FXDisplacementFrag:t(47838),FXGlowFrag:t(98656),FXGradientFrag:t(70463),FXPixelateFrag:t(50831),FXShadowFrag:t(92595),FXShineFrag:t(72464),FXVignetteFrag:t(39249),FXWipeFrag:t(2878),LightFrag:t(31063),LinearBlendFrag:t(48247),MeshFrag:t(41214),MeshVert:t(39653),MobileFrag:t(62143),MobileVert:t(47940),MultiFrag:t(98840),MultiVert:t(44667),PointLightFrag:t(4127),PointLightVert:t(89924),PostFXFrag:t(27681),QuadVert:t(49627),SingleFrag:t(45561),SingleVert:t(60722)}},93567:(c,m,t)=>{/** - * @author Benjamin D. Richards - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=new a({initialize:function(r,n,e){this.webGLAttribLocation=-1,this.gl=r,this.program=n,this.name=e,this.createResource()},createResource:function(){if(this.program.webGLProgram===null){this.webGLAttribLocation=-1;return}var o=this.gl;o.isContextLost()||(this.webGLAttribLocation=o.getAttribLocation(this.program.webGLProgram,this.name))},destroy:function(){this.gl=null,this.program=null,this.name=null,this.webGLAttribLocation=-1}});c.exports=v},26128:(c,m,t)=>{/** - * @author Benjamin D. Richards - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=new a({initialize:function(r,n,e,i){this.webGLBuffer=null,this.gl=r,this.initialDataOrSize=n,this.bufferType=e,this.bufferUsage=i,this.createResource()},createResource:function(){if(this.initialDataOrSize!==null){var o=this.gl;if(!o.isContextLost()){var r=this.bufferType,n=o.createBuffer();this.webGLBuffer=n,o.bindBuffer(r,this.webGLBuffer),o.bufferData(r,this.initialDataOrSize,this.bufferUsage),o.bindBuffer(r,null)}}},destroy:function(){var o=this.gl;o.isContextLost()||o.deleteBuffer(this.webGLBuffer),this.webGLBuffer=null,this.initialDataOrSize=null,this.gl=null}});c.exports=v},84387:(c,m,t)=>{/** - * @author Benjamin D. Richards - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v={36054:"Incomplete Attachment",36055:"Missing Attachment",36057:"Incomplete Dimensions",36061:"Framebuffer Unsupported"},o=new a({initialize:function(n,e,i,h,s){this.webGLFramebuffer=null,this.gl=n,this.width=e,this.height=i,this.renderTexture=h,this.addDepthStencilBuffer=!!s,this.createResource()},createResource:function(){var r=this.gl;if(!r.isContextLost()){var n=this.renderTexture,e=0,i=r.createFramebuffer();if(this.webGLFramebuffer=i,r.bindFramebuffer(r.FRAMEBUFFER,i),n.isRenderTexture=!0,n.isAlphaPremultiplied=!1,r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,n.webGLTexture,0),e=r.checkFramebufferStatus(r.FRAMEBUFFER),e!==r.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer status: "+(v[e]||e));if(this.addDepthStencilBuffer){var h=r.createRenderbuffer();r.bindRenderbuffer(r.RENDERBUFFER,h),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,this.width,this.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,h)}r.bindFramebuffer(r.FRAMEBUFFER,null)}},destroy:function(){if(this.webGLFramebuffer!==null){var r=this.gl;if(!r.isContextLost()){r.bindFramebuffer(r.FRAMEBUFFER,this.webGLFramebuffer);var n=r.getFramebufferAttachmentParameter(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME);n!==null&&(r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,null,0),r.deleteTexture(n));var e=r.getFramebufferAttachmentParameter(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME);e!==null&&r.deleteRenderbuffer(e),r.bindFramebuffer(r.FRAMEBUFFER,null),r.deleteFramebuffer(this.webGLFramebuffer)}this.renderTexture=null,this.webGLFramebuffer=null,this.gl=null}}});c.exports=o},1482:(c,m,t)=>{/** - * @author Benjamin D. Richards - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=new a({initialize:function(r,n,e){this.webGLProgram=null,this.gl=r,this.vertexSource=n,this.fragmentSource=e,this.createResource()},createResource:function(){var o=this.gl;if(!o.isContextLost()){var r=o.createProgram(),n=o.createShader(o.VERTEX_SHADER),e=o.createShader(o.FRAGMENT_SHADER);o.shaderSource(n,this.vertexSource),o.shaderSource(e,this.fragmentSource),o.compileShader(n),o.compileShader(e);var i=`Shader failed: -`;if(!o.getShaderParameter(n,o.COMPILE_STATUS))throw new Error("Vertex "+i+o.getShaderInfoLog(n));if(!o.getShaderParameter(e,o.COMPILE_STATUS))throw new Error("Fragment "+i+o.getShaderInfoLog(e));if(o.attachShader(r,n),o.attachShader(r,e),o.linkProgram(r),!o.getProgramParameter(r,o.LINK_STATUS))throw new Error("Link "+i+o.getProgramInfoLog(r));o.useProgram(r),this.webGLProgram=r}},destroy:function(){this.webGLProgram&&(this.gl.isContextLost()||this.gl.deleteProgram(this.webGLProgram),this.webGLProgram=null,this.gl=null)}});c.exports=v},82751:(c,m,t)=>{/** - * @author Benjamin D. Richards - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(50030),o=new a({initialize:function(n,e,i,h,s,l,f,u,d,p,g,x,y){this.webGLTexture=null,this.isRenderTexture=!1,this.gl=n,this.mipLevel=e,this.minFilter=i,this.magFilter=h,this.wrapT=s,this.wrapS=l,this.format=f,this.pixels=u,this.width=d,this.height=p,this.pma=g??!0,this.forceSize=!!x,this.flipY=!!y,this.__SPECTOR_Metadata={},this.createResource()},createResource:function(){var r=this.gl;if(!r.isContextLost()){if(this.pixels instanceof o){this.webGLTexture=this.pixels.webGLTexture;return}var n=r.createTexture();n.__SPECTOR_Metadata=this.__SPECTOR_Metadata,this.webGLTexture=n,this._processTexture()}},update:function(r,n,e,i,h,s,l,f,u){if(!(n===0||e===0)){this.pixels=r,this.width=n,this.height=e,this.flipY=i,this.wrapS=h,this.wrapT=s,this.minFilter=l,this.magFilter=f,this.format=u;var d=this.gl;d.isContextLost()||this._processTexture()}},_processTexture:function(){var r=this.gl;r.activeTexture(r.TEXTURE0);var n=r.getParameter(r.TEXTURE_BINDING_2D);r.bindTexture(r.TEXTURE_2D,this.webGLTexture),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,this.minFilter),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,this.magFilter),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,this.wrapS),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,this.wrapT),r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.pma),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,this.flipY);var e=this.pixels,i=this.mipLevel,h=this.width,s=this.height,l=this.format,f=!1;if(e==null)r.texImage2D(r.TEXTURE_2D,i,l,h,s,0,l,r.UNSIGNED_BYTE,null),f=v(h,s);else if(e.compressed){h=e.width,s=e.height,f=e.generateMipmap;for(var u=0;u{/** - * @author Benjamin D. Richards - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=new a({initialize:function(r,n,e){this.webGLUniformLocation=null,this.gl=r,this.program=n,this.name=e,this.createResource()},createResource:function(){if(this.program.webGLProgram===null){this.webGLUniformLocation=null;return}var o=this.gl;o.isContextLost()||(this.webGLUniformLocation=o.getUniformLocation(this.program.webGLProgram,this.name))},destroy:function(){this.gl=null,this.program=null,this.name=null,this.webGLUniformLocation=null}});c.exports=v},9503:(c,m,t)=>{/** - * @author Benjamin D. Richards - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a={WebGLAttribLocationWrapper:t(93567),WebGLBufferWrapper:t(26128),WebGLProgramWrapper:t(1482),WebGLTextureWrapper:t(82751),WebGLFramebufferWrapper:t(84387),WebGLUniformLocationWrapper:t(57183)};c.exports=a},76531:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(13560),v=t(83419),o=t(50792),r=t(97480),n=t(8443),e=t(57811),i=t(74403),h=t(45818),s=t(29747),l=t(87841),f=t(86555),u=t(56583),d=t(26099),p=t(38058),g=new v({Extends:o,initialize:function(y){o.call(this),this.game=y,this.canvas,this.canvasBounds=new l,this.parent=null,this.parentIsWindow=!1,this.parentSize=new f,this.gameSize=new f,this.baseSize=new f,this.displaySize=new f,this.scaleMode=a.SCALE_MODE.NONE,this.zoom=1,this._resetZoom=!1,this.displayScale=new d(1,1),this.autoRound=!1,this.autoCenter=a.CENTER.NO_CENTER,this.orientation=a.ORIENTATION.LANDSCAPE,this.fullscreen,this.fullscreenTarget=null,this._createdFullscreenTarget=!1,this.dirty=!1,this.resizeInterval=500,this._lastCheck=0,this._checkOrientation=!1,this.domlisteners={orientationChange:s,windowResize:s,fullScreenChange:s,fullScreenError:s}},preBoot:function(){this.parseConfig(this.game.config),this.game.events.once(n.BOOT,this.boot,this)},boot:function(){var x=this.game;this.canvas=x.canvas,this.fullscreen=x.device.fullscreen,this.scaleMode!==a.SCALE_MODE.RESIZE&&this.scaleMode!==a.SCALE_MODE.EXPAND&&this.displaySize.setAspectMode(this.scaleMode),this.scaleMode===a.SCALE_MODE.NONE?this.resize(this.width,this.height):(this.getParentBounds(),this.parentSize.width>0&&this.parentSize.height>0&&this.displaySize.setParent(this.parentSize),this.refresh()),x.events.on(n.PRE_STEP,this.step,this),x.events.once(n.READY,this.refresh,this),x.events.once(n.DESTROY,this.destroy,this),this.startListeners()},parseConfig:function(x){this.getParent(x),this.getParentBounds();var y=x.width,C=x.height,P=x.scaleMode,M=x.zoom,R=x.autoRound;if(typeof y=="string")if(y.substr(-1)!=="%")y=parseInt(y,10);else{var I=this.parentSize.width;I===0&&(I=window.innerWidth);var L=parseInt(y,10)/100;y=Math.floor(I*L)}if(typeof C=="string")if(C.substr(-1)!=="%")C=parseInt(C,10);else{var B=this.parentSize.height;B===0&&(B=window.innerHeight);var N=parseInt(C,10)/100;C=Math.floor(B*N)}this.scaleMode=P,this.autoRound=R,this.autoCenter=x.autoCenter,this.resizeInterval=x.resizeInterval,R&&(y=Math.floor(y),C=Math.floor(C)),this.gameSize.setSize(y,C),M===a.ZOOM.MAX_ZOOM&&(M=this.getMaxZoom()),this.zoom=M,M!==1&&(this._resetZoom=!0),this.baseSize.setSize(y,C),R&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),x.minWidth>0&&this.displaySize.setMin(x.minWidth*M,x.minHeight*M),x.maxWidth>0&&this.displaySize.setMax(x.maxWidth*M,x.maxHeight*M),this.displaySize.setSize(y,C),(x.snapWidth>0||x.snapHeight>0)&&this.displaySize.setSnap(x.snapWidth,x.snapHeight),this.orientation=h(y,C)},getParent:function(x){var y=x.parent;if(y!==null){if(this.parent=i(y),this.parentIsWindow=this.parent===document.body,x.expandParent&&x.scaleMode!==a.SCALE_MODE.NONE){var C=this.parent.getBoundingClientRect();(this.parentIsWindow||C.height===0)&&(document.documentElement.style.height="100%",document.body.style.height="100%",C=this.parent.getBoundingClientRect(),!this.parentIsWindow&&C.height===0&&(this.parent.style.overflow="hidden",this.parent.style.width="100%",this.parent.style.height="100%"))}x.fullscreenTarget&&!this.fullscreenTarget&&(this.fullscreenTarget=i(x.fullscreenTarget))}},getParentBounds:function(){if(!this.parent)return!1;var x=this.parentSize,y=this.parent.getBoundingClientRect();this.parentIsWindow&&this.game.device.os.iOS&&(y.height=e(!0));var C=y.width,P=y.height;if(x.width!==C||x.height!==P)return x.setSize(C,P),!0;if(this.canvas){var M=this.canvasBounds,R=this.canvas.getBoundingClientRect();if(R.x!==M.x||R.y!==M.y)return!0}return!1},lockOrientation:function(x){var y=screen.lockOrientation||screen.mozLockOrientation||screen.msLockOrientation;return y?y.call(screen,x):!1},setParentSize:function(x,y){return this.parentSize.setSize(x,y),this.refresh()},setGameSize:function(x,y){var C=this.autoRound;C&&(x=Math.floor(x),y=Math.floor(y));var P=this.width,M=this.height;return this.gameSize.resize(x,y),this.baseSize.resize(x,y),C&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setAspectRatio(x/y),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height,this.refresh(P,M)},resize:function(x,y){var C=this.zoom,P=this.autoRound;P&&(x=Math.floor(x),y=Math.floor(y));var M=this.width,R=this.height;this.gameSize.resize(x,y),this.baseSize.resize(x,y),P&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setSize(x*C,y*C),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height;var I=this.canvas.style,L=x*C,B=y*C;return P&&(L=Math.floor(L),B=Math.floor(B)),(L!==x||B!==y)&&(I.width=L+"px",I.height=B+"px"),this.refresh(M,R)},setZoom:function(x){return this.zoom=x,this._resetZoom=!0,this.refresh()},setMaxZoom:function(){return this.zoom=this.getMaxZoom(),this._resetZoom=!0,this.refresh()},setSnap:function(x,y){return x===void 0&&(x=0),y===void 0&&(y=x),this.displaySize.setSnap(x,y),this.refresh()},refresh:function(x,y){x===void 0&&(x=this.width),y===void 0&&(y=this.height),this.updateScale(),this.updateBounds(),this.updateOrientation(),this.displayScale.set(this.baseSize.width/this.canvasBounds.width,this.baseSize.height/this.canvasBounds.height);var C=this.game.domContainer;if(C){this.baseSize.setCSS(C);var P=this.canvas.style,M=C.style;M.transform="scale("+this.displaySize.width/this.baseSize.width+","+this.displaySize.height/this.baseSize.height+")",M.marginLeft=P.marginLeft,M.marginTop=P.marginTop}return this.emit(r.RESIZE,this.gameSize,this.baseSize,this.displaySize,x,y),this},updateOrientation:function(){if(this._checkOrientation){this._checkOrientation=!1;var x=h(this.width,this.height);x!==this.orientation&&(this.orientation=x,this.emit(r.ORIENTATION_CHANGE,x))}},updateScale:function(){var x=this.canvas.style,y=this.gameSize.width,C=this.gameSize.height,P,M,R=this.zoom,I=this.autoRound;if(this.scaleMode===a.SCALE_MODE.NONE)this.displaySize.setSize(y*R,C*R),P=this.displaySize.width,M=this.displaySize.height,I&&(P=Math.floor(P),M=Math.floor(M)),this._resetZoom&&(x.width=P+"px",x.height=M+"px",this._resetZoom=!1);else if(this.scaleMode===a.SCALE_MODE.RESIZE)this.displaySize.setSize(this.parentSize.width,this.parentSize.height),this.gameSize.setSize(this.displaySize.width,this.displaySize.height),this.baseSize.setSize(this.displaySize.width,this.displaySize.height),P=this.displaySize.width,M=this.displaySize.height,I&&(P=Math.floor(P),M=Math.floor(M)),this.canvas.width=P,this.canvas.height=M;else if(this.scaleMode===a.SCALE_MODE.EXPAND){this.displaySize.setSize(this.parentSize.width,this.parentSize.height),P=this.displaySize.width,M=this.displaySize.height,I&&(P=Math.floor(P),M=Math.floor(M)),x.width=P+"px",x.height=M+"px";var L=this.parentSize.width/this.gameSize.width,B=this.parentSize.height/this.gameSize.height;L=0?0:-(M.x*R.x),L=M.y>=0?0:-(M.y*R.y),B;P.width>=M.width?B=C.width:B=C.width-(M.width-P.width)*R.x;var N;return P.height>=M.height?N=C.height:N=C.height-(M.height-P.height)*R.y,y.setTo(I,L,B,N),x&&(y.width/=x.zoomX,y.height/=x.zoomY,y.centerX=x.centerX+x.scrollX,y.centerY=x.centerY+x.scrollY),y},step:function(x,y){this.parent&&(this._lastCheck+=y,(this.dirty||this._lastCheck>this.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0))},stopListeners:function(){var x=this.domlisteners;window.removeEventListener("orientationchange",x.orientationChange,!1),window.removeEventListener("resize",x.windowResize,!1);var y=["webkit","moz",""];y.forEach(function(C){document.removeEventListener(C+"fullscreenchange",x.fullScreenChange,!1),document.removeEventListener(C+"fullscreenerror",x.fullScreenError,!1)}),document.removeEventListener("MSFullscreenChange",x.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",x.fullScreenError,!1)},destroy:function(){this.removeAllListeners(),this.stopListeners(),this.game=null,this.canvas=null,this.canvasBounds=null,this.parent=null,this.fullscreenTarget=null,this.parentSize.destroy(),this.gameSize.destroy(),this.baseSize.destroy(),this.displaySize.destroy()},isFullscreen:{get:function(){return this.fullscreen.active}},width:{get:function(){return this.gameSize.width}},height:{get:function(){return this.gameSize.height}},isPortrait:{get:function(){return this.orientation===a.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===a.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});c.exports=g},64743:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={NO_CENTER:0,CENTER_BOTH:1,CENTER_HORIZONTALLY:2,CENTER_VERTICALLY:3}},39218:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={LANDSCAPE:"landscape-primary",PORTRAIT:"portrait-primary"}},81050:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={NONE:0,WIDTH_CONTROLS_HEIGHT:1,HEIGHT_CONTROLS_WIDTH:2,FIT:3,ENVELOP:4,RESIZE:5,EXPAND:6}},80805:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={NO_ZOOM:1,ZOOM_2X:2,ZOOM_4X:4,MAX_ZOOM:-1}},13560:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a={CENTER:t(64743),ORIENTATION:t(39218),SCALE_MODE:t(81050),ZOOM:t(80805)};c.exports=a},56139:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="enterfullscreen"},2336:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="fullscreenfailed"},47412:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="fullscreenunsupported"},51452:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="leavefullscreen"},20666:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="orientationchange"},47945:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="resize"},97480:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={ENTER_FULLSCREEN:t(56139),FULLSCREEN_FAILED:t(2336),FULLSCREEN_UNSUPPORTED:t(47412),LEAVE_FULLSCREEN:t(51452),ORIENTATION_CHANGE:t(20666),RESIZE:t(47945)}},93364:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(79291),v=t(13560),o={Center:t(64743),Events:t(97480),Orientation:t(39218),ScaleManager:t(76531),ScaleModes:t(81050),Zoom:t(80805)};o=a(!1,o,v.CENTER),o=a(!1,o,v.ORIENTATION),o=a(!1,o,v.SCALE_MODE),o=a(!1,o,v.ZOOM),c.exports=o},27397:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(95540),v=t(35355),o=function(r){var n=r.game.config.defaultPhysicsSystem,e=a(r.settings,"physics",!1);if(!(!n&&!e)){var i=[];if(n&&i.push(v(n+"Physics")),e)for(var h in e)h=v(h.concat("Physics")),i.indexOf(h)===-1&&i.push(h);return i}};c.exports=o},52106:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(95540),v=function(o){var r=o.plugins.getDefaultScenePlugins(),n=a(o.settings,"plugins",!1);return Array.isArray(n)?n:r||[]};c.exports=v},87033:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={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"};c.exports=m},97482:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(2368),o=new a({initialize:function(n){this.sys=new v(this,n),this.game,this.anims,this.cache,this.registry,this.sound,this.textures,this.events,this.cameras,this.add,this.make,this.scene,this.children,this.lights,this.data,this.input,this.load,this.time,this.tweens,this.physics,this.matter,this.scale,this.plugins,this.renderer},update:function(){}});c.exports=o},60903:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(89993),o=t(44594),r=t(8443),n=t(35154),e=t(54899),i=t(29747),h=t(97482),s=t(2368),l=new a({initialize:function(u,d){if(this.game=u,this.keys={},this.scenes=[],this._pending=[],this._start=[],this._queue=[],this._data={},this.isProcessing=!1,this.isBooted=!1,this.customViewports=0,this.systemScene,d){Array.isArray(d)||(d=[d]);for(var p=0;p-1&&(delete this.keys[p],this.scenes.splice(d,1),this._start.indexOf(p)>-1&&(d=this._start.indexOf(p),this._start.splice(d,1)),u.sys.destroy())}return this},bootScene:function(f){var u=f.sys,d=u.settings;u.sceneUpdate=i,f.init&&(f.init.call(f,d.data),d.status=v.INIT,d.isTransition&&u.events.emit(o.TRANSITION_INIT,d.transitionFrom,d.transitionDuration));var p;u.load&&(p=u.load,p.reset()),p&&f.preload?(f.preload.call(f),d.status=v.LOADING,p.once(e.COMPLETE,this.loadComplete,this),p.start()):this.create(f)},loadComplete:function(f){this.game.sound&&this.game.sound.onBlurPausedSounds&&this.game.sound.unlock(),this.create(f.scene)},payloadComplete:function(f){this.bootScene(f.scene)},update:function(f,u){this.processQueue(),this.isProcessing=!0;for(var d=this.scenes.length-1;d>=0;d--){var p=this.scenes[d].sys;p.settings.status>v.START&&p.settings.status<=v.RUNNING&&p.step(f,u),p.scenePlugin&&p.scenePlugin._target&&p.scenePlugin.step(f,u)}},render:function(f){for(var u=0;u=v.LOADING&&d.settings.status=v.START&&g<=v.CREATING)return this;if(g>=v.RUNNING&&g<=v.SLEEPING)p.shutdown(),p.sceneUpdate=i,p.start(u);else{p.sceneUpdate=i,p.start(u);var x;if(p.load&&(x=p.load),x&&p.settings.hasOwnProperty("pack")&&(x.reset(),x.addPack({payload:p.settings.pack})))return p.settings.status=v.LOADING,x.once(e.COMPLETE,this.payloadComplete,this),x.start(),this}return this.bootScene(d),this},stop:function(f,u){var d=this.getScene(f);if(d&&!d.sys.isTransitioning()&&d.sys.settings.status!==v.SHUTDOWN){var p=d.sys.load;p&&(p.off(e.COMPLETE,this.loadComplete,this),p.off(e.COMPLETE,this.payloadComplete,this)),d.sys.shutdown(u)}return this},switch:function(f,u){var d=this.getScene(f),p=this.getScene(u);return d&&p&&d!==p&&(this.sleep(f),this.isSleeping(u)?this.wake(u):this.start(u)),this},getAt:function(f){return this.scenes[f]},getIndex:function(f){var u=this.getScene(f);return this.scenes.indexOf(u)},bringToTop:function(f){if(this.isProcessing)this._queue.push({op:"bringToTop",keyA:f,keyB:null});else{var u=this.getIndex(f);if(u!==-1&&u0){var d=this.getScene(f);this.scenes.splice(u,1),this.scenes.unshift(d)}}return this},moveDown:function(f){if(this.isProcessing)this._queue.push({op:"moveDown",keyA:f,keyB:null});else{var u=this.getIndex(f);if(u>0){var d=u-1,p=this.getScene(f),g=this.getAt(d);this.scenes[u]=g,this.scenes[d]=p}}return this},moveUp:function(f){if(this.isProcessing)this._queue.push({op:"moveUp",keyA:f,keyB:null});else{var u=this.getIndex(f);if(ud),0,g)}}return this},moveBelow:function(f,u){if(f===u)return this;if(this.isProcessing)this._queue.push({op:"moveBelow",keyA:f,keyB:u});else{var d=this.getIndex(f),p=this.getIndex(u);if(d!==-1&&p!==-1&&p>d){var g=this.getAt(p);this.scenes.splice(p,1),d===0?this.scenes.unshift(g):this.scenes.splice(d-(p{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(45319),v=t(83419),o=t(44594),r=t(95540),n=t(37277),e=new v({initialize:function(h){this.scene=h,this.systems=h.sys,this.settings=h.sys.settings,this.key=h.sys.settings.key,this.manager=h.sys.game.scene,this.transitionProgress=0,this._elapsed=0,this._target=null,this._duration=0,this._onUpdate,this._onUpdateScope,this._willSleep=!1,this._willRemove=!1,h.sys.events.once(o.BOOT,this.boot,this),h.sys.events.on(o.START,this.pluginStart,this)},boot:function(){this.systems.events.once(o.DESTROY,this.destroy,this)},pluginStart:function(){this._target=null,this.systems.events.once(o.SHUTDOWN,this.shutdown,this)},start:function(i,h){return i===void 0&&(i=this.key),this.manager.queueOp("stop",this.key),this.manager.queueOp("start",i,h),this},restart:function(i){var h=this.key;return this.manager.queueOp("stop",h),this.manager.queueOp("start",h,i),this},transition:function(i){i===void 0&&(i={});var h=r(i,"target",!1),s=this.manager.getScene(h);if(!h||!this.checkValidTransition(s))return!1;var l=r(i,"duration",1e3);this._elapsed=0,this._target=s,this._duration=l,this._willSleep=r(i,"sleep",!1),this._willRemove=r(i,"remove",!1);var f=r(i,"onUpdate",null);f&&(this._onUpdate=f,this._onUpdateScope=r(i,"onUpdateScope",this.scene));var u=r(i,"allowInput",!1);this.settings.transitionAllowInput=u;var d=s.sys.settings;d.isTransition=!0,d.transitionFrom=this.scene,d.transitionDuration=l,d.transitionAllowInput=u,r(i,"moveAbove",!1)?this.manager.moveAbove(this.key,h):r(i,"moveBelow",!1)&&this.manager.moveBelow(this.key,h),s.sys.isSleeping()?s.sys.wake(r(i,"data")):this.manager.start(h,r(i,"data"));var p=r(i,"onStart",null),g=r(i,"onStartScope",this.scene);return p&&p.call(g,this.scene,s,l),this.systems.events.emit(o.TRANSITION_OUT,s,l),!0},checkValidTransition:function(i){return!(!i||i.sys.isActive()||i.sys.isTransitioning()||i===this.scene||this.systems.isTransitioning())},step:function(i,h){this._elapsed+=h,this.transitionProgress=a(this._elapsed/this._duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.transitionProgress),this._elapsed>=this._duration&&this.transitionComplete()},transitionComplete:function(){var i=this._target.sys,h=this._target.sys.settings;i.events.emit(o.TRANSITION_COMPLETE,this.scene),h.isTransition=!1,h.transitionFrom=null,this._duration=0,this._target=null,this._onUpdate=null,this._onUpdateScope=null,this._willRemove?this.manager.remove(this.key):this._willSleep?this.systems.sleep():this.manager.stop(this.key)},add:function(i,h,s,l){return this.manager.add(i,h,s,l)},launch:function(i,h){return i&&i!==this.key&&this.manager.queueOp("start",i,h),this},run:function(i,h){return i&&i!==this.key&&this.manager.queueOp("run",i,h),this},pause:function(i,h){return i===void 0&&(i=this.key),this.manager.queueOp("pause",i,h),this},resume:function(i,h){return i===void 0&&(i=this.key),this.manager.queueOp("resume",i,h),this},sleep:function(i,h){return i===void 0&&(i=this.key),this.manager.queueOp("sleep",i,h),this},wake:function(i,h){return i===void 0&&(i=this.key),this.manager.queueOp("wake",i,h),this},switch:function(i){return i!==this.key&&this.manager.queueOp("switch",this.key,i),this},stop:function(i,h){return i===void 0&&(i=this.key),this.manager.queueOp("stop",i,h),this},setActive:function(i,h,s){h===void 0&&(h=this.key);var l=this.manager.getScene(h);return l&&l.sys.setActive(i,s),this},setVisible:function(i,h){h===void 0&&(h=this.key);var s=this.manager.getScene(h);return s&&s.sys.setVisible(i),this},isSleeping:function(i){return i===void 0&&(i=this.key),this.manager.isSleeping(i)},isActive:function(i){return i===void 0&&(i=this.key),this.manager.isActive(i)},isPaused:function(i){return i===void 0&&(i=this.key),this.manager.isPaused(i)},isVisible:function(i){return i===void 0&&(i=this.key),this.manager.isVisible(i)},swapPosition:function(i,h){return h===void 0&&(h=this.key),i!==h&&this.manager.swapPosition(i,h),this},moveAbove:function(i,h){return h===void 0&&(h=this.key),i!==h&&this.manager.moveAbove(i,h),this},moveBelow:function(i,h){return h===void 0&&(h=this.key),i!==h&&this.manager.moveBelow(i,h),this},remove:function(i){return i===void 0&&(i=this.key),this.manager.remove(i),this},moveUp:function(i){return i===void 0&&(i=this.key),this.manager.moveUp(i),this},moveDown:function(i){return i===void 0&&(i=this.key),this.manager.moveDown(i),this},bringToTop:function(i){return i===void 0&&(i=this.key),this.manager.bringToTop(i),this},sendToBack:function(i){return i===void 0&&(i=this.key),this.manager.sendToBack(i),this},get:function(i){return this.manager.getScene(i)},getStatus:function(i){var h=this.manager.getScene(i);if(h)return h.sys.getStatus()},getIndex:function(i){return i===void 0&&(i=this.key),this.manager.getIndex(i)},shutdown:function(){var i=this.systems.events;i.off(o.SHUTDOWN,this.shutdown,this),i.off(o.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(o.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});n.register("ScenePlugin",e,"scenePlugin"),c.exports=e},55681:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(89993),v=t(35154),o=t(46975),r=t(87033),n={create:function(e){return typeof e=="string"?e={key:e}:e===void 0&&(e={}),{status:a.PENDING,key:v(e,"key",""),active:v(e,"active",!1),visible:v(e,"visible",!0),isBooted:!1,isTransition:!1,transitionFrom:null,transitionDuration:0,transitionAllowInput:!0,data:{},pack:v(e,"pack",!1),cameras:v(e,"cameras",null),map:v(e,"map",o(r,v(e,"mapAdd",{}))),physics:v(e,"physics",{}),loader:v(e,"loader",{}),plugins:v(e,"plugins",!1),input:v(e,"input",{})}}};c.exports=n},2368:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(89993),o=t(42363),r=t(44594),n=t(27397),e=t(52106),i=t(29747),h=t(55681),s=new a({initialize:function(f,u){this.scene=f,this.game,this.renderer,this.config=u,this.settings=h.create(u),this.canvas,this.context,this.anims,this.cache,this.plugins,this.registry,this.scale,this.sound,this.textures,this.add,this.cameras,this.displayList,this.events,this.make,this.scenePlugin,this.updateList,this.sceneUpdate=i},init:function(l){this.settings.status=v.INIT,this.sceneUpdate=i,this.game=l,this.renderer=l.renderer,this.canvas=l.canvas,this.context=l.context;var f=l.plugins;this.plugins=f,f.addToScene(this,o.Global,[o.CoreScene,e(this),n(this)]),this.events.emit(r.BOOT,this),this.settings.isBooted=!0},step:function(l,f){var u=this.events;u.emit(r.PRE_UPDATE,l,f),u.emit(r.UPDATE,l,f),this.sceneUpdate.call(this.scene,l,f),u.emit(r.POST_UPDATE,l,f)},render:function(l){var f=this.displayList;f.depthSort(),this.events.emit(r.PRE_RENDER,l),this.cameras.render(l,f),this.events.emit(r.RENDER,l)},queueDepthSort:function(){this.displayList.queueDepthSort()},depthSort:function(){this.displayList.depthSort()},pause:function(l){var f=this.settings,u=this.getStatus();return u!==v.CREATING&&u!==v.RUNNING?console.warn("Cannot pause non-running Scene",f.key):this.settings.active&&(f.status=v.PAUSED,f.active=!1,this.events.emit(r.PAUSE,this,l)),this},resume:function(l){var f=this.events,u=this.settings;return this.settings.active||(u.status=v.RUNNING,u.active=!0,f.emit(r.RESUME,this,l)),this},sleep:function(l){var f=this.settings,u=this.getStatus();return u!==v.CREATING&&u!==v.RUNNING?console.warn("Cannot sleep non-running Scene",f.key):(f.status=v.SLEEPING,f.active=!1,f.visible=!1,this.events.emit(r.SLEEP,this,l)),this},wake:function(l){var f=this.events,u=this.settings;return u.status=v.RUNNING,u.active=!0,u.visible=!0,f.emit(r.WAKE,this,l),u.isTransition&&f.emit(r.TRANSITION_WAKE,u.transitionFrom,u.transitionDuration),this},getData:function(){return this.settings.data},getStatus:function(){return this.settings.status},canInput:function(){var l=this.settings.status;return l>v.PENDING&&l<=v.RUNNING},isSleeping:function(){return this.settings.status===v.SLEEPING},isActive:function(){return this.settings.status===v.RUNNING},isPaused:function(){return this.settings.status===v.PAUSED},isTransitioning:function(){return this.settings.isTransition||this.scenePlugin._target!==null},isTransitionOut:function(){return this.scenePlugin._target!==null&&this.scenePlugin._duration>0},isTransitionIn:function(){return this.settings.isTransition},isVisible:function(){return this.settings.visible},setVisible:function(l){return this.settings.visible=l,this},setActive:function(l,f){return l?this.resume(f):this.pause(f)},start:function(l){var f=this.events,u=this.settings;l&&(u.data=l),u.status=v.START,u.active=!0,u.visible=!0,f.emit(r.START,this),f.emit(r.READY,this,l)},shutdown:function(l){var f=this.events,u=this.settings;f.off(r.TRANSITION_INIT),f.off(r.TRANSITION_START),f.off(r.TRANSITION_COMPLETE),f.off(r.TRANSITION_OUT),u.status=v.SHUTDOWN,u.active=!1,u.visible=!1,f.emit(r.SHUTDOWN,this,l)},destroy:function(){var l=this.events,f=this.settings;f.status=v.DESTROYED,f.active=!1,f.visible=!1,l.emit(r.DESTROY,this),l.removeAllListeners();for(var u=["scene","game","anims","cache","plugins","registry","sound","textures","add","camera","displayList","events","make","scenePlugin","updateList"],d=0;d{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9};c.exports=m},69830:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="addedtoscene"},7919:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="boot"},46763:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="create"},11763:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="destroy"},71555:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="pause"},36735:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="postupdate"},3809:c=>{/** - * @author samme - * @copyright 2021 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="prerender"},90716:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="preupdate"},58262:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="ready"},91633:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="removedfromscene"},10319:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="render"},87132:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="resume"},81961:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="shutdown"},90194:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="sleep"},6265:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="start"},33178:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="transitioncomplete"},43063:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="transitioninit"},11259:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="transitionout"},61611:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="transitionstart"},45209:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="transitionwake"},22966:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="update"},21747:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="wake"},44594:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={ADDED_TO_SCENE:t(69830),BOOT:t(7919),CREATE:t(46763),DESTROY:t(11763),PAUSE:t(71555),POST_UPDATE:t(36735),PRE_RENDER:t(3809),PRE_UPDATE:t(90716),READY:t(58262),REMOVED_FROM_SCENE:t(91633),RENDER:t(10319),RESUME:t(87132),SHUTDOWN:t(81961),SLEEP:t(90194),START:t(6265),TRANSITION_COMPLETE:t(33178),TRANSITION_INIT:t(43063),TRANSITION_OUT:t(11259),TRANSITION_START:t(61611),TRANSITION_WAKE:t(45209),UPDATE:t(22966),WAKE:t(21747)}},62194:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(89993),v=t(79291),o={Events:t(44594),GetPhysicsPlugins:t(27397),GetScenePlugins:t(52106),SceneManager:t(60903),ScenePlugin:t(52209),Settings:t(55681),Systems:t(2368)};o=v(!1,o,a),c.exports=o},30341:(c,m,t)=>{/** - * @author Richard Davey - * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(50792),o=t(14463),r=t(79291),n=t(29747),e=new a({Extends:v,initialize:function(h,s,l){v.call(this),this.manager=h,this.key=s,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=this.duration||0,this.totalDuration=this.totalDuration||0,this.config={mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0},this.currentConfig=this.config,this.config=r(this.config,l),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(i){return!i||!i.name||typeof i.name!="string"?!1:this.markers[i.name]?(console.error("addMarker "+i.name+" already exists in Sound"),!1):(i=r(!0,{name:"",start:0,duration:this.totalDuration-(i.start||0),config:{mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0}},i),this.markers[i.name]=i,!0)},updateMarker:function(i){return!i||!i.name||typeof i.name!="string"?!1:this.markers[i.name]?(this.markers[i.name]=r(!0,this.markers[i.name],i),!0):(console.warn("Audio Marker: "+i.name+" missing in Sound: "+this.key),!1)},removeMarker:function(i){var h=this.markers[i];return h?(this.markers[i]=null,h):null},play:function(i,h){if(i===void 0&&(i=""),typeof i=="object"&&(h=i,i=""),typeof i!="string")return!1;if(!i)this.currentMarker=null,this.currentConfig=this.config,this.duration=this.totalDuration;else{if(!this.markers[i])return console.warn("Marker: "+i+" missing in Sound: "+this.key),!1;this.currentMarker=this.markers[i],this.currentConfig=this.currentMarker.config,this.duration=this.currentMarker.duration}return this.resetConfig(),this.currentConfig=r(this.currentConfig,h),this.isPlaying=!0,this.isPaused=!1,!0},pause:function(){return this.isPaused||!this.isPlaying?!1:(this.isPlaying=!1,this.isPaused=!0,!0)},resume:function(){return!this.isPaused||this.isPlaying?!1:(this.isPlaying=!0,this.isPaused=!1,!0)},stop:function(){return!this.isPaused&&!this.isPlaying?!1:(this.isPlaying=!1,this.isPaused=!1,this.resetConfig(),!0)},applyConfig:function(){this.mute=this.currentConfig.mute,this.volume=this.currentConfig.volume,this.rate=this.currentConfig.rate,this.detune=this.currentConfig.detune,this.loop=this.currentConfig.loop,this.pan=this.currentConfig.pan},resetConfig:function(){this.currentConfig.seek=0,this.currentConfig.delay=0},update:n,calculateRate:function(){var i=1.0005777895065548,h=this.currentConfig.detune+this.manager.detune,s=Math.pow(i,h);this.totalRate=this.currentConfig.rate*this.manager.rate*s},destroy:function(){this.pendingRemove||(this.stop(),this.emit(o.DESTROY,this),this.removeAllListeners(),this.pendingRemove=!0,this.manager=null,this.config=null,this.currentConfig=null,this.markers=null,this.currentMarker=null)}});c.exports=e},85034:(c,m,t)=>{/** - * @author Richard Davey - * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(41786),o=t(50792),r=t(14463),n=t(8443),e=t(46710),i=t(58731),h=t(29747),s=t(26099),l=new a({Extends:o,initialize:function(u){o.call(this),this.game=u,this.jsonCache=u.cache.json,this.sounds=[],this.mute=!1,this.volume=1,this.pauseOnBlur=!0,this._rate=1,this._detune=0,this.locked=this.locked||!1,this.unlocked=!1,this.gameLostFocus=!1,this.listenerPosition=new s,u.events.on(n.BLUR,this.onGameBlur,this),u.events.on(n.FOCUS,this.onGameFocus,this),u.events.on(n.PRE_STEP,this.update,this),u.events.once(n.DESTROY,this.destroy,this)},add:h,addAudioSprite:function(f,u){u===void 0&&(u={});var d=this.add(f,u);d.spritemap=this.jsonCache.get(f).spritemap;for(var p in d.spritemap)if(d.spritemap.hasOwnProperty(p)){var g=v(u),x=d.spritemap[p];g.loop=x.hasOwnProperty("loop")?x.loop:!1,d.addMarker({name:p,start:x.start,duration:x.end-x.start,config:g})}return d},get:function(f){return i(this.sounds,"key",f)},getAll:function(f){return f?e(this.sounds,"key",f):e(this.sounds)},getAllPlaying:function(){return e(this.sounds,"isPlaying",!0)},play:function(f,u){var d=this.add(f);return d.once(r.COMPLETE,d.destroy,d),u?u.name?(d.addMarker(u),d.play(u.name)):d.play(u):d.play()},playAudioSprite:function(f,u,d){var p=this.addAudioSprite(f);return p.once(r.COMPLETE,p.destroy,p),p.play(u,d)},remove:function(f){var u=this.sounds.indexOf(f);return u!==-1?(f.destroy(),this.sounds.splice(u,1),!0):!1},removeAll:function(){this.sounds.forEach(function(f){f.destroy()}),this.sounds.length=0},removeByKey:function(f){for(var u=0,d=this.sounds.length-1;d>=0;d--){var p=this.sounds[d];p.key===f&&(p.destroy(),this.sounds.splice(d,1),u++)}return u},pauseAll:function(){this.forEachActiveSound(function(f){f.pause()}),this.emit(r.PAUSE_ALL,this)},resumeAll:function(){this.forEachActiveSound(function(f){f.resume()}),this.emit(r.RESUME_ALL,this)},setListenerPosition:h,stopAll:function(){this.forEachActiveSound(function(f){f.stop()}),this.emit(r.STOP_ALL,this)},stopByKey:function(f){var u=0;return this.getAll(f).forEach(function(d){d.stop()&&u++}),u},unlock:h,onBlur:h,onFocus:h,onGameBlur:function(){this.gameLostFocus=!0,this.pauseOnBlur&&this.onBlur()},onGameFocus:function(){this.gameLostFocus=!1,this.pauseOnBlur&&this.onFocus()},update:function(f,u){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit(r.UNLOCKED,this));for(var d=this.sounds.length-1;d>=0;d--)this.sounds[d].pendingRemove&&this.sounds.splice(d,1);this.sounds.forEach(function(p){p.update(f,u)})},destroy:function(){this.game.events.off(n.BLUR,this.onGameBlur,this),this.game.events.off(n.FOCUS,this.onGameFocus,this),this.game.events.off(n.PRE_STEP,this.update,this),this.removeAllListeners(),this.removeAll(),this.sounds.length=0,this.sounds=null,this.listenerPosition=null,this.game=null},forEachActiveSound:function(f,u){var d=this;this.sounds.forEach(function(p,g){p&&!p.pendingRemove&&f.call(u||d,p,g,d.sounds)})},setRate:function(f){return this.rate=f,this},rate:{get:function(){return this._rate},set:function(f){this._rate=f,this.forEachActiveSound(function(u){u.calculateRate()}),this.emit(r.GLOBAL_RATE,this,f)}},setDetune:function(f){return this.detune=f,this},detune:{get:function(){return this._detune},set:function(f){this._detune=f,this.forEachActiveSound(function(u){u.calculateRate()}),this.emit(r.GLOBAL_DETUNE,this,f)}}});c.exports=l},14747:(c,m,t)=>{/** - * @author Richard Davey - * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(33684),v=t(25960),o=t(57490),r={create:function(n){var e=n.config.audio,i=n.device.audio;return e.noAudio||!i.webAudio&&!i.audioData?new v(n):i.webAudio&&!e.disableWebAudio?new o(n):new a(n)}};c.exports=r},19723:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="complete"},98882:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="decodedall"},57506:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="decoded"},73146:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="destroy"},11305:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="detune"},40577:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="detune"},30333:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="mute"},20394:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="rate"},21802:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="volume"},1299:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="looped"},99190:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="loop"},97125:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="mute"},89259:c=>{/** - * @author pi-kei - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="pan"},79986:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="pauseall"},17586:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="pause"},19618:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="play"},42306:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="rate"},10387:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="resumeall"},48959:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="resume"},9960:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="seek"},19180:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="stopall"},98328:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="stop"},50401:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="unlocked"},52498:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="volume"},14463:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={COMPLETE:t(19723),DECODED:t(57506),DECODED_ALL:t(98882),DESTROY:t(73146),DETUNE:t(11305),GLOBAL_DETUNE:t(40577),GLOBAL_MUTE:t(30333),GLOBAL_RATE:t(20394),GLOBAL_VOLUME:t(21802),LOOP:t(99190),LOOPED:t(1299),MUTE:t(97125),PAN:t(89259),PAUSE_ALL:t(79986),PAUSE:t(17586),PLAY:t(19618),RATE:t(42306),RESUME_ALL:t(10387),RESUME:t(48959),SEEK:t(9960),STOP_ALL:t(19180),STOP:t(98328),UNLOCKED:t(50401),VOLUME:t(52498)}},64895:(c,m,t)=>{/** - * @author Richard Davey - * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(30341),v=t(83419),o=t(14463),r=t(45319),n=new v({Extends:a,initialize:function(i,h,s){if(s===void 0&&(s={}),this.tags=i.game.cache.audio.get(h),!this.tags)throw new Error('No cached audio asset with key "'+h);this.audio=null,this.startTime=0,this.previousTime=0,this.duration=this.tags[0].duration,this.totalDuration=this.tags[0].duration,a.call(this,i,h,s)},play:function(e,i){return this.manager.isLocked(this,"play",[e,i])||!a.prototype.play.call(this,e,i)||!this.pickAndPlayAudioTag()?!1:(this.emit(o.PLAY,this),!0)},pause:function(){return this.manager.isLocked(this,"pause")||this.startTime>0||!a.prototype.pause.call(this)?!1:(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit(o.PAUSE,this),!0)},resume:function(){return this.manager.isLocked(this,"resume")||this.startTime>0||!a.prototype.resume.call(this)||!this.pickAndPlayAudioTag()?!1:(this.emit(o.RESUME,this),!0)},stop:function(){return this.manager.isLocked(this,"stop")||!a.prototype.stop.call(this)?!1:(this.stopAndReleaseAudioTag(),this.emit(o.STOP,this),!0)},pickAndPlayAudioTag:function(){if(!this.pickAudioTag())return this.reset(),!1;var e=this.currentConfig.seek,i=this.currentConfig.delay,h=(this.currentMarker?this.currentMarker.start:0)+e;return this.previousTime=h,this.audio.currentTime=h,this.applyConfig(),i===0?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+i*1e3,this.audio.paused||this.audio.pause()),this.resetConfig(),!0},pickAudioTag:function(){if(this.audio)return!0;for(var e=0;e0){this.startTime=h-this.manager.loopEndOffset?(this.audio.currentTime=i+Math.max(0,s-h),s=this.audio.currentTime):s=h){this.reset(),this.stopAndReleaseAudioTag(),this.emit(o.COMPLETE,this);return}this.previousTime=s}},destroy:function(){a.prototype.destroy.call(this),this.tags=null,this.audio&&this.stopAndReleaseAudioTag()},updateMute:function(){this.audio&&(this.audio.muted=this.currentConfig.mute||this.manager.mute)},updateVolume:function(){this.audio&&(this.audio.volume=r(this.currentConfig.volume*this.manager.volume,0,1))},calculateRate:function(){a.prototype.calculateRate.call(this),this.audio&&(this.audio.playbackRate=this.totalRate)},mute:{get:function(){return this.currentConfig.mute},set:function(e){this.currentConfig.mute=e,!this.manager.isLocked(this,"mute",e)&&(this.updateMute(),this.emit(o.MUTE,this,e))}},setMute:function(e){return this.mute=e,this},volume:{get:function(){return this.currentConfig.volume},set:function(e){this.currentConfig.volume=e,!this.manager.isLocked(this,"volume",e)&&(this.updateVolume(),this.emit(o.VOLUME,this,e))}},setVolume:function(e){return this.volume=e,this},rate:{get:function(){return this.currentConfig.rate},set:function(e){this.currentConfig.rate=e,!this.manager.isLocked(this,o.RATE,e)&&(this.calculateRate(),this.emit(o.RATE,this,e))}},setRate:function(e){return this.rate=e,this},detune:{get:function(){return this.currentConfig.detune},set:function(e){this.currentConfig.detune=e,!this.manager.isLocked(this,o.DETUNE,e)&&(this.calculateRate(),this.emit(o.DETUNE,this,e))}},setDetune:function(e){return this.detune=e,this},seek:{get:function(){return this.isPlaying?this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0):this.isPaused?this.currentConfig.seek:0},set:function(e){this.manager.isLocked(this,"seek",e)||this.startTime>0||(this.isPlaying||this.isPaused)&&(e=Math.min(Math.max(0,e),this.duration),this.isPlaying?(this.previousTime=e,this.audio.currentTime=e):this.isPaused&&(this.currentConfig.seek=e),this.emit(o.SEEK,this,e))}},setSeek:function(e){return this.seek=e,this},loop:{get:function(){return this.currentConfig.loop},set:function(e){this.currentConfig.loop=e,!this.manager.isLocked(this,"loop",e)&&(this.audio&&(this.audio.loop=e),this.emit(o.LOOP,this,e))}},setLoop:function(e){return this.loop=e,this},pan:{get:function(){return this.currentConfig.pan},set:function(e){this.currentConfig.pan=e,this.emit(o.PAN,this,e)}},setPan:function(e){return this.pan=e,this}});c.exports=n},33684:(c,m,t)=>{/** - * @author Richard Davey - * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(85034),v=t(83419),o=t(14463),r=t(64895),n=new v({Extends:a,initialize:function(i){this.override=!0,this.audioPlayDelay=.1,this.loopEndOffset=.05,this.onBlurPausedSounds=[],this.locked="ontouchstart"in window,this.lockedActionsQueue=this.locked?[]:null,this._mute=!1,this._volume=1,a.call(this,i)},add:function(e,i){var h=new r(this,e,i);return this.sounds.push(h),h},unlock:function(){this.locked=!1;var e=this;if(this.game.cache.audio.entries.each(function(l,f){for(var u=0;u{/** - * @author Richard Davey - * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={SoundManagerCreator:t(14747),Events:t(14463),BaseSound:t(30341),BaseSoundManager:t(85034),WebAudioSound:t(71741),WebAudioSoundManager:t(57490),HTML5AudioSound:t(64895),HTML5AudioSoundManager:t(33684),NoAudioSound:t(4603),NoAudioSoundManager:t(25960)}},4603:(c,m,t)=>{/** - * @author Richard Davey - * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(30341),v=t(83419),o=t(50792),r=t(79291),n=t(29747),e=function(){return!1},i=function(){return null},h=function(){return this},s=new v({Extends:o,initialize:function(f,u,d){d===void 0&&(d={}),o.call(this),this.manager=f,this.key=u,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=0,this.totalDuration=0,this.config=r({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0},d),this.currentConfig=this.config,this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.seek=0,this.loop=!1,this.pan=0,this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:e,updateMarker:e,removeMarker:i,play:e,pause:e,resume:e,stop:e,setMute:h,setVolume:h,setRate:h,setDetune:h,setSeek:h,setLoop:h,setPan:h,applyConfig:i,resetConfig:i,update:n,calculateRate:i,destroy:function(){a.prototype.destroy.call(this)}});c.exports=s},25960:(c,m,t)=>{/** - * @author Richard Davey - * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(85034),v=t(83419),o=t(50792),r=t(4603),n=t(29747),e=new v({Extends:o,initialize:function(h){o.call(this),this.game=h,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(i,h){var s=new r(this,i,h);return this.sounds.push(s),s},addAudioSprite:function(i,h){var s=this.add(i,h);return s.spritemap={},s},get:function(i){return a.prototype.get.call(this,i)},getAll:function(i){return a.prototype.getAll.call(this,i)},play:function(i,h){return!1},playAudioSprite:function(i,h,s){return!1},remove:function(i){return a.prototype.remove.call(this,i)},removeAll:function(){return a.prototype.removeAll.call(this)},removeByKey:function(i){return a.prototype.removeByKey.call(this,i)},stopByKey:function(i){return a.prototype.stopByKey.call(this,i)},onBlur:n,onFocus:n,onGameBlur:n,onGameFocus:n,pauseAll:n,resumeAll:n,stopAll:n,update:n,setRate:n,setDetune:n,setMute:n,setVolume:n,unlock:n,forEachActiveSound:function(i,h){a.prototype.forEachActiveSound.call(this,i,h)},destroy:function(){a.prototype.destroy.call(this)}});c.exports=e},71741:(c,m,t)=>{/** - * @author Richard Davey - * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(30341),v=t(83419),o=t(14463),r=t(95540),n=new v({Extends:a,initialize:function(i,h,s){if(s===void 0&&(s={}),this.audioBuffer=i.game.cache.audio.get(h),!this.audioBuffer)throw new Error('Audio key "'+h+'" missing from cache');this.source=null,this.loopSource=null,this.muteNode=i.context.createGain(),this.volumeNode=i.context.createGain(),this.pannerNode=null,this.spatialNode=null,this.spatialSource=null,this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),i.context.createPanner&&(this.spatialNode=i.context.createPanner(),this.volumeNode.connect(this.spatialNode)),i.context.createStereoPanner?(this.pannerNode=i.context.createStereoPanner(),i.context.createPanner?this.spatialNode.connect(this.pannerNode):this.volumeNode.connect(this.pannerNode),this.pannerNode.connect(i.destination)):i.context.createPanner?this.spatialNode.connect(i.destination):this.volumeNode.connect(i.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,a.call(this,i,h,s)},play:function(e,i){return a.prototype.play.call(this,e,i)?(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(o.PLAY,this),!0):!1},pause:function(){return this.manager.context.currentTime{/** - * @author Richard Davey - * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(53134),v=t(85034),o=t(83419),r=t(14463),n=t(8443),e=t(71741),i=t(95540),h=new o({Extends:v,initialize:function(l){this.context=this.createAudioContext(l),this.masterMuteNode=this.context.createGain(),this.masterVolumeNode=this.context.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(this.context.destination),this.destination=this.masterMuteNode,this.locked=this.context.state==="suspended"&&("ontouchstart"in window||"onclick"in window),v.call(this,l),this.locked&&l.isBooted?this.unlock():l.events.once(n.BOOT,this.unlock,this)},createAudioContext:function(s){var l=s.config.audio;if(l.context)return l.context.resume(),l.context;if(window.hasOwnProperty("AudioContext"))return new AudioContext;if(window.hasOwnProperty("webkitAudioContext"))return new window.webkitAudioContext},setAudioContext:function(s){return this.context&&this.context.close(),this.masterMuteNode&&this.masterMuteNode.disconnect(),this.masterVolumeNode&&this.masterVolumeNode.disconnect(),this.context=s,this.masterMuteNode=s.createGain(),this.masterVolumeNode=s.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(s.destination),this.destination=this.masterMuteNode,this},add:function(s,l){var f=new e(this,s,l);return this.sounds.push(f),f},decodeAudio:function(s,l){var f;Array.isArray(s)?f=s:f=[{key:s,data:l}];for(var u=this.game.cache.audio,d=f.length,p=0;p{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(37105),v=t(83419),o=t(29747),r=t(19186),n=new v({initialize:function(i){this.parent=i,this.list=[],this.position=0,this.addCallback=o,this.removeCallback=o,this._sortKey=""},add:function(e,i){return i?a.Add(this.list,e):a.Add(this.list,e,0,this.addCallback,this)},addAt:function(e,i,h){return h?a.AddAt(this.list,e,i):a.AddAt(this.list,e,i,0,this.addCallback,this)},getAt:function(e){return this.list[e]},getIndex:function(e){return this.list.indexOf(e)},sort:function(e,i){return e?(i===void 0&&(i=function(h,s){return h[e]-s[e]}),r(this.list,i),this):this},getByName:function(e){return a.GetFirst(this.list,"name",e)},getRandom:function(e,i){return a.GetRandom(this.list,e,i)},getFirst:function(e,i,h,s){return a.GetFirst(this.list,e,i,h,s)},getAll:function(e,i,h,s){return a.GetAll(this.list,e,i,h,s)},count:function(e,i){return a.CountAllMatching(this.list,e,i)},swap:function(e,i){a.Swap(this.list,e,i)},moveTo:function(e,i){return a.MoveTo(this.list,e,i)},moveAbove:function(e,i){return a.MoveAbove(this.list,e,i)},moveBelow:function(e,i){return a.MoveBelow(this.list,e,i)},remove:function(e,i){return i?a.Remove(this.list,e):a.Remove(this.list,e,this.removeCallback,this)},removeAt:function(e,i){return i?a.RemoveAt(this.list,e):a.RemoveAt(this.list,e,this.removeCallback,this)},removeBetween:function(e,i,h){return h?a.RemoveBetween(this.list,e,i):a.RemoveBetween(this.list,e,i,this.removeCallback,this)},removeAll:function(e){for(var i=this.list.length;i--;)this.remove(this.list[i],e);return this},bringToTop:function(e){return a.BringToTop(this.list,e)},sendToBack:function(e){return a.SendToBack(this.list,e)},moveUp:function(e){return a.MoveUp(this.list,e),e},moveDown:function(e){return a.MoveDown(this.list,e),e},reverse:function(){return this.list.reverse(),this},shuffle:function(){return a.Shuffle(this.list),this},replace:function(e,i){return a.Replace(this.list,e,i)},exists:function(e){return this.list.indexOf(e)>-1},setAll:function(e,i,h,s){return a.SetAll(this.list,e,i,h,s),this},each:function(e,i){for(var h=[null],s=2;s0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}}});c.exports=n},90330:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=new a({initialize:function(r){this.entries={},this.size=0,this.setAll(r)},setAll:function(o){if(Array.isArray(o))for(var r=0;r{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(50792),o=t(82348),r=new a({Extends:v,initialize:function(){v.call(this),this._pending=[],this._active=[],this._destroy=[],this._toProcess=0,this.checkQueue=!1},isActive:function(n){return this._active.indexOf(n)>-1},isPending:function(n){return this._toProcess>0&&this._pending.indexOf(n)>-1},isDestroying:function(n){return this._destroy.indexOf(n)>-1},add:function(n){return this.checkQueue&&this.isActive(n)&&!this.isDestroying(n)||this.isPending(n)||(this._pending.push(n),this._toProcess++),n},remove:function(n){if(this.isPending(n)){var e=this._pending,i=e.indexOf(n);i!==-1&&e.splice(i,1)}else this.isActive(n)&&(this._destroy.push(n),this._toProcess++);return n},removeAll:function(){for(var n=this._active,e=this._destroy,i=n.length;i--;)e.push(n[i]),this._toProcess++;return this},update:function(){if(this._toProcess===0)return this._active;var n=this._destroy,e=this._active,i,h;for(i=0;i{/** - * @author Vladimir Agafonkin - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(43886);function v(y){if(!(this instanceof v))return new v(y);this._maxEntries=Math.max(4,y||9),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}v.prototype={all:function(){return this._all(this.data,[])},search:function(y){var C=this.data,P=[],M=this.toBBox;if(!p(y,C))return P;for(var R=[],I,L,B,N;C;){for(I=0,L=C.children.length;I=0&&I[C].children.length>this._maxEntries;)this._split(I,C),C--;this._adjustParentBBoxes(R,I,C)},_split:function(y,C){var P=y[C],M=P.children.length,R=this._minEntries;this._chooseSplitAxis(P,R,M);var I=this._chooseSplitIndex(P,R,M),L=g(P.children.splice(I,P.children.length-I));L.height=P.height,L.leaf=P.leaf,r(P,this.toBBox),r(L,this.toBBox),C?y[C-1].children.push(L):this._splitRoot(P,L)},_splitRoot:function(y,C){this.data=g([y,C]),this.data.height=y.height+1,this.data.leaf=!1,r(this.data,this.toBBox)},_chooseSplitIndex:function(y,C,P){var M,R,I,L,B,N,G,V;for(N=G=1/0,M=C;M<=P-C;M++)R=n(y,0,M,this.toBBox),I=n(y,M,P,this.toBBox),L=u(R,I),B=s(R)+s(I),L=C;N--)G=y.children[N],e(L,y.leaf?R(G):G),B+=l(L);return B},_adjustParentBBoxes:function(y,C,P){for(var M=P;M>=0;M--)e(C[M],y)},_condense:function(y){for(var C=y.length-1,P;C>=0;C--)y[C].children.length===0?C>0?(P=y[C-1].children,P.splice(P.indexOf(y[C]),1)):this.clear():r(y[C],this.toBBox)},compareMinX:function(y,C){return y.left-C.left},compareMinY:function(y,C){return y.top-C.top},toBBox:function(y){return{minX:y.left,minY:y.top,maxX:y.right,maxY:y.bottom}}};function o(y,C,P){if(!P)return C.indexOf(y);for(var M=0;M=y.minX&&C.maxY>=y.minY}function g(y){return{children:y,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function x(y,C,P,M,R){for(var I=[C,P],L;I.length;)P=I.pop(),C=I.pop(),!(P-C<=M)&&(L=C+Math.ceil((P-C)/M/2)*M,a(y,L,C,P,R),I.push(C,L,L,P))}c.exports=v},35072:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=new a({initialize:function(r){if(this.entries=[],Array.isArray(r))for(var n=0;n-1&&this.entries.splice(r,1),this},dump:function(){console.group("Set");for(var o=0;o-1},union:function(o){var r=new v;return o.entries.forEach(function(n){r.set(n)}),this.entries.forEach(function(n){r.set(n)}),r},intersect:function(o){var r=new v;return this.entries.forEach(function(n){o.contains(n)&&r.set(n)}),r},difference:function(o){var r=new v;return this.entries.forEach(function(n){o.contains(n)||r.set(n)}),r},size:{get:function(){return this.entries.length},set:function(o){return o{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(45319),v=t(83419),o=t(56583),r=t(26099),n=new v({initialize:function(i,h,s,l){i===void 0&&(i=0),h===void 0&&(h=i),s===void 0&&(s=0),l===void 0&&(l=null),this._width=i,this._height=h,this._parent=l,this.aspectMode=s,this.aspectRatio=h===0?1:i/h,this.minWidth=0,this.minHeight=0,this.maxWidth=Number.MAX_VALUE,this.maxHeight=Number.MAX_VALUE,this.snapTo=new r},setAspectMode:function(e){return e===void 0&&(e=0),this.aspectMode=e,this.setSize(this._width,this._height)},setSnap:function(e,i){return e===void 0&&(e=0),i===void 0&&(i=e),this.snapTo.set(e,i),this.setSize(this._width,this._height)},setParent:function(e){return this._parent=e,this.setSize(this._width,this._height)},setMin:function(e,i){return e===void 0&&(e=0),i===void 0&&(i=e),this.minWidth=a(e,0,this.maxWidth),this.minHeight=a(i,0,this.maxHeight),this.setSize(this._width,this._height)},setMax:function(e,i){return e===void 0&&(e=Number.MAX_VALUE),i===void 0&&(i=e),this.maxWidth=a(e,this.minWidth,Number.MAX_VALUE),this.maxHeight=a(i,this.minHeight,Number.MAX_VALUE),this.setSize(this._width,this._height)},setSize:function(e,i){switch(e===void 0&&(e=0),i===void 0&&(i=e),this.aspectMode){case n.NONE:this._width=this.getNewWidth(o(e,this.snapTo.x)),this._height=this.getNewHeight(o(i,this.snapTo.y)),this.aspectRatio=this._height===0?1:this._width/this._height;break;case n.WIDTH_CONTROLS_HEIGHT:this._width=this.getNewWidth(o(e,this.snapTo.x)),this._height=this.getNewHeight(this._width*(1/this.aspectRatio),!1);break;case n.HEIGHT_CONTROLS_WIDTH:this._height=this.getNewHeight(o(i,this.snapTo.y)),this._width=this.getNewWidth(this._height*this.aspectRatio,!1);break;case n.FIT:this.constrain(e,i,!0);break;case n.ENVELOP:this.constrain(e,i,!1);break}return this},setAspectRatio:function(e){return this.aspectRatio=e,this.setSize(this._width,this._height)},resize:function(e,i){return this._width=this.getNewWidth(o(e,this.snapTo.x)),this._height=this.getNewHeight(o(i,this.snapTo.y)),this.aspectRatio=this._height===0?1:this._width/this._height,this},getNewWidth:function(e,i){return i===void 0&&(i=!0),e=a(e,this.minWidth,this.maxWidth),i&&this._parent&&e>this._parent.width&&(e=Math.max(this.minWidth,this._parent.width)),e},getNewHeight:function(e,i){return i===void 0&&(i=!0),e=a(e,this.minHeight,this.maxHeight),i&&this._parent&&e>this._parent.height&&(e=Math.max(this.minHeight,this._parent.height)),e},constrain:function(e,i,h){e===void 0&&(e=0),i===void 0&&(i=e),h===void 0&&(h=!0),e=this.getNewWidth(e),i=this.getNewHeight(i);var s=this.snapTo,l=i===0?1:e/i;return h&&this.aspectRatio>l||!h&&this.aspectRatio0&&(i=o(i,s.y),e=i*this.aspectRatio)):(h&&this.aspectRatiol)&&(i=o(i,s.y),e=i*this.aspectRatio,s.x>0&&(e=o(e,s.x),i=e*(1/this.aspectRatio))),this._width=e,this._height=i,this},fitTo:function(e,i){return this.constrain(e,i,!0)},envelop:function(e,i){return this.constrain(e,i,!1)},setWidth:function(e){return this.setSize(e,this._height)},setHeight:function(e){return this.setSize(this._width,e)},toString:function(){return"[{ Size (width="+this._width+" height="+this._height+" aspectRatio="+this.aspectRatio+" aspectMode="+this.aspectMode+") }]"},setCSS:function(e){e&&e.style&&(e.style.width=this._width+"px",e.style.height=this._height+"px")},copy:function(e){return e.setAspectMode(this.aspectMode),e.aspectRatio=this.aspectRatio,e.setSize(this.width,this.height)},destroy:function(){this._parent=null,this.snapTo=null},width:{get:function(){return this._width},set:function(e){this.setSize(e,this._height)}},height:{get:function(){return this._height},set:function(e){this.setSize(this._width,e)}}});n.NONE=0,n.WIDTH_CONTROLS_HEIGHT=1,n.HEIGHT_CONTROLS_WIDTH=2,n.FIT=3,n.ENVELOP=4,c.exports=n},15238:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="add"},56187:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="remove"},82348:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={PROCESS_QUEUE_ADD:t(15238),PROCESS_QUEUE_REMOVE:t(56187)}},41392:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={Events:t(82348),List:t(73162),Map:t(90330),ProcessQueue:t(25774),RTree:t(59542),Set:t(35072),Size:t(86555)}},57382:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(45319),o=t(40987),r=t(8054),n=t(50030),e=t(79237),i=new a({Extends:e,initialize:function(s,l,f,u,d){e.call(this,s,l,f,u,d),this.add("__BASE",0,0,0,u,d),this._source=this.frames.__BASE.source,this.canvas=this._source.image,this.context=this.canvas.getContext("2d",{willReadFrequently:!0}),this.width=u,this.height=d,this.imageData=this.context.getImageData(0,0,u,d),this.data=null,this.imageData&&(this.data=this.imageData.data),this.pixels=null,this.buffer,this.data&&(this.imageData.data.buffer?(this.buffer=this.imageData.data.buffer,this.pixels=new Uint32Array(this.buffer)):window.ArrayBuffer?(this.buffer=new ArrayBuffer(this.imageData.data.length),this.pixels=new Uint32Array(this.buffer)):this.pixels=this.imageData.data)},update:function(){return this.imageData=this.context.getImageData(0,0,this.width,this.height),this.data=this.imageData.data,this.imageData.data.buffer?(this.buffer=this.imageData.data.buffer,this.pixels=new Uint32Array(this.buffer)):window.ArrayBuffer?(this.buffer=new ArrayBuffer(this.imageData.data.length),this.pixels=new Uint32Array(this.buffer)):this.pixels=this.imageData.data,this.manager.game.config.renderType===r.WEBGL&&this.refresh(),this},draw:function(h,s,l,f){return f===void 0&&(f=!0),this.context.drawImage(l,h,s),f&&this.update(),this},drawFrame:function(h,s,l,f,u){l===void 0&&(l=0),f===void 0&&(f=0),u===void 0&&(u=!0);var d=this.manager.getFrame(h,s);if(d){var p=d.canvasData,g=d.cutWidth,x=d.cutHeight,y=d.source.resolution;this.context.drawImage(d.source.image,p.x,p.y,g,x,l,f,g/y,x/y),u&&this.update()}return this},setPixel:function(h,s,l,f,u,d){d===void 0&&(d=255),h=Math.abs(Math.floor(h)),s=Math.abs(Math.floor(s));var p=this.getIndex(h,s);if(p>-1){var g=this.context.getImageData(h,s,1,1);g.data[0]=l,g.data[1]=f,g.data[2]=u,g.data[3]=d,this.context.putImageData(g,h,s)}return this},putData:function(h,s,l,f,u,d,p){return f===void 0&&(f=0),u===void 0&&(u=0),d===void 0&&(d=h.width),p===void 0&&(p=h.height),this.context.putImageData(h,s,l,f,u,d,p),this},getData:function(h,s,l,f){h=v(Math.floor(h),0,this.width-1),s=v(Math.floor(s),0,this.height-1),l=v(l,1,this.width-h),f=v(f,1,this.height-s);var u=this.context.getImageData(h,s,l,f);return u},getPixel:function(h,s,l){l||(l=new o);var f=this.getIndex(h,s);if(f>-1){var u=this.data,d=u[f+0],p=u[f+1],g=u[f+2],x=u[f+3];l.setTo(d,p,g,x)}return l},getPixels:function(h,s,l,f){h===void 0&&(h=0),s===void 0&&(s=0),l===void 0&&(l=this.width),f===void 0&&(f=l),h=Math.abs(Math.round(h)),s=Math.abs(Math.round(s));for(var u=v(h,0,this.width),d=v(h+l,0,this.width),p=v(s,0,this.height),g=v(s+f,0,this.height),x=new o,y=[],C=p;C{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(10312),v=t(71911),o=t(27919),r=t(83419),n=t(8054),e=t(4327),i=t(95540),h=t(36060),s=t(32302),l=t(79237),f=t(70554),u=new r({Extends:l,initialize:function(p,g,x,y){x===void 0&&(x=256),y===void 0&&(y=256),this.type="DynamicTexture";var C=p.game.renderer,P=C&&C.type===n.CANVAS,M=P?o.create2D(this,x,y):[this];l.call(this,p,g,M,x,y),this.add("__BASE",0,0,0,x,y),this.renderer=C,this.width=-1,this.height=-1,this.isDrawing=!1,this.canvas=P?M:null,this.context=P?M.getContext("2d",{willReadFrequently:!0}):null,this.dirty=!1,this.isSpriteTexture=!0,this._eraseMode=!1,this.camera=new v(0,0,x,y).setScene(p.game.scene.systemScene,!1),this.renderTarget=P?null:new s(C,x,y,1,0,!1,!0,!0,!1),this.pipeline=P?null:C.pipelines.get(h.SINGLE_PIPELINE),this.setSize(x,y)},setSize:function(d,p){p===void 0&&(p=d);var g=this.get(),x=g.source;if(d!==this.width||p!==this.height){this.canvas&&(this.canvas.width=d,this.canvas.height=p);var y=this.renderTarget;y&&(y.willResize(d,p)&&y.resize(d,p),y.texture!==x.glTexture&&this.renderer.deleteTexture(x.glTexture),this.setFromRenderTarget()),this.camera.setSize(d,p),x.width=d,x.height=p,g.setSize(d,p),this.width=d,this.height=p}else{var C=this.getSourceImage();g.cutX+d>C.width&&(d=C.width-g.cutX),g.cutY+p>C.height&&(p=C.height-g.cutY),g.setSize(d,p,g.cutX,g.cutY)}return this},setFromRenderTarget:function(){var d=this.get(),p=d.source,g=this.renderTarget;return p.isRenderTexture=!0,p.isGLTexture=!0,p.glTexture=g.texture,this},setIsSpriteTexture:function(d){return this.isSpriteTexture=d,this},fill:function(d,p,g,x,y,C){var P=this.camera,M=this.renderer;p===void 0&&(p=1),g===void 0&&(g=0),x===void 0&&(x=0),y===void 0&&(y=this.width),C===void 0&&(C=this.height);var R=d>>16&255,I=d>>8&255,L=d&255,B=this.renderTarget;if(P.preRender(),B){B.bind(!0);var N=this.pipeline.manager.set(this.pipeline),G=M.width/B.width,V=M.height/B.height,K=B.height-(x+C);N.drawFillRect(g*G,K*V,y*G,C*V,f.getTintFromFloats(L/255,I/255,R/255,1),p),B.unbind(!0)}else{var j=this.context;M.setContext(j),j.globalCompositeOperation="source-over",j.fillStyle="rgba("+R+","+I+","+L+","+p+")",j.fillRect(g,x,y,C),M.setContext()}return this.dirty=!0,this},clear:function(){if(this.dirty){var d=this.context,p=this.renderTarget;p?p.clear():d&&(d.save(),d.setTransform(1,0,0,1,0,0),d.clearRect(0,0,this.width,this.height),d.restore()),this.dirty=!1}return this},stamp:function(d,p,g,x,y){g===void 0&&(g=0),x===void 0&&(x=0);var C=i(y,"alpha",1),P=i(y,"tint",16777215),M=i(y,"angle",0),R=i(y,"rotation",0),I=i(y,"scale",1),L=i(y,"scaleX",I),B=i(y,"scaleY",I),N=i(y,"originX",.5),G=i(y,"originY",.5),V=i(y,"blendMode",0),K=i(y,"erase",!1),j=i(y,"skipBatch",!1),J=this.manager.resetStamp(C,P);return J.setAngle(0),M!==0?J.setAngle(M):R!==0&&J.setRotation(R),J.setScale(L,B),J.setTexture(d,p),J.setOrigin(N,G),J.setBlendMode(V),K&&(this._eraseMode=!0),j?this.batchGameObject(J,g,x):this.draw(J,g,x),K&&(this._eraseMode=!1),this},erase:function(d,p,g){return this._eraseMode=!0,this.draw(d,p,g),this._eraseMode=!1,this},draw:function(d,p,g,x,y){return this.beginDraw(),this.batchDraw(d,p,g,x,y),this.endDraw(),this},drawFrame:function(d,p,g,x,y,C){return this.beginDraw(),this.batchDrawFrame(d,p,g,x,y,C),this.endDraw(),this},repeat:function(d,p,g,x,y,C,P,M,R){if(g===void 0&&(g=0),x===void 0&&(x=0),y===void 0&&(y=this.width),C===void 0&&(C=this.height),P===void 0&&(P=1),M===void 0&&(M=16777215),R===void 0&&(R=!1),d instanceof e?p=d:p=this.manager.getFrame(d,p),!p)return this;var I=this.manager.resetStamp(P,M);I.setFrame(p),I.setOrigin(0);var L=p.width,B=p.height;y=Math.floor(y),C=Math.floor(C);var N=Math.ceil(y/L),G=Math.ceil(C/B),V=N*L-y,K=G*B-C;V>0&&(V=L-V),K>0&&(K=B-K),g<0&&(N+=Math.ceil(Math.abs(g)/L)),x<0&&(G+=Math.ceil(Math.abs(x)/B));var j=g,J=x,X=!1,Y=this.manager.stampCrop.setTo(0,0,L,B);R||this.beginDraw();for(var b=0;b0&&z===N-1&&(X=!0,Y.width=V),K>0&&b===G-1&&(X=!0,Y.height=K),X&&I.setCrop(Y),this.batchGameObject(I,j,J),I.isCropped=!1,Y.setTo(0,0,L,B),j+=L}j=g,J+=B}return R||this.endDraw(),this},beginDraw:function(){if(!this.isDrawing){var d=this.camera,p=this.renderer,g=this.renderTarget;d.preRender(),g?p.beginCapture(g.width,g.height):p.setContext(this.context),this.isDrawing=!0}return this},batchDraw:function(d,p,g,x,y){return Array.isArray(d)||(d=[d]),this.batchList(d,p,g,x,y),this},batchDrawFrame:function(d,p,g,x,y,C){g===void 0&&(g=0),x===void 0&&(x=0),y===void 0&&(y=1),C===void 0&&(C=16777215);var P=this.manager.getFrame(d,p);return P&&(this.renderTarget?this.pipeline.batchTextureFrame(P,g,x,C,y,this.camera.matrix,null):this.batchTextureFrame(P,g,x,y,C)),this},endDraw:function(d){if(d===void 0&&(d=this._eraseMode),this.isDrawing){var p=this.renderer,g=this.renderTarget;if(g){var x=p.endCapture(),y=p.pipelines.setUtility();y.blitFrame(x,g,1,!1,!1,d,this.isSpriteTexture),p.resetScissor(),p.resetViewport()}else p.setContext();this.dirty=!0,this.isDrawing=!1}return this},batchList:function(d,p,g,x,y){var C=d.length;if(C!==0)for(var P=0;P0&&R.height>0&&M.drawImage(I,R.x,R.y,R.width,R.height,p,g,R.width,R.height),M.restore()}},snapshotArea:function(d,p,g,x,y,C,P){return this.renderTarget?this.renderer.snapshotFramebuffer(this.renderTarget.framebuffer,this.width,this.height,y,!1,d,p,g,x,C,P):this.renderer.snapshotCanvas(this.canvas,y,!1,d,p,g,x,C,P),this},snapshot:function(d,p,g){return this.snapshotArea(0,0,this.width,this.height,d,p,g)},snapshotPixel:function(d,p,g){return this.snapshotArea(d,p,1,1,g,"pixel")},getWebGLTexture:function(){if(this.renderTarget)return this.renderTarget.texture},renderWebGL:function(d,p,g,x){var y=this.manager.resetStamp();y.setTexture(this),y.setOrigin(0),y.renderWebGL(d,y,g,x)},renderCanvas:function(){},destroy:function(){var d=this.manager.stamp;d&&d.texture===this&&this.manager.resetStamp(),l.prototype.destroy.call(this),o.remove(this.canvas),this.renderTarget&&this.renderTarget.destroy(),this.camera.destroy(),this.canvas=null,this.context=null,this.renderer=null}});c.exports=u},4327:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(45319),o=t(79291),r=new a({initialize:function(e,i,h,s,l,f,u){this.texture=e,this.name=i,this.source=e.source[h],this.sourceIndex=h,this.cutX,this.cutY,this.cutWidth,this.cutHeight,this.x=0,this.y=0,this.width,this.height,this.halfWidth,this.halfHeight,this.centerX,this.centerY,this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.u0=0,this.v0=0,this.u1=0,this.v1=0,this.data={cut:{x:0,y:0,w:0,h:0,r:0,b:0},trim:!1,sourceSize:{w:0,h:0},spriteSourceSize:{x:0,y:0,w:0,h:0,r:0,b:0},radius:0,drawImage:{x:0,y:0,width:0,height:0},is3Slice:!1,scale9:!1,scale9Borders:{x:0,y:0,w:0,h:0}},this.setSize(f,u,s,l)},setSize:function(n,e,i,h){i===void 0&&(i=0),h===void 0&&(h=0),this.cutX=i,this.cutY=h,this.cutWidth=n,this.cutHeight=e,this.width=n,this.height=e,this.halfWidth=Math.floor(n*.5),this.halfHeight=Math.floor(e*.5),this.centerX=Math.floor(n/2),this.centerY=Math.floor(e/2);var s=this.data,l=s.cut;l.x=i,l.y=h,l.w=n,l.h=e,l.r=i+n,l.b=h+e,s.sourceSize.w=n,s.sourceSize.h=e,s.spriteSourceSize.w=n,s.spriteSourceSize.h=e,s.radius=.5*Math.sqrt(n*n+e*e);var f=s.drawImage;return f.x=i,f.y=h,f.width=n,f.height=e,this.updateUVs()},setTrim:function(n,e,i,h,s,l){var f=this.data,u=f.spriteSourceSize;return f.trim=!0,f.sourceSize.w=n,f.sourceSize.h=e,u.x=i,u.y=h,u.w=s,u.h=l,u.r=i+s,u.b=h+l,this.x=i,this.y=h,this.width=s,this.height=l,this.halfWidth=s*.5,this.halfHeight=l*.5,this.centerX=Math.floor(s/2),this.centerY=Math.floor(l/2),this.updateUVs()},setScale9:function(n,e,i,h){var s=this.data;return s.scale9=!0,s.is3Slice=e===0&&h===this.height,s.scale9Borders.x=n,s.scale9Borders.y=e,s.scale9Borders.w=i,s.scale9Borders.h=h,this},setCropUVs:function(n,e,i,h,s,l,f){var u=this.cutX,d=this.cutY,p=this.cutWidth,g=this.cutHeight,x=this.realWidth,y=this.realHeight;e=v(e,0,x),i=v(i,0,y),h=v(h,0,x-e),s=v(s,0,y-i);var C=u+e,P=d+i,M=h,R=s,I=this.data;if(I.trim){var L=I.spriteSourceSize;h=v(h,0,p-e),s=v(s,0,g-i);var B=e+h,N=i+s,G=!(L.rB||L.y>N);if(G){var V=Math.max(L.x,e),K=Math.max(L.y,i),j=Math.min(L.r,B)-V,J=Math.min(L.b,N)-K;M=j,R=J,l?C=u+(p-(V-L.x)-j):C=u+(V-L.x),f?P=d+(g-(K-L.y)-J):P=d+(K-L.y),e=V,i=K,h=j,s=J}else C=0,P=0,M=0,R=0}else l&&(C=u+(p-e-h)),f&&(P=d+(g-i-s));var X=this.source.width,Y=this.source.height;return n.u0=Math.max(0,C/X),n.v0=Math.max(0,P/Y),n.u1=Math.min(1,(C+M)/X),n.v1=Math.min(1,(P+R)/Y),n.x=e,n.y=i,n.cx=C,n.cy=P,n.cw=M,n.ch=R,n.width=h,n.height=s,n.flipX=l,n.flipY=f,n},updateCropUVs:function(n,e,i){return this.setCropUVs(n,n.x,n.y,n.width,n.height,e,i)},setUVs:function(n,e,i,h,s,l){var f=this.data.drawImage;return f.width=n,f.height=e,this.u0=i,this.v0=h,this.u1=s,this.v1=l,this},updateUVs:function(){var n=this.cutX,e=this.cutY,i=this.cutWidth,h=this.cutHeight,s=this.data.drawImage;s.width=i,s.height=h;var l=this.source.width,f=this.source.height;return this.u0=n/l,this.v0=e/f,this.u1=(n+i)/l,this.v1=(e+h)/f,this},updateUVsInverted:function(){var n=this.source.width,e=this.source.height;return this.u0=(this.cutX+this.cutHeight)/n,this.v0=this.cutY/e,this.u1=this.cutX/n,this.v1=(this.cutY+this.cutWidth)/e,this},clone:function(){var n=new r(this.texture,this.name,this.sourceIndex);return n.cutX=this.cutX,n.cutY=this.cutY,n.cutWidth=this.cutWidth,n.cutHeight=this.cutHeight,n.x=this.x,n.y=this.y,n.width=this.width,n.height=this.height,n.halfWidth=this.halfWidth,n.halfHeight=this.halfHeight,n.centerX=this.centerX,n.centerY=this.centerY,n.rotated=this.rotated,n.data=o(!0,n.data,this.data),n.updateUVs(),n},destroy:function(){this.texture=null,this.source=null,this.customData=null,this.data=null},glTexture:{get:function(){return this.source.glTexture}},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},scale9:{get:function(){return this.data.scale9}},is3Slice:{get:function(){return this.data.is3Slice}},canvasData:{get:function(){return this.data.drawImage}}});c.exports=r},79237:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(4327),o=t(11876),r='Texture "%s" has no frame "%s"',n=new a({initialize:function(i,h,s,l,f){Array.isArray(s)||(s=[s]),this.manager=i,this.key=h,this.source=[],this.dataSource=[],this.frames={},this.customData={},this.firstFrame="__BASE",this.frameTotal=0;for(var u=0;ul&&(l=d.cutX+d.cutWidth),d.cutY+d.cutHeight>f&&(f=d.cutY+d.cutHeight)}return{x:h,y:s,width:l-h,height:f-s}},getFrameNames:function(e){e===void 0&&(e=!1);var i=Object.keys(this.frames);if(!e){var h=i.indexOf("__BASE");h!==-1&&i.splice(h,1)}return i},getSourceImage:function(e){(e==null||this.frameTotal===1)&&(e="__BASE");var i=this.frames[e];return i?i.source.image:(console.warn(r,this.key,e),this.frames.__BASE.source.image)},getDataSourceImage:function(e){(e==null||this.frameTotal===1)&&(e="__BASE");var i=this.frames[e],h;return i?h=i.sourceIndex:(console.warn(r,this.key,e),h=this.frames.__BASE.sourceIndex),this.dataSource[h].image},setDataSource:function(e){Array.isArray(e)||(e=[e]);for(var i=0;i{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(27919),v=t(57382),o=t(83419),r=t(40987),n=t(8054),e=t(81320),i=t(50792),h=t(69442),s=t(4327),l=t(8443),f=t(99584),u=t(35154),d=t(88571),p=t(41212),g=t(61309),x=t(87841),y=t(79237),C=new o({Extends:i,initialize:function(M){i.call(this),this.game=M,this.name="TextureManager",this.list={},this._tempCanvas=a.create2D(this),this._tempContext=this._tempCanvas.getContext("2d",{willReadFrequently:!0}),this._pending=0,this.stamp,this.stampCrop=new x,this.silentWarnings=!1,M.events.once(l.BOOT,this.boot,this)},boot:function(){this._pending=3,this.on(h.LOAD,this.updatePending,this),this.on(h.ERROR,this.updatePending,this);var P=this.game.config;this.addBase64("__DEFAULT",P.defaultImage),this.addBase64("__MISSING",P.missingImage),this.addBase64("__WHITE",P.whiteImage),this.game.renderer&&this.game.renderer.gl&&this.addUint8Array("__NORMAL",new Uint8Array([127,127,255,255]),1,1),this.game.events.once(l.DESTROY,this.destroy,this),this.game.events.once(l.SYSTEM_READY,function(M){this.stamp=new d(M).setOrigin(0)},this)},updatePending:function(){this._pending--,this._pending===0&&(this.off(h.LOAD),this.off(h.ERROR),this.emit(h.READY))},checkKey:function(P){return this.exists(P)?(this.silentWarnings||console.error("Texture key already in use: "+P),!1):!0},remove:function(P){if(typeof P=="string")if(this.exists(P))P=this.get(P);else return this.silentWarnings||console.warn("No texture found matching key: "+P),this;var M=P.key;return this.list.hasOwnProperty(M)&&(P.destroy(),this.emit(h.REMOVE,M),this.emit(h.REMOVE_KEY+M)),this},removeKey:function(P){return this.list.hasOwnProperty(P)&&delete this.list[P],this},addBase64:function(P,M){if(this.checkKey(P)){var R=this,I=new Image;I.onerror=function(){R.emit(h.ERROR,P)},I.onload=function(){var L=R.create(P,I);g.Image(L,0),R.emit(h.ADD,P,L),R.emit(h.ADD_KEY+P,L),R.emit(h.LOAD,P,L)},I.src=M}return this},getBase64:function(P,M,R,I){R===void 0&&(R="image/png"),I===void 0&&(I=.92);var L="",B=this.getFrame(P,M);if(B&&(B.source.isRenderTexture||B.source.isGLTexture))this.silentWarnings||console.warn("Cannot getBase64 from WebGL Texture");else if(B){var N=B.canvasData,G=a.create2D(this,N.width,N.height),V=G.getContext("2d",{willReadFrequently:!0});N.width>0&&N.height>0&&V.drawImage(B.source.image,N.x,N.y,N.width,N.height,0,0,N.width,N.height),L=G.toDataURL(R,I),a.remove(G)}return L},addImage:function(P,M,R){var I=null;return this.checkKey(P)&&(I=this.create(P,M),g.Image(I,0),R&&I.setDataSource(R),this.emit(h.ADD,P,I),this.emit(h.ADD_KEY+P,I)),I},addGLTexture:function(P,M){var R=null;if(this.checkKey(P)){var I=M.width,L=M.height;R=this.create(P,M,I,L),R.add("__BASE",0,0,0,I,L),this.emit(h.ADD,P,R),this.emit(h.ADD_KEY+P,R)}return R},addCompressedTexture:function(P,M,R){var I=null;if(this.checkKey(P)){if(I=this.create(P,M),I.add("__BASE",0,0,0,M.width,M.height),R){var L=function(N,G,V){Array.isArray(V.textures)||Array.isArray(V.frames)?g.JSONArray(N,G,V):g.JSONHash(N,G,V)};if(Array.isArray(R))for(var B=0;B=B.x&&P=B.y&&M=B.x&&P=B.y&&M{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(27919),v=t(83419),o=t(50030),r=t(29795),n=t(82751),e=new v({initialize:function(h,s,l,f,u){u===void 0&&(u=!1);var d=h.manager.game;this.renderer=d.renderer,this.texture=h,this.source=s,this.image=s.compressed?null:s,this.compressionAlgorithm=s.compressed?s.format:null,this.resolution=1,this.width=l||s.naturalWidth||s.videoWidth||s.width||0,this.height=f||s.naturalHeight||s.videoHeight||s.height||0,this.scaleMode=r.DEFAULT,this.isCanvas=s instanceof HTMLCanvasElement,this.isVideo=window.hasOwnProperty("HTMLVideoElement")&&s instanceof HTMLVideoElement,this.isRenderTexture=s.type==="RenderTexture"||s.type==="DynamicTexture",this.isGLTexture=s instanceof n,this.isPowerOf2=o(this.width,this.height),this.glTexture=null,this.flipY=u,this.init(d)},init:function(i){var h=this.renderer;if(h){var s=this.source;if(h.gl){var l=this.image,f=this.flipY,u=this.width,d=this.height,p=this.scaleMode;this.isCanvas?this.glTexture=h.createCanvasTexture(l,!1,f):this.isVideo?this.glTexture=h.createVideoTexture(l,!1,f):this.isRenderTexture?this.glTexture=h.createTextureFromSource(null,u,d,p):this.isGLTexture?this.glTexture=s:this.compressionAlgorithm?this.glTexture=h.createTextureFromSource(s,void 0,void 0,p):s instanceof Uint8Array?this.glTexture=h.createUint8ArrayTexture(s,u,d,p):this.glTexture=h.createTextureFromSource(l,u,d,p)}else this.isRenderTexture&&(this.image=s.canvas)}i.config.antialias||this.setFilter(1)},setFilter:function(i){this.renderer&&this.renderer.gl&&this.renderer.setTextureFilter(this.glTexture,i),this.scaleMode=i},setFlipY:function(i){return i===void 0&&(i=!0),i===this.flipY?this:(this.flipY=i,this.update(),this)},update:function(){var i=this.renderer,h=this.image,s=this.flipY,l=i.gl;l&&this.isCanvas?i.updateCanvasTexture(h,this.glTexture,s):l&&this.isVideo&&i.updateVideoTexture(h,this.glTexture,s)},destroy:function(){this.glTexture&&this.renderer.deleteTexture(this.glTexture),this.isCanvas&&a.remove(this.image),this.renderer=null,this.texture=null,this.source=null,this.image=null,this.glTexture=null}});c.exports=e},19673:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={LINEAR:0,NEAREST:1};c.exports=m},44538:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="addtexture"},63486:c=>{/** - * @author samme - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="addtexture-"},94851:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="onerror"},29099:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="onload"},8678:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="ready"},86415:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="removetexture"},30879:c=>{/** - * @author samme - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="removetexture-"},69442:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={ADD:t(44538),ADD_KEY:t(63486),ERROR:t(94851),LOAD:t(29099),READY:t(8678),REMOVE:t(86415),REMOVE_KEY:t(30879)}},27458:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(79291),v=t(19673),o={CanvasTexture:t(57382),DynamicTexture:t(81320),Events:t(69442),FilterMode:v,Frame:t(4327),Parsers:t(61309),Texture:t(79237),TextureManager:t(17130),TextureSource:t(11876)};o=a(!1,o,v),c.exports=o},89905:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){if(!v.getElementsByTagName("TextureAtlas")){console.warn("Invalid Texture Atlas XML given");return}var o=t.source[a];t.add("__BASE",a,0,0,o.width,o.height);for(var r=v.getElementsByTagName("SubTexture"),n,e=0;e{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){var v=t.source[a];return t.add("__BASE",a,0,0,v.width,v.height),t};c.exports=m},4832:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){var v=t.source[a];return t.add("__BASE",a,0,0,v.width,v.height),t};c.exports=m},78566:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(41786),v=function(o,r,n){if(!n.frames&&!n.textures){console.warn("Invalid Texture Atlas JSON Array");return}var e=o.source[r];o.add("__BASE",r,0,0,e.width,e.height);for(var i=Array.isArray(n.textures)?n.textures[r].frames:n.frames,h,s=0;s{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(41786),v=function(o,r,n){if(!n.frames){console.warn("Invalid Texture Atlas JSON Hash given, missing 'frames' Object");return}var e=o.source[r];o.add("__BASE",r,0,0,e.width,e.height);var i=n.frames,h;for(var s in i)if(i.hasOwnProperty(s)){var l=i[s];if(h=o.add(s,r,l.frame.x,l.frame.y,l.frame.w,l.frame.h),!h){console.warn("Invalid atlas json, frame already exists: "+s);continue}l.trimmed&&h.setTrim(l.sourceSize.w,l.sourceSize.h,l.spriteSourceSize.x,l.spriteSourceSize.y,l.spriteSourceSize.w,l.spriteSourceSize.h),l.rotated&&(h.rotated=!0,h.updateUVsInverted());var f=l.anchor||l.pivot;f&&(h.customPivot=!0,h.pivotX=f.x,h.pivotY=f.y),l.scale9Borders&&h.setScale9(l.scale9Borders.x,l.scale9Borders.y,l.scale9Borders.w,l.scale9Borders.h),h.customData=a(l)}for(var u in n)u!=="frames"&&(Array.isArray(n[u])?o.customData[u]=n[u].slice(0):o.customData[u]=n[u]);return o};c.exports=v},31403:c=>{/** - * @author Richard Davey - * @copyright 2021 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){var a=[171,75,84,88,32,49,49,187,13,10,26,10],v,o=new Uint8Array(t,0,12);for(v=0;v>1),x=Math.max(1,x>>1),p+=y}return{mipmaps:d,width:s,height:l,internalFormat:h,compressed:!0,generateMipmap:!1}};c.exports=m},82038:c=>{/** - * @author Richard Davey - * @copyright 2021 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */function m(M,R,I,L,B,N,G){return G===void 0&&(G=16),Math.floor((M+I)/B)*Math.floor((R+L)/N)*G}function t(M,R){return M=Math.max(M,16),R=Math.max(R,8),M*R/4}function a(M,R){return M=Math.max(M,8),R=Math.max(R,8),M*R/2}function v(M,R){return Math.ceil(M/4)*Math.ceil(R/4)*16}function o(M,R){return m(M,R,3,3,4,4,8)}function r(M,R){return m(M,R,3,3,4,4)}function n(M,R){return m(M,R,4,3,5,4)}function e(M,R){return m(M,R,4,4,5,5)}function i(M,R){return m(M,R,5,4,6,5)}function h(M,R){return m(M,R,5,5,6,6)}function s(M,R){return m(M,R,7,4,8,5)}function l(M,R){return m(M,R,7,5,8,6)}function f(M,R){return m(M,R,7,7,8,8)}function u(M,R){return m(M,R,9,4,10,5)}function d(M,R){return m(M,R,9,5,10,6)}function p(M,R){return m(M,R,9,7,10,8)}function g(M,R){return m(M,R,9,9,10,10)}function x(M,R){return m(M,R,11,9,12,10)}function y(M,R){return m(M,R,11,11,12,12)}var C={0:{sizeFunc:t,glFormat:[35841]},1:{sizeFunc:t,glFormat:[35843]},2:{sizeFunc:a,glFormat:[35840]},3:{sizeFunc:a,glFormat:[35842]},6:{sizeFunc:o,glFormat:[36196]},7:{sizeFunc:o,glFormat:[33776,35916]},8:{sizeFunc:r,glFormat:[33777,35917]},9:{sizeFunc:r,glFormat:[33778,35918]},11:{sizeFunc:r,glFormat:[33779,35919]},14:{sizeFunc:v,glFormat:[36494,36495]},15:{sizeFunc:v,glFormat:[36492,36493]},22:{sizeFunc:o,glFormat:[37492,37493]},23:{sizeFunc:r,glFormat:[37496,37497]},24:{sizeFunc:o,glFormat:[37494,37495]},25:{sizeFunc:o,glFormat:[37488]},26:{sizeFunc:r,glFormat:[37490]},27:{sizeFunc:r,glFormat:[37808,37840]},28:{sizeFunc:n,glFormat:[37809,37841]},29:{sizeFunc:e,glFormat:[37810,37842]},30:{sizeFunc:i,glFormat:[37811,37843]},31:{sizeFunc:h,glFormat:[37812,37844]},32:{sizeFunc:s,glFormat:[37813,37845]},33:{sizeFunc:l,glFormat:[37814,37846]},34:{sizeFunc:f,glFormat:[37815,37847]},35:{sizeFunc:u,glFormat:[37816,37848]},36:{sizeFunc:d,glFormat:[37817,37849]},37:{sizeFunc:p,glFormat:[37818,37850]},38:{sizeFunc:g,glFormat:[37819,37851]},39:{sizeFunc:x,glFormat:[37820,37852]},40:{sizeFunc:y,glFormat:[37821,37853]}},P=function(M){for(var R=new Uint32Array(M,0,13),I=R[0],L=I===55727696,B=L?R[2]:R[3],N=R[4],G=C[B].glFormat[N],V=C[B].sizeFunc,K=R[11],j=R[7],J=R[6],X=52+R[12],Y=new Uint8Array(M,X),b=new Array(K),z=0,W=j,H=J,Z=0;Z>1),H=Math.max(1,H>>1),z+=Q}return{mipmaps:b,width:j,height:J,internalFormat:G,compressed:!0,generateMipmap:!1}};c.exports=P},75549:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(95540),v=function(o,r,n,e,i,h,s){var l=a(s,"frameWidth",null),f=a(s,"frameHeight",l);if(l===null)throw new Error("TextureManager.SpriteSheet: Invalid frameWidth given.");var u=o.source[r];o.add("__BASE",r,0,0,u.width,u.height);var d=a(s,"startFrame",0),p=a(s,"endFrame",-1),g=a(s,"margin",0),x=a(s,"spacing",0),y=Math.floor((i-g+x)/(l+x)),C=Math.floor((h-g+x)/(f+x)),P=y*C;P===0&&console.warn("SpriteSheet frame dimensions will result in zero frames for texture:",o.key),(d>P||d<-P)&&(d=0),d<0&&(d=P+d),(p===-1||p>P||pi&&(I=G-i),V>h&&(L=V-h),N>=d&&N<=p&&(o.add(B,r,n+M,e+R,l-I,f-L),B++),M+=l+x,M+l>i&&(M=g,R+=f+x)}return o};c.exports=v},47534:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(95540),v=function(o,r,n){var e=a(n,"frameWidth",null),i=a(n,"frameHeight",e);if(!e)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var h=o.source[0];o.add("__BASE",0,0,0,h.width,h.height),a(n,"startFrame",0),a(n,"endFrame",-1);for(var s=a(n,"margin",0),l=a(n,"spacing",0),f=r.cutX,u=r.cutY,d=r.cutWidth,p=r.cutHeight,g=r.realWidth,x=r.realHeight,y=Math.floor((g-s+l)/(e+l)),C=Math.floor((x-s+l)/(i+l)),P=r.x,M=e-P,R=e-(g-d-P),I=r.y,L=i-I,B=i-(x-p-I),N,G=s,V=s,K=0,j=0,J=0;J{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=0,t=function(v,o,r,n){var e=m-n.y-n.height;v.add(r,o,n.x,e,n.width,n.height)},a=function(v,o,r){var n=v.source[o];v.add("__BASE",o,0,0,n.width,n.height),m=n.height;for(var e=r.split(` -`),i=/^[ ]*(- )*(\w+)+[: ]+(.*)/,h="",s="",l={x:0,y:0,width:0,height:0},f=0;f{/** - * @author Ben Richards - * @copyright 2024 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(50030),v=function(h){for(var s=h.mipmaps,l=1;l{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={AtlasXML:t(89905),Canvas:t(72893),Image:t(4832),JSONArray:t(78566),JSONHash:t(39711),KTXParser:t(31403),PVRParser:t(82038),SpriteSheet:t(75549),SpriteSheetFromAtlas:t(47534),UnityYAML:t(86147)}},80341:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={CSV:0,TILED_JSON:1,ARRAY_2D:2,WELTMEISTER:3}},16536:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=new a({initialize:function(r,n,e,i,h,s,l){(e===void 0||e<=0)&&(e=32),(i===void 0||i<=0)&&(i=32),h===void 0&&(h=0),s===void 0&&(s=0),this.name=r,this.firstgid=n|0,this.imageWidth=e|0,this.imageHeight=i|0,this.imageMargin=h|0,this.imageSpacing=s|0,this.properties=l||{},this.images=[],this.total=0},containsImageIndex:function(o){return o>=this.firstgid&&o{/** - * @author Richard Davey - * @copyright 2021 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=new a({initialize:function(r){if(this.gids=[],r!==void 0)for(var n=0;n{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(80341),v=t(87010),o=t(46177),r=t(49075),n=function(e,i,h,s,l,f,u,d){h===void 0&&(h=32),s===void 0&&(s=32),l===void 0&&(l=10),f===void 0&&(f=10),d===void 0&&(d=!1);var p=null;if(Array.isArray(u)){var g=i!==void 0?i:"map";p=o(g,a.ARRAY_2D,u,h,s,d)}else if(i!==void 0){var x=e.cache.tilemap.get(i);x?p=o(i,x.format,x.data,h,s,d):console.warn("No map data found for key "+i)}return p===null&&(p=new v({tileWidth:h,tileHeight:s,width:l,height:f})),new r(e,p)};c.exports=n},23029:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(31401),o=t(91907),r=t(62644),n=t(93232),e=new a({Mixins:[v.AlphaSingle,v.Flip,v.Visible],initialize:function(h,s,l,f,u,d,p,g){this.layer=h,this.index=s,this.x=l,this.y=f,this.width=u,this.height=d,this.right,this.bottom,this.baseWidth=p!==void 0?p:u,this.baseHeight=g!==void 0?g:d,this.pixelX=0,this.pixelY=0,this.updatePixelXY(),this.properties={},this.rotation=0,this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceLeft=!1,this.faceRight=!1,this.faceTop=!1,this.faceBottom=!1,this.collisionCallback=void 0,this.collisionCallbackContext=this,this.tint=16777215,this.tintFill=!1,this.physics={}},containsPoint:function(i,h){return!(ithis.right||h>this.bottom)},copy:function(i){return this.index=i.index,this.alpha=i.alpha,this.properties=r(i.properties),this.visible=i.visible,this.setFlip(i.flipX,i.flipY),this.tint=i.tint,this.rotation=i.rotation,this.collideUp=i.collideUp,this.collideDown=i.collideDown,this.collideLeft=i.collideLeft,this.collideRight=i.collideRight,this.collisionCallback=i.collisionCallback,this.collisionCallbackContext=i.collisionCallbackContext,this},getCollisionGroup:function(){return this.tileset?this.tileset.getTileCollisionGroup(this.index):null},getTileData:function(){return this.tileset?this.tileset.getTileData(this.index):null},getLeft:function(i){var h=this.tilemapLayer;if(h){var s=h.tileToWorldXY(this.x,this.y,void 0,i);return s.x}return this.x*this.baseWidth},getRight:function(i){var h=this.tilemapLayer;return h?this.getLeft(i)+this.width*h.scaleX:this.getLeft(i)+this.width},getTop:function(i){var h=this.tilemapLayer;if(h){var s=h.tileToWorldXY(this.x,this.y,void 0,i);return s.y}return this.y*this.baseWidth-(this.height-this.baseHeight)},getBottom:function(i){var h=this.tilemapLayer;return h?this.getTop(i)+this.height*h.scaleY:this.getTop(i)+this.height},getBounds:function(i,h){return h===void 0&&(h=new n),h.x=this.getLeft(i),h.y=this.getTop(i),h.width=this.getRight(i)-h.x,h.height=this.getBottom(i)-h.y,h},getCenterX:function(i){return(this.getLeft(i)+this.getRight(i))/2},getCenterY:function(i){return(this.getTop(i)+this.getBottom(i))/2},intersects:function(i,h,s,l){return!(s<=this.pixelX||l<=this.pixelY||i>=this.right||h>=this.bottom)},isInteresting:function(i,h){return i&&h?this.canCollide||this.hasInterestingFace:i?this.collides:h?this.hasInterestingFace:!1},resetCollision:function(i){if(i===void 0&&(i=!0),this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,i){var h=this.tilemapLayer;h&&this.tilemapLayer.calculateFacesAt(this.x,this.y)}return this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(i,h,s,l,f){if(h===void 0&&(h=i),s===void 0&&(s=i),l===void 0&&(l=i),f===void 0&&(f=!0),this.collideLeft=i,this.collideRight=h,this.collideUp=s,this.collideDown=l,this.faceLeft=i,this.faceRight=h,this.faceTop=s,this.faceBottom=l,f){var u=this.tilemapLayer;u&&this.tilemapLayer.calculateFacesAt(this.x,this.y)}return this},setCollisionCallback:function(i,h){return i===null?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=i,this.collisionCallbackContext=h),this},setSize:function(i,h,s,l){return i!==void 0&&(this.width=i),h!==void 0&&(this.height=h),s!==void 0&&(this.baseWidth=s),l!==void 0&&(this.baseHeight=l),this.updatePixelXY(),this},updatePixelXY:function(){var i=this.layer.orientation;if(i===o.ORTHOGONAL)this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight;else if(i===o.ISOMETRIC)this.pixelX=(this.x-this.y)*this.baseWidth*.5,this.pixelY=(this.x+this.y)*this.baseHeight*.5;else if(i===o.STAGGERED)this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2),this.pixelY=this.y*(this.baseHeight/2);else if(i===o.HEXAGONAL){var h=this.layer.staggerAxis,s=this.layer.staggerIndex,l=this.layer.hexSideLength,f,u;h==="y"?(u=(this.baseHeight-l)/2+l,s==="odd"?this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2):this.pixelX=this.x*this.baseWidth-this.y%2*(this.baseWidth/2),this.pixelY=this.y*u):h==="x"&&(f=(this.baseWidth-l)/2+l,this.pixelX=this.x*f,s==="odd"?this.pixelY=this.y*this.baseHeight+this.x%2*(this.baseHeight/2):this.pixelY=this.y*this.baseHeight-this.x%2*(this.baseHeight/2))}return this.right=this.pixelX+this.baseWidth,this.bottom=this.pixelY+this.baseHeight,this},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||this.collisionCallback!==void 0}},collides:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}},hasInterestingFace:{get:function(){return this.faceTop||this.faceBottom||this.faceLeft||this.faceRight}},tileset:{get:function(){var i=this.layer.tilemapLayer;if(i){var h=i.gidMap[this.index];if(h)return h}return null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var i=this.tilemapLayer;return i?i.tilemap:null}}});c.exports=e},49075:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(84101),v=t(83419),o=t(39506),r=t(80341),n=t(95540),e=t(14977),i=t(27462),h=t(91907),s=t(36305),l=t(19133),f=t(68287),u=t(23029),d=t(81086),p=t(20442),g=t(33629),x=new v({initialize:function(C,P){this.scene=C,this.tileWidth=P.tileWidth,this.tileHeight=P.tileHeight,this.width=P.width,this.height=P.height,this.orientation=P.orientation,this.renderOrder=P.renderOrder,this.format=P.format,this.version=P.version,this.properties=P.properties,this.widthInPixels=P.widthInPixels,this.heightInPixels=P.heightInPixels,this.imageCollections=P.imageCollections,this.images=P.images,this.layers=P.layers,this.tiles=P.tiles,this.tilesets=P.tilesets,this.objects=P.objects,this.currentLayerIndex=0,this.hexSideLength=P.hexSideLength;var M=this.orientation;this._convert={WorldToTileXY:d.GetWorldToTileXYFunction(M),WorldToTileX:d.GetWorldToTileXFunction(M),WorldToTileY:d.GetWorldToTileYFunction(M),TileToWorldXY:d.GetTileToWorldXYFunction(M),TileToWorldX:d.GetTileToWorldXFunction(M),TileToWorldY:d.GetTileToWorldYFunction(M),GetTileCorners:d.GetTileCornersFunction(M)}},setRenderOrder:function(y){var C=["right-down","left-down","right-up","left-up"];return typeof y=="number"&&(y=C[y]),C.indexOf(y)>-1&&(this.renderOrder=y),this},addTilesetImage:function(y,C,P,M,R,I,L,B){if(y===void 0)return null;C==null&&(C=y);var N=this.scene.sys.textures;if(!N.exists(C))return console.warn('Texture key "%s" not found',C),null;var G=N.get(C),V=this.getTilesetIndex(y);if(V===null&&this.format===r.TILED_JSON)return console.warn('Tilemap has no tileset "%s". Its tilesets are %o',y,this.tilesets),null;var K=this.tilesets[V];return K?(K.setTileSize(P,M),K.setSpacing(R,I),K.setImage(G),K):(P===void 0&&(P=this.tileWidth),M===void 0&&(M=this.tileHeight),R===void 0&&(R=0),I===void 0&&(I=0),L===void 0&&(L=0),B===void 0&&(B={x:0,y:0}),K=new g(y,L,P,M,R,I,void 0,void 0,B),K.setImage(G),this.tilesets.push(K),this.tiles=a(this),K)},copy:function(y,C,P,M,R,I,L,B){return B=this.getLayer(B),B!==null?(d.Copy(y,C,P,M,R,I,L,B),this):null},createBlankLayer:function(y,C,P,M,R,I,L,B){P===void 0&&(P=0),M===void 0&&(M=0),R===void 0&&(R=this.width),I===void 0&&(I=this.height),L===void 0&&(L=this.tileWidth),B===void 0&&(B=this.tileHeight);var N=this.getLayerIndex(y);if(N!==null)return console.warn("Invalid Tilemap Layer ID: "+y),null;for(var G=new e({name:y,tileWidth:L,tileHeight:B,width:R,height:I,orientation:this.orientation}),V,K=0;K-1&&this.putTileAt(C,I.x,I.y,P,I.tilemapLayer)}return M},removeTileAt:function(y,C,P,M,R){return P===void 0&&(P=!0),M===void 0&&(M=!0),R=this.getLayer(R),R===null?null:d.RemoveTileAt(y,C,P,M,R)},removeTileAtWorldXY:function(y,C,P,M,R,I){return P===void 0&&(P=!0),M===void 0&&(M=!0),I=this.getLayer(I),I===null?null:d.RemoveTileAtWorldXY(y,C,P,M,R,I)},renderDebug:function(y,C,P){return P=this.getLayer(P),P===null?null:(this.orientation===h.ORTHOGONAL&&d.RenderDebug(y,C,P),this)},renderDebugFull:function(y,C){for(var P=this.layers,M=0;M{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(44603),v=t(31989);a.register("tilemap",function(o){var r=o!==void 0?o:{};return v(this.scene,r.key,r.tileWidth,r.tileHeight,r.width,r.height,r.data,r.insertNull)})},46029:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(39429),v=t(31989);a.register("tilemap",function(o,r,n,e,i,h,s){return o===null&&(o=void 0),r===null&&(r=void 0),n===null&&(n=void 0),e===null&&(e=void 0),i===null&&(i=void 0),v(this.scene,o,r,n,e,i,h,s)})},20442:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(78389),o=t(31401),r=t(95643),n=t(81086),e=t(19218),i=t(26099),h=new a({Extends:r,Mixins:[o.Alpha,o.BlendMode,o.ComputedSize,o.Depth,o.Flip,o.GetBounds,o.Mask,o.Origin,o.Pipeline,o.PostPipeline,o.Transform,o.Visible,o.ScrollFactor,v,e],initialize:function(l,f,u,d,p,g){r.call(this,l,"TilemapLayer"),this.isTilemap=!0,this.tilemap=f,this.layerIndex=u,this.layer=f.layers[u],this.layer.tilemapLayer=this,this.tileset=[],this.tilesDrawn=0,this.tilesTotal=this.layer.width*this.layer.height,this.culledTiles=[],this.skipCull=!1,this.cullPaddingX=1,this.cullPaddingY=1,this.cullCallback=n.GetCullTilesFunction(this.layer.orientation),this._renderOrder=0,this.gidMap=[],this.tempVec=new i,this.collisionCategory=1,this.collisionMask=1,this.setTilesets(d),this.setAlpha(this.layer.alpha),this.setPosition(p,g),this.setOrigin(0,0),this.setSize(f.tileWidth*this.layer.width,f.tileHeight*this.layer.height),this.initPipeline(),this.initPostPipeline(!1)},setTilesets:function(s){var l=[],f=[],u=this.tilemap;Array.isArray(s)||(s=[s]);for(var d=0;d=0&&s<4&&(this._renderOrder=s),this},calculateFacesAt:function(s,l){return n.CalculateFacesAt(s,l,this.layer),this},calculateFacesWithin:function(s,l,f,u){return n.CalculateFacesWithin(s,l,f,u,this.layer),this},createFromTiles:function(s,l,f,u,d){return n.CreateFromTiles(s,l,f,u,d,this.layer)},cull:function(s){return this.cullCallback(this.layer,s,this.culledTiles,this._renderOrder)},copy:function(s,l,f,u,d,p,g){return n.Copy(s,l,f,u,d,p,g,this.layer),this},fill:function(s,l,f,u,d,p){return n.Fill(s,l,f,u,d,p,this.layer),this},filterTiles:function(s,l,f,u,d,p,g){return n.FilterTiles(s,l,f,u,d,p,g,this.layer)},findByIndex:function(s,l,f){return n.FindByIndex(s,l,f,this.layer)},findTile:function(s,l,f,u,d,p,g){return n.FindTile(s,l,f,u,d,p,g,this.layer)},forEachTile:function(s,l,f,u,d,p,g){return n.ForEachTile(s,l,f,u,d,p,g,this.layer),this},setTint:function(s,l,f,u,d,p){s===void 0&&(s=16777215);var g=function(x){x.tint=s,x.tintFill=!1};return this.forEachTile(g,this,l,f,u,d,p)},setTintFill:function(s,l,f,u,d,p){s===void 0&&(s=16777215);var g=function(x){x.tint=s,x.tintFill=!0};return this.forEachTile(g,this,l,f,u,d,p)},getTileAt:function(s,l,f){return n.GetTileAt(s,l,f,this.layer)},getTileAtWorldXY:function(s,l,f,u){return n.GetTileAtWorldXY(s,l,f,u,this.layer)},getIsoTileAtWorldXY:function(s,l,f,u,d){f===void 0&&(f=!0);var p=this.tempVec;return n.IsometricWorldToTileXY(s,l,!0,p,d,this.layer,f),this.getTileAt(p.x,p.y,u)},getTilesWithin:function(s,l,f,u,d){return n.GetTilesWithin(s,l,f,u,d,this.layer)},getTilesWithinShape:function(s,l,f){return n.GetTilesWithinShape(s,l,f,this.layer)},getTilesWithinWorldXY:function(s,l,f,u,d,p){return n.GetTilesWithinWorldXY(s,l,f,u,d,p,this.layer)},hasTileAt:function(s,l){return n.HasTileAt(s,l,this.layer)},hasTileAtWorldXY:function(s,l,f){return n.HasTileAtWorldXY(s,l,f,this.layer)},putTileAt:function(s,l,f,u){return n.PutTileAt(s,l,f,u,this.layer)},putTileAtWorldXY:function(s,l,f,u,d){return n.PutTileAtWorldXY(s,l,f,u,d,this.layer)},putTilesAt:function(s,l,f,u){return n.PutTilesAt(s,l,f,u,this.layer),this},randomize:function(s,l,f,u,d){return n.Randomize(s,l,f,u,d,this.layer),this},removeTileAt:function(s,l,f,u){return n.RemoveTileAt(s,l,f,u,this.layer)},removeTileAtWorldXY:function(s,l,f,u,d){return n.RemoveTileAtWorldXY(s,l,f,u,d,this.layer)},renderDebug:function(s,l){return n.RenderDebug(s,l,this.layer),this},replaceByIndex:function(s,l,f,u,d,p){return n.ReplaceByIndex(s,l,f,u,d,p,this.layer),this},setSkipCull:function(s){return s===void 0&&(s=!0),this.skipCull=s,this},setCullPadding:function(s,l){return s===void 0&&(s=1),l===void 0&&(l=1),this.cullPaddingX=s,this.cullPaddingY=l,this},setCollision:function(s,l,f,u){return n.SetCollision(s,l,f,this.layer,u),this},setCollisionBetween:function(s,l,f,u){return n.SetCollisionBetween(s,l,f,u,this.layer),this},setCollisionByProperty:function(s,l,f){return n.SetCollisionByProperty(s,l,f,this.layer),this},setCollisionByExclusion:function(s,l,f){return n.SetCollisionByExclusion(s,l,f,this.layer),this},setCollisionFromCollisionGroup:function(s,l){return n.SetCollisionFromCollisionGroup(s,l,this.layer),this},setTileIndexCallback:function(s,l,f){return n.SetTileIndexCallback(s,l,f,this.layer),this},setTileLocationCallback:function(s,l,f,u,d,p){return n.SetTileLocationCallback(s,l,f,u,d,p,this.layer),this},shuffle:function(s,l,f,u){return n.Shuffle(s,l,f,u,this.layer),this},swapByIndex:function(s,l,f,u,d,p){return n.SwapByIndex(s,l,f,u,d,p,this.layer),this},tileToWorldX:function(s,l){return this.tilemap.tileToWorldX(s,l,this)},tileToWorldY:function(s,l){return this.tilemap.tileToWorldY(s,l,this)},tileToWorldXY:function(s,l,f,u){return this.tilemap.tileToWorldXY(s,l,f,u,this)},getTileCorners:function(s,l,f){return this.tilemap.getTileCorners(s,l,f,this)},weightedRandomize:function(s,l,f,u,d){return n.WeightedRandomize(l,f,u,d,s,this.layer),this},worldToTileX:function(s,l,f){return this.tilemap.worldToTileX(s,l,f,this)},worldToTileY:function(s,l,f){return this.tilemap.worldToTileY(s,l,f,this)},worldToTileXY:function(s,l,f,u,d){return this.tilemap.worldToTileXY(s,l,f,u,d,this)},destroy:function(s){s===void 0&&(s=!0),this.tilemap&&(this.layer.tilemapLayer===this&&(this.layer.tilemapLayer=void 0),s&&this.tilemap.removeLayer(this),this.tilemap=void 0,this.layer=void 0,this.culledTiles.length=0,this.cullCallback=null,this.gidMap=[],this.tileset=[],r.prototype.destroy.call(this))}});c.exports=h},16153:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(61340),v=new a,o=new a,r=new a,n=function(e,i,h,s){var l=i.cull(h),f=l.length,u=h.alpha*i.alpha;if(!(f===0||u<=0)){var d=v,p=o,g=r;p.applyITRS(i.x,i.y,i.rotation,i.scaleX,i.scaleY),d.copyFrom(h.matrix);var x=e.currentContext,y=i.gidMap;x.save(),s?(d.multiplyWithOffset(s,-h.scrollX*i.scrollFactorX,-h.scrollY*i.scrollFactorY),p.e=i.x,p.f=i.y,d.multiply(p,g),g.copyToContext(x)):(p.e-=h.scrollX*i.scrollFactorX,p.f-=h.scrollY*i.scrollFactorY,p.copyToContext(x)),(!e.antialias||i.scaleX>1||i.scaleY>1)&&(x.imageSmoothingEnabled=!1);for(var C=0;C{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(29747),v=a,o=a;v=t(99558),o=t(16153),c.exports={renderWebGL:v,renderCanvas:o}},99558:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(70554),v=function(o,r,n){var e=r.cull(n),i=e.length,h=n.alpha*r.alpha;if(!(i===0||h<=0)){var s=r.gidMap,l=o.pipelines.set(r.pipeline,r),f=a.getTintAppendFloatAlpha,u=r.scrollFactorX,d=r.scrollFactorY,p=r.x,g=r.y,x=r.scaleX,y=r.scaleY;o.pipelines.preBatch(r);for(var C=0;C{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(26099),o=new a({initialize:function(n,e,i,h,s,l,f,u,d){(i===void 0||i<=0)&&(i=32),(h===void 0||h<=0)&&(h=32),s===void 0&&(s=0),l===void 0&&(l=0),f===void 0&&(f={}),u===void 0&&(u={}),this.name=n,this.firstgid=e,this.tileWidth=i,this.tileHeight=h,this.tileMargin=s,this.tileSpacing=l,this.tileProperties=f,this.tileData=u,this.tileOffset=new v,d!==void 0&&this.tileOffset.set(d.x,d.y),this.image=null,this.glTexture=null,this.rows=0,this.columns=0,this.total=0,this.texCoordinates=[]},getTileProperties:function(r){return this.containsTileIndex(r)?this.tileProperties[r-this.firstgid]:null},getTileData:function(r){return this.containsTileIndex(r)?this.tileData[r-this.firstgid]:null},getTileCollisionGroup:function(r){var n=this.getTileData(r);return n&&n.objectgroup?n.objectgroup:null},containsTileIndex:function(r){return r>=this.firstgid&&re.width||n.height>e.height?this.updateTileData(n.width,n.height):this.updateTileData(e.width,e.height,e.x,e.y),this},setTileSize:function(r,n){return r!==void 0&&(this.tileWidth=r),n!==void 0&&(this.tileHeight=n),this.image&&this.updateTileData(this.image.source[0].width,this.image.source[0].height),this},setSpacing:function(r,n){return r!==void 0&&(this.tileMargin=r),n!==void 0&&(this.tileSpacing=n),this.image&&this.updateTileData(this.image.source[0].width,this.image.source[0].height),this},updateTileData:function(r,n,e,i){e===void 0&&(e=0),i===void 0&&(i=0);var h=(n-this.tileMargin*2+this.tileSpacing)/(this.tileHeight+this.tileSpacing),s=(r-this.tileMargin*2+this.tileSpacing)/(this.tileWidth+this.tileSpacing);(h%1!==0||s%1!==0)&&console.warn("Image tile area not tile size multiple in: "+this.name),h=Math.floor(h),s=Math.floor(s),this.rows=h,this.columns=s,this.total=h*s,this.texCoordinates.length=0;for(var l=this.tileMargin+e,f=this.tileMargin+i,u=0;u{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(7423),v=function(o,r,n){var e=a(o,r,!0,n),i=a(o,r-1,!0,n),h=a(o,r+1,!0,n),s=a(o-1,r,!0,n),l=a(o+1,r,!0,n),f=e&&e.collides;return f&&(e.faceTop=!0,e.faceBottom=!0,e.faceLeft=!0,e.faceRight=!0),i&&i.collides&&(f&&(e.faceTop=!1),i.faceBottom=!f),h&&h.collides&&(f&&(e.faceBottom=!1),h.faceTop=!f),s&&s.collides&&(f&&(e.faceLeft=!1),s.faceRight=!f),l&&l.collides&&(f&&(e.faceRight=!1),l.faceLeft=!f),e&&!e.collides&&e.resetFaces(),e};c.exports=v},42573:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(7423),v=t(7386),o=function(r,n,e,i,h){for(var s=null,l=null,f=null,u=null,d=v(r,n,e,i,null,h),p=0;p{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(26099),v=new a,o=function(r,n,e,i){var h=e.tilemapLayer,s=h.cullPaddingX,l=h.cullPaddingY,f=h.tilemap.tileToWorldXY(r,n,v,i,h);return f.x>i.worldView.x+h.scaleX*e.tileWidth*(-s-.5)&&f.xi.worldView.y+h.scaleY*e.tileHeight*(-l-1)&&f.y{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(42573),v=t(7386),o=t(62991),r=t(23029),n=function(e,i,h,s,l,f,u,d){u===void 0&&(u=!0);var p=v(e,i,h,s,null,d),g=[];p.forEach(function(I){var L=new r(I.layer,I.index,I.x,I.y,I.width,I.height,I.baseWidth,I.baseHeight);L.copy(I),g.push(L)});for(var x=l-e,y=f-i,C=0;C{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(62644),v=t(7386),o=t(27987),r=function(n,e,i,h,s,l){i||(i={}),Array.isArray(n)||(n=[n]);var f=l.tilemapLayer;h||(h=f.scene),s||(s=h.cameras.main);var u=l.width,d=l.height,p=v(0,0,u,d,null,l),g=[],x,y=function(R,I,L){for(var B=0;B{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(87841),v=t(63448),o=t(56583),r=new a,n=function(e,i){var h=e.tilemapLayer.tilemap,s=e.tilemapLayer,l=Math.floor(h.tileWidth*s.scaleX),f=Math.floor(h.tileHeight*s.scaleY),u=o(i.worldView.x-s.x,l,0,!0)-s.cullPaddingX,d=v(i.worldView.right-s.x,l,0,!0)+s.cullPaddingX,p=o(i.worldView.y-s.y,f,0,!0)-s.cullPaddingY,g=v(i.worldView.bottom-s.y,f,0,!0)+s.cullPaddingY;return r.setTo(u,p,d-u,g-p)};c.exports=n},30003:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(19545),v=t(32483),o=function(r,n,e,i){e===void 0&&(e=[]),i===void 0&&(i=0),e.length=0;var h=r.tilemapLayer,s=a(r,n);return(h.skipCull||h.scrollFactorX!==1||h.scrollFactorY!==1)&&(s.left=0,s.right=r.width,s.top=0,s.bottom=r.height),v(r,s,i,e),e};c.exports=o},35137:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(7386),v=t(42573),o=t(20576),r=function(n,e,i,h,s,l,f){for(var u=f.collideIndexes.indexOf(n)!==-1,d=a(e,i,h,s,null,f),p=0;p{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(7386),v=function(o,r,n,e,i,h,s,l){var f=a(n,e,i,h,s,l);return f.filter(o,r)};c.exports=v},52692:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){a===void 0&&(a=0),v===void 0&&(v=!1);var r=0,n,e,i;if(v){for(e=o.height-1;e>=0;e--)for(n=o.width-1;n>=0;n--)if(i=o.data[e][n],i&&i.index===t){if(r===a)return i;r+=1}}else for(e=0;e{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(7386),v=function(o,r,n,e,i,h,s,l){var f=a(n,e,i,h,s,l);return f.find(o,r)||null};c.exports=v},97560:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(7386),v=function(o,r,n,e,i,h,s,l){var f=a(n,e,i,h,s,l);f.forEach(o,r)};c.exports=v},43305:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(91907),v=t(30003),o=t(9474),r=t(14018),n=t(29747),e=t(54503),i=function(h){return h===a.ORTHOGONAL?v:h===a.HEXAGONAL?o:h===a.STAGGERED?e:h===a.ISOMETRIC?r:n};c.exports=i},7423:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(62991),v=function(o,r,n,e){if(n===void 0&&(n=!1),a(o,r,e)){var i=e.data[r][o]||null;return i?i.index===-1?n?i:null:i:null}else return null};c.exports=v},60540:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(7423),v=t(26099),o=new v,r=function(n,e,i,h,s){return s.tilemapLayer.worldToTileXY(n,e,!0,o,h),a(o.x,o.y,i,s)};c.exports=r},55826:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(26099),v=function(o,r,n,e){var i=e.baseTileWidth,h=e.baseTileHeight,s=e.tilemapLayer,l=0,f=0;s&&(n||(n=s.scene.cameras.main),l=s.x+n.scrollX*(1-s.scrollFactorX),f=s.y+n.scrollY*(1-s.scrollFactorY),i*=s.scaleX,h*=s.scaleY);var u=l+o*i,d=f+r*h;return[new a(u,d),new a(u+i,d),new a(u+i,d+h),new a(u,d+h)]};c.exports=v},11758:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(91907),v=t(27229),o=t(29747),r=t(55826),n=function(e){return e===a.ORTHOGONAL?r:e===a.ISOMETRIC?o:e===a.HEXAGONAL?v:(e===a.STAGGERED,o)};c.exports=n},39167:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(91907),v=t(29747),o=t(97281),r=function(n){return n===a.ORTHOGONAL?o:v};c.exports=r},62e3:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(91907),v=t(19951),o=t(14127),r=t(29747),n=t(97202),e=t(70326),i=function(h){return h===a.ORTHOGONAL?e:h===a.ISOMETRIC?o:h===a.HEXAGONAL?v:h===a.STAGGERED?n:r};c.exports=i},5984:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(91907),v=t(29747),o=t(28054),r=t(29650),n=function(e){return e===a.ORTHOGONAL?r:e===a.STAGGERED?o:v};c.exports=n},7386:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(95540),v=function(o,r,n,e,i,h){o===void 0&&(o=0),r===void 0&&(r=0),n===void 0&&(n=h.width),e===void 0&&(e=h.height),i||(i={});var s=a(i,"isNotEmpty",!1),l=a(i,"isColliding",!1),f=a(i,"hasInterestingFace",!1);o<0&&(n+=o,o=0),r<0&&(e+=r,r=0),o+n>h.width&&(n=Math.max(h.width-o,0)),r+e>h.height&&(e=Math.max(h.height-r,0));for(var u=[],d=r;d{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(55738),v=t(7386),o=t(91865),r=t(29747),n=t(26099),e=function(f,u){return o.RectangleToTriangle(u,f)},i=new n,h=new n,s=new n,l=function(f,u,d,p){if(f===void 0)return[];var g=r;f instanceof a.Circle?g=o.CircleToRectangle:f instanceof a.Rectangle?g=o.RectangleToRectangle:f instanceof a.Triangle?g=e:f instanceof a.Line&&(g=o.LineToRectangle),p.tilemapLayer.worldToTileXY(f.left,f.top,!0,h,d);var x=h.x,y=h.y;p.tilemapLayer.worldToTileXY(f.right,f.bottom,!1,s,d);var C=Math.ceil(s.x),P=Math.ceil(s.y),M=Math.max(C-x,1),R=Math.max(P-y,1),I=v(x,y,M,R,u,p),L=p.tileWidth,B=p.tileHeight;p.tilemapLayer&&(L*=p.tilemapLayer.scaleX,B*=p.tilemapLayer.scaleY);for(var N=[],G=new a.Rectangle(0,0,L,B),V=0;V{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(7386),v=t(26099),o=new v,r=new v,n=function(e,i,h,s,l,f,u){var d=u.tilemapLayer.tilemap._convert.WorldToTileXY;d(e,i,!0,o,f,u);var p=o.x,g=o.y;d(e+h,i+s,!1,r,f,u);var x=Math.ceil(r.x),y=Math.ceil(r.y);return a(p,g,x-p,y-g,l,u)};c.exports=n},96113:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(91907),v=t(20242),o=t(10095),r=function(n){return n===a.ORTHOGONAL?o:v};c.exports=r},16926:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(91907),v=t(86625),o=t(96897),r=t(29747),n=t(15108),e=t(85896),i=function(h){return h===a.ORTHOGONAL?e:h===a.ISOMETRIC?o:h===a.HEXAGONAL?v:h===a.STAGGERED?n:r};c.exports=i},55762:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(91907),v=t(20242),o=t(51900),r=t(63288),n=function(e){return e===a.ORTHOGONAL?r:e===a.STAGGERED?o:v};c.exports=n},45091:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(62991),v=function(o,r,n){if(a(o,r,n)){var e=n.data[r][o];return e!==null&&e.index>-1}else return!1};c.exports=v},24152:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(45091),v=t(26099),o=new v,r=function(n,e,i,h){h.tilemapLayer.worldToTileXY(n,e,!0,o,i);var s=o.x,l=o.y;return a(s,l,h)};c.exports=r},90454:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(63448),v=t(56583),o=function(r,n){var e=r.tilemapLayer.tilemap,i=r.tilemapLayer,h=Math.floor(e.tileWidth*i.scaleX),s=Math.floor(e.tileHeight*i.scaleY),l=r.hexSideLength,f,u,d,p;if(r.staggerAxis==="y"){var g=(s-l)/2+l;f=v(n.worldView.x-i.x,h,0,!0)-i.cullPaddingX,u=a(n.worldView.right-i.x,h,0,!0)+i.cullPaddingX,d=v(n.worldView.y-i.y,g,0,!0)-i.cullPaddingY,p=a(n.worldView.bottom-i.y,g,0,!0)+i.cullPaddingY}else{var x=(h-l)/2+l;f=v(n.worldView.x-i.x,x,0,!0)-i.cullPaddingX,u=a(n.worldView.right-i.x,x,0,!0)+i.cullPaddingX,d=v(n.worldView.y-i.y,s,0,!0)-i.cullPaddingY,p=a(n.worldView.bottom-i.y,s,0,!0)+i.cullPaddingY}return{left:f,right:u,top:d,bottom:p}};c.exports=o},9474:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(90454),v=t(32483),o=function(r,n,e,i){e===void 0&&(e=[]),i===void 0&&(i=0),e.length=0;var h=r.tilemapLayer,s=a(r,n);return h.skipCull&&h.scrollFactorX===1&&h.scrollFactorY===1&&(s.left=0,s.right=r.width,s.top=0,s.bottom=r.height),v(r,s,i,e),e};c.exports=o},27229:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(19951),v=t(26099),o=new v,r=function(n,e,i,h){var s=h.baseTileWidth,l=h.baseTileHeight,f=h.tilemapLayer;f&&(s*=f.scaleX,l*=f.scaleY);var u=a(n,e,o,i,h),d=[],p=.5773502691896257,g,x;h.staggerAxis==="y"?(g=p*s,x=l/2):(g=s/2,x=p*l);for(var y=0;y<6;y++){var C=2*Math.PI*(.5-y)/6;d.push(new v(u.x+g*Math.cos(C),u.y+x*Math.sin(C)))}return d};c.exports=r},19951:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(26099),v=function(o,r,n,e,i){n||(n=new a);var h=i.baseTileWidth,s=i.baseTileHeight,l=i.tilemapLayer,f=0,u=0;l&&(e||(e=l.scene.cameras.main),f=l.x+e.scrollX*(1-l.scrollFactorX),u=l.y+e.scrollY*(1-l.scrollFactorY),h*=l.scaleX,s*=l.scaleY);var d=h/2,p=s/2,g,x;return i.staggerAxis==="y"?(g=f+h*o+h,x=u+1.5*r*p+p,r%2===0&&(this.staggerIndex==="odd"?g-=d:g+=d)):this.staggerAxis==="x"&&this.staggerIndex==="odd"&&(g=f+1.5*o*d+d,x=u+s*o+s,o%2===0&&(this.staggerIndex==="odd"?x-=p:x+=p)),n.set(g,x)};c.exports=v},86625:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(26099),v=function(o,r,n,e,i,h){e||(e=new a);var s=h.baseTileWidth,l=h.baseTileHeight,f=h.tilemapLayer;f&&(i||(i=f.scene.cameras.main),o=o-(f.x+i.scrollX*(1-f.scrollFactorX)),r=r-(f.y+i.scrollY*(1-f.scrollFactorY)),s*=f.scaleX,l*=f.scaleY);var u=.5773502691896257,d=-.3333333333333333,p=0,g=.6666666666666666,x=s/2,y=l/2,C,P,M,R,I;h.staggerAxis==="y"?(C=(o-x)/(u*s),P=(r-y)/y,M=u*C+d*P,R=p*C+g*P):(C=(o-x)/x,P=(r-y)/(u*l),M=d*C+u*P,R=g*C+p*P),I=-M-R;var L=Math.round(M),B=Math.round(R),N=Math.round(I),G=Math.abs(L-M),V=Math.abs(B-R),K=Math.abs(N-I);G>V&&G>K?L=-B-N:V>K&&(B=-L-N);var j,J=B;return h.staggerIndex==="odd"?j=J%2===0?B/2+L:B/2+L-.5:j=J%2===0?B/2+L:B/2+L+.5,e.set(j,J)};c.exports=v},62991:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){return t>=0&&t=0&&a{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(33528),v=function(o,r,n,e){n===void 0&&(n=[]),e===void 0&&(e=0),n.length=0;var i=o.tilemapLayer,h=o.data,s=o.width,l=o.height,f=i.skipCull,u=0,d=s,p=0,g=l,x,y,C;if(e===0)for(y=p;y=u;x--)C=h[y][x],!(!C||C.index===-1||!C.visible||C.alpha===0)&&(!f&&!a(x,y,o,r)||n.push(C));else if(e===2)for(y=g;y>=p;y--)for(x=u;x=p;y--)for(x=d;x>=u;x--)C=h[y][x],!(!C||C.index===-1||!C.visible||C.alpha===0)&&(!f&&!a(x,y,o,r)||n.push(C));return i.tilesDrawn=n.length,i.tilesTotal=s*l,n};c.exports=v},14127:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(26099),v=function(o,r,n,e,i){n||(n=new a);var h=i.baseTileWidth,s=i.baseTileHeight,l=i.tilemapLayer,f=0,u=0;l&&(e||(e=l.scene.cameras.main),f=l.x+e.scrollX*(1-l.scrollFactorX),h*=l.scaleX,u=l.y+e.scrollY*(1-l.scrollFactorY),s*=l.scaleY);var d=f+(o-r)*(h/2),p=u+(o+r)*(s/2);return n.set(d,p)};c.exports=v},96897:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(26099),v=function(o,r,n,e,i,h,s){e||(e=new a);var l=h.baseTileWidth,f=h.baseTileHeight,u=h.tilemapLayer;u&&(i||(i=u.scene.cameras.main),r=r-(u.y+i.scrollY*(1-u.scrollFactorY)),f*=u.scaleY,o=o-(u.x+i.scrollX*(1-u.scrollFactorX)),l*=u.scaleX);var d=l/2,p=f/2;o=o-d,s||(r=r-f);var g=.5*(o/d+r/p),x=.5*(-o/d+r/p);return n&&(g=Math.floor(g),x=Math.floor(x)),e.set(g,x)};c.exports=v},71558:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(23029),v=t(62991),o=t(72023),r=t(20576),n=function(e,i,h,s,l){if(s===void 0&&(s=!0),!v(i,h,l))return null;var f,u=l.data[h][i],d=u&&u.collides;e instanceof a?(l.data[h][i]===null&&(l.data[h][i]=new a(l,e.index,i,h,l.tileWidth,l.tileHeight)),l.data[h][i].copy(e)):(f=e,l.data[h][i]===null?l.data[h][i]=new a(l,f,i,h,l.tileWidth,l.tileHeight):l.data[h][i].index=f);var p=l.data[h][i],g=l.collideIndexes.indexOf(p.index)!==-1;if(f=e instanceof a?e.index:e,f===-1)p.width=l.tileWidth,p.height=l.tileHeight;else{var x=l.tilemapLayer.tilemap,y=x.tiles,C=y[f][2],P=x.tilesets[C];p.width=P.tileWidth,p.height=P.tileHeight}return r(p,g),s&&d!==p.collides&&o(i,h,l),p};c.exports=n},26303:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(71558),v=t(26099),o=new v,r=function(n,e,i,h,s,l){return l.tilemapLayer.worldToTileXY(e,i,!0,o,s,l),a(n,o.x,o.y,h,l)};c.exports=r},14051:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(42573),v=t(71558),o=function(r,n,e,i,h){if(i===void 0&&(i=!0),!Array.isArray(r))return null;Array.isArray(r[0])||(r=[r]);for(var s=r.length,l=r[0].length,f=0;f{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(7386),v=t(26546),o=function(r,n,e,i,h,s){var l,f=a(r,n,e,i,{},s);if(!h)for(h=[],l=0;l{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(23029),v=t(62991),o=t(72023),r=function(n,e,i,h,s){if(i===void 0&&(i=!0),h===void 0&&(h=!0),!v(n,e,s))return null;var l=s.data[e][n];if(l)s.data[e][n]=i?null:new a(s,-1,n,e,s.tileWidth,s.tileHeight);else return null;return h&&l&&l.collides&&o(n,e,s),l};c.exports=r},94178:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(63557),v=t(26099),o=new v,r=function(n,e,i,h,s,l){return l.tilemapLayer.worldToTileXY(n,e,!0,o,s,l),a(o.x,o.y,i,h,l)};c.exports=r},15533:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(7386),v=t(3956),o=new v(105,210,231,150),r=new v(243,134,48,200),n=new v(40,39,37,150),e=function(i,h,s){h===void 0&&(h={});var l=h.tileColor!==void 0?h.tileColor:o,f=h.collidingTileColor!==void 0?h.collidingTileColor:r,u=h.faceColor!==void 0?h.faceColor:n,d=a(0,0,s.width,s.height,null,s);i.translateCanvas(s.tilemapLayer.x,s.tilemapLayer.y),i.scaleCanvas(s.tilemapLayer.scaleX,s.tilemapLayer.scaleY);for(var p=0;p{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(7386),v=function(o,r,n,e,i,h,s){for(var l=a(n,e,i,h,null,s),f=0;f{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){var r=t.data,n=t.width,e=t.height,i=t.tilemapLayer,h=Math.max(0,a.left),s=Math.min(n,a.right),l=Math.max(0,a.top),f=Math.min(e,a.bottom),u,d,p;if(v===0)for(d=l;d=h;u--)p=r[d][u],!(!p||p.index===-1||!p.visible||p.alpha===0)&&o.push(p);else if(v===2)for(d=f;d>=l;d--)for(u=h;r[d]&&u=l;d--)for(u=s;r[d]&&u>=h;u--)p=r[d][u],!(!p||p.index===-1||!p.visible||p.alpha===0)&&o.push(p);return i.tilesDrawn=o.length,i.tilesTotal=n*e,o};c.exports=m},57068:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(20576),v=t(42573),o=t(9589),r=function(n,e,i,h,s){e===void 0&&(e=!0),i===void 0&&(i=!0),s===void 0&&(s=!0),Array.isArray(n)||(n=[n]);for(var l=0;l{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(20576),v=t(42573),o=t(9589),r=function(n,e,i,h,s,l){if(i===void 0&&(i=!0),h===void 0&&(h=!0),l===void 0&&(l=!0),!(n>e)){for(var f=n;f<=e;f++)o(f,i,s);if(l)for(var u=0;u=n&&p.index<=e&&a(p,i)}h&&v(0,0,s.width,s.height,s)}};c.exports=r},75661:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(20576),v=t(42573),o=t(9589),r=function(n,e,i,h){e===void 0&&(e=!0),i===void 0&&(i=!0),Array.isArray(n)||(n=[n]);for(var s=0;s{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(20576),v=t(42573),o=t(97022),r=function(n,e,i,h){e===void 0&&(e=!0),i===void 0&&(i=!0);for(var s=0;s{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(20576),v=t(42573),o=function(r,n,e){r===void 0&&(r=!0),n===void 0&&(n=!0);for(var i=0;i0&&a(s,r)}}n&&v(0,0,e.width,e.height,e)};c.exports=o},9589:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){var o=v.collideIndexes.indexOf(t);a&&o===-1?v.collideIndexes.push(t):!a&&o!==-1&&v.collideIndexes.splice(o,1)};c.exports=m},20576:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){a?t.setCollision(!0,!0,!0,!0,!1):t.resetCollision(!1)};c.exports=m},79583:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){if(typeof t=="number")o.callbacks[t]=a!==null?{callback:a,callbackContext:v}:void 0;else for(var r=0,n=t.length;r{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(7386),v=function(o,r,n,e,i,h,s){for(var l=a(o,r,n,e,null,s),f=0;f{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(7386),v=t(33680),o=function(r,n,e,i,h){var s=a(r,n,e,i,null,h),l=s.map(function(u){return u.index});v(l);for(var f=0;f{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(63448),v=t(56583),o=function(r,n){var e=r.tilemapLayer.tilemap,i=r.tilemapLayer,h=Math.floor(e.tileWidth*i.scaleX),s=Math.floor(e.tileHeight*i.scaleY),l=v(n.worldView.x-i.x,h,0,!0)-i.cullPaddingX,f=a(n.worldView.right-i.x,h,0,!0)+i.cullPaddingX,u=v(n.worldView.y-i.y,s/2,0,!0)-i.cullPaddingY,d=a(n.worldView.bottom-i.y,s/2,0,!0)+i.cullPaddingY;return{left:l,right:f,top:u,bottom:d}};c.exports=o},54503:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(61325),v=t(32483),o=function(r,n,e,i){e===void 0&&(e=[]),i===void 0&&(i=0),e.length=0;var h=r.tilemapLayer,s=a(r,n);return h.skipCull&&h.scrollFactorX===1&&h.scrollFactorY===1&&(s.left=0,s.right=r.width,s.top=0,s.bottom=r.height),v(r,s,i,e),e};c.exports=o},97202:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(26099),v=function(o,r,n,e,i){n||(n=new a);var h=i.baseTileWidth,s=i.baseTileHeight,l=i.tilemapLayer,f=0,u=0;l&&(e||(e=l.scene.cameras.main),f=l.x+e.scrollX*(1-l.scrollFactorX),h*=l.scaleX,u=l.y+e.scrollY*(1-l.scrollFactorY),s*=l.scaleY);var d=f+o*h+r%2*(h/2),p=u+r*(s/2);return n.set(d,p)};c.exports=v},28054:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){var o=v.baseTileHeight,r=v.tilemapLayer,n=0;return r&&(a===void 0&&(a=r.scene.cameras.main),n=r.y+a.scrollY*(1-r.scrollFactorY),o*=r.scaleY),n+t*(o/2)+o};c.exports=m},15108:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(26099),v=function(o,r,n,e,i,h){e||(e=new a);var s=h.baseTileWidth,l=h.baseTileHeight,f=h.tilemapLayer;f&&(i||(i=f.scene.cameras.main),r=r-(f.y+i.scrollY*(1-f.scrollFactorY)),l*=f.scaleY,o=o-(f.x+i.scrollX*(1-f.scrollFactorX)),s*=f.scaleX);var u=n?Math.floor(r/(l/2)):r/(l/2),d=n?Math.floor((o+u%2*.5*s)/s):(o+u%2*.5*s)/s;return e.set(d,u)};c.exports=v},51900:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){var r=o.baseTileHeight,n=o.tilemapLayer;return n&&(v||(v=n.scene.cameras.main),t=t-(n.y+v.scrollY*(1-n.scrollFactorY)),r*=n.scaleY),a?Math.floor(t/(r/2)):t/(r/2)};c.exports=m},86560:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(7386),v=function(o,r,n,e,i,h,s){for(var l=a(n,e,i,h,null,s),f=0;f{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){var o=v.baseTileWidth,r=v.tilemapLayer,n=0;return r&&(a||(a=r.scene.cameras.main),n=r.x+a.scrollX*(1-r.scrollFactorX),o*=r.scaleX),n+t*o};c.exports=m},70326:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(97281),v=t(29650),o=t(26099),r=function(n,e,i,h,s){return i||(i=new o(0,0)),i.x=a(n,h,s),i.y=v(e,h,s),i};c.exports=r},29650:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){var o=v.baseTileHeight,r=v.tilemapLayer,n=0;return r&&(a||(a=r.scene.cameras.main),n=r.y+a.scrollY*(1-r.scrollFactorY),o*=r.scaleY),n+t*o};c.exports=m},77366:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(7386),v=t(75508),o=function(r,n,e,i,h,s){if(h){var l,f=a(r,n,e,i,null,s),u=0;for(l=0;l{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(85896),v=t(26099),o=new v,r=function(n,e,i,h){return a(n,0,e,o,i,h),o.x};c.exports=r},85896:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(26099),v=function(o,r,n,e,i,h){n===void 0&&(n=!0),e||(e=new a);var s=h.baseTileWidth,l=h.baseTileHeight,f=h.tilemapLayer;f&&(i||(i=f.scene.cameras.main),o=o-(f.x+i.scrollX*(1-f.scrollFactorX)),r=r-(f.y+i.scrollY*(1-f.scrollFactorY)),s*=f.scaleX,l*=f.scaleY);var u=o/s,d=r/l;return n&&(u=Math.floor(u),d=Math.floor(d)),e.set(u,d)};c.exports=v},63288:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(85896),v=t(26099),o=new v,r=function(n,e,i,h){return a(0,n,e,o,i,h),o.y};c.exports=r},81086:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={CalculateFacesAt:t(72023),CalculateFacesWithin:t(42573),CheckIsoBounds:t(33528),Copy:t(1785),CreateFromTiles:t(78419),CullBounds:t(19545),CullTiles:t(30003),Fill:t(35137),FilterTiles:t(40253),FindByIndex:t(52692),FindTile:t(66151),ForEachTile:t(97560),GetCullTilesFunction:t(43305),GetTileAt:t(7423),GetTileAtWorldXY:t(60540),GetTileCorners:t(55826),GetTileCornersFunction:t(11758),GetTilesWithin:t(7386),GetTilesWithinShape:t(91141),GetTilesWithinWorldXY:t(96523),GetTileToWorldXFunction:t(39167),GetTileToWorldXYFunction:t(62e3),GetTileToWorldYFunction:t(5984),GetWorldToTileXFunction:t(96113),GetWorldToTileXYFunction:t(16926),GetWorldToTileYFunction:t(55762),HasTileAt:t(45091),HasTileAtWorldXY:t(24152),HexagonalCullBounds:t(90454),HexagonalCullTiles:t(9474),HexagonalGetTileCorners:t(27229),HexagonalTileToWorldXY:t(19951),HexagonalWorldToTileXY:t(86625),IsInLayerBounds:t(62991),IsometricCullTiles:t(14018),IsometricTileToWorldXY:t(14127),IsometricWorldToTileXY:t(96897),PutTileAt:t(71558),PutTileAtWorldXY:t(26303),PutTilesAt:t(14051),Randomize:t(77389),RemoveTileAt:t(63557),RemoveTileAtWorldXY:t(94178),RenderDebug:t(15533),ReplaceByIndex:t(27987),RunCull:t(32483),SetCollision:t(57068),SetCollisionBetween:t(37266),SetCollisionByExclusion:t(75661),SetCollisionByProperty:t(64740),SetCollisionFromCollisionGroup:t(63307),SetLayerCollisionIndex:t(9589),SetTileCollision:t(20576),SetTileIndexCallback:t(79583),SetTileLocationCallback:t(93254),Shuffle:t(32903),StaggeredCullBounds:t(61325),StaggeredCullTiles:t(54503),StaggeredTileToWorldXY:t(97202),StaggeredTileToWorldY:t(28054),StaggeredWorldToTileXY:t(15108),StaggeredWorldToTileY:t(51900),SwapByIndex:t(86560),TileToWorldX:t(97281),TileToWorldXY:t(70326),TileToWorldY:t(29650),WeightedRandomize:t(77366),WorldToTileX:t(10095),WorldToTileXY:t(85896),WorldToTileY:t(63288)}},91907:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={ORTHOGONAL:0,ISOMETRIC:1,STAGGERED:2,HEXAGONAL:3}},21829:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a={ORIENTATION:t(91907)};c.exports=a},62501:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(79291),v=t(21829),o={Components:t(81086),Parsers:t(57442),Formats:t(80341),ImageCollection:t(16536),ParseToTilemap:t(31989),Tile:t(23029),Tilemap:t(49075),TilemapCreator:t(45939),TilemapFactory:t(46029),Tileset:t(33629),TilemapLayer:t(20442),Orientation:t(91907),LayerData:t(14977),MapData:t(87010),ObjectLayer:t(48700)};o=a(!1,o,v.ORIENTATION),c.exports=o},14977:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(91907),o=t(95540),r=new a({initialize:function(e){e===void 0&&(e={}),this.name=o(e,"name","layer"),this.id=o(e,"id",0),this.x=o(e,"x",0),this.y=o(e,"y",0),this.width=o(e,"width",0),this.height=o(e,"height",0),this.tileWidth=o(e,"tileWidth",0),this.tileHeight=o(e,"tileHeight",0),this.baseTileWidth=o(e,"baseTileWidth",this.tileWidth),this.baseTileHeight=o(e,"baseTileHeight",this.tileHeight),this.orientation=o(e,"orientation",v.ORTHOGONAL),this.widthInPixels=o(e,"widthInPixels",this.width*this.baseTileWidth),this.heightInPixels=o(e,"heightInPixels",this.height*this.baseTileHeight),this.alpha=o(e,"alpha",1),this.visible=o(e,"visible",!0),this.properties=o(e,"properties",[]),this.indexes=o(e,"indexes",[]),this.collideIndexes=o(e,"collideIndexes",[]),this.callbacks=o(e,"callbacks",[]),this.bodies=o(e,"bodies",[]),this.data=o(e,"data",[]),this.tilemapLayer=o(e,"tilemapLayer",null),this.hexSideLength=o(e,"hexSideLength",0),this.staggerAxis=o(e,"staggerAxis","y"),this.staggerIndex=o(e,"staggerIndex","odd")}});c.exports=r},87010:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(91907),o=t(95540),r=new a({initialize:function(e){e===void 0&&(e={}),this.name=o(e,"name","map"),this.width=o(e,"width",0),this.height=o(e,"height",0),this.infinite=o(e,"infinite",!1),this.tileWidth=o(e,"tileWidth",0),this.tileHeight=o(e,"tileHeight",0),this.widthInPixels=o(e,"widthInPixels",this.width*this.tileWidth),this.heightInPixels=o(e,"heightInPixels",this.height*this.tileHeight),this.format=o(e,"format",null),this.orientation=o(e,"orientation",v.ORTHOGONAL),this.renderOrder=o(e,"renderOrder","right-down"),this.version=o(e,"version","1"),this.properties=o(e,"properties",{}),this.layers=o(e,"layers",[]),this.images=o(e,"images",[]),this.objects=o(e,"objects",[]),Array.isArray(this.objects)||(this.objects=[]),this.collision=o(e,"collision",{}),this.tilesets=o(e,"tilesets",[]),this.imageCollections=o(e,"imageCollections",[]),this.tiles=o(e,"tiles",[]),this.hexSideLength=o(e,"hexSideLength",0),this.staggerAxis=o(e,"staggerAxis","y"),this.staggerIndex=o(e,"staggerIndex","odd")}});c.exports=r},48700:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(95540),o=new a({initialize:function(n){n===void 0&&(n={}),this.name=v(n,"name","object layer"),this.id=v(n,"id",0),this.opacity=v(n,"opacity",1),this.properties=v(n,"properties",{}),this.propertyTypes=v(n,"propertytypes",{}),this.type=v(n,"type","objectgroup"),this.visible=v(n,"visible",!0),this.objects=v(n,"objects",[]),Array.isArray(this.objects)||(this.objects=[])}});c.exports=o},6641:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(91907),v=function(o){return o=o.toLowerCase(),o==="isometric"?a.ISOMETRIC:o==="staggered"?a.STAGGERED:o==="hexagonal"?a.HEXAGONAL:a.ORTHOGONAL};c.exports=v},46177:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(80341),v=t(2342),o=t(82593),r=t(46594),n=t(87021),e=function(i,h,s,l,f,u){var d;switch(h){case a.ARRAY_2D:d=v(i,s,l,f,u);break;case a.CSV:d=o(i,s,l,f,u);break;case a.TILED_JSON:d=r(i,s,u);break;case a.WELTMEISTER:d=n(i,s,u);break;default:console.warn("Unrecognized tilemap data format: "+h),d=null}return d};c.exports=e},2342:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(80341),v=t(14977),o=t(87010),r=t(23029),n=function(e,i,h,s,l){for(var f=new v({tileWidth:h,tileHeight:s}),u=new o({name:e,tileWidth:h,tileHeight:s,format:a.ARRAY_2D,layers:[f]}),d=[],p=i.length,g=0,x=0;x{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(80341),v=t(2342),o=function(r,n,e,i,h){var s=n.trim().split(` -`).map(function(f){return f.split(",")}),l=v(r,s,e,i,h);return l.format=a.CSV,l};c.exports=o},6656:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(14977),v=t(23029),o=function(r,n){for(var e=[],i=0;i-1?g=new v(s,p,d,u,h.tilesize,h.tilesize):g=n?null:new v(s,-1,d,u,h.tilesize,h.tilesize),l.push(g)}f.push(l),l=[]}s.data=f,e.push(s)}return e};c.exports=o},96483:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(33629),v=function(o){for(var r=[],n=[],e=0;e{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(80341),v=t(87010),o=t(6656),r=t(96483),n=function(e,i,h){if(i.layer.length===0)return console.warn("No layers found in the Weltmeister map: "+e),null;for(var s=0,l=0,f=0;fs&&(s=i.layer[f].width),i.layer[f].height>l&&(l=i.layer[f].height);var u=new v({width:s,height:l,name:e,tileWidth:i.layer[0].tilesize,tileHeight:i.layer[0].tilesize,format:a.WELTMEISTER});return u.layers=o(i,h),u.tilesets=r(i),u};c.exports=n},52833:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={ParseTileLayers:t(6656),ParseTilesets:t(96483),ParseWeltmeister:t(87021)}},57442:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={FromOrientationString:t(6641),Parse:t(46177),Parse2DArray:t(2342),ParseCSV:t(82593),Impact:t(52833),Tiled:t(96761)}},51233:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(79291),v=function(o){for(var r,n,e,i,h,s=0;s{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){for(var a=window.atob(t),v=a.length,o=new Array(v/4),r=0;r>>0;return o};c.exports=m},84101:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(33629),v=function(o){var r,n,e=[];for(r=0;r{/** - * @author Seth Berrier - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(95540),v=function(o,r,n){if(!r)return{i:0,layers:o.layers,name:"",opacity:1,visible:!0,x:0,y:0};var e=r.x+a(r,"startx",0)*o.tilewidth+a(r,"offsetx",0),i=r.y+a(r,"starty",0)*o.tileheight+a(r,"offsety",0);return{i:0,layers:r.layers,name:n.name+r.name+"/",opacity:n.opacity*r.opacity,visible:n.visible&&r.visible,x:n.x+e,y:n.y+i}};c.exports=v},29920:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=2147483648,t=1073741824,a=536870912,v=function(o){var r=!!(o&m),n=!!(o&t),e=!!(o&a);o=o&~(m|t|a);var i=0,h=!1;return r&&n&&e?(i=Math.PI/2,h=!0):r&&n&&!e?(i=Math.PI,h=!1):r&&!n&&e?(i=Math.PI/2,h=!1):r&&!n&&!e?(i=0,h=!0):!r&&n&&e?(i=3*Math.PI/2,h=!1):!r&&n&&!e?(i=Math.PI,h=!0):!r&&!n&&e?(i=3*Math.PI/2,h=!0):!r&&!n&&!e&&(i=0,h=!1),{gid:o,flippedHorizontal:r,flippedVertical:n,flippedAntiDiagonal:e,rotation:i,flipped:h}};c.exports=v},12635:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(95540),v=t(79677),o=function(r){for(var n=[],e=[],i=v(r);i.i0;){if(i.i>=i.layers.length){if(e.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}i=e.pop();continue}var h=i.layers[i.i];if(i.i++,h.type!=="imagelayer"){if(h.type==="group"){var s=v(r,h,i);e.push(i),i=s}continue}var l=a(h,"offsetx",0)+a(h,"startx",0),f=a(h,"offsety",0)+a(h,"starty",0);n.push({name:i.name+h.name,image:h.image,x:i.x+l+h.x,y:i.y+f+h.y,alpha:i.opacity*h.opacity,visible:i.visible&&h.visible,properties:a(h,"properties",{})})}return n};c.exports=o},46594:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(51233),v=t(84101),o=t(91907),r=t(62644),n=t(80341),e=t(6641),i=t(87010),h=t(12635),s=t(22611),l=t(28200),f=t(24619),u=function(d,p,g){var x=r(p),y=new i({width:x.width,height:x.height,name:d,tileWidth:x.tilewidth,tileHeight:x.tileheight,orientation:e(x.orientation),format:n.TILED_JSON,version:x.version,properties:x.properties,renderOrder:x.renderorder,infinite:x.infinite});y.orientation===o.HEXAGONAL&&(y.hexSideLength=x.hexsidelength,y.staggerAxis=x.staggeraxis,y.staggerIndex=x.staggerindex),y.layers=l(x,g),y.images=h(x);var C=f(x);return y.tilesets=C.tilesets,y.imageCollections=C.imageCollections,y.objects=s(x),y.tiles=v(y),a(y),y};c.exports=u},52205:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(18254),v=t(29920),o=function(e){return{x:e.x,y:e.y}},r=["id","name","type","rotation","properties","visible","x","y","width","height"],n=function(e,i,h){i===void 0&&(i=0),h===void 0&&(h=0);var s=a(e,r);if(s.x+=i,s.y+=h,e.gid){var l=v(e.gid);s.gid=l.gid,s.flippedHorizontal=l.flippedHorizontal,s.flippedVertical=l.flippedVertical,s.flippedAntiDiagonal=l.flippedAntiDiagonal}else e.polyline?s.polyline=e.polyline.map(o):e.polygon?s.polygon=e.polygon.map(o):e.ellipse?s.ellipse=e.ellipse:e.text?s.text=e.text:e.point?s.point=!0:s.rectangle=!0;return s};c.exports=n},22611:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(95540),v=t(52205),o=t(48700),r=t(79677),n=function(e){for(var i=[],h=[],s=r(e);s.i0;){if(s.i>=s.layers.length){if(h.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}s=h.pop();continue}var l=s.layers[s.i];if(s.i++,l.opacity*=s.opacity,l.visible=s.visible&&l.visible,l.type!=="objectgroup"){if(l.type==="group"){var f=r(e,l,s);h.push(s),s=f}continue}l.name=s.name+l.name;for(var u=s.x+a(l,"startx",0)+a(l,"offsetx",0),d=s.y+a(l,"starty",0)+a(l,"offsety",0),p=[],g=0;g{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(41868),v=t(91907),o=t(79677),r=t(6641),n=t(95540),e=t(14977),i=t(29920),h=t(23029),s=function(l,f){for(var u=n(l,"infinite",!1),d=[],p=[],g=o(l);g.i0;){if(g.i>=g.layers.length){if(p.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}g=p.pop();continue}var x=g.layers[g.i];if(g.i++,x.type!=="tilelayer"){if(x.type==="group"){var y=o(l,x,g);p.push(g),g=y}continue}if(x.compression){console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+x.name+"'");continue}else if(x.encoding&&x.encoding==="base64"){if(x.chunks)for(var C=0;C0?(R=new h(P,M.gid,W,H,l.tilewidth,l.tileheight),R.rotation=M.rotation,R.flipX=M.flipped,L[H][W]=R):(I=f?null:new h(P,-1,W,H,l.tilewidth,l.tileheight),L[H][W]=I),B++,B===j.width&&(Y++,B=0)}}else{P=new e({name:g.name+x.name,id:x.id,x:g.x+n(x,"offsetx",0)+x.x,y:g.y+n(x,"offsety",0)+x.y,width:x.width,height:x.height,tileWidth:l.tilewidth,tileHeight:l.tileheight,alpha:g.opacity*x.opacity,visible:g.visible&&x.visible,properties:n(x,"properties",[]),orientation:r(l.orientation)}),P.orientation===v.HEXAGONAL&&(P.hexSideLength=l.hexsidelength,P.staggerAxis=l.staggeraxis,P.staggerIndex=l.staggerindex);for(var Z=[],Q=0,k=x.data.length;Q0?(R=new h(P,M.gid,B,L.length,l.tilewidth,l.tileheight),R.rotation=M.rotation,R.flipX=M.flipped,Z.push(R)):(I=f?null:new h(P,-1,B,L.length,l.tilewidth,l.tileheight),Z.push(I)),B++,B===x.width&&(L.push(Z),B=0,Z=[])}P.data=L,d.push(P)}return d};c.exports=s},24619:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(33629),v=t(16536),o=t(52205),r=t(57880),n=function(e){for(var i=[],h=[],s=null,l,f=0;f1){var p=void 0,g=void 0;if(Array.isArray(u.tiles)){p=p||{},g=g||{};for(var x=0;x{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){for(var v=0;v0){var n={},e={},i,h,s;if(Array.isArray(o.edgecolors))for(i=0;i{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={AssignTileProperties:t(51233),Base64Decode:t(41868),BuildTilesetIndex:t(84101),CreateGroupLayer:t(79677),ParseGID:t(29920),ParseImageLayers:t(12635),ParseJSONTiled:t(46594),ParseObject:t(52205),ParseObjectLayers:t(22611),ParseTileLayers:t(28200),ParseTilesets:t(24619)}},33385:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(37277),o=t(44594),r=t(94880),n=t(72905),e=new a({initialize:function(h){this.scene=h,this.systems=h.sys,this.now=0,this.startTime=0,this.timeScale=1,this.paused=!1,this._active=[],this._pendingInsertion=[],this._pendingRemoval=[],h.sys.events.once(o.BOOT,this.boot,this),h.sys.events.on(o.START,this.start,this)},boot:function(){this.now=this.systems.game.loop.time,this.systems.events.once(o.DESTROY,this.destroy,this)},start:function(){this.startTime=this.systems.game.loop.time;var i=this.systems.events;i.on(o.PRE_UPDATE,this.preUpdate,this),i.on(o.UPDATE,this.update,this),i.once(o.SHUTDOWN,this.shutdown,this)},addEvent:function(i){var h;return i instanceof r?(h=i,this.removeEvent(h),h.elapsed=h.startAt,h.hasDispatched=!1,h.repeatCount=h.repeat===-1||h.loop?999999999999:h.repeat):h=new r(i),this._pendingInsertion.push(h),h},delayedCall:function(i,h,s,l){return this.addEvent({delay:i,callback:h,args:s,callbackScope:l})},clearPendingEvents:function(){return this._pendingInsertion=[],this},removeEvent:function(i){Array.isArray(i)||(i=[i]);for(var h=0;h-1&&this._active.splice(f,1),l.destroy()}for(s=0;s=l.delay)){var f=l.elapsed-l.delay;if(l.elapsed=l.delay,!l.hasDispatched&&l.callback&&(l.hasDispatched=!0,l.callback.apply(l.callbackScope,l.args)),l.repeatCount>0){if(l.repeatCount--,f>=l.delay)for(;f>=l.delay&&l.repeatCount>0;)l.callback&&l.callback.apply(l.callbackScope,l.args),f-=l.delay,l.repeatCount--;l.elapsed=f,l.hasDispatched=!1}else l.hasDispatched&&this._pendingRemoval.push(l)}}}},shutdown:function(){var i;for(i=0;i{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(50792),o=t(39429),r=t(95540),n=t(44594),e=t(89809),i=new a({Extends:v,initialize:function(s,l){v.call(this),this.scene=s,this.systems=s.sys,this.elapsed=0,this.paused=!0,this.complete=!1,this.totalComplete=0,this.loop=0,this.iteration=0,this.events=[];var f=this.systems.events;f.on(n.PRE_UPDATE,this.preUpdate,this),f.on(n.UPDATE,this.update,this),f.once(n.SHUTDOWN,this.destroy,this),l&&this.add(l)},preUpdate:function(h,s){this.paused||(this.elapsed+=s)},update:function(){if(!(this.paused||this.complete)){var h,s=this.events,l=!1,f=this.systems,u;for(h=0;h=s.length&&(this.loop!==0&&(this.loop===-1||this.loop>this.iteration)?(this.iteration++,this.reset(!0)):this.complete=!0),this.complete&&this.emit(e.COMPLETE,this)}},play:function(h){return h===void 0&&(h=!0),this.paused=!1,this.complete=!1,this.totalComplete=0,h&&this.reset(),this},pause:function(){return this.paused=!0,this},repeat:function(h){return(h===void 0||h===!0)&&(h=-1),h===!1&&(h=0),this.loop=h,this},resume:function(){return this.paused=!1,this},stop:function(){return this.paused=!0,this.complete=!0,this},reset:function(h){h===void 0&&(h=!1),this.elapsed=0,h||(this.iteration=0);for(var s=0;s0&&(l=s[s.length-1].time);for(var f=0;f{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(95540),o=new a({initialize:function(n){this.delay=0,this.repeat=0,this.repeatCount=0,this.loop=!1,this.callback,this.callbackScope,this.args,this.timeScale=1,this.startAt=0,this.elapsed=0,this.paused=!1,this.hasDispatched=!1,this.reset(n)},reset:function(r){if(this.delay=v(r,"delay",0),this.repeat=v(r,"repeat",0),this.loop=v(r,"loop",!1),this.callback=v(r,"callback",void 0),this.callbackScope=v(r,"callbackScope",this),this.args=v(r,"args",[]),this.timeScale=v(r,"timeScale",1),this.startAt=v(r,"startAt",0),this.paused=v(r,"paused",!1),this.elapsed=this.startAt,this.hasDispatched=!1,this.repeatCount=this.repeat===-1||this.loop?999999999999:this.repeat,this.delay===0&&(this.repeat>0||this.loop))throw new Error("TimerEvent infinite loop created via zero delay");return this},getProgress:function(){return this.elapsed/this.delay},getOverallProgress:function(){if(this.repeat>0){var r=this.delay+this.delay*this.repeat,n=this.elapsed+this.delay*(this.repeat-this.repeatCount);return n/r}else return this.getProgress()},getRepeatCount:function(){return this.repeatCount},getElapsed:function(){return this.elapsed},getElapsedSeconds:function(){return this.elapsed*.001},getRemaining:function(){return this.delay-this.elapsed},getRemainingSeconds:function(){return this.getRemaining()*.001},getOverallRemaining:function(){return this.delay*(1+this.repeatCount)-this.elapsed},getOverallRemainingSeconds:function(){return this.getOverallRemaining()*.001},remove:function(r){r===void 0&&(r=!1),this.elapsed=this.delay,this.hasDispatched=!r,this.repeatCount=0},destroy:function(){this.callback=void 0,this.callbackScope=void 0,this.args=[]}});c.exports=o},35945:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="complete"},89809:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={COMPLETE:t(35945)}},90291:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={Clock:t(33385),Events:t(89809),Timeline:t(96120),TimerEvent:t(94880)}},40382:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(72905),v=t(83419),o=t(43491),r=t(88032),n=t(37277),e=t(44594),i=t(93109),h=t(86081),s=t(8357),l=t(43960),f=t(26012),u=new v({initialize:function(p){this.scene=p,this.events=p.sys.events,this.timeScale=1,this.paused=!1,this.processing=!1,this.tweens=[],this.time=0,this.startTime=0,this.nextTime=0,this.prevTime=0,this.maxLag=500,this.lagSkip=33,this.gap=1e3/240,this.events.once(e.BOOT,this.boot,this),this.events.on(e.START,this.start,this)},boot:function(){this.events.once(e.DESTROY,this.destroy,this)},start:function(){this.timeScale=1,this.paused=!1,this.startTime=Date.now(),this.prevTime=this.startTime,this.nextTime=this.gap,this.events.on(e.UPDATE,this.update,this),this.events.once(e.SHUTDOWN,this.shutdown,this)},create:function(d){Array.isArray(d)||(d=[d]);for(var p=[],g=0;g-1},existing:function(d){return this.has(d)||this.tweens.push(d.reset()),this},addCounter:function(d){var p=r(this,d);return this.tweens.push(p.reset()),p},stagger:function(d,p){return i(d,p)},setLagSmooth:function(d,p){return d===void 0&&(d=1/1e-8),p===void 0&&(p=0),this.maxLag=d,this.lagSkip=Math.min(p,this.maxLag),this},setFps:function(d){return d===void 0&&(d=240),this.gap=1e3/d,this.nextTime=this.time*1e3+this.gap,this},getDelta:function(d){var p=Date.now()-this.prevTime;p>this.maxLag&&(this.startTime+=p-this.lagSkip),this.prevTime+=p;var g=this.prevTime-this.startTime,x=g-this.nextTime,y=g-this.time*1e3;return x>0||d?(g/=1e3,this.time=g,this.nextTime+=x+(x>=this.gap?4:this.gap-x)):y=0,y},tick:function(){return this.step(!0),this},update:function(){this.paused||this.step(!1)},step:function(d){d===void 0&&(d=!1);var p=this.getDelta(d);if(!(p<=0)){this.processing=!0;var g,x,y=[],C=this.tweens;for(g=0;g0){for(g=0;g-1&&(x.isPendingRemove()||x.isDestroyed())&&(C.splice(M,1),x.destroy())}y.length=0}this.processing=!1}},remove:function(d){return this.processing?d.setPendingRemoveState():(a(this.tweens,d),d.setRemovedState()),this},reset:function(d){return this.existing(d),d.seek(),d.setActiveState(),this},makeActive:function(d){return this.existing(d),d.setActiveState(),this},each:function(d,p){var g,x=[null];for(g=1;g{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){return t&&t.hasOwnProperty(a)?t[a]:v};c.exports=m},6113:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(62640),v=t(35355),o=function(r,n){var e=a.Power0;if(typeof r=="string")if(a.hasOwnProperty(r))e=a[r];else{var i="";if(r.indexOf(".")){i=r.substring(r.indexOf(".")+1);var h=i.toLowerCase();h==="in"?i="easeIn":h==="out"?i="easeOut":h==="inout"&&(i="easeInOut")}r=v(r.substring(0,r.indexOf(".")+1)+i),a.hasOwnProperty(r)&&(e=a[r])}else typeof r=="function"&&(e=r);if(!n)return e;var s=n.slice(0);return s.unshift(0),function(l){return s[0]=l,e.apply(this,s)}};c.exports=o},91389:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(89318),v=t(77259),o=t(28392),r={bezier:a,catmull:v,catmullrom:v,linear:o},n=function(e){if(e===null)return null;var i=r.linear;return typeof e=="string"?r.hasOwnProperty(e)&&(i=r[e]):typeof e=="function"&&(i=e),i};c.exports=n},55292:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){var o;if(t.hasOwnProperty(a)){var r=typeof t[a];r==="function"?o=function(n,e,i,h,s,l){return t[a](n,e,i,h,s,l)}:o=function(){return t[a]}}else typeof v=="function"?o=v:o=function(){return v};return o};c.exports=m},82985:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(81076),v=function(o){var r,n=[];if(o.hasOwnProperty("props"))for(r in o.props)r.substring(0,1)!=="_"&&n.push({key:r,value:o.props[r]});else for(r in o)a.indexOf(r)===-1&&r.substring(0,1)!=="_"&&n.push({key:r,value:o[r]});return n};c.exports=v},62329:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(35154),v=function(o){var r=a(o,"targets",null);return r===null||(typeof r=="function"&&(r=r.call()),Array.isArray(r)||(r=[r])),r};c.exports=v},17777:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(30976),v=t(99472);function o(h){return!!h.getActive&&typeof h.getActive=="function"}function r(h){return!!h.getStart&&typeof h.getStart=="function"}function n(h){return!!h.getEnd&&typeof h.getEnd=="function"}function e(h){return r(h)||n(h)||o(h)}var i=function(h,s){var l,f=function(j,J,X){return X},u=function(j,J,X){return X},d=null,p=typeof s;if(p==="number")f=function(){return s};else if(Array.isArray(s))u=function(){return s[0]},f=function(){return s[s.length-1]};else if(p==="string"){var g=s.toLowerCase(),x=g.substring(0,6)==="random",y=g.substring(0,3)==="int";if(x||y){var C=g.indexOf("("),P=g.indexOf(")"),M=g.indexOf(",");if(C&&P&&M){var R=parseFloat(g.substring(C+1,M)),I=parseFloat(g.substring(M+1,P));x?f=function(){return v(R,I)}:f=function(){return a(R,I)}}else throw new Error("invalid random() format")}else{g=g[0];var L=parseFloat(s.substr(2));switch(g){case"+":f=function(j,J,X){return X+L};break;case"-":f=function(j,J,X){return X-L};break;case"*":f=function(j,J,X){return X*L};break;case"/":f=function(j,J,X){return X/L};break;default:f=function(){return parseFloat(s)}}}}else if(p==="function")f=s;else if(p==="object")if(e(s))o(s)&&(d=s.getActive),n(s)&&(f=s.getEnd),r(s)&&(u=s.getStart);else if(s.hasOwnProperty("value"))l=i(h,s.value);else{var B=s.hasOwnProperty("to"),N=s.hasOwnProperty("from"),G=s.hasOwnProperty("start");if(B&&(N||G)){if(l=i(h,s.to),G){var V=i(h,s.start);l.getActive=V.getEnd}if(N){var K=i(h,s.from);l.getStart=K.getEnd}}}return l||(l={getActive:d,getEnd:f,getStart:u}),l};c.exports=i},88032:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(70402),v=t(69902),o=t(23568),r=t(57355),n=t(6113),e=t(55292),i=t(35154),h=t(17777),s=t(269),l=t(86081),f=function(u,d,p){if(d instanceof l)return d.parent=u,d;p===void 0?p=v:p=s(v,p);var g=i(d,"from",0),x=i(d,"to",1),y=[{value:g}],C=i(d,"delay",p.delay),P=i(d,"easeParams",p.easeParams),M=i(d,"ease",p.ease),R=h("value",x),I=new l(u,y),L=I.add(0,"value",R.getEnd,R.getStart,R.getActive,n(i(d,"ease",M),i(d,"easeParams",P)),e(d,"delay",C),i(d,"duration",p.duration),r(d,"yoyo",p.yoyo),i(d,"hold",p.hold),i(d,"repeat",p.repeat),i(d,"repeatDelay",p.repeatDelay),!1,!1);L.start=g,L.current=g,I.completeDelay=o(d,"completeDelay",0),I.loop=Math.round(o(d,"loop",0)),I.loopDelay=Math.round(o(d,"loopDelay",0)),I.paused=r(d,"paused",!1),I.persist=r(d,"persist",!1),I.callbackScope=i(d,"callbackScope",I);for(var B=a.TYPES,N=0;N{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(6113),v=t(35154),o=t(36383),r=function(n,e){e===void 0&&(e={});var i,h=v(e,"start",0),s=v(e,"ease",null),l=v(e,"grid",null),f=v(e,"from",0),u=f==="first",d=f==="center",p=f==="last",g=typeof f=="number",x=Array.isArray(n),y=parseFloat(x?n[0]:n),C=x?parseFloat(n[1]):0,P=Math.max(y,C);if(x&&(h+=y),l){var M=l[0],R=l[1],I=0,L=0,B=0,N=0,G=[];p?(I=M-1,L=R-1):g?(I=f%M,L=Math.floor(f/M)):d&&(I=(M-1)/2,L=(R-1)/2);for(var V=o.MIN_SAFE_INTEGER,K=0;KV&&(V=J),G[K][j]=J}}}var X=s?a(s):null;return l?i=function(Y,b,z,W){var H=0,Z=W%M,Q=Math.floor(W/M);Z>=0&&Z=0&&Q{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(70402),v=t(69902),o=t(23568),r=t(57355),n=t(6113),e=t(91389),i=t(55292),h=t(82985),s=t(62329),l=t(35154),f=t(17777),u=t(269),d=t(86081),p=function(g,x,y){if(x instanceof d)return x.parent=g,x;y===void 0?y=v:y=u(v,y);var C=s(x);!C&&y.targets&&(C=y.targets);for(var P=h(x),M=l(x,"delay",y.delay),R=l(x,"duration",y.duration),I=l(x,"easeParams",y.easeParams),L=l(x,"ease",y.ease),B=l(x,"hold",y.hold),N=l(x,"repeat",y.repeat),G=l(x,"repeatDelay",y.repeatDelay),V=r(x,"yoyo",y.yoyo),K=r(x,"flipX",y.flipX),j=r(x,"flipY",y.flipY),J=l(x,"interpolation",y.interpolation),X=function(rt,ot,ft,at){if(ft==="texture"){var vt=at,At=void 0;Array.isArray(at)?(vt=at[0],At=at[1]):at.hasOwnProperty("value")?(vt=at.value,Array.isArray(at.value)?(vt=at.value[0],At=at.value[1]):typeof at.value=="string"&&(vt=at.value)):typeof at=="string"&&(vt=at),rt.addFrame(ot,vt,At,i(at,"delay",M),l(at,"duration",R),l(at,"hold",B),l(at,"repeat",N),l(at,"repeatDelay",G),r(at,"flipX",K),r(at,"flipY",j))}else{var Et=f(ft,at),Pt=e(l(at,"interpolation",J));rt.add(ot,ft,Et.getEnd,Et.getStart,Et.getActive,n(l(at,"ease",L),l(at,"easeParams",I)),i(at,"delay",M),l(at,"duration",R),r(at,"yoyo",V),l(at,"hold",B),l(at,"repeat",N),l(at,"repeatDelay",G),r(at,"flipX",K),r(at,"flipY",j),Pt,Pt?at:null)}},Y=new d(g,C),b=0;b{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(70402),v=t(23568),o=t(57355),r=t(62329),n=t(35154),e=t(8357),i=t(43960),h=function(s,l){if(l instanceof i)return l.parent=s,l;var f=new i(s);f.startDelay=n(l,"delay",0),f.completeDelay=v(l,"completeDelay",0),f.loop=Math.round(v(l,"loop",n(l,"repeat",0))),f.loopDelay=Math.round(v(l,"loopDelay",n(l,"repeatDelay",0))),f.paused=o(l,"paused",!1),f.persist=o(l,"persist",!1),f.callbackScope=n(l,"callbackScope",f);var u,d=a.TYPES;for(u=0;u{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={GetBoolean:t(57355),GetEaseFunction:t(6113),GetInterpolationFunction:t(91389),GetNewValue:t(55292),GetProps:t(82985),GetTargets:t(62329),GetValueOp:t(17777),NumberTweenBuilder:t(88032),StaggerBuilder:t(93109),TweenBuilder:t(8357)}},73685:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="active"},98540:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="complete"},67233:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="loop"},2859:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="pause"},98336:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="repeat"},25764:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="resume"},32193:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="start"},84371:c=>{/** - * @author samme - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="stop"},70766:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="update"},55659:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports="yoyo"},842:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={TWEEN_ACTIVE:t(73685),TWEEN_COMPLETE:t(98540),TWEEN_LOOP:t(67233),TWEEN_PAUSE:t(2859),TWEEN_RESUME:t(25764),TWEEN_REPEAT:t(98336),TWEEN_START:t(32193),TWEEN_STOP:t(84371),TWEEN_UPDATE:t(70766),TWEEN_YOYO:t(55659)}},43066:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a={States:t(86353),Builders:t(30231),Events:t(842),TweenManager:t(40382),Tween:t(86081),TweenData:t(48177),TweenFrameData:t(42220),BaseTween:t(70402),TweenChain:t(43960)};c.exports=a},70402:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(50792),o=t(842),r=t(86353),n=new a({Extends:v,initialize:function(i){v.call(this),this.parent=i,this.data=[],this.totalData=0,this.startDelay=0,this.hasStarted=!1,this.timeScale=1,this.loop=0,this.loopDelay=0,this.loopCounter=0,this.completeDelay=0,this.countdown=0,this.state=r.PENDING,this.paused=!1,this.callbacks={onActive:null,onComplete:null,onLoop:null,onPause:null,onRepeat:null,onResume:null,onStart:null,onStop:null,onUpdate:null,onYoyo:null},this.callbackScope,this.persist=!1},setTimeScale:function(e){return this.timeScale=e,this},getTimeScale:function(){return this.timeScale},isPlaying:function(){return!this.paused&&this.isActive()},isPaused:function(){return this.paused},pause:function(){return this.paused||(this.paused=!0,this.dispatchEvent(o.TWEEN_PAUSE,"onPause")),this},resume:function(){return this.paused&&(this.paused=!1,this.dispatchEvent(o.TWEEN_RESUME,"onResume")),this},makeActive:function(){this.parent.makeActive(this),this.dispatchEvent(o.TWEEN_ACTIVE,"onActive")},onCompleteHandler:function(){this.setPendingRemoveState(),this.dispatchEvent(o.TWEEN_COMPLETE,"onComplete")},complete:function(e){return e===void 0&&(e=0),e?(this.setCompleteDelayState(),this.countdown=e):this.onCompleteHandler(),this},completeAfterLoop:function(e){return e===void 0&&(e=0),this.loopCounter>e&&(this.loopCounter=e),this},remove:function(){return this.parent&&this.parent.remove(this),this},stop:function(){return this.parent&&!this.isRemoved()&&!this.isPendingRemove()&&!this.isDestroyed()&&(this.dispatchEvent(o.TWEEN_STOP,"onStop"),this.setPendingRemoveState()),this},updateLoopCountdown:function(e){this.countdown-=e,this.countdown<=0&&(this.setActiveState(),this.dispatchEvent(o.TWEEN_LOOP,"onLoop"))},updateStartCountdown:function(e){return this.countdown-=e,this.countdown<=0&&(this.hasStarted=!0,this.setActiveState(),this.dispatchEvent(o.TWEEN_START,"onStart"),e=0),e},updateCompleteDelay:function(e){this.countdown-=e,this.countdown<=0&&this.onCompleteHandler()},setCallback:function(e,i,h){return h===void 0&&(h=[]),this.callbacks.hasOwnProperty(e)&&(this.callbacks[e]={func:i,params:h}),this},setPendingState:function(){this.state=r.PENDING},setActiveState:function(){this.state=r.ACTIVE},setLoopDelayState:function(){this.state=r.LOOP_DELAY},setCompleteDelayState:function(){this.state=r.COMPLETE_DELAY},setStartDelayState:function(){this.state=r.START_DELAY,this.countdown=this.startDelay,this.hasStarted=!1},setPendingRemoveState:function(){this.state=r.PENDING_REMOVE},setRemovedState:function(){this.state=r.REMOVED},setFinishedState:function(){this.state=r.FINISHED},setDestroyedState:function(){this.state=r.DESTROYED},isPending:function(){return this.state===r.PENDING},isActive:function(){return this.state===r.ACTIVE},isLoopDelayed:function(){return this.state===r.LOOP_DELAY},isCompleteDelayed:function(){return this.state===r.COMPLETE_DELAY},isStartDelayed:function(){return this.state===r.START_DELAY},isPendingRemove:function(){return this.state===r.PENDING_REMOVE},isRemoved:function(){return this.state===r.REMOVED},isFinished:function(){return this.state===r.FINISHED},isDestroyed:function(){return this.state===r.DESTROYED},destroy:function(){this.data&&this.data.forEach(function(e){e.destroy()}),this.removeAllListeners(),this.callbacks=null,this.data=null,this.parent=null,this.setDestroyedState()}});n.TYPES=["onActive","onComplete","onLoop","onPause","onRepeat","onResume","onStart","onStop","onUpdate","onYoyo"],c.exports=n},95042:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(83419),v=t(842),o=t(86353),r=new a({initialize:function(e,i,h,s,l,f,u,d,p,g){this.tween=e,this.targetIndex=i,this.duration=s,this.totalDuration=0,this.delay=0,this.getDelay=h,this.yoyo=l,this.hold=f,this.repeat=u,this.repeatDelay=d,this.repeatCounter=0,this.flipX=p,this.flipY=g,this.progress=0,this.elapsed=0,this.state=0,this.isCountdown=!1},getTarget:function(){return this.tween.targets[this.targetIndex]},setTargetValue:function(n){n===void 0&&(n=this.current),this.tween.targets[this.targetIndex][this.key]=n},setCreatedState:function(){this.state=o.CREATED,this.isCountdown=!1},setDelayState:function(){this.state=o.DELAY,this.isCountdown=!0},setPendingRenderState:function(){this.state=o.PENDING_RENDER,this.isCountdown=!1},setPlayingForwardState:function(){this.state=o.PLAYING_FORWARD,this.isCountdown=!1},setPlayingBackwardState:function(){this.state=o.PLAYING_BACKWARD,this.isCountdown=!1},setHoldState:function(){this.state=o.HOLD_DELAY,this.isCountdown=!0},setRepeatState:function(){this.state=o.REPEAT_DELAY,this.isCountdown=!0},setCompleteState:function(){this.state=o.COMPLETE,this.isCountdown=!1},isCreated:function(){return this.state===o.CREATED},isDelayed:function(){return this.state===o.DELAY},isPendingRender:function(){return this.state===o.PENDING_RENDER},isPlayingForward:function(){return this.state===o.PLAYING_FORWARD},isPlayingBackward:function(){return this.state===o.PLAYING_BACKWARD},isHolding:function(){return this.state===o.HOLD_DELAY},isRepeating:function(){return this.state===o.REPEAT_DELAY},isComplete:function(){return this.state===o.COMPLETE},setStateFromEnd:function(n){this.yoyo?this.onRepeat(n,!0,!0):this.repeatCounter>0?this.onRepeat(n,!0,!1):this.setCompleteState()},setStateFromStart:function(n){this.repeatCounter>0?this.onRepeat(n,!1):this.setCompleteState()},reset:function(){var n=this.tween,e=n.totalTargets,i=this.targetIndex,h=n.targets[i],s=this.key;this.progress=0,this.elapsed=0,this.delay=this.getDelay(h,s,0,i,e,n),this.repeatCounter=this.repeat===-1?o.MAX:this.repeat,this.setPendingRenderState();var l=this.duration+this.hold;this.yoyo&&(l+=this.duration);var f=l+this.repeatDelay;this.totalDuration=this.delay+l,this.repeat===-1?(this.totalDuration+=f*o.MAX,n.isInfinite=!0):this.repeat>0&&(this.totalDuration+=f*this.repeat),this.totalDuration>n.duration&&(n.duration=this.totalDuration),this.delay0&&(this.elapsed=this.delay,this.setDelayState())},onRepeat:function(n,e,i){var h=this.tween,s=h.totalTargets,l=this.targetIndex,f=h.targets[l],u=this.key,d=u!=="texture";if(this.elapsed=n,this.progress=n/this.duration,this.flipX&&f.toggleFlipX(),this.flipY&&f.toggleFlipY(),d&&(e||i)&&(this.start=this.getStartValue(f,u,this.start,l,s,h)),i){this.setPlayingBackwardState(),this.dispatchEvent(v.TWEEN_YOYO,"onYoyo");return}this.repeatCounter--,d&&(this.end=this.getEndValue(f,u,this.start,l,s,h)),this.repeatDelay>0?(this.elapsed=this.repeatDelay-n,d&&(this.current=this.start,f[u]=this.current),this.setRepeatState()):(this.setPlayingForwardState(),this.dispatchEvent(v.TWEEN_REPEAT,"onRepeat"))},destroy:function(){this.tween=null,this.getDelay=null,this.setCompleteState()}});c.exports=r},69902:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={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};c.exports=m},81076:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.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:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(70402),v=t(83419),o=t(842),r=t(44603),n=t(39429),e=t(36383),i=t(86353),h=t(48177),s=t(42220),l=new v({Extends:a,initialize:function(u,d){a.call(this,u),this.targets=d,this.totalTargets=d.length,this.isSeeking=!1,this.isInfinite=!1,this.elapsed=0,this.totalElapsed=0,this.duration=0,this.progress=0,this.totalDuration=0,this.totalProgress=0},add:function(f,u,d,p,g,x,y,C,P,M,R,I,L,B,N,G){var V=new h(this,f,u,d,p,g,x,y,C,P,M,R,I,L,B,N,G);return this.totalData=this.data.push(V),V},addFrame:function(f,u,d,p,g,x,y,C,P,M){var R=new s(this,f,u,d,p,g,x,y,C,P,M);return this.totalData=this.data.push(R),R},getValue:function(f){f===void 0&&(f=0);var u=null;return this.data&&(u=this.data[f].current),u},hasTarget:function(f){return this.targets&&this.targets.indexOf(f)!==-1},updateTo:function(f,u,d){if(d===void 0&&(d=!1),f!=="texture")for(var p=0;p0)this.elapsed=0,this.progress=0,this.loopCounter--,this.initTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.setLoopDelayState()):(this.setActiveState(),this.dispatchEvent(o.TWEEN_LOOP,"onLoop"));else if(this.completeDelay>0)this.countdown=this.completeDelay,this.setCompleteDelayState();else return this.onCompleteHandler(),!0;return!1},onCompleteHandler:function(){this.progress=1,this.totalProgress=1,a.prototype.onCompleteHandler.call(this)},play:function(){return this.isDestroyed()?(console.warn("Cannot play destroyed Tween",this),this):((this.isPendingRemove()||this.isFinished())&&this.seek(),this.paused=!1,this.setActiveState(),this)},seek:function(f,u,d){if(f===void 0&&(f=0),u===void 0&&(u=16.6),d===void 0&&(d=!1),this.isDestroyed())return console.warn("Cannot seek destroyed Tween",this),this;d||(this.isSeeking=!0),this.reset(!0),this.initTweenData(!0),this.setActiveState(),this.dispatchEvent(o.TWEEN_ACTIVE,"onActive");var p=this.paused;if(this.paused=!1,f>0){for(var g=Math.floor(f/u),x=f-g*u,y=0;y0&&this.update(x)}return this.paused=p,this.isSeeking=!1,this},initTweenData:function(f){f===void 0&&(f=!1),this.duration=0,this.startDelay=e.MAX_SAFE_INTEGER;for(var u=this.data,d=0;d0?this.totalDuration=p+g+(p+y)*x:this.totalDuration=p+g},reset:function(f){return f===void 0&&(f=!1),this.elapsed=0,this.totalElapsed=0,this.progress=0,this.totalProgress=0,this.loopCounter=this.loop,this.loop===-1&&(this.isInfinite=!0,this.loopCounter=i.MAX),f||(this.initTweenData(),this.setActiveState(),this.dispatchEvent(o.TWEEN_ACTIVE,"onActive")),this},update:function(f){if(this.isPendingRemove()||this.isDestroyed())return!0;if(this.paused||this.isFinished())return!1;if(f*=this.timeScale*this.parent.timeScale,this.isLoopDelayed())return this.updateLoopCountdown(f),!1;if(this.isCompleteDelayed())return this.updateCompleteDelay(f),!1;this.hasStarted||(this.startDelay-=f,this.startDelay<=0&&(this.hasStarted=!0,this.dispatchEvent(o.TWEEN_START,"onStart"),f=0));var u=!1;if(this.isActive())for(var d=this.data,p=0;p{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(72905),v=t(70402),o=t(83419),r=t(842),n=t(44603),e=t(39429),i=t(86353),h=new o({Extends:v,initialize:function(l){v.call(this,l),this.currentTween=null,this.currentIndex=0},init:function(){return this.loopCounter=this.loop===-1?i.MAX:this.loop,this.setCurrentTween(0),this.startDelay>0&&!this.isStartDelayed()?this.setStartDelayState():this.setActiveState(),this.dispatchEvent(r.TWEEN_ACTIVE,"onActive"),this},add:function(s){var l=this.parent.create(s);Array.isArray(l)||(l=[l]);for(var f=this.data,u=0;u0)this.loopCounter--,this.resetTweens(),this.loopDelay>0?(this.countdown=this.loopDelay,this.setLoopDelayState()):(this.setActiveState(),this.dispatchEvent(r.TWEEN_LOOP,"onLoop"));else if(this.completeDelay>0)this.countdown=this.completeDelay,this.setCompleteDelayState();else return this.onCompleteHandler(),!0;return!1},play:function(){return this.isDestroyed()?(console.warn("Cannot play destroyed TweenChain",this),this):((this.isPendingRemove()||this.isPending())&&this.resetTweens(),this.paused=!1,this.startDelay>0&&!this.isStartDelayed()?this.setStartDelayState():this.setActiveState(),this)},resetTweens:function(){for(var s=this.data,l=this.totalData,f=0;f{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(95042),v=t(45319),o=t(83419),r=t(842),n=new o({Extends:a,initialize:function(i,h,s,l,f,u,d,p,g,x,y,C,P,M,R,I,L){a.call(this,i,h,p,g,x,y,C,P,M,R),this.key=s,this.getActiveValue=u,this.getEndValue=l,this.getStartValue=f,this.ease=d,this.start=0,this.previous=0,this.current=0,this.end=0,this.interpolation=I,this.interpolationData=L},reset:function(e){a.prototype.reset.call(this);var i=this.tween.targets[this.targetIndex],h=this.key;e&&(i[h]=this.start),this.start=0,this.previous=0,this.current=0,this.end=0,this.getActiveValue&&(i[h]=this.getActiveValue(i,h,0))},update:function(e){var i=this.tween,h=i.totalTargets,s=this.targetIndex,l=i.targets[s],f=this.key;if(!l)return this.setCompleteState(),!1;if(this.isCountdown&&(this.elapsed-=e,this.elapsed<=0&&(this.elapsed=0,e=0,this.isDelayed()?this.setPendingRenderState():this.isRepeating()?(this.setPlayingForwardState(),this.dispatchEvent(r.TWEEN_REPEAT,"onRepeat")):this.isHolding()&&this.setStateFromEnd(0))),this.isPendingRender())return this.start=this.getStartValue(l,f,l[f],s,h,i),this.end=this.getEndValue(l,f,this.start,s,h,i),this.current=this.start,l[f]=this.start,this.setPlayingForwardState(),!0;var u=this.isPlayingForward(),d=this.isPlayingBackward();if(u||d){var p=this.elapsed,g=this.duration,x=0,y=!1;p+=e,p>=g?(x=p-g,p=g,y=!0):p<0&&(p=0);var C=v(p/g,0,1);if(this.elapsed=p,this.progress=C,this.previous=this.current,y)u?(this.current=this.end,l[f]=this.end,this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(x)):(this.current=this.start,l[f]=this.start,this.setStateFromStart(x));else{u||(C=1-C);var P=this.ease(C);this.interpolation?this.current=this.interpolation(this.interpolationData,P):this.current=this.start+(this.end-this.start)*P,l[f]=this.current}this.dispatchEvent(r.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(e,i){var h=this.tween;if(!h.isSeeking){var s=h.targets[this.targetIndex],l=this.key,f=this.current,u=this.previous;h.emit(e,h,l,s,f,u);var d=h.callbacks[i];d&&d.func.apply(h.callbackScope,[h,s,l,f,u].concat(d.params))}},destroy:function(){a.prototype.destroy.call(this),this.getActiveValue=null,this.getEndValue=null,this.getStartValue=null,this.ease=null}});c.exports=n},42220:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(95042),v=t(45319),o=t(83419),r=t(842),n=new o({Extends:a,initialize:function(i,h,s,l,f,u,d,p,g,x,y){a.call(this,i,h,f,u,!1,d,p,g,x,y),this.key="texture",this.startTexture=null,this.endTexture=s,this.startFrame=null,this.endFrame=l,this.yoyo=p!==0},reset:function(e){a.prototype.reset.call(this);var i=this.tween.targets[this.targetIndex];this.startTexture||(this.startTexture=i.texture.key,this.startFrame=i.frame.name),e&&i.setTexture(this.startTexture,this.startFrame)},update:function(e){var i=this.tween,h=this.targetIndex,s=i.targets[h];if(!s)return this.setCompleteState(),!1;if(this.isCountdown&&(this.elapsed-=e,this.elapsed<=0&&(this.elapsed=0,e=0,this.isDelayed()?this.setPendingRenderState():this.isRepeating()?(this.setPlayingForwardState(),this.dispatchEvent(r.TWEEN_REPEAT,"onRepeat")):this.isHolding()&&this.setStateFromEnd(0))),this.isPendingRender())return this.startTexture&&s.setTexture(this.startTexture,this.startFrame),this.setPlayingForwardState(),!0;var l=this.isPlayingForward(),f=this.isPlayingBackward();if(l||f){var u=this.elapsed,d=this.duration,p=0,g=!1;u+=e,u>=d?(p=u-d,u=d,g=!0):u<0&&(u=0);var x=v(u/d,0,1);this.elapsed=u,this.progress=x,g&&(l?(s.setTexture(this.endTexture,this.endFrame),this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(p)):(s.setTexture(this.startTexture,this.startFrame),this.setStateFromStart(p))),this.dispatchEvent(r.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(e,i){var h=this.tween;if(!h.isSeeking){var s=h.targets[this.targetIndex],l=this.key;h.emit(e,h,l,s);var f=h.callbacks[i];f&&f.func.apply(h.callbackScope,[h,s,l].concat(f.params))}},destroy:function(){a.prototype.destroy.call(this),this.startTexture=null,this.endTexture=null,this.startFrame=null,this.endFrame=null}});c.exports=n},86353:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m={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};c.exports=m},83419:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */function m(n){return!!n.get&&typeof n.get=="function"||!!n.set&&typeof n.set=="function"}function t(n,e,i){var h=i?n[e]:Object.getOwnPropertyDescriptor(n,e);return!i&&h.value&&typeof h.value=="object"&&(h=h.value),h&&m(h)?(typeof h.enumerable>"u"&&(h.enumerable=!0),typeof h.configurable>"u"&&(h.configurable=!0),h):!1}function a(n,e){var i=Object.getOwnPropertyDescriptor(n,e);return i?(i.value&&typeof i.value=="object"&&(i=i.value),i.configurable===!1):!1}function v(n,e,i,h){for(var s in e)if(e.hasOwnProperty(s)){var l=t(e,s,i);if(l!==!1){var f=h||n;if(a(f.prototype,s)){if(r.ignoreFinals)continue;throw new Error("cannot override final property '"+s+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(n.prototype,s,l)}else n.prototype[s]=e[s]}}function o(n,e){if(e){Array.isArray(e)||(e=[e]);for(var i=0;i{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(){};c.exports=m},20242:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(){return null};c.exports=m},71146:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o,r){if(r===void 0&&(r=t),v>0){var n=v-t.length;if(n<=0)return null}if(!Array.isArray(a))return t.indexOf(a)===-1?(t.push(a),o&&o.call(r,a),a):null;for(var e=a.length-1;e>=0;)t.indexOf(a[e])!==-1&&a.splice(e,1),e--;if(e=a.length,e===0)return null;v>0&&e>n&&(a.splice(n),e=n);for(var i=0;i{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o,r,n){if(v===void 0&&(v=0),n===void 0&&(n=t),o>0){var e=o-t.length;if(e<=0)return null}if(!Array.isArray(a))return t.indexOf(a)===-1?(t.splice(v,0,a),r&&r.call(n,a),a):null;for(var i=a.length-1;i>=0;)t.indexOf(a[i])!==-1&&a.pop(),i--;if(i=a.length,i===0)return null;o>0&&i>e&&(a.splice(e),i=e);for(var h=i-1;h>=0;h--){var s=a[h];t.splice(v,0,s),r&&r.call(n,s)}return a};c.exports=m},66905:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){var v=t.indexOf(a);return v!==-1&&v{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(82011),v=function(o,r,n,e,i){e===void 0&&(e=0),i===void 0&&(i=o.length);var h=0;if(a(o,e,i))for(var s=e;s{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){var o,r=[null];for(o=3;o{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(82011),v=function(o,r,n,e,i){if(e===void 0&&(e=0),i===void 0&&(i=o.length),a(o,e,i)){var h,s=[null];for(h=5;h{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){if(a.length){if(a.length===1)return a[0]}else return NaN;var o=1,r,n;if(v){if(ta.length&&(o=a.length),v?(r=a[o-1][v],n=a[o][v],n-t<=t-r?a[o]:a[o-1]):(r=a[o-1],n=a[o],n-t<=t-r?n:r)};c.exports=m},43491:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){a===void 0&&(a=[]);for(var v=0;v{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(82011),v=function(o,r,n,e,i){e===void 0&&(e=0),i===void 0&&(i=o.length);var h=[];if(a(o,e,i))for(var s=e;s{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(82011),v=function(o,r,n,e,i){if(e===void 0&&(e=0),i===void 0&&(i=o.length),a(o,e,i))for(var h=e;h{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){a===void 0&&(a=0),v===void 0&&(v=t.length);var o=a+Math.floor(Math.random()*v);return t[o]===void 0?null:t[o]};c.exports=m},85835:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){if(a===v)return t;var o=t.indexOf(a),r=t.indexOf(v);if(o<0||r<0)throw new Error("Supplied items must be elements of the same array");return o>r||(t.splice(o,1),r===t.length-1?t.push(a):t.splice(r,0,a)),t};c.exports=m},83371:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){if(a===v)return t;var o=t.indexOf(a),r=t.indexOf(v);if(o<0||r<0)throw new Error("Supplied items must be elements of the same array");return o{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){var v=t.indexOf(a);if(v>0){var o=t[v-1],r=t.indexOf(o);t[v]=o,t[r]=a}return t};c.exports=m},69693:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){var o=t.indexOf(a);if(o===-1||v<0||v>=t.length)throw new Error("Supplied index out of bounds");return o!==v&&(t.splice(o,1),t.splice(v,0,a)),a};c.exports=m},40853:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){var v=t.indexOf(a);if(v!==-1&&v{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){var r=[],n,e=!1;if((v||o)&&(e=!0,v||(v=""),o||(o="")),a=a;n--)e?r.push(v+n.toString()+o):r.push(n);else for(n=t;n<=a;n++)e?r.push(v+n.toString()+o):r.push(n);return r};c.exports=m},593:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(2284),v=function(o,r,n){o===void 0&&(o=0),r===void 0&&(r=null),n===void 0&&(n=1),r===null&&(r=o,o=0);for(var e=[],i=Math.max(a((r-o)/(n||1)),0),h=0;h{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */function m(v,o,r){var n=v[o];v[o]=v[r],v[r]=n}function t(v,o){return vo?1:0}var a=function(v,o,r,n,e){for(r===void 0&&(r=0),n===void 0&&(n=v.length-1),e===void 0&&(e=t);n>r;){if(n-r>600){var i=n-r+1,h=o-r+1,s=Math.log(i),l=.5*Math.exp(2*s/3),f=.5*Math.sqrt(s*l*(i-l)/i)*(h-i/2<0?-1:1),u=Math.max(r,Math.floor(o-h*l/i+f)),d=Math.min(n,Math.floor(o+(i-h)*l/i+f));a(v,o,u,d,e)}var p=v[o],g=r,x=n;for(m(v,r,o),e(v[n],p)>0&&m(v,r,n);g0;)x--}e(v[r],p)===0?m(v,r,x):(x++,m(v,x,n)),x<=o&&(r=x+1),o<=x&&(n=x-1)}};c.exports=a},88492:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(35154),v=t(33680),o=function(n,e,i){for(var h=[],s=0;s{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(19133),v=function(o,r,n,e){e===void 0&&(e=o);var i;if(!Array.isArray(r))return i=o.indexOf(r),i!==-1?(a(o,i),n&&n.call(e,r),r):null;for(var h=r.length-1,s=[];h>=0;){var l=r[h];i=o.indexOf(l),i!==-1&&(a(o,i),s.push(l),n&&n.call(e,l)),h--}return s};c.exports=v},60248:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(19133),v=function(o,r,n,e){if(e===void 0&&(e=o),r<0||r>o.length-1)throw new Error("Index out of bounds");var i=a(o,r);return n&&n.call(e,i),i};c.exports=v},81409:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(82011),v=function(o,r,n,e,i){if(r===void 0&&(r=0),n===void 0&&(n=o.length),i===void 0&&(i=o),a(o,r,n)){var h=n-r,s=o.splice(r,h);if(e)for(var l=0;l{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(19133),v=function(o,r,n){r===void 0&&(r=0),n===void 0&&(n=o.length);var e=r+Math.floor(Math.random()*n);return a(o,e)};c.exports=v},42169:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){var o=t.indexOf(a),r=t.indexOf(v);return o!==-1&&r===-1?(t[o]=v,!0):!1};c.exports=m},86003:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){a===void 0&&(a=1);for(var v=null,o=0;o{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){a===void 0&&(a=1);for(var v=null,o=0;o{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){var r=t.length;if(a<0||a>r||a>=v||v>r){if(o)throw new Error("Range Error: Values outside acceptable range");return!1}else return!0};c.exports=m},89545:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){var v=t.indexOf(a);return v!==-1&&v>0&&(t.splice(v,1),t.unshift(a)),a};c.exports=m},17810:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(82011),v=function(o,r,n,e,i){if(e===void 0&&(e=0),i===void 0&&(i=o.length),a(o,e,i))for(var h=e;h{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){for(var a=t.length-1;a>0;a--){var v=Math.floor(Math.random()*(a+1)),o=t[a];t[a]=t[v],t[v]=o}return t};c.exports=m},90126:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){var a=/\D/g;return t.sort(function(v,o){return parseInt(v.replace(a,""),10)-parseInt(o.replace(a,""),10)}),t};c.exports=m},19133:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){if(!(a>=t.length)){for(var v=t.length-1,o=t[a],r=a;r{/** - * @author Richard Davey - * @author Angry Bytes (and contributors) - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(82264);function v(e,i){return String(e).localeCompare(i)}function o(e,i){var h=e.length;if(h<=1)return e;for(var s=new Array(h),l=1;ll&&(p=l),g>l&&(g=l),x=d,y=p;;)if(x{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){if(a===v)return t;var o=t.indexOf(a),r=t.indexOf(v);if(o<0||r<0)throw new Error("Supplied items must be elements of the same array");return t[o]=v,t[r]=a,t};c.exports=m},37105:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={Matrix:t(54915),Add:t(71146),AddAt:t(51067),BringToTop:t(66905),CountAllMatching:t(21612),Each:t(95428),EachInRange:t(36914),FindClosestInSorted:t(81957),Flatten:t(43491),GetAll:t(46710),GetFirst:t(58731),GetRandom:t(26546),MoveDown:t(70864),MoveTo:t(69693),MoveUp:t(40853),MoveAbove:t(85835),MoveBelow:t(83371),NumberArray:t(20283),NumberArrayStep:t(593),QuickSelect:t(43886),Range:t(88492),Remove:t(72905),RemoveAt:t(60248),RemoveBetween:t(81409),RemoveRandomElement:t(31856),Replace:t(42169),RotateLeft:t(86003),RotateRight:t(49498),SafeRange:t(82011),SendToBack:t(89545),SetAll:t(17810),Shuffle:t(33680),SortByDigits:t(90126),SpliceOne:t(19133),StableSort:t(19186),Swap:t(25630)}},86922:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){if(!Array.isArray(t)||!Array.isArray(t[0]))return!1;for(var a=t[0].length,v=1;v{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(41836),v=t(86922),o=function(r){var n="";if(!v(r))return n;for(var e=0;e{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return t.reverse()};c.exports=m},21224:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){for(var a=0;a{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(37829),v=function(o){return a(o,180)};c.exports=v},44657:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(37829),v=function(o,r){r===void 0&&(r=1);for(var n=0;n{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(86922),v=t(2429),o=function(r,n){if(n===void 0&&(n=90),!a(r))return null;if(typeof n!="string"&&(n=(n%360+360)%360),n===90||n===-270||n==="rotateLeft")r=v(r),r.reverse();else if(n===-90||n===270||n==="rotateRight")r.reverse(),r=v(r);else if(Math.abs(n)===180||n==="rotate180"){for(var e=0;e{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(37829),v=function(o,r){r===void 0&&(r=1);for(var n=0;n{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(86003),v=t(49498),o=function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),e!==0&&(e<0?a(r,Math.abs(e)):v(r,e)),n!==0)for(var i=0;i{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){for(var a=t.length,v=t[0].length,o=new Array(v),r=0;r-1;n--)o[r][n]=t[n][r]}return o};c.exports=m},54915:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={CheckMatrix:t(86922),MatrixToString:t(63362),ReverseColumns:t(92598),ReverseRows:t(21224),Rotate180:t(98717),RotateLeft:t(44657),RotateMatrix:t(37829),RotateRight:t(92632),Translate:t(69512),TransposeMatrix:t(2429)}},71334:c=>{/** - * @author Niklas von Hertzen (https://github.com/niklasvh/base64-arraybuffer) - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=function(a,v){for(var o=new Uint8Array(a),r=o.length,n=v?"data:"+v+";base64,":"",e=0;e>2],n+=m[(o[e]&3)<<4|o[e+1]>>4],n+=m[(o[e+1]&15)<<2|o[e+2]>>6],n+=m[o[e+2]&63];return r%3===2?n=n.substring(0,n.length-1)+"=":r%3===1&&(n=n.substring(0,n.length-2)+"=="),n};c.exports=t},53134:c=>{/** - * @author Niklas von Hertzen (https://github.com/niklasvh/base64-arraybuffer) - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */for(var m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=new Uint8Array(256),a=0;a>4,u[e++]=(h&15)<<4|s>>2,u[e++]=(s&3)<<6|l&63;return f};c.exports=v},65839:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={ArrayBufferToBase64:t(71334),Base64ToArrayBuffer:t(53134)}},91799:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={Array:t(37105),Base64:t(65839),Objects:t(1183),String:t(31749),NOOP:t(29747),NULL:t(20242)}},41786:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){var a={};for(var v in t)Array.isArray(t[v])?a[v]=t[v].slice(0):a[v]=t[v];return a};c.exports=m},62644:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){var a,v,o;if(typeof t!="object"||t===null)return t;a=Array.isArray(t)?[]:{};for(o in t)v=t[o],a[o]=m(v);return a};c.exports=m},79291:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(41212),v=function(){var o,r,n,e,i,h,s=arguments[0]||{},l=1,f=arguments.length,u=!1;for(typeof s=="boolean"&&(u=s,s=arguments[1]||{},l=2),f===l&&(s=this,--l);l{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(75508),v=t(35154),o=function(r,n,e){var i=v(r,n,null);if(i===null)return e;if(Array.isArray(i))return a.RND.pick(i);if(typeof i=="object"){if(i.hasOwnProperty("randInt"))return a.RND.integerInRange(i.randInt[0],i.randInt[1]);if(i.hasOwnProperty("randFloat"))return a.RND.realInRange(i.randFloat[0],i.randFloat[1])}else if(typeof i=="function")return i(n);return i};c.exports=o},95540:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){var o=typeof t;return!t||o==="number"||o==="string"?v:t.hasOwnProperty(a)&&t[a]!==void 0?t[a]:v};c.exports=m},82840:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(35154),v=t(45319),o=function(r,n,e,i,h){h===void 0&&(h=e);var s=a(r,n,h);return v(s,e,i)};c.exports=o},35154:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){if(!t&&!o||typeof t=="number")return v;if(t&&t.hasOwnProperty(a))return t[a];if(o&&o.hasOwnProperty(a))return o[a];if(a.indexOf(".")!==-1){for(var r=a.split("."),n=t,e=o,i=v,h=v,s=!0,l=!0,f=0;f{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){for(var v=0;v{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){for(var v=0;v{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return t.hasOwnProperty(a)};c.exports=m},41212:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){if(!t||typeof t!="object"||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch{return!1}return!0};c.exports=m},46975:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(41786),v=function(o,r){var n=a(o);for(var e in r)n.hasOwnProperty(e)||(n[e]=r[e]);return n};c.exports=v},269:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(41786),v=function(o,r){var n=a(o);for(var e in r)n.hasOwnProperty(e)&&(n[e]=r[e]);return n};c.exports=v},18254:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var a=t(97022),v=function(o,r){for(var n={},e=0;e{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v){if(!t||typeof t=="number")return!1;if(t.hasOwnProperty(a))return t[a]=v,!0;if(a.indexOf(".")!==-1){for(var o=a.split("."),r=t,n=t,e=0;e{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={Clone:t(41786),DeepCopy:t(62644),Extend:t(79291),GetAdvancedValue:t(23568),GetFastValue:t(95540),GetMinMaxValue:t(82840),GetValue:t(35154),HasAll:t(69036),HasAny:t(1985),HasValue:t(97022),IsPlainObject:t(41212),Merge:t(46975),MergeRight:t(269),Pick:t(18254),SetValue:t(61622)}},27902:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return t.replace(/%([0-9]+)/g,function(v,o){return a[Number(o)-1]})};c.exports=m},41836:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a,v,o){a===void 0&&(a=0),v===void 0&&(v=" "),o===void 0&&(o=3),t=t.toString();var r=0;if(a+1>=t.length)switch(o){case 1:t=new Array(a+1-t.length).join(v)+t;break;case 3:var n=Math.ceil((r=a-t.length)/2),e=r-n;t=new Array(e+1).join(v)+t+new Array(n+1).join(v);break;default:t=t+new Array(a+1-t.length).join(v);break}return t};c.exports=m},33628:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t,a){return a===0?t.slice(1):t.slice(0,a-1)+t.slice(a)};c.exports=m},27671:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return t.split("").reverse().join("")};c.exports=m},45650:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var a=Math.random()*16|0,v=t==="x"?a:a&3|8;return v.toString(16)})};c.exports=m},35355:c=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */var m=function(t){return t&&t[0].toUpperCase()+t.slice(1)};c.exports=m},31749:(c,m,t)=>{/** - * @author Richard Davey - * @copyright 2013-2024 Phaser Studio Inc. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */c.exports={Format:t(27902),Pad:t(41836),RemoveAt:t(33628),Reverse:t(27671),UppercaseFirst:t(35355),UUID:t(45650)}}},w={};function O(c){var m=w[c];if(m!==void 0)return m.exports;var t=w[c]={exports:{}};return E[c](t,t.exports,O),t.exports}O.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}();var D=O(85454);return D})())})(ed);var Qr=ed.exports;const un=zf(Qr);var pT=Object.create,sh=Object.defineProperty,gT=Object.defineProperties,mT=Object.getOwnPropertyDescriptor,yT=Object.getOwnPropertyDescriptors,xT=Object.getOwnPropertyNames,hf=Object.getOwnPropertySymbols,TT=Object.getPrototypeOf,id=Object.prototype.hasOwnProperty,ST=Object.prototype.propertyIsEnumerable,lf=(S,T,E)=>T in S?sh(S,T,{enumerable:!0,configurable:!0,writable:!0,value:E}):S[T]=E,he=(S,T)=>{for(var E in T||(T={}))id.call(T,E)&&lf(S,E,T[E]);if(hf)for(var E of hf(T))ST.call(T,E)&&lf(S,E,T[E]);return S},Qi=(S,T)=>gT(S,yT(T)),Lt=(S,T)=>()=>(T||S((T={exports:{}}).exports,T),T.exports),CT=(S,T,E,w)=>{if(T&&typeof T=="object"||typeof T=="function")for(let O of xT(T))!id.call(S,O)&&O!==E&&sh(S,O,{get:()=>T[O],enumerable:!(w=mT(T,O))||w.enumerable});return S},sd=(S,T,E)=>(E=S!=null?pT(TT(S)):{},CT(T||!S||!S.__esModule?sh(E,"default",{value:S,enumerable:!0}):E,S)),kr=Lt(S=>{var T=function(D,c){return Dc?1:0},E=function(D,c){return Dc?-1:0};function w(D){return function(c,m){return D(m,c)}}function O(D){return D===2?function(c,m){return c[0]m[0]?1:c[1]m[1]?1:0}:function(c,m){for(var t=0;tm[t])return 1;t++}return 0}}S.DEFAULT_COMPARATOR=T,S.DEFAULT_REVERSE_COMPARATOR=E,S.reverseComparator=w,S.createTupleComparator=O}),ET=Lt(S=>{S.ARRAY_BUFFER_SUPPORT=typeof ArrayBuffer<"u",S.SYMBOL_SUPPORT=typeof Symbol<"u"}),fe=Lt((S,T)=>{var E=ET(),w=E.ARRAY_BUFFER_SUPPORT,O=E.SYMBOL_SUPPORT;T.exports=function(D,c){var m,t,a,v,o;if(!D)throw new Error("obliterator/forEach: invalid iterable.");if(typeof c!="function")throw new Error("obliterator/forEach: expecting a callback.");if(Array.isArray(D)||w&&ArrayBuffer.isView(D)||typeof D=="string"||D.toString()==="[object Arguments]"){for(a=0,v=D.length;a{var E=kr(),w=fe(),O=E.DEFAULT_COMPARATOR,D=E.reverseComparator;function c(i){if(this.clear(),this.comparator=i||O,typeof this.comparator!="function")throw new Error("mnemonist/FibonacciHeap.constructor: given comparator should be a function.")}c.prototype.clear=function(){this.root=null,this.min=null,this.size=0};function m(i){return{item:i,degree:0}}function t(i,h){i.root?(h.right=i.root.right,h.left=i.root,i.root.right.left=h,i.root.right=h):i.root=h}c.prototype.push=function(i){var h=m(i);return h.left=h,h.right=h,t(this,h),(!this.min||this.comparator(h.item,this.min.item)<=0)&&(this.min=h),++this.size},c.prototype.peek=function(){return this.min?this.min.item:void 0};function a(i){for(var h=[],s=i,l=!1;!(s===i&&l);)s===i&&(l=!0),h.push(s),s=s.right;return h}function v(i,h){i.root===h&&(i.root=h.right),h.left.right=h.right,h.right.left=h.left}function o(i,h){i.child?(h.right=i.child.right,h.left=i.child,i.child.right.left=h,i.child.right=h):i.child=h}function r(i,h,s){v(i,h),h.left=h,h.right=h,o(s,h),s.degree++,h.parent=s}function n(i){var h=new Array(i.size),s=a(i.root),l,f,u,d,p,g;for(l=0,f=s.length;l0&&(g=u,u=d,d=g),r(i,d,u),h[p]=null,p++;h[p]=u}for(l=0;l{var T=Math.pow(2,8)-1,E=Math.pow(2,16)-1,w=Math.pow(2,32)-1,O=Math.pow(2,7)-1,D=Math.pow(2,15)-1,c=Math.pow(2,31)-1;S.getPointerArray=function(t){var a=t-1;if(a<=T)return Uint8Array;if(a<=E)return Uint16Array;if(a<=w)return Uint32Array;throw new Error("mnemonist: Pointer Array of size > 4294967295 is not supported.")},S.getSignedPointerArray=function(t){var a=t-1;return a<=O?Int8Array:a<=D?Int16Array:a<=c?Int32Array:Float64Array},S.getNumberType=function(t){return t===(t|0)?Math.sign(t)===-1?t<=127&&t>=-128?Int8Array:t<=32767&&t>=-32768?Int16Array:Int32Array:t<=255?Uint8Array:t<=65535?Uint16Array:Uint32Array:Float64Array};var m={Uint8Array:1,Int8Array:2,Uint16Array:3,Int16Array:4,Uint32Array:5,Int32Array:6,Float32Array:7,Float64Array:8};S.getMinimalRepresentation=function(t,a){var v=null,o=0,r,n,e,i,h;for(i=0,h=t.length;io&&(o=r,v=n);return v},S.isTypedArray=function(t){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView(t)},S.concat=function(){var t=0,a,v,o;for(a=0,o=arguments.length;a{var T=fe(),E=Ue();function w(m){return Array.isArray(m)||E.isTypedArray(m)}function O(m){if(typeof m.length=="number")return m.length;if(typeof m.size=="number")return m.size}function D(m){var t=O(m),a=typeof t=="number"?new Array(t):[],v=0;return T(m,function(o){a[v++]=o}),a}function c(m){var t=O(m),a=typeof t=="number"?E.getPointerArray(t):Array,v=typeof t=="number"?new Array(t):[],o=typeof t=="number"?new a(t):[],r=0;return T(m,function(n){v[r]=n,o[r]=r++}),[v,o]}S.isArrayLike=w,S.guessLength=O,S.toArray=D,S.toArrayWithIndices=c}),rh=Lt((S,T)=>{var E=fe(),w=kr(),O=$e(),D=w.DEFAULT_COMPARATOR,c=w.reverseComparator;function m(f,u,d,p){for(var g=u[p],x,y;p>d;){if(x=p-1>>1,y=u[x],f(g,y)<0){u[p]=y,p=x;continue}break}u[p]=g}function t(f,u,d){for(var p=u.length,g=d,x=u[d],y=2*d+1,C;y=0&&(y=C),u[d]=u[y],d=y,y=2*d+1;u[d]=x,m(f,u,g,d)}function a(f,u,d){u.push(d),m(f,u,0,u.length-1)}function v(f,u){var d=u.pop();if(u.length!==0){var p=u[0];return u[0]=d,t(f,u,0),p}return d}function o(f,u,d){if(u.length===0)throw new Error("mnemonist/heap.replace: cannot pop an empty heap.");var p=u[0];return u[0]=d,t(f,u,0),p}function r(f,u,d){var p;return u.length!==0&&f(u[0],d)<0&&(p=u[0],u[0]=d,d=p,t(f,u,0)),d}function n(f,u){for(var d=u.length,p=d>>1,g=p;--g>=0;)t(f,u,g)}function e(f,u){for(var d=u.length,p=0,g=new Array(d);p=d.length)return d.slice().sort(f);for(P=d.slice(0,u),n(p,P),g=u,x=d.length;g0&&o(p,P,d[g]);return P.sort(f)}var M=O.guessLength(d);return M!==null&&M0&&o(p,P,R)),g++}),P.length>g&&(P.length=g),P.sort(f)}function h(f,u,d){arguments.length===2&&(d=u,u=f,f=D);var p=c(f),g,x,y,C=-1/0,P;if(u===1){if(O.isArrayLike(d)){for(g=0,x=d.length;g0)&&(C=y);return P=new d.constructor(1),P[0]=C,P}return E(d,function(R){(C===-1/0||f(R,C)>0)&&(C=R)}),[C]}if(O.isArrayLike(d)){if(u>=d.length)return d.slice().sort(p);for(P=d.slice(0,u),n(f,P),g=u,x=d.length;g0&&o(f,P,d[g]);return P.sort(p)}var M=O.guessLength(d);return M!==null&&M0&&o(f,P,R)),g++}),P.length>g&&(P.length=g),P.sort(p)}function s(f){if(this.clear(),this.comparator=f||D,typeof this.comparator!="function")throw new Error("mnemonist/Heap.constructor: given comparator should be a function.")}s.prototype.clear=function(){this.items=[],this.size=0},s.prototype.push=function(f){return a(this.comparator,this.items,f),++this.size},s.prototype.peek=function(){return this.items[0]},s.prototype.pop=function(){return this.size!==0&&this.size--,v(this.comparator,this.items)},s.prototype.replace=function(f){return o(this.comparator,this.items,f)},s.prototype.pushpop=function(f){return r(this.comparator,this.items,f)},s.prototype.consume=function(){return this.size=0,e(this.comparator,this.items)},s.prototype.toArray=function(){return e(this.comparator,this.items.slice())},s.prototype.inspect=function(){var f=this.toArray();return Object.defineProperty(f,"constructor",{value:s,enumerable:!1}),f},typeof Symbol<"u"&&(s.prototype[Symbol.for("nodejs.util.inspect.custom")]=s.prototype.inspect);function l(f){if(this.clear(),this.comparator=f||D,typeof this.comparator!="function")throw new Error("mnemonist/MaxHeap.constructor: given comparator should be a function.");this.comparator=c(this.comparator)}l.prototype=s.prototype,s.from=function(f,u){var d=new s(u),p;return O.isArrayLike(f)?p=f.slice():p=O.toArray(f),n(d.comparator,p),d.items=p,d.size=p.length,d},l.from=function(f,u){var d=new l(u),p;return O.isArrayLike(f)?p=f.slice():p=O.toArray(f),n(d.comparator,p),d.items=p,d.size=p.length,d},s.siftUp=t,s.siftDown=m,s.push=a,s.pop=v,s.replace=o,s.pushpop=r,s.heapify=n,s.consume=e,s.nsmallest=i,s.nlargest=h,s.MinHeap=s,s.MaxHeap=l,T.exports=s}),PT=Lt((S,T)=>{var E="";function w(a,v,o){for(var r=v.length,n=[],e=r,i=-1,h,s=0,l;e--;)i=Math.max(a[v[e]+o],i);for(l=i>>24&&32||i>>16&&24||i>>8&&16||8;s>s&15].push(v[e]);for(h=0;h<16;h++)for(i=n[h].length;i--;)v[++e]=n[h][i]}}function O(a,v,o,r){return a[o]-a[r]||(o%3===2?a[o+1]-a[r+1]||v[o+2]-v[r+2]:v[o+1]-v[r+1])}function D(a,v){var o=[],r=[],n=2*v/3|0,e=v-n,i=n+1>>1,h=n,s=0,l,f=[],u=[];if(v===1)return[0];for(;h--;)o[h]=(h*3>>1)+1;for(h=3;h--;)w(a,o,h);for(s=r[(o[0]/3|0)+(o[0]%3===1?0:i)]=1,h=1;hthis.firstLength&&e>this.firstLength)){for(v=Math.min(this.length-n,this.length-e),r=0;ra.length&&(a=this.text.slice(n,n+v))}return a},t.prototype.toString=function(){return this.array.join(",")},t.prototype.toJSON=function(){return this.array},t.prototype.inspect=function(){for(var a=new Array(this.length),v=0;v{var E=fe();function w(a){this.size=0,this.items=new Map,this.inverse=a}function O(){this.size=0,this.items=new Map,this.inverse=new w(this)}function D(){this.size=0,this.items.clear(),this.inverse.items.clear()}O.prototype.clear=D,w.prototype.clear=D;function c(a,v){if(this.items.has(a)){var o=this.items.get(a);if(o===v)return this;this.inverse.items.delete(o)}if(this.inverse.items.has(v)){var r=this.inverse.items.get(v);if(r===a)return this;this.items.delete(r)}return this.items.set(a,v),this.inverse.items.set(v,a),this.size=this.items.size,this.inverse.size=this.inverse.items.size,this}O.prototype.set=c,w.prototype.set=c;function m(a){if(this.items.has(a)){var v=this.items.get(a);return this.items.delete(a),this.inverse.items.delete(v),this.size=this.items.size,this.inverse.size=this.inverse.items.size,!0}return!1}O.prototype.delete=m,w.prototype.delete=m;var t=["has","get","forEach","keys","values","entries"];t.forEach(function(a){O.prototype[a]=w.prototype[a]=function(){return Map.prototype[a].apply(this.items,arguments)}}),typeof Symbol<"u"&&(O.prototype[Symbol.iterator]=O.prototype.entries,w.prototype[Symbol.iterator]=w.prototype.entries),O.prototype.inspect=function(){var a={left:this.items,right:this.inverse.items};return Object.defineProperty(a,"constructor",{value:O,enumerable:!1}),a},typeof Symbol<"u"&&(O.prototype[Symbol.for("nodejs.util.inspect.custom")]=O.prototype.inspect),w.prototype.inspect=function(){var a={left:this.inverse.items,right:this.items};return Object.defineProperty(a,"constructor",{value:w,enumerable:!1}),a},typeof Symbol<"u"&&(w.prototype[Symbol.for("nodejs.util.inspect.custom")]=w.prototype.inspect),O.from=function(a){var v=new O;return E(a,function(o,r){v.set(r,o)}),v},T.exports=O}),Re=Lt((S,T)=>{function E(w){if(typeof w!="function")throw new Error("obliterator/iterator: expecting a function!");this.next=w}typeof Symbol<"u"&&(E.prototype[Symbol.iterator]=function(){return this}),E.of=function(){var w=arguments,O=w.length,D=0;return new E(function(){return D>=O?{done:!0}:{done:!1,value:w[D++]}})},E.empty=function(){var w=new E(function(){return{done:!0}});return w},E.fromSequence=function(w){var O=0,D=w.length;return new E(function(){return O>=D?{done:!0}:{done:!1,value:w[O++]}})},E.is=function(w){return w instanceof E?!0:typeof w=="object"&&w!==null&&typeof w.next=="function"},T.exports=E}),nd=Lt(S=>{function T(c){return c|=c>>1,c|=c>>2,c|=c>>4,c|=c>>8,c|=c>>16,c&~(c>>1)}S.msb32=T;function E(c){return c|=c>>1,c|=c>>2,c|=c>>4,c&~(c>>1)}S.msb8=E,S.test=function(c,m){return c>>m&1},S.criticalBit8=function(c,m){return E(c^m)},S.criticalBit8Mask=function(c,m){return~E(c^m)>>>0&255},S.testCriticalBit8=function(c,m){return 1+(c|m)>>8},S.criticalBit32Mask=function(c,m){return~T(c^m)>>>0&4294967295},S.popcount=function(c){return c-=c>>1&1431655765,c=(c&858993459)+(c>>2&858993459),c=c+(c>>4)&252645135,c+=c>>8,c+=c>>16,c&127};var w=new Uint8Array(Math.pow(2,8));for(O=0,D=w.length;O>8&255]+w[c>>16&255]+w[c>>24&255]}}),MT=Lt((S,T)=>{var E=Re(),w=nd();function O(D){this.length=D,this.clear()}O.prototype.clear=function(){this.size=0,this.array=new Uint32Array(Math.ceil(this.length/32))},O.prototype.set=function(D,c){var m=D>>5,t=D&31,a=this.array[m],v;return c===0||c===!1?v=this.array[m]&=~(1<>>0,v>a?this.size++:v>5,m=D&31,t=this.array[c],a;return a=this.array[c]&=~(1<>5,m=D&31,t=this.array[c],a=this.array[c]^=1<>>0,a>t?this.size++:a>5,m=D&31;return this.array[c]>>m&1},O.prototype.test=function(D){return!!this.get(D)},O.prototype.rank=function(D){if(this.size===0)return 0;for(var c=D>>5,m=D&31,t=0,a=0;a=this.length)return-1;for(var c,m=32,t=0,a=0,v=0,o=this.array.length;v>r&1,a===D)return t}},O.prototype.forEach=function(D,c){c=arguments.length>1?c:this;for(var m=this.length,t,a,v=32,o=0,r=this.array.length;o>n&1,D.call(c,a,o*32+n)}},O.prototype.values=function(){var D=this.length,c=!1,m,t,a=this.array,v=a.length,o=0,r=-1,n=32;return new E(function e(){if(!c){if(o>=v)return{done:!0};o===v-1&&(n=D%32||32),m=a[o++],c=!0,r=-1}return r++,r>=n?(c=!1,e()):(t=m>>r&1,{value:t})})},O.prototype.entries=function(){var D=this.length,c=!1,m,t,a=this.array,v,o=a.length,r=0,n=-1,e=32;return new E(function i(){if(!c){if(r>=o)return{done:!0};r===o-1&&(e=D%32||32),m=a[r++],c=!0,n=-1}return n++,v=~-r*32+n,n>=e?(c=!1,i()):(t=m>>n&1,{value:[v,t]})})},typeof Symbol<"u"&&(O.prototype[Symbol.iterator]=O.prototype.values),O.prototype.inspect=function(){var D=new Uint8Array(this.length);return this.forEach(function(c,m){D[m]=c}),Object.defineProperty(D,"constructor",{value:O,enumerable:!1}),D},typeof Symbol<"u"&&(O.prototype[Symbol.for("nodejs.util.inspect.custom")]=O.prototype.inspect),O.prototype.toJSON=function(){return Array.from(this.array)},T.exports=O}),wT=Lt((S,T)=>{var E=Re(),w=nd(),O=function(m){return Math.max(1,Math.ceil(m*1.5))};function D(m){return new Uint32Array(Math.ceil(m/32))}function c(m){var t=m||0,a=O;typeof m=="object"&&(t=m.initialLength||m.initialCapacity||0,a=m.policy||a),this.size=0,this.length=t,this.capacity=Math.ceil(this.length/32)*32,this.policy=a,this.array=D(this.capacity)}c.prototype.set=function(m,t){if(this.length>5,v=m&31,o=this.array[a],r;return t===0||t===!1?r=this.array[a]&=~(1<>>0,r>o?this.size++:r>5,a=m&31,v=this.array[t],o;return o=this.array[t]&=~(1<>5,a=m&31,v=this.array[t],o=this.array[t]^=1<>>0,o>v?this.size++:othis.array.length?(this.array=new Uint32Array(v),this.array.set(a,0)):this.array=a.slice(0,v),this.capacity=m,this)},c.prototype.grow=function(m){var t;if(typeof m=="number"){if(this.capacity>=m)return this;for(t=this.capacity;t>5,v=t&31;return this.array[a]|=1<>5,a=m&31;return this.array[t]>>a&1}},c.prototype.get=function(m){if(!(this.length>5,a=m&31;return this.array[t]>>a&1}},c.prototype.test=function(m){return this.length>5,a=m&31,v=0,o=0;o=this.length)return-1;for(var t,a=32,v=0,o=0,r=0,n=this.array.length;r>e&1,o===m)return v}},c.prototype.forEach=function(m,t){t=arguments.length>1?t:this;for(var a=this.length,v,o,r=32,n=0,e=this.array.length;n>i&1,m.call(t,o,n*32+i)}},c.prototype.values=function(){var m=this.length,t=!1,a,v,o=this.array,r=o.length,n=0,e=-1,i=32;return new E(function h(){if(!t){if(n>=r)return{done:!0};n===r-1&&(i=m%32||32),a=o[n++],t=!0,e=-1}return e++,e>=i?(t=!1,h()):(v=a>>e&1,{value:v})})},c.prototype.entries=function(){var m=this.length,t=!1,a,v,o=this.array,r,n=o.length,e=0,i=-1,h=32;return new E(function s(){if(!t){if(e>=n)return{done:!0};e===n-1&&(h=m%32||32),a=o[e++],t=!0,i=-1}return i++,r=~-e*32+i,i>=h?(t=!1,s()):(v=a>>i&1,{value:[r,v]})})},typeof Symbol<"u"&&(c.prototype[Symbol.iterator]=c.prototype.values),c.prototype.inspect=function(){var m=new Uint8Array(this.length);return this.forEach(function(t,a){m[a]=t}),Object.defineProperty(m,"constructor",{value:c,enumerable:!1}),m},typeof Symbol<"u"&&(c.prototype[Symbol.for("nodejs.util.inspect.custom")]=c.prototype.inspect),c.prototype.toJSON=function(){return Array.from(this.array.slice(0,(this.length>>5)+1))},T.exports=c}),RT=Lt((S,T)=>{function E(D,c){return(D&65535)*c+(((D>>>16)*c&65535)<<16)&4294967295}function w(D,c){return(D&65535)+(c>>>16)+(((D>>>16)+c&65535)<<16)&4294967295}function O(D,c){return D<>>32-c}T.exports=function(D,c){var m=3432918353,t=461845907,a=15,v=13,o=5,r=1801774676,n=D,e,i,h;for(i=0,h=c.length-4;i<=h;i+=4)e=c[i]|c[i+1]<<8|c[i+2]<<16|c[i+3]<<24,e=E(e,m),e=O(e,a),e=E(e,t),n^=e,n=O(n,v),n=E(n,o),n=w(n,r);switch(e=0,c.length&3){case 3:e^=c[i+2]<<16;case 2:e^=c[i+1]<<8;case 1:e^=c[i],e=E(e,m),e=O(e,a),e=E(e,t),n^=e}return n^=c.length,n^=n>>>16,n=E(n,2246822507),n^=n>>>13,n=E(n,3266489909),n^=n>>>16,n>>>0}}),FT=Lt((S,T)=>{var E=RT(),w=fe(),O=Math.LN2*Math.LN2,D={errorRate:.005};function c(a){var v=new Uint16Array(a.length),o,r;for(o=0,r=a.length;o>3]|=e}return this},t.prototype.test=function(a){for(var v=c(a),o=0,r=this.hashFunctions;o>3]&1<<(7&n)))return!1}return!0},t.prototype.toJSON=function(){return this.data},t.from=function(a,v){if(!v&&(v=a.length||a.size,typeof v!="number"))throw new Error("BloomFilter.from: could not infer the filter's capacity. Try passing it as second argument.");var o=new t(v);return w(a,function(r){o.add(r)}),o},T.exports=t}),LT=Lt((S,T)=>{var E=fe();function w(O){if(typeof O!="function")throw new Error("mnemonist/BKTree.constructor: given `distance` should be a function.");this.distance=O,this.clear()}w.prototype.add=function(O){if(!this.root)return this.root={item:O,children:{}},this.size++,this;for(var D=this.root,c;c=this.distance(O,D.item),!!D.children[c];)D=D.children[c];return D.children[c]={item:O,children:{}},this.size++,this},w.prototype.search=function(O,D){if(!this.root)return[];for(var c=[],m=[this.root],t,a,v,o,r;m.length;)for(t=m.pop(),v=this.distance(D,t.item),v<=O&&c.push({item:t.item,distance:v}),o=v-O,r=v+O+1;o{var E=$e(),w=Re();function O(D,c){if(arguments.length<2)throw new Error("mnemonist/fixed-deque: expecting an Array class and a capacity.");if(typeof c!="number"||c<=0)throw new Error("mnemonist/fixed-deque: `capacity` should be a positive number.");this.ArrayClass=D,this.capacity=c,this.items=new D(this.capacity),this.clear()}O.prototype.clear=function(){this.start=0,this.size=0},O.prototype.push=function(D){if(this.size===this.capacity)throw new Error("mnemonist/fixed-deque.push: deque capacity ("+this.capacity+") exceeded!");var c=this.start+this.size;return c>=this.capacity&&(c-=this.capacity),this.items[c]=D,++this.size},O.prototype.unshift=function(D){if(this.size===this.capacity)throw new Error("mnemonist/fixed-deque.unshift: deque capacity ("+this.capacity+") exceeded!");var c=this.start-1;return this.start===0&&(c=this.capacity-1),this.items[c]=D,this.start=c,++this.size},O.prototype.pop=function(){if(this.size!==0){this.size--;var D=this.start+this.size;return D>=this.capacity&&(D-=this.capacity),this.items[D]}},O.prototype.shift=function(){if(this.size!==0){var D=this.start;return this.size--,this.start++,this.start===this.capacity&&(this.start=0),this.items[D]}},O.prototype.peekFirst=function(){if(this.size!==0)return this.items[this.start]},O.prototype.peekLast=function(){if(this.size!==0){var D=this.start+this.size-1;return D>=this.capacity&&(D-=this.capacity),this.items[D]}},O.prototype.get=function(D){if(!(this.size===0||D>=this.capacity))return D=this.start+D,D>=this.capacity&&(D-=this.capacity),this.items[D]},O.prototype.forEach=function(D,c){c=arguments.length>1?c:this;for(var m=this.capacity,t=this.size,a=this.start,v=0;v=m)return{done:!0};var v=D[t];return t++,a++,t===c&&(t=0),{value:v,done:!1}})},O.prototype.entries=function(){var D=this.items,c=this.capacity,m=this.size,t=this.start,a=0;return new w(function(){if(a>=m)return{done:!0};var v=D[t];return t++,t===c&&(t=0),{value:[a++,v],done:!1}})},typeof Symbol<"u"&&(O.prototype[Symbol.iterator]=O.prototype.values),O.prototype.inspect=function(){var D=this.toArray();return D.type=this.ArrayClass.name,D.capacity=this.capacity,Object.defineProperty(D,"constructor",{value:O,enumerable:!1}),D},typeof Symbol<"u"&&(O.prototype[Symbol.for("nodejs.util.inspect.custom")]=O.prototype.inspect),O.from=function(D,c,m){if(arguments.length<3&&(m=E.guessLength(D),typeof m!="number"))throw new Error("mnemonist/fixed-deque.from: could not guess iterable length. Please provide desired capacity as last argument.");var t=new O(c,m);if(E.isArrayLike(D)){var a,v;for(a=0,v=D.length;a{var E=$e(),w=rd();function O(c,m){if(arguments.length<2)throw new Error("mnemonist/circular-buffer: expecting an Array class and a capacity.");if(typeof m!="number"||m<=0)throw new Error("mnemonist/circular-buffer: `capacity` should be a positive number.");this.ArrayClass=c,this.capacity=m,this.items=new c(this.capacity),this.clear()}function D(c){O.prototype[c]=w.prototype[c]}Object.keys(w.prototype).forEach(D),typeof Symbol<"u"&&Object.getOwnPropertySymbols(w.prototype).forEach(D),O.prototype.push=function(c){var m=this.start+this.size;return m>=this.capacity&&(m-=this.capacity),this.items[m]=c,this.size===this.capacity?(m++,m>=this.capacity?this.start=0:this.start=m,this.size):++this.size},O.prototype.unshift=function(c){var m=this.start-1;return this.start===0&&(m=this.capacity-1),this.items[m]=c,this.size===this.capacity?(this.start=m,this.size):(this.start=m,++this.size)},O.from=function(c,m,t){if(arguments.length<3&&(t=E.guessLength(c),typeof t!="number"))throw new Error("mnemonist/circular-buffer.from: could not guess iterable length. Please provide desired capacity as last argument.");var a=new O(m,t);if(E.isArrayLike(c)){var v,o;for(v=0,o=c.length;v{function E(w){if(typeof w!="function")throw new Error("mnemonist/DefaultMap.constructor: expecting a function.");this.items=new Map,this.factory=w,this.size=0}E.prototype.clear=function(){this.items.clear(),this.size=0},E.prototype.get=function(w){var O=this.items.get(w);return typeof O>"u"&&(O=this.factory(w,this.size),this.items.set(w,O),this.size++),O},E.prototype.peek=function(w){return this.items.get(w)},E.prototype.set=function(w,O){return this.items.set(w,O),this.size=this.items.size,this},E.prototype.has=function(w){return this.items.has(w)},E.prototype.delete=function(w){var O=this.items.delete(w);return this.size=this.items.size,O},E.prototype.forEach=function(w,O){O=arguments.length>1?O:this,this.items.forEach(w,O)},E.prototype.entries=function(){return this.items.entries()},E.prototype.keys=function(){return this.items.keys()},E.prototype.values=function(){return this.items.values()},typeof Symbol<"u"&&(E.prototype[Symbol.iterator]=E.prototype.entries),E.prototype.inspect=function(){return this.items},typeof Symbol<"u"&&(E.prototype[Symbol.for("nodejs.util.inspect.custom")]=E.prototype.inspect),E.autoIncrement=function(){var w=0;return function(){return w++}},T.exports=E}),IT=Lt((S,T)=>{function E(w){if(typeof w!="function")throw new Error("mnemonist/DefaultWeakMap.constructor: expecting a function.");this.items=new WeakMap,this.factory=w}E.prototype.clear=function(){this.items=new WeakMap},E.prototype.get=function(w){var O=this.items.get(w);return typeof O>"u"&&(O=this.factory(w),this.items.set(w,O)),O},E.prototype.peek=function(w){return this.items.get(w)},E.prototype.set=function(w,O){return this.items.set(w,O),this},E.prototype.has=function(w){return this.items.has(w)},E.prototype.delete=function(w){return this.items.delete(w)},E.prototype.inspect=function(){return this.items},typeof Symbol<"u"&&(E.prototype[Symbol.for("nodejs.util.inspect.custom")]=E.prototype.inspect),T.exports=E}),BT=Lt((S,T)=>{var E=Ue();function w(O){var D=E.getPointerArray(O),c=E.getPointerArray(Math.log2(O));this.size=O,this.dimension=O,this.parents=new D(O),this.ranks=new c(O);for(var m=0;ma?this.parents[m]=c:(this.parents[m]=c,this.ranks[c]++),this},w.prototype.connected=function(O,D){var c=this.find(O);return c===this.find(D)},w.prototype.mapping=function(){for(var O=E.getPointerArray(this.dimension),D={},c=new O(this.size),m=0,t,a=0,v=this.parents.length;a"u"?(c[a]=m,D[t]=m++):c[a]=D[t];return c},w.prototype.compile=function(){for(var O={},D=new Array(this.dimension),c=0,m,t=0,a=this.parents.length;t"u"?(D[c]=[t],O[m]=c++):D[O[m]].push(t);return D},w.prototype.inspect=function(){var O=this.compile();return Object.defineProperty(O,"constructor",{value:w,enumerable:!1}),O},typeof Symbol<"u"&&(w.prototype[Symbol.for("nodejs.util.inspect.custom")]=w.prototype.inspect),T.exports=w}),ah=Lt((S,T)=>{var E=kr(),w=rh(),O=E.DEFAULT_COMPARATOR,D=E.reverseComparator;function c(a,v,o,r){for(var n=o,e=r,i=v[r],h=2*r+1,s;h=0&&(h=s),v[r]=v[h],r=h,h=2*r+1;v[r]=i,w.siftDown(a,v,e,r)}function m(a,v,o,r){for(var n=r,e=n,i=new a(r),h,s;e>0;)h=o[--e],e!==0&&(s=o[0],o[0]=h,c(v,o,--r,0),h=s),i[e]=h;return i}function t(a,v,o){if(arguments.length===2&&(o=v,v=null),this.ArrayClass=a,this.capacity=o,this.items=new a(o),this.clear(),this.comparator=v||O,typeof o!="number"&&o<=0)throw new Error("mnemonist/FixedReverseHeap.constructor: capacity should be a number > 0.");if(typeof this.comparator!="function")throw new Error("mnemonist/FixedReverseHeap.constructor: given comparator should be a function.");this.comparator=D(this.comparator)}t.prototype.clear=function(){this.size=0},t.prototype.push=function(a){return this.size0&&w.replace(this.comparator,this.items,a),this.size},t.prototype.peek=function(){return this.items[0]},t.prototype.consume=function(){var a=m(this.ArrayClass,this.comparator,this.items,this.size);return this.size=0,a},t.prototype.toArray=function(){return m(this.ArrayClass,this.comparator,this.items.slice(0,this.size),this.size)},t.prototype.inspect=function(){var a=this.toArray();return Object.defineProperty(a,"constructor",{value:t,enumerable:!1}),a},typeof Symbol<"u"&&(t.prototype[Symbol.for("nodejs.util.inspect.custom")]=t.prototype.inspect),T.exports=t}),bT=Lt((S,T)=>{var E=fe(),w=function(D){return D};function O(D){if(this.items=new Map,this.clear(),Array.isArray(D)?(this.writeHashFunction=D[0],this.readHashFunction=D[1]):(this.writeHashFunction=D,this.readHashFunction=D),this.writeHashFunction||(this.writeHashFunction=w),this.readHashFunction||(this.readHashFunction=w),typeof this.writeHashFunction!="function")throw new Error("mnemonist/FuzzyMap.constructor: invalid hash function given.");if(typeof this.readHashFunction!="function")throw new Error("mnemonist/FuzzyMap.constructor: invalid hash function given.")}O.prototype.clear=function(){this.items.clear(),this.size=0},O.prototype.add=function(D){var c=this.writeHashFunction(D);return this.items.set(c,D),this.size=this.items.size,this},O.prototype.set=function(D,c){return D=this.writeHashFunction(D),this.items.set(D,c),this.size=this.items.size,this},O.prototype.get=function(D){return D=this.readHashFunction(D),this.items.get(D)},O.prototype.has=function(D){return D=this.readHashFunction(D),this.items.has(D)},O.prototype.forEach=function(D,c){c=arguments.length>1?c:this,this.items.forEach(function(m){D.call(c,m,m)})},O.prototype.values=function(){return this.items.values()},typeof Symbol<"u"&&(O.prototype[Symbol.iterator]=O.prototype.values),O.prototype.inspect=function(){var D=Array.from(this.items.values());return Object.defineProperty(D,"constructor",{value:O,enumerable:!1}),D},typeof Symbol<"u"&&(O.prototype[Symbol.for("nodejs.util.inspect.custom")]=O.prototype.inspect),O.from=function(D,c,m){var t=new O(c);return E(D,function(a,v){m?t.set(v,a):t.add(a)}),t},T.exports=O}),ad=Lt((S,T)=>{var E=Re(),w=fe();function O(D){this.Container=D||Array,this.items=new Map,this.clear(),Object.defineProperty(this.items,"constructor",{value:O,enumerable:!1})}O.prototype.clear=function(){this.size=0,this.dimension=0,this.items.clear()},O.prototype.set=function(D,c){var m=this.items.get(D),t;return m||(this.dimension++,m=new this.Container,this.items.set(D,m)),this.Container===Set?(t=m.size,m.add(c),t"u"?0:this.Container===Set?c.size:c.length},O.prototype.count=O.prototype.multiplicity,O.prototype.forEach=function(D,c){c=arguments.length>1?c:this;var m;function t(a){D.call(c,a,m)}this.items.forEach(function(a,v){m=v,a.forEach(t)})},O.prototype.forEachAssociation=function(D,c){c=arguments.length>1?c:this,this.items.forEach(D,c)},O.prototype.keys=function(){return this.items.keys()},O.prototype.values=function(){var D=this.items.values(),c=!1,m,t,a,v;return this.Container===Set?new E(function o(){if(!c){if(t=D.next(),t.done)return{done:!0};c=!0,m=t.value.values()}return t=m.next(),t.done?(c=!1,o()):{done:!1,value:t.value}}):new E(function o(){if(!c){if(t=D.next(),t.done)return{done:!0};c=!0,m=t.value,a=0,v=m.length}return a>=v?(c=!1,o()):{done:!1,value:m[a++]}})},O.prototype.entries=function(){var D=this.items.entries(),c=!1,m,t,a,v,o;return this.Container===Set?new E(function r(){if(!c){if(t=D.next(),t.done)return{done:!0};c=!0,a=t.value[0],m=t.value[1].values()}return t=m.next(),t.done?(c=!1,r()):{done:!1,value:[a,t.value]}}):new E(function r(){if(!c){if(t=D.next(),t.done)return{done:!0};c=!0,a=t.value[0],m=t.value[1],v=0,o=m.length}return v>=o?(c=!1,r()):{done:!1,value:[a,m[v++]]}})},O.prototype.containers=function(){return this.items.values()},O.prototype.associations=function(){return this.items.entries()},typeof Symbol<"u"&&(O.prototype[Symbol.iterator]=O.prototype.entries),O.prototype.inspect=function(){return this.items},typeof Symbol<"u"&&(O.prototype[Symbol.for("nodejs.util.inspect.custom")]=O.prototype.inspect),O.prototype.toJSON=function(){return this.items},O.from=function(D,c){var m=new O(c);return w(D,function(t,a){m.set(a,t)}),m},T.exports=O}),NT=Lt((S,T)=>{var E=ad(),w=fe(),O=function(c){return c};function D(c,m){if(this.items=new E(m),this.clear(),Array.isArray(c)?(this.writeHashFunction=c[0],this.readHashFunction=c[1]):(this.writeHashFunction=c,this.readHashFunction=c),this.writeHashFunction||(this.writeHashFunction=O),this.readHashFunction||(this.readHashFunction=O),typeof this.writeHashFunction!="function")throw new Error("mnemonist/FuzzyMultiMap.constructor: invalid hash function given.");if(typeof this.readHashFunction!="function")throw new Error("mnemonist/FuzzyMultiMap.constructor: invalid hash function given.")}D.prototype.clear=function(){this.items.clear(),this.size=0,this.dimension=0},D.prototype.add=function(c){var m=this.writeHashFunction(c);return this.items.set(m,c),this.size=this.items.size,this.dimension=this.items.dimension,this},D.prototype.set=function(c,m){return c=this.writeHashFunction(c),this.items.set(c,m),this.size=this.items.size,this.dimension=this.items.dimension,this},D.prototype.get=function(c){return c=this.readHashFunction(c),this.items.get(c)},D.prototype.has=function(c){return c=this.readHashFunction(c),this.items.has(c)},D.prototype.forEach=function(c,m){m=arguments.length>1?m:this,this.items.forEach(function(t){c.call(m,t,t)})},D.prototype.values=function(){return this.items.values()},typeof Symbol<"u"&&(D.prototype[Symbol.iterator]=D.prototype.values),D.prototype.inspect=function(){var c=Array.from(this);return Object.defineProperty(c,"constructor",{value:D,enumerable:!1}),c},typeof Symbol<"u"&&(D.prototype[Symbol.for("nodejs.util.inspect.custom")]=D.prototype.inspect),D.from=function(c,m,t,a){arguments.length===3&&typeof t=="boolean"&&(a=t,t=Array);var v=new D(m,t);return w(c,function(o,r){a?v.set(r,o):v.add(o)}),v},T.exports=D}),GT=Lt((S,T)=>{var E=1024;function w(D){return(D&D-1)===0}function O(D,c){if(arguments.length<1)throw new Error("mnemonist/hashed-array-tree: expecting at least a byte array constructor.");var m=c||0,t=E,a=0;if(typeof c=="object"&&(m=c.initialCapacity||0,a=c.initialLength||0,t=c.blockSize||E),!t||!w(t))throw new Error("mnemonist/hashed-array-tree: block size should be a power of two.");var v=Math.max(a,m),o=Math.ceil(v/t);this.ArrayClass=D,this.length=a,this.capacity=o*t,this.blockSize=t,this.offsetMask=t-1,this.blockMask=Math.log2(t),this.blocks=new Array(o);for(var r=0;r>this.blockMask,t=D&this.offsetMask;return this.blocks[m][t]=c,this},O.prototype.get=function(D){if(!(this.length>this.blockMask,m=D&this.offsetMask;return this.blocks[c][m]}},O.prototype.grow=function(D){if(typeof D!="number"&&(D=this.capacity+this.blockSize),this.capacity>=D)return this;for(;this.capacity>this.blockMask,t=c&this.offsetMask;return this.blocks[m][t]=D,++this.length},O.prototype.pop=function(){if(this.length!==0){var D=this.blocks[this.blocks.length-1],c=--this.length&this.offsetMask;return D[c]}},O.prototype.inspect=function(){for(var D=new this.ArrayClass(this.length),c,m=0,t=this.length;m>this.blockMask,D[m]=this.blocks[c][m&this.offsetMask];return D.type=this.ArrayClass.name,D.items=this.length,D.capacity=this.capacity,D.blockSize=this.blockSize,Object.defineProperty(D,"constructor",{value:O,enumerable:!1}),D},typeof Symbol<"u"&&(O.prototype[Symbol.for("nodejs.util.inspect.custom")]=O.prototype.inspect),T.exports=O}),od=Lt((S,T)=>{var E=Re(),w=$e();function O(D,c){if(arguments.length<2)throw new Error("mnemonist/fixed-stack: expecting an Array class and a capacity.");if(typeof c!="number"||c<=0)throw new Error("mnemonist/fixed-stack: `capacity` should be a positive number.");this.capacity=c,this.ArrayClass=D,this.items=new this.ArrayClass(this.capacity),this.clear()}O.prototype.clear=function(){this.size=0},O.prototype.push=function(D){if(this.size===this.capacity)throw new Error("mnemonist/fixed-stack.push: stack capacity ("+this.capacity+") exceeded!");return this.items[this.size++]=D,this.size},O.prototype.pop=function(){if(this.size!==0)return this.items[--this.size]},O.prototype.peek=function(){return this.items[this.size-1]},O.prototype.forEach=function(D,c){c=arguments.length>1?c:this;for(var m=0,t=this.items.length;m=c)return{done:!0};var t=D[c-m-1];return m++,{value:t,done:!1}})},O.prototype.entries=function(){var D=this.items,c=this.size,m=0;return new E(function(){if(m>=c)return{done:!0};var t=D[c-m-1];return{value:[m++,t],done:!1}})},typeof Symbol<"u"&&(O.prototype[Symbol.iterator]=O.prototype.values),O.prototype.toString=function(){return this.toArray().join(",")},O.prototype.toJSON=function(){return this.toArray()},O.prototype.inspect=function(){var D=this.toArray();return D.type=this.ArrayClass.name,D.capacity=this.capacity,Object.defineProperty(D,"constructor",{value:O,enumerable:!1}),D},typeof Symbol<"u"&&(O.prototype[Symbol.for("nodejs.util.inspect.custom")]=O.prototype.inspect),O.from=function(D,c,m){if(arguments.length<3&&(m=w.guessLength(D),typeof m!="number"))throw new Error("mnemonist/fixed-stack.from: could not guess iterable length. Please provide desired capacity as last argument.");var t=new O(c,m);if(w.isArrayLike(D)){var a,v;for(a=0,v=D.length;a{var E=$e(),w=Ue(),O=od();function D(m,t,a,v,o,r,n,e){var i=n+(e-n)/2|0,h=~-i,s=-~i,l=a[i];v[r]=l+1;var f=t?t(m[l]):m[l][1],u=r*2+1,d=r*2+2,p=-1/0,g=-1/0;n<=h&&(p=D(m,t,a,v,o,u,n,h)),s<=e&&(g=D(m,t,a,v,o,d,s,e));var x=Math.max(f,p,g),y=l;return x===p?y=o[v[u]-1]:x===g&&(y=o[v[d]-1]),o[l]=y,x}function c(m,t){this.size=m.length,this.intervals=m;var a=null,v=null;Array.isArray(t)&&(a=t[0],v=t[1]);var o=m.length,r=w.getPointerArray(o+1),n=new r(o),e;for(e=1;eu?1:0});var i=Math.ceil(Math.log2(o+1)),h=Math.pow(2,i)-1,s=new r(h),l=new r(o);D(m,v,n,s,l,0,0,o-1),n=null,this.height=i,this.tree=s,this.augmentations=l,this.startGetter=a,this.endGetter=v,this.stack=new O(r,this.height)}c.prototype.intervalsContainingPoint=function(m){var t=[],a=this.stack;a.clear(),a.push(0);for(var v=this.tree.length,o,r,n,e,i,h,s,l,f;a.size;)o=a.pop(),r=this.tree[o]-1,n=this.intervals[r],e=this.intervals[this.augmentations[r]],s=this.endGetter?this.endGetter(e):e[1],!(m>s)&&(l=o*2+1,l=i&&m<=h&&t.push(n),!(mf)&&(u=n*2+1,u=s&&t<=l&&v.push(i),!(a{S.search=function(T,E,w,O){var D=0;w=typeof w<"u"?w:0,O=typeof O<"u"?O:T.length,O--;for(var c;w<=O;)if(D=w+O>>>1,c=T[D],c>E)O=~-D;else if(c>>1,m=T(E[O],w),m>0)c=~-O;else if(m<0)D=-~O;else return O;return-1},S.lowerBound=function(T,E,w,O){var D=0;for(w=typeof w<"u"?w:0,O=typeof O<"u"?O:T.length;w>>1,E<=T[D]?O=D:w=-~D;return w},S.lowerBoundWithComparator=function(T,E,w){for(var O=0,D=0,c=E.length;D>>1,T(w,E[O])<=0?c=O:D=-~O;return D},S.lowerBoundIndices=function(T,E,w,O,D){var c=0;for(O=typeof O<"u"?O:0,D=typeof D<"u"?D:T.length;O>>1,w<=T[E[c]]?D=c:O=-~c;return O},S.upperBound=function(T,E,w,O){var D=0;for(w=typeof w<"u"?w:0,O=typeof O<"u"?O:T.length;w>>1,E>=T[D]?w=-~D:O=D;return w},S.upperBoundWithComparator=function(T,E,w){for(var O=0,D=0,c=E.length;D>>1,T(w,E[O])>=0?D=-~O:c=O;return D}}),UT=Lt(S=>{var T=Ue(),E=$e().isArrayLike,w=hd(),O=nh();function D(a,v){if(a.length===0)return v.slice();if(v.length===0)return a.slice();var o;a[0]>v[0]&&(o=a,a=v,v=o);var r=a[a.length-1],n=v[0];if(r<=n)return T.isTypedArray(a)?T.concat(a,v):a.concat(v);var e=new a.constructor(a.length+v.length),i,h,s;for(i=0,h=a.length;iv[0]&&(o=a,a=v,v=o);var r=a[a.length-1],n=v[0];if(rv[0]&&(o=a,a=v,v=o);var r=a[a.length-1],n=v[0];if(ru?s=w.lowerBound(v,f,s+1):(e.push(f),i++,s++);return e};function m(a){var v=0,o=-1/0,r,n,e,i=[];for(n=0,e=a.length;no&&(o=r));if(i.length===0)return new a[0].constructor(0);if(i.length===1)return i[0].slice();if(i.length===2)return D(i[0],i[1]);a=i;var h=new a[0].constructor(v),s=T.getPointerArray(o),l=new s(a.length),f=new O(function(p,g){return p=a[p][l[p]],g=a[g][l[g]],pg?1:0});for(n=0;nv&&(v=o));if(e.length===0)return new a[0].constructor(0);if(e.length===1)return e[0].slice();if(e.length===2)return c(e[0],e[1]);a=e;var i=new a[0].constructor,h=T.getPointerArray(v),s=new h(a.length),l=new O(function(d,p){return d=a[d][s[d]],p=a[p][s[p]],dp?1:0});for(r=0;rv&&(v=r),no)return[];if(v===o)return[v];var s,l,f=a[0],u,d,p,g,x,y,C=v;for(i=1;iy?d=w.lowerBound(l,x,d+1):(f.push(x),u++,d++);if(f.length===0)return f;C=f[0]}return f},S.merge=function(){if(arguments.length===2){if(E(arguments[0]))return D(arguments[0],arguments[1])}else if(E(arguments[0]))return m(arguments);return null},S.unionUnique=function(){if(arguments.length===2){if(E(arguments[0]))return c(arguments[0],arguments[1])}else if(E(arguments[0]))return t(arguments);return null},S.intersectionUnique=function(){if(arguments.length===2){if(E(arguments[0]))return S.intersectionUniqueArrays(arguments[0],arguments[1])}else if(E(arguments[0]))return S.kWayIntersectionUniqueArrays(arguments);return null}}),XT=Lt((S,T)=>{var E=Re(),w=fe(),O=UT();function D(m){return m}function c(m){if(this.clear(),Array.isArray(m)?(this.documentTokenizer=m[0],this.queryTokenizer=m[1]):(this.documentTokenizer=m,this.queryTokenizer=m),this.documentTokenizer||(this.documentTokenizer=D),this.queryTokenizer||(this.queryTokenizer=D),typeof this.documentTokenizer!="function")throw new Error("mnemonist/InvertedIndex.constructor: document tokenizer is not a function.");if(typeof this.queryTokenizer!="function")throw new Error("mnemonist/InvertedIndex.constructor: query tokenizer is not a function.")}c.prototype.clear=function(){this.items=[],this.mapping=new Map,this.size=0,this.dimension=0},c.prototype.add=function(m){this.size++;var t=this.items.length;this.items.push(m);var a=this.documentTokenizer(m);if(!Array.isArray(a))throw new Error("mnemonist/InvertedIndex.add: tokenizer function should return an array of tokens.");for(var v=new Set,o,r,n=0,e=a.length;n"u"||a.length===0)return[];if(t.length>1)for(o=1,r=t.length;o"u"||v.length===0)return[];a=O.intersectionUniqueArrays(a,v)}var n=new Array(a.length);for(o=0,r=n.length;o1?t:this;for(var a=0,v=this.documents.length;a=t)return{done:!0};var v=m[a++];return{value:v,done:!1}})},c.prototype.tokens=function(){return this.mapping.keys()},typeof Symbol<"u"&&(c.prototype[Symbol.iterator]=c.prototype.documents),c.prototype.inspect=function(){var m=this.items.slice();return Object.defineProperty(m,"constructor",{value:c,enumerable:!1}),m},typeof Symbol<"u"&&(c.prototype[Symbol.for("nodejs.util.inspect.custom")]=c.prototype.inspect),c.from=function(m,t){var a=new c(t);return w(m,function(v){a.add(v)}),a},T.exports=c}),ld=Lt(S=>{var T=new Float64Array(64),E=new Float64Array(64);function w(D,c,m){var t,a,v,o,r;for(T[0]=c,E[0]=m,a=0;a>=0;)if(v=T[a],o=E[a]-1,v=t&&vE[a-1]-T[a-1]&&(r=T[a],T[a]=T[a-1],T[a-1]=r,r=E[a],E[a]=E[a-1],E[a-1]=r)}else a--;return D}S.inplaceQuickSort=w;function O(D,c,m,t){var a,v,o,r,n,e;for(T[0]=m,E[0]=t,v=0;v>=0;)if(o=T[v],r=E[v]-1,o=a&&oE[v-1]-T[v-1]&&(e=T[v],T[v]=T[v-1],T[v-1]=e,e=E[v],E[v]=E[v-1],E[v-1]=e)}else v--;return c}S.inplaceQuickSortIndices=O}),VT=Lt((S,T)=>{var E=$e(),w=Ue(),O=kr().createTupleComparator,D=ah(),c=ld().inplaceQuickSortIndices;function m(n,e,i,h){var s,l=0,f;for(s=0;s>>1),P=i[C],f[L]=P,x>-1&&(y===0?u[x]=L+1:d[x]=L+1),I=(I+1)%n,C!==M&&C!==R-1&&p.push([I,C+1,R,L,1]),C!==M&&p.push([I,M,C,L,0]),L++;return{axes:e,labels:h,pivots:f,lefts:u,rights:d}}function v(n,e){this.dimensions=n,this.visited=0,this.axes=e.axes,this.labels=e.labels,this.pivots=e.pivots,this.lefts=e.lefts,this.rights=e.rights,this.size=this.labels.length}v.prototype.nearestNeighbor=function(n){var e=1/0,i=null,h=this.dimensions,s=this.axes,l=this.pivots,f=this.lefts,u=this.rights,d=0;function p(g,x){d++;var y=f[x],C=u[x],P=l[x],M=m(h,s,P,n);if(!(M0?y!==0&&p(g,y-1):C!==0&&p(g,C-1),R*R0?C!==0&&p(g,C-1):y!==0&&p(g,y-1))}}return p(0,0),this.visited=d,this.labels[i]};var o=O(3),r=O(2);v.prototype.kNearestNeighbors=function(n,e){if(n<=0)throw new Error("mnemonist/kd-tree.kNearestNeighbors: k should be a positive number.");if(n=Math.min(n,this.size),n===1)return[this.nearestNeighbor(e)];var i=new D(Array,o,n),h=this.dimensions,s=this.axes,l=this.pivots,f=this.lefts,u=this.rights,d=0;function p(y,C){var P=f[C],M=u[C],R=l[C],I=m(h,s,R,e);i.push([I,d++,R]);var L=e[y],B=s[y][R],N=L-B;y=(y+1)%h,L{var E=Re(),w=fe();function O(){this.clear()}O.prototype.clear=function(){this.head=null,this.tail=null,this.size=0},O.prototype.first=function(){return this.head?this.head.item:void 0},O.prototype.peek=O.prototype.first,O.prototype.last=function(){return this.tail?this.tail.item:void 0},O.prototype.push=function(D){var c={item:D,next:null};return this.head?(this.tail.next=c,this.tail=c):(this.head=c,this.tail=c),this.size++,this.size},O.prototype.unshift=function(D){var c={item:D,next:null};return this.head?(this.head.next||(this.tail=this.head),c.next=this.head,this.head=c):(this.head=c,this.tail=c),this.size++,this.size},O.prototype.shift=function(){if(this.size){var D=this.head;return this.head=D.next,this.size--,D.item}},O.prototype.forEach=function(D,c){if(this.size){c=arguments.length>1?c:this;for(var m=this.head,t=0;m;)D.call(c,m.item,t,this),m=m.next,t++}},O.prototype.toArray=function(){if(!this.size)return[];for(var D=new Array(this.size),c=0,m=this.size,t=this.head;c{var E=Re(),w=fe(),O=Ue(),D=$e();function c(m,t,a){if(arguments.length<2&&(a=m,m=null,t=null),this.capacity=a,typeof this.capacity!="number"||this.capacity<=0)throw new Error("mnemonist/lru-cache: capacity should be positive number.");if(!isFinite(this.capacity)||Math.floor(this.capacity)!==this.capacity)throw new Error("mnemonist/lru-cache: capacity should be a finite positive integer.");var v=O.getPointerArray(a);this.forward=new v(a),this.backward=new v(a),this.K=typeof m=="function"?new m(a):new Array(a),this.V=typeof t=="function"?new t(a):new Array(a),this.size=0,this.head=0,this.tail=0,this.items={}}c.prototype.clear=function(){this.size=0,this.head=0,this.tail=0,this.items={}},c.prototype.splayOnTop=function(m){var t=this.head;if(this.head===m)return this;var a=this.backward[m],v=this.forward[m];return this.tail===m?this.tail=a:this.backward[v]=a,this.forward[a]=v,this.backward[t]=m,this.head=m,this.forward[m]=t,this},c.prototype.set=function(m,t){var a=this.items[m];if(typeof a<"u"){this.splayOnTop(a),this.V[a]=t;return}this.size1?t:this;for(var a=0,v=this.size,o=this.head,r=this.K,n=this.V,e=this.forward;a=t)return{done:!0};var r=v[a];return m++,m=t)return{done:!0};var r=v[a];return m++,m=t)return{done:!0};var n=v[a],e=o[a];return m++,m{var E=oh(),w=fe(),O=Ue(),D=$e();function c(t,a,v){arguments.length<2?E.call(this,t):E.call(this,t,a,v);var o=O.getPointerArray(this.capacity);this.deleted=new o(this.capacity),this.deletedSize=0}for(m in E.prototype)c.prototype[m]=E.prototype[m];var m;typeof Symbol<"u"&&(c.prototype[Symbol.iterator]=E.prototype[Symbol.iterator]),c.prototype.clear=function(){E.prototype.clear.call(this),this.deletedSize=0},c.prototype.set=function(t,a){var v=this.items[t];if(typeof v<"u"){this.splayOnTop(v),this.V[v]=a;return}this.size0?v=this.deleted[--this.deletedSize]:v=this.size,this.size++):(v=this.tail,this.tail=this.backward[v],delete this.items[this.K[v]]),this.items[t]=v,this.K[v]=t,this.V[v]=a,this.forward[v]=this.head,this.backward[this.head]=v,this.head=v},c.prototype.setpop=function(t,a){var v=null,o=null,r=this.items[t];return typeof r<"u"?(this.splayOnTop(r),v=this.V[r],this.V[r]=a,{evicted:!1,key:t,value:v}):(this.size0?r=this.deleted[--this.deletedSize]:r=this.size,this.size++):(r=this.tail,this.tail=this.backward[r],v=this.V[r],o=this.K[r],delete this.items[o]),this.items[t]=r,this.K[r]=t,this.V[r]=a,this.forward[r]=this.head,this.backward[this.head]=r,this.head=r,o?{evicted:!0,key:o,value:v}:null)},c.prototype.delete=function(t){var a=this.items[t];if(typeof a>"u")return!1;if(delete this.items[t],this.size===1)return this.size=0,this.head=0,this.tail=0,this.deletedSize=0,!0;var v=this.backward[a],o=this.forward[a];return this.head===a&&(this.head=o),this.tail===a&&(this.tail=v),this.forward[v]=o,this.backward[o]=v,this.size--,this.deleted[this.deletedSize++]=a,!0},c.prototype.remove=function(t,a=void 0){var v=this.items[t];if(typeof v>"u")return a;var o=this.V[v];if(delete this.items[t],this.size===1)return this.size=0,this.head=0,this.tail=0,this.deletedSize=0,o;var r=this.backward[v],n=this.forward[v];return this.head===v&&(this.head=n),this.tail===v&&(this.tail=r),this.forward[r]=n,this.backward[n]=r,this.size--,this.deleted[this.deletedSize++]=v,o},c.from=function(t,a,v,o){if(arguments.length<2){if(o=D.guessLength(t),typeof o!="number")throw new Error("mnemonist/lru-cache.from: could not guess iterable length. Please provide desired capacity as last argument.")}else arguments.length===2&&(o=a,a=null,v=null);var r=new c(a,v,o);return w(t,function(n,e){r.set(e,n)}),r},T.exports=c}),ud=Lt((S,T)=>{var E=oh(),w=fe(),O=Ue(),D=$e();function c(m,t,a){if(arguments.length<2&&(a=m,m=null,t=null),this.capacity=a,typeof this.capacity!="number"||this.capacity<=0)throw new Error("mnemonist/lru-map: capacity should be positive number.");if(!isFinite(this.capacity)||Math.floor(this.capacity)!==this.capacity)throw new Error("mnemonist/lru-map: capacity should be a finite positive integer.");var v=O.getPointerArray(a);this.forward=new v(a),this.backward=new v(a),this.K=typeof m=="function"?new m(a):new Array(a),this.V=typeof t=="function"?new t(a):new Array(a),this.size=0,this.head=0,this.tail=0,this.items=new Map}c.prototype.clear=function(){this.size=0,this.head=0,this.tail=0,this.items.clear()},c.prototype.set=function(m,t){var a=this.items.get(m);if(typeof a<"u"){this.splayOnTop(a),this.V[a]=t;return}this.size{var E=ud(),w=fe(),O=Ue(),D=$e();function c(t,a,v){arguments.length<2?E.call(this,t):E.call(this,t,a,v);var o=O.getPointerArray(this.capacity);this.deleted=new o(this.capacity),this.deletedSize=0}for(m in E.prototype)c.prototype[m]=E.prototype[m];var m;typeof Symbol<"u"&&(c.prototype[Symbol.iterator]=E.prototype[Symbol.iterator]),c.prototype.clear=function(){E.prototype.clear.call(this),this.deletedSize=0},c.prototype.set=function(t,a){var v=this.items.get(t);if(typeof v<"u"){this.splayOnTop(v),this.V[v]=a;return}this.size0?v=this.deleted[--this.deletedSize]:v=this.size,this.size++):(v=this.tail,this.tail=this.backward[v],this.items.delete(this.K[v])),this.items.set(t,v),this.K[v]=t,this.V[v]=a,this.forward[v]=this.head,this.backward[this.head]=v,this.head=v},c.prototype.setpop=function(t,a){var v=null,o=null,r=this.items.get(t);return typeof r<"u"?(this.splayOnTop(r),v=this.V[r],this.V[r]=a,{evicted:!1,key:t,value:v}):(this.size0?r=this.deleted[--this.deletedSize]:r=this.size,this.size++):(r=this.tail,this.tail=this.backward[r],v=this.V[r],o=this.K[r],this.items.delete(o)),this.items.set(t,r),this.K[r]=t,this.V[r]=a,this.forward[r]=this.head,this.backward[this.head]=r,this.head=r,o?{evicted:!0,key:o,value:v}:null)},c.prototype.delete=function(t){var a=this.items.get(t);if(typeof a>"u")return!1;if(this.items.delete(t),this.size===1)return this.size=0,this.head=0,this.tail=0,this.deletedSize=0,!0;var v=this.backward[a],o=this.forward[a];return this.head===a&&(this.head=o),this.tail===a&&(this.tail=v),this.forward[v]=o,this.backward[o]=v,this.size--,this.deleted[this.deletedSize++]=a,!0},c.prototype.remove=function(t,a=void 0){var v=this.items.get(t);if(typeof v>"u")return a;var o=this.V[v];if(this.items.delete(t),this.size===1)return this.size=0,this.head=0,this.tail=0,this.deletedSize=0,o;var r=this.backward[v],n=this.forward[v];return this.head===v&&(this.head=n),this.tail===v&&(this.tail=r),this.forward[r]=n,this.backward[n]=r,this.size--,this.deleted[this.deletedSize++]=v,o},c.from=function(t,a,v,o){if(arguments.length<2){if(o=D.guessLength(t),typeof o!="number")throw new Error("mnemonist/lru-map.from: could not guess iterable length. Please provide desired capacity as last argument.")}else arguments.length===2&&(o=a,a=null,v=null);var r=new c(a,v,o);return w(t,function(n,e){r.set(e,n)}),r},T.exports=c}),KT=Lt((S,T)=>{var E=Re(),w=fe(),O=ah(),D=function(m,t){return m[1]>t[1]?-1:m[1]"u"?0:t},c.prototype.get=c.prototype.multiplicity,c.prototype.count=c.prototype.multiplicity,c.prototype.frequency=function(m){if(this.size===0)return 0;var t=this.multiplicity(m);return t/this.size},c.prototype.top=function(m){if(typeof m!="number"||m<=0)throw new Error("mnemonist/multi-set.top: n must be a number > 0.");for(var t=new O(Array,D,m),a=this.items.entries(),v;v=a.next(),!v.done;)t.push(v.value);return t.consume()},c.prototype.forEach=function(m,t){t=arguments.length>1?t:this;var a;this.items.forEach(function(v,o){for(a=0;a1?t:this,this.items.forEach(m,t)},c.prototype.keys=function(){return this.items.keys()},c.prototype.values=function(){var m=this.items.entries(),t=!1,a,v,o,r;return new E(function n(){if(!t){if(a=m.next(),a.done)return{done:!0};t=!0,v=a.value[0],o=a.value[1],r=0}return r>=o?(t=!1,n()):(r++,{done:!1,value:v})})},c.prototype.multiplicities=function(){return this.items.entries()},typeof Symbol<"u"&&(c.prototype[Symbol.iterator]=c.prototype.values),c.prototype.inspect=function(){return this.items},typeof Symbol<"u"&&(c.prototype[Symbol.for("nodejs.util.inspect.custom")]=c.prototype.inspect),c.prototype.toJSON=function(){return this.items},c.from=function(m){var t=new c;return w(m,function(a){t.add(a)}),t},c.isSubset=function(m,t){var a=m.multiplicities(),v,o,r;if(m===t)return!0;if(m.dimension>t.dimension)return!1;for(;v=a.next(),!v.done;)if(o=v.value[0],r=v.value[1],t.multiplicity(o){var E=Re(),w=fe();function O(n,e,i){return((Math.pow(n,2)-Math.pow(Math.abs(e-i),2))/2|0)+n+1}function D(n,e){for(var i=0,h=0,s=e+1;he.length?-1:n.lengthe?1:0}function m(n,e){var i=n+1,h=e/i|0,s=h+1,l,f,u=e-h*i,d=i-u,p=new Array(n+1);for(l=0;l 0");this.levenshtein=n,this.k=e,this.clear()}r.prototype.clear=function(){this.size=0,this.strings=[],this.invertedIndices={}},r.prototype.add=function(n){var e=n.length,i=this.size;this.strings.push(n),this.size++;var h=t(this.k,n),s=this.invertedIndices[e];typeof s>"u"&&(s={},this.invertedIndices[e]=s);var l,f,u,d,p;for(d=0,p=h.length;d"u"?(f=[i],s[u]=f):f.push(i);return this},r.prototype.search=function(n){var e=n.length,i=this.k,h=new Set,s,l,f,u,d,p,g,x,y,C,P,M,R,I,L;for(x=Math.max(0,e-i),y=e+i+1;x1?e:this;for(var i=0,h=this.strings.length;i=e)return{done:!0};var h=n[i];return i++,{value:h,done:!1}})},typeof Symbol<"u"&&(r.prototype[Symbol.iterator]=r.prototype.values),r.prototype.inspect=function(){var n=this.strings.slice();return Object.defineProperty(n,"constructor",{value:r,enumerable:!1}),n},typeof Symbol<"u"&&(r.prototype[Symbol.for("nodejs.util.inspect.custom")]=r.prototype.inspect),r.from=function(n,e,i){var h=new r(e,i);return w(n,function(s){h.add(s)}),h},r.countKeys=D,r.comparator=c,r.partition=m,r.segments=t,r.segmentPos=a,r.multiMatchAwareInterval=v,r.multiMatchAwareSubstrings=o,T.exports=r}),$T=Lt((S,T)=>{var E=Re(),w=fe();function O(){this.clear()}O.prototype.clear=function(){this.items=[],this.offset=0,this.size=0},O.prototype.enqueue=function(D){return this.items.push(D),++this.size},O.prototype.dequeue=function(){if(this.size){var D=this.items[this.offset];return++this.offset*2>=this.items.length&&(this.items=this.items.slice(this.offset),this.offset=0),this.size--,D}},O.prototype.peek=function(){if(this.size)return this.items[this.offset]},O.prototype.forEach=function(D,c){c=arguments.length>1?c:this;for(var m=this.offset,t=0,a=this.items.length;m=D.length)return{done:!0};var m=D[c];return c++,{value:m,done:!1}})},O.prototype.entries=function(){var D=this.items,c=this.offset,m=0;return new E(function(){if(c>=D.length)return{done:!0};var t=D[c];return c++,{value:[m++,t],done:!1}})},typeof Symbol<"u"&&(O.prototype[Symbol.iterator]=O.prototype.values),O.prototype.toString=function(){return this.toArray().join(",")},O.prototype.toJSON=function(){return this.toArray()},O.prototype.inspect=function(){var D=this.toArray();return Object.defineProperty(D,"constructor",{value:O,enumerable:!1}),D},typeof Symbol<"u"&&(O.prototype[Symbol.for("nodejs.util.inspect.custom")]=O.prototype.inspect),O.from=function(D){var c=new O;return w(D,function(m){c.enqueue(m)}),c},O.of=function(){return O.from(arguments)},T.exports=O}),ZT=Lt((S,T)=>{var E=Re(),w=fe();function O(){this.clear()}O.prototype.clear=function(){this.items=[],this.size=0},O.prototype.push=function(D){return this.items.push(D),++this.size},O.prototype.pop=function(){if(this.size!==0)return this.size--,this.items.pop()},O.prototype.peek=function(){return this.items[this.size-1]},O.prototype.forEach=function(D,c){c=arguments.length>1?c:this;for(var m=0,t=this.items.length;m=c)return{done:!0};var t=D[c-m-1];return m++,{value:t,done:!1}})},O.prototype.entries=function(){var D=this.items,c=D.length,m=0;return new E(function(){if(m>=c)return{done:!0};var t=D[c-m-1];return{value:[m++,t],done:!1}})},typeof Symbol<"u"&&(O.prototype[Symbol.iterator]=O.prototype.values),O.prototype.toString=function(){return this.toArray().join(",")},O.prototype.toJSON=function(){return this.toArray()},O.prototype.inspect=function(){var D=this.toArray();return Object.defineProperty(D,"constructor",{value:O,enumerable:!1}),D},typeof Symbol<"u"&&(O.prototype[Symbol.for("nodejs.util.inspect.custom")]=O.prototype.inspect),O.from=function(D){var c=new O;return w(D,function(m){c.push(m)}),c},O.of=function(){return O.from(arguments)},T.exports=O}),JT=Lt(S=>{S.intersection=function(){if(arguments.length<2)throw new Error("mnemonist/Set.intersection: needs at least two arguments.");var T=new Set,E=1/0,w=null,O,D,c=arguments.length;for(D=0;DE.size)return!1;for(;O=w.next(),!O.done;)if(!E.has(O.value))return!1;return!0},S.isSuperset=function(T,E){return S.isSubset(E,T)},S.add=function(T,E){for(var w=E.values(),O;O=w.next(),!O.done;)T.add(O.value)},S.subtract=function(T,E){for(var w=E.values(),O;O=w.next(),!O.done;)T.delete(O.value)},S.intersect=function(T,E){for(var w=T.values(),O;O=w.next(),!O.done;)E.has(O.value)||T.delete(O.value)},S.disjunct=function(T,E){for(var w=T.values(),O,D=[];O=w.next(),!O.done;)E.has(O.value)&&D.push(O.value);for(w=E.values();O=w.next(),!O.done;)T.has(O.value)||T.add(O.value);for(var c=0,m=D.length;cE.size&&(w=T,T=E,E=w),T.size===0)return 0;if(T===E)return T.size;for(var O=T.values(),D,c=0;D=O.next(),!D.done;)E.has(D.value)&&c++;return c},S.unionSize=function(T,E){var w=S.intersectionSize(T,E);return T.size+E.size-w},S.jaccard=function(T,E){var w=S.intersectionSize(T,E);if(w===0)return 0;var O=T.size+E.size-w;return w/O},S.overlap=function(T,E){var w=S.intersectionSize(T,E);return w===0?0:w/Math.min(T.size,E.size)}}),QT=Lt((S,T)=>{var E=Re(),w=Ue().getPointerArray;function O(D){var c=w(D);this.start=0,this.size=0,this.capacity=D,this.dense=new c(D),this.sparse=new c(D)}O.prototype.clear=function(){this.start=0,this.size=0},O.prototype.has=function(D){if(this.size===0)return!1;var c=this.sparse[D],m=c=this.start&&c=this.start&&c1?c:this;for(var m=this.capacity,t=this.size,a=this.start,v=0;v=m)return{done:!0};var v=D[t];return t++,a++,t===c&&(t=0),{value:v,done:!1}})},typeof Symbol<"u"&&(O.prototype[Symbol.iterator]=O.prototype.values),O.prototype.inspect=function(){var D=[];return this.forEach(function(c){D.push(c)}),Object.defineProperty(D,"constructor",{value:O,enumerable:!1}),D.capacity=this.capacity,D},typeof Symbol<"u"&&(O.prototype[Symbol.for("nodejs.util.inspect.custom")]=O.prototype.inspect),T.exports=O}),kT=Lt((S,T)=>{var E=Re(),w=Ue().getPointerArray;function O(D,c){arguments.length<2&&(c=D,D=Array);var m=w(c);this.size=0,this.length=c,this.dense=new m(c),this.sparse=new m(c),this.vals=new D(c)}O.prototype.clear=function(){this.size=0},O.prototype.has=function(D){var c=this.sparse[D];return c=this.size||this.dense[c]!==D?!1:(c=this.dense[this.size-1],this.dense[this.sparse[D]]=c,this.sparse[c]=this.sparse[D],this.size--,!0)},O.prototype.forEach=function(D,c){c=arguments.length>1?c:this;for(var m=0;m{var E=Re(),w=Ue().getPointerArray;function O(D){var c=w(D);this.size=0,this.length=D,this.dense=new c(D),this.sparse=new c(D)}O.prototype.clear=function(){this.size=0},O.prototype.has=function(D){var c=this.sparse[D];return c=this.size||this.dense[c]!==D?!1:(c=this.dense[this.size-1],this.dense[this.sparse[D]]=c,this.sparse[c]=this.sparse[D],this.size--,!0)},O.prototype.forEach=function(D,c){c=arguments.length>1?c:this;for(var m,t=0;t{var E=fe(),w=2,O=2,D=new Set([0,1,2]),c={0:"Returns only the top suggestion",1:"Returns suggestions with the smallest edit distance",2:"Returns every suggestion (no early termination)"};function m(e){var i=new Set;return typeof e=="number"&&i.add(e),{suggestions:i,count:0}}function t(e,i,h){return{term:e||"",distance:i||0,count:h||0}}function a(e,i,h,s){s=s||new Set,i++;var l,f=e.length,u;if(f>1)for(u=0;u0&&e[u].length-f.length>s.length-f.length&&(h.suggestions=new Set,h.count=0),(i===2||!h.suggestions.size||e[u].length-f.length>=s.length-f.length)&&h.suggestions.add(l)}function o(e,i){var h=e.length,s=i.length,l=[[]],f=h+s,u=new Map,d,p,g;for(l[0][0]=f,d=0;d<=h;d++)l[d+1]||(l[d+1]=[]),l[d+1][1]=d,l[d+1][0]=f;for(g=0;g<=s;g++)l[1][g+1]=g,l[0][g+1]=f;var x=e+i,y;for(d=0,p=x.length;dl)return[];for(var d=[f],p=new Set,g=new Set,x=[],y,C;d.length>0&&(y=d.shift(),!(h<2&&x.length>0&&u-y.length>x[0].distance));){if(C=e[y],C!==void 0){if(typeof C=="number"&&(C=m(C)),C.count>0&&!g.has(y)){g.add(y);var P=t(y,u-y.length,C.count);if(x.push(P),h<2&&u-y.length===0)break}C.suggestions.forEach(L=>{var B=i[L];if(!g.has(B)){g.add(B);var N=0;if(f!==B)if(B.length===y.length)N=u-y.length;else if(u===y.length)N=B.length-y.length;else{for(var G=0,V=0,K=B.length;G0||V>0?N=o(B.substr(G,K-G-V),f.substr(G,u-G-V)):N=o(B,f)}if(h<2&&x.length>0&&x[0].distance>N&&(x=[]),!(h<2&&x.length>0&&N>x[0].distance)&&N<=s){var j=e[B];j!==void 0&&x.push(t(B,N,j.count))}}})}if(u-y.length0&&u-y.length>=x[0].distance)continue;for(var M=0,R=y.length;Mthis.maxLength&&(this.maxLength=e.length)),i.count===1){var h=this.words.length;this.words.push(e);var s=a(e,0,this.maxDistance);s.forEach(l=>{var f=this.dictionary[l];f!==void 0?(typeof f=="number"&&(f=m(f),this.dictionary[l]=f),f.suggestions.has(h)||v(this.words,this.verbosity,f,e,h,l)):this.dictionary[l]=h})}return this.size++,this},n.prototype.search=function(e){return r(this.dictionary,this.words,this.verbosity,this.maxDistance,this.maxLength,e)},n.prototype.inspect=function(){var e=[];e.size=this.size,e.maxDistance=this.maxDistance,e.verbosity=this.verbosity,e.behavior=c[this.verbosity];for(var i in this.dictionary)typeof this.dictionary[i]=="object"&&this.dictionary[i].count&&e.push([i,this.dictionary[i].count]);return Object.defineProperty(e,"constructor",{value:n,enumerable:!1}),e},typeof Symbol<"u"&&(n.prototype[Symbol.for("nodejs.util.inspect.custom")]=n.prototype.inspect),n.from=function(e,i){var h=new n(i);return E(e,function(s){h.add(s)}),h},T.exports=n}),fd=Lt((S,T)=>{var E=fe(),w=Re(),O="\0";function D(c){this.mode=c===Array?"array":"string",this.clear()}D.prototype.clear=function(){this.root={},this.size=0},D.prototype.set=function(c,m){for(var t=this.root,a,v=0,o=c.length;v"u")return;if(O in m)return m[O]},D.prototype.delete=function(c){var m=this.root,t=null,a=null,v,o,r,n;for(r=0,n=c.length;r"u")return!1;t!==null?Object.keys(m).length>1&&(t=null,a=null):Object.keys(m).length<2&&(t=v,a=o)}return O in m?(this.size--,t?delete t[a]:delete m[O],!0):!1},D.prototype.has=function(c){for(var m=this.root,t,a=0,v=c.length;a"u")return!1;return O in m},D.prototype.find=function(c){var m=typeof c=="string",t=this.root,a=[],v,o,r;for(o=0,r=c.length;o"u")return a;for(var n=[t],e=[c],i;n.length;){c=e.pop(),t=n.pop();for(i in t){if(i===O){a.push([c,t[O]]);continue}n.push(t[i]),e.push(m?c+i:c.concat(i))}}return a},D.prototype.values=function(c){var m=this.root,t=[],a,v,o;if(c){for(v=0,o=c.length;v"u")return w.empty()}return t.push(m),new w(function(){for(var r,n=!1,e;t.length;){r=t.pop();for(e in r){if(e===O){n=!0;continue}t.push(r[e])}if(n)return{done:!1,value:r[O]}}return{done:!0}})},D.prototype.prefixes=function(c){var m=this.root,t=[],a=[],v,o,r,n=this.mode==="string";if(c){for(o=0,r=c.length;o"u")return w.empty()}else c=n?"":[];return t.push(m),a.push(c),new w(function(){for(var e,i,h=!1,s;t.length;){e=t.pop(),i=a.pop();for(s in e){if(s===O){h=!0;continue}t.push(e[s]),a.push(n?i+s:i.concat(s))}if(h)return{done:!1,value:i}}return{done:!0}})},D.prototype.keys=D.prototype.prefixes,D.prototype.entries=function(c){var m=this.root,t=[],a=[],v,o,r,n=this.mode==="string";if(c){for(o=0,r=c.length;o"u")return w.empty()}else c=n?"":[];return t.push(m),a.push(c),new w(function(){for(var e,i,h=!1,s;t.length;){e=t.pop(),i=a.pop();for(s in e){if(s===O){h=!0;continue}t.push(e[s]),a.push(n?i+s:i.concat(s))}if(h)return{done:!1,value:[i,e[O]]}}return{done:!0}})},typeof Symbol<"u"&&(D.prototype[Symbol.iterator]=D.prototype.entries),D.prototype.inspect=function(){for(var c=new Array(this.size),m=this.entries(),t,a=0;t=m.next(),!t.done;)c[a++]=t.value;return Object.defineProperty(c,"constructor",{value:D,enumerable:!1}),c},typeof Symbol<"u"&&(D.prototype[Symbol.for("nodejs.util.inspect.custom")]=D.prototype.inspect),D.prototype.toJSON=function(){return this.root},D.from=function(c){var m=new D;return E(c,function(t,a){m.set(a,t)}),m},D.SENTINEL=O,T.exports=D}),tS=Lt((S,T)=>{var E=fe(),w=fd(),O="\0";function D(m){this.mode=m===Array?"array":"string",this.clear()}for(c in w.prototype)D.prototype[c]=w.prototype[c];var c;delete D.prototype.set,delete D.prototype.get,delete D.prototype.values,delete D.prototype.entries,D.prototype.add=function(m){for(var t=this.root,a,v=0,o=m.length;v"u")return v;for(var e=[a],i=[m],h;e.length;){m=i.pop(),a=e.pop();for(h in a){if(h===O){v.push(m);continue}e.push(a[h]),i.push(t?m+h:m.concat(h))}}return v},typeof Symbol<"u"&&(D.prototype[Symbol.iterator]=D.prototype.keys),D.prototype.inspect=function(){for(var m=new Set,t=this.keys(),a;a=t.next(),!a.done;)m.add(a.value);return Object.defineProperty(m,"constructor",{value:D,enumerable:!1}),m},typeof Symbol<"u"&&(D.prototype[Symbol.for("nodejs.util.inspect.custom")]=D.prototype.inspect),D.prototype.toJSON=function(){return this.root},D.from=function(m){var t=new D;return E(m,function(a){t.add(a)}),t},D.SENTINEL=O,T.exports=D}),eS=Lt((S,T)=>{var E=Re(),w=fe(),O=$e(),D=Ue(),c=function(v){return Math.max(1,Math.ceil(v*1.5))},m=function(v){var o=D.getPointerArray(v);return new o(v)};function t(v,o){if(arguments.length<1)throw new Error("mnemonist/vector: expecting at least a byte array constructor.");var r=o||0,n=c,e=0,i=!1;typeof o=="object"&&(r=o.initialCapacity||0,e=o.initialLength||0,n=o.policy||n,i=o.factory===!0),this.factory=i?v:null,this.ArrayClass=v,this.length=e,this.capacity=Math.max(e,r),this.policy=n,this.array=new v(this.capacity)}t.prototype.set=function(v,o){if(this.lengththis.capacity)if(this.factory===null?this.array=new this.ArrayClass(v):this.array=this.factory(v),D.isTypedArray(this.array))this.array.set(o,0);else for(var r=0,n=this.length;r=v)return this;for(o=this.capacity;o=o)return{done:!0};var n=v[r];return r++,{value:n,done:!1}})},t.prototype.entries=function(){var v=this.array,o=this.length,r=0;return new E(function(){if(r>=o)return{done:!0};var n=v[r];return{value:[r++,n],done:!1}})},typeof Symbol<"u"&&(t.prototype[Symbol.iterator]=t.prototype.values),t.prototype.inspect=function(){var v=this.array.slice(0,this.length);return v.type=this.array.constructor.name,v.items=this.length,v.capacity=this.capacity,Object.defineProperty(v,"constructor",{value:t,enumerable:!1}),v},typeof Symbol<"u"&&(t.prototype[Symbol.for("nodejs.util.inspect.custom")]=t.prototype.inspect),t.from=function(v,o,r){if(arguments.length<3&&(r=O.guessLength(v),typeof r!="number"))throw new Error("mnemonist/vector.from: could not guess iterable length. Please provide desired capacity as last argument.");var n=new t(o,r);return w(v,function(e){n.push(e)}),n};function a(v){var o=function(n){t.call(this,v,n)};for(var r in t.prototype)t.prototype.hasOwnProperty(r)&&(o.prototype[r]=t.prototype[r]);return o.from=function(n,e){return t.from(n,v,e)},typeof Symbol<"u"&&(o.prototype[Symbol.iterator]=o.prototype.values),o}t.Int8Vector=a(Int8Array),t.Uint8Vector=a(Uint8Array),t.Uint8ClampedVector=a(Uint8ClampedArray),t.Int16Vector=a(Int16Array),t.Uint16Vector=a(Uint16Array),t.Int32Vector=a(Int32Array),t.Uint32Vector=a(Uint32Array),t.Float32Vector=a(Float32Array),t.Float64Vector=a(Float64Array),t.PointerVector=a(m),T.exports=t}),iS=Lt((S,T)=>{var E=$e(),w=Ue(),O=ld().inplaceQuickSortIndices,D=hd().lowerBoundIndices,c=rh(),m=w.getPointerArray;function t(o,r){return o.distancer.distance?-1:0}function a(o,r,n){for(var e=n.length,i=m(e),h=0,s=new i(e),l=new i(e),f=new i(e),u=new Float64Array(e),d=[0,0,e],p=new Float64Array(e),g,x,y,C,P,M,R,I,L;d.length;)if(P=d.pop(),C=d.pop(),g=d.pop(),x=n[P-1],P--,L=P-C,s[g]=x,L!==0){if(L===1){R=o(r[x],r[n[C]]),u[g]=R,h++,f[g]=h,s[h]=n[C];continue}for(I=C;I0&&(h++,f[g]=h,d.push(h,M,P)),M-C>0&&(h++,l[g]=h,d.push(h,C,M))}return{nodes:s,lefts:l,rights:f,mus:u}}function v(o,r){if(typeof o!="function")throw new Error("mnemonist/VPTree.constructor: given `distance` must be a function.");if(!r)throw new Error("mnemonist/VPTree.constructor: you must provide items to the tree. A VPTree cannot be updated after its creation.");this.distance=o,this.heap=new c(t),this.D=0;var n=E.toArrayWithIndices(r);this.items=n[0];var e=n[1];this.size=e.length;var i=a(o,this.items,e);this.nodes=i.nodes,this.lefts=i.lefts,this.rights=i.rights,this.mus=i.mus}v.prototype.nearestNeighbors=function(o,r){var n=this.heap,e=[0],i=1/0,h,s,l,f,u,d,p;for(this.D=0;e.length;)h=e.pop(),s=this.nodes[h],l=this.items[s],p=this.distance(l,r),this.D++,po&&n.pop(),n.size>=o&&(i=n.peek().distance)),f=this.lefts[h],u=this.rights[h],!(!f&&!u)&&(d=this.mus[h],p=d-i&&e.push(u)):(u&&p>=d-i&&e.push(u),f&&p=0;x--)g[x]=n.pop();return g},v.prototype.neighbors=function(o,r){var n=[],e=[0],i,h,s,l,f,u,d;for(this.D=0;e.length;)i=e.pop(),h=this.nodes[i],s=this.items[h],d=this.distance(s,r),this.D++,d<=o&&n.push({distance:d,item:s}),l=this.lefts[i],f=this.rights[i],!(!l&&!f)&&(u=this.mus[i],d=u-o&&e.push(f)):(f&&d>=u-o&&e.push(f),l&&d{var E=rh(),w=nh(),O=PT();T.exports={BiMap:AT(),BitSet:MT(),BitVector:wT(),BloomFilter:FT(),BKTree:LT(),CircularBuffer:OT(),DefaultMap:DT(),DefaultWeakMap:IT(),FixedDeque:rd(),StaticDisjointSet:BT(),FibonacciHeap:w,MinFibonacciHeap:w.MinFibonacciHeap,MaxFibonacciHeap:w.MaxFibonacciHeap,FixedReverseHeap:ah(),FuzzyMap:bT(),FuzzyMultiMap:NT(),HashedArrayTree:GT(),Heap:E,MinHeap:E.MinHeap,MaxHeap:E.MaxHeap,StaticIntervalTree:zT(),InvertedIndex:XT(),KDTree:VT(),LinkedList:WT(),LRUCache:oh(),LRUCacheWithDelete:YT(),LRUMap:ud(),LRUMapWithDelete:HT(),MultiMap:ad(),MultiSet:KT(),PassjoinIndex:jT(),Queue:$T(),FixedStack:od(),Stack:ZT(),SuffixArray:O,GeneralizedSuffixArray:O.GeneralizedSuffixArray,Set:JT(),SparseQueueSet:QT(),SparseMap:kT(),SparseSet:qT(),SymSpell:_T(),Trie:tS(),TrieMap:fd(),Vector:eS(),VPTree:iS()}}),ut=class me{static get ZERO(){return new me(0,0)}static get ONE(){return new me(1,1)}static get UP(){return new me(0,-1)}static get DOWN(){return new me(0,1)}static get LEFT(){return new me(-1,0)}static get RIGHT(){return new me(1,0)}static get UP_LEFT(){return new me(-1,-1)}static get UP_RIGHT(){return new me(1,-1)}static get DOWN_RIGHT(){return new me(1,1)}static get DOWN_LEFT(){return new me(-1,1)}constructor(T,E){typeof T=="number"?(this.x=T,this.y=E||0):(this.x=T.x,this.y=T.y)}clone(){return new me(this.x,this.y)}add(T){return new me(this.x+T.x,this.y+T.y)}multiply(T){return new me(this.x*T.x,this.y*T.y)}divide(T){return new me(this.x/T.x,this.y/T.y)}subtract(T){return new me(this.x-T.x,this.y-T.y)}equals(T){return this.x===T.x&&this.y===T.y}abs(){return new me(Math.abs(this.x),Math.abs(this.y))}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}modulo(T){return new me(this.x%T.x,this.y%T.y)}scalarModulo(T){return new me(this.x%T,this.y%T)}scalarMult(T){return new me(this.x*T,this.y*T)}toPosition(){return{x:this.x,y:this.y}}toString(){return`${this.x}#${this.y}`}},Ut=class{static equal(S,T){return S.position.x===T.position.x&&S.position.y===T.position.y&&S.layer===T.layer}static copyOver(S,T){T.position.x=S.position.x,T.position.y=S.position.y,T.layer=S.layer}static clone(S){return{position:S.position.clone(),layer:S.layer}}static toString(S){return`${S.position.toString()}#${S.layer}`}static toInternal(S){return{position:new ut(S.position.x,S.position.y),layer:S.charLayer}}static fromInternal(S){return{position:S.position.toPosition(),charLayer:S.layer}}},nS=(S=>(S.NONE="none",S.LEFT="left",S.UP_LEFT="up-left",S.UP="up",S.UP_RIGHT="up-right",S.RIGHT="right",S.DOWN_RIGHT="down-right",S.DOWN="down",S.DOWN_LEFT="down-left",S))(nS||{}),rS={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"},aS={up:ut.UP,down:ut.DOWN,left:ut.LEFT,right:ut.RIGHT,none:ut.ZERO,"up-left":ut.UP_LEFT,"up-right":ut.UP_RIGHT,"down-right":ut.DOWN_RIGHT,"down-left":ut.DOWN_LEFT},Ar={up:0,"up-right":1,right:2,"down-right":3,down:4,"down-left":5,left:6,"up-left":7,none:NaN},dd=["up","up-right","right","down-right","down","down-left","left","up-left"],oS=["down-left","down-right","up-right","up-left"];function hh(){return["up","down","left","right","none","up-left","up-right","down-right","down-left"]}function fn(S){return oS.includes(S)}function hS(S,T=1){return S==="none"?"none":dd[(Ar[S]+8-Math.abs(T)%8)%8]}function cd(S,T=1){return S==="none"?"none":dd[(Ar[S]+T)%8]}function vs(S){return aS[S]}function lS(S){return rS[S]}function si(S,T){if(S.x===T.x){if(S.y>T.y)return"up";if(S.yT.x)return"left";if(S.xT.x){if(S.yT.y)return"up-left"}else if(S.xT.y)return"up-right"}return"none"}var uS=(S=>(S[S.FOUR=4]="FOUR",S[S.EIGHT=8]="EIGHT",S))(uS||{});function Os(S){return typeof S=="string"&&hh().includes(S)}var Io=function(S,T){return Io=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(E,w){E.__proto__=w}||function(E,w){for(var O in w)Object.prototype.hasOwnProperty.call(w,O)&&(E[O]=w[O])},Io(S,T)};function Tn(S,T){if(typeof T!="function"&&T!==null)throw new TypeError("Class extends value "+String(T)+" is not a constructor or null");Io(S,T);function E(){this.constructor=S}S.prototype=T===null?Object.create(T):(E.prototype=T.prototype,new E)}function fS(S,T,E,w){function O(D){return D instanceof E?D:new E(function(c){c(D)})}return new(E||(E=Promise))(function(D,c){function m(v){try{a(w.next(v))}catch(o){c(o)}}function t(v){try{a(w.throw(v))}catch(o){c(o)}}function a(v){v.done?D(v.value):O(v.value).then(m,t)}a((w=w.apply(S,T||[])).next())})}function vd(S,T){var E={label:0,sent:function(){if(D[0]&1)throw D[1];return D[1]},trys:[],ops:[]},w,O,D,c;return c={next:m(0),throw:m(1),return:m(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function m(a){return function(v){return t([a,v])}}function t(a){if(w)throw new TypeError("Generator is already executing.");for(;c&&(c=0,a[0]&&(E=0)),E;)try{if(w=1,O&&(D=a[0]&2?O.return:a[0]?O.throw||((D=O.return)&&D.call(O),0):O.next)&&!(D=D.call(O,a[1])).done)return D;switch(O=0,D&&(a=[a[0]&2,D.value]),a[0]){case 0:case 1:D=a;break;case 4:return E.label++,{value:a[1],done:!1};case 5:E.label++,O=a[1],a=[0];continue;case 7:a=E.ops.pop(),E.trys.pop();continue;default:if(D=E.trys,!(D=D.length>0&&D[D.length-1])&&(a[0]===6||a[0]===2)){E=0;continue}if(a[0]===3&&(!D||a[1]>D[0]&&a[1]=S.length&&(S=void 0),{value:S&&S[w++],done:!S}}};throw new TypeError(T?"Object is not iterable.":"Symbol.iterator is not defined.")}function pn(S,T){var E=typeof Symbol=="function"&&S[Symbol.iterator];if(!E)return S;var w=E.call(S),O,D=[],c;try{for(;(T===void 0||T-- >0)&&!(O=w.next()).done;)D.push(O.value)}catch(m){c={error:m}}finally{try{O&&!O.done&&(E=w.return)&&E.call(w)}finally{if(c)throw c.error}}return D}function gn(S,T,E){if(E||arguments.length===2)for(var w=0,O=T.length,D;w1||m(r,n)})})}function m(r,n){try{t(w[r](n))}catch(e){o(D[0][3],e)}}function t(r){r.value instanceof Is?Promise.resolve(r.value.v).then(a,v):o(D[0][2],r)}function a(r){m("next",r)}function v(r){m("throw",r)}function o(r,n){r(n),D.shift(),D.length&&m(D[0][0],D[0][1])}}function cS(S){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var T=S[Symbol.asyncIterator],E;return T?T.call(S):(S=typeof Gs=="function"?Gs(S):S[Symbol.iterator](),E={},w("next"),w("throw"),w("return"),E[Symbol.asyncIterator]=function(){return this},E);function w(D){E[D]=S[D]&&function(c){return new Promise(function(m,t){c=S[D](c),O(m,t,c.done,c.value)})}}function O(D,c,m,t){Promise.resolve(t).then(function(a){D({value:a,done:m})},c)}}function Se(S){return typeof S=="function"}function pd(S){var T=function(w){Error.call(w),w.stack=new Error().stack},E=S(T);return E.prototype=Object.create(Error.prototype),E.prototype.constructor=E,E}var To=pd(function(S){return function(T){S(this),this.message=T?T.length+` errors occurred during unsubscription: -`+T.map(function(E,w){return w+1+") "+E.toString()}).join(` - `):"",this.name="UnsubscriptionError",this.errors=T}});function Bo(S,T){if(S){var E=S.indexOf(T);0<=E&&S.splice(E,1)}}var qr=function(){function S(T){this.initialTeardown=T,this.closed=!1,this._parentage=null,this._finalizers=null}return S.prototype.unsubscribe=function(){var T,E,w,O,D;if(!this.closed){this.closed=!0;var c=this._parentage;if(c)if(this._parentage=null,Array.isArray(c))try{for(var m=Gs(c),t=m.next();!t.done;t=m.next()){var a=t.value;a.remove(this)}}catch(i){T={error:i}}finally{try{t&&!t.done&&(E=m.return)&&E.call(m)}finally{if(T)throw T.error}}else c.remove(this);var v=this.initialTeardown;if(Se(v))try{v()}catch(i){D=i instanceof To?i.errors:[i]}var o=this._finalizers;if(o){this._finalizers=null;try{for(var r=Gs(o),n=r.next();!n.done;n=r.next()){var e=n.value;try{uf(e)}catch(i){D=D??[],i instanceof To?D=gn(gn([],pn(D)),pn(i.errors)):D.push(i)}}}catch(i){w={error:i}}finally{try{n&&!n.done&&(O=r.return)&&O.call(r)}finally{if(w)throw w.error}}}if(D)throw new To(D)}},S.prototype.add=function(T){var E;if(T&&T!==this)if(this.closed)uf(T);else{if(T instanceof S){if(T.closed||T._hasParent(this))return;T._addParent(this)}(this._finalizers=(E=this._finalizers)!==null&&E!==void 0?E:[]).push(T)}},S.prototype._hasParent=function(T){var E=this._parentage;return E===T||Array.isArray(E)&&E.includes(T)},S.prototype._addParent=function(T){var E=this._parentage;this._parentage=Array.isArray(E)?(E.push(T),E):E?[E,T]:T},S.prototype._removeParent=function(T){var E=this._parentage;E===T?this._parentage=null:Array.isArray(E)&&Bo(E,T)},S.prototype.remove=function(T){var E=this._finalizers;E&&Bo(E,T),T instanceof S&&T._removeParent(this)},S.EMPTY=function(){var T=new S;return T.closed=!0,T}(),S}(),gd=qr.EMPTY;function md(S){return S instanceof qr||S&&"closed"in S&&Se(S.remove)&&Se(S.add)&&Se(S.unsubscribe)}function uf(S){Se(S)?S():S.unsubscribe()}var yd={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},vS={setTimeout:function(S,T){for(var E=[],w=2;w0},enumerable:!1,configurable:!0}),T.prototype._trySubscribe=function(E){return this._throwIfClosed(),S.prototype._trySubscribe.call(this,E)},T.prototype._subscribe=function(E){return this._throwIfClosed(),this._checkFinalizedStatuses(E),this._innerSubscribe(E)},T.prototype._innerSubscribe=function(E){var w=this,O=this,D=O.hasError,c=O.isStopped,m=O.observers;return D||c?gd:(this.currentObservers=null,m.push(E),new qr(function(){w.currentObservers=null,Bo(m,E)}))},T.prototype._checkFinalizedStatuses=function(E){var w=this,O=w.hasError,D=w.thrownError,c=w.isStopped;O?E.error(D):c&&E.complete()},T.prototype.asObservable=function(){var E=new ai;return E.source=this,E},T.create=function(E,w){return new df(E,w)},T}(ai),df=function(S){Tn(T,S);function T(E,w){var O=S.call(this)||this;return O.destination=E,O.source=w,O}return T.prototype.next=function(E){var w,O;(O=(w=this.destination)===null||w===void 0?void 0:w.next)===null||O===void 0||O.call(w,E)},T.prototype.error=function(E){var w,O;(O=(w=this.destination)===null||w===void 0?void 0:w.error)===null||O===void 0||O.call(w,E)},T.prototype.complete=function(){var E,w;(w=(E=this.destination)===null||E===void 0?void 0:E.complete)===null||w===void 0||w.call(E)},T.prototype._subscribe=function(E){var w,O;return(O=(w=this.source)===null||w===void 0?void 0:w.subscribe(E))!==null&&O!==void 0?O:gd},T}(ue),Cd=new ai(function(S){return S.complete()});function AS(S){return S&&Se(S.schedule)}function Ed(S){return S[S.length-1]}function Pd(S){return AS(Ed(S))?S.pop():void 0}function Ad(S,T){return typeof Ed(S)=="number"?S.pop():T}var Md=function(S){return S&&typeof S.length=="number"&&typeof S!="function"};function wd(S){return Se(S?.then)}function Rd(S){return Se(S[uh])}function Fd(S){return Symbol.asyncIterator&&Se(S?.[Symbol.asyncIterator])}function Ld(S){return new TypeError("You provided "+(S!==null&&typeof S=="object"?"an invalid object":"'"+S+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function MS(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Od=MS();function Dd(S){return Se(S?.[Od])}function Id(S){return dS(this,arguments,function(){var T,E,w,O;return vd(this,function(D){switch(D.label){case 0:T=S.getReader(),D.label=1;case 1:D.trys.push([1,,9,10]),D.label=2;case 2:return[4,Is(T.read())];case 3:return E=D.sent(),w=E.value,O=E.done,O?[4,Is(void 0)]:[3,5];case 4:return[2,D.sent()];case 5:return[4,Is(w)];case 6:return[4,D.sent()];case 7:return D.sent(),[3,2];case 8:return[3,10];case 9:return T.releaseLock(),[7];case 10:return[2]}})})}function Bd(S){return Se(S?.getReader)}function gs(S){if(S instanceof ai)return S;if(S!=null){if(Rd(S))return wS(S);if(Md(S))return RS(S);if(wd(S))return FS(S);if(Fd(S))return bd(S);if(Dd(S))return LS(S);if(Bd(S))return OS(S)}throw Ld(S)}function wS(S){return new ai(function(T){var E=S[uh]();if(Se(E.subscribe))return E.subscribe(T);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function RS(S){return new ai(function(T){for(var E=0;E{let O=this.tilePosInDirection(new ut(E,w),S);return this.tilemap.hasBlockingTile(O,T,lS(S),this.ignoreMissingTiles)})}isCharBlocking(S,T){return this.someCharTile((E,w)=>{let O=this.tilePosInDirection(new ut(E,w),S);return this.tilemap.hasBlockingChar(O,T,this.getCollisionGroups(),new Set([this.getId()]),this.ignoreCollisionGroups)})}isMoving(){return this.movementDirection!="none"}turnTowards(S){this.isMoving()||S!="none"&&this.changeFacingDirection(S)}changeFacingDirection(S){this.facingDirection!==S&&(this.facingDirection=S,this.directionChanged$.next(S))}getFacingDirection(){return this.facingDirection}getFacingPosition(){return this._tilePos.position.add(vs(this.facingDirection))}addCollisionGroup(S){this.collisionGroups.add(S)}setCollisionGroups(S){this.collisionGroups=new Set(S)}setIgnoreCollisionGroups(S){this.ignoreCollisionGroups=new Set(S)}getCollisionGroups(){return Array.from(this.collisionGroups)}getIgnoreCollisionGroups(){return Array.from(this.ignoreCollisionGroups)}hasCollisionGroup(S){return this.collisionGroups.has(S)}removeCollisionGroup(S){this.collisionGroups.delete(S)}removeAllCollisionGroups(){this.collisionGroups.clear()}addLabels(S){for(let T of S)this.labels.add(T)}getLabels(){return[...this.labels.values()]}hasLabel(S){return this.labels.has(S)}clearLabels(){this.labels.clear()}removeLabels(S){for(let T of S)this.labels.delete(T)}getNumberOfDirections(){return this.numberOfDirections}movementStarted(){return this.movementStarted$}movementStopped(){return this.movementStopped$}directionChanged(){return this.directionChanged$}tilePositionSet(){return this.tilePositionSet$}positionChangeStarted(){return this.positionChangeStarted$}positionChangeFinished(){return this.positionChangeFinished$}autoMovementSet(){return this.autoMovementSet$}depthChanged(){return this.depthChanged$}getMovementProgress(){return this.movementProgress}setMovementProgress(S){let T=Math.max(0,Math.min(us,S));this.movementProgress=T}hasWalkedHalfATile(){return this.movementProgress>us/2}willCrossTileBorderThisUpdate(S){return this.movementProgress+this.maxProgressForDelta(S)>=us}updateCharacterPosition(S){let T=this.willCrossTileBorderThisUpdate(S),E=1-(T?us-this.movementProgress:this.maxProgressForDelta(S))/this.maxProgressForDelta(S);this.movementProgress=Math.min(this.movementProgress+this.maxProgressForDelta(S),us),T&&(this.movementProgress=0,this.shouldContinueMoving()?(this.fire(this.positionChangeFinished$,this.tilePos,this.getNextTilePos()),this.tilePos=this.getNextTilePos(),this.startMoving(this.lastMovementImpulse),E>0&&this.updateCharacterPosition(S*E)):this.stopMoving())}maxProgressForDelta(S){let T=S/1e3;return Math.floor(T*this.speed*us)}get tilePos(){return Ut.clone(this._tilePos)}set tilePos(S){Ut.copyOver(S,this._tilePos)}startMoving(S){S!=="none"&&(S!=this.movementDirection&&this.movementStarted$.next(S),this.movementDirection=S,this.facingDirection=S,this.fire(this.positionChangeStarted$,this.tilePos,this.getNextTilePos()))}tilePosInDirection(S,T){return S.add(vs(this.tilemap.toMapDirection(T)))}shouldContinueMoving(){return this.lastMovementImpulse!=="none"&&!this.isBlockingDirection(this.lastMovementImpulse)}stopMoving(){if(this.movementDirection==="none")return;let S=this.tilePos,T=this.getNextTilePos(),E=this.movementDirection;this.tilePos=this.getNextTilePos(),this.movementDirection="none",this.movementStopped$.next(E),this.fire(this.positionChangeFinished$,S,T)}fire(S,{position:T,layer:E},{position:w,layer:O}){S.next({exitTile:T,enterTile:w,exitLayer:E,enterLayer:O})}someCharTile(S){let T=this.getNextTilePos().position;for(let E=T.x;Ethis.isLayerAlwaysOnTop(O));this.tilemap.layers.filter(O=>!this.isLayerAlwaysOnTop(O)).forEach(O=>{this.hasLayerProp(O,fs.HEIGHT_SHIFT_PROP_NAME)?(this.createHeightShiftLayers(O,E),T.push(O.tilemapLayer)):this.setDepth(O,++E)}),this.charLayerDepths.set(void 0,E),w.forEach((O,D)=>{O.tilemapLayer.setDepth(D+1+E)}),T.forEach(O=>O.destroy())}setDepth(T,E){T.tilemapLayer.setDepth(E),this.isCharLayer(T)&&this.charLayerDepths.set(this.getLayerProp(T,fs.CHAR_LAYER_PROP_NAME),E)}createHeightShiftLayers(T,E){let w=this.getLayerProp(T,fs.HEIGHT_SHIFT_PROP_NAME);isNaN(w)&&(w=0);let O=1;for(let D=0;DO.name==E);return w?.value}hasLayerProp(T,E){return this.getLayerProp(T,E)!=null}copyLayer(T,E){let w=`${T.name}#${E}`,O=this.tilemap.createBlankLayer(w,T.tilemapLayer.tileset);if(O){if(O.name=w,this.isIsometric())for(let D=E;D>=0;D--){let c=E-D;O.putTileAt(T.data[D][c],c,D)}else for(let D=0;Dm===this.charData.id)).subscribe(({direction:m})=>{var t;(t=this.animation)==null||t.setStandingFrame(m)}),this.sprite&&(this.sprite.setOrigin(0,0),this.resetAnimation(this.sprite),this.updateOverlaySprite(),this.updateGridChar())}destroy(){this.destroy$.next(),this.destroy$.complete(),this.newSpriteSet$.complete()}setSprite(S){S?(this.sprite&&(S.x=this.sprite.x,S.y=this.sprite.y),this.sprite=S,this.newSpriteSet$.next(),this.layerOverlaySprite=this.layerOverlaySprite?this.scene.add.sprite(0,0,this.sprite.texture):void 0,this.updateOverlaySprite(),this.resetAnimation(this.sprite),this.updateDepth()):(this.layerOverlaySprite=void 0,this.sprite=void 0)}getSprite(){return this.sprite}getLayerOverlaySprite(){return this.layerOverlaySprite}setContainer(S){var T;this.container=S,this.cachedContainerHeight=(T=S?.getBounds().height)!=null?T:0}getContainer(){return this.container}getOffsetX(){return this.customOffset.x}setOffsetX(S){this.customOffset.x=S}getOffsetY(){return this.customOffset.y}setOffsetY(S){this.customOffset.y=S}getWalkingAnimationMapping(){return this.walkingAnimationMapping}turnTowards(S){var T;this.geHeadless.isMoving(this.charData.id)||S!="none"&&(this.geHeadless.turnTowards(this.charData.id,S),(T=this.animation)==null||T.setStandingFrame(S))}getAnimation(){return this.animation}setAnimation(S){this.animation=S}update(S){this.updateGridChar()}getEngineOffset(){var S,T,E,w;if(!this.sprite)return ut.ZERO;let O=this.tilemap.getTileWidth()/2-Math.floor(((T=(S=this.sprite)==null?void 0:S.displayWidth)!=null?T:0)/2),D=-((w=(E=this.sprite)==null?void 0:E.displayHeight)!=null?w:0)+this.tilemap.getTileHeight();return new ut(O,D)}updatePixelPos(){let S=new ut(this.geHeadless.getPosition(this.charData.id)),T=this.geHeadless.getMovementProgress(this.charData.id)/1e3,E=this.tilemap.tilePosToPixelPos(S).add(this.getEngineOffset()).add(this.customOffset).add(vs(this.geHeadless.getFacingDirection(this.charData.id)).multiply(this.tilemap.getTileDistance(this.geHeadless.getFacingDirection(this.charData.id)).scalarMult(T))),w=this.getGameObj();w&&(w.x=Math.floor(E.x),w.y=Math.floor(E.y))}getGameObj(){return this.container||this.sprite}updateGridChar(){var S;if(this.updatePixelPos(),this.sprite&&this.geHeadless.isMoving(this.charData.id)){let T=this.geHeadless.getMovementProgress(this.charData.id)>us/2;(S=this.getAnimation())==null||S.updateCharacterFrame(this.geHeadless.getFacingDirection(this.charData.id),T,Number(this.sprite.frame.name))}this.updateDepth()}resetAnimation(S){let T=new cf(this.walkingAnimationMapping,S.texture.source[0].width/S.width/cf.FRAMES_CHAR_ROW);this.setAnimation(T),T.frameChange().pipe(ii(this.newSpriteSet$)).subscribe(E=>{S?.setFrame(E)}),T.setIsEnabled(this.walkingAnimationMapping!==void 0),T.setStandingFrame(this.geHeadless.getFacingDirection(this.charData.id))}updateOverlaySprite(){if(!this.layerOverlaySprite||!this.sprite)return;this.layerOverlaySprite.scale=this.sprite.scale;let S=this.tilemap.getTileHeight()/this.layerOverlaySprite.scale;this.layerOverlaySprite.setCrop(0,0,this.layerOverlaySprite.displayWidth,this.sprite.height-S),this.layerOverlaySprite.setOrigin(0,0)}updateDepth(){if(!this.getGameObj())return;let S=new ut(this.geHeadless.getPosition(this.charData.id)),T=this.geHeadless.getCharLayer(this.charData.id);this.container?this.setContainerDepth(this.container,{position:S,layer:T}):this.sprite&&this.setSpriteDepth(this.sprite,{position:S,layer:T});let E=this.getLayerOverlaySprite();if(E){let w=new ut(Qi(he({},S),{y:S.y-1}));this.setSpriteDepth(E,{position:w,layer:T})}}setSpriteDepth(S,T){S.setDepth(this.tilemap.getDepthOfCharLayer(this.getTransitionLayer(T))+this.getPaddedPixelDepthSprite(S))}setContainerDepth(S,T){S.setDepth(this.tilemap.getDepthOfCharLayer(this.getTransitionLayer(T))+this.getPaddedPixelDepthContainer(S))}getPaddedPixelDepthContainer(S){return zo.shiftPad(S.y+this.cachedContainerHeight,Xo.Z_INDEX_PADDING)}getPaddedPixelDepthSprite(S){return zo.shiftPad(S.y+S.displayHeight,Xo.Z_INDEX_PADDING)}getTransitionLayer(S){if(S.layer)return this.geHeadless.getTransition(S.position,S.layer)||S.layer}},$S=(S=>(S.DONT_BLOCK="DONT_BLOCK",S.BLOCK_TWO_TILES="BLOCK_TWO_TILES",S.BLOCK_ONE_TILE_AHEAD="BLOCK_ONE_TILE_AHEAD",S.BLOCK_ONE_TILE_BEHIND="BLOCK_ONE_TILE_BEHIND",S))($S||{}),Wd=(S=>(S.STOP="STOP",S.CLOSEST_REACHABLE="CLOSEST_REACHABLE",S.RETRY="RETRY",S.ALTERNATIVE_TARGETS="ALTERNATIVE_TARGETS",S))(Wd||{}),ZS=class{distance(S,T){return vi.manhattanDistance(S,T)}direction(S,T){if(vi.equal(S,T))return"none";let E=S.clone().subtract(T);return Math.abs(E.x)>Math.abs(E.y)?E.x>0?"left":"right":E.y>0?"up":"down"}neighbors(S){return[new ut(S.x,S.y+1),new ut(S.x+1,S.y),new ut(S.x-1,S.y),new ut(S.x,S.y-1)]}getDirections(){return["up","right","down","left"]}},JS=class{distance(S,T){return vi.chebyshevDistance(S,T)}neighbors(S){let T=[new ut(S.x,S.y+1),new ut(S.x+1,S.y),new ut(S.x-1,S.y),new ut(S.x,S.y-1)],E=[new ut(S.x+1,S.y+1),new ut(S.x+1,S.y-1),new ut(S.x-1,S.y+1),new ut(S.x-1,S.y-1)];return[...T,...E]}direction(S,T){return T.x>S.x?T.y>S.y?"down-right":T.yS.y?"down-left":T.yS.y?"down":"none"}getDirections(){return["up","right","down","left","down-left","down-right","up-right","up-left"]}},mn=class{static create(S){switch(S){case 4:return new ZS;case 8:return new JS}}},vf=class{constructor(S,T,E){this.backoffMs=S,this.maxRetries=T,this.onFinished=E,this.retries=0,this.elapsed=0}retry(S,T){this.shouldRetry()?(this.elapsed+=S,this.elapsed>=this.backoffMs&&(this.elapsed=0,this.retries++,T())):this.onFinished()}reset(){this.retries=0,this.elapsed=0}getMaxRetries(){return this.maxRetries}getBackoffMs(){return this.backoffMs}shouldRetry(){return this.maxRetries===-1||this.retries(S.WAIT="WAIT",S.RETRY="RETRY",S.STOP="STOP",S))(Yd||{}),_r=class{constructor(S,{shortestPathAlgorithm:T="BFS",pathWidth:E=1,pathHeight:w=1,numberOfDirections:O=4,isPositionAllowed:D=(i,h)=>!0,collisionGroups:c=[],ignoredChars:m=[],ignoreTiles:t=!1,ignoreMapBounds:a=!1,ignoreBlockedTarget:v=!1,maxPathLength:o=1/0,ignoreLayers:r=!1,considerCosts:n=!1,calculateClosestToTarget:e=!0}={}){this.gridTilemap=S,this.options={shortestPathAlgorithm:T,pathWidth:E,pathHeight:w,numberOfDirections:O,isPositionAllowed:D,collisionGroups:c,ignoredChars:m,ignoreTiles:t,ignoreMapBounds:a,ignoreBlockedTarget:v,maxPathLength:o,ignoreLayers:r,considerCosts:n,calculateClosestToTarget:e},this.ignoredCharsSet=new Set(m)}findShortestPath(S,T){this.options.ignoreLayers&&(this.gridTilemap.fixCacheLayer(S.layer),T.layer=S.layer);let E=this.findShortestPathImpl(S,T);return this.gridTilemap.unfixCacheLayers(),E}getNeighbors(S,T){var E;return mn.create((E=this.options.numberOfDirections)!=null?E:4).neighbors(S.position).map(w=>{let O=S.layer;return this.options.ignoreLayers||(O=this.gridTilemap.getTransition(w,S.layer)),{position:w,layer:O||S.layer}}).filter(w=>!this.isBlocking(S,w)||this.options.ignoreBlockedTarget&&Ut.equal(w,T))}getTransition(S,T){if(!this.options.ignoreLayers)return this.gridTilemap.getTransition(S,T)}getCosts(S,T){if(!this.options.considerCosts)return 1;let E=si(T.position,S);return this.gridTilemap.getTileCosts(T,E)}isBlocking(S,T){return!(this.options.ignoreMapBounds||this.gridTilemap.isInRange(T.position))||!this.options.isPositionAllowed(T.position,T.layer)||!this.options.ignoreTiles&&this.hasBlockingTileFrom(S,T,this.options.pathWidth,this.options.pathHeight,this.options.ignoreMapBounds,this.gridTilemap)?!0:this.hasBlockingCharFrom(S,T,this.options.pathWidth,this.options.pathHeight,this.options.collisionGroups,this.ignoredCharsSet,this.gridTilemap)}distance(S,T){return(this.options.numberOfDirections===4?vi.manhattanDistance:vi.chebyshevDistance)(S,T)}getTilePosInDir(S,T){return this.options.ignoreLayers?{position:S.position.add(vs(this.gridTilemap.toMapDirection(T))),layer:S.layer}:this.gridTilemap.getTilePosInDirection(S,T)}getReverseNeighbors(S,T){var E;let w=mn.create((E=this.options.numberOfDirections)!=null?E:4).neighbors(S.position),O;if(!this.options.ignoreLayers){let D=this.gridTilemap.getReverseTransitions(S.position,S.layer);O=D?[...D]:void 0}return w.map(D=>O?O.map(c=>({position:D,layer:c||S.layer})):[{position:D,layer:S.layer}]).flat().filter(D=>!this.isBlocking(D,S)||this.options.ignoreBlockedTarget&&Ut.equal(S,T))}hasBlockingCharFrom(S,T,E,w,O,D,c){if(E===1&&w===1)return c.hasBlockingChar(T.position,T.layer,O,D);let m=a=>c.hasBlockingChar(a,T.layer,O,D),t=si(S.position,T.position);return this.isBlockingMultiTile(S,t,E,w,m)}hasBlockingTileFrom(S,T,E,w,O,D){if(E===1&&w===1)return D.hasBlockingTile(T.position,T.layer,si(T.position,S.position),O);let c=si(S.position,T.position),m=t=>D.hasBlockingTile(t,T.layer,c,O);return this.isBlockingMultiTile(S,c,E,w,m)}isBlockingMultiTile(S,T,E,w,O){let D={src:new ut(S.position.x+E,S.position.y),dest:new ut(S.position.x+E,S.position.y+w-1)},c={src:new ut(S.position.x-1,S.position.y),dest:new ut(S.position.x-1,S.position.y+w-1)},m={src:new ut(S.position.x,S.position.y-1),dest:new ut(S.position.x+E-1,S.position.y-1)},t={src:new ut(S.position.x,S.position.y+w),dest:new ut(S.position.x+E-1,S.position.y+w)};switch(T){case"right":return this.checkLine(D,O);case"left":return this.checkLine(c,O);case"up":return this.checkLine(m,O);case"down":return this.checkLine(t,O);case"up-left":return this.checkLine({src:m.src,dest:new ut(m.dest.x-1,m.dest.y)},O)||this.checkLine({src:new ut(c.src.x,c.src.y-1),dest:new ut(c.dest.x,c.dest.y-1)},O);case"up-right":return this.checkLine({src:new ut(m.src.x+1,m.src.y),dest:m.dest},O)||this.checkLine({src:new ut(D.src.x,D.src.y-1),dest:new ut(D.dest.x,D.dest.y-1)},O);case"down-left":return this.checkLine({src:new ut(c.src.x,c.src.y+1),dest:new ut(c.dest.x,c.dest.y+1)},O)||this.checkLine({src:t.src,dest:new ut(t.dest.x-1,t.dest.y)},O);case"down-right":return this.checkLine({src:new ut(t.src.x+1,t.src.y),dest:t.dest},O)||this.checkLine({src:new ut(D.src.x,D.src.y+1),dest:new ut(D.dest.x,D.dest.y+1)},O)}return!1}checkLine(S,T){for(let E=S.src.x;E<=S.dest.x;E++)for(let w=S.src.y;w<=S.dest.y;w++)if(T(new ut(E,w)))return!0;return!1}},QS=sd(nh(),1),kS=class extends _r{findShortestPathImpl(S,T){let E=this.shortestPathBfs(S,T);return{path:this.returnPath(E.previous,S,T),closestToTarget:E.closestToTarget,steps:E.steps,maxPathLengthReached:E.maxPathLengthReached,algorithmUsed:"A_STAR"}}shortestPathBfs(S,T){let E=new Map,w=new Map,O=new Map,D=new QS.MinFibonacciHeap((a,v)=>nn(O,a)-nn(O,v)),c=S,m=this.distance(S.position,T.position),t=0;for(D.push(S),w.set(Ut.toString(S),0),O.set(Ut.toString(S),this.distance(S.position,T.position));D.size>0;){let a=D.pop();if(!a)break;t++;let v=this.distance(a.position,T.position);if(vthis.options.maxPathLength)return{previous:new Map,closestToTarget:c,steps:t,maxPathLengthReached:!0};for(let o of this.getNeighbors(a,T)){let r=nn(w,a)+this.getCosts(a.position,o),n=Ut.toString(o);(!w.has(n)||r0;){let t=O.dequeue();if(m++,!t)break;let{node:a,dist:v}=t;if(v>this.options.maxPathLength)return{previous:new Map,closestToTarget:D,steps:m,maxPathLengthReached:!0};let o=this.distance(a.position,T.position);if(othis.lastDist)}step(S,T,E){var w;this.lastDist=E;for(let O of S){let D=Ut.toString(O);if(!this.visited.has(D)){this.previous.set(D,T),this.queue.enqueue({node:O,dist:E+1}),this.visited.set(D,E+1);let c=(w=this.otherBfs)==null?void 0:w.visited.get(D);c!==void 0&&c0,O.queue.size()>0);){let t=w.queue.dequeue();if(!t)break;let{node:a,dist:v}=t;if(v+1+(((E=O.queue.peek())==null?void 0:E.dist)||0)>this.options.maxPathLength)return{previous:w.previous,previous2:O.previous,closestToTarget:this.maybeClosestToTarget(c),steps:D,maxPathLengthReached:!0};let o=this.distance(a.position,T.position);if(orn(this.f,O)-rn(this.f,D)),this.openSet.push(S);let w=Ut.toString(S);for(this.g.set(w,0),this.f.set(w,this.distance(S.position,T.position)),this.maxFrontierSize=Math.max(this.maxFrontierSize,this.openSet.size);this.openSet.size>0;){let O=this.openSet.pop();if(!O)break;if(this.steps++,Ut.equal(O,T))return{previous:E,closestToTarget:T,steps:this.steps,maxPathLengthReached:!1};if(rn(this.g,O)+1>this.options.maxPathLength)return{previous:new Map,closestToTarget:this.closestToTarget,steps:this.steps,maxPathLengthReached:!0};this.updateClosestToTarget(O,T);for(let D of this.getNeighborsInternal(O,E.get(Ut.toString(O)),T)){let c=Ut.toString(D.p),m=rn(this.g,O)+D.dist;(!this.g.has(c)||m({p:D,dist:1}));let w=this.prune(T,S).filter(D=>!this.isBlockingIgnoreTarget(S,D,E)).map(D=>{let c=this.getTransition(D.position,S.layer);return{position:D.position,layer:c||S.layer}}),O=[];for(let D of w)if(this.isHorizontal(S.position,D.position))O.push({p:D,dist:1});else{let c=this.jump(S,D,E,1,si(S.position,D.position));c&&O.push(c)}return O}isBlockingIgnoreTarget(S,T,E){return this.isBlocking(S,T)&&!(this.options.ignoreBlockedTarget&&Ut.equal(T,E))}jump(S,T,E,w,O){if(!this.isBlockingIgnoreTarget(S,T,E))return Ut.equal(T,E)?{p:T,dist:w}:w>=this.maxJumpSize?{p:T,dist:w}:this.getTransition(T.position,S.layer)!==void 0?{p:T,dist:w}:this.hasForced(S,T)?{p:T,dist:w}:(this.updateClosestToTarget(T,E),this.jump(T,this.getTilePosInDir(T,O),E,w+1,O))}isHorizontal(S,T){return S.y===T.y}getForced(S,T,E,w,O,D){let c=[],m=S;return(this.blockOrTrans(m,E)||this.blockOrTrans(E,w))&&this.addIfNotBlocked(c,T,w),(this.blockOrTrans(m,O)||this.blockOrTrans(O,D))&&this.addIfNotBlocked(c,T,D),c}hasForced(S,T){let{topLeft:E,downLeft:w,top:O,bottom:D}=this.normalizedPositions(S,T);return!!((this.blockOrTrans(S,w)||this.blockOrTrans(w,D))&&!this.blockOrTrans(T,D)||(this.blockOrTrans(S,E)||this.blockOrTrans(E,O))&&!this.blockOrTrans(T,O))}prune(S,T){let{right:E,top:w,bottom:O,downLeft:D,topLeft:c}=this.normalizedPositions(S,T);return this.isHorizontal(S.position,T.position)?[E,w,O]:[E,...this.getForced(S,T,D,O,c,w)]}normalizedPositions(S,T){return S.position.xT.position.x?{topLeft:{position:new ut(T.position.x+1,T.position.y+1),layer:T.layer},downLeft:{position:new ut(T.position.x+1,T.position.y-1),layer:T.layer},top:{position:new ut(T.position.x,T.position.y+1),layer:T.layer},bottom:{position:new ut(T.position.x,T.position.y-1),layer:T.layer},right:{position:new ut(T.position.x-1,T.position.y),layer:T.layer}}:S.position.y1?this.fillPath(O,D,w):w.push(D),O=D}return w.reverse()}fillPath(S,T,E){let w=S;do{let O=si(w.position,T.position);w=this.getTilePosInDir(w,O),E.push(w)}while(!vi.equal(w.position,T.position))}};function rn(S,T){var E;return(E=S.get(Ut.toString(T)))!=null?E:Number.MAX_VALUE}var _S=class{constructor(S,T,E,w={}){this.character=S,this.gridTilemap=T,this.charToFollow=E;let O={distance:0,noPathFoundStrategy:"STOP",maxPathLength:1/0,shortestPathAlgorithm:"BIDIRECTIONAL_SEARCH",ignoreLayers:!1,considerCosts:w.considerCosts||!1,facingDirection:"none"};this.options=he(he({},O),w),this.options.considerCosts&&this.options.shortestPathAlgorithm!=="A_STAR"&&console.warn(`GridEngine: Pathfinding option 'considerCosts' cannot be used with algorithm '${this.options.shortestPathAlgorithm}'. It can only be used with A* algorithm.`),this.options.shortestPathAlgorithm==="JPS"&&(this.character.getTileWidth()>1||this.character.getTileHeight()>1)&&console.warn("GridEngine: Pathfinding algorithm 'JPS' can only be used for characters with 'tileWidth' and 'tileHeight' of 1"),this.character=S,this.updateTarget(this.charToFollow.getTilePos().position,this.charToFollow.getTilePos().layer),this.charToFollow.positionChangeStarted().pipe(ii(this.character.autoMovementSet().pipe(ki(D=>D!==this),Us(1)))).subscribe(({enterTile:D,enterLayer:c})=>{this.updateTarget(D,c)})}update(S){var T;(T=this.targetMovement)==null||T.update(S)}getInfo(){return{type:"Follow",config:{charToFollow:this.charToFollow.getId(),distance:this.options.distance,noPathFoundStrategy:this.options.noPathFoundStrategy,maxPathLength:this.options.maxPathLength,ignoreLayers:this.options.ignoreLayers,facingDirection:this.options.facingDirection,shortestPathAlgorithm:this.options.shortestPathAlgorithm}}}getFacingPos(){let S=Ar[this.options.facingDirection]+Ar[this.charToFollow.getFacingDirection()],T=cd("up",S),E={x:this.charToFollow.getTilePos().position.x,y:this.charToFollow.getTilePos().position.y};return T==="right"?E.x+=this.charToFollow.getTileWidth()-1:T==="down"?E.y+=this.charToFollow.getTileWidth()-1:T==="down-left"?E.y+=this.charToFollow.getTileWidth()-1:T==="down-right"?(E.y+=this.charToFollow.getTileWidth()-1,E.x+=this.charToFollow.getTileWidth()-1):T==="up-right"&&(E.x+=this.charToFollow.getTileWidth()-1),this.gridTilemap.getTilePosInDirection({position:new ut(E),layer:this.charToFollow.getTilePos().layer},T).position}updateTarget(S,T){let E=this.options.facingDirection!=="none"&&this.options.distance===0;E&&(S=this.getFacingPos()),this.targetMovement=new Qd(this.character,this.gridTilemap,{position:new ut(S),layer:T},{distance:E?0:this.options.distance+1,config:{algorithm:this.options.shortestPathAlgorithm,noPathFoundStrategy:this.options.noPathFoundStrategy,maxPathLength:this.options.maxPathLength,ignoreLayers:this.options.ignoreLayers,considerCosts:this.options.considerCosts,ignoredChars:[this.charToFollow.getId()]}})}},xf=class{static getRandomInt(S){return Math.floor(Math.random()*Math.floor(S))}},t2=class{constructor(S,T=0,E=-1){this.character=S,this.delay=T,this.radius=E,this.stepSize=0,this.delayLeft=this.delay,this.initialRow=S.getNextTilePos().position.y,this.initialCol=S.getNextTilePos().position.x,this.randomizeStepSize(),this.stepsWalked=0,this.currentMovementDirection="none",this.character.positionChangeStarted().pipe(ii(this.character.autoMovementSet().pipe(ki(w=>w!==this),Us(1)))).subscribe(()=>{this.stepsWalked++}),this.distanceUtils=mn.create(S.getNumberOfDirections())}update(S){if(this.shouldContinueWalkingCurrentDirection())this.character.move(this.currentMovementDirection);else if(this.delayLeft-=S,this.delayLeft<=0){this.delayLeft=this.delay;let T=this.getFreeRandomDirection();this.stepsWalked=0,this.character.move(T),this.currentMovementDirection=T,this.randomizeStepSize()}}getInfo(){return{type:"Random",config:{delay:this.delay,radius:this.radius}}}shouldContinueWalkingCurrentDirection(){return this.stepsWalked!this.character.isBlockingDirection(S)).filter(S=>this.isWithinRadius(S))}isWithinRadius(S){return this.radius==-1?!0:this.getDist(S)<=this.radius}getDist(S){return this.distanceUtils.distance(this.character.getNextTilePos().position.add(vs(S)),new ut(this.initialCol,this.initialRow))}getFreeRandomDirection(){let S=this.getFreeDirections();return S.length==0?"none":S[xf.getRandomInt(S.length)]}randomizeStepSize(){this.stepSize=xf.getRandomInt(this.radius)+1}};function e2(S,T){return S.filter(E=>{var w,O,D,c,m,t;return(w=T.labels)!=null&&w.withAllLabels?(O=T.labels)==null?void 0:O.withAllLabels.every(a=>E.hasLabel(a)):(D=T.labels)!=null&&D.withOneOfLabels?(c=T.labels)==null?void 0:c.withOneOfLabels.some(a=>E.hasLabel(a)):(m=T.labels)!=null&&m.withNoneLabels?!((t=T.labels)!=null&&t.withNoneLabels.some(a=>E.hasLabel(a))):!0})}var jd="2.44.6",i2=class{constructor(S,T){this.collistionStrategy=S,this.collisionGroupRelation=T,this.tilePosToCharacters=new s2,this.charRemoved$=new ue}isCharBlockingAt(S,T,E,w=new Set,O=new Set){if(E.length===0)return!1;let D=this.tilePosToCharacters.get(S,T);return!!(D&&D.size>0&&[...D].filter(c=>!w.has(c.getId())).filter(c=>!this.doIntersect(c.getCollisionGroups(),O)).some(c=>E.some(m=>c.getCollisionGroups().some(t=>this.collidesWith(m,t)))))}doIntersect(S,T){for(let E of S)if(T.has(E))return!0;return!1}collidesWith(S,T){return this.collisionGroupRelation?(this.collisionGroupRelation.get(S)||new Set).has(T):S===T}getCharactersAt(S,T){return this.tilePosToCharacters.get(S,T)||new Set}addCharacter(S){this.addTilePositions(S.getTilePos(),S),this.addTilePositions(S.getNextTilePos(),S),this.addPositionChangeSub(S),this.addPositionChangeFinishedSub(S),this.addTilePosSetSub(S)}removeCharacter(S){let T=S.getId();this.charRemoved$.next(T),this.deleteTilePositions(S.getTilePos(),S),this.deleteTilePositions(S.getNextTilePos(),S)}add(S,T,E){let w=this.tilePosToCharacters.get(S,T);w||this.tilePosToCharacters.set(S,T,new Set([E])),w?.add(E)}addTilePosSetSub(S){S.tilePositionSet().pipe(ii(this.charRemoved(S.getId()))).subscribe(T=>{this.deleteTilePositions(S.getNextTilePos(),S),this.addTilePositions(T,S)})}charRemoved(S){var T;return(T=this.charRemoved$)==null?void 0:T.pipe(Us(1),ki(E=>E==S))}addPositionChangeSub(S){S.positionChangeStarted().pipe(ii(this.charRemoved(S.getId())),this.posChangeToLayerPos()).subscribe(T=>{this.collistionStrategy==="BLOCK_ONE_TILE_AHEAD"&&this.deleteTilePositions(T.exit,S),this.addTilePositions(T.enter,S)})}addPositionChangeFinishedSub(S){S.positionChangeFinished().pipe(ii(this.charRemoved(S.getId())),this.posChangeToLayerPos()).subscribe(T=>{this.deleteTilePositions(T.exit,S),this.addTilePositions(T.enter,S)})}addTilePositions(S,T){this.forEachCharTile(S,T,(E,w)=>{this.add(new ut(E,w),S.layer,T)})}deleteTilePositions(S,T){this.forEachCharTile(S,T,(E,w)=>{var O;(O=this.tilePosToCharacters.get(new ut(E,w),S.layer))==null||O.delete(T)})}forEachCharTile(S,T,E){let w=S.position;for(let O=w.x;O({enter:{position:new ut(S.enterTile),layer:S.enterLayer},exit:{position:new ut(S.exitTile),layer:S.exitLayer}})))}posToString(S,T){return`${S.x}#${S.y}#${T}`}},s2=class{constructor(){this.memo=new Map}set(S,T,E){let w=this.memo.get(S.x);w||(w=new Map,this.memo.set(S.x,w));let O=w.get(S.y);O||(O=new Map,w.set(S.y,O)),O.set(T,E)}get(S,T){let E=this.memo.get(S.x);if(!E)return;let w=E.get(S.y);if(w)return w.get(T)}},fh=class{constructor(S,T,E,w){this.x=S,this.y=T,this.width=E,this.height=w}getX(){return this.x}getY(){return this.y}getWidth(){return this.width}getHeight(){return this.height}isInRange(S){return S.x>=this.x&&S.x=this.y&&S.yE.isCharLayer());for(let E of[...T,void 0]){let w=this.tileCollisionCache.get(E?.getName());if(w===void 0){w=new Array(this.tilemap.getWidth());for(let O=0;O>T&1)==1}var Sf="ge_cost",$d=class Zd{constructor(T,E,w,O=void 0,D=!1){this.tilemap=T,this.collisionTilePropertyName=E,this.useTileCollisionCache=D,this.characters=new Map,this.transitions=new Map,this.reverseTransitions=new Map,this.collidesPropNames=new Map,this.tileCostPropNames=new Map,this.collisionRelevantLayersFrameCache=new Map,this.charBlockCache=new i2(w,O);for(let c of hh())this.collidesPropNames.set(c,Zd.ONE_WAY_COLLIDE_PROP_PREFIX+c),this.tileCostPropNames.set(c,`${Sf}_${c}`);this.useTileCollisionCache&&(this.tileCollisionCache=new r2(T,this),this.tileCollisionCache.rebuild())}fixCacheLayer(T){var E;(E=this.tileCollisionCache)==null||E.fixLayer(T)}unfixCacheLayers(){var T;(T=this.tileCollisionCache)==null||T.unfixLayers()}addCharacter(T){this.characters.set(T.getId(),T);let E=T.getNextTilePos().layer;E===void 0?T.setTilePosition(Qi(he({},T.getNextTilePos()),{layer:this.getLowestCharLayer()})):this.getCharLayerNames().includes(E)||console.warn(`Char layer '${E}' of character '${T.getId()}' is unknown.`),this.charBlockCache.addCharacter(T)}removeCharacter(T){let E=this.characters.get(T);E&&(this.charBlockCache.removeCharacter(E),this.characters.delete(T))}getCharacters(){return[...this.characters.values()]}getCharactersAt(T,E){return this.charBlockCache.getCharactersAt(T,E)}rebuildTileCollisionCache(T){var E;(E=this.tileCollisionCache)==null||E.rebuild(T)}hasBlockingTileUncached(T,E,w,O){if(!O&&this.hasNoTileUncached(T,E))return!0;let D=this.getCollisionRelevantLayers(E);for(let c of D)if(this.isLayerBlockingAt(c.getName(),T,w))return!0;return!1}hasBlockingTile(T,E,w,O){var D;let c=(D=this.tileCollisionCache)==null?void 0:D.isBlockingFrom(T.x,T.y,E,w,O);return c!==void 0?c:this.hasBlockingTileUncached(T,E,w,O)}getTransition(T,E){let w=this.transitions.get(T.toString());if(w)return w.get(E)}getReverseTransitions(T,E){let w=this.reverseTransitions.get(T.toString());if(w)return w.get(E)}setTransition(T,E,w){var O,D,c,m,t;this.transitions.has(T.toString())||this.transitions.set(T.toString(),new Map),this.reverseTransitions.has(T.toString())||this.reverseTransitions.set(T.toString(),new Map),(O=this.transitions.get(T.toString()))==null||O.set(E,w),(D=this.reverseTransitions.get(T.toString()))!=null&&D.has(w)||(c=this.reverseTransitions.get(T.toString()))==null||c.set(w,new Set),(t=(m=this.reverseTransitions.get(T.toString()))==null?void 0:m.get(w))==null||t.add(E)}getTransitions(){return new Map([...this.transitions].map(([T,E])=>[T,new Map(E)]))}getTileCosts(T,E){let w=this.getCollisionRelevantLayers(T.layer),O=1;for(let D of w)O=Math.max(O,this.getTileCostsForLayer(Qi(he({},T),{layer:D.getName()}),E));return O}getTileCostsForLayer(T,E){let w=this.tilemap.getTileAt(T.position.x,T.position.y,T.layer);return E&&w?.getProperty(this.tileCostPropNames.get(E)||"")||w?.getProperty(Sf)||1}hasNoTileUncached(T,E){return!this.getCollisionRelevantLayers(E).some(w=>this.tilemap.hasTileAt(T.x,T.y,w.getName()))}hasNoTile(T,E){var w;let O=(w=this.tileCollisionCache)==null?void 0:w.hasTileAt(T.x,T.y,E);return O!==void 0?O:this.hasNoTileUncached(T,E)}hasBlockingChar(T,E,w,O=new Set,D=new Set){return this.charBlockCache.isCharBlockingAt(T,E,w,O,D)}isInRange(T){return new fh(0,0,this.tilemap.getWidth(),this.tilemap.getHeight()).isInRange(T)}toMapDirection(T){return this.isIsometric()?hS(T):T}fromMapDirection(T){return this.isIsometric()?cd(T):T}isIsometric(){return this.tilemap.getOrientation()==="isometric"}getTilePosInDirection(T,E){let w=T.position.add(vs(this.toMapDirection(E))),O=this.getTransition(w,T.layer)||T.layer;return{position:w,layer:O}}invalidateFrameCache(){this.collisionRelevantLayersFrameCache.clear()}isLayerBlockingAt(T,E,w){let O=this.tilemap.getTileAt(E.x,E.y,T);return O?!!(O.getProperty(this.collisionTilePropertyName)||w&&O.getProperty(this.collidesPropNames.get(w)||"")):!1}getCharLayerIndexes(){return this.tilemap.getLayers().map((T,E)=>({layer:T,index:E})).filter(({layer:T})=>T.isCharLayer()).map(({index:T})=>T)}findPrevAndCharLayer(T){let E=this.getCharLayerIndexes(),w=this.tilemap.getLayers(),O=E.findIndex(D=>w[D].getProperty(yr)==T);return O==0?{prevIndex:-1,charLayerIndex:E[O]}:{prevIndex:E[O-1],charLayerIndex:E[O]}}getCollisionRelevantLayers(T){if(!T)return this.tilemap.getLayers();let E=this.collisionRelevantLayersFrameCache.get(T);if(E)return E;let{prevIndex:w,charLayerIndex:O}=this.findPrevAndCharLayer(T),D=this.tilemap.getLayers().slice(w+1,O+1);return this.collisionRelevantLayersFrameCache.set(T,D),D}getLowestCharLayer(){for(let T of this.tilemap.getLayers())if(T.isCharLayer())return T.getProperty(yr)}getCharLayerNames(){return this.tilemap.getLayers().filter(T=>T.isCharLayer()).map(T=>T.getProperty(yr)).filter(o2)}};$d.ONE_WAY_COLLIDE_PROP_PREFIX="ge_collide_";var a2=$d;function o2(S){return S!=null}var h2=(S=>(S.REMOVED="REMOVED",S.ADDED="ADDED",S))(h2||{}),l2=(S=>(S.WAIT="WAIT",S.SKIP="SKIP",S.STOP="STOP",S))(l2||{}),u2=class{constructor(S,T){this.character=S,this.tilemap=T,this.queue=new Mr,this.finished$=new ue,this.pathBlockedWaitElapsed=0,this.distanceUtils=mn.create(S.getNumberOfDirections()),this.character.autoMovementSet().pipe(ki(E=>E!==this),Us(1)).subscribe(()=>{this.queue.size()>0&&this.finishMovementTerminated(),this.finished$.complete()})}update(S){(!this.character.isMoving()||this.character.willCrossTileBorderThisUpdate(S))&&this.queue.size()>0&&this.moveCharOnPath(S)}getInfo(){return{type:"Queue"}}enqueue(S,T={}){var E,w,O;let D={pathBlockedStrategy:(E=T.pathBlockedStrategy)!=null?E:"STOP",pathBlockedWaitTimeoutMs:T?.pathBlockedWaitTimeoutMs||-1,ignoreInvalidPositions:(w=T.ignoreInvalidPositions)!=null?w:!1,skipInvalidPositions:(O=T.skipInvalidPositions)!=null?O:!1};for(let c of S){let m={command:c,config:D};if(Os(c)){this.queue.enqueue(m);continue}let t=this.queue.peekEnd(),a=t?.command;if(a||(a=this.character.getNextTilePos()),Os(a)){this.queue.enqueue(m);continue}let v=this.distanceUtils.distance(a.position,c.position)===1;(!T.ignoreInvalidPositions||v)&&this.queue.enqueue(m)}}peekAll(){return this.queue.peekAll()}size(){return this.queue.size()}finished(){return this.finished$}clear(){this.queue.clear()}moveCharOnPath(S){let T=this.queue.peek();if(!T)return;let E=T.command,w=T.config;if(Os(E)&&(E=this.tilemap.getTilePosInDirection(this.character.getNextTilePos(),E)),w.skipInvalidPositions){if(E=this.getNextValidPosition(),!E){this.finishInvalidNextPos(E);return}}else if(!this.isNeighborPos(E)){this.finishInvalidNextPos(E);return}if(this.character.isBlockingDirection(si(this.character.getNextTilePos().position,E.position))){if(w.pathBlockedStrategy==="STOP")this.finishPathBlocked(E);else if(w.pathBlockedStrategy==="SKIP"){this.queue.dequeue(),this.moveCharOnPath(S);return}else w.pathBlockedStrategy==="WAIT"&&w.pathBlockedWaitTimeoutMs>-1&&(this.pathBlockedWaitElapsed+=S,this.pathBlockedWaitElapsed>=w.pathBlockedWaitTimeoutMs&&this.finishBlockedWaitTimeout(E,w.pathBlockedWaitTimeoutMs));return}this.pathBlockedWaitElapsed=0,this.queue.dequeue(),this.character.move(this.getDir(this.character.getNextTilePos().position,E.position)),this.isLastMovement()&&this.finish("SUCCESS","",E)}getNextValidPosition(){for(var S;this.queue.size()>0;){let T=(S=this.queue.peek())==null?void 0:S.command;if(Os(T)&&(T=this.tilemap.getTilePosInDirection(this.character.getNextTilePos(),T)),T&&this.isNeighborPos(T))return T;this.queue.dequeue()}}isLastMovement(){return this.queue.size()===0}isNeighborPos(S){let T=this.distanceUtils.distance(this.character.getNextTilePos().position,S.position)===1,E=this.tilemap.getTransition(S.position,this.character.getNextTilePos().layer);if(this.character.getNextTilePos().layer!==S.layer)return T&&E===S.layer;let w=E!==void 0&&E!==S.layer;return T&&!w}finishMovementTerminated(){this.finish("MOVEMENT_TERMINATED","New automatic movement has been set to character.")}finishInvalidNextPos(S){S?this.finish("INVALID_NEXT_POS",`Position ${this.posToStr(S)} is not reachable from ${this.posToStr(this.character.getNextTilePos())}.`):this.finish("INVALID_NEXT_POS",`No enqueued position is reachable from ${this.posToStr(this.character.getNextTilePos())}.`)}finishPathBlocked(S){this.finish("PATH_BLOCKED",`Position ${this.posToStr(S)} is blocked.`)}finishBlockedWaitTimeout(S,T){this.finish("PATH_BLOCKED_WAIT_TIMEOUT",`Position ${this.posToStr(S)} is blocked and the wait timeout of ${T} ms has been exceeded.`)}finish(S,T="",E=this.character.getNextTilePos()){this.queue=new Mr,this.finished$.next({position:E.position,result:S,description:T,layer:E.layer})}getDir(S,T){return this.tilemap.fromMapDirection(si(S,T))}posToStr(S){return`(${S.position.x}, ${S.position.y}, ${S.layer})`}},f2=class{constructor(S=!0){this.isCreatedInternal=!1,S&&console.log(`Using GridEngine v${jd}`)}getCharLayer(S){var T;this.initGuard();let E=(T=this.gridCharacters)==null?void 0:T.get(S);if(!E)throw this.createCharUnknownErr(S);return E.getTilePos().layer}getTransition(S,T){var E;return this.initGuard(),(E=this.gridTilemap)==null?void 0:E.getTransition(new ut(S),T)}setTransition(S,T,E){var w;return this.initGuard(),(w=this.gridTilemap)==null?void 0:w.setTransition(new ut(S),T,E)}create(S,T){this.isCreatedInternal=!0,this.gridCharacters=new Map;let E=this.setConfigDefaults(T);this.config=E,this.movementStopped$=new ue,this.movementStarted$=new ue,this.directionChanged$=new ue,this.positionChangeStarted$=new ue,this.positionChangeFinished$=new ue,this.queueMovementFinished$=new ue,this.charRemoved$=new ue,this.charAdded$=new ue,this.gridTilemap=new a2(S,this.config.collisionTilePropertyName,this.config.characterCollisionStrategy,this.recordToMap(this.config.collisionGroupRelation),this.config.cacheTileCollisions),this.addCharacters()}recordToMap(S){return S?new Map(Object.entries(S).map(([T,E])=>[T,new Set(E)])):void 0}getPosition(S){var T;this.initGuard();let E=(T=this.gridCharacters)==null?void 0:T.get(S);if(!E)throw this.createCharUnknownErr(S);return E.getTilePos().position}move(S,T){this.moveChar(S,T)}moveRandomly(S,T=0,E=-1){var w;this.initGuard();let O=(w=this.gridCharacters)==null?void 0:w.get(S);if(!O)throw this.createCharUnknownErr(S);let D=new t2(O,T,E);O.setMovement(D)}getMovement(S){var T;this.initGuard();let E=(T=this.gridCharacters)==null?void 0:T.get(S);if(!E)throw this.createCharUnknownErr(S);let w=E.getMovement();return w?w.getInfo():{type:"None"}}moveTo(S,T,E){var w;let O=this.assembleMoveToConfig(E);this.initGuard();let D=(w=this.gridCharacters)==null?void 0:w.get(S);if(!D)throw this.createCharUnknownErr(S);if(!this.gridTilemap)throw this.createUninitializedErr();let c=new Qd(D,this.gridTilemap,{position:new ut(T),layer:E?.targetLayer||D.getNextTilePos().layer},{distance:0,config:O});return D.setMovement(c),c.finishedObs().pipe(dn(m=>({charId:S,position:m.position,result:m.result,description:m.description,layer:m.layer})))}stopMovement(S){var T;this.initGuard();let E=(T=this.gridCharacters)==null?void 0:T.get(S);if(!E)throw this.createCharUnknownErr(S);E.setMovement(void 0)}setSpeed(S,T){var E;this.initGuard();let w=(E=this.gridCharacters)==null?void 0:E.get(S);if(!w)throw this.createCharUnknownErr(S);w.setSpeed(T)}getSpeed(S){var T;this.initGuard();let E=(T=this.gridCharacters)==null?void 0:T.get(S);if(!E)throw this.createCharUnknownErr(S);return E.getSpeed()}collidesWithTiles(S){var T;this.initGuard();let E=(T=this.gridCharacters)==null?void 0:T.get(S);if(!E)throw this.createCharUnknownErr(S);return E.collidesWithTiles()}update(S,T){var E;if(this.isCreatedInternal&&this.gridCharacters)for(let[w,O]of this.gridCharacters)O.update(T);(E=this.gridTilemap)==null||E.invalidateFrameCache()}addCharacter(S){var T,E,w,O,D;if(!this.gridTilemap)throw this.createUninitializedErr();if(!this.config)throw this.createUninitializedErr();let c={speed:S.speed||4,tilemap:this.gridTilemap,collidesWithTiles:!0,collisionGroups:["geDefault"],ignoreCollisionGroups:[],charLayer:S.charLayer,facingDirection:S.facingDirection,labels:S.labels,numberOfDirections:(T=S.numberOfDirections)!=null?T:this.config.numberOfDirections,tileWidth:S.tileWidth,tileHeight:S.tileHeight};typeof S.collides=="boolean"?S.collides===!1&&(c.collidesWithTiles=!1,c.collisionGroups=[]):S.collides!==void 0&&(S.collides.collidesWithTiles===!1&&(c.collidesWithTiles=!1),S.collides.collisionGroups&&(c.collisionGroups=S.collides.collisionGroups),S.collides.ignoreCollisionGroups&&(c.ignoreCollisionGroups=S.collides.ignoreCollisionGroups),c.ignoreMissingTiles=(w=(E=S.collides)==null?void 0:E.ignoreMissingTiles)!=null?w:!1);let m=new KS(S.id,c);S.startPosition&&m.setTilePosition({position:new ut(S.startPosition),layer:m.getTilePos().layer}),(O=this.gridCharacters)==null||O.set(S.id,m),this.gridTilemap.addCharacter(m);let t=m.getId();m.movementStopped().pipe(ii(this.charRemoved(t))).subscribe(a=>{var v;(v=this.movementStopped$)==null||v.next({charId:t,direction:a})}),m.movementStarted().pipe(ii(this.charRemoved(t))).subscribe(a=>{var v;(v=this.movementStarted$)==null||v.next({charId:t,direction:a})}),m.directionChanged().pipe(ii(this.charRemoved(t))).subscribe(a=>{var v;(v=this.directionChanged$)==null||v.next({charId:t,direction:a})}),m.positionChangeStarted().pipe(ii(this.charRemoved(t))).subscribe(a=>{var v;(v=this.positionChangeStarted$)==null||v.next(he({charId:t},a))}),m.positionChangeFinished().pipe(ii(this.charRemoved(t))).subscribe(a=>{var v;(v=this.positionChangeFinished$)==null||v.next(he({charId:t},a))}),(D=this.charAdded$)==null||D.next(t)}hasCharacter(S){var T;return this.initGuard(),!!((T=this.gridCharacters)!=null&&T.has(S))}removeCharacter(S){var T,E,w,O;if(this.initGuard(),!((T=this.gridCharacters)!=null&&T.get(S)))throw this.createCharUnknownErr(S);(E=this.gridTilemap)==null||E.removeCharacter(S),(w=this.gridCharacters)==null||w.delete(S),(O=this.charRemoved$)==null||O.next(S)}removeAllCharacters(){if(this.initGuard(),!!this.gridCharacters)for(let S of this.gridCharacters.keys())this.removeCharacter(S)}getAllCharacters(S){if(this.initGuard(),!this.gridCharacters)return[];let T=[...this.gridCharacters.values()];return(S?e2(T,S):T).map(E=>E.getId())}getLabels(S){var T;this.initGuard();let E=(T=this.gridCharacters)==null?void 0:T.get(S);if(!E)throw this.createCharUnknownErr(S);return E.getLabels()}addLabels(S,T){var E;this.initGuard();let w=(E=this.gridCharacters)==null?void 0:E.get(S);if(!w)throw this.createCharUnknownErr(S);w.addLabels(T)}removeLabels(S,T){var E;this.initGuard();let w=(E=this.gridCharacters)==null?void 0:E.get(S);if(!w)throw this.createCharUnknownErr(S);w.removeLabels(T)}clearLabels(S){var T;this.initGuard();let E=(T=this.gridCharacters)==null?void 0:T.get(S);if(!E)throw this.createCharUnknownErr(S);E.clearLabels()}follow(S,T,E,w){var O,D,c,m,t,a;let v;E===void 0?v={distance:0,closestPointIfBlocked:!1}:typeof E=="number"?(v={distance:E,closestPointIfBlocked:!1},w&&(v.closestPointIfBlocked=!0)):v=E,this.initGuard();let o=(O=this.gridCharacters)==null?void 0:O.get(S),r=(D=this.gridCharacters)==null?void 0:D.get(T);if(!o)throw this.createCharUnknownErr(S);if(!r)throw this.createCharUnknownErr(T);if(!this.gridTilemap)throw this.createUninitializedErr();let n=new _S(o,this.gridTilemap,r,{distance:(c=v.distance)!=null?c:0,noPathFoundStrategy:v.closestPointIfBlocked?"CLOSEST_REACHABLE":"STOP",maxPathLength:(m=v.maxPathLength)!=null?m:1/0,shortestPathAlgorithm:(t=v.algorithm)!=null?t:"BIDIRECTIONAL_SEARCH",ignoreLayers:!!v.ignoreLayers,facingDirection:(a=v.facingDirection)!=null?a:"none"});o.setMovement(n)}isMoving(S){var T;this.initGuard();let E=(T=this.gridCharacters)==null?void 0:T.get(S);if(!E)throw this.createCharUnknownErr(S);return E.isMoving()}getFacingDirection(S){var T;this.initGuard();let E=(T=this.gridCharacters)==null?void 0:T.get(S);if(!E)throw this.createCharUnknownErr(S);return E.getFacingDirection()}getFacingPosition(S){var T;this.initGuard();let E=(T=this.gridCharacters)==null?void 0:T.get(S);if(!E)throw this.createCharUnknownErr(S);let w=E.getFacingPosition();return{x:w.x,y:w.y}}turnTowards(S,T){var E;this.initGuard();let w=(E=this.gridCharacters)==null?void 0:E.get(S);if(!w)throw this.createCharUnknownErr(S);return w.turnTowards(T)}getCharactersAt(S,T){if(this.initGuard(),!this.gridTilemap)return[];let E=this.gridTilemap.getCharactersAt(new ut(S),T);return Array.from(E).map(w=>w.getId())}setPosition(S,T,E){var w;this.initGuard();let O=(w=this.gridCharacters)==null?void 0:w.get(S);if(!O)throw this.createCharUnknownErr(S);E||O.setTilePosition({position:new ut(T),layer:O.getTilePos().layer}),O.setTilePosition({position:new ut(T),layer:E})}isBlocked(S,T,E=["geDefault"]){var w,O;this.initGuard();let D=new ut(S);return!!((w=this.gridTilemap)!=null&&w.hasBlockingTile(D,T)||(O=this.gridTilemap)!=null&&O.hasBlockingChar(D,T,E))}isTileBlocked(S,T){var E;return this.initGuard(),!!((E=this.gridTilemap)!=null&&E.hasBlockingTile(new ut(S),T))}getCollisionGroups(S){var T;this.initGuard();let E=(T=this.gridCharacters)==null?void 0:T.get(S);if(!E)throw this.createCharUnknownErr(S);return E.getCollisionGroups()||[]}setCollisionGroups(S,T){var E;this.initGuard();let w=(E=this.gridCharacters)==null?void 0:E.get(S);if(!w)throw this.createCharUnknownErr(S);w.setCollisionGroups(T)}getIgnoreCollisionGroups(S){var T;this.initGuard();let E=(T=this.gridCharacters)==null?void 0:T.get(S);if(!E)throw this.createCharUnknownErr(S);return E.getIgnoreCollisionGroups()||[]}setIgnoreCollisionGroups(S,T){var E;this.initGuard();let w=(E=this.gridCharacters)==null?void 0:E.get(S);if(!w)throw this.createCharUnknownErr(S);w.setIgnoreCollisionGroups(T)}getTilePosInDirection(S,T,E){if(!this.gridTilemap)throw this.createUninitializedErr();let w=this.gridTilemap.getTilePosInDirection({position:new ut(S),layer:T},E);return{position:w.position.toPosition(),charLayer:w.layer}}findShortestPath(S,T,E={}){if(!this.gridTilemap)throw this.createUninitializedErr();let w=E.shortestPathAlgorithm||"BFS";E.considerCosts&&w!=="A_STAR"&&console.warn(`GridEngine: Pathfinding option 'considerCosts' cannot be used with algorithm '${w}'. It can only be used with A* algorithm.`);let O=E.pathWidth!==void 0&&E.pathWidth!==1,D=E.pathHeight!==void 0&&E.pathHeight!==1;(O||D)&&w==="JPS"&&console.warn("GridEngine: Pathfinding options 'pathWidth' and 'pathHeight' > 1 cannot be used with algorithm 'JPS'.");let c=new Jd(this.gridTilemap).findShortestPath(Ut.toInternal(S),Ut.toInternal(T),Qi(he({},E),{shortestPathAlgorithm:w}));return{path:c.path.map(Ut.fromInternal),closestToTarget:c.closestToTarget?Ut.fromInternal(c.closestToTarget):void 0,reachedMaxPathLength:!1,steps:c.steps}}steppedOn(S,T,E){return this.positionChangeFinished().pipe(ki(w=>S.includes(w.charId)&&T.some(O=>O.x===w.enterTile.x&&O.y===w.enterTile.y)&&(E===void 0||E.includes(w.enterLayer))))}characterShifted(){if(!this.charAdded$||!this.charRemoved$)throw this.createUninitializedErr();return this.charAdded$.pipe(dn(S=>({charId:S,action:"ADDED"})),HS(this.charRemoved$.pipe(dn(S=>({charId:S,action:"REMOVED"})))))}movementStarted(){if(!this.movementStarted$)throw this.createUninitializedErr();return this.movementStarted$}movementStopped(){if(!this.movementStopped$)throw this.createUninitializedErr();return this.movementStopped$}directionChanged(){if(!this.directionChanged$)throw this.createUninitializedErr();return this.directionChanged$}positionChangeStarted(){if(!this.positionChangeStarted$)throw this.createUninitializedErr();return this.positionChangeStarted$}positionChangeFinished(){if(!this.positionChangeFinished$)throw this.createUninitializedErr();return this.positionChangeFinished$}getMovementProgress(S){var T;this.initGuard();let E=(T=this.gridCharacters)==null?void 0:T.get(S);if(!E)throw this.createCharUnknownErr(S);return E.getMovementProgress()}rebuildTileCollisionCache(S,T,E,w){var O;(O=this.gridTilemap)==null||O.rebuildTileCollisionCache(new fh(S,T,E,w))}addQueueMovements(S,T,E){var w,O;this.initGuard();let D=(w=this.gridCharacters)==null?void 0:w.get(S);if(!D)throw this.createCharUnknownErr(S);if(!this.gridTilemap)throw this.createUninitializedErr();let c;((O=D?.getMovement())==null?void 0:O.getInfo().type)==="Queue"?c=D.getMovement():(c=new u2(D,this.gridTilemap),D.setMovement(c),c.finished().pipe(ii(XS(this.charRemoved(S),D.autoMovementSet()))).subscribe(m=>{var t;(t=this.queueMovementFinished$)==null||t.next(he({charId:S},m))})),c.enqueue(T.map(m=>Os(m)?m:{position:new ut(m.position),layer:m.charLayer}),E)}queueMovementFinished(){if(!this.queueMovementFinished$)throw this.createUninitializedErr();return this.queueMovementFinished$}getEnqueuedMovements(S){var T,E;this.initGuard();let w=(T=this.gridCharacters)==null?void 0:T.get(S);if(!w)throw this.createCharUnknownErr(S);return((E=w.getMovement())==null?void 0:E.getInfo().type)==="Queue"?w.getMovement().peekAll().map(O=>({command:Os(O.command)?O.command:Ut.fromInternal(O.command),config:O.config})):[]}clearEnqueuedMovements(S){var T,E;this.initGuard();let w=(T=this.gridCharacters)==null?void 0:T.get(S);if(!w)throw this.createCharUnknownErr(S);((E=w.getMovement())==null?void 0:E.getInfo().type)==="Queue"&&w.getMovement().clear()}getTileCost(S,T,E){var w,O;return this.initGuard(),(O=(w=this.gridTilemap)==null?void 0:w.getTileCosts({position:new ut(S),layer:T},E))!=null?O:1}getState(){let S=[];if(this.gridCharacters)for(let[T,E]of this.gridCharacters.entries())S.push({id:T,position:Ut.fromInternal(E.getTilePos()),facingDirection:E.getFacingDirection(),speed:E.getSpeed(),labels:E.getLabels(),movementProgress:E.getMovementProgress(),collisionConfig:{collisionGroups:E.getCollisionGroups(),ignoreCollisionGroups:E.getIgnoreCollisionGroups(),collidesWithTiles:E.collidesWithTiles(),ignoreMissingTiles:E.getIgnoreMissingTiles()}});return{characters:S}}setState(S){if(this.gridCharacters)for(let T of S.characters){let E=this.gridCharacters.get(T.id);if(E){let w=E.getTilePos();Ut.equal(w,Ut.toInternal(T.position))||E.setTilePosition(Ut.toInternal(T.position)),E.setSpeed(T.speed),E.turnTowards(T.facingDirection),T.collisionConfig.collisionGroups&&E.setCollisionGroups(T.collisionConfig.collisionGroups),T.collisionConfig.collidesWithTiles!==void 0&&E.setCollidesWithTiles(T.collisionConfig.collidesWithTiles),T.collisionConfig.ignoreMissingTiles!==void 0&&E.setIgnoreMissingTiles(T.collisionConfig.ignoreMissingTiles),E.setMovementProgress(T.movementProgress),E.clearLabels(),E.addLabels(T.labels)}}}charRemoved(S){var T;if(!this.charRemoved$)throw this.createUninitializedErr();return(T=this.charRemoved$)==null?void 0:T.pipe(Us(1),ki(E=>E==S))}initGuard(){if(!this.isCreatedInternal)throw this.createUninitializedErr()}createUninitializedErr(){throw new Error("GridEngine not initialized. You need to call create() first.")}addCharacters(){var S;(S=this.config)==null||S.characters.forEach(T=>this.addCharacter(T))}moveChar(S,T){var E,w,O;this.initGuard();let D=(E=this.gridCharacters)==null?void 0:E.get(S);if(!D)throw this.createCharUnknownErr(S);if(D.getNumberOfDirections()===4){if(!((w=this.gridTilemap)!=null&&w.isIsometric())&&fn(T)){console.warn(`GridEngine: Character '${S}' can't be moved '${T}' in 4 direction mode.`);return}else if((O=this.gridTilemap)!=null&&O.isIsometric()&&!fn(T)){console.warn(`GridEngine: Character '${S}' can't be moved '${T}' in 4 direction isometric mode.`);return}}D.move(T)}createCharUnknownErr(S){return new Error(`Character unknown: ${S}`)}assembleMoveToConfig(S={}){let T=Qi(he({},S),{noPathFoundStrategy:"STOP",pathBlockedStrategy:"WAIT"});return S!=null&&S.noPathFoundStrategy&&(Object.values(Wd).includes(S.noPathFoundStrategy)?T.noPathFoundStrategy=S.noPathFoundStrategy:console.warn(`GridEngine: Unknown NoPathFoundStrategy '${S.noPathFoundStrategy}'. Falling back to 'STOP'`)),S!=null&&S.pathBlockedStrategy&&(Object.values(Yd).includes(S.pathBlockedStrategy)?T.pathBlockedStrategy=S.pathBlockedStrategy:console.warn(`GridEngine: Unknown PathBlockedStrategy '${S.pathBlockedStrategy}'. Falling back to 'WAIT'`)),T}setConfigDefaults(S){return he({collisionTilePropertyName:"ge_collide",numberOfDirections:4,characterCollisionStrategy:"BLOCK_TWO_TILES",cacheTileCollisions:!1},S)}},d2=class extends Kd{constructor(S,T={}){super(S,T),this.jumpCache=new Cf}findShortestPathImpl(S,T){return this.jumpCache=new Cf,super.findShortestPathImpl(S,T)}getNeighborsInternal(S,T,E){if(!T||S.layer!==T.layer)return this.getNeighbors(S,E).map(D=>({p:D,dist:1}));let w=this.prune(T,S).map(D=>{let c=this.getTransition(D.position,S.layer);return{position:D.position,layer:c||S.layer}}),O=[];for(let D of w){let c=this.jump(S,D,E,1,si(S.position,D.position));c&&(c.dist=this.distance(S.position,c.p.position),O.push(c))}return O}getForced(S,T){let E=[],{topLeft:w,downLeft:O,top:D,bottom:c,topRight:m,downRight:t}=this.normalizedPositions(S,T),a=si(S.position,T.position);return fn(a)?(this.blockOrTrans(S,w)&&(this.addIfNotBlocked(E,T,D),this.addIfNotBlocked(E,T,m),this.blockOrTrans(O,w)&&this.addIfNotBlocked(E,T,w)),this.blockOrTrans(S,O)&&(this.addIfNotBlocked(E,T,c),this.addIfNotBlocked(E,T,t),this.blockOrTrans(w,O)&&this.addIfNotBlocked(E,T,O)),this.blockOrTrans(w,D)&&this.addIfNotBlocked(E,T,D),this.blockOrTrans(O,c)&&this.addIfNotBlocked(E,T,c),this.blockOrTrans(w,m)&&this.addIfNotBlocked(E,T,m),this.blockOrTrans(O,t)&&this.addIfNotBlocked(E,T,t)):((this.blockOrTrans(S,D)||this.blockOrTrans(D,m))&&this.addIfNotBlocked(E,T,m),(this.blockOrTrans(S,c)||this.blockOrTrans(c,t))&&this.addIfNotBlocked(E,T,t),this.blockOrTrans(S,w)&&this.blockOrTrans(S,D)&&(this.addIfNotBlocked(E,T,D),this.addIfNotBlocked(E,T,w)),this.blockOrTrans(S,O)&&this.blockOrTrans(S,c)&&(this.addIfNotBlocked(E,T,c),this.addIfNotBlocked(E,T,O)),this.blockOrTrans(w,D)&&this.blockOrTrans(S,D)&&this.addIfNotBlocked(E,T,D),this.blockOrTrans(O,c)&&this.blockOrTrans(S,c)&&this.addIfNotBlocked(E,T,c)),E}hasForced(S,T){let{topLeft:E,downLeft:w,top:O,bottom:D,topRight:c,downRight:m}=this.normalizedPositions(S,T),t=si(S.position,T.position);if(fn(t)){if(this.blockOrTrans(S,E)&&(!this.blockOrTrans(T,O)||!this.blockOrTrans(T,c)||this.blockOrTrans(w,E)&&!this.blockOrTrans(T,E))||this.blockOrTrans(S,w)&&(!this.blockOrTrans(T,D)||!this.blockOrTrans(T,m)||this.blockOrTrans(E,w)&&!this.blockOrTrans(T,w))||this.blockOrTrans(E,O)&&!this.blockOrTrans(T,O)||this.blockOrTrans(w,D)&&!this.blockOrTrans(T,D)||this.blockOrTrans(E,c)&&!this.blockOrTrans(T,c)||this.blockOrTrans(w,m)&&!this.blockOrTrans(T,m))return!0}else if((this.blockOrTrans(S,O)||this.blockOrTrans(O,c))&&!this.blockOrTrans(T,c)||(this.blockOrTrans(S,D)||this.blockOrTrans(D,m))&&!this.blockOrTrans(T,m)||this.blockOrTrans(S,E)&&this.blockOrTrans(S,O)&&(!this.blockOrTrans(T,O)||!this.blockOrTrans(T,E))||this.blockOrTrans(S,w)&&this.blockOrTrans(S,D)&&(!this.blockOrTrans(T,D)||!this.blockOrTrans(T,w))||this.blockOrTrans(E,O)&&this.blockOrTrans(S,O)&&!this.blockOrTrans(T,O)||this.blockOrTrans(w,D)&&this.blockOrTrans(S,D)&&!this.blockOrTrans(T,D))return!0;return!1}prune(S,T){let{top:E,right:w,topRight:O,downRight:D,bottom:c}=this.normalizedPositions(S,T),m=this.getForced(S,T),t=si(S.position,T.position);return fn(t)?[E,w,O,D,c,...m]:[w,...m]}jump(S,T,E,w,O){let D=this.jumpCache.get(S,T);if(D!==null)return D;if(this.isBlocking(S,T)&&!(Ut.equal(T,E)&&this.options.ignoreBlockedTarget)){this.jumpCache.set(S,T,void 0);return}if(Ut.equal(T,E))return this.jumpCache.set(S,T,{p:T,dist:0}),{p:T,dist:0};if(w>=this.maxJumpSize)return this.jumpCache.set(S,T,{p:T,dist:0}),{p:T,dist:0};if(this.getTransition(T.position,S.layer)!==void 0)return this.jumpCache.set(S,T,{p:T,dist:0}),{p:T,dist:0};if(this.hasForced(S,T))return this.jumpCache.set(S,T,{p:T,dist:0}),{p:T,dist:0};if(this.updateClosestToTarget(T,E),O==="up-left"){if(this.jump(T,this.getTilePosInDir(T,"up"),E,w+1,"up")!==void 0)return this.jumpCache.set(S,T,{p:T,dist:0}),{p:T,dist:0};if(this.jump(T,this.getTilePosInDir(T,"left"),E,w+1,"left")!==void 0)return this.jumpCache.set(S,T,{p:T,dist:0}),{p:T,dist:0}}else if(O==="down-left"){if(this.jump(T,this.getTilePosInDir(T,"down"),E,w+1,"down")!==void 0)return this.jumpCache.set(S,T,{p:T,dist:0}),{p:T,dist:0};if(this.jump(T,this.getTilePosInDir(T,"left"),E,w+1,"left")!==void 0)return this.jumpCache.set(S,T,{p:T,dist:0}),{p:T,dist:0}}else if(O==="up-right"){if(this.jump(T,this.getTilePosInDir(T,"up"),E,w+1,"up")!==void 0)return this.jumpCache.set(S,T,{p:T,dist:0}),{p:T,dist:0};if(this.jump(T,this.getTilePosInDir(T,"right"),E,w+1,"right")!==void 0)return this.jumpCache.set(S,T,{p:T,dist:0}),{p:T,dist:0}}else if(O==="down-right"){if(this.jump(T,this.getTilePosInDir(T,"down"),E,w+1,"down")!==void 0)return this.jumpCache.set(S,T,{p:T,dist:0}),{p:T,dist:0};if(this.jump(T,this.getTilePosInDir(T,"right"),E,w+1,"right")!==void 0)return this.jumpCache.set(S,T,{p:T,dist:0}),{p:T,dist:0}}let c=this.jump(T,this.getTilePosInDir(T,O),E,w+1,O);return this.jumpCache.set(S,T,c),c}normalizedPositions(S,T){return S.position.xT.position.x&&S.position.y===T.position.y?{topLeft:{position:new ut(T.position.x+1,T.position.y+1),layer:T.layer},downLeft:{position:new ut(T.position.x+1,T.position.y-1),layer:T.layer},top:{position:new ut(T.position.x,T.position.y+1),layer:T.layer},bottom:{position:new ut(T.position.x,T.position.y-1),layer:T.layer},right:{position:new ut(T.position.x-1,T.position.y),layer:T.layer},topRight:{position:new ut(T.position.x-1,T.position.y+1),layer:T.layer},downRight:{position:new ut(T.position.x-1,T.position.y-1),layer:T.layer}}:S.position.yT.position.y&&S.position.x===T.position.x?{topLeft:{position:new ut(T.position.x-1,T.position.y+1),layer:T.layer},downLeft:{position:new ut(T.position.x+1,T.position.y+1),layer:T.layer},top:{position:new ut(T.position.x-1,T.position.y),layer:T.layer},bottom:{position:new ut(T.position.x+1,T.position.y),layer:T.layer},right:{position:new ut(T.position.x,T.position.y-1),layer:T.layer},topRight:{position:new ut(T.position.x-1,T.position.y-1),layer:T.layer},downRight:{position:new ut(T.position.x+1,T.position.y-1),layer:T.layer}}:S.position.yT.position.x?{topLeft:{position:new ut(T.position.x+1,T.position.y),layer:T.layer},downLeft:{position:new ut(T.position.x,T.position.y-1),layer:T.layer},top:{position:new ut(T.position.x+1,T.position.y+1),layer:T.layer},bottom:{position:new ut(T.position.x-1,T.position.y-1),layer:T.layer},right:{position:new ut(T.position.x-1,T.position.y+1),layer:T.layer},topRight:{position:new ut(T.position.x,T.position.y+1),layer:T.layer},downRight:{position:new ut(T.position.x-1,T.position.y),layer:T.layer}}:S.position.y>T.position.y&&S.position.x(S.SUCCESS="SUCCESS",S.NO_PATH_FOUND_MAX_RETRIES_EXCEEDED="NO_PATH_FOUND_MAX_RETRIES_EXCEEDED",S.PATH_BLOCKED_MAX_RETRIES_EXCEEDED="PATH_BLOCKED_MAX_RETRIES_EXCEEDED",S.PATH_BLOCKED="PATH_BLOCKED",S.NO_PATH_FOUND="NO_PATH_FOUND",S.PATH_BLOCKED_WAIT_TIMEOUT="PATH_BLOCKED_WAIT_TIMEOUT",S.MOVEMENT_TERMINATED="MOVEMENT_TERMINATED",S.MAX_PATH_LENGTH_REACHED="MAX_PATH_LENGTH_REACHED",S))(v2||{}),Qd=class{constructor(S,T,E,{config:w,ignoreBlockedTarget:O=!1,distance:D=0}={}){this.character=S,this.tilemap=T,this.targetPos=E,this.shortestPath=[],this.distOffset=0,this.posOnPath=0,this.stopped=!1,this.pathBlockedWaitElapsed=0,this.isPositionAllowed=()=>!0,this.shortestPathAlgorithm="BIDIRECTIONAL_SEARCH",this.maxPathLength=1/0,this.considerCosts=!1,this.ignoredChars=[],this.isBlocking=(t,a)=>t?new Hd(this.tilemap,this.getPathfindingOptions()).isBlocking(this.character.getTilePos(),{position:t,layer:a}):!0;var c,m;this.shortestPathAlgorithm=(c=w?.algorithm)!=null?c:this.shortestPathAlgorithm,this.ignoreBlockedTarget=O,this.distance=D,this.noPathFoundStrategy=w?.noPathFoundStrategy||"STOP",this.pathBlockedStrategy=w?.pathBlockedStrategy||"WAIT",this.noPathFoundRetryable=new vf(w?.noPathFoundRetryBackoffMs||200,w?.noPathFoundMaxRetries||-1,()=>{this.stop("NO_PATH_FOUND_MAX_RETRIES_EXCEEDED")}),this.pathBlockedRetryable=new vf(w?.pathBlockedRetryBackoffMs||200,w?.pathBlockedMaxRetries||-1,()=>{this.stop("PATH_BLOCKED_MAX_RETRIES_EXCEEDED")}),w!=null&&w.isPositionAllowedFn&&(this.isPositionAllowed=w.isPositionAllowedFn),w!=null&&w.maxPathLength&&(this.maxPathLength=w.maxPathLength),this.alternativeTargets=w?.alternativeTargets,this.noPathFoundAlternativeTargetsFallbackStrategy=w?.noPathFoundAlternativeTargetsFallbackStrategy,w!=null&&w.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=w?.considerCosts||!1,this.ignoreLayers=!!(w!=null&&w.ignoreLayers),this.distanceUtils=mn.create(S.getNumberOfDirections()),this.pathBlockedWaitTimeoutMs=w?.pathBlockedWaitTimeoutMs||-1,this.ignoredChars=(m=w?.ignoredChars)!=null?m:[],this.finished$=new ue,this.setCharacter(S)}setPathBlockedStrategy(S){this.pathBlockedStrategy=S}getPathBlockedStrategy(){return this.pathBlockedStrategy}setCharacter(S){this.character=S,this.noPathFoundRetryable.reset(),this.pathBlockedRetryable.reset(),this.pathBlockedWaitElapsed=0,this.calcShortestPath(),this.character.autoMovementSet().pipe(ki(T=>T!==this),Us(1)).subscribe(()=>{this.stop("MOVEMENT_TERMINATED")})}getPathfindingOptions(){return{shortestPathAlgorithm:this.shortestPathAlgorithm,pathWidth:this.character.getTileWidth(),pathHeight:this.character.getTileHeight(),numberOfDirections:this.character.getNumberOfDirections(),isPositionAllowed:this.isPositionAllowed,collisionGroups:this.character.getCollisionGroups(),ignoredChars:[this.character.getId(),...this.ignoredChars],ignoreTiles:!this.character.collidesWithTiles(),ignoreMapBounds:this.character.getIgnoreMissingTiles(),ignoreBlockedTarget:this.ignoreBlockedTarget,maxPathLength:this.maxPathLength,ignoreLayers:this.ignoreLayers,considerCosts:this.considerCosts,calculateClosestToTarget:!0}}update(S){var T,E,w,O;this.stopped||(this.noPathFound()&&(this.noPathFoundStrategy==="RETRY"?this.noPathFoundRetryable.retry(S,()=>this.calcShortestPath()):this.noPathFoundStrategy==="STOP"&&this.stop("NO_PATH_FOUND")),this.updatePosOnPath(),this.isBlocking((T=this.nextTileOnPath())==null?void 0:T.position,(E=this.character)==null?void 0:E.getNextTilePos().layer)?this.applyPathBlockedStrategy(S):this.pathBlockedWaitElapsed=0,this.hasArrived()?(this.stop("SUCCESS"),this.existsDistToTarget()&&this.turnTowardsTarget()):this.isBlocking((w=this.nextTileOnPath())==null?void 0:w.position,(O=this.character)==null?void 0:O.getNextTilePos().layer)||this.moveCharOnPath())}finishedObs(){return this.finished$}getInfo(){return{type:"Target",state:{pathAhead:this.shortestPath.slice(this.posOnPath).map(S=>Ut.fromInternal(S))},config:{algorithm:this.shortestPathAlgorithm,ignoreBlockedTarget:this.ignoreBlockedTarget,distance:this.distance,targetPos:Ut.fromInternal(this.targetPos),noPathFoundStrategy:this.noPathFoundStrategy,pathBlockedStrategy:this.pathBlockedStrategy,noPathFoundRetryBackoffMs:this.noPathFoundRetryable.getBackoffMs(),noPathFoundMaxRetries:this.noPathFoundRetryable.getMaxRetries()}}}resultToReason(S){switch(S){case"SUCCESS":return"Successfully arrived.";case"MOVEMENT_TERMINATED":return"Movement of character has been replaced before destination was reached.";case"PATH_BLOCKED":return"PathBlockedStrategy STOP: Path blocked.";case"NO_PATH_FOUND_MAX_RETRIES_EXCEEDED":return`NoPathFoundStrategy RETRY: Maximum retries of ${this.noPathFoundRetryable.getMaxRetries()} exceeded.`;case"NO_PATH_FOUND":return"NoPathFoundStrategy STOP: No path found.";case"PATH_BLOCKED_MAX_RETRIES_EXCEEDED":return`PathBlockedStrategy RETRY: Maximum retries of ${this.pathBlockedRetryable.getMaxRetries()} exceeded.`;case"PATH_BLOCKED_WAIT_TIMEOUT":return`PathBlockedStrategy WAIT: Wait timeout of ${this.pathBlockedWaitTimeoutMs}ms exceeded.`}}applyPathBlockedStrategy(S){this.pathBlockedStrategy==="RETRY"?this.pathBlockedRetryable.retry(S,()=>{let T=this.getShortestPath();T.path.length>0&&this.calcShortestPath(T)}):this.pathBlockedStrategy==="STOP"?this.stop("PATH_BLOCKED"):this.pathBlockedStrategy==="WAIT"&&this.pathBlockedWaitTimeoutMs>-1&&(this.pathBlockedWaitElapsed+=S,this.pathBlockedWaitElapsed>=this.pathBlockedWaitTimeoutMs&&this.stop("PATH_BLOCKED_WAIT_TIMEOUT"))}moveCharOnPath(){let S=this.nextTileOnPath();if(!S)return;let T=this.getDir(this.character.getNextTilePos().position,S.position);this.character.move(T)}nextTileOnPath(){return this.shortestPath[this.posOnPath+1]}stop(S){this.finished$.next({position:this.character.getTilePos().position,result:S,description:this.resultToReason(S),layer:this.character.getTilePos().layer}),this.finished$.complete(),this.stopped=!0}turnTowardsTarget(){let S=this.shortestPath[this.posOnPath+1],T=this.getDir(this.character.getNextTilePos().position,S.position);this.character.turnTowards(T)}existsDistToTarget(){return this.posOnPath=this.shortestPath.length-1}updatePosOnPath(){let S=this.shortestPath[this.posOnPath];for(;this.posOnPath0)return{path:D,distOffset:c}}return this.noPathFoundStrategy=this.noPathFoundAlternativeTargetsFallbackStrategy||"STOP",this.getShortestPath()}}return{path:E,distOffset:0}}pathToAlternativeTarget(S,T){let E=T.findShortestPath(this.character.getNextTilePos(),S,this.getPathfindingOptions()).path,w=this.distanceUtils.distance(S.position,this.targetPos.position);return{path:E,distOffset:w}}getDir(S,T){return this.tilemap.fromMapDirection(this.distanceUtils.direction(S,T))}},p2=Object.create,kd=Object.defineProperty,g2=Object.getOwnPropertyDescriptor,m2=Object.getOwnPropertyNames,y2=Object.getPrototypeOf,x2=Object.prototype.hasOwnProperty,T2=(S,T)=>()=>(T||S((T={exports:{}}).exports,T),T.exports),S2=(S,T,E,w)=>{if(T&&typeof T=="object"||typeof T=="function")for(let O of m2(T))!x2.call(S,O)&&O!==E&&kd(S,O,{get:()=>T[O],enumerable:!(w=g2(T,O))||w.enumerable});return S},dh=(S,T,E)=>(E=S!=null?p2(y2(S)):{},S2(T||!S||!S.__esModule?kd(E,"default",{value:S,enumerable:!0}):E,S)),ch=T2((S,T)=>{(function(){var E,w="4.17.21",O=200,D="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",c="Expected a function",m="Invalid `variable` option passed into `_.template`",t="__lodash_hash_undefined__",a=500,v="__lodash_placeholder__",o=1,r=2,n=4,e=1,i=2,h=1,s=2,l=4,f=8,u=16,d=32,p=64,g=128,x=256,y=512,C=30,P="...",M=800,R=16,I=1,L=2,B=3,N=1/0,G=9007199254740991,V=17976931348623157e292,K=NaN,j=4294967295,J=j-1,X=j>>>1,Y=[["ary",g],["bind",h],["bindKey",s],["curry",f],["curryRight",u],["flip",y],["partial",d],["partialRight",p],["rearg",x]],b="[object Arguments]",z="[object Array]",W="[object AsyncFunction]",H="[object Boolean]",Z="[object Date]",Q="[object DOMException]",k="[object Error]",et="[object Function]",st="[object GeneratorFunction]",rt="[object Map]",ot="[object Number]",ft="[object Null]",at="[object Object]",vt="[object Promise]",At="[object Proxy]",Et="[object RegExp]",Pt="[object Set]",ct="[object String]",Ct="[object Symbol]",pt="[object Undefined]",wt="[object WeakMap]",Bt="[object WeakSet]",jt="[object ArrayBuffer]",zt="[object DataView]",Yt="[object Float32Array]",bt="[object Float64Array]",re="[object Int8Array]",Qt="[object Int16Array]",de="[object Int32Array]",ve="[object Uint8Array]",Ae="[object Uint8ClampedArray]",hi="[object Uint16Array]",li="[object Uint32Array]",Si=/\b__p \+= '';/g,Ci=/\b(__p \+=) '' \+/g,Ei=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Sh=/&(?:amp|lt|gt|quot|#39);/g,Ch=/[&<>"']/g,bc=RegExp(Sh.source),Nc=RegExp(Ch.source),Gc=/<%-([\s\S]+?)%>/g,zc=/<%([\s\S]+?)%>/g,Eh=/<%=([\s\S]+?)%>/g,Uc=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Xc=/^\w*$/,Vc=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ra=/[\\^$.*+?()[\]{}|]/g,Wc=RegExp(ra.source),aa=/^\s+/,Yc=/\s/,Hc=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Kc=/\{\n\/\* \[wrapped with (.+)\] \*/,jc=/,? & /,$c=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Zc=/[()=,{}\[\]\/\s]/,Jc=/\\(\\)?/g,Qc=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ph=/\w*$/,kc=/^[-+]0x[0-9a-f]+$/i,qc=/^0b[01]+$/i,_c=/^\[object .+?Constructor\]$/,tv=/^0o[0-7]+$/i,ev=/^(?:0|[1-9]\d*)$/,iv=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,En=/($^)/,sv=/['\n\r\u2028\u2029\\]/g,Pn="\\ud800-\\udfff",nv="\\u0300-\\u036f",rv="\\ufe20-\\ufe2f",av="\\u20d0-\\u20ff",Ah=nv+rv+av,Mh="\\u2700-\\u27bf",wh="a-z\\xdf-\\xf6\\xf8-\\xff",ov="\\xac\\xb1\\xd7\\xf7",hv="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",lv="\\u2000-\\u206f",uv=" \\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",Rh="A-Z\\xc0-\\xd6\\xd8-\\xde",Fh="\\ufe0e\\ufe0f",Lh=ov+hv+lv+uv,oa="['’]",fv="["+Pn+"]",Oh="["+Lh+"]",An="["+Ah+"]",Dh="\\d+",dv="["+Mh+"]",Ih="["+wh+"]",Bh="[^"+Pn+Lh+Dh+Mh+wh+Rh+"]",ha="\\ud83c[\\udffb-\\udfff]",cv="(?:"+An+"|"+ha+")",bh="[^"+Pn+"]",la="(?:\\ud83c[\\udde6-\\uddff]){2}",ua="[\\ud800-\\udbff][\\udc00-\\udfff]",ms="["+Rh+"]",Nh="\\u200d",Gh="(?:"+Ih+"|"+Bh+")",vv="(?:"+ms+"|"+Bh+")",zh="(?:"+oa+"(?:d|ll|m|re|s|t|ve))?",Uh="(?:"+oa+"(?:D|LL|M|RE|S|T|VE))?",Xh=cv+"?",Vh="["+Fh+"]?",pv="(?:"+Nh+"(?:"+[bh,la,ua].join("|")+")"+Vh+Xh+")*",gv="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",mv="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Wh=Vh+Xh+pv,yv="(?:"+[dv,la,ua].join("|")+")"+Wh,xv="(?:"+[bh+An+"?",An,la,ua,fv].join("|")+")",Tv=RegExp(oa,"g"),Sv=RegExp(An,"g"),fa=RegExp(ha+"(?="+ha+")|"+xv+Wh,"g"),Cv=RegExp([ms+"?"+Ih+"+"+zh+"(?="+[Oh,ms,"$"].join("|")+")",vv+"+"+Uh+"(?="+[Oh,ms+Gh,"$"].join("|")+")",ms+"?"+Gh+"+"+zh,ms+"+"+Uh,mv,gv,Dh,yv].join("|"),"g"),Ev=RegExp("["+Nh+Pn+Ah+Fh+"]"),Pv=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Av=["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"],Mv=-1,ae={};ae[Yt]=ae[bt]=ae[re]=ae[Qt]=ae[de]=ae[ve]=ae[Ae]=ae[hi]=ae[li]=!0,ae[b]=ae[z]=ae[jt]=ae[H]=ae[zt]=ae[Z]=ae[k]=ae[et]=ae[rt]=ae[ot]=ae[at]=ae[Et]=ae[Pt]=ae[ct]=ae[wt]=!1;var se={};se[b]=se[z]=se[jt]=se[zt]=se[H]=se[Z]=se[Yt]=se[bt]=se[re]=se[Qt]=se[de]=se[rt]=se[ot]=se[at]=se[Et]=se[Pt]=se[ct]=se[Ct]=se[ve]=se[Ae]=se[hi]=se[li]=!0,se[k]=se[et]=se[wt]=!1;var wv={À:"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"},Rv={"&":"&","<":"<",">":">",'"':""","'":"'"},Fv={"&":"&","<":"<",">":">",""":'"',"'":"'"},Lv={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ov=parseFloat,Dv=parseInt,Yh=typeof global=="object"&&global&&global.Object===Object&&global,Iv=typeof self=="object"&&self&&self.Object===Object&&self,Ce=Yh||Iv||Function("return this")(),da=typeof S=="object"&&S&&!S.nodeType&&S,_i=da&&typeof T=="object"&&T&&!T.nodeType&&T,Hh=_i&&_i.exports===da,ca=Hh&&Yh.process,Ze=function(){try{var ht=_i&&_i.require&&_i.require("util").types;return ht||ca&&ca.binding&&ca.binding("util")}catch{}}(),Kh=Ze&&Ze.isArrayBuffer,jh=Ze&&Ze.isDate,$h=Ze&&Ze.isMap,Zh=Ze&&Ze.isRegExp,Jh=Ze&&Ze.isSet,Qh=Ze&&Ze.isTypedArray;function Xe(ht,gt,dt){switch(dt.length){case 0:return ht.call(gt);case 1:return ht.call(gt,dt[0]);case 2:return ht.call(gt,dt[0],dt[1]);case 3:return ht.call(gt,dt[0],dt[1],dt[2])}return ht.apply(gt,dt)}function Bv(ht,gt,dt,Rt){for(var Nt=-1,kt=ht==null?0:ht.length;++Nt-1}function va(ht,gt,dt){for(var Rt=-1,Nt=ht==null?0:ht.length;++Rt-1;);return dt}function nl(ht,gt){for(var dt=ht.length;dt--&&ys(gt,ht[dt],0)>-1;);return dt}function Yv(ht,gt){for(var dt=ht.length,Rt=0;dt--;)ht[dt]===gt&&++Rt;return Rt}var Hv=ya(wv),Kv=ya(Rv);function jv(ht){return"\\"+Lv[ht]}function $v(ht,gt){return ht==null?E:ht[gt]}function xs(ht){return Ev.test(ht)}function Zv(ht){return Pv.test(ht)}function Jv(ht){for(var gt,dt=[];!(gt=ht.next()).done;)dt.push(gt.value);return dt}function Ca(ht){var gt=-1,dt=Array(ht.size);return ht.forEach(function(Rt,Nt){dt[++gt]=[Nt,Rt]}),dt}function rl(ht,gt){return function(dt){return ht(gt(dt))}}function zi(ht,gt){for(var dt=-1,Rt=ht.length,Nt=0,kt=[];++dt-1}function Np(A,F){var U=this.__data__,$=Yn(U,A);return $<0?(++this.size,U.push([A,F])):U[$][1]=F,this}Pi.prototype.clear=Dp,Pi.prototype.delete=Ip,Pi.prototype.get=Bp,Pi.prototype.has=bp,Pi.prototype.set=Np;function Ai(A){var F=-1,U=A==null?0:A.length;for(this.clear();++F=F?A:F)),A}function qe(A,F,U,$,q,tt){var it,nt=F&o,lt=F&r,mt=F&n;if(U&&(it=q?U(A,$,q,tt):U(A)),it!==E)return it;if(!le(A))return A;var yt=Gt(A);if(yt){if(it=X0(A),!nt)return be(A,it)}else{var Tt=Le(A),Mt=Tt==et||Tt==st;if(Ki(A))return Vl(A,nt);if(Tt==at||Tt==b||Mt&&!q){if(it=lt||Mt?{}:au(A),!nt)return lt?F0(A,qp(it,A)):R0(A,ml(it,A))}else{if(!se[Tt])return q?A:{};it=V0(A,Tt,nt)}}tt||(tt=new fi);var Ft=tt.get(A);if(Ft)return Ft;tt.set(A,it),bu(A)?A.forEach(function(It){it.add(qe(It,F,U,It,A,tt))}):Iu(A)&&A.forEach(function(It,Ht){it.set(Ht,qe(It,F,U,Ht,A,tt))});var Dt=mt?lt?Za:$a:lt?Ge:Ee,Vt=yt?E:Dt(A);return Je(Vt||A,function(It,Ht){Vt&&(Ht=It,It=A[Ht]),Zs(it,Ht,qe(It,F,U,Ht,A,tt))}),it}function _p(A){var F=Ee(A);return function(U){return yl(U,A,F)}}function yl(A,F,U){var $=U.length;if(A==null)return!$;for(A=ie(A);$--;){var q=U[$],tt=F[q],it=A[q];if(it===E&&!(q in A)||!tt(it))return!1}return!0}function xl(A,F,U){if(typeof A!="function")throw new Qe(c);return en(function(){A.apply(E,U)},F)}function Js(A,F,U,$){var q=-1,tt=Mn,it=!0,nt=A.length,lt=[],mt=F.length;if(!nt)return lt;U&&(F=oe(F,Ve(U))),$?(tt=va,it=!1):F.length>=O&&(tt=Ws,it=!1,F=new is(F));t:for(;++qq?0:q+U),$=$===E||$>q?q:Xt($),$<0&&($+=q),$=U>$?0:Gu($);U<$;)A[U++]=F;return A}function Sl(A,F){var U=[];return Vi(A,function($,q,tt){F($,q,tt)&&U.push($)}),U}function Me(A,F,U,$,q){var tt=-1,it=A.length;for(U||(U=Y0),q||(q=[]);++tt0&&U(nt)?F>1?Me(nt,F-1,U,$,q):Gi(q,nt):$||(q[q.length]=nt)}return q}var Fa=$l(),Cl=$l(!0);function pi(A,F){return A&&Fa(A,F,Ee)}function La(A,F){return A&&Cl(A,F,Ee)}function Kn(A,F){return Ni(F,function(U){return Li(A[U])})}function ns(A,F){F=Yi(F,A);for(var U=0,$=F.length;A!=null&&U<$;)A=A[mi(F[U++])];return U&&U==$?A:E}function El(A,F,U){var $=F(A);return Gt(A)?$:Gi($,U(A))}function De(A){return A==null?A===E?pt:ft:ts&&ts in ie(A)?G0(A):Q0(A)}function Oa(A,F){return A>F}function i0(A,F){return A!=null&&_t.call(A,F)}function s0(A,F){return A!=null&&F in ie(A)}function n0(A,F,U){return A>=Fe(F,U)&&A=120&&yt.length>=120)?new is(it&&yt):E}yt=A[0];var Tt=-1,Mt=nt[0];t:for(;++Tt-1;)nt!==A&&Nn.call(nt,lt,1),Nn.call(A,lt,1);return A}function Il(A,F){for(var U=A?F.length:0,$=U-1;U--;){var q=F[U];if(U==$||q!==tt){var tt=q;Fi(q)?Nn.call(A,q,1):Xa(A,q)}}return A}function Ga(A,F){return A+Un(cl()*(F-A+1))}function m0(A,F,U,$){for(var q=-1,tt=Te(zn((F-A)/(U||1)),0),it=dt(tt);tt--;)it[$?tt:++q]=A,A+=U;return it}function za(A,F){var U="";if(!A||F<1||F>G)return U;do F%2&&(U+=A),F=Un(F/2),F&&(A+=A);while(F);return U}function Wt(A,F){return eo(lu(A,F,ze),A+"")}function y0(A){return gl(Fs(A))}function x0(A,F){var U=Fs(A);return ir(U,ss(F,0,U.length))}function qs(A,F,U,$){if(!le(A))return A;F=Yi(F,A);for(var q=-1,tt=F.length,it=tt-1,nt=A;nt!=null&&++qq?0:q+F),U=U>q?q:U,U<0&&(U+=q),q=F>U?0:U-F>>>0,F>>>=0;for(var tt=dt(q);++$>>1,it=A[tt];it!==null&&!Ye(it)&&(U?it<=F:it=O){var mt=F?null:I0(A);if(mt)return Rn(mt);it=!1,q=Ws,lt=new is}else lt=F?[]:nt;t:for(;++$=$?A:_e(A,F,U)}var Xl=up||function(A){return Ce.clearTimeout(A)};function Vl(A,F){if(F)return A.slice();var U=A.length,$=hl?hl(U):new A.constructor(U);return A.copy($),$}function Ha(A){var F=new A.constructor(A.byteLength);return new Bn(F).set(new Bn(A)),F}function P0(A,F){var U=F?Ha(A.buffer):A.buffer;return new A.constructor(U,A.byteOffset,A.byteLength)}function A0(A){var F=new A.constructor(A.source,Ph.exec(A));return F.lastIndex=A.lastIndex,F}function M0(A){return $s?ie($s.call(A)):{}}function Wl(A,F){var U=F?Ha(A.buffer):A.buffer;return new A.constructor(U,A.byteOffset,A.length)}function Yl(A,F){if(A!==F){var U=A!==E,$=A===null,q=A===A,tt=Ye(A),it=F!==E,nt=F===null,lt=F===F,mt=Ye(F);if(!nt&&!mt&&!tt&&A>F||tt&&it&<&&!nt&&!mt||$&&it&<||!U&<||!q)return 1;if(!$&&!tt&&!mt&&A=nt)return lt;var mt=U[$];return lt*(mt=="desc"?-1:1)}}return A.index-F.index}function Hl(A,F,U,$){for(var q=-1,tt=A.length,it=U.length,nt=-1,lt=F.length,mt=Te(tt-it,0),yt=dt(lt+mt),Tt=!$;++nt1?U[q-1]:E,it=q>2?U[2]:E;for(tt=A.length>3&&typeof tt=="function"?(q--,tt):E,it&&Ie(U[0],U[1],it)&&(tt=q<3?E:tt,q=1),F=ie(F);++$-1?q[tt?F[it]:it]:E}}function Ql(A){return Ri(function(F){var U=F.length,$=U,q=ke.prototype.thru;for(A&&F.reverse();$--;){var tt=F[$];if(typeof tt!="function")throw new Qe(c);if(q&&!it&&tr(tt)=="wrapper")var it=new ke([],!0)}for($=it?$:U;++$1&&$t.reverse(),yt&<nt))return!1;var mt=tt.get(A),yt=tt.get(F);if(mt&&yt)return mt==F&&yt==A;var Tt=-1,Mt=!0,Ft=U&i?new is:E;for(tt.set(A,F),tt.set(F,A);++Tt1?"& ":"")+F[$],F=F.join(U>2?", ":" "),A.replace(Hc,`{ -/* [wrapped with `+F+`] */ -`)}function Y0(A){return Gt(A)||os(A)||!!(fl&&A&&A[fl])}function Fi(A,F){var U=typeof A;return F=F??G,!!F&&(U=="number"||U!="symbol"&&ev.test(A))&&A>-1&&A%1==0&&A0){if(++F>=M)return arguments[0]}else F=0;return A.apply(E,arguments)}}function ir(A,F){var U=-1,$=A.length,q=$-1;for(F=F===E?$:F;++U1?A[F-1]:E;return U=typeof U=="function"?(A.pop(),U):E,Su(A,U)});function Cu(A){var F=_(A);return F.__chain__=!0,F}function tm(A,F){return F(A),A}function sr(A,F){return F(A)}var em=Ri(function(A){var F=A.length,U=F?A[0]:0,$=this.__wrapped__,q=function(tt){return Ra(tt,A)};return F>1||this.__actions__.length||!($ instanceof Kt)||!Fi(U)?this.thru(q):($=$.slice(U,+U+(F?1:0)),$.__actions__.push({func:sr,args:[q],thisArg:E}),new ke($,this.__chain__).thru(function(tt){return F&&!tt.length&&tt.push(E),tt}))});function im(){return Cu(this)}function sm(){return new ke(this.value(),this.__chain__)}function nm(){this.__values__===E&&(this.__values__=Nu(this.value()));var A=this.__index__>=this.__values__.length,F=A?E:this.__values__[this.__index__++];return{done:A,value:F}}function rm(){return this}function am(A){for(var F,U=this;U instanceof Wn;){var $=pu(U);$.__index__=0,$.__values__=E,F?q.__wrapped__=$:F=$;var q=$;U=U.__wrapped__}return q.__wrapped__=A,F}function om(){var A=this.__wrapped__;if(A instanceof Kt){var F=A;return this.__actions__.length&&(F=new Kt(this)),F=F.reverse(),F.__actions__.push({func:sr,args:[io],thisArg:E}),new ke(F,this.__chain__)}return this.thru(io)}function hm(){return zl(this.__wrapped__,this.__actions__)}var lm=Jn(function(A,F,U){_t.call(A,U)?++A[U]:Mi(A,U,1)});function um(A,F,U){var $=Gt(A)?kh:t0;return U&&Ie(A,F,U)&&(F=E),$(A,Ot(F,3))}function fm(A,F){var U=Gt(A)?Ni:Sl;return U(A,Ot(F,3))}var dm=Jl(gu),cm=Jl(mu);function vm(A,F){return Me(nr(A,F),1)}function pm(A,F){return Me(nr(A,F),N)}function gm(A,F,U){return U=U===E?1:Xt(U),Me(nr(A,F),U)}function Eu(A,F){var U=Gt(A)?Je:Vi;return U(A,Ot(F,3))}function Pu(A,F){var U=Gt(A)?bv:Tl;return U(A,Ot(F,3))}var mm=Jn(function(A,F,U){_t.call(A,U)?A[U].push(F):Mi(A,U,[F])});function ym(A,F,U,$){A=Ne(A)?A:Fs(A),U=U&&!$?Xt(U):0;var q=A.length;return U<0&&(U=Te(q+U,0)),lr(A)?U<=q&&A.indexOf(F,U)>-1:!!q&&ys(A,F,U)>-1}var xm=Wt(function(A,F,U){var $=-1,q=typeof F=="function",tt=Ne(A)?dt(A.length):[];return Vi(A,function(it){tt[++$]=q?Xe(F,it,U):Qs(it,F,U)}),tt}),Tm=Jn(function(A,F,U){Mi(A,U,F)});function nr(A,F){var U=Gt(A)?oe:wl;return U(A,Ot(F,3))}function Sm(A,F,U,$){return A==null?[]:(Gt(F)||(F=F==null?[]:[F]),U=$?E:U,Gt(U)||(U=U==null?[]:[U]),Ol(A,F,U))}var Cm=Jn(function(A,F,U){A[U?0:1].push(F)},function(){return[[],[]]});function Em(A,F,U){var $=Gt(A)?pa:el,q=arguments.length<3;return $(A,Ot(F,4),U,q,Vi)}function Pm(A,F,U){var $=Gt(A)?Nv:el,q=arguments.length<3;return $(A,Ot(F,4),U,q,Tl)}function Am(A,F){var U=Gt(A)?Ni:Sl;return U(A,or(Ot(F,3)))}function Mm(A){var F=Gt(A)?gl:y0;return F(A)}function wm(A,F,U){(U?Ie(A,F,U):F===E)?F=1:F=Xt(F);var $=Gt(A)?Jp:x0;return $(A,F)}function Rm(A){var F=Gt(A)?Qp:S0;return F(A)}function Fm(A){if(A==null)return 0;if(Ne(A))return lr(A)?Ts(A):A.length;var F=Le(A);return F==rt||F==Pt?A.size:Ba(A).length}function Lm(A,F,U){var $=Gt(A)?ga:C0;return U&&Ie(A,F,U)&&(F=E),$(A,Ot(F,3))}var Om=Wt(function(A,F){if(A==null)return[];var U=F.length;return U>1&&Ie(A,F[0],F[1])?F=[]:U>2&&Ie(F[0],F[1],F[2])&&(F=[F[0]]),Ol(A,Me(F,1),[])}),rr=fp||function(){return Ce.Date.now()};function Dm(A,F){if(typeof F!="function")throw new Qe(c);return A=Xt(A),function(){if(--A<1)return F.apply(this,arguments)}}function Au(A,F,U){return F=U?E:F,F=A&&F==null?A.length:F,wi(A,g,E,E,E,E,F)}function Mu(A,F){var U;if(typeof F!="function")throw new Qe(c);return A=Xt(A),function(){return--A>0&&(U=F.apply(this,arguments)),A<=1&&(F=E),U}}var no=Wt(function(A,F,U){var $=h;if(U.length){var q=zi(U,ws(no));$|=d}return wi(A,$,F,U,q)}),wu=Wt(function(A,F,U){var $=h|s;if(U.length){var q=zi(U,ws(wu));$|=d}return wi(F,$,A,U,q)});function Ru(A,F,U){F=U?E:F;var $=wi(A,f,E,E,E,E,E,F);return $.placeholder=Ru.placeholder,$}function Fu(A,F,U){F=U?E:F;var $=wi(A,u,E,E,E,E,E,F);return $.placeholder=Fu.placeholder,$}function Lu(A,F,U){var $,q,tt,it,nt,lt,mt=0,yt=!1,Tt=!1,Mt=!0;if(typeof A!="function")throw new Qe(c);F=ei(F)||0,le(U)&&(yt=!!U.leading,Tt="maxWait"in U,tt=Tt?Te(ei(U.maxWait)||0,F):tt,Mt="trailing"in U?!!U.trailing:Mt);function Ft(ge){var ci=$,Di=q;return $=q=E,mt=ge,it=A.apply(Di,ci),it}function Dt(ge){return mt=ge,nt=en(Ht,F),yt?Ft(ge):it}function Vt(ge){var ci=ge-lt,Di=ge-mt,Ju=F-ci;return Tt?Fe(Ju,tt-Di):Ju}function It(ge){var ci=ge-lt,Di=ge-mt;return lt===E||ci>=F||ci<0||Tt&&Di>=tt}function Ht(){var ge=rr();if(It(ge))return $t(ge);nt=en(Ht,Vt(ge))}function $t(ge){return nt=E,Mt&&$?Ft(ge):($=q=E,it)}function He(){nt!==E&&Xl(nt),mt=0,$=lt=q=nt=E}function Be(){return nt===E?it:$t(rr())}function Ke(){var ge=rr(),ci=It(ge);if($=arguments,q=this,lt=ge,ci){if(nt===E)return Dt(lt);if(Tt)return Xl(nt),nt=en(Ht,F),Ft(lt)}return nt===E&&(nt=en(Ht,F)),it}return Ke.cancel=He,Ke.flush=Be,Ke}var Im=Wt(function(A,F){return xl(A,1,F)}),Bm=Wt(function(A,F,U){return xl(A,ei(F)||0,U)});function bm(A){return wi(A,y)}function ar(A,F){if(typeof A!="function"||F!=null&&typeof F!="function")throw new Qe(c);var U=function(){var $=arguments,q=F?F.apply(this,$):$[0],tt=U.cache;if(tt.has(q))return tt.get(q);var it=A.apply(this,$);return U.cache=tt.set(q,it)||tt,it};return U.cache=new(ar.Cache||Ai),U}ar.Cache=Ai;function or(A){if(typeof A!="function")throw new Qe(c);return function(){var F=arguments;switch(F.length){case 0:return!A.call(this);case 1:return!A.call(this,F[0]);case 2:return!A.call(this,F[0],F[1]);case 3:return!A.call(this,F[0],F[1],F[2])}return!A.apply(this,F)}}function Nm(A){return Mu(2,A)}var Gm=E0(function(A,F){F=F.length==1&&Gt(F[0])?oe(F[0],Ve(Ot())):oe(Me(F,1),Ve(Ot()));var U=F.length;return Wt(function($){for(var q=-1,tt=Fe($.length,U);++q=F}),os=Pl(function(){return arguments}())?Pl:function(A){return ce(A)&&_t.call(A,"callee")&&!ul.call(A,"callee")},Gt=dt.isArray,qm=Kh?Ve(Kh):a0;function Ne(A){return A!=null&&hr(A.length)&&!Li(A)}function pe(A){return ce(A)&&Ne(A)}function _m(A){return A===!0||A===!1||ce(A)&&De(A)==H}var Ki=cp||mo,ty=jh?Ve(jh):o0;function ey(A){return ce(A)&&A.nodeType===1&&!sn(A)}function iy(A){if(A==null)return!0;if(Ne(A)&&(Gt(A)||typeof A=="string"||typeof A.splice=="function"||Ki(A)||Rs(A)||os(A)))return!A.length;var F=Le(A);if(F==rt||F==Pt)return!A.size;if(tn(A))return!Ba(A).length;for(var U in A)if(_t.call(A,U))return!1;return!0}function sy(A,F){return ks(A,F)}function ny(A,F,U){U=typeof U=="function"?U:E;var $=U?U(A,F):E;return $===E?ks(A,F,E,U):!!$}function ao(A){if(!ce(A))return!1;var F=De(A);return F==k||F==Q||typeof A.message=="string"&&typeof A.name=="string"&&!sn(A)}function ry(A){return typeof A=="number"&&dl(A)}function Li(A){if(!le(A))return!1;var F=De(A);return F==et||F==st||F==W||F==At}function Du(A){return typeof A=="number"&&A==Xt(A)}function hr(A){return typeof A=="number"&&A>-1&&A%1==0&&A<=G}function le(A){var F=typeof A;return A!=null&&(F=="object"||F=="function")}function ce(A){return A!=null&&typeof A=="object"}var Iu=$h?Ve($h):l0;function ay(A,F){return A===F||Ia(A,F,Qa(F))}function oy(A,F,U){return U=typeof U=="function"?U:E,Ia(A,F,Qa(F),U)}function hy(A){return Bu(A)&&A!=+A}function ly(A){if(j0(A))throw new Nt(D);return Al(A)}function uy(A){return A===null}function fy(A){return A==null}function Bu(A){return typeof A=="number"||ce(A)&&De(A)==ot}function sn(A){if(!ce(A)||De(A)!=at)return!1;var F=bn(A);if(F===null)return!0;var U=_t.call(F,"constructor")&&F.constructor;return typeof U=="function"&&U instanceof U&&On.call(U)==op}var oo=Zh?Ve(Zh):u0;function dy(A){return Du(A)&&A>=-G&&A<=G}var bu=Jh?Ve(Jh):f0;function lr(A){return typeof A=="string"||!Gt(A)&&ce(A)&&De(A)==ct}function Ye(A){return typeof A=="symbol"||ce(A)&&De(A)==Ct}var Rs=Qh?Ve(Qh):d0;function cy(A){return A===E}function vy(A){return ce(A)&&Le(A)==wt}function py(A){return ce(A)&&De(A)==Bt}var gy=_n(ba),my=_n(function(A,F){return A<=F});function Nu(A){if(!A)return[];if(Ne(A))return lr(A)?ui(A):be(A);if(Ys&&A[Ys])return Jv(A[Ys]());var F=Le(A),U=F==rt?Ca:F==Pt?Rn:Fs;return U(A)}function Oi(A){if(!A)return A===0?A:0;if(A=ei(A),A===N||A===-N){var F=A<0?-1:1;return F*V}return A===A?A:0}function Xt(A){var F=Oi(A),U=F%1;return F===F?U?F-U:F:0}function Gu(A){return A?ss(Xt(A),0,j):0}function ei(A){if(typeof A=="number")return A;if(Ye(A))return K;if(le(A)){var F=typeof A.valueOf=="function"?A.valueOf():A;A=le(F)?F+"":F}if(typeof A!="string")return A===0?A:+A;A=il(A);var U=qc.test(A);return U||tv.test(A)?Dv(A.slice(2),U?2:8):kc.test(A)?K:+A}function zu(A){return gi(A,Ge(A))}function yy(A){return A?ss(Xt(A),-G,G):A===0?A:0}function qt(A){return A==null?"":We(A)}var xy=As(function(A,F){if(tn(F)||Ne(F)){gi(F,Ee(F),A);return}for(var U in F)_t.call(F,U)&&Zs(A,U,F[U])}),Uu=As(function(A,F){gi(F,Ge(F),A)}),ur=As(function(A,F,U,$){gi(F,Ge(F),A,$)}),Ty=As(function(A,F,U,$){gi(F,Ee(F),A,$)}),Sy=Ri(Ra);function Cy(A,F){var U=Ps(A);return F==null?U:ml(U,F)}var Ey=Wt(function(A,F){A=ie(A);var U=-1,$=F.length,q=$>2?F[2]:E;for(q&&Ie(F[0],F[1],q)&&($=1);++U<$;)for(var tt=F[U],it=Ge(tt),nt=-1,lt=it.length;++nt1),tt}),gi(A,Za(A),U),$&&(U=qe(U,o|r|n,B0));for(var q=F.length;q--;)Xa(U,F[q]);return U});function Vy(A,F){return Vu(A,or(Ot(F)))}var Wy=Ri(function(A,F){return A==null?{}:p0(A,F)});function Vu(A,F){if(A==null)return{};var U=oe(Za(A),function($){return[$]});return F=Ot(F),Dl(A,U,function($,q){return F($,q[0])})}function Yy(A,F,U){F=Yi(F,A);var $=-1,q=F.length;for(q||(q=1,A=E);++$F){var $=A;A=F,F=$}if(U||A%1||F%1){var q=cl();return Fe(A+q*(F-A+Ov("1e-"+((q+"").length-1))),F)}return Ga(A,F)}var tx=Ms(function(A,F,U){return F=F.toLowerCase(),A+(U?Hu(F):F)});function Hu(A){return uo(qt(A).toLowerCase())}function Ku(A){return A=qt(A),A&&A.replace(iv,Hv).replace(Sv,"")}function ex(A,F,U){A=qt(A),F=We(F);var $=A.length;U=U===E?$:ss(Xt(U),0,$);var q=U;return U-=F.length,U>=0&&A.slice(U,q)==F}function ix(A){return A=qt(A),A&&Nc.test(A)?A.replace(Ch,Kv):A}function sx(A){return A=qt(A),A&&Wc.test(A)?A.replace(ra,"\\$&"):A}var nx=Ms(function(A,F,U){return A+(U?"-":"")+F.toLowerCase()}),rx=Ms(function(A,F,U){return A+(U?" ":"")+F.toLowerCase()}),ax=Zl("toLowerCase");function ox(A,F,U){A=qt(A),F=Xt(F);var $=F?Ts(A):0;if(!F||$>=F)return A;var q=(F-$)/2;return qn(Un(q),U)+A+qn(zn(q),U)}function hx(A,F,U){A=qt(A),F=Xt(F);var $=F?Ts(A):0;return F&&$>>0,U?(A=qt(A),A&&(typeof F=="string"||F!=null&&!oo(F))&&(F=We(F),!F&&xs(A))?Hi(ui(A),0,U):A.split(F,U)):[]}var px=Ms(function(A,F,U){return A+(U?" ":"")+uo(F)});function gx(A,F,U){return A=qt(A),U=U==null?0:ss(Xt(U),0,A.length),F=We(F),A.slice(U,U+F.length)==F}function mx(A,F,U){var $=_.templateSettings;U&&Ie(A,F,U)&&(F=E),A=qt(A),F=ur({},F,$,eu);var q=ur({},F.imports,$.imports,eu),tt=Ee(q),it=Sa(q,tt),nt,lt,mt=0,yt=F.interpolate||En,Tt="__p += '",Mt=Ea((F.escape||En).source+"|"+yt.source+"|"+(yt===Eh?Qc:En).source+"|"+(F.evaluate||En).source+"|$","g"),Ft="//# sourceURL="+(_t.call(F,"sourceURL")?(F.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Mv+"]")+` -`;A.replace(Mt,function(It,Ht,$t,He,Be,Ke){return $t||($t=He),Tt+=A.slice(mt,Ke).replace(sv,jv),Ht&&(nt=!0,Tt+=`' + -__e(`+Ht+`) + -'`),Be&&(lt=!0,Tt+=`'; -`+Be+`; -__p += '`),$t&&(Tt+=`' + -((__t = (`+$t+`)) == null ? '' : __t) + -'`),mt=Ke+It.length,It}),Tt+=`'; -`;var Dt=_t.call(F,"variable")&&F.variable;if(!Dt)Tt=`with (obj) { -`+Tt+` -} -`;else if(Zc.test(Dt))throw new Nt(m);Tt=(lt?Tt.replace(Si,""):Tt).replace(Ci,"$1").replace(Ei,"$1;"),Tt="function("+(Dt||"obj")+`) { -`+(Dt?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(nt?", __e = _.escape":"")+(lt?`, __j = Array.prototype.join; -function print() { __p += __j.call(arguments, '') } -`:`; -`)+Tt+`return __p -}`;var Vt=$u(function(){return kt(tt,Ft+"return "+Tt).apply(E,it)});if(Vt.source=Tt,ao(Vt))throw Vt;return Vt}function yx(A){return qt(A).toLowerCase()}function xx(A){return qt(A).toUpperCase()}function Tx(A,F,U){if(A=qt(A),A&&(U||F===E))return il(A);if(!A||!(F=We(F)))return A;var $=ui(A),q=ui(F),tt=sl($,q),it=nl($,q)+1;return Hi($,tt,it).join("")}function Sx(A,F,U){if(A=qt(A),A&&(U||F===E))return A.slice(0,al(A)+1);if(!A||!(F=We(F)))return A;var $=ui(A),q=nl($,ui(F))+1;return Hi($,0,q).join("")}function Cx(A,F,U){if(A=qt(A),A&&(U||F===E))return A.replace(aa,"");if(!A||!(F=We(F)))return A;var $=ui(A),q=sl($,ui(F));return Hi($,q).join("")}function Ex(A,F){var U=C,$=P;if(le(F)){var q="separator"in F?F.separator:q;U="length"in F?Xt(F.length):U,$="omission"in F?We(F.omission):$}A=qt(A);var tt=A.length;if(xs(A)){var it=ui(A);tt=it.length}if(U>=tt)return A;var nt=U-Ts($);if(nt<1)return $;var lt=it?Hi(it,0,nt).join(""):A.slice(0,nt);if(q===E)return lt+$;if(it&&(nt+=lt.length-nt),oo(q)){if(A.slice(nt).search(q)){var mt,yt=lt;for(q.global||(q=Ea(q.source,qt(Ph.exec(q))+"g")),q.lastIndex=0;mt=q.exec(yt);)var Tt=mt.index;lt=lt.slice(0,Tt===E?nt:Tt)}}else if(A.indexOf(We(q),nt)!=nt){var Mt=lt.lastIndexOf(q);Mt>-1&&(lt=lt.slice(0,Mt))}return lt+$}function Px(A){return A=qt(A),A&&bc.test(A)?A.replace(Sh,_v):A}var Ax=Ms(function(A,F,U){return A+(U?" ":"")+F.toUpperCase()}),uo=Zl("toUpperCase");function ju(A,F,U){return A=qt(A),F=U?E:F,F===E?Zv(A)?ip(A):Uv(A):A.match(F)||[]}var $u=Wt(function(A,F){try{return Xe(A,E,F)}catch(U){return ao(U)?U:new Nt(U)}}),Mx=Ri(function(A,F){return Je(F,function(U){U=mi(U),Mi(A,U,no(A[U],A))}),A});function wx(A){var F=A==null?0:A.length,U=Ot();return A=F?oe(A,function($){if(typeof $[1]!="function")throw new Qe(c);return[U($[0]),$[1]]}):[],Wt(function($){for(var q=-1;++qG)return[];var U=j,$=Fe(A,j);F=Ot(F),A-=j;for(var q=Ta($,F);++U0||F<0)?new Kt(U):(A<0?U=U.takeRight(-A):A&&(U=U.drop(A)),F!==E&&(F=Xt(F),U=F<0?U.dropRight(-F):U.take(F-A)),U)},Kt.prototype.takeRightWhile=function(A){return this.reverse().takeWhile(A).reverse()},Kt.prototype.toArray=function(){return this.take(j)},pi(Kt.prototype,function(A,F){var U=/^(?:filter|find|map|reject)|While$/.test(F),$=/^(?:head|last)$/.test(F),q=_[$?"take"+(F=="last"?"Right":""):F],tt=$||/^find/.test(F);q&&(_.prototype[F]=function(){var it=this.__wrapped__,nt=$?[1]:arguments,lt=it instanceof Kt,mt=nt[0],yt=lt||Gt(it),Tt=function(Ht){var $t=q.apply(_,Gi([Ht],nt));return $&&Mt?$t[0]:$t};yt&&U&&typeof mt=="function"&&mt.length!=1&&(lt=yt=!1);var Mt=this.__chain__,Ft=!!this.__actions__.length,Dt=tt&&!Mt,Vt=lt&&!Ft;if(!tt&&yt){it=Vt?it:new Kt(this);var It=A.apply(it,nt);return It.__actions__.push({func:sr,args:[Tt],thisArg:E}),new ke(It,Mt)}return Dt&&Vt?A.apply(this,nt):(It=this.thru(Tt),Dt?$?It.value()[0]:It.value():It)})}),Je(["pop","push","shift","sort","splice","unshift"],function(A){var F=Fn[A],U=/^(?:push|sort|unshift)$/.test(A)?"tap":"thru",$=/^(?:pop|shift)$/.test(A);_.prototype[A]=function(){var q=arguments;if($&&!this.__chain__){var tt=this.value();return F.apply(Gt(tt)?tt:[],q)}return this[U](function(it){return F.apply(Gt(it)?it:[],q)})}}),pi(Kt.prototype,function(A,F){var U=_[F];if(U){var $=U.name+"";_t.call(Es,$)||(Es[$]=[]),Es[$].push({name:F,func:U})}}),Es[Qn(E,s).name]=[{name:"wrapper",func:E}],Kt.prototype.clone=Pp,Kt.prototype.reverse=Ap,Kt.prototype.value=Mp,_.prototype.at=em,_.prototype.chain=im,_.prototype.commit=sm,_.prototype.next=nm,_.prototype.plant=am,_.prototype.reverse=om,_.prototype.toJSON=_.prototype.valueOf=_.prototype.value=hm,_.prototype.first=_.prototype.head,Ys&&(_.prototype[Ys]=rm),_},Ui=sp();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Ce._=Ui,define(function(){return Ui})):_i?((_i.exports=Ui)._=Ui,da._=Ui):Ce._=Ui}).call(S)}),qd=class extends Set{constructor(S,T=!1){super(S),this.valuesAsFlags=T}};function cn(S){if(S instanceof Map)return Object.fromEntries([...S.entries()].map(([T,E])=>[T,cn(E)]));if(S instanceof Set)return Array.from(S.values()).map(cn);if(S instanceof qd)return{values:[...S.values()],valuesAsFlags:S.valuesAsFlags};if(typeof S=="object"){let T={};return Object.entries(S).forEach(([E,w])=>{T[E]=cn(w)}),T}else return S}dh(ch(),1);var C2=dh(ch(),1);function ds(S,T){if(typeof S!="object")throw new Error(`Cannot merge into non-object objectToMergeWith. Received: ${JSON.stringify(S)}`);if(typeof T!="object")throw new Error(`Cannot merge using non-object objectToMergeWith. Received: ${JSON.stringify(T)}`);let E=(0,C2.cloneDeep)(S);for(let[w,O]of Object.entries(T))typeof O!="object"||O instanceof Set||E[w]===void 0?E[w]=O:E[w]=ds(E[w],O);return E}function _d(S,T){if(!(S===void 0||typeof S!="object"))for(let E of Object.keys(S)){if(E===T)return S[E];let w=S[E];if(typeof w=="object"){let O=_d(w,T);if(O!==void 0)return O}}}var Po="@composite:",E2="@inherit:",P2=class{constructor(S,T,E){this.tiledClassToMembersMap=S,this.enumNameToValuesMap=T,this.parserOptions=E,this.memoiser=new Map}flattenMembers(S,T){return this.memoiser.has(S)?{[S]:this.memoiser.get(S)}:(this.memoiser.set(S,T.reduce((E,w)=>he(he({},E),this.flattenMemberProperty(w)),{})),{[S]:this.memoiser.get(S)})}flattenMemberProperty(S){var T;let E=(T=S.propertyType)!=null?T:S.propertytype;if(S.type==="class"){if(!this.memoiser.has(E)){let D=this.tiledClassToMembersMap.get(E).reduce((c,m)=>ds(this.flattenMemberProperty(m),c),{});this.memoiser.set(E,D)}let w=this.memoiser.get(E),O=ds(w,this.flattenValue(S.value,w));return this.checkIfShouldFlatten(S.name)?O:{[S.name.replace(Po,"")]:O}}else return this.enumNameToValuesMap.has(E)?this.enumNameToValuesMap.get(E).valuesAsFlags?{[S.name]:new Set(S.value.split(",").filter(w=>w!==""))}:{[S.name]:S.value}:{[S.name]:S.value}}get memoisedFlattenedProperties(){return this.memoiser}flattenValue(S,T){return Object.entries(S).reduce((E,[w,O])=>{if(typeof O!="object")return _d(T,w)instanceof Set?ds({[w]:new Set(O.split(",").filter(D=>D!==""))},E):ds({[w]:O},E);if(this.checkIfShouldFlatten(w))return ds(this.flattenValue(O,T),E);{let D=w.replace(Po,"");return ds({[D]:this.flattenValue(O,T)},E)}},{})}checkIfShouldFlatten(S){var T;return((T=this.parserOptions)==null?void 0:T.defaultComposite)===!0?S.startsWith(E2):!S.startsWith(Po)}},Ef=dh(ch(),1),A2=class{constructor(S){this.flattener=S}flattenPropertiesOnObject(S){var T,E,w,O;return Qi(he(he({},this.flattener.memoisedFlattenedProperties.get((T=S.class)!=null?T:S.type)),(E=S.properties)==null?void 0:E.reduce((D,c)=>he(he({},D),this.flattener.flattenMemberProperty(c)),{})),{name:S.name,id:S.id,class:(O=(w=S.class)!=null?w:S.type)!=null?O:null,x:S.x,y:S.y})}flattenPropertiesOnTile(S){var T,E,w,O;return Qi(he(he({},this.flattener.memoisedFlattenedProperties.get((T=S.class)!=null?T:S.type)),(E=S.properties)==null?void 0:E.reduce((D,c)=>he(he({},D),this.flattener.flattenMemberProperty(c)),{})),{id:S.id,class:(O=(w=S.class)!=null?w:S.type)!=null?O:null})}getCustomTypesMap(){return new Map([...this.flattener.memoisedFlattenedProperties.entries()].map(([S,T])=>[S,(0,Ef.cloneDeep)(T)]))}getEnumsMap(){return new Map([...this.flattener.enumNameToValuesMap.entries()].map(([S,T])=>[S,(0,Ef.cloneDeep)(T)]))}toJSON(){return JSON.stringify({customTypes:cn(this.getCustomTypesMap()),enums:cn(this.getEnumsMap())},null,4)}};function M2(S,T){let E=new Map(S.propertyTypes.filter(D=>D.type==="enum").map(D=>[D.name,new qd(D.values,D.valuesAsFlags)])),w=new Map(S.propertyTypes.filter(D=>D.type==="class").map(D=>[D.name,D.members])),O=new P2(w,E,T);return w.forEach((D,c)=>{O.flattenMembers(c,D)}),new A2(O)}var w2={parse:M2},tc=class{constructor(S,T){this.phaserTile=S,this.tiledProject=T}getProperty(S){var T,E;let w={};if(this.tiledProject){let O=w2.parse(this.tiledProject),D=this.getType();if(D){let c=(T=O.getCustomTypesMap())==null?void 0:T.get(D);if(c)for(let[m,t]of Object.entries(c))w[m]=t}}return(E=this.phaserTile.properties[S])!=null?E:w[S]}hasProperty(S){return this.getProperty(S)!=null}getType(){var S,T;return(T=(S=this.phaserTile.tileset)==null?void 0:S.tileData[this.phaserTile.index-1])==null?void 0:T.type}},R2=class{constructor(S,T){this.phaserTilemapLayer=S,this.tiledProject=T}getName(){return this.phaserTilemapLayer.layer.name}getProperty(S){let T=this.phaserTilemapLayer.layer.properties,E=T?.find(w=>w.name==S);return E?.value}hasProperty(S){return this.getProperty(S)!=null}isCharLayer(){return this.hasProperty(yr)}getData(){return this.phaserTilemapLayer.layer.data.map(S=>S.map(T=>new tc(T,this.tiledProject)))}},F2=class{constructor(S,T){this.phaserTilemap=S,this.tiledProject=T;for(let E of this.phaserTilemap.layers)if(E.tilemapLayer==null)throw new Error(`Error initializing tilemap. Layer '${E.name}' has no 'tilemapLayer'. This can happen if you call 'createLayer' with the wrong layer ID.`)}getTileWidth(){return this.phaserTilemap.tileWidth}getTileHeight(){return this.phaserTilemap.tileHeight}getWidth(){return this.phaserTilemap.width}getHeight(){return this.phaserTilemap.height}getOrientation(){return this.phaserTilemap.orientation==Phaser.Tilemaps.Orientation.ISOMETRIC.toString()?"isometric":"orthogonal"}getLayers(){return this.phaserTilemap.layers.map(S=>new R2(S.tilemapLayer,this.tiledProject))}hasTileAt(S,T,E){return!!this.phaserTilemap.hasTileAt(S,T,E)}getTileAt(S,T,E){let w=this.phaserTilemap.getTileAt(S,T,!1,E);if(w)return new tc(w,this.tiledProject)}},ec=class Vo{constructor(T){this.scene=T,this.geHeadless=new f2(!1),this.isCreatedInternal=!1,Vo.welcomeMessagePrinted||(console.log(`Using GridEngine Phaser Plugin v${jd}`),Vo.welcomeMessagePrinted=!0),this.scene.sys.events.once("boot",this.boot,this)}boot(){this.scene.sys.events.on("update",this.update,this)}getCharLayer(T){return this.geHeadless.getCharLayer(T)}getTransition(T,E){return this.geHeadless.getTransition(T,E)}setTransition(T,E,w){this.geHeadless.setTransition(T,E,w)}create(T,E){this.geHeadless.create(new F2(T,E.tiledProject),E),this.isCreatedInternal=!0,this.gridCharacters=new Map;let w=this.setConfigDefaults(E);this.config=w,this.gridTilemap=new Xo(T),this.addCharacters()}getPosition(T){return this.geHeadless.getPosition(T)}move(T,E){this.geHeadless.move(T,E)}moveRandomly(T,E=0,w=-1){this.geHeadless.moveRandomly(T,E,w)}getMovement(T){return this.geHeadless.getMovement(T)}moveTo(T,E,w){return this.geHeadless.moveTo(T,E,w)}stopMovement(T){this.geHeadless.stopMovement(T)}setSpeed(T,E){this.geHeadless.setSpeed(T,E)}getSpeed(T){return this.geHeadless.getSpeed(T)}setContainer(T,E){var w;this.initGuard();let O=(w=this.gridCharacters)==null?void 0:w.get(T);if(!O)throw this.createCharUnknownErr(T);O.setContainer(E)}getContainer(T){var E;this.initGuard();let w=(E=this.gridCharacters)==null?void 0:E.get(T);if(!w)throw this.createCharUnknownErr(T);return w.getContainer()}getOffsetX(T){var E;this.initGuard();let w=(E=this.gridCharacters)==null?void 0:E.get(T);if(!w)throw this.createCharUnknownErr(T);return w.getOffsetX()}setOffsetX(T,E){var w;this.initGuard();let O=(w=this.gridCharacters)==null?void 0:w.get(T);if(!O)throw this.createCharUnknownErr(T);O.setOffsetX(E)}getOffsetY(T){var E;this.initGuard();let w=(E=this.gridCharacters)==null?void 0:E.get(T);if(!w)throw this.createCharUnknownErr(T);return w.getOffsetY()}setOffsetY(T,E){var w;this.initGuard();let O=(w=this.gridCharacters)==null?void 0:w.get(T);if(!O)throw this.createCharUnknownErr(T);O.setOffsetY(E)}collidesWithTiles(T){return this.geHeadless.collidesWithTiles(T)}getWalkingAnimationMapping(T){var E;this.initGuard();let w=(E=this.gridCharacters)==null?void 0:E.get(T);if(!w)throw this.createCharUnknownErr(T);let O=w.getAnimation();return O?.getWalkingAnimationMapping()}hasLayerOverlay(){var T;return this.initGuard(),!!((T=this.config)!=null&&T.layerOverlay)}setWalkingAnimationMapping(T,E){var w;this.initGuard();let O=(w=this.gridCharacters)==null?void 0:w.get(T);if(!O)throw this.createCharUnknownErr(T);let D=O.getAnimation();D?.setWalkingAnimationMapping(E)}update(T,E){if(this.isCreatedInternal&&this.gridCharacters)for(let[w,O]of this.gridCharacters)O.update(E);this.geHeadless.update(T,E)}addCharacter(T){this.geHeadless.addCharacter(T),this.addCharacterInternal(T)}hasCharacter(T){return this.geHeadless.hasCharacter(T)}removeCharacter(T){var E,w;this.initGuard();let O=(E=this.gridCharacters)==null?void 0:E.get(T);if(!O)throw this.createCharUnknownErr(T);O.destroy(),(w=this.gridCharacters)==null||w.delete(T),this.geHeadless.removeCharacter(T)}removeAllCharacters(){if(this.initGuard(),!!this.gridCharacters){for(let T of this.gridCharacters.keys())this.removeCharacter(T);this.geHeadless.removeAllCharacters()}}getAllCharacters(T){return this.geHeadless.getAllCharacters(T)}getLabels(T){return this.geHeadless.getLabels(T)}addLabels(T,E){this.geHeadless.addLabels(T,E)}removeLabels(T,E){this.geHeadless.removeLabels(T,E)}clearLabels(T){this.geHeadless.clearLabels(T)}follow(T,E,w,O){let D;w===void 0?D={distance:0,closestPointIfBlocked:!1}:typeof w=="number"?(D={distance:w,closestPointIfBlocked:!1},O&&(D.closestPointIfBlocked=!0)):D=w,this.geHeadless.follow(T,E,D)}isMoving(T){return this.geHeadless.isMoving(T)}getFacingDirection(T){return this.geHeadless.getFacingDirection(T)}getFacingPosition(T){return this.geHeadless.getFacingPosition(T)}turnTowards(T,E){var w;this.initGuard();let O=(w=this.gridCharacters)==null?void 0:w.get(T);if(!O)throw this.createCharUnknownErr(T);O.turnTowards(E),this.geHeadless.turnTowards(T,E)}getCharactersAt(T,E){return this.geHeadless.getCharactersAt(T,E)}setPosition(T,E,w){this.geHeadless.setPosition(T,E,w)}getSprite(T){var E;this.initGuard();let w=(E=this.gridCharacters)==null?void 0:E.get(T);if(!w)throw this.createCharUnknownErr(T);return w.getSprite()}setSprite(T,E){var w;this.initGuard();let O=(w=this.gridCharacters)==null?void 0:w.get(T);if(!O)throw this.createCharUnknownErr(T);E.setOrigin(0,0),O.setSprite(E)}isBlocked(T,E,w=["geDefault"]){return this.geHeadless.isBlocked(T,E,w)}isTileBlocked(T,E){return this.geHeadless.isTileBlocked(T,E)}getCollisionGroups(T){return this.geHeadless.getCollisionGroups(T)}setCollisionGroups(T,E){this.geHeadless.setCollisionGroups(T,E)}getIgnoreCollisionGroups(T){return this.geHeadless.getIgnoreCollisionGroups(T)}setIgnoreCollisionGroups(T,E){this.geHeadless.setIgnoreCollisionGroups(T,E)}getTilePosInDirection(T,E,w){return this.geHeadless.getTilePosInDirection(T,E,w)}findShortestPath(T,E,w={}){return this.geHeadless.findShortestPath(T,E,w)}steppedOn(T,E,w){return this.geHeadless.steppedOn(T,E,w)}characterShifted(){return this.geHeadless.characterShifted()}movementStarted(){return this.geHeadless.movementStarted()}movementStopped(){return this.geHeadless.movementStopped()}directionChanged(){return this.geHeadless.directionChanged()}positionChangeStarted(){return this.geHeadless.positionChangeStarted()}positionChangeFinished(){return this.geHeadless.positionChangeFinished()}getMovementProgress(T){return this.geHeadless.getMovementProgress(T)}rebuildTileCollisionCache(T,E,w,O){this.geHeadless.rebuildTileCollisionCache(T,E,w,O)}addQueueMovements(T,E,w){this.geHeadless.addQueueMovements(T,E,w)}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=>Qi(he({},T),{offsetX:this.getOffsetX(T.id),offsetY:this.getOffsetY(T.id)}))}}setState(T){if(this.geHeadless.setState(T),this.gridCharacters)for(let E of T.characters){let w=this.gridCharacters.get(E.id);w&&(w.setOffsetX(E.offsetX),w.setOffsetY(E.offsetY))}}getTileCost(T,E,w){return this.initGuard(),this.geHeadless.getTileCost(T,E,w)}setConfigDefaults(T){return he({collisionTilePropertyName:"ge_collide",numberOfDirections:4,characterCollisionStrategy:"BLOCK_TWO_TILES",layerOverlay:!1,cacheTileCollisions:!1},T)}initGuard(){if(!this.isCreatedInternal)throw this.createUninitializedErr()}createUninitializedErr(){throw new Error("GridEngine not initialized. You need to call create() first.")}addCharacters(){var T;(T=this.config)==null||T.characters.forEach(E=>this.addCharacterInternal(E))}createCharUnknownErr(T){return new Error(`Character unknown: ${T}`)}addCharacterInternal(T){var E;if(this.initGuard(),!this.gridTilemap)throw this.createUninitializedErr();if(!this.config)throw this.createUninitializedErr();let w=new jS(T,this.scene,this.gridTilemap,this.config.layerOverlay,this.geHeadless);(E=this.gridCharacters)==null||E.set(T.id,w)}};ec.welcomeMessagePrinted=!1;var L2=ec,O2=L2;/*! Bundled license information: - -tiled-property-flattener/dist/tiled_property_flattener.min.js: - (*! Bundled license information: - - lodash/lodash.js: - (** - * @license - * Lodash - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - *) - *) -*/class cs{constructor(T,E=4){this.bounds=T,this.capacity=E,this.points=[],this.divided=!1,this.cache=new Map}subdivide(){const{xMin:T,yMin:E,xMax:w,yMax:O}=this.bounds,D=(w-T)/2,c=(O-E)/2,m=T,t=E;this.northeast=new cs({xMin:m+D,xMax:m+2*D,yMin:E,yMax:t+c},this.capacity),this.northwest=new cs({xMin:T,xMax:m+D,yMin:E,yMax:t+c},this.capacity),this.southeast=new cs({xMin:m+D,xMax:m+2*D,yMin:t+c,yMax:t+2*c},this.capacity),this.southwest=new cs({xMin:T,xMax:m+D,yMin:t+c,yMax:t+2*c},this.capacity),this.divided=!0}insert(T){return this.contains(T.bounds)?this.points.length=E&&T.xMax<=O&&T.yMin>=w&&T.yMax<=D}generateCacheKey(T){const{xMin:E,xMax:w,yMin:O,yMax:D}=T;return`${E},${w},${O},${D}`}queryRange(T,E=[]){if(!this.intersects(T))return E;for(const w of this.points)this.isWithinBounds(w.bounds,T)&&E.push(w);return this.divided&&(this.northwest?.queryRange(T,E),this.northeast?.queryRange(T,E),this.southwest?.queryRange(T,E),this.southeast?.queryRange(T,E)),E}query(T,E=[]){const w=`${T.x},${T.y}`,O=this.cache.get(w);if(O)return O;if(!this.intersects({xMin:T.x,xMax:T.x,yMin:T.y,yMax:T.y}))return E;for(const D of this.points)this.isWithinRange(T,D.bounds)&&E.push(D);return this.divided&&(this.northwest?.query(T,E),this.northeast?.query(T,E),this.southwest?.query(T,E),this.southeast?.query(T,E)),this.cache.set(w,E),E}intersects(T){const{xMin:E,yMin:w,xMax:O,yMax:D}=this.bounds;return!(T.xMin>O||T.xMaxD||T.yMax=E.xMin&&T.xMin<=E.xMax&&T.yMax>=E.yMin&&T.yMin<=E.yMax}isWithinRange(T,E){return T.x>=E.xMin&&T.x<=E.xMax&&T.y>=E.yMin&&T.y<=E.yMax}}class D2{constructor(){this.events={},this.lastEmitted=new Map}on(T,E){this.events[T]||(this.events[T]=[]),this.events[T]?.push(E)}off(T,E){this.events[T]&&(this.events[T]=this.events[T]?.filter(w=>w!==E))}emit(T,E,w=0){const O=Date.now(),D=this.lastEmitted.get(T)||0;if(O-D>=w){if(!this.events[T])return;this.events[T]?.forEach(c=>c(E)),this.lastEmitted.set(T,O)}}}const Zt=new D2;function I2(S,T,E){let w=new Set([...T,void 0]);return S.listen((O,D)=>{w.has(D)&&E(O,D)})}function ic(S,T){return function(){return S.apply(T,arguments)}}const{toString:B2}=Object.prototype,{getPrototypeOf:vh}=Object,ta=(S=>T=>{const E=B2.call(T);return S[E]||(S[E]=E.slice(8,-1).toLowerCase())})(Object.create(null)),Ti=S=>(S=S.toLowerCase(),T=>ta(T)===S),ea=S=>T=>typeof T===S,{isArray:Xs}=Array,yn=ea("undefined");function b2(S){return S!==null&&!yn(S)&&S.constructor!==null&&!yn(S.constructor)&&ni(S.constructor.isBuffer)&&S.constructor.isBuffer(S)}const sc=Ti("ArrayBuffer");function N2(S){let T;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?T=ArrayBuffer.isView(S):T=S&&S.buffer&&sc(S.buffer),T}const G2=ea("string"),ni=ea("function"),nc=ea("number"),ia=S=>S!==null&&typeof S=="object",z2=S=>S===!0||S===!1,xr=S=>{if(ta(S)!=="object")return!1;const T=vh(S);return(T===null||T===Object.prototype||Object.getPrototypeOf(T)===null)&&!(Symbol.toStringTag in S)&&!(Symbol.iterator in S)},U2=Ti("Date"),X2=Ti("File"),V2=Ti("Blob"),W2=Ti("FileList"),Y2=S=>ia(S)&&ni(S.pipe),H2=S=>{let T;return S&&(typeof FormData=="function"&&S instanceof FormData||ni(S.append)&&((T=ta(S))==="formdata"||T==="object"&&ni(S.toString)&&S.toString()==="[object FormData]"))},K2=Ti("URLSearchParams"),j2=S=>S.trim?S.trim():S.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Sn(S,T,{allOwnKeys:E=!1}={}){if(S===null||typeof S>"u")return;let w,O;if(typeof S!="object"&&(S=[S]),Xs(S))for(w=0,O=S.length;w0;)if(O=E[w],T===O.toLowerCase())return O;return null}const ac=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,oc=S=>!yn(S)&&S!==ac;function Wo(){const{caseless:S}=oc(this)&&this||{},T={},E=(w,O)=>{const D=S&&rc(T,O)||O;xr(T[D])&&xr(w)?T[D]=Wo(T[D],w):xr(w)?T[D]=Wo({},w):Xs(w)?T[D]=w.slice():T[D]=w};for(let w=0,O=arguments.length;w(Sn(T,(O,D)=>{E&&ni(O)?S[D]=ic(O,E):S[D]=O},{allOwnKeys:w}),S),Z2=S=>(S.charCodeAt(0)===65279&&(S=S.slice(1)),S),J2=(S,T,E,w)=>{S.prototype=Object.create(T.prototype,w),S.prototype.constructor=S,Object.defineProperty(S,"super",{value:T.prototype}),E&&Object.assign(S.prototype,E)},Q2=(S,T,E,w)=>{let O,D,c;const m={};if(T=T||{},S==null)return T;do{for(O=Object.getOwnPropertyNames(S),D=O.length;D-- >0;)c=O[D],(!w||w(c,S,T))&&!m[c]&&(T[c]=S[c],m[c]=!0);S=E!==!1&&vh(S)}while(S&&(!E||E(S,T))&&S!==Object.prototype);return T},k2=(S,T,E)=>{S=String(S),(E===void 0||E>S.length)&&(E=S.length),E-=T.length;const w=S.indexOf(T,E);return w!==-1&&w===E},q2=S=>{if(!S)return null;if(Xs(S))return S;let T=S.length;if(!nc(T))return null;const E=new Array(T);for(;T-- >0;)E[T]=S[T];return E},_2=(S=>T=>S&&T instanceof S)(typeof Uint8Array<"u"&&vh(Uint8Array)),tC=(S,T)=>{const w=(S&&S[Symbol.iterator]).call(S);let O;for(;(O=w.next())&&!O.done;){const D=O.value;T.call(S,D[0],D[1])}},eC=(S,T)=>{let E;const w=[];for(;(E=S.exec(T))!==null;)w.push(E);return w},iC=Ti("HTMLFormElement"),sC=S=>S.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(E,w,O){return w.toUpperCase()+O}),Pf=(({hasOwnProperty:S})=>(T,E)=>S.call(T,E))(Object.prototype),nC=Ti("RegExp"),hc=(S,T)=>{const E=Object.getOwnPropertyDescriptors(S),w={};Sn(E,(O,D)=>{let c;(c=T(O,D,S))!==!1&&(w[D]=c||O)}),Object.defineProperties(S,w)},rC=S=>{hc(S,(T,E)=>{if(ni(S)&&["arguments","caller","callee"].indexOf(E)!==-1)return!1;const w=S[E];if(ni(w)){if(T.enumerable=!1,"writable"in T){T.writable=!1;return}T.set||(T.set=()=>{throw Error("Can not rewrite read-only method '"+E+"'")})}})},aC=(S,T)=>{const E={},w=O=>{O.forEach(D=>{E[D]=!0})};return Xs(S)?w(S):w(String(S).split(T)),E},oC=()=>{},hC=(S,T)=>(S=+S,Number.isFinite(S)?S:T),Ao="abcdefghijklmnopqrstuvwxyz",Af="0123456789",lc={DIGIT:Af,ALPHA:Ao,ALPHA_DIGIT:Ao+Ao.toUpperCase()+Af},lC=(S=16,T=lc.ALPHA_DIGIT)=>{let E="";const{length:w}=T;for(;S--;)E+=T[Math.random()*w|0];return E};function uC(S){return!!(S&&ni(S.append)&&S[Symbol.toStringTag]==="FormData"&&S[Symbol.iterator])}const fC=S=>{const T=new Array(10),E=(w,O)=>{if(ia(w)){if(T.indexOf(w)>=0)return;if(!("toJSON"in w)){T[O]=w;const D=Xs(w)?[]:{};return Sn(w,(c,m)=>{const t=E(c,O+1);!yn(t)&&(D[m]=t)}),T[O]=void 0,D}}return w};return E(S,0)},dC=Ti("AsyncFunction"),cC=S=>S&&(ia(S)||ni(S))&&ni(S.then)&&ni(S.catch),xt={isArray:Xs,isArrayBuffer:sc,isBuffer:b2,isFormData:H2,isArrayBufferView:N2,isString:G2,isNumber:nc,isBoolean:z2,isObject:ia,isPlainObject:xr,isUndefined:yn,isDate:U2,isFile:X2,isBlob:V2,isRegExp:nC,isFunction:ni,isStream:Y2,isURLSearchParams:K2,isTypedArray:_2,isFileList:W2,forEach:Sn,merge:Wo,extend:$2,trim:j2,stripBOM:Z2,inherits:J2,toFlatObject:Q2,kindOf:ta,kindOfTest:Ti,endsWith:k2,toArray:q2,forEachEntry:tC,matchAll:eC,isHTMLForm:iC,hasOwnProperty:Pf,hasOwnProp:Pf,reduceDescriptors:hc,freezeMethods:rC,toObjectSet:aC,toCamelCase:sC,noop:oC,toFiniteNumber:hC,findKey:rc,global:ac,isContextDefined:oc,ALPHABET:lc,generateString:lC,isSpecCompliantForm:uC,toJSONObject:fC,isAsyncFn:dC,isThenable:cC};function Jt(S,T,E,w,O){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=S,this.name="AxiosError",T&&(this.code=T),E&&(this.config=E),w&&(this.request=w),O&&(this.response=O)}xt.inherits(Jt,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:xt.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const uc=Jt.prototype,fc={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(S=>{fc[S]={value:S}});Object.defineProperties(Jt,fc);Object.defineProperty(uc,"isAxiosError",{value:!0});Jt.from=(S,T,E,w,O,D)=>{const c=Object.create(uc);return xt.toFlatObject(S,c,function(t){return t!==Error.prototype},m=>m!=="isAxiosError"),Jt.call(c,S.message,T,E,w,O),c.cause=S,c.name=S.name,D&&Object.assign(c,D),c};const vC=null;function Yo(S){return xt.isPlainObject(S)||xt.isArray(S)}function dc(S){return xt.endsWith(S,"[]")?S.slice(0,-2):S}function Mf(S,T,E){return S?S.concat(T).map(function(O,D){return O=dc(O),!E&&D?"["+O+"]":O}).join(E?".":""):T}function pC(S){return xt.isArray(S)&&!S.some(Yo)}const gC=xt.toFlatObject(xt,{},null,function(T){return/^is[A-Z]/.test(T)});function sa(S,T,E){if(!xt.isObject(S))throw new TypeError("target must be an object");T=T||new FormData,E=xt.toFlatObject(E,{metaTokens:!0,dots:!1,indexes:!1},!1,function(i,h){return!xt.isUndefined(h[i])});const w=E.metaTokens,O=E.visitor||v,D=E.dots,c=E.indexes,t=(E.Blob||typeof Blob<"u"&&Blob)&&xt.isSpecCompliantForm(T);if(!xt.isFunction(O))throw new TypeError("visitor must be a function");function a(e){if(e===null)return"";if(xt.isDate(e))return e.toISOString();if(!t&&xt.isBlob(e))throw new Jt("Blob is not supported. Use a Buffer instead.");return xt.isArrayBuffer(e)||xt.isTypedArray(e)?t&&typeof Blob=="function"?new Blob([e]):Buffer.from(e):e}function v(e,i,h){let s=e;if(e&&!h&&typeof e=="object"){if(xt.endsWith(i,"{}"))i=w?i:i.slice(0,-2),e=JSON.stringify(e);else if(xt.isArray(e)&&pC(e)||(xt.isFileList(e)||xt.endsWith(i,"[]"))&&(s=xt.toArray(e)))return i=dc(i),s.forEach(function(f,u){!(xt.isUndefined(f)||f===null)&&T.append(c===!0?Mf([i],u,D):c===null?i:i+"[]",a(f))}),!1}return Yo(e)?!0:(T.append(Mf(h,i,D),a(e)),!1)}const o=[],r=Object.assign(gC,{defaultVisitor:v,convertValue:a,isVisitable:Yo});function n(e,i){if(!xt.isUndefined(e)){if(o.indexOf(e)!==-1)throw Error("Circular reference detected in "+i.join("."));o.push(e),xt.forEach(e,function(s,l){(!(xt.isUndefined(s)||s===null)&&O.call(T,s,xt.isString(l)?l.trim():l,i,r))===!0&&n(s,i?i.concat(l):[l])}),o.pop()}}if(!xt.isObject(S))throw new TypeError("data must be an object");return n(S),T}function wf(S){const T={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(S).replace(/[!'()~]|%20|%00/g,function(w){return T[w]})}function ph(S,T){this._pairs=[],S&&sa(S,this,T)}const cc=ph.prototype;cc.append=function(T,E){this._pairs.push([T,E])};cc.toString=function(T){const E=T?function(w){return T.call(this,w,wf)}:wf;return this._pairs.map(function(O){return E(O[0])+"="+E(O[1])},"").join("&")};function mC(S){return encodeURIComponent(S).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function vc(S,T,E){if(!T)return S;const w=E&&E.encode||mC,O=E&&E.serialize;let D;if(O?D=O(T,E):D=xt.isURLSearchParams(T)?T.toString():new ph(T,E).toString(w),D){const c=S.indexOf("#");c!==-1&&(S=S.slice(0,c)),S+=(S.indexOf("?")===-1?"?":"&")+D}return S}class Rf{constructor(){this.handlers=[]}use(T,E,w){return this.handlers.push({fulfilled:T,rejected:E,synchronous:w?w.synchronous:!1,runWhen:w?w.runWhen:null}),this.handlers.length-1}eject(T){this.handlers[T]&&(this.handlers[T]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(T){xt.forEach(this.handlers,function(w){w!==null&&T(w)})}}const pc={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},yC=typeof URLSearchParams<"u"?URLSearchParams:ph,xC=typeof FormData<"u"?FormData:null,TC=typeof Blob<"u"?Blob:null,SC={isBrowser:!0,classes:{URLSearchParams:yC,FormData:xC,Blob:TC},protocols:["http","https","file","blob","url","data"]},gc=typeof window<"u"&&typeof document<"u",CC=(S=>gc&&["ReactNative","NativeScript","NS"].indexOf(S)<0)(typeof navigator<"u"&&navigator.product),EC=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",PC=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:gc,hasStandardBrowserEnv:CC,hasStandardBrowserWebWorkerEnv:EC},Symbol.toStringTag,{value:"Module"})),xi={...PC,...SC};function AC(S,T){return sa(S,new xi.classes.URLSearchParams,Object.assign({visitor:function(E,w,O,D){return xi.isNode&&xt.isBuffer(E)?(this.append(w,E.toString("base64")),!1):D.defaultVisitor.apply(this,arguments)}},T))}function MC(S){return xt.matchAll(/\w+|\[(\w*)]/g,S).map(T=>T[0]==="[]"?"":T[1]||T[0])}function wC(S){const T={},E=Object.keys(S);let w;const O=E.length;let D;for(w=0;w=E.length;return c=!c&&xt.isArray(O)?O.length:c,t?(xt.hasOwnProp(O,c)?O[c]=[O[c],w]:O[c]=w,!m):((!O[c]||!xt.isObject(O[c]))&&(O[c]=[]),T(E,w,O[c],D)&&xt.isArray(O[c])&&(O[c]=wC(O[c])),!m)}if(xt.isFormData(S)&&xt.isFunction(S.entries)){const E={};return xt.forEachEntry(S,(w,O)=>{T(MC(w),O,E,0)}),E}return null}function RC(S,T,E){if(xt.isString(S))try{return(T||JSON.parse)(S),xt.trim(S)}catch(w){if(w.name!=="SyntaxError")throw w}return(E||JSON.stringify)(S)}const gh={transitional:pc,adapter:["xhr","http"],transformRequest:[function(T,E){const w=E.getContentType()||"",O=w.indexOf("application/json")>-1,D=xt.isObject(T);if(D&&xt.isHTMLForm(T)&&(T=new FormData(T)),xt.isFormData(T))return O?JSON.stringify(mc(T)):T;if(xt.isArrayBuffer(T)||xt.isBuffer(T)||xt.isStream(T)||xt.isFile(T)||xt.isBlob(T))return T;if(xt.isArrayBufferView(T))return T.buffer;if(xt.isURLSearchParams(T))return E.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),T.toString();let m;if(D){if(w.indexOf("application/x-www-form-urlencoded")>-1)return AC(T,this.formSerializer).toString();if((m=xt.isFileList(T))||w.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return sa(m?{"files[]":T}:T,t&&new t,this.formSerializer)}}return D||O?(E.setContentType("application/json",!1),RC(T)):T}],transformResponse:[function(T){const E=this.transitional||gh.transitional,w=E&&E.forcedJSONParsing,O=this.responseType==="json";if(T&&xt.isString(T)&&(w&&!this.responseType||O)){const c=!(E&&E.silentJSONParsing)&&O;try{return JSON.parse(T)}catch(m){if(c)throw m.name==="SyntaxError"?Jt.from(m,Jt.ERR_BAD_RESPONSE,this,null,this.response):m}}return T}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:xi.classes.FormData,Blob:xi.classes.Blob},validateStatus:function(T){return T>=200&&T<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};xt.forEach(["delete","get","head","post","put","patch"],S=>{gh.headers[S]={}});const mh=gh,FC=xt.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"]),LC=S=>{const T={};let E,w,O;return S&&S.split(` -`).forEach(function(c){O=c.indexOf(":"),E=c.substring(0,O).trim().toLowerCase(),w=c.substring(O+1).trim(),!(!E||T[E]&&FC[E])&&(E==="set-cookie"?T[E]?T[E].push(w):T[E]=[w]:T[E]=T[E]?T[E]+", "+w:w)}),T},Ff=Symbol("internals");function an(S){return S&&String(S).trim().toLowerCase()}function Tr(S){return S===!1||S==null?S:xt.isArray(S)?S.map(Tr):String(S)}function OC(S){const T=Object.create(null),E=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let w;for(;w=E.exec(S);)T[w[1]]=w[2];return T}const DC=S=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(S.trim());function Mo(S,T,E,w,O){if(xt.isFunction(w))return w.call(this,T,E);if(O&&(T=E),!!xt.isString(T)){if(xt.isString(w))return T.indexOf(w)!==-1;if(xt.isRegExp(w))return w.test(T)}}function IC(S){return S.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(T,E,w)=>E.toUpperCase()+w)}function BC(S,T){const E=xt.toCamelCase(" "+T);["get","set","has"].forEach(w=>{Object.defineProperty(S,w+E,{value:function(O,D,c){return this[w].call(this,T,O,D,c)},configurable:!0})})}class na{constructor(T){T&&this.set(T)}set(T,E,w){const O=this;function D(m,t,a){const v=an(t);if(!v)throw new Error("header name must be a non-empty string");const o=xt.findKey(O,v);(!o||O[o]===void 0||a===!0||a===void 0&&O[o]!==!1)&&(O[o||t]=Tr(m))}const c=(m,t)=>xt.forEach(m,(a,v)=>D(a,v,t));return xt.isPlainObject(T)||T instanceof this.constructor?c(T,E):xt.isString(T)&&(T=T.trim())&&!DC(T)?c(LC(T),E):T!=null&&D(E,T,w),this}get(T,E){if(T=an(T),T){const w=xt.findKey(this,T);if(w){const O=this[w];if(!E)return O;if(E===!0)return OC(O);if(xt.isFunction(E))return E.call(this,O,w);if(xt.isRegExp(E))return E.exec(O);throw new TypeError("parser must be boolean|regexp|function")}}}has(T,E){if(T=an(T),T){const w=xt.findKey(this,T);return!!(w&&this[w]!==void 0&&(!E||Mo(this,this[w],w,E)))}return!1}delete(T,E){const w=this;let O=!1;function D(c){if(c=an(c),c){const m=xt.findKey(w,c);m&&(!E||Mo(w,w[m],m,E))&&(delete w[m],O=!0)}}return xt.isArray(T)?T.forEach(D):D(T),O}clear(T){const E=Object.keys(this);let w=E.length,O=!1;for(;w--;){const D=E[w];(!T||Mo(this,this[D],D,T,!0))&&(delete this[D],O=!0)}return O}normalize(T){const E=this,w={};return xt.forEach(this,(O,D)=>{const c=xt.findKey(w,D);if(c){E[c]=Tr(O),delete E[D];return}const m=T?IC(D):String(D).trim();m!==D&&delete E[D],E[m]=Tr(O),w[m]=!0}),this}concat(...T){return this.constructor.concat(this,...T)}toJSON(T){const E=Object.create(null);return xt.forEach(this,(w,O)=>{w!=null&&w!==!1&&(E[O]=T&&xt.isArray(w)?w.join(", "):w)}),E}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([T,E])=>T+": "+E).join(` -`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(T){return T instanceof this?T:new this(T)}static concat(T,...E){const w=new this(T);return E.forEach(O=>w.set(O)),w}static accessor(T){const w=(this[Ff]=this[Ff]={accessors:{}}).accessors,O=this.prototype;function D(c){const m=an(c);w[m]||(BC(O,c),w[m]=!0)}return xt.isArray(T)?T.forEach(D):D(T),this}}na.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);xt.reduceDescriptors(na.prototype,({value:S},T)=>{let E=T[0].toUpperCase()+T.slice(1);return{get:()=>S,set(w){this[E]=w}}});xt.freezeMethods(na);const bi=na;function wo(S,T){const E=this||mh,w=T||E,O=bi.from(w.headers);let D=w.data;return xt.forEach(S,function(m){D=m.call(E,D,O.normalize(),T?T.status:void 0)}),O.normalize(),D}function yc(S){return!!(S&&S.__CANCEL__)}function Cn(S,T,E){Jt.call(this,S??"canceled",Jt.ERR_CANCELED,T,E),this.name="CanceledError"}xt.inherits(Cn,Jt,{__CANCEL__:!0});function bC(S,T,E){const w=E.config.validateStatus;!E.status||!w||w(E.status)?S(E):T(new Jt("Request failed with status code "+E.status,[Jt.ERR_BAD_REQUEST,Jt.ERR_BAD_RESPONSE][Math.floor(E.status/100)-4],E.config,E.request,E))}const NC=xi.hasStandardBrowserEnv?{write(S,T,E,w,O,D){const c=[S+"="+encodeURIComponent(T)];xt.isNumber(E)&&c.push("expires="+new Date(E).toGMTString()),xt.isString(w)&&c.push("path="+w),xt.isString(O)&&c.push("domain="+O),D===!0&&c.push("secure"),document.cookie=c.join("; ")},read(S){const T=document.cookie.match(new RegExp("(^|;\\s*)("+S+")=([^;]*)"));return T?decodeURIComponent(T[3]):null},remove(S){this.write(S,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function GC(S){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(S)}function zC(S,T){return T?S.replace(/\/?\/$/,"")+"/"+T.replace(/^\/+/,""):S}function xc(S,T){return S&&!GC(T)?zC(S,T):T}const UC=xi.hasStandardBrowserEnv?function(){const T=/(msie|trident)/i.test(navigator.userAgent),E=document.createElement("a");let w;function O(D){let c=D;return T&&(E.setAttribute("href",c),c=E.href),E.setAttribute("href",c),{href:E.href,protocol:E.protocol?E.protocol.replace(/:$/,""):"",host:E.host,search:E.search?E.search.replace(/^\?/,""):"",hash:E.hash?E.hash.replace(/^#/,""):"",hostname:E.hostname,port:E.port,pathname:E.pathname.charAt(0)==="/"?E.pathname:"/"+E.pathname}}return w=O(window.location.href),function(c){const m=xt.isString(c)?O(c):c;return m.protocol===w.protocol&&m.host===w.host}}():function(){return function(){return!0}}();function XC(S){const T=/^([-+\w]{1,25})(:?\/\/|:)/.exec(S);return T&&T[1]||""}function VC(S,T){S=S||10;const E=new Array(S),w=new Array(S);let O=0,D=0,c;return T=T!==void 0?T:1e3,function(t){const a=Date.now(),v=w[D];c||(c=a),E[O]=t,w[O]=a;let o=D,r=0;for(;o!==O;)r+=E[o++],o=o%S;if(O=(O+1)%S,O===D&&(D=(D+1)%S),a-c{const D=O.loaded,c=O.lengthComputable?O.total:void 0,m=D-E,t=w(m),a=D<=c;E=D;const v={loaded:D,total:c,progress:c?D/c:void 0,bytes:m,rate:t||void 0,estimated:t&&c&&a?(c-D)/t:void 0,event:O};v[T?"download":"upload"]=!0,S(v)}}const WC=typeof XMLHttpRequest<"u",YC=WC&&function(S){return new Promise(function(E,w){let O=S.data;const D=bi.from(S.headers).normalize();let{responseType:c,withXSRFToken:m}=S,t;function a(){S.cancelToken&&S.cancelToken.unsubscribe(t),S.signal&&S.signal.removeEventListener("abort",t)}let v;if(xt.isFormData(O)){if(xi.hasStandardBrowserEnv||xi.hasStandardBrowserWebWorkerEnv)D.setContentType(!1);else if((v=D.getContentType())!==!1){const[i,...h]=v?v.split(";").map(s=>s.trim()).filter(Boolean):[];D.setContentType([i||"multipart/form-data",...h].join("; "))}}let o=new XMLHttpRequest;if(S.auth){const i=S.auth.username||"",h=S.auth.password?unescape(encodeURIComponent(S.auth.password)):"";D.set("Authorization","Basic "+btoa(i+":"+h))}const r=xc(S.baseURL,S.url);o.open(S.method.toUpperCase(),vc(r,S.params,S.paramsSerializer),!0),o.timeout=S.timeout;function n(){if(!o)return;const i=bi.from("getAllResponseHeaders"in o&&o.getAllResponseHeaders()),s={data:!c||c==="text"||c==="json"?o.responseText:o.response,status:o.status,statusText:o.statusText,headers:i,config:S,request:o};bC(function(f){E(f),a()},function(f){w(f),a()},s),o=null}if("onloadend"in o?o.onloadend=n:o.onreadystatechange=function(){!o||o.readyState!==4||o.status===0&&!(o.responseURL&&o.responseURL.indexOf("file:")===0)||setTimeout(n)},o.onabort=function(){o&&(w(new Jt("Request aborted",Jt.ECONNABORTED,S,o)),o=null)},o.onerror=function(){w(new Jt("Network Error",Jt.ERR_NETWORK,S,o)),o=null},o.ontimeout=function(){let h=S.timeout?"timeout of "+S.timeout+"ms exceeded":"timeout exceeded";const s=S.transitional||pc;S.timeoutErrorMessage&&(h=S.timeoutErrorMessage),w(new Jt(h,s.clarifyTimeoutError?Jt.ETIMEDOUT:Jt.ECONNABORTED,S,o)),o=null},xi.hasStandardBrowserEnv&&(m&&xt.isFunction(m)&&(m=m(S)),m||m!==!1&&UC(r))){const i=S.xsrfHeaderName&&S.xsrfCookieName&&NC.read(S.xsrfCookieName);i&&D.set(S.xsrfHeaderName,i)}O===void 0&&D.setContentType(null),"setRequestHeader"in o&&xt.forEach(D.toJSON(),function(h,s){o.setRequestHeader(s,h)}),xt.isUndefined(S.withCredentials)||(o.withCredentials=!!S.withCredentials),c&&c!=="json"&&(o.responseType=S.responseType),typeof S.onDownloadProgress=="function"&&o.addEventListener("progress",Lf(S.onDownloadProgress,!0)),typeof S.onUploadProgress=="function"&&o.upload&&o.upload.addEventListener("progress",Lf(S.onUploadProgress)),(S.cancelToken||S.signal)&&(t=i=>{o&&(w(!i||i.type?new Cn(null,S,o):i),o.abort(),o=null)},S.cancelToken&&S.cancelToken.subscribe(t),S.signal&&(S.signal.aborted?t():S.signal.addEventListener("abort",t)));const e=XC(r);if(e&&xi.protocols.indexOf(e)===-1){w(new Jt("Unsupported protocol "+e+":",Jt.ERR_BAD_REQUEST,S));return}o.send(O||null)})},Ho={http:vC,xhr:YC};xt.forEach(Ho,(S,T)=>{if(S){try{Object.defineProperty(S,"name",{value:T})}catch{}Object.defineProperty(S,"adapterName",{value:T})}});const Of=S=>`- ${S}`,HC=S=>xt.isFunction(S)||S===null||S===!1,Tc={getAdapter:S=>{S=xt.isArray(S)?S:[S];const{length:T}=S;let E,w;const O={};for(let D=0;D`adapter ${m} `+(t===!1?"is not supported by the environment":"is not available in the build"));let c=T?D.length>1?`since : -`+D.map(Of).join(` -`):" "+Of(D[0]):"as no adapter specified";throw new Jt("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return w},adapters:Ho};function Ro(S){if(S.cancelToken&&S.cancelToken.throwIfRequested(),S.signal&&S.signal.aborted)throw new Cn(null,S)}function Df(S){return Ro(S),S.headers=bi.from(S.headers),S.data=wo.call(S,S.transformRequest),["post","put","patch"].indexOf(S.method)!==-1&&S.headers.setContentType("application/x-www-form-urlencoded",!1),Tc.getAdapter(S.adapter||mh.adapter)(S).then(function(w){return Ro(S),w.data=wo.call(S,S.transformResponse,w),w.headers=bi.from(w.headers),w},function(w){return yc(w)||(Ro(S),w&&w.response&&(w.response.data=wo.call(S,S.transformResponse,w.response),w.response.headers=bi.from(w.response.headers))),Promise.reject(w)})}const If=S=>S instanceof bi?S.toJSON():S;function zs(S,T){T=T||{};const E={};function w(a,v,o){return xt.isPlainObject(a)&&xt.isPlainObject(v)?xt.merge.call({caseless:o},a,v):xt.isPlainObject(v)?xt.merge({},v):xt.isArray(v)?v.slice():v}function O(a,v,o){if(xt.isUndefined(v)){if(!xt.isUndefined(a))return w(void 0,a,o)}else return w(a,v,o)}function D(a,v){if(!xt.isUndefined(v))return w(void 0,v)}function c(a,v){if(xt.isUndefined(v)){if(!xt.isUndefined(a))return w(void 0,a)}else return w(void 0,v)}function m(a,v,o){if(o in T)return w(a,v);if(o in S)return w(void 0,a)}const t={url:D,method:D,data:D,baseURL:c,transformRequest:c,transformResponse:c,paramsSerializer:c,timeout:c,timeoutMessage:c,withCredentials:c,withXSRFToken:c,adapter:c,responseType:c,xsrfCookieName:c,xsrfHeaderName:c,onUploadProgress:c,onDownloadProgress:c,decompress:c,maxContentLength:c,maxBodyLength:c,beforeRedirect:c,transport:c,httpAgent:c,httpsAgent:c,cancelToken:c,socketPath:c,responseEncoding:c,validateStatus:m,headers:(a,v)=>O(If(a),If(v),!0)};return xt.forEach(Object.keys(Object.assign({},S,T)),function(v){const o=t[v]||O,r=o(S[v],T[v],v);xt.isUndefined(r)&&o!==m||(E[v]=r)}),E}const Sc="1.6.7",yh={};["object","boolean","number","function","string","symbol"].forEach((S,T)=>{yh[S]=function(w){return typeof w===S||"a"+(T<1?"n ":" ")+S}});const Bf={};yh.transitional=function(T,E,w){function O(D,c){return"[Axios v"+Sc+"] Transitional option '"+D+"'"+c+(w?". "+w:"")}return(D,c,m)=>{if(T===!1)throw new Jt(O(c," has been removed"+(E?" in "+E:"")),Jt.ERR_DEPRECATED);return E&&!Bf[c]&&(Bf[c]=!0,console.warn(O(c," has been deprecated since v"+E+" and will be removed in the near future"))),T?T(D,c,m):!0}};function KC(S,T,E){if(typeof S!="object")throw new Jt("options must be an object",Jt.ERR_BAD_OPTION_VALUE);const w=Object.keys(S);let O=w.length;for(;O-- >0;){const D=w[O],c=T[D];if(c){const m=S[D],t=m===void 0||c(m,D,S);if(t!==!0)throw new Jt("option "+D+" must be "+t,Jt.ERR_BAD_OPTION_VALUE);continue}if(E!==!0)throw new Jt("Unknown option "+D,Jt.ERR_BAD_OPTION)}}const Ko={assertOptions:KC,validators:yh},ji=Ko.validators;class wr{constructor(T){this.defaults=T,this.interceptors={request:new Rf,response:new Rf}}async request(T,E){try{return await this._request(T,E)}catch(w){if(w instanceof Error){let O;Error.captureStackTrace?Error.captureStackTrace(O={}):O=new Error;const D=O.stack?O.stack.replace(/^.+\n/,""):"";w.stack?D&&!String(w.stack).endsWith(D.replace(/^.+\n.+\n/,""))&&(w.stack+=` -`+D):w.stack=D}throw w}}_request(T,E){typeof T=="string"?(E=E||{},E.url=T):E=T||{},E=zs(this.defaults,E);const{transitional:w,paramsSerializer:O,headers:D}=E;w!==void 0&&Ko.assertOptions(w,{silentJSONParsing:ji.transitional(ji.boolean),forcedJSONParsing:ji.transitional(ji.boolean),clarifyTimeoutError:ji.transitional(ji.boolean)},!1),O!=null&&(xt.isFunction(O)?E.paramsSerializer={serialize:O}:Ko.assertOptions(O,{encode:ji.function,serialize:ji.function},!0)),E.method=(E.method||this.defaults.method||"get").toLowerCase();let c=D&&xt.merge(D.common,D[E.method]);D&&xt.forEach(["delete","get","head","post","put","patch","common"],e=>{delete D[e]}),E.headers=bi.concat(c,D);const m=[];let t=!0;this.interceptors.request.forEach(function(i){typeof i.runWhen=="function"&&i.runWhen(E)===!1||(t=t&&i.synchronous,m.unshift(i.fulfilled,i.rejected))});const a=[];this.interceptors.response.forEach(function(i){a.push(i.fulfilled,i.rejected)});let v,o=0,r;if(!t){const e=[Df.bind(this),void 0];for(e.unshift.apply(e,m),e.push.apply(e,a),r=e.length,v=Promise.resolve(E);o{if(!w._listeners)return;let D=w._listeners.length;for(;D-- >0;)w._listeners[D](O);w._listeners=null}),this.promise.then=O=>{let D;const c=new Promise(m=>{w.subscribe(m),D=m}).then(O);return c.cancel=function(){w.unsubscribe(D)},c},T(function(D,c,m){w.reason||(w.reason=new Cn(D,c,m),E(w.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(T){if(this.reason){T(this.reason);return}this._listeners?this._listeners.push(T):this._listeners=[T]}unsubscribe(T){if(!this._listeners)return;const E=this._listeners.indexOf(T);E!==-1&&this._listeners.splice(E,1)}static source(){let T;return{token:new xh(function(O){T=O}),cancel:T}}}const jC=xh;function $C(S){return function(E){return S.apply(null,E)}}function ZC(S){return xt.isObject(S)&&S.isAxiosError===!0}const jo={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(jo).forEach(([S,T])=>{jo[T]=S});const JC=jo;function Cc(S){const T=new Sr(S),E=ic(Sr.prototype.request,T);return xt.extend(E,Sr.prototype,T,{allOwnKeys:!0}),xt.extend(E,T,null,{allOwnKeys:!0}),E.create=function(O){return Cc(zs(S,O))},E}const ye=Cc(mh);ye.Axios=Sr;ye.CanceledError=Cn;ye.CancelToken=jC;ye.isCancel=yc;ye.VERSION=Sc;ye.toFormData=sa;ye.AxiosError=Jt;ye.Cancel=ye.CanceledError;ye.all=function(T){return Promise.all(T)};ye.spread=$C;ye.isAxiosError=ZC;ye.mergeConfig=zs;ye.AxiosHeaders=bi;ye.formToJSON=S=>mc(xt.isHTMLForm(S)?new FormData(S):S);ye.getAdapter=Tc.getAdapter;ye.HttpStatusCode=JC;ye.default=ye;const QC={id:"",title:"",description:"",journals:[],isComplete:!1,reward:""},kC={backpack:[],equipment:{head:null,body:null,legs:null,feet:null,hands:null,weapon:null,shield:null,accessory:null}},Ec={},qC={inCombat:!1,isDead:!1,isResting:!1,activeBoosts:{}},_C={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"},tE={stats:_C,inventory:kC,state:qC},eE={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},iE=S=>{we(async()=>{Oe.set({...Oe.get(),[S.id]:S})})},sE=S=>{we(async()=>{const T=Oe.get(),{[S]:E,...w}=T;Oe.set(w)})};function Vs(S,T){return d1(S,T,{encode(E){return JSON.stringify(E)},decode(E){try{return JSON.parse(E)}catch{return T}}})}const ne=Vs("playerData",tE),nE=Vs("quest",QC),Oe=Vs("items",Ec),hs=Vs("notifications",[]),Pc=Vs("itemDB",Ec),Rr=Vs("settings",eE),ls=S=>Rr.get()[S],on=(S,T)=>{we(async()=>{const E=Rr.get();Rr.set({...E,[S]:T})})},rE=()=>{we(async()=>{try{const T=(await ye.get("https://kbve.com/api/itemdb.json")).data,E={};Object.keys(T.key).forEach(w=>{const O=T.key[w];E[O.id]=O,E[O.name]=O}),Pc.set(E)}catch(S){console.error("Failed to reload item database:",S)}})},aE=S=>Pc.get()[S],oE=S=>{we(async()=>{const T=ne.get();T.inventory.backpack.push(S),ne.set({...T})})},Bi=S=>{const E=Oe.get()[S];if(E)return E;console.warn(`Item with ID ${S} not found.`)},hE=S=>{we(async()=>{const T=Th(),E={...S,id:T};iE(E),oE(E.id),Zt.emit("notification",{title:"Success",message:`You got a ${E.name}, verified by E Corp ID ${E.id}`,notificationType:Bs.success})})},lE=(S,T)=>{we(async()=>{const E=ne.get(),w=Oe.get()[T];if(w){const O=E.inventory.equipment[S];if(O){const D=Oe.get()[O];D.equipped=!1,Oe.set({...Oe.get(),[D.id]:D})}w.equipped=!0,Oe.set({...Oe.get(),[w.id]:w}),E.inventory.equipment[S]=T,ne.set({...E})}})},uE=S=>{we(async()=>{const T=ne.get(),E=T.inventory.equipment[S];if(E){const w=Oe.get()[E];w&&(w.equipped=!1,Oe.set({...Oe.get(),[w.id]:w}),T.inventory.equipment[S]=null,ne.set({...T}))}})},bf=S=>{we(async()=>{const T=ne.get(),E=Oe.get()[S];E&&!E.equipped?(T.inventory.backpack=T.inventory.backpack.filter(w=>w!==S),ne.set({...T}),sE(S)):Zt.emit("notification",{title:"Warning",message:"Cannot remove item that is currently equipped.",notificationType:Bs.warning})})},Ac=S=>{we(async()=>{const T=ne.get(),E=parseInt(T.stats.health,10),w=Math.max(E-S,0);T.stats={...T.stats,health:w.toString()},ne.set({...T})})},fE=S=>{we(async()=>{const T=ne.get(),E=parseInt(T.stats.health,10),w=parseInt(T.stats.maxHealth,10),O=Math.min(E+S,w);T.stats={...T.stats,health:O.toString()},ne.set({...T})})},dE=S=>{we(async()=>{const T=ne.get(),E=parseInt(T.stats.mana,10),w=Math.max(E-S,0);T.stats={...T.stats,mana:w.toString()},ne.set({...T})})},cE=S=>{we(async()=>{const T=ne.get(),E=parseInt(T.stats.mana,10),w=parseInt(T.stats.maxMana,10),O=Math.min(E+S,w);T.stats={...T.stats,mana:O.toString()},ne.set({...T})})},vE=S=>{we(async()=>{const T=ne.get(),E=parseInt(T.stats.energy,10),w=Math.max(E-S,0);T.stats={...T.stats,energy:w.toString()},ne.set({...T})})},pE=S=>{we(async()=>{const T=ne.get(),E=parseInt(T.stats.energy,10),w=parseInt(T.stats.maxEnergy,10),O=Math.min(E+S,w);T.stats={...T.stats,energy:O.toString()},ne.set({...T})})},gE=S=>{if(S.health!==void 0){const T=parseInt(S.health,10);T>0?fE(T):Ac(Math.abs(T))}if(S.mana!==void 0){const T=parseInt(S.mana,10);T>0?cE(T):dE(Math.abs(T))}if(S.energy!==void 0){const T=parseInt(S.energy,10);T>0?pE(T):vE(Math.abs(T))}},mE=async S=>{const T=Th();we(async()=>{const E=ne.get();E.state.activeBoosts[T]={...S,expiry:Date.now()+S.duration*1e3},ne.set({...E})})},yE=S=>{we(async()=>{const T=ne.get(),E=S.bonuses,w={health:E?.health!==void 0?E.health.toString():void 0,mana:E?.mana!==void 0?E.mana.toString():void 0,energy:E?.energy!==void 0?E.energy.toString():void 0};gE(w),S.boost&&mE(S.boost),S.action&&console.log(`Action: ${S.action}`),ne.set({...T})})},xE=S=>{const T=Bi(S);if(!T)return[];const E=["view","discard"];return T.consumable&&E.push("consume"),T.equipped?E.push("unequip"):T.consumable||E.push("equip"),E},Bs={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"}},Ds="0123456789ABCDEFGHJKMNPQRSTVWXYZ";function TE(S,T,E){for(;S.length=0;w--){const O=S%Ds.length;E=Ds.charAt(O)+E,S=Math.floor(S/Ds.length)}return TE(E,T,Ds[0])}function Th(){const S=Date.now(),T=EE(S,10),E=CE(16);return T+E}const PE=({styleClass:S,size:T=32,color:E="#000",onClick:w,...O})=>St.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:T,height:T,className:S,onClick:w,...O,children:St.jsx("path",{stroke:E,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"})}),AE=({styleClass:S,size:T=24,color:E="#000",onClick:w,...O})=>St.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",width:T,height:T,className:S,onClick:w,...O,children:St.jsx("path",{stroke:E,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"})});class Mc{constructor(T,E,w){this.scene=T,this.gridEngine=E,this.quadtree=w,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 E=Bi(T);E&&E.consumable?(console.log(`Consuming item: ${E.name}`),yE(E),bf(E.id)):console.log(`Item ${T} is not consumable`)}handleEquip(T){const E=Bi(T);E&&(console.log(`Equipping item: ${E.name}`),lE("weapon",E.id))}handleUnequip(T){const E=Bi(T);E&&(console.log(`Unequipping item: ${E.name}`),uE("weapon"))}handleDiscard(T){console.log(`Discarding item: ${T}`),bf(T)}handleView(T){const E=Bi(T);if(E&&(console.log(`Viewing item: ${E.name} with ${E.slug}`),E.slug)){const w=`https://kbve.com/${E.slug}#${E.name.toLowerCase().replace(/\s+/g,"-").replace(/[^\w-]+/g,"")}`;window.open(w,"_blank")}}registerEventHandlers(){Zt.on("itemAction",this.handleItemAction.bind(this));//! Broken -Zt.on("playerMove",this.handlePlayerMove.bind(this)),Zt.on("playerSteal",this.handlePlayerSteal.bind(this)),Zt.on("playerReward",this.handlePlayerReward.bind(this)),Zt.on("playerDamage",this.handlePlayerCombatDamage.bind(this))}handleItemAction(T){if(T)switch(console.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:console.log(`Unknown action: ${T.action}`)}}handlePlayerReward(T){console.log("Rewarding the player"),T&&(Zt.emit("notification",{title:"Success",message:T.message,notificationType:Bs.success}),hE(T.item))}handlePlayerCombatDamage(T){T&&(Ac(parseInt(T.damage)),Zt.emit("notification",{title:"Danger",message:`You taken ${T.damage} points of damage!`,notificationType:Bs.danger}))}handlePlayerSteal(T){if(T)if(Math.random()>.5){const E=aE("Salmon");E?Zt.emit("playerReward",{message:`You stole a ${E.name}!`,item:E},2e3):console.warn("Item not found in ItemDB")}else Zt.emit("notification",{title:"Danger",message:`You failed to steal from ${T.npcName}!`,notificationType:Bs.danger}),Zt.emit("playerDamage",{damage:"1"})}handlePlayerMove(T){T&&this.gridEngine.moveTo("player",{x:T.x,y:T.y})}checkForNearbyObjects(){const E=this.gridEngine.getPosition("player"),w=E.x*48,O=E.y*48;this.quadtree.query(E).length>0?this.tooltip.setPosition(w,O-60).setVisible(!0):this.tooltip.setVisible(!1)}handleMovement(){if(!this.cursor)return;const T=this.cursor,E=this.wasdKeys;if(this.scene.input.keyboard?.addKey("F").isDown){const w=this.gridEngine.getPosition("player"),O=this.quadtree.query(w);for(const D of O)D.action()}(T.left.isDown||E.A.isDown)&&(T.up.isDown||E.W.isDown)?this.gridEngine.move("player","up-left"):(T.left.isDown||E.A.isDown)&&(T.down.isDown||E.S.isDown)?this.gridEngine.move("player","down-left"):(T.right.isDown||E.D.isDown)&&(T.up.isDown||E.W.isDown)?this.gridEngine.move("player","up-right"):(T.right.isDown||E.D.isDown)&&(T.down.isDown||E.S.isDown)?this.gridEngine.move("player","down-right"):T.left.isDown||E.A.isDown?this.gridEngine.move("player","left"):T.right.isDown||E.D.isDown?this.gridEngine.move("player","right"):T.up.isDown||E.W.isDown?this.gridEngine.move("player","up"):(T.down.isDown||E.S.isDown)&&this.gridEngine.move("player","down"),this.checkForNearbyObjects()}}class wc extends Phaser.GameObjects.Container{constructor(T,E,w,O){const D=E.x,c=E.y-E.height+10;super(T,D,c),this.sprite=E;const m=150,t=40+O.length*20;this.background=T.add.rectangle(0,0,m,t,0,.7),this.text=T.add.text(0,-t/2+10,w,{fontSize:"12px",color:"#ffffff"}).setOrigin(.5),this.buttons=O.map((a,v)=>{const o=T.add.text(0,-t/2+30+v*20,a.label,{fontSize:"12px",color:"#00ff00"}).setOrigin(.5);return o.setInteractive({useHandCursor:!0}),o.on("pointerdown",a.callback),o}),this.add(this.background),this.add(this.text),this.buttons.forEach(a=>this.add(a)),this.scene.add.existing(this)}updatePosition(){this.setPosition(this.sprite.x-30,this.sprite.y-this.sprite.height-this.background.height/2+100)}static attachToSprite(T,E,w,O){E.setInteractive(),E.on("pointerover",()=>{const D={npcId:E.name,npcName:w,actions:O.map(m=>m.label)};if(Zt.emit("npcInteraction",D),!E.getData("tooltipMenu")){const m=new wc(T,E,w,O);E.setData("tooltipMenu",m)}const c=E.getData("tooltipMenu");c.setVisible(!0),c.updatePosition()}),E.on("pointerout",()=>{const D=E.getData("tooltipMenu");D&&D.setVisible(!1)})}static updateAllTooltipPositions(T){T.children.list.forEach(E=>{if(E instanceof Phaser.GameObjects.Sprite){const w=E.getData("tooltipMenu");w&&w.updatePosition()}})}}let ZE=class extends Phaser.GameObjects.Sprite{};function ME(S,T,E,w){const m=S.add.graphics();m.fillStyle(16777215,1),m.fillRoundedRect(0,0,200,60,16),m.setDepth(99);const t=S.add.text(100,30,E,{fontFamily:"Arial",fontSize:16,color:"#000000"});t.setOrigin(.5),t.setWordWrapWidth(200-10*2),t.setDepth(100);const a=S.add.container(0,0,[m,t]);return a.setDepth(100),T.messageBubble=a,RE(T),S.time.addEvent({delay:w,callback:()=>{a.destroy(),T.messageBubble===a&&(T.messageBubble=void 0)},callbackScope:S}),a}function wE(S,T,E){const c=S.add.graphics();c.fillStyle(16777215,1),c.fillRoundedRect(0,0,200,60,16),c.setDepth(99);const m=S.add.text(100,30,E,{fontFamily:"Arial",fontSize:16,color:"#000000"});m.setOrigin(.5),m.setWordWrapWidth(200-10*2),m.setDepth(100);const t=S.add.container(0,0,[c,m]);return t.setDepth(100),T.textBubble=t,$o(T),t}function $o(S){const T=S.textBubble;T&&(T.x=S.x,T.y=S.y-S.height-T.height/2)}function RE(S){const T=S.messageBubble;T&&(T.x=S.x,T.y=S.y-S.height-T.height/2)}class FE{constructor(){this.actionHandlers={Talk:this.talkToNPC.bind(this),Trade:this.tradeWithNPC.bind(this),"Move to":this.moveToNPC.bind(this),Steal:this.stealFromNPC.bind(this),Combat:this.startCombat.bind(this),"Check Fish":this.checkFish.bind(this)}}getActionHandler(T){return this.actionHandlers[T]}talkToNPC(T){console.log(`Talking to NPC with ID: ${T.npcId}`)}tradeWithNPC(T){console.log(`Trading with NPC with ID: ${T.npcId}`)}moveToNPC(T){const w=T.data?.coords||{x:10,y:15};Zt.emit("playerMove",w)}stealFromNPC(T){console.log(`Attempting to steal from NPC with ID: ${T.npcId}`);const E={npcId:T.npcId,npcName:T.npcName,data:T.data};Zt.emit("playerSteal",E)}startCombat(T){console.log(`Starting combat with NPC with ID: ${T.npcId}`)}checkFish(T){console.log(`Checking fish for NPC with ID: ${T.npcId}`)}attachNPCEvent(T,E,w,O){T.setInteractive(),T.on("pointerover",()=>{const D={npcId:T.name||"",npcName:E,actions:w.map(c=>c.label),data:O||{}};Zt.emit("npcInteraction",D)}),T.on("pointerout",()=>{})}}const Rc=new FE;function Fc(S){return+S[S.length-1]}function Lc(S){return S.startsWith("monster_bird_")&&!S.startsWith("monster_bird_shadow")}function Oc(S,T,E,w,O){const D=[];for(let c=0;c<10;c++){const m=S.add.sprite(0,0,"monster_bird");m.setCrop(T,E,w,O),m.scale=3,D.push(m)}return D}function Dc(S){return Oc(S,0,0,61,47)}function Ic(S){return Oc(S,22,47,16,10)}function Bc(S){S.anims.create({key:"bird",frames:S.anims.generateFrameNumbers("monster_bird",{start:0,end:2}),frameRate:10,repeat:-1,yoyo:!0})}class LE extends Qr.Scene{mainMenuButtonImage;mainMenuButtonText;constructor(){super("Preloader")}preload(){this.load.image("mainBg","https://utfs.io/f/2c17f660-7f39-4edf-b83e-122a71014d99-6gflls.webp"),this.load.image("scroll","https://kbve.com/assets/img/fishchip/scroll.webp"),this.load.audio("music","https://kbve.com/assets/img/fishchip/bg.ogg"),this.load.image("creditsBg","https://utfs.io/f/2c17f660-7f39-4edf-b83e-122a71014d99-6gflls.webp"),this.load.audio("type","https://kbve.com/assets/img/fishchip/type.mp3"),this.load.spritesheet("fishing","https://kbve.com/assets/img/fishchip/animate.png",{frameWidth:800,frameHeight:600}),this.load.image("fish","https://kbve.com/assets/img/letter_logo.png"),this.load.image("background","https://kbve.com/assets/img/fishchip/scaled_fish_menu_minigame.webp"),this.load.image("tiles","https://kbve.com/assets/img/fishchip/desert_tileset_1.png"),this.load.image("cloud-city-tiles","/assets/map/cloud_tileset.png"),this.load.tilemapTiledJSON("cloud-city-map-large","/assets/map/cloud_city_large.json"),this.load.tilemapTiledJSON("cloud-city-map","https://kbve.com/assets/img/fishchip/cloud_city.json"),this.load.spritesheet("player","https://kbve.com/assets/img/fishchip/chip_charactersheet_warmer.png",{frameWidth:52,frameHeight:72}),this.load.spritesheet("knights","/assets/entity/knights.png",{frameWidth:52,frameHeight:72}),this.load.spritesheet("jacko","/assets/entity/jacko.png",{frameWidth:52,frameHeight:72}),this.load.spritesheet("monks","/assets/entity/monks.png",{frameWidth:52,frameHeight:72}),rE()}create(){this.sound.get("music")?.isPlaying||this.sound.add("music",{loop:!0,volume:.1}).play(),this.add.image(480,480,"mainBg").setScale(.1),this.mainMenuButtonImage=this.add.image(480,480,"scroll").setAlpha(.9).setScale(.7,.2).setInteractive({useHandCursor:!0}),this.mainMenuButtonText=this.add.text(480,480,"Start Game",{fontFamily:"Arial Black",fontSize:50,color:"#ffffff",stroke:"#000000",strokeThickness:6}).setOrigin(.5).setInteractive({useHandCursor:!0}),this.mainMenuButtonText.on("pointerdown",()=>{this.scene.start("SandCity")},this)}}let QE=class extends un.GameObjects.Sprite{textBubble;tooltip};class OE extends Qr.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 cs(T)}preload(){this.load.spritesheet("monster_bird","/assets/monster/bird_original.png",{frameWidth:61,frameHeight:57}),Zt.emit("notification",{title:"Success",message:`You arrived safely to SandCity Passport: ${Th()}`,notificationType:Bs.success})}create(){const T=this.make.tilemap({key:"cloud-city-map"});T.addTilesetImage("Cloud City","tiles");for(let D=0;D({id:"monster_bird_"+c,sprite:D,startPosition:{x:7,y:7+c},speed:5,collides:!1})),...this.monsterBirdShadows.map((D,c)=>({id:"monster_bird_shadow_"+c,sprite:D,startPosition:{x:7,y:7+c},speed:5,collides:!1}))],numberOfDirections:8};this.gridEngine.create(T,w),this.loadRanges(),this.playerController=new Mc(this,this.gridEngine,this.quadtree),ME(this,this.npcSprite,"Enter the sand pit to start fishing! Go near it and press F!",3e3),this.gridEngine.moveRandomly("npc",1500,3),this.gridEngine.moveRandomly("fishNpc",1500,3);for(let D=0;D<10;D++)this.gridEngine.moveRandomly("monster_bird_"+D,1e3,10);this.gridEngine.positionChangeStarted().subscribe(({charId:D,exitTile:c,enterTile:m})=>{Lc(D)&&this.gridEngine.moveTo("monster_bird_shadow_"+Fc(D),{x:m.x,y:m.y})});const O=(D,c,m)=>{const t=this.gridEngine.getPosition(D.name);Rc.attachNPCEvent(D,c,m,{coords:t})};O(this.npcSprite,"FisherMan",[{label:"Talk"},{label:"Trade"},{label:"Move to"},{label:"Steal"},{label:"Combat"}]),O(this.fishNpcSprite,"Fish NPC Actions",[{label:"Check Fish"},{label:"Move to"}]),window.__GRID_ENGINE__=this.gridEngine}loadRanges(){const T=[{name:"well",bounds:{xMin:2,xMax:5,yMin:10,yMax:14},action:()=>{const E={message:"Seems like there are no fish in the sand pits. You know null, this area could be fixed up a bit too."};Zt.emit("charEvent",E)}},{name:"sign",bounds:{xMin:2,xMax:5,yMin:2,yMax:5},action:()=>{const E={message:"Sign does not have much to say.",character_name:"Evee The BarKeep",character_image:"/assets/npc/barkeep.webp",background_image:"/assets/background/woodensign.webp"};Zt.emit("charEvent",E)}},{name:"building",bounds:{xMin:13,xMax:13,yMin:6,yMax:7},action:()=>{const E={message:"Sorry, we are closed!",character_name:"Evee The BarKeep",character_image:"/assets/npc/barkeep.webp",background_image:"/assets/background/animebar.webp"};Zt.emit("charEvent",E)}},{name:"tombstone",bounds:{xMin:7,xMax:10,yMin:9,yMax:10},action:()=>{const E={message:"Samson the Great was an amazing sailer, died drinking dat drank.",character_name:"Samson Statue",character_image:"/assets/npc/samson.png",background_image:"/assets/background/animetombstone.webp"};Zt.emit("charEvent",E)}}];for(const E of T)this.quadtree.insert(E)}update(){this.playerController?.handleMovement()}}class qE extends un.GameObjects.Sprite{textBubble}class DE extends Qr.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 cs(T)}preload(){this.load.spritesheet("monster_bird","/assets/monster/bird_original.png",{frameWidth:61,frameHeight:57})}create(){const T=this.make.tilemap({key:"cloud-city-map-large"});T.addTilesetImage("cloud_tileset","cloud-city-tiles");for(let O=0;O({id:"monster_bird_"+D,sprite:O,startPosition:{x:7,y:7+D},speed:5,collides:!1})),...this.monsterBirdShadows.map((O,D)=>({id:"monster_bird_shadow_"+D,sprite:O,startPosition:{x:7,y:7+D},speed:5,collides:!1}))],numberOfDirections:8};this.gridEngine.create(T,w),this.loadRanges(),this.playerController=new Mc(this,this.gridEngine,this.quadtree),wE(this,this.npcSprite,"Enter the sand pit to start fishing! Go near it and press F!"),this.gridEngine.moveRandomly("npc",1500,3);for(let O=0;O<10;O++)this.gridEngine.moveRandomly("monster_bird_"+O,1e3,20);this.gridEngine.positionChangeStarted().subscribe(({charId:O,exitTile:D,enterTile:c})=>{Lc(O)&&this.gridEngine.moveTo("monster_bird_shadow_"+Fc(O),{x:c.x,y:c.y})}),window.__GRID_ENGINE__=this.gridEngine}loadRanges(){const T=[{name:"well",bounds:{xMin:2,xMax:5,yMin:10,yMax:14},action:()=>{const E={message:"Seems like there are no fish in the sand pits. You know null, this area could be fixed up a bit too."};Zt.emit("charEvent",E)}},{name:"sign",bounds:{xMin:2,xMax:5,yMin:2,yMax:5},action:async()=>{try{const O={message:`The Database Response time: ${(await(await fetch("https://api.cryptothrone.com/api/v1/speed")).json()).message.time_ms} ms`,character_name:"Planets Be Scalin",character_image:"/assets/npc/barkeep.webp",background_image:"/assets/background/woodensign.webp"};Zt.emit("charEvent",O)}catch(E){console.error("Error fetching data:",E);const w={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"};Zt.emit("charEvent",w)}}},{name:"building",bounds:{xMin:13,xMax:13,yMin:6,yMax:7},action:()=>{const E={message:"Sorry, we are closed!",character_name:"Evee The BarKeep",character_image:"/assets/npc/barkeep.webp",background_image:"/assets/background/animebar.webp"};Zt.emit("charEvent",E)}},{name:"tombstone",bounds:{xMin:7,xMax:10,yMin:9,yMax:10},action:()=>{const E={message:"Samson the Great was an amazing sailer, died drinking dat drank.",character_name:"Samson Statue",character_image:"/assets/npc/samson.png",background_image:"/assets/background/animetombstone.webp"};Zt.emit("charEvent",E)}}];for(const E of T)this.quadtree.insert(E)}update(){this.playerController?.handleMovement(),this.npcSprite&&this.npcSprite.textBubble&&$o(this.npcSprite),this.fishNpcSprite&&this.fishNpcSprite.textBubble&&$o(this.fishNpcSprite)}}const IE=Pr.div` - // Your style here -`;function BE(){const S=ri.useRef(null);return ri.useEffect(()=>{if(S.current){const T=S.current,w={...{title:"CryptoThrone",render:{antialias:!1},scale:{mode:un.Scale.RESIZE,min:{width:1024,height:768},max:{width:1600,height:1200},zoom:1},type:un.AUTO,transparent:!0,width:800,height:600,physics:{default:"arcade",arcade:{gravity:{x:0,y:0},debug:!1}},plugins:{scene:[{key:"gridEngine",plugin:O2,mapping:"gridEngine"}]},scene:[LE,OE,DE],input:{mouse:{preventDefaultWheel:!1},touch:{capture:!1}}},parent:T},O=new un.Game(w);return()=>{O.destroy(!0)}}},[]),St.jsx(IE,{children:St.jsx("div",{ref:S})})}function $i(S,T={}){let E=ri.useCallback(O=>T.keys?I2(S,T.keys,O):S.listen(O),[T.keys,S]),w=S.get.bind(S);return ri.useSyncExternalStore(E,w,w)}const Nf=Uf({message:""}),bE=()=>{const S=$i(Nf);ri.useEffect(()=>{const E=w=>{if(w){Nf.set(w);const O=document.querySelector("#hs-stacked-overlays");O&&(O.classList.remove("hidden"),O.classList.add("open"))}};return Zt.on("charEvent",E),()=>{Zt.off("charEvent",E)}},[]);const T=()=>{const E=document.querySelector("#hs-stacked-overlays");E&&(E.classList.add("hidden"),E.classList.remove("open"))};return St.jsx(St.Fragment,{children:St.jsx("div",{id:"hs-stacked-overlays",className:"hs-overlay hs-overlay-backdrop-open:bg-gray-900/50 hidden size-full fixed top-0 start-0 z-[60] overflow-x-hidden overflow-y-auto pointer-events-none [--overlay-backdrop:static]","data-hs-overlay-keyboard":"false",children:St.jsx("div",{className:"hs-overlay-open:mt-7 hs-overlay-open:opacity-100 hs-overlay-open:duration-500 mt-0 opacity-0 ease-out transition-all sm:max-w-lg sm:w-full m-3 sm:mx-auto",children:St.jsxs("div",{className:"flex flex-col lg:flex-row bg-zinc-950 border border-yellow-500 shadow-sm rounded-xl pointer-events-auto bg-cover",style:{backgroundImage:`url(${S.background_image||"https://kbve.com/assets/img/curved-images/wave.jpg"})`},children:[St.jsxs("div",{className:"w-full lg:w-1/3 p-4 rounded-l-xl flex flex-col items-center justify-center",children:[St.jsx("h3",{className:"font-bold text-yellow-400 bg-zinc-950/80 rounded-2xl text-center mb-4",children:`${S.character_name||"NPC"}`}),St.jsx("img",{src:S.character_image||"/assets/npc/barkeep.webp",alt:"Character",className:"w-full h-auto rounded-md"})]}),St.jsxs("div",{className:"w-full lg:w-2/3 p-4 bg-cover bg-center rounded-r-xl",children:[St.jsxs("div",{className:"flex justify-between items-center pb-3 border-b",children:[St.jsx("h3",{className:"font-bold text-yellow-400",children:""}),St.jsxs("button",{type:"button",className:"flex justify-center items-center size-7 text-sm font-semibold rounded-full border border-transparent text-yellow-400 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none","data-hs-overlay":"#hs-stacked-overlays",onClick:T,children:[St.jsx("span",{className:"sr-only",children:"Close"}),St.jsxs("svg",{className:"flex-shrink-0 size-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[St.jsx("path",{d:"M18 6 6 18"}),St.jsx("path",{d:"m6 6 12 12"})]})]})]}),St.jsx("div",{className:"p-4 overflow-y-auto",children:St.jsx("p",{className:"mt-1 mb-2 text-yellow-400 bg-zinc-950/80 rounded-xl p-4",children:S.message||"No Message"})}),St.jsx("div",{className:"flex justify-end items-center gap-x-2 py-3 px-4 border-t",children:St.jsxs("button",{className:"relative rounded px-5 py-2.5 overflow-hidden group bg-yellow-500 relative hover:bg-gradient-to-r hover:from-yellow-500 hover:to-yellow-400 text-white hover:ring-2 hover:ring-offset-2 hover:ring-yellow-400 transition-all ease-out duration-300 disabled:pointer-events-none","data-hs-overlay":"#hs-stacked-overlays",onClick:T,children:[St.jsx("span",{className:"absolute right-0 w-8 h-32 -mt-12 transition-all duration-1000 transform translate-x-12 bg-white opacity-10 rotate-12 group-hover:-translate-x-40 ease"}),St.jsx("span",{className:"relative",children:"Okay."})]})})]})]})})})})},NE=(S,T)=>{const E=Bi(S);return E?St.jsxs("div",{style:{top:T.y,left:T.x},className:"absolute bg-gray-700 text-white p-2 rounded shadow-lg z-50",children:[St.jsx("p",{className:"text-sm font-semibold",children:E.name}),St.jsxs("p",{className:"text-xs",children:["Type: ",E.type]}),St.jsxs("p",{className:"text-xs",children:["Bonuses: ",JSON.stringify(E.bonuses)]}),St.jsxs("p",{className:"text-xs",children:["Durability: ",E.durability]}),St.jsxs("p",{className:"text-xs",children:["Weight: ",E.weight]})]}):null},GE=(S,T,E,w)=>St.jsx("ul",{className:"grid grid-cols-8 gap-2",children:Object.keys(S).map(O=>{const D=S[O];return zE(D,T,E,w)})}),zE=(S,T,E,w)=>{if(!S)return St.jsx("li",{className:"text-sm relative flex items-center justify-center border border-gray-500 bg-gray-200",style:{width:"32px",height:"32px"}},`empty-${Math.random()}`);const O=Bi(S);return O?St.jsxs("li",{className:"text-sm relative",onMouseEnter:D=>T(O.id,D),onMouseLeave:E,onClick:D=>w(O.id,D),children:[O.name," (",O.type,") - Bonuses: ",JSON.stringify(O.bonuses)," - Durability: ",O.durability," - Weight: ",O.weight]},O.id):null},UE=(S,T,E,w)=>St.jsx("ul",{className:"grid grid-cols-8 gap-1",children:S.map((O,D)=>{const c=Bi(O);return c?St.jsx("li",{className:"text-sm relative hover:scale-[1.3] transition ease-in-out duration-100",onMouseEnter:m=>T(c.id,m),onMouseLeave:E,onClick:m=>w(c.id,m),children:St.jsx("img",{src:c.img,alt:c.name,style:{width:"32px",height:"32px"},className:"inline-block border border-yellow-400/50"})},D):null})}),XE=()=>{const S=$i(ne);$i(Rr),$i(nE),$i(Oe),ri.useEffect(()=>{const a=v=>{};return Zt.on("playerEvent",a),()=>{Zt.off("playerEvent",a)}},[]);const T=(a,v)=>{on("tooltipItem",{id:a,position:{x:v.clientX+10,y:v.clientY-150}})},E=()=>{on("tooltipItem",{...ls("tooltipItem"),id:null})},w=(a,v)=>{on("submenuItem",{id:a,position:{x:v.clientX,y:v.clientY-150}})},O=()=>{on("submenuItem",{...ls("submenuItem"),id:null})},D=(a,v)=>{const o=Bi(a);if(o){const r={itemId:o.id,action:v};Zt.emit("itemAction",r),O()}};if(!S||!S.stats)return null;const c=ls("submenuItem"),m=c.id?xE(c.id):[],t=ls("tooltipItem");return St.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:[St.jsx("button",{onClick:()=>on("isStatsMenuCollapsed",!ls("isStatsMenuCollapsed")),className:"bg-yellow-500 text-white p-2 rounded",children:ls("isStatsMenuCollapsed")?St.jsx(AE,{styleClass:"w-8"}):St.jsx(PE,{styleClass:"w-8"})}),St.jsxs("div",{className:`transition transform duration-1000 ease-in-out overflow-hidden ${ls("isStatsMenuCollapsed")?"max-h-0":"max-h-screen"}`,children:[St.jsxs("div",{className:"mb-4",children:[St.jsx("h2",{className:"text-lg font-semibold mb-2",children:"Stats"}),St.jsx("p",{className:"text-sm text-green-400",children:`HP: ${S.stats.health||"0"} / ${S.stats.maxHealth}`}),St.jsx("p",{className:"text-sm text-blue-400",children:`MP: ${S.stats.mana||"0"} / ${S.stats.maxMana}`}),St.jsx("p",{className:"text-sm text-yellow-400",children:`EP: ${S.stats.energy||"0"} / ${S.stats.maxEnergy}`})]}),St.jsxs("div",{className:"mb-4",children:[St.jsx("h2",{className:"text-lg font-semibold mb-2",children:"User Information"}),St.jsx("p",{className:"text-sm",children:S.stats.username||"Guest"})]}),St.jsxs("div",{className:"mb-4",children:[St.jsx("h2",{className:"text-lg font-semibold mb-2",children:"General Information"}),St.jsx("p",{className:"text-sm",children:""})]}),St.jsxs("div",{className:"mb-4",children:[St.jsx("h2",{className:"text-lg font-semibold mb-2",children:"Inventory"}),UE(S.inventory.backpack,T,E,w)]}),St.jsxs("div",{className:"mb-4",children:[St.jsx("h2",{className:"text-lg font-semibold mb-2",children:"Equipment"}),GE(S.inventory.equipment,T,E,w)]}),t.id&&NE(t.id,t.position),c.id&&St.jsxs("div",{style:{top:c.position.y,left:c.position.x},className:"absolute bg-gray-700 text-white p-2 rounded shadow-lg z-50",children:[St.jsx("button",{onClick:O,className:"absolute top-1 right-1 translate-x-6 bg-yellow-400 p-1 text-white hover:text-gray-400",children:"X"}),St.jsx("p",{className:"text-sm strong",children:"Actions:"}),St.jsxs("ul",{className:"text-xs",children:[m.map(a=>St.jsx("li",{onClick:()=>c.id&&D(c.id,a),className:"cursor-pointer hover:bg-gray-600",children:a.charAt(0).toUpperCase()+a.slice(1)},a)),St.jsx("li",{onClick:O,className:"cursor-pointer hover:bg-gray-600",children:"Close"})]})]})]})]})},Gf=Uf(null),VE=()=>{const S=$i(Gf);$i(ne),ri.useEffect(()=>{const E=w=>{w&&Gf.set(w)};return Zt.on("npcInteraction",E),()=>{Zt.off("npcInteraction",E)}},[]);const T=E=>{if(S){const w=Rc.getActionHandler(E);w&&w(S)}};return St.jsx("div",{className:"transition ease-in-out duration-500 opacity-50 hover:opacity-100 fixed top-12 right-0 transform translate-y-12 -translate-x-10 w-[350px] p-4 bg-zinc-800 text-yellow-400 border border-yellow-300 rounded-lg z-50",children:St.jsxs("div",{className:"mb-4",children:[St.jsx("h2",{className:"text-lg font-semibold mb-2",children:"Actions"}),S&&S.npcName?St.jsxs("div",{className:"mb-4",children:[St.jsx("h3",{className:"text-md font-semibold",children:`Actions for ${S.npcName}`}),S.actions.map((E,w)=>St.jsxs("button",{className:"relative w-full m-1 p-2 px-5 py-3 overflow-hidden font-medium text-yellow-600 bg-yellow-100 border border-yellow-100 rounded-lg shadow-inner group",onClick:()=>T(E),children:[St.jsx("span",{className:"absolute top-0 left-0 w-0 h-0 transition-all duration-200 border-t-2 border-yellow-600 group-hover:w-full ease"}),St.jsx("span",{className:"absolute bottom-0 right-0 w-0 h-0 transition-all duration-200 border-b-2 border-yellow-600 group-hover:w-full ease"}),St.jsx("span",{className:"absolute top-0 left-0 w-full h-0 transition-all duration-300 delay-200 bg-yellow-600 group-hover:h-full ease"}),St.jsx("span",{className:"absolute bottom-0 left-0 w-full h-0 transition-all duration-300 delay-200 bg-yellow-600 group-hover:h-full ease"}),St.jsx("span",{className:"absolute inset-0 w-full h-full duration-300 delay-300 bg-yellow-900 opacity-0 group-hover:opacity-100"}),St.jsx("span",{className:"relative transition-colors duration-300 delay-200 group-hover:text-white ease",children:E})]},w))]}):St.jsx("div",{children:St.jsx("p",{children:"No actions available"})})]})})},WE=()=>{const S=$i(hs);ri.useEffect(()=>{const E=w=>{if(w){const O=Date.now()+Math.random();hs.set([...hs.get(),{id:O,...w}]),setTimeout(()=>{hs.set(hs.get().filter(D=>D.id!==O))},5e3)}};return Zt.on("notification",E),()=>{Zt.off("notification",E)}},[]);const T=E=>{hs.set(hs.get().filter(w=>w.id!==E))};return St.jsx("div",{className:"fixed inset-x-0 bottom-0 z-50 m-4 space-y-2",children:Array.isArray(S)&&S.map(E=>St.jsx("div",{className:`hs-removing:translate-x-5 hs-removing:opacity-0 transition duration-300 max-w-xs border rounded-xl shadow-lg ${E.notificationType.color}`,role:"alert",children:St.jsxs("div",{className:"flex p-4",children:[St.jsx("img",{src:E.notificationType.imgUrl,alt:E.notificationType.type,className:"flex-shrink-0 size-4"}),St.jsxs("div",{className:"ms-2",children:[St.jsx("h3",{className:"text-sm font-bold",children:E.title}),St.jsx("p",{className:"text-sm",children:E.message})]}),St.jsx("div",{className:"ms-auto",children:St.jsxs("button",{type:"button",className:"inline-flex flex-shrink-0 justify-center items-center size-5 rounded-lg text-gray-800 opacity-50 hover:opacity-100 focus:outline-none focus:opacity-100 dark:text-white",onClick:()=>T(E.id),children:[St.jsx("span",{className:"sr-only",children:"Close"}),St.jsxs("svg",{className:"flex-shrink-0 size-4 bg-zinc-900",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[St.jsx("path",{d:"M18 6 6 18"}),St.jsx("path",{d:"m6 6 12 12"})]})]})})]})},E.id))})},YE=Pr.div` - // Your style here -`;function _E(){return St.jsxs(YE,{children:[St.jsx(XE,{}),St.jsx("div",{className:"flex justify-center items-center h-screen",children:St.jsxs("div",{className:"border-4 border-yellow-500 rounded-xl",children:[St.jsx(BE,{}),St.jsx(WE,{})]})}),St.jsx(VE,{}),St.jsx(bE,{})]})}export{_E as default}; diff --git a/docs/_astro/App.e6qOYV-K.js b/docs/_astro/App.e6qOYV-K.js new file mode 100644 index 0000000..f45dfb7 --- /dev/null +++ b/docs/_astro/App.e6qOYV-K.js @@ -0,0 +1,10214 @@ +import{j as kt}from"./jsx-runtime.BFYNFNPI.js";import{g as xm,r as Sm,a as ie,c as yb}from"./index.DIpCM_17.js";import{p as xb,a as Ax}from"./index.DxhZiom7.js";import{t as kn}from"./index.BH1EYZ08.js";var mM={exports:{}},Ei={};/** + * @license React + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var wx=Symbol.for("react.element"),Px=Symbol.for("react.portal"),Tm=Symbol.for("react.fragment"),Em=Symbol.for("react.strict_mode"),Mm=Symbol.for("react.profiler"),Cm=Symbol.for("react.provider"),Am=Symbol.for("react.context"),Sb=Symbol.for("react.server_context"),wm=Symbol.for("react.forward_ref"),Pm=Symbol.for("react.suspense"),Rm=Symbol.for("react.suspense_list"),Lm=Symbol.for("react.memo"),bm=Symbol.for("react.lazy"),Tb=Symbol.for("react.offscreen"),gM;gM=Symbol.for("react.module.reference");function Fs(g){if(typeof g=="object"&&g!==null){var e=g.$$typeof;switch(e){case wx:switch(g=g.type,g){case Tm:case Mm:case Em:case Pm:case Rm:return g;default:switch(g=g&&g.$$typeof,g){case Sb:case Am:case wm:case bm:case Lm:case Cm:return g;default:return e}}case Px:return e}}}Ei.ContextConsumer=Am;Ei.ContextProvider=Cm;Ei.Element=wx;Ei.ForwardRef=wm;Ei.Fragment=Tm;Ei.Lazy=bm;Ei.Memo=Lm;Ei.Portal=Px;Ei.Profiler=Mm;Ei.StrictMode=Em;Ei.Suspense=Pm;Ei.SuspenseList=Rm;Ei.isAsyncMode=function(){return!1};Ei.isConcurrentMode=function(){return!1};Ei.isContextConsumer=function(g){return Fs(g)===Am};Ei.isContextProvider=function(g){return Fs(g)===Cm};Ei.isElement=function(g){return typeof g=="object"&&g!==null&&g.$$typeof===wx};Ei.isForwardRef=function(g){return Fs(g)===wm};Ei.isFragment=function(g){return Fs(g)===Tm};Ei.isLazy=function(g){return Fs(g)===bm};Ei.isMemo=function(g){return Fs(g)===Lm};Ei.isPortal=function(g){return Fs(g)===Px};Ei.isProfiler=function(g){return Fs(g)===Mm};Ei.isStrictMode=function(g){return Fs(g)===Em};Ei.isSuspense=function(g){return Fs(g)===Pm};Ei.isSuspenseList=function(g){return Fs(g)===Rm};Ei.isValidElementType=function(g){return typeof g=="string"||typeof g=="function"||g===Tm||g===Mm||g===Em||g===Pm||g===Rm||g===Tb||typeof g=="object"&&g!==null&&(g.$$typeof===bm||g.$$typeof===Lm||g.$$typeof===Cm||g.$$typeof===Am||g.$$typeof===wm||g.$$typeof===gM||g.getModuleId!==void 0)};Ei.typeOf=Fs;mM.exports=Ei;var yM=mM.exports;function Eb(g){function e(Q,Y,K,U,V){for(var j=0,$=0,q=0,it=0,nt,et,ht=0,ut=0,dt,mt=dt=nt=0,gt=0,At=0,ot=0,st=0,yt=K.length,Tt=yt-1,wt,Et="",Gt="",Wt="",Jt="",$t;gtnt)&&(st=(Et=Et.replace(" ",":")).length),0U&&(U=(Y=Y.trim()).charCodeAt(0)),U){case 38:return Y.replace(s,"$1"+Q.trim());case 58:return Q.trim()+Y.replace(s,"$1"+Q.trim());default:if(0<1*K&&0$.charCodeAt(8))break;case 115:V=V.replace($,"-webkit-"+$)+";"+V;break;case 207:case 102:V=V.replace($,"-webkit-"+(102K.charCodeAt(0)&&(K=K.trim()),J=K,K=[J],01?e-1:0),x=1;x0?" Args: "+i.join(", "):""))}var Wb=function(){function g(i){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=i}var e=g.prototype;return e.indexOfGroup=function(i){for(var x=0,T=0;T=this.groupSizes.length){for(var T=this.groupSizes,E=T.length,a=E;i>=a;)(a<<=1)<0&&xd(16,""+i);this.groupSizes=new Uint32Array(a),this.groupSizes.set(T),this.length=a;for(var y=E;y=this.length||this.groupSizes[i]===0)return x;for(var T=this.groupSizes[i],E=this.indexOfGroup(i),a=E+T,y=E;y=Nc&&(Nc=e+1),Gv.set(g,e),im.set(e,g)},kb="style["+of+'][data-styled-version="5.3.6"]',Kb=new RegExp("^"+of+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),jb=function(g,e,i){for(var x,T=i.split(","),E=0,a=T.length;E=0;r--){var p=t[r];if(p&&p.nodeType===1&&p.hasAttribute(of))return p}}(i),E=T!==void 0?T.nextSibling:null;x.setAttribute(of,"active"),x.setAttribute("data-styled-version","5.3.6");var a=Jb();return a&&x.setAttribute("nonce",a),i.insertBefore(x,E),x},$b=function(){function g(i){var x=this.element=MM(i);x.appendChild(document.createTextNode("")),this.sheet=function(T){if(T.sheet)return T.sheet;for(var E=document.styleSheets,a=0,y=E.length;a=0){var T=document.createTextNode(x),E=this.nodes[i];return this.element.insertBefore(T,E||null),this.length++,!0}return!1},e.deleteRule=function(i){this.element.removeChild(this.nodes[i]),this.length--},e.getRule=function(i){return i0&&(h+=o+",")}),E+=""+r+p+'{content:"'+h+`"}/*!sc*/ +`}}}return E}(this)},g}(),tF=/(a)(d)/gi,VS=function(g){return String.fromCharCode(g+(g>25?39:97))};function vy(g){var e,i="";for(e=Math.abs(g);e>52;e=e/52|0)i=VS(e%52)+i;return(VS(e%52)+i).replace(tF,"$1-$2")}var Ju=function(g,e){for(var i=e.length;i;)g=33*g^e.charCodeAt(--i);return g},AM=function(g){return Ju(5381,g)};function eF(g){for(var e=0;e>>0);if(!i.hasNameForId(T,y)){var t=x(a,"."+y,void 0,T);i.insertRules(T,y,t)}E.push(y),this.staticRulesId=y}else{for(var r=this.rules.length,p=Ju(this.baseHash,x.hash),h="",o=0;o>>0);if(!i.hasNameForId(T,f)){var s=x(h,"."+f,void 0,T);i.insertRules(T,f,s)}E.push(f)}}return E.join(" ")},g}(),rF=/^\s*\/\/.*$/gm,sF=[":","[",".","#"];function aF(g){var e,i,x,T,E=g===void 0?el:g,a=E.options,y=a===void 0?el:a,t=E.plugins,r=t===void 0?em:t,p=new Eb(y),h=[],o=function(u){function f(s){if(s)try{u(s+"}")}catch{}}return function(s,c,d,v,m,S,M,A,C,w){switch(s){case 1:if(C===0&&c.charCodeAt(0)===64)return u(c+";"),"";break;case 2:if(A===0)return c+"/*|*/";break;case 3:switch(A){case 102:case 112:return u(d[0]+c),"";default:return c+(w===0?"/*|*/":"")}case-2:c.split("/*|*/}").forEach(f)}}}(function(u){h.push(u)}),l=function(u,f,s){return f===0&&sF.indexOf(s[i.length])!==-1||s.match(T)?u:"."+e};function n(u,f,s,c){c===void 0&&(c="&");var d=u.replace(rF,""),v=f&&s?s+" "+f+" { "+d+" }":d;return e=c,i=f,x=new RegExp("\\"+i+"\\b","g"),T=new RegExp("(\\"+i+"\\b){2,}"),p(s||!f?"":f,v)}return p.use([].concat(r,[function(u,f,s){u===2&&s.length&&s[0].lastIndexOf(i)>0&&(s[0]=s[0].replace(x,l))},o,function(u){if(u===-2){var f=h;return h=[],f}}])),n.hash=r.length?r.reduce(function(u,f){return f.name||xd(15),Ju(u,f.name)},5381).toString():"",n}var wM=Sm.createContext();wM.Consumer;var PM=Sm.createContext(),oF=(PM.Consumer,new CM),my=aF();function lF(){return ie.useContext(wM)||oF}function hF(){return ie.useContext(PM)||my}var uF=function(){function g(e,i){var x=this;this.inject=function(T,E){E===void 0&&(E=my);var a=x.name+E.hash;T.hasNameForId(x.id,a)||T.insertRules(x.id,a,E(x.rules,a,"@keyframes"))},this.toString=function(){return xd(12,String(x.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=i}return g.prototype.getName=function(e){return e===void 0&&(e=my),this.name+e.hash},g}(),fF=/([A-Z])/,cF=/([A-Z])/g,dF=/^ms-/,pF=function(g){return"-"+g.toLowerCase()};function HS(g){return fF.test(g)?g.replace(cF,pF).replace(dF,"-ms-"):g}var WS=function(g){return g==null||g===!1||g===""};function lf(g,e,i,x){if(Array.isArray(g)){for(var T,E=[],a=0,y=g.length;a1?e-1:0),x=1;x?@[\\\]^`{|}~-]+/g,yF=/(^-|-$)/g;function u0(g){return g.replace(gF,"-").replace(yF,"")}var xF=function(g){return vy(AM(g)>>>0)};function Xp(g){return typeof g=="string"&&!0}var gy=function(g){return typeof g=="function"||typeof g=="object"&&g!==null&&!Array.isArray(g)},SF=function(g){return g!=="__proto__"&&g!=="constructor"&&g!=="prototype"};function TF(g,e,i){var x=g[i];gy(e)&&gy(x)?RM(x,e):g[i]=e}function RM(g){for(var e=arguments.length,i=new Array(e>1?e-1:0),x=1;x=0||(w[A]=S[A]);return w}(e,["componentId"]),m=d&&d+"-"+(Xp(c)?c:u0(zS(c)));return bM(c,to({},v,{attrs:o,componentId:m}),i)},Object.defineProperty(n,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(c){this._foldedDefaultProps=x?RM({},g.defaultProps,c):c}}),n.toString=function(){return"."+n.styledComponentId},T&&Vb(n,g,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),n}var nm=function(g){return function e(i,x,T){if(T===void 0&&(T=el),!yM.isValidElementType(x))return xd(1,String(x));var E=function(){return i(x,T,vF.apply(void 0,arguments))};return E.withConfig=function(a){return e(i,x,to({},T,{},a))},E.attrs=function(a){return e(i,x,to({},T,{attrs:Array.prototype.concat(T.attrs,a).filter(Boolean)}))},E}(bM,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){nm[g]=nm(g)});var FM={exports:{}};(function(g,e){(function(x,T){g.exports=T()})(yb,()=>(()=>{var i={50792:a=>{var y=Object.prototype.hasOwnProperty,t="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(t=!1));function p(n,u,f){this.fn=n,this.context=u,this.once=f||!1}function h(n,u,f,s,c){if(typeof f!="function")throw new TypeError("The listener must be a function");var d=new p(f,s||n,c),v=t?t+u:u;return n._events[v]?n._events[v].fn?n._events[v]=[n._events[v],d]:n._events[v].push(d):(n._events[v]=d,n._eventsCount++),n}function o(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,s;if(this._eventsCount===0)return u;for(s in f=this._events)y.call(f,s)&&u.push(t?s.slice(1):s);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(f)):u},l.prototype.listeners=function(u){var f=t?t+u:u,s=this._events[f];if(!s)return[];if(s.fn)return[s.fn];for(var c=0,d=s.length,v=new Array(d);c{/** + * @author samme + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(38829),p=function(h,o,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} + */var r=t(66979),p=function(h,o,l,n,u){return r(h,"angle",o,l,n,u)};a.exports=p},60757:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){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(t,r,p){p===void 0&&(p=0);for(var h=p;h{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){p===void 0&&(p=0);for(var h=t.length-1;h>=p;h--){var o=t[h],l=!0;for(var n in r)o[n]!==r[n]&&(l=!1);if(l)return o}return null};a.exports=y},94420:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(11879),p=t(60461),h=t(95540),o=t(29747),l=t(41481),n=new l({sys:{queueDepthSort:o,events:{once:o}}},0,0,1,1).setOrigin(0,0),u=function(f,s){s===void 0&&(s={});var c=s.hasOwnProperty("width"),d=s.hasOwnProperty("height"),v=h(s,"width",-1),m=h(s,"height",-1),S=h(s,"cellWidth",1),M=h(s,"cellHeight",S),A=h(s,"position",p.TOP_LEFT),C=h(s,"x",0),w=h(s,"y",0),P=0,L=0,O=v*S,I=m*M;n.setPosition(C,w),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=t(66979),p=function(h,o,l,n,u){return r(h,"alpha",o,l,n,u)};a.exports=p},67285:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(66979),p=function(h,o,l,n,u){return r(h,"x",o,l,n,u)};a.exports=p},9074:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(66979),p=function(h,o,l,n,u,f,s){return l==null&&(l=o),r(h,"x",o,n,f,s),r(h,"y",l,u,f,s)};a.exports=p},75222:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(66979),p=function(h,o,l,n,u){return r(h,"y",o,l,n,u)};a.exports=p},22983:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p,h){p===void 0&&(p=0),h===void 0&&(h=6.28);for(var o=p,l=(h-p)/t.length,n=r.x,u=r.y,f=r.radius,s=0;s{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p,h){p===void 0&&(p=0),h===void 0&&(h=6.28);for(var o=p,l=(h-p)/t.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=t(15258),p=t(26708),h=function(o,l,n){var u;n?u=p(l,n,o.length):u=r(l,o.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=t(14649),p=t(86003),h=t(49498),o=function(l,n,u){u===void 0&&(u=0);var f=r(n,!1,l.length);u>0?p(f,u):u<0&&h(f,Math.abs(u));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=t(84993),p=function(h,o,l){var n=r({x1:o.x1,y1:o.y1,x2:o.x2,y2:o.y2},l),u=r({x1:o.x2,y1:o.y2,x2:o.x3,y2:o.y3},l),f=r({x1:o.x3,y1:o.y3,x2:o.x1,y2:o.y1},l);n.pop(),u.pop(),f.pop(),n=n.concat(u,f);for(var s=n.length/h.length,c=0,d=0;d{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){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(t,r,p,h,o,l){h===void 0&&(h=0),o===void 0&&(o=0),l===void 0&&(l=1);var n,u=0,f=t.length;if(l===1)for(n=o;n=0;n--)t[n][r]+=p+u*h,u++;return t};a.exports=y},43967:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p,h,o,l){h===void 0&&(h=0),o===void 0&&(o=0),l===void 0&&(l=1);var n,u=0,f=t.length;if(l===1)for(n=o;n=0;n--)t[n][r]=p+u*h,u++;return t};a.exports=y},88926:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(28176),p=function(h,o){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=t(24820),p=function(h,o){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=t(65822),p=function(h,o){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=t(26597),p=function(h,o){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=t(90260),p=function(h,o){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=t(66979),p=function(h,o,l,n,u){return r(h,"rotation",o,l,n,u)};a.exports=p},91051:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(1163),p=t(20339),h=function(o,l,n){for(var u=l.x,f=l.y,s=0;s{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(1163),p=function(h,o,l,n){var u=o.x,f=o.y;if(n===0)return h;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=t(66979),p=function(h,o,l,n,u){return r(h,"scaleX",o,l,n,u)};a.exports=p},94868:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(66979),p=function(h,o,l,n,u,f,s){return l==null&&(l=o),r(h,"scaleX",o,n,f,s),r(h,"scaleY",l,u,f,s)};a.exports=p},95532:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(66979),p=function(h,o,l,n,u){return r(h,"scaleY",o,l,n,u)};a.exports=p},8689:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(43967),p=function(h,o,l,n,u){return r(h,"alpha",o,l,n,u)};a.exports=p},2645:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(43967),p=function(h,o,l,n){return r(h,"blendMode",o,0,l,n)};a.exports=p},32372:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(43967),p=function(h,o,l,n,u){return r(h,"depth",o,l,n,u)};a.exports=p},85373:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){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=t(43967),p=function(h,o,l,n,u,f,s){return l==null&&(l=o),r(h,"originX",o,n,f,s),r(h,"originY",l,u,f,s),h.forEach(function(c){c.updateDisplayOrigin()}),h};a.exports=p},79939:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(43967),p=function(h,o,l,n,u){return r(h,"rotation",o,l,n,u)};a.exports=p},2699:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(43967),p=function(h,o,l,n,u,f,s){return l==null&&(l=o),r(h,"scaleX",o,n,f,s),r(h,"scaleY",l,u,f,s)};a.exports=p},98739:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(43967),p=function(h,o,l,n,u){return r(h,"scaleX",o,l,n,u)};a.exports=p},98476:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(43967),p=function(h,o,l,n,u){return r(h,"scaleY",o,l,n,u)};a.exports=p},6207:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(43967),p=function(h,o,l,n,u,f,s){return l==null&&(l=o),r(h,"scrollFactorX",o,n,f,s),r(h,"scrollFactorY",l,u,f,s)};a.exports=p},6607:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(43967),p=function(h,o,l,n,u){return r(h,"scrollFactorX",o,l,n,u)};a.exports=p},72248:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(43967),p=function(h,o,l,n,u){return r(h,"scrollFactorY",o,l,n,u)};a.exports=p},14036:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p,h,o){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=t(43967),p=function(h,o,l,n){return r(h,"visible",o,0,l,n)};a.exports=p},77597:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(43967),p=function(h,o,l,n,u){return r(h,"x",o,l,n,u)};a.exports=p},83194:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(43967),p=function(h,o,l,n,u,f,s){return l==null&&(l=o),r(h,"x",o,n,f,s),r(h,"y",l,u,f,s)};a.exports=p},67678:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(43967),p=function(h,o,l,n,u){return r(h,"y",o,l,n,u)};a.exports=p},35850:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(26099),p=function(h,o,l,n,u){n===void 0&&(n=0),u===void 0&&(u=new r);var f,s,c=h.length;if(c===1)f=h[0].x,s=h[0].y,h[0].x=o,h[0].y=l;else{var d=1,v=0;n===0&&(v=c-1,d=c-2),f=h[v].x,s=h[v].y,h[v].x=o,h[v].y=l;for(var m=0;m=c||d===-1)){var S=h[d],M=S.x,A=S.y;S.x=f,S.y=s,f=M,s=A,n===0?d--:d++}}return u.x=f,u.y=s,u};a.exports=p},8628:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(33680),p=function(h){return r(h)};a.exports=p},21837:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(7602),p=function(h,o,l,n,u){u===void 0&&(u=!1);var f=Math.abs(n-l)/h.length,s;if(u)for(s=0;s{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(54261),p=function(h,o,l,n,u){u===void 0&&(u=!1);var f=Math.abs(n-l)/h.length,s;if(u)for(s=0;s{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p,h,o){if(o===void 0&&(o=!1),t.length===0)return t;if(t.length===1)return o?t[0][r]+=(h+p)/2:t[0][r]=(h+p)/2,t;var l=Math.abs(h-p)/(t.length-1),n;if(o)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(t){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=t(15994),p=function(h,o,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} + */a.exports={AlignTo:t(11517),Angle:t(80318),Call:t(60757),GetFirst:t(69927),GetLast:t(32265),GridAlign:t(94420),IncAlpha:t(41721),IncX:t(67285),IncXY:t(9074),IncY:t(75222),PlaceOnCircle:t(22983),PlaceOnEllipse:t(95253),PlaceOnLine:t(88505),PlaceOnRectangle:t(41346),PlaceOnTriangle:t(11575),PlayAnimation:t(29953),PropertyValueInc:t(66979),PropertyValueSet:t(43967),RandomCircle:t(88926),RandomEllipse:t(33286),RandomLine:t(96e3),RandomRectangle:t(28789),RandomTriangle:t(97154),Rotate:t(20510),RotateAround:t(91051),RotateAroundDistance:t(76332),ScaleX:t(61619),ScaleXY:t(94868),ScaleY:t(95532),SetAlpha:t(8689),SetBlendMode:t(2645),SetDepth:t(32372),SetHitArea:t(85373),SetOrigin:t(81583),SetRotation:t(79939),SetScale:t(2699),SetScaleX:t(98739),SetScaleY:t(98476),SetScrollFactor:t(6207),SetScrollFactorX:t(6607),SetScrollFactorY:t(72248),SetTint:t(14036),SetVisible:t(50159),SetX:t(77597),SetXY:t(83194),SetY:t(67678),ShiftPosition:t(35850),Shuffle:t(8628),SmootherStep:t(21910),SmoothStep:t(21837),Spread:t(62054),ToggleVisible:t(79815),WrapInRectangle:t(39665)}},42099:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(45319),p=t(83419),h=t(74943),o=t(81957),l=t(41138),n=t(35154),u=t(90126),f=new p({initialize:function(c,d,v){this.manager=c,this.key=d,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(s,c,d,v){d===null&&v===null?(s.frameRate=24,s.duration=24/c*1e3):d&&v===null?(s.duration=d,s.frameRate=c/(d/1e3)):(s.frameRate=v,s.duration=c/v*1e3),s.msPerFrame=1e3/s.frameRate},addFrame:function(s){return this.addFrameAt(this.frames.length,s)},addFrameAt:function(s,c){var d=this.getFrames(this.manager.textureManager,c);if(d.length>0){if(s===0)this.frames=d.concat(this.frames);else if(s===this.frames.length)this.frames=this.frames.concat(d);else{var v=this.frames.slice(0,s),m=this.frames.slice(s);this.frames=v.concat(d,m)}this.updateFrameSequence()}return this},checkFrame:function(s){return s>=0&&s0){M.isLast=!0,M.nextFrame=m[0],m[0].prevFrame=M;var G=1/(m.length-1);for(C=0;C0?s.inReverse&&s.forward?s.forward=!1:this.repeatAnimation(s):s.complete():this.updateAndGetNextTick(s,c.nextFrame)},handleYoyoFrame:function(s,c){if(c||(c=!1),s.inReverse===!c&&s.repeatCounter>0){(s.repeatDelay===0||s.pendingRepeat)&&(s.forward=c),this.repeatAnimation(s);return}if(s.inReverse!==c&&s.repeatCounter===0){s.complete();return}s.forward=c;var d=c?s.currentFrame.nextFrame:s.currentFrame.prevFrame;this.updateAndGetNextTick(s,d)},getLastFrame:function(){return this.frames[this.frames.length-1]},previousFrame:function(s){var c=s.currentFrame;c.isFirst?s.yoyo?this.handleYoyoFrame(s,!0):s.repeatCounter>0?s.inReverse&&!s.forward?this.repeatAnimation(s):(s.forward=!0,this.repeatAnimation(s)):s.complete():this.updateAndGetNextTick(s,c.prevFrame)},updateAndGetNextTick:function(s,c){s.setCurrentFrame(c),this.getNextTick(s)},removeFrame:function(s){var c=this.frames.indexOf(s);return c!==-1&&this.removeFrameAt(c),this},removeFrameAt:function(s){return this.frames.splice(s,1),this.updateFrameSequence(),this},repeatAnimation:function(s){if(s._pendingStop===2){if(s._pendingStopValue===0)return s.stop();s._pendingStopValue--}s.repeatDelay>0&&!s.pendingRepeat?(s.pendingRepeat=!0,s.accumulator-=s.nextTick,s.nextTick+=s.repeatDelay):(s.repeatCounter--,s.forward?s.setCurrentFrame(s.currentFrame.nextFrame):s.setCurrentFrame(s.currentFrame.prevFrame),s.isPlaying&&(this.getNextTick(s),s.handleRepeat()))},toJSON:function(){var s={key:this.key,type:this.type,frames:[],frameRate:this.frameRate,duration:this.duration,skipMissedFrames:this.skipMissedFrames,delay:this.delay,repeat:this.repeat,repeatDelay:this.repeatDelay,yoyo:this.yoyo,showBeforeDelay:this.showBeforeDelay,showOnStart:this.showOnStart,randomFrame:this.randomFrame,hideOnComplete:this.hideOnComplete};return this.frames.forEach(function(c){s.frames.push(c.toJSON())}),s},updateFrameSequence:function(){for(var s=this.frames.length,c=1/(s-1),d,v=0;v1?(d.isLast=!0,d.prevFrame=this.frames[s-2],d.nextFrame=this.frames[0]):s>1&&(d.prevFrame=this.frames[v-1],d.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 s=0;s{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=new r({initialize:function(o,l,n,u,f){f===void 0&&(f=!1),this.textureKey=o,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}});a.exports=p},60848:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(42099),p=t(83419),h=t(90330),o=t(50792),l=t(74943),n=t(8443),u=t(95540),f=t(35154),s=t(36383),c=t(20283),d=t(41836),v=new p({Extends:o,initialize:function(S){o.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 A=this.anims,C=this.mixes,w=typeof m=="string"?m:m.key,P=typeof S=="string"?S:S.key;if(A.has(w)&&A.has(P)){var L=C.get(w);L||(L={}),L[P]=M,C.set(w,L)}return this},removeMix:function(m,S){var M=this.mixes,A=typeof m=="string"?m:m.key,C=M.get(A);if(C)if(S){var w=typeof S=="string"?S:S.key;C.hasOwnProperty(w)&&delete C[w]}else S||M.delete(A);return this},getMix:function(m,S){var M=this.mixes,A=typeof m=="string"?m:m.key,C=typeof S=="string"?S:S.key,w=M.get(A);return w&&w.hasOwnProperty(C)?w[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 A=[],C=this.game.cache.json.get(m);if(!C)return console.warn("No Aseprite data found for: "+m),A;var w=this,P=f(C,"meta",null),L=f(C,"frames",null);if(P&&L){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),W=u(I,"direction","forward");if(B&&(!S||S&&S.indexOf(B)>-1)){for(var k=0,J=G;J<=z;J++){var Q=J.toString(),Y=L[Q];if(Y){var K=u(Y,"duration",s.MAX_SAFE_INTEGER);D.push({key:m,frame:Q,duration:K}),k+=K}}W==="reverse"&&(D=D.reverse());var U={key:B,frames:D,duration:k,yoyo:W==="pingpong"},V;M?M.anims&&(V=M.anims.create(U)):V=w.create(U),V&&A.push(V)}})}return A},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 A=0;A{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(42099),p=t(30976),h=t(83419),o=t(90330),l=t(74943),n=t(95540),u=new h({initialize:function(s){this.parent=s,this.animationManager=s.scene.sys.anims,this.animationManager.on(l.REMOVE_ANIMATION,this.globalRemove,this),this.textureManager=this.animationManager.textureManager,this.anims=null,this.isPlaying=!1,this.hasStarted=!1,this.currentAnim=null,this.currentFrame=null,this.nextAnim=null,this.nextAnimsQueue=[],this.timeScale=1,this.frameRate=0,this.duration=0,this.msPerFrame=0,this.skipMissedFrames=!0,this.randomFrame=!1,this.delay=0,this.repeat=0,this.repeatDelay=0,this.yoyo=!1,this.showBeforeDelay=!1,this.showOnStart=!1,this.hideOnComplete=!1,this.forward=!0,this.inReverse=!1,this.accumulator=0,this.nextTick=0,this.delayCounter=0,this.repeatCounter=0,this.pendingRepeat=!1,this._paused=!1,this._wasPlaying=!1,this._pendingStop=0,this._pendingStopValue},chain:function(f){var s=this.parent;if(f===void 0)return this.nextAnimsQueue.length=0,this.nextAnim=null,s;Array.isArray(f)||(f=[f]);for(var c=0;cv&&(M=0),this.randomFrame&&(M=p(0,v-1));var A=d.frames[M];M===0&&!this.forward&&(A=d.getLastFrame()),this.currentFrame=A}return this.parent},pause:function(f){return this._paused||(this._paused=!0,this._wasPlaying=this.isPlaying,this.isPlaying=!1),f!==void 0&&this.setCurrentFrame(f),this.parent},resume:function(f){return this._paused&&(this._paused=!1,this.isPlaying=this._wasPlaying),f!==void 0&&this.setCurrentFrame(f),this.parent},playAfterDelay:function(f,s){if(!this.isPlaying)this.delayCounter=s,this.play(f,!0);else{var c=this.nextAnim,d=this.nextAnimsQueue;c&&d.unshift(c),this.nextAnim=f,this._pendingStop=1,this._pendingStopValue=s}return this.parent},playAfterRepeat:function(f,s){if(s===void 0&&(s=1),!this.isPlaying)this.play(f);else{var c=this.nextAnim,d=this.nextAnimsQueue;c&&d.unshift(c),this.repeatCounter!==-1&&s>this.repeatCounter&&(s=this.repeatCounter),this.nextAnim=f,this._pendingStop=2,this._pendingStopValue=s}return this.parent},play:function(f,s){s===void 0&&(s=!1);var c=this.currentAnim,d=this.parent,v=typeof f=="string"?f:f.key;if(s&&this.isPlaying&&c.key===v)return d;if(c&&this.isPlaying){var m=this.animationManager.getMix(c.key,f);if(m>0)return this.playAfterDelay(f,m)}return this.forward=!0,this.inReverse=!1,this._paused=!1,this._wasPlaying=!0,this.startAnimation(f)},playReverse:function(f,s){s===void 0&&(s=!1);var c=typeof f=="string"?f:f.key;return s&&this.isPlaying&&this.currentAnim.key===c?this.parent:(this.forward=!1,this.inReverse=!0,this._paused=!1,this._wasPlaying=!0,this.startAnimation(f))},startAnimation:function(f){this.load(f);var s=this.currentAnim,c=this.parent;return s&&(this.repeatCounter=this.repeat===-1?Number.MAX_VALUE:this.repeat,s.getFirstTick(this),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!1,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.delayCounter+=this.delay,this.delayCounter===0?this.handleStart():this.showBeforeDelay&&this.setCurrentFrame(this.currentFrame)),c},handleStart:function(){this.showOnStart&&this.parent.setVisible(!0),this.setCurrentFrame(this.currentFrame),this.hasStarted=!0,this.emitEvents(l.ANIMATION_START)},handleRepeat:function(){this.pendingRepeat=!1,this.emitEvents(l.ANIMATION_REPEAT)},handleStop:function(){this._pendingStop=0,this.isPlaying=!1,this.emitEvents(l.ANIMATION_STOP)},handleComplete:function(){this._pendingStop=0,this.isPlaying=!1,this.hideOnComplete&&this.parent.setVisible(!1),this.emitEvents(l.ANIMATION_COMPLETE,l.ANIMATION_COMPLETE_KEY)},emitEvents:function(f,s){var c=this.currentAnim;if(c){var d=this.currentFrame,v=this.parent,m=d.textureFrame;v.emit(f,c,d,v,m),s&&v.emit(s+c.key,c,d,v,m)}},reverse:function(){return this.isPlaying&&(this.inReverse=!this.inReverse,this.forward=!this.forward),this.parent},getProgress:function(){var f=this.currentFrame;if(!f)return 0;var s=f.progress;return this.inReverse&&(s*=-1),s},setProgress:function(f){return this.forward||(f=1-f),this.setCurrentFrame(this.currentAnim.getFrameByProgress(f)),this.parent},setRepeat:function(f){return this.repeatCounter=f===-1?Number.MAX_VALUE:f,this.parent},globalRemove:function(f,s){s===void 0&&(s=this.currentAnim),this.isPlaying&&s.key===this.currentAnim.key&&(this.stop(),this.setCurrentFrame(this.currentAnim.frames[0]))},restart:function(f,s){f===void 0&&(f=!1),s===void 0&&(s=!1);var c=this.currentAnim,d=this.parent;return c?(s&&(this.repeatCounter=this.repeat===-1?Number.MAX_VALUE:this.repeat),c.getFirstTick(this),this.emitEvents(l.ANIMATION_RESTART),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!f,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.setCurrentFrame(c.frames[0]),this.parent):d},complete:function(){if(this._pendingStop=0,this.isPlaying=!1,this.currentAnim&&this.handleComplete(),this.nextAnim){var f=this.nextAnim;this.nextAnim=this.nextAnimsQueue.length>0?this.nextAnimsQueue.shift():null,this.play(f)}return this.parent},stop:function(){if(this._pendingStop=0,this.isPlaying=!1,this.delayCounter=0,this.currentAnim&&this.handleStop(),this.nextAnim){var f=this.nextAnim;this.nextAnim=this.nextAnimsQueue.shift(),this.play(f)}return this.parent},stopAfterDelay:function(f){return this._pendingStop=1,this._pendingStopValue=f,this.parent},stopAfterRepeat:function(f){return f===void 0&&(f=1),this.repeatCounter!==-1&&f>this.repeatCounter&&(f=this.repeatCounter),this._pendingStop=2,this._pendingStopValue=f,this.parent},stopOnFrame:function(f){return this._pendingStop=3,this._pendingStopValue=f,this.parent},getTotalFrames:function(){return this.currentAnim?this.currentAnim.getTotalFrames():0},update:function(f,s){var c=this.currentAnim;if(!(!this.isPlaying||!c||c.paused)){if(this.accumulator+=s*this.timeScale*this.animationManager.globalTimeScale,this._pendingStop===1&&(this._pendingStopValue-=s,this._pendingStopValue<=0))return this.stop();if(!this.hasStarted)this.accumulator>=this.delayCounter&&(this.accumulator-=this.delayCounter,this.handleStart());else if(this.accumulator>=this.nextTick&&(this.forward?c.nextFrame(this):c.previousFrame(this),this.isPlaying&&this._pendingStop===0&&this.skipMissedFrames&&this.accumulator>this.nextTick)){var d=0;do this.forward?c.nextFrame(this):c.previousFrame(this),d++;while(this.isPlaying&&this.accumulator>this.nextTick&&d<60)}}},setCurrentFrame:function(f){var s=this.parent;return this.currentFrame=f,s.texture=f.frame.texture,s.frame=f.frame,s.isCropped&&s.frame.updateCropUVs(s._crop,s.flipX,s.flipY),f.setAlpha&&(s.alpha=f.alpha),s.setSizeToFrame(),s._originComponent&&(f.frame.customPivot?s.setOrigin(f.frame.pivotX,f.frame.pivotY):s.updateDisplayOrigin()),this.isPlaying&&this.hasStarted&&(this.emitEvents(l.ANIMATION_UPDATE),this._pendingStop===3&&this._pendingStopValue===f&&this.stop()),s},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},get:function(f){return this.anims?this.anims.get(f):null},exists:function(f){return this.anims?this.anims.has(f):!1},create:function(f){var s=f.key,c=!1;return s&&(c=this.get(s),c?console.warn("Animation key already exists: "+s):(c=new r(this,s,f),this.anims||(this.anims=new o),this.anims.set(s,c))),c},createFromAseprite:function(f,s){return this.animationManager.createFromAseprite(f,s,this.parent)},generateFrameNames:function(f,s){return this.animationManager.generateFrameNames(f,s)},generateFrameNumbers:function(f,s){return this.animationManager.generateFrameNumbers(f,s)},remove:function(f){var s=this.get(f);return s&&(this.currentAnim===s&&this.stop(),this.anims.delete(f)),s},destroy:function(){this.animationManager.off(l.REMOVE_ANIMATION,this.globalRemove,this),this.anims&&this.anims.clear(),this.animationManager=null,this.parent=null,this.nextAnim=null,this.nextAnimsQueue.length=0,this.currentAnim=null,this.currentFrame=null},isPaused:{get:function(){return this._paused}}});a.exports=u},57090:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="add"},25312:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="animationcomplete"},89580:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="animationcomplete-"},52860:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="animationrepeat"},63850:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="animationrestart"},99085:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="animationstart"},28087:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="animationstop"},1794:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="animationupdate"},52562:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="pauseall"},57953:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="remove"},68339:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="resumeall"},74943:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={ADD_ANIMATION:t(57090),ANIMATION_COMPLETE:t(25312),ANIMATION_COMPLETE_KEY:t(89580),ANIMATION_REPEAT:t(52860),ANIMATION_RESTART:t(63850),ANIMATION_START:t(99085),ANIMATION_STOP:t(28087),ANIMATION_UPDATE:t(1794),PAUSE_ALL:t(52562),REMOVE_ANIMATION:t(57953),RESUME_ALL:t(68339)}},60421:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={Animation:t(42099),AnimationFrame:t(41138),AnimationManager:t(60848),AnimationState:t(9674),Events:t(74943)}},2161:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(90330),h=t(50792),o=t(24736),l=new r({initialize:function(){this.entries=new p,this.events=new h},add:function(n,u){return this.entries.set(n,u),this.events.emit(o.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(o.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}});a.exports=l},24047:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(2161),p=t(83419),h=t(8443),o=new p({initialize:function(n){this.game=n,this.binary=new r,this.bitmapFont=new r,this.json=new r,this.physics=new r,this.shader=new r,this.audio=new r,this.video=new r,this.text=new r,this.html=new r,this.obj=new r,this.tilemap=new r,this.xml=new r,this.custom={},this.game.events.once(h.DESTROY,this.destroy,this)},addCustom:function(l){return this.custom.hasOwnProperty(l)||(this.custom[l]=new r),this.custom[l]},destroy:function(){for(var l=["binary","bitmapFont","json","physics","shader","audio","video","text","html","obj","tilemap","xml"],n=0;n{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="add"},59261:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="remove"},24736:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={ADD:t(51464),REMOVE:t(59261)}},83388:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={BaseCache:t(2161),CacheManager:t(24047),Events:t(24736)}},71911:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(31401),h=t(39506),o=t(50792),l=t(19715),n=t(87841),u=t(61340),f=t(80333),s=t(26099),c=new r({Extends:o,Mixins:[p.AlphaSingle,p.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),o.call(this),this.scene,this.sceneManager,this.scaleManager,this.cameraManager,this.id=0,this.name="",this.roundPixels=!1,this.useBounds=!1,this.worldView=new 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 s(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(d){this.renderList.push(d)},setOrigin:function(d,v){return d===void 0&&(d=.5),v===void 0&&(v=d),this.originX=d,this.originY=v,this},getScroll:function(d,v,m){m===void 0&&(m=new s);var S=this.width*.5,M=this.height*.5;return m.x=d-S,m.y=v-M,this.useBounds&&(m.x=this.clampX(m.x),m.y=this.clampY(m.y)),m},centerOnX:function(d){var v=this.width*.5;return this.midPoint.x=d,this.scrollX=d-v,this.useBounds&&(this.scrollX=this.clampX(this.scrollX)),this},centerOnY:function(d){var v=this.height*.5;return this.midPoint.y=d,this.scrollY=d-v,this.useBounds&&(this.scrollY=this.clampY(this.scrollY)),this},centerOn:function(d,v){return this.centerOnX(d),this.centerOnY(v),this},centerToBounds:function(){if(this.useBounds){var d=this._bounds,v=this.width*.5,m=this.height*.5;this.midPoint.set(d.centerX,d.centerY),this.scrollX=d.centerX-v,this.scrollY=d.centerY-m}return this},centerToSize:function(){return this.scrollX=this.width*.5,this.scrollY=this.height*.5,this},cull:function(d){if(this.disableCull)return d;var v=this.matrix.matrix,m=v[0],S=v[1],M=v[2],A=v[3],C=m*A-S*M;if(!C)return d;var w=v[4],P=v[5],L=this.scrollX,O=this.scrollY,I=this.width,D=this.height,B=this.y,G=B+D,z=this.x,W=z+I,k=this.culledObjects,J=d.length;C=1/C,k.length=0;for(var Q=0;Qz&&$B&&qM&&(d=M),d},clampY:function(d){var v=this._bounds,m=this.displayHeight,S=v.y+(m-this.height)/2,M=Math.max(S,S+v.height-m);return dM&&(d=M),d},removeBounds:function(){return this.useBounds=!1,this.dirty=!0,this._bounds.setEmpty(),this},setAngle:function(d){return d===void 0&&(d=0),this.rotation=h(d),this},setBackgroundColor:function(d){return d===void 0&&(d="rgba(0,0,0,0)"),this.backgroundColor=f(d),this.transparent=this.backgroundColor.alpha===0,this},setBounds:function(d,v,m,S,M){return M===void 0&&(M=!1),this._bounds.setTo(d,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(d){d===void 0&&(d=new n);var v=this._bounds;return d.setTo(v.x,v.y,v.width,v.height),d},setName:function(d){return d===void 0&&(d=""),this.name=d,this},setPosition:function(d,v){return v===void 0&&(v=d),this.x=d,this.y=v,this},setRotation:function(d){return d===void 0&&(d=0),this.rotation=d,this},setRoundPixels:function(d){return this.roundPixels=d,this},setScene:function(d,v){v===void 0&&(v=!0),this.scene&&this._customViewport&&this.sceneManager.customViewports--,this.scene=d,this.isSceneCamera=v;var m=d.sys;return this.sceneManager=m.game.scene,this.scaleManager=m.scale,this.cameraManager=m.cameras,this.updateSystem(),this},setScroll:function(d,v){return v===void 0&&(v=d),this.scrollX=d,this.scrollY=v,this},setSize:function(d,v){return v===void 0&&(v=d),this.width=d,this.height=v,this},setViewport:function(d,v,m,S){return this.x=d,this.y=v,this.width=m,this.height=S,this},setZoom:function(d,v){return d===void 0&&(d=1),v===void 0&&(v=d),d===0&&(d=.001),v===0&&(v=.001),this.zoomX=d,this.zoomY=v,this},setMask:function(d,v){return v===void 0&&(v=!0),this.mask=d,this._maskCamera=v?this.cameraManager.default:this,this},clearMask:function(d){return d===void 0&&(d=!1),d&&this.mask&&this.mask.destroy(),this.mask=null,this},toJSON:function(){var d={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&&(d.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),d},update:function(){},setIsSceneCamera:function(d){return this.isSceneCamera=d,this},updateSystem:function(){if(!(!this.scaleManager||!this.isSceneCamera)){var d=this._x!==0||this._y!==0||this.scaleManager.width!==this._width||this.scaleManager.height!==this._height,v=this.sceneManager;d&&!this._customViewport?v.customViewports++:!d&&this._customViewport&&v.customViewports--,this.dirty=!0,this._customViewport=d}},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(d){this._x=d,this.updateSystem()}},y:{get:function(){return this._y},set:function(d){this._y=d,this.updateSystem()}},width:{get:function(){return this._width},set:function(d){this._width=d,this.updateSystem()}},height:{get:function(){return this._height},set:function(d){this._height=d,this.updateSystem()}},scrollX:{get:function(){return this._scrollX},set:function(d){d!==this._scrollX&&(this._scrollX=d,this.dirty=!0)}},scrollY:{get:function(){return this._scrollY},set:function(d){d!==this._scrollY&&(this._scrollY=d,this.dirty=!0)}},zoom:{get:function(){return(this._zoomX+this._zoomY)/2},set:function(d){this._zoomX=d,this._zoomY=d,this.dirty=!0}},zoomX:{get:function(){return this._zoomX},set:function(d){this._zoomX=d,this.dirty=!0}},zoomY:{get:function(){return this._zoomY},set:function(d){this._zoomY=d,this.dirty=!0}},rotation:{get:function(){return this._rotation},set:function(d){this._rotation=d,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}}});a.exports=c},38058:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(71911),p=t(67502),h=t(45319),o=t(83419),l=t(31401),n=t(20052),u=t(19715),f=t(28915),s=t(87841),c=t(26099),d=new o({Extends:r,Mixins:[l.PostPipeline],initialize:function(m,S,M,A){r.call(this,m,S,M,A),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 s(0,0,v,m),this._follow){var S=this.width/2,M=this.height/2,A=this._follow.x-this.followOffset.x,C=this._follow.y-this.followOffset.y;this.midPoint.set(A,C),this.scrollX=A-S,this.scrollY=C-M}p(this.deadzone,this.midPoint.x,this.midPoint.y)}return this},fadeIn:function(v,m,S,M,A,C){return this.fadeEffect.start(!1,v,m,S,M,!0,A,C)},fadeOut:function(v,m,S,M,A,C){return this.fadeEffect.start(!0,v,m,S,M,!0,A,C)},fadeFrom:function(v,m,S,M,A,C,w){return this.fadeEffect.start(!1,v,m,S,M,A,C,w)},fade:function(v,m,S,M,A,C,w){return this.fadeEffect.start(!0,v,m,S,M,A,C,w)},flash:function(v,m,S,M,A,C,w){return this.flashEffect.start(v,m,S,M,A,C,w)},shake:function(v,m,S,M,A){return this.shakeEffect.start(v,m,S,M,A)},pan:function(v,m,S,M,A,C,w){return this.panEffect.start(v,m,S,M,A,C,w)},rotateTo:function(v,m,S,M,A,C,w){return this.rotateToEffect.start(v,m,S,M,A,C,w)},zoomTo:function(v,m,S,M,A,C){return this.zoomEffect.start(v,m,S,M,A,C)},preRender:function(){this.renderList.length=0;var v=this.width,m=this.height,S=v*.5,M=m*.5,A=this.zoom,C=this.matrix,w=v*this.originX,P=m*this.originY,L=this._follow,O=this.deadzone,I=this.scrollX,D=this.scrollY;O&&p(O,this.midPoint.x,this.midPoint.y);var B=!1;if(L&&!this.panEffect.isRunning){var G=this.lerp,z=L.x-this.followOffset.x,W=L.y-this.followOffset.y;O?(zO.right&&(I=f(I,I+(z-O.right),G.x)),WO.bottom&&(D=f(D,D+(W-O.bottom),G.y))):(I=f(I,z-w,G.x),D=f(D,W-P,G.y)),B=!0}this.useBounds&&(I=this.clampX(I),D=this.clampY(D)),this.scrollX=I,this.scrollY=D;var k=I+S,J=D+M;this.midPoint.set(k,J);var Q=v/A,Y=m/A,K=Math.floor(k-Q/2),U=Math.floor(J-Y/2);this.worldView.setTo(K,U,Q,Y),C.applyITRS(Math.floor(this.x+w),Math.floor(this.y+P),this.rotation,A,A),C.translate(-w,-P),this.shakeEffect.preRender(),B&&this.emit(u.FOLLOW_UPDATE,this,L)},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,A,C){m===void 0&&(m=!1),S===void 0&&(S=1),M===void 0&&(M=S),A===void 0&&(A=0),C===void 0&&(C=A),this._follow=v,this.roundPixels=m,S=h(S,0,1),M=h(M,0,1),this.lerp.set(S,M),this.followOffset.set(A,C);var w=this.width/2,P=this.height/2,L=v.x-A,O=v.y-C;return this.midPoint.set(L,O),this.scrollX=L-w,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}});a.exports=d},32743:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(38058),p=t(83419),h=t(95540),o=t(37277),l=t(37303),n=t(97480),u=t(44594),f=new p({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 s=this.systems;s.settings.cameras?this.fromJSON(s.settings.cameras):this.add(),this.main=this.cameras[0],this.default=new r(0,0,s.scale.width,s.scale.height).setScene(this.scene),s.game.scale.on(n.RESIZE,this.onResize,this),this.systems.events.once(u.DESTROY,this.destroy,this)},start:function(){if(!this.main){var s=this.systems;s.settings.cameras?this.fromJSON(s.settings.cameras):this.add(),this.main=this.cameras[0]}var c=this.systems.events;c.on(u.UPDATE,this.update,this),c.once(u.SHUTDOWN,this.shutdown,this)},add:function(s,c,d,v,m,S){s===void 0&&(s=0),c===void 0&&(c=0),d===void 0&&(d=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(s,c,d,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(s,c){c===void 0&&(c=!1);var d=this.cameras.indexOf(s);return d===-1?(s.id=this.getNextID(),s.setRoundPixels(this.roundPixels),this.cameras.push(s),c&&(this.main=s),s):null},getNextID:function(){for(var s=this.cameras,c=1,d=0;d<32;d++){for(var v=!1,m=0;m0){S.preRender();var M=this.getVisibleChildren(c.getChildren(),S);s.render(d,M,S)}}},getVisibleChildren:function(s,c){return s.filter(function(d){return d.willRender(c)})},resetAll:function(){for(var s=0;s{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(45319),p=t(83419),h=t(19715),o=new p({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,s,c,d,v){if(l===void 0&&(l=!0),n===void 0&&(n=1e3),u===void 0&&(u=0),f===void 0&&(f=0),s===void 0&&(s=0),c===void 0&&(c=!1),d===void 0&&(d=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=s,this.alpha=l?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=d,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,s),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=t(45319),p=t(83419),h=t(19715),o=new p({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,s,c,d){return l===void 0&&(l=250),n===void 0&&(n=255),u===void 0&&(u=255),f===void 0&&(f=255),s===void 0&&(s=!1),c===void 0&&(c=null),d===void 0&&(d=this.camera.scene),!s&&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=d,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=t(45319),p=t(83419),h=t(62640),o=t(19715),l=t(26099),n=new p({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,s,c,d,v,m){s===void 0&&(s=1e3),c===void 0&&(c=h.Linear),d===void 0&&(d=!1),v===void 0&&(v=null),m===void 0&&(m=this.camera.scene);var S=this.camera;return!d&&this.isRunning||(this.isRunning=!0,this.duration=s,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(o.PAN_START,this.camera,this,s,u,f)),S},update:function(u,f){if(this.isRunning){this._elapsed+=f;var s=r(this._elapsed/this.duration,0,1);this.progress=s;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=t(45319),p=t(83419),h=t(19715),o=t(62640),l=new p({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,s,c,d,v){f===void 0&&(f=1e3),s===void 0&&(s=o.Linear),c===void 0&&(c=!1),d===void 0&&(d=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 s=="string"&&o.hasOwnProperty(s)?this.ease=o[s]:typeof s=="function"&&(this.ease=s),this._elapsed=0,this._onUpdate=d,this._onUpdateScope=v,this.shortestPath){var A=0,C=0;this.destination>this.source?A=Math.abs(this.destination-this.source):A=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,AC&&(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 s=this.camera;if(this._elapsed=S?d=Math.abs(m-S):d=Math.abs(m+v)-S;var M=0;this.clockwise?M=s.rotation+d*c:M=s.rotation-d*c,s.rotation=M,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,s,f,M)}else s.rotation=this.destination,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,s,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}});a.exports=l},30330:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(45319),p=t(83419),h=t(19715),o=t(26099),l=new p({initialize:function(u){this.camera=u,this.isRunning=!1,this.duration=0,this.intensity=new o,this.progress=0,this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate,this._onUpdateScope},start:function(n,u,f,s,c){return n===void 0&&(n=100),u===void 0&&(u=.05),f===void 0&&(f=!1),s===void 0&&(s=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=s,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=t(45319),p=t(83419),h=t(62640),o=t(19715),l=new p({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,s,c,d){u===void 0&&(u=1e3),f===void 0&&(f=h.Linear),s===void 0&&(s=!1),c===void 0&&(c=null),d===void 0&&(d=this.camera.scene);var v=this.camera;return!s&&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=d,this.camera.emit(o.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} + */a.exports={Fade:t(5020),Flash:t(10662),Pan:t(20359),Shake:t(30330),RotateTo:t(34208),Zoom:t(45641)}},16438:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="cameradestroy"},32726:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="camerafadeincomplete"},87807:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="camerafadeinstart"},45917:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="camerafadeoutcomplete"},95666:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="camerafadeoutstart"},47056:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="cameraflashcomplete"},91261:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="cameraflashstart"},45047:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="followupdate"},81927:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="camerapancomplete"},74264:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="camerapanstart"},54419:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="postrender"},79330:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="prerender"},93183:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="camerarotatecomplete"},80112:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="camerarotatestart"},62252:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="camerashakecomplete"},86017:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="camerashakestart"},539:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="camerazoomcomplete"},51892:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="camerazoomstart"},19715:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={DESTROY:t(16438),FADE_IN_COMPLETE:t(32726),FADE_IN_START:t(87807),FADE_OUT_COMPLETE:t(45917),FADE_OUT_START:t(95666),FLASH_COMPLETE:t(47056),FLASH_START:t(91261),FOLLOW_UPDATE:t(45047),PAN_COMPLETE:t(81927),PAN_START:t(74264),POST_RENDER:t(54419),PRE_RENDER:t(79330),ROTATE_COMPLETE:t(93183),ROTATE_START:t(80112),SHAKE_COMPLETE:t(62252),SHAKE_START:t(86017),ZOOM_COMPLETE:t(539),ZOOM_START:t(51892)}},87969:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={Camera:t(38058),BaseCamera:t(71911),CameraManager:t(32743),Effects:t(20052),Events:t(19715)}},63091:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(35154),h=new r({initialize:function(l){this.camera=p(l,"camera",null),this.left=p(l,"left",null),this.right=p(l,"right",null),this.up=p(l,"up",null),this.down=p(l,"down",null),this.zoomIn=p(l,"zoomIn",null),this.zoomOut=p(l,"zoomOut",null),this.zoomSpeed=p(l,"zoomSpeed",.01),this.minZoom=p(l,"minZoom",.001),this.maxZoom=p(l,"maxZoom",1e3),this.speedX=0,this.speedY=0;var n=p(l,"speed",null);typeof n=="number"?(this.speedX=n,this.speedY=n):(this.speedX=p(l,"speed.x",0),this.speedY=p(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(o){return this.camera=o,this},update:function(o){if(this.active){o===void 0&&(o=1);var l=this.camera;this.up&&this.up.isDown?l.scrollY-=this.speedY*o|0:this.down&&this.down.isDown&&(l.scrollY+=this.speedY*o|0),this.left&&this.left.isDown?l.scrollX-=this.speedX*o|0:this.right&&this.right.isDown&&(l.scrollX+=this.speedX*o|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}});a.exports=h},58818:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(35154),h=new r({initialize:function(l){this.camera=p(l,"camera",null),this.left=p(l,"left",null),this.right=p(l,"right",null),this.up=p(l,"up",null),this.down=p(l,"down",null),this.zoomIn=p(l,"zoomIn",null),this.zoomOut=p(l,"zoomOut",null),this.zoomSpeed=p(l,"zoomSpeed",.01),this.minZoom=p(l,"minZoom",.001),this.maxZoom=p(l,"maxZoom",1e3),this.accelX=0,this.accelY=0;var n=p(l,"acceleration",null);typeof n=="number"?(this.accelX=n,this.accelY=n):(this.accelX=p(l,"acceleration.x",0),this.accelY=p(l,"acceleration.y",0)),this.dragX=0,this.dragY=0;var u=p(l,"drag",null);typeof u=="number"?(this.dragX=u,this.dragY=u):(this.dragX=p(l,"drag.x",0),this.dragY=p(l,"drag.y",0)),this.maxSpeedX=0,this.maxSpeedY=0;var f=p(l,"maxSpeed",null);typeof f=="number"?(this.maxSpeedX=f,this.maxSpeedY=f):(this.maxSpeedX=p(l,"maxSpeed.x",0),this.maxSpeedY=p(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(o){return this.camera=o,this},update:function(o){if(this.active){o===void 0&&(o=1);var l=this.camera;this._speedX>0?(this._speedX-=this.dragX*o,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*o,this._speedX>0&&(this._speedX=0)),this._speedY>0?(this._speedY-=this.dragY*o,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*o,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*o|0),this._speedY!==0&&(l.scrollY-=this._speedY*o|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}});a.exports=h},38865:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={FixedKeyControl:t(63091),SmoothedKeyControl:t(58818)}},26638:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={Controls:t(38865),Scene2D:t(87969)}},8054:(a,y,t)=>{/** + * @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:t(10312),ScaleModes:t(29795),AUTO:0,CANVAS:1,WEBGL:2,HEADLESS:3,FOREVER:-1,NONE:4,UP:5,DOWN:6,LEFT:7,RIGHT:8};a.exports=r},69547:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(8054),h=t(42363),o=t(82264),l=t(95540),n=t(35154),u=t(41212),f=t(29747),s=t(75508),c=t(36060),d=t(80333),v=new r({initialize:function(S){S===void 0&&(S={});var M=["#ff0000","#ffff00","#00ff00","#00ffff","#000000"],A="#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",p.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()]),s.RND=new s.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=o.browser.es2019?1:0),o.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",o.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",A),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 w=n(S,"render",null);this.pipeline=n(w,"pipeline",null,S),this.autoMobilePipeline=n(w,"autoMobilePipeline",!0,S),this.defaultPipeline=n(w,"defaultPipeline",c.MULTI_PIPELINE,S),this.antialias=n(w,"antialias",!0,S),this.antialiasGL=n(w,"antialiasGL",!0,S),this.mipmapFilter=n(w,"mipmapFilter","",S),this.desynchronized=n(w,"desynchronized",!1,S),this.roundPixels=n(w,"roundPixels",!0,S),this.pixelArt=n(w,"pixelArt",this.zoom!==1,S),this.pixelArt&&(this.antialias=!1,this.antialiasGL=!1,this.roundPixels=!0),this.transparent=n(w,"transparent",!1,S),this.clearBeforeRender=n(w,"clearBeforeRender",!0,S),this.preserveDrawingBuffer=n(w,"preserveDrawingBuffer",!1,S),this.premultipliedAlpha=n(w,"premultipliedAlpha",!0,S),this.failIfMajorPerformanceCaveat=n(w,"failIfMajorPerformanceCaveat",!1,S),this.powerPreference=n(w,"powerPreference","default",S),this.batchSize=n(w,"batchSize",4096,S),this.maxTextures=n(w,"maxTextures",-1,S),this.maxLights=n(w,"maxLights",10,S);var P=n(S,"backgroundColor",0);this.backgroundColor=d(P),this.transparent&&(this.backgroundColor=d(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",o.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 L=n(S,"plugins",null),O=h.DefaultScene;L&&(Array.isArray(L)?this.defaultPlugins=L:u(L)&&(this.installGlobalPlugins=l(L,"global",[]),this.installScenePlugins=l(L,"scene",[]),Array.isArray(L.default)?O=L.default:Array.isArray(L.defaultMerge)&&(O=O.concat(L.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=p.WEBGL:window.FORCE_CANVAS&&(this.renderType=p.CANVAS))}});a.exports=v},86054:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(20623),p=t(27919),h=t(8054),o=t(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=o.webGL?h.WEBGL:h.CANVAS),u.renderType===h.WEBGL){if(!o.webGL)throw new Error("Cannot create WebGL context, aborting.")}else if(u.renderType===h.CANVAS){if(!o.canvas)throw new Error("Cannot create Canvas context, aborting.")}else throw new Error("Unknown value for renderer type: "+u.renderType);u.antialias||p.disableSmoothing();var f=n.scale.baseSize,s=f.width,c=f.height;if(u.canvas?(n.canvas=u.canvas,n.canvas.width=s,n.canvas.height=c):n.canvas=p.create(n,s,c,u.renderType),u.canvasStyle&&(n.canvas.style=u.canvasStyle),u.antialias||r.setCrisp(n.canvas),u.renderType!==h.HEADLESS){var d,v;d=t(68627),v=t(74797),u.renderType===h.WEBGL?n.renderer=new v(n):(n.renderer=new d(n),n.context=n.renderer.gameContext)}};a.exports=l},96391:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(8054),p=function(h){var o=h.config;if(!o.hideBanner){var l="WebGL";o.renderType===r.CANVAS?l="Canvas":o.renderType===r.HEADLESS&&(l="Headless");var n=o.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 s="",c=[s];if(Array.isArray(o.bannerBackgroundColor)){var d;o.bannerBackgroundColor.forEach(function(m){s=s.concat("%c "),c.push("background: "+m),d=m}),c[c.length-1]="color: "+o.bannerTextColor+"; background: "+d}else s=s.concat("%c "),c.push("color: "+o.bannerTextColor+"; background: "+o.bannerBackgroundColor);c.push("background: transparent"),o.gameTitle&&(s=s.concat(o.gameTitle),o.gameVersion&&(s=s.concat(" v"+o.gameVersion)),o.hidePhaser||(s=s.concat(" / ")));var v="";o.hidePhaser||(s=s.concat("Phaser v"+r.VERSION+v+" ("+l+" | "+f+")")),s=s.concat(" %c "+o.gameURL),c[0]=s,console.log.apply(console,c)}}};a.exports=p},50127:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(40366),p=t(60848),h=t(24047),o=t(27919),l=t(83419),n=t(69547),u=t(83719),f=t(86054),s=t(45893),c=t(96391),d=t(82264),v=t(57264),m=t(50792),S=t(8443),M=t(7003),A=t(37277),C=t(77332),w=t(76531),P=t(60903),L=t(69442),O=t(17130),I=t(65898),D=t(51085),B=t(14747),G=new l({initialize:function(W){this.config=new n(W),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 p(this),this.textures=new O(this),this.cache=new h(this),this.registry=new s(this,new m),this.input=new M(this,this.config),this.scene=new P(this,this.config.sceneConfig),this.device=d,this.scale=new w(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(!A.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(L.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,W){if(this.pendingDestroy)return this.runDestroy();if(!this.isPaused){var k=this.events;k.emit(S.PRE_STEP,z,W),k.emit(S.STEP,z,W),this.scene.update(z,W),k.emit(S.POST_STEP,z,W);var J=this.renderer;J.preRender(),k.emit(S.PRE_RENDER,J,z,W),this.scene.render(J),J.postRender(),k.emit(S.POST_RENDER,J,z,W)}},headlessStep:function(z,W){if(this.pendingDestroy)return this.runDestroy();if(!this.isPaused){var k=this.events;k.emit(S.PRE_STEP,z,W),k.emit(S.STEP,z,W),this.scene.update(z,W),k.emit(S.POST_STEP,z,W),this.scene.isProcessing=!1,k.emit(S.PRE_RENDER,null,z,W),k.emit(S.POST_RENDER,null,z,W)}},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,W){W===void 0&&(W=!1),this.pendingDestroy=!0,this.removeCanvas=z,this.noReturn=W},runDestroy:function(){this.scene.destroy(),this.events.emit(S.DESTROY),this.events.removeAllListeners(),this.renderer&&this.renderer.destroy(),this.removeCanvas&&this.canvas&&(o.remove(this.canvas),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)),this.domContainer&&this.domContainer.parentNode&&this.domContainer.parentNode.removeChild(this.domContainer),this.loop.destroy(),this.pendingDestroy=!1}});a.exports=G},65898:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(35154),h=t(29747),o=t(43092),l=new r({initialize:function(u,f){this.game=u,this.raf=new o,this.started=!1,this.running=!1,this.minFps=p(f,"min",5),this.targetFps=p(f,"target",60),this.fpsLimit=p(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=p(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=p(f,"deltaHistory",10),this.panicMax=p(f,"panicMax",120),this.rawDelta=0,this.now=0,this.smoothStep=p(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>=s&&(this.deltaIndex=0);for(var c=0,d=0;d=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}});a.exports=l},51085:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(8443),p=function(h){var o,l=h.events;if(document.hidden!==void 0)o="visibilitychange";else{var n=["webkit","moz","ms"];n.forEach(function(f){document[f+"Hidden"]!==void 0&&(document.hidden=function(){return document[f+"Hidden"]},o=f+"visibilitychange")})}var u=function(f){document.hidden||f.type==="pause"?l.emit(r.HIDDEN):l.emit(r.VISIBLE)};o&&document.addEventListener(o,u,!1),window.onblur=function(){l.emit(r.BLUR)},window.onfocus=function(){l.emit(r.FOCUS)},window.focus&&h.config.autoFocus&&window.focus()};a.exports=p},97217:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="blur"},47548:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="boot"},19814:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="contextlost"},68446:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="destroy"},41700:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="focus"},25432:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="hidden"},65942:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="pause"},59211:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="postrender"},47789:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="poststep"},39066:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="prerender"},460:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="prestep"},16175:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="ready"},42331:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="resume"},11966:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="step"},32969:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="systemready"},94830:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="visible"},8443:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={BLUR:t(97217),BOOT:t(47548),CONTEXT_LOST:t(19814),DESTROY:t(68446),FOCUS:t(41700),HIDDEN:t(25432),PAUSE:t(65942),POST_RENDER:t(59211),POST_STEP:t(47789),PRE_RENDER:t(39066),PRE_STEP:t(460),READY:t(16175),RESUME:t(42331),STEP:t(11966),SYSTEM_READY:t(32969),VISIBLE:t(94830)}},42857:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={Config:t(69547),CreateRenderer:t(86054),DebugHeader:t(96391),Events:t(8443),TimeStep:t(65898),VisibilityHandler:t(51085)}},99584:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(5290),p=t(27919),h=t(35154),o=function(l){var n=h(l,"data",[]),u=h(l,"canvas",null),f=h(l,"palette",r),s=h(l,"pixelWidth",1),c=h(l,"pixelHeight",s),d=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*s)),A=Math.floor(Math.abs(n.length*c));u||(u=p.create2D(this,M,A),d=!1,v=!1),d&&(u.width=M,u.height=A);var C=u.getContext("2d",{willReadFrequently:!0});v&&C.clearRect(0,0,M,A),m&&m(u,C);for(var w=0;w{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={GenerateTexture:t(99584),Palettes:t(57763)}},5290:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={0:"#000",1:"#9D9D9D",2:"#FFF",3:"#BE2633",4:"#E06F8B",5:"#493C2B",6:"#A46422",7:"#EB8931",8:"#F7E26B",9:"#2F484E",A:"#44891A",B:"#A3CE27",C:"#1B2632",D:"#005784",E:"#31A2F2",F:"#B2DCEF"}},23816:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={0:"#000",1:"#fff",2:"#8b4131",3:"#7bbdc5",4:"#8b41ac",5:"#6aac41",6:"#3931a4",7:"#d5de73",8:"#945a20",9:"#5a4100",A:"#bd736a",B:"#525252",C:"#838383",D:"#acee8b",E:"#7b73de",F:"#acacac"}},9866:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={0:"#000",1:"#2234d1",2:"#0c7e45",3:"#44aacc",4:"#8a3622",5:"#5c2e78",6:"#aa5c3d",7:"#b5b5b5",8:"#5e606e",9:"#4c81fb",A:"#6cd947",B:"#7be2f9",C:"#eb8a60",D:"#e23d69",E:"#ffd93f",F:"#fff"}},77552:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#f5f4eb"}},92259:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.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:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={ARNE16:t(5290),C64:t(23816),CGA:t(9866),JMP:t(77552),MSX:t(92259)}},46728:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(36316),h=t(80021),o=t(26099),l=new r({Extends:h,initialize:function(u,f,s,c){h.call(this,"CubicBezierCurve"),Array.isArray(u)&&(c=new o(u[6],u[7]),s=new o(u[4],u[5]),f=new o(u[2],u[3]),u=new o(u[0],u[1])),this.p0=u,this.p1=f,this.p2=s,this.p3=c},getStartPoint:function(n){return n===void 0&&(n=new o),n.copy(this.p0)},getResolution:function(n){return n},getPoint:function(n,u){u===void 0&&(u=new o);var f=this.p0,s=this.p1,c=this.p2,d=this.p3;return u.set(p(n,f.x,s.x,c.x,d.x),p(n,f.y,s.y,c.y,d.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 s=1;s{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(19217),h=t(87841),o=t(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 o,this._tmpVec2B=new o},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 s=Math.max(1,Math.round(f/u));return p(this.getSpacedPoints(s),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 o),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,s=this.getPoint(0,this._tmpVec2A),c=0;u.push(0);for(var d=1;d<=n;d++)f=this.getPoint(d/n,this._tmpVec2B),c+=f.distance(s),u.push(c),s.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 s=0;s<=n;s++)f.push(this.getPoint(s/n));return f},getRandomPoint:function(n){return n===void 0&&(n=new o),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 s=0;s<=n;s++){var c=this.getUtoTmapping(s/n,null,n);f.push(this.getPoint(c))}return f},getStartPoint:function(n){return n===void 0&&(n=new o),this.getPointAt(0,n)},getTangent:function(n,u){u===void 0&&(u=new o);var f=1e-4,s=n-f,c=n+f;return s<0&&(s=0),c>1&&(c=1),this.getPoint(s,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 s=this.getLengths(f),c=0,d=s.length,v;u?v=Math.min(u,s[d-1]):v=n*s[d-1];for(var m=0,S=d-1,M;m<=S;)if(c=Math.floor(m+(S-m)/2),M=s[c]-v,M<0)m=c+1;else if(M>0)S=c-1;else{S=c;break}if(c=S,s[c]===v)return c/(d-1);var A=s[c],C=s[c+1],w=C-A,P=(v-A)/w;return(c+P)/(d-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});a.exports=l},73825:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(80021),h=t(39506),o=t(35154),l=t(43396),n=t(26099),u=new r({Extends:p,initialize:function(s,c,d,v,m,S,M,A){if(typeof s=="object"){var C=s;s=o(C,"x",0),c=o(C,"y",0),d=o(C,"xRadius",0),v=o(C,"yRadius",d),m=o(C,"startAngle",0),S=o(C,"endAngle",360),M=o(C,"clockwise",!1),A=o(C,"rotation",0)}else v===void 0&&(v=d),m===void 0&&(m=0),S===void 0&&(S=360),M===void 0&&(M=!1),A===void 0&&(A=0);p.call(this,"EllipseCurve"),this.p0=new n(s,c),this._xRadius=d,this._yRadius=v,this._startAngle=h(m),this._endAngle=h(S),this._clockwise=M,this._rotation=h(A)},getStartPoint:function(f){return f===void 0&&(f=new n),this.getPoint(0,f)},getResolution:function(f){return f*2},getPoint:function(f,s){s===void 0&&(s=new n);for(var c=Math.PI*2,d=this._endAngle-this._startAngle,v=Math.abs(d)c;)d-=c;d{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(80021),h=t(19217),o=t(87841),l=t(26099),n=new r({Extends:p,initialize:function(f,s){p.call(this,"LineCurve"),Array.isArray(f)&&(s=new l(f[2],f[3]),f=new l(f[0],f[1])),this.p0=f,this.p1=s,this.arcLengthDivisions=1},getBounds:function(u){return u===void 0&&(u=new o),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,s){var c;if(f){var d=this.getLengths(s),v=d[d.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,s=new l(f[0],f[1]),c=new l(f[2],f[3]);return new n(s,c)},a.exports=n},14744:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(80021),h=t(32112),o=t(26099),l=new r({Extends:p,initialize:function(u,f,s){p.call(this,"QuadraticBezierCurve"),Array.isArray(u)&&(s=new o(u[4],u[5]),f=new o(u[2],u[3]),u=new o(u[0],u[1])),this.p0=u,this.p1=f,this.p2=s},getStartPoint:function(n){return n===void 0&&(n=new o),n.copy(this.p0)},getResolution:function(n){return n},getPoint:function(n,u){u===void 0&&(u=new o);var f=this.p0,s=this.p1,c=this.p2;return u.set(h(n,f.x,s.x,c.x),h(n,f.y,s.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 s=1;s{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(87842),p=t(83419),h=t(80021),o=t(26099),l=new p({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(d,v.x,m.x,S.x,M.x),r(d,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} + */a.exports={Path:t(46669),MoveTo:t(68618),CubicBezier:t(46728),Curve:t(80021),Ellipse:t(73825),Line:t(33951),QuadraticBezier:t(14744),Spline:t(42534)}},68618:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(26099),h=new r({initialize:function(l,n){this.active=!1,this.p0=new p(l,n)},getPoint:function(o,l){return l===void 0&&(l=new p),l.copy(this.p0)},getPointAt:function(o,l){return this.getPoint(o,l)},getResolution:function(){return 1},getLength:function(){return 0},toJSON:function(){return{type:"MoveTo",points:[this.p0.x,this.p0.y]}}});a.exports=h},46669:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(46728),h=t(73825),o=t(39429),l=t(33951),n=t(68618),u=t(14744),f=t(87841),s=t(42534),c=t(26099),d=t(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,A,C,w){var P=this.getEndPoint(),L,O,I;return m instanceof c?(L=m,O=S,I=M):(L=new c(M,A),O=new c(C,w),I=new c(m,S)),this.add(new p(P,L,O,I))},quadraticBezierTo:function(m,S,M,A){var C=this.getEndPoint(),w,P;return m instanceof c?(w=m,P=S):(w=new c(M,A),P=new c(m,S)),this.add(new u(C,w,P))},draw:function(m,S){for(var M=0;M=S)return this.curves[A];A++}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(),A=this.getCurveLengths(),C=0;C=M){var w=A[C]-M,P=this.curves[C],L=P.getLength(),O=L===0?0:1-w/L;return P.getPointAt(O,S)}C++}return null},getPoints:function(m,S){!m&&!S&&(m=this.defaultDivisions);for(var M=[],A,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(),A=this.getCurveLengths(),C=0;C=M){var w=A[C]-M,P=this.curves[C],L=P.getLength(),O=L===0?0:1-w/L;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 s(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=t(83419),p=t(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(p.DESTROY,this.destroy,this)},get:function(o){var l=this.list;if(Array.isArray(o)){for(var n=[],u=0;u{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(45893),h=t(37277),o=t(44594),l=new r({Extends:p,initialize:function(u){p.call(this,u,u.sys.events),this.scene=u,this.systems=u.sys,u.sys.events.once(o.BOOT,this.boot,this),u.sys.events.on(o.START,this.start,this)},boot:function(){this.events=this.systems.events,this.events.once(o.DESTROY,this.destroy,this)},start:function(){this.events.once(o.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.systems.events.off(o.SHUTDOWN,this.shutdown,this)},destroy:function(){p.prototype.destroy.call(this),this.events.off(o.START,this.start,this),this.scene=null,this.systems=null}});h.register("DataManagerPlugin",l,"data"),a.exports=l},10700:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="changedata"},93608:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="changedata-"},60883:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="destroy"},69780:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="removedata"},22166:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="setdata"},24882:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={CHANGE_DATA:t(10700),CHANGE_DATA_KEY:t(93608),DESTROY:t(60883),REMOVE_DATA:t(69780),SET_DATA:t(22166)}},44965:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={DataManager:t(45893),DataManagerPlugin:t(63646),Events:t(24882)}},7098:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(84148),p={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 p;p.audioData=!!window.Audio,p.webAudio=!!(window.AudioContext||window.webkitAudioContext);var o=document.createElement("audio"),l=!!o.canPlayType;try{if(l){var n=function(s,c){var d=o.canPlayType("audio/"+s).replace(/^no$/,"");return c?!!(d||o.canPlayType("audio/"+c).replace(/^no$/,"")):!!d};if(p.ogg=n('ogg; codecs="vorbis"'),p.opus=n('ogg; codecs="opus"',"opus"),p.mp3=n("mpeg"),p.wav=n("wav"),p.m4a=n("x-m4a"),p.aac=n("aac"),p.flac=n("flac","x-flac"),p.webm=n('webm; codecs="vorbis"'),o.canPlayType('audio/mp4; codecs="ec-3"')!==""){if(r.edge)p.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)&&(p.dolby=!0)}}}}catch{}return p}a.exports=h()},84148:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(25892),p={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 o=navigator.userAgent;return/Edg\/\d+/.test(o)?(p.edge=!0,p.es2019=!0):/OPR/.test(o)?(p.opera=!0,p.es2019=!0):/Chrome\/(\d+)/.test(o)&&!r.windowsPhone?(p.chrome=!0,p.chromeVersion=parseInt(RegExp.$1,10),p.es2019=p.chromeVersion>69):/Firefox\D+(\d+)/.test(o)?(p.firefox=!0,p.firefoxVersion=parseInt(RegExp.$1,10),p.es2019=p.firefoxVersion>10):/AppleWebKit\/(?!.*CriOS)/.test(o)&&r.iOS?(p.mobileSafari=!0,p.es2019=!0):/MSIE (\d+\.\d+);/.test(o)?(p.ie=!0,p.ieVersion=parseInt(RegExp.$1,10)):/Version\/(\d+\.\d+(\.\d+)?) Safari/.test(o)&&!r.windowsPhone?(p.safari=!0,p.safariVersion=parseInt(RegExp.$1,10),p.es2019=p.safariVersion>10):/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(o)&&(p.ie=!0,p.trident=!0,p.tridentVersion=parseInt(RegExp.$1,10),p.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(o)&&(p.silk=!0),p}a.exports=h()},89289:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(27919),p={supportInverseAlpha:!1,supportNewBlendModes:!1};function h(){var n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",u="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",f=new Image;return f.onload=function(){var s=new Image;s.onload=function(){var c=r.create2D(s,6),d=c.getContext("2d",{willReadFrequently:!0});if(d.globalCompositeOperation="multiply",d.drawImage(f,0,0),d.drawImage(s,2,0),!d.getImageData(2,0,1,1))return!1;var v=d.getImageData(2,0,1,1).data;r.remove(s),p.supportNewBlendModes=v[0]===255&&v[1]===0&&v[2]===0},s.src=n+"/wCKxvRF"+u},f.src=n+"AP804Oa6"+u,!1}function o(){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 s=u.getImageData(1,0,1,1),c=s.data[0]===f.data[0]&&s.data[1]===f.data[1]&&s.data[2]===f.data[2]&&s.data[3]===f.data[3];return r.remove(this),c}function l(){return typeof importScripts!="function"&&document!==void 0&&(p.supportNewBlendModes=h(),p.supportInverseAlpha=o()),p}a.exports=l()},89357:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(25892),p=t(84148),h=t(27919),o={canvas:!1,canvasBitBltShift:null,file:!1,fileSystem:!1,getUserMedia:!0,littleEndian:!1,localStorage:!1,pointerLock:!1,stableSort:!1,support32bit:!1,vibration:!1,webGL:!1,worker:!1};function l(){var u=new ArrayBuffer(4),f=new Uint8Array(u),s=new Uint32Array(u);return f[0]=161,f[1]=178,f[2]=195,f[3]=212,s[0]===3569595041?!0:s[0]===2712847316?!1:null}function n(){if(typeof importScripts=="function")return o;o.canvas=!!window.CanvasRenderingContext2D;try{o.localStorage=!!localStorage.getItem}catch{o.localStorage=!1}o.file=!!window.File&&!!window.FileReader&&!!window.FileList&&!!window.Blob,o.fileSystem=!!window.requestFileSystem;var u=!1,f=function(){if(window.WebGLRenderingContext)try{var s=h.createWebGL(this),c=s.getContext("webgl")||s.getContext("experimental-webgl"),d=h.create2D(this),v=d.getContext("2d",{willReadFrequently:!0}),m=v.createImageData(1,1);return u=m.data instanceof Uint8ClampedArray,h.remove(s),h.remove(d),!!c}catch{return!1}return!1};return o.webGL=f(),o.worker=!!window.Worker,o.pointerLock="pointerLockElement"in document||"mozPointerLockElement"in document||"webkitPointerLockElement"in document,navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia||navigator.oGetUserMedia,window.URL=window.URL||window.webkitURL||window.mozURL||window.msURL,o.getUserMedia=o.getUserMedia&&!!navigator.getUserMedia&&!!window.URL,p.firefox&&p.firefoxVersion<21&&(o.getUserMedia=!1),!r.iOS&&(p.ie||p.firefox||p.chrome)&&(o.canvasBitBltShift=!0),(p.safari||p.mobileSafari)&&(o.canvasBitBltShift=!1),navigator.vibrate=navigator.vibrate||navigator.webkitVibrate||navigator.mozVibrate||navigator.msVibrate,navigator.vibrate&&(o.vibration=!0),typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&typeof Uint32Array<"u"&&(o.littleEndian=l()),o.support32bit=typeof ArrayBuffer<"u"&&typeof Uint8ClampedArray<"u"&&typeof Int32Array<"u"&&o.littleEndian!==null&&u,o}a.exports=n()},91639:a=>{/** + * @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 t(){if(typeof importScripts=="function")return y;var r,p="Fullscreen",h="FullScreen",o=["request"+p,"request"+h,"webkitRequest"+p,"webkitRequest"+h,"msRequest"+p,"msRequest"+h,"mozRequest"+h,"mozRequest"+p];for(r=0;r{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(84148),p={gamepads:!1,mspointer:!1,touch:!1,wheelEvent:null};function h(){return typeof importScripts=="function"||(("ontouchstart"in document.documentElement||navigator.maxTouchPoints&&navigator.maxTouchPoints>=1)&&(p.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(p.mspointer=!0),navigator.getGamepads&&(p.gamepads=!0),"onwheel"in window||r.ie&&"WheelEvent"in window?p.wheelEvent="wheel":"onmousewheel"in window?p.wheelEvent="mousewheel":r.firefox&&"MouseScrollEvent"in window&&(p.wheelEvent="DOMMouseScroll")),p}a.exports=h()},25892:a=>{/** + * @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 t(){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 p=/Silk/.test(r);return(y.windows||y.macOS||y.linux&&!p||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}a.exports=t()},43267:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(95540),p={h264:!1,hls:!1,mp4:!1,m4v:!1,ogg:!1,vp9:!1,webm:!1,hasRequestVideoFrame:!1};function h(){if(typeof importScripts=="function")return p;var o=document.createElement("video"),l=!!o.canPlayType,n=/^no$/;try{l&&(o.canPlayType('video/ogg; codecs="theora"').replace(n,"")&&(p.ogg=!0),o.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(n,"")&&(p.h264=!0,p.mp4=!0),o.canPlayType("video/x-m4v").replace(n,"")&&(p.m4v=!0),o.canPlayType('video/webm; codecs="vp8, vorbis"').replace(n,"")&&(p.webm=!0),o.canPlayType('video/webm; codecs="vp9"').replace(n,"")&&(p.vp9=!0),o.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(n,"")&&(p.hls=!0))}catch{}return o.parentNode&&o.parentNode.removeChild(o),p.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} + */a.exports={os:t(25892),browser:t(84148),features:t(89357),input:t(31784),audio:t(7098),video:t(43267),fullscreen:t(91639),canvasFeatures:t(89289)}},89422:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=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(o){return this._matrix.set(o),this._dirty=!0,this},reset:function(){var o=this._matrix;return o.fill(0),o[0]=1,o[6]=1,o[12]=1,o[18]=1,this.alpha=1,this._dirty=!0,this},getData:function(){var o=this._data;return this._dirty&&(o.set(this._matrix),o[4]/=255,o[9]/=255,o[14]/=255,o[19]/=255,this._dirty=!1),o},brightness:function(o,l){o===void 0&&(o=0),l===void 0&&(l=!1);var n=o;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(o,l){o===void 0&&(o=0),l===void 0&&(l=!1);var n=o*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(o){return o===void 0&&(o=!1),this.saturate(-1,o)},hue:function(o,l){o===void 0&&(o=0),l===void 0&&(l=!1),o=o/180*Math.PI;var n=Math.cos(o),u=Math.sin(o),f=.213,s=.715,c=.072;return this.multiply([f+n*(1-f)+u*-f,s+n*-s+u*-s,c+n*-c+u*(1-c),0,0,f+n*-f+u*.143,s+n*(1-s)+u*.14,c+n*-c+u*-.283,0,0,f+n*-f+u*-(1-f),s+n*-s+u*s,c+n*(1-c)+u*c,0,0,0,0,0,1,0],l)},grayscale:function(o,l){return o===void 0&&(o=1),l===void 0&&(l=!1),this.saturate(-o,l)},blackWhite:function(o){return o===void 0&&(o=!1),this.multiply(h.BLACK_WHITE,o)},contrast:function(o,l){o===void 0&&(o=0),l===void 0&&(l=!1);var n=o+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(o){return o===void 0&&(o=!1),this.multiply(h.NEGATIVE,o)},desaturateLuminance:function(o){return o===void 0&&(o=!1),this.multiply(h.DESATURATE_LUMINANCE,o)},sepia:function(o){return o===void 0&&(o=!1),this.multiply(h.SEPIA,o)},night:function(o,l){return o===void 0&&(o=.1),l===void 0&&(l=!1),this.multiply([o*-2,-o,0,0,0,-o,0,o,0,0,0,o,o*2,0,0,0,0,0,1,0],l)},lsd:function(o){return o===void 0&&(o=!1),this.multiply(h.LSD,o)},brown:function(o){return o===void 0&&(o=!1),this.multiply(h.BROWN,o)},vintagePinhole:function(o){return o===void 0&&(o=!1),this.multiply(h.VINTAGE,o)},kodachrome:function(o){return o===void 0&&(o=!1),this.multiply(h.KODACHROME,o)},technicolor:function(o){return o===void 0&&(o=!1),this.multiply(h.TECHNICOLOR,o)},polaroid:function(o){return o===void 0&&(o=!1),this.multiply(h.POLAROID,o)},shiftToBGR:function(o){return o===void 0&&(o=!1),this.multiply(h.SHIFT_BGR,o)},multiply:function(o,l){l===void 0&&(l=!1),l||this.reset();var n=this._matrix,u=p;return u.set(n),n.set([u[0]*o[0]+u[1]*o[5]+u[2]*o[10]+u[3]*o[15],u[0]*o[1]+u[1]*o[6]+u[2]*o[11]+u[3]*o[16],u[0]*o[2]+u[1]*o[7]+u[2]*o[12]+u[3]*o[17],u[0]*o[3]+u[1]*o[8]+u[2]*o[13]+u[3]*o[18],u[0]*o[4]+u[1]*o[9]+u[2]*o[14]+u[3]*o[19]+u[4],u[5]*o[0]+u[6]*o[5]+u[7]*o[10]+u[8]*o[15],u[5]*o[1]+u[6]*o[6]+u[7]*o[11]+u[8]*o[16],u[5]*o[2]+u[6]*o[7]+u[7]*o[12]+u[8]*o[17],u[5]*o[3]+u[6]*o[8]+u[7]*o[13]+u[8]*o[18],u[5]*o[4]+u[6]*o[9]+u[7]*o[14]+u[8]*o[19]+u[9],u[10]*o[0]+u[11]*o[5]+u[12]*o[10]+u[13]*o[15],u[10]*o[1]+u[11]*o[6]+u[12]*o[11]+u[13]*o[16],u[10]*o[2]+u[11]*o[7]+u[12]*o[12]+u[13]*o[17],u[10]*o[3]+u[11]*o[8]+u[12]*o[13]+u[13]*o[18],u[10]*o[4]+u[11]*o[9]+u[12]*o[14]+u[13]*o[19]+u[14],u[15]*o[0]+u[16]*o[5]+u[17]*o[10]+u[18]*o[15],u[15]*o[1]+u[16]*o[6]+u[17]*o[11]+u[18]*o[16],u[15]*o[2]+u[16]*o[7]+u[17]*o[12]+u[18]*o[17],u[15]*o[3]+u[16]*o[8]+u[17]*o[13]+u[18]*o[18],u[15]*o[4]+u[16]*o[9]+u[17]*o[14]+u[18]*o[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],a.exports=h},51767:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(29747),h=new r({initialize:function(l,n,u){this._rgb=[0,0,0],this.onChangeCallback=p,this.dirty=!1,this.set(l,n,u)},set:function(o,l,n){return o===void 0&&(o=0),l===void 0&&(l=0),n===void 0&&(n=0),this._rgb=[o,l,n],this.onChange(),this},equals:function(o,l,n){var u=this._rgb;return u[0]===o&&u[1]===l&&u[2]===n},onChange:function(){this.dirty=!0;var o=this._rgb;this.onChangeCallback.call(this,o[0],o[1],o[2])},r:{get:function(){return this._rgb[0]},set:function(o){this._rgb[0]=o,this.onChange()}},g:{get:function(){return this._rgb[1]},set:function(o){this._rgb[1]=o,this.onChange()}},b:{get:function(){return this._rgb[2]},set:function(o){this._rgb[2]=o,this.onChange()}},destroy:function(){this.onChangeCallback=null}});a.exports=h},60461:a=>{/** + * @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};a.exports=y},54312:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(62235),p=t(35893),h=t(86327),o=t(88417),l=function(n,u,f,s){return f===void 0&&(f=0),s===void 0&&(s=0),o(n,p(u)+f),h(n,r(u)+s),n};a.exports=l},46768:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(62235),p=t(26541),h=t(86327),o=t(385),l=function(n,u,f,s){return f===void 0&&(f=0),s===void 0&&(s=0),o(n,p(u)-f),h(n,r(u)+s),n};a.exports=l},35827:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(62235),p=t(54380),h=t(86327),o=t(40136),l=function(n,u,f,s){return f===void 0&&(f=0),s===void 0&&(s=0),o(n,p(u)+f),h(n,r(u)+s),n};a.exports=l},46871:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(66786),p=t(35893),h=t(7702),o=function(l,n,u,f){return u===void 0&&(u=0),f===void 0&&(f=0),r(l,p(n)+u,h(n)+f),l};a.exports=o},5198:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(7702),p=t(26541),h=t(20786),o=t(385),l=function(n,u,f,s){return f===void 0&&(f=0),s===void 0&&(s=0),o(n,p(u)-f),h(n,r(u)+s),n};a.exports=l},11879:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(60461),p=[];p[r.BOTTOM_CENTER]=t(54312),p[r.BOTTOM_LEFT]=t(46768),p[r.BOTTOM_RIGHT]=t(35827),p[r.CENTER]=t(46871),p[r.LEFT_CENTER]=t(5198),p[r.RIGHT_CENTER]=t(80503),p[r.TOP_CENTER]=t(89698),p[r.TOP_LEFT]=t(922),p[r.TOP_RIGHT]=t(21373),p[r.LEFT_BOTTOM]=p[r.BOTTOM_LEFT],p[r.LEFT_TOP]=p[r.TOP_LEFT],p[r.RIGHT_BOTTOM]=p[r.BOTTOM_RIGHT],p[r.RIGHT_TOP]=p[r.TOP_RIGHT];var h=function(o,l,n,u,f){return p[n](o,l,u,f)};a.exports=h},80503:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(7702),p=t(54380),h=t(20786),o=t(40136),l=function(n,u,f,s){return f===void 0&&(f=0),s===void 0&&(s=0),o(n,p(u)+f),h(n,r(u)+s),n};a.exports=l},89698:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(35893),p=t(17717),h=t(88417),o=t(66737),l=function(n,u,f,s){return f===void 0&&(f=0),s===void 0&&(s=0),h(n,r(u)+f),o(n,p(u)-s),n};a.exports=l},922:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(26541),p=t(17717),h=t(385),o=t(66737),l=function(n,u,f,s){return f===void 0&&(f=0),s===void 0&&(s=0),h(n,r(u)-f),o(n,p(u)-s),n};a.exports=l},21373:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(54380),p=t(17717),h=t(40136),o=t(66737),l=function(n,u,f,s){return f===void 0&&(f=0),s===void 0&&(s=0),h(n,r(u)+f),o(n,p(u)-s),n};a.exports=l},91660:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={BottomCenter:t(54312),BottomLeft:t(46768),BottomRight:t(35827),Center:t(46871),LeftCenter:t(5198),QuickSet:t(11879),RightCenter:t(80503),TopCenter:t(89698),TopLeft:t(922),TopRight:t(21373)}},71926:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(60461),p=t(79291),h={In:t(91660),To:t(16694)};h=p(!1,h,r),a.exports=h},21578:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(62235),p=t(35893),h=t(88417),o=t(66737),l=function(n,u,f,s){return f===void 0&&(f=0),s===void 0&&(s=0),h(n,p(u)+f),o(n,r(u)+s),n};a.exports=l},10210:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(62235),p=t(26541),h=t(385),o=t(66737),l=function(n,u,f,s){return f===void 0&&(f=0),s===void 0&&(s=0),h(n,p(u)-f),o(n,r(u)+s),n};a.exports=l},82341:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(62235),p=t(54380),h=t(40136),o=t(66737),l=function(n,u,f,s){return f===void 0&&(f=0),s===void 0&&(s=0),h(n,p(u)+f),o(n,r(u)+s),n};a.exports=l},87958:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(62235),p=t(26541),h=t(86327),o=t(40136),l=function(n,u,f,s){return f===void 0&&(f=0),s===void 0&&(s=0),o(n,p(u)-f),h(n,r(u)+s),n};a.exports=l},40080:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(7702),p=t(26541),h=t(20786),o=t(40136),l=function(n,u,f,s){return f===void 0&&(f=0),s===void 0&&(s=0),o(n,p(u)-f),h(n,r(u)+s),n};a.exports=l},88466:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(26541),p=t(17717),h=t(40136),o=t(66737),l=function(n,u,f,s){return f===void 0&&(f=0),s===void 0&&(s=0),h(n,r(u)-f),o(n,p(u)-s),n};a.exports=l},38829:(a,y,t)=>{/** + * @author samme + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(60461),p=[];p[r.BOTTOM_CENTER]=t(21578),p[r.BOTTOM_LEFT]=t(10210),p[r.BOTTOM_RIGHT]=t(82341),p[r.LEFT_BOTTOM]=t(87958),p[r.LEFT_CENTER]=t(40080),p[r.LEFT_TOP]=t(88466),p[r.RIGHT_BOTTOM]=t(19211),p[r.RIGHT_CENTER]=t(34609),p[r.RIGHT_TOP]=t(48741),p[r.TOP_CENTER]=t(49440),p[r.TOP_LEFT]=t(81288),p[r.TOP_RIGHT]=t(61323);var h=function(o,l,n,u,f){return p[n](o,l,u,f)};a.exports=h},19211:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(62235),p=t(54380),h=t(86327),o=t(385),l=function(n,u,f,s){return f===void 0&&(f=0),s===void 0&&(s=0),o(n,p(u)+f),h(n,r(u)+s),n};a.exports=l},34609:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(7702),p=t(54380),h=t(20786),o=t(385),l=function(n,u,f,s){return f===void 0&&(f=0),s===void 0&&(s=0),o(n,p(u)+f),h(n,r(u)+s),n};a.exports=l},48741:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(54380),p=t(17717),h=t(385),o=t(66737),l=function(n,u,f,s){return f===void 0&&(f=0),s===void 0&&(s=0),h(n,r(u)+f),o(n,p(u)-s),n};a.exports=l},49440:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(35893),p=t(17717),h=t(86327),o=t(88417),l=function(n,u,f,s){return f===void 0&&(f=0),s===void 0&&(s=0),o(n,r(u)+f),h(n,p(u)-s),n};a.exports=l},81288:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(26541),p=t(17717),h=t(86327),o=t(385),l=function(n,u,f,s){return f===void 0&&(f=0),s===void 0&&(s=0),o(n,r(u)-f),h(n,p(u)-s),n};a.exports=l},61323:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(54380),p=t(17717),h=t(86327),o=t(40136),l=function(n,u,f,s){return f===void 0&&(f=0),s===void 0&&(s=0),o(n,r(u)+f),h(n,p(u)-s),n};a.exports=l},16694:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={BottomCenter:t(21578),BottomLeft:t(10210),BottomRight:t(82341),LeftBottom:t(87958),LeftCenter:t(40080),LeftTop:t(88466),QuickSet:t(38829),RightBottom:t(19211),RightCenter:t(34609),RightTop:t(48741),TopCenter:t(49440),TopLeft:t(81288),TopRight:t(61323)}},66786:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(88417),p=t(20786),h=function(o,l,n){return r(o,l),p(o,n)};a.exports=h},62235:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return t.y+t.height-t.height*t.originY};a.exports=y},72873:(a,y,t)=>{/** + * @author samme + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(62235),p=t(26541),h=t(54380),o=t(17717),l=t(87841),n=function(u,f){f===void 0&&(f=new l);var s=p(u),c=o(u);return f.x=s,f.y=c,f.width=h(u)-s,f.height=r(u)-c,f};a.exports=n},35893:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return t.x-t.width*t.originX+t.width*.5};a.exports=y},7702:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return t.y-t.height*t.originY+t.height*.5};a.exports=y},26541:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return t.x-t.width*t.originX};a.exports=y},87431:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return t.width*t.originX};a.exports=y},46928:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return t.height*t.originY};a.exports=y},54380:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return t.x+t.width-t.width*t.originX};a.exports=y},17717:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return t.y-t.height*t.originY};a.exports=y},86327:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){return t.y=r-t.height+t.height*t.originY,t};a.exports=y},88417:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){var p=t.width*t.originX;return t.x=r+p-t.width*.5,t};a.exports=y},20786:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){var p=t.height*t.originY;return t.y=r+p-t.height*.5,t};a.exports=y},385:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){return t.x=r+t.width*t.originX,t};a.exports=y},40136:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){return t.x=r-t.width+t.width*t.originX,t};a.exports=y},66737:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){return t.y=r+t.height*t.originY,t};a.exports=y},58724:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={CenterOn:t(66786),GetBottom:t(62235),GetBounds:t(72873),GetCenterX:t(35893),GetCenterY:t(7702),GetLeft:t(26541),GetOffsetX:t(87431),GetOffsetY:t(46928),GetRight:t(54380),GetTop:t(17717),SetBottom:t(86327),SetCenterX:t(88417),SetCenterY:t(20786),SetLeft:t(385),SetRight:t(40136),SetTop:t(66737)}},20623:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y={setCrisp:function(t){var r=["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"];return r.forEach(function(p){t.style["image-rendering"]=p}),t.style.msInterpolationMode="nearest-neighbor",t},setBicubic:function(t){return t.style["image-rendering"]="auto",t.style.msInterpolationMode="bicubic",t}};a.exports=y},27919:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(8054),p=t(68703),h=[],o=!1,l=function(){var n=function(M,A,C,w,P){A===void 0&&(A=1),C===void 0&&(C=1),w===void 0&&(w=r.CANVAS),P===void 0&&(P=!1);var L,O=s(w);return O===null?(O={parent:M,canvas:document.createElement("canvas"),type:w},w===r.CANVAS&&h.push(O),L=O.canvas):(O.parent=M,L=O.canvas),P&&(O.parent=L),L.width=A,L.height=C,o&&w===r.CANVAS&&p.disable(L.getContext("2d",{willReadFrequently:!1})),L},u=function(M,A,C){return n(M,A,C,r.CANVAS)},f=function(M,A,C){return n(M,A,C,r.WEBGL)},s=function(M){if(M===void 0&&(M=r.CANVAS),M===r.WEBGL)return null;for(var A=0;A{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y="",t=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(t,r){return r===void 0&&(r="none"),t.style.msTouchAction=r,t.style["ms-touch-action"]=r,t.style["touch-action"]=r,t};a.exports=y},91610:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){r===void 0&&(r="none");var p=["-webkit-","-khtml-","-moz-","-ms-",""];return p.forEach(function(h){t.style[h+"user-select"]=r}),t.style["-webkit-touch-callout"]=r,t.style["-webkit-tap-highlight-color"]="rgba(0, 0, 0, 0)",t};a.exports=y},26253:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={CanvasInterpolation:t(20623),CanvasPool:t(27919),Smoothing:t(68703),TouchAction:t(65208),UserSelect:t(91610)}},40987:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(37589),h=t(1e3),o=t(7537),l=t(87837),n=new r({initialize:function(f,s,c,d){f===void 0&&(f=0),s===void 0&&(s=0),c===void 0&&(c=0),d===void 0&&(d=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,s,c,d)},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,s,c,d){return c===void 0&&(c=255),d===void 0&&(d=!0),this._locked=!0,this.red=u,this.green=f,this.blue=s,this.alpha=c,this._locked=!1,this.update(d)},setGLTo:function(u,f,s,c){return c===void 0&&(c=1),this._locked=!0,this.redGL=u,this.greenGL=f,this.blueGL=s,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,s){return o(u,f,s,this)},update:function(u){if(u===void 0&&(u=!1),this._locked)return this;var f=this.r,s=this.g,c=this.b,d=this.a;return this._color=p(f,s,c),this._color32=h(f,s,c,d),this._rgba="rgba("+f+","+s+","+c+","+d/255+")",u&&l(f,s,c,this),this},updateHSV:function(){var u=this.r,f=this.g,s=this.b;return l(u,f,s,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 s=Math.floor(u+Math.random()*(f-u)),c=Math.floor(u+Math.random()*(f-u)),d=Math.floor(u+Math.random()*(f-u));return this.setTo(s,c,d)},randomGray:function(u,f){u===void 0&&(u=0),f===void 0&&(f=255);var s=Math.floor(u+Math.random()*(f-u));return this.setTo(s,s,s)},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,s=this.g,c=this.b;return f=Math.max(0,Math.min(255,f-Math.round(255*-(u/100)))),s=Math.max(0,Math.min(255,s-Math.round(255*-(u/100)))),c=Math.max(0,Math.min(255,c-Math.round(255*-(u/100)))),this.setTo(f,s,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,o(u,this._s,this._v,this)}},s:{get:function(){return this._s},set:function(u){this._s=u,o(this._h,u,this._v,this)}},v:{get:function(){return this._v},set:function(u){this._v=u,o(this._h,this._s,u,this)}}});a.exports=n},92728:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(37589),p=function(h){h===void 0&&(h=1024);var o=[],l=255,n,u=255,f=0,s=0;for(n=0;n<=l;n++)o.push({r:u,g:n,b:s,color:r(u,n,s)});for(f=255,n=l;n>=0;n--)o.push({r:n,g:f,b:s,color:r(n,f,s)});for(u=0,n=0;n<=l;n++,f--)o.push({r:u,g:f,b:n,color:r(u,f,n)});for(f=0,s=255,n=0;n<=l;n++,s--,u++)o.push({r:u,g:f,b:s,color:r(u,f,s)});if(h===1024)return o;var c=[],d=0,v=1024/h;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(t){var r={r:t>>16&255,g:t>>8&255,b:t&255,a:255};return t>16777215&&(r.a=t>>>24),r};a.exports=y},62957:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){var r=t.toString(16);return r.length===1?"0"+r:r};a.exports=y},37589:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){return t<<16|r<<8|p};a.exports=y},1e3:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p,h){return h<<24|t<<16|r<<8|p};a.exports=y},62183:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(40987),p=t(89528),h=function(o,l,n){var u=n,f=n,s=n;if(l!==0){var c=n<.5?n*(1+l):n+l-n*l,d=2*n-c;u=p(d,c,o+1/3),f=p(d,c,o),s=p(d,c,o-1/3)}var v=new r;return v.setGLTo(u,f,s,1)};a.exports=h},27939:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(7537),p=function(h,o){h===void 0&&(h=1),o===void 0&&(o=1);for(var l=[],n=0;n<=359;n++)l.push(r(n/359,h,o));return l};a.exports=p},7537:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(37589);function p(o,l,n,u){var f=(o+l*6)%6,s=Math.min(f,4-f,1);return Math.round(255*(u-u*n*Math.max(0,s)))}var h=function(o,l,n,u){l===void 0&&(l=1),n===void 0&&(n=1);var f=p(5,o,l,n),s=p(3,o,l,n),c=p(1,o,l,n);return u?u.setTo?u.setTo(f,s,c,u.alpha,!0):(u.r=f,u.g=s,u.b=c,u.color=r(f,s,c),u):{r:f,g:s,b:c,color:r(f,s,c)}};a.exports=h},70238:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(40987),p=function(h){var o=new r;h=h.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,function(s,c,d,v){return c+c+d+d+v+v});var l=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(h);if(l){var n=parseInt(l[1],16),u=parseInt(l[2],16),f=parseInt(l[3],16);o.setTo(n,u,f)}return o};a.exports=p},89528:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){return p<0&&(p+=1),p>1&&(p-=1),p<.16666666666666666?t+(r-t)*6*p:p<.5?r:p<.6666666666666666?t+(r-t)*(.6666666666666666-p)*6:t};a.exports=y},30100:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(40987),p=t(90664),h=function(o){var l=p(o);return new r(l.r,l.g,l.b,l.a)};a.exports=h},90664:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return t>16777215?{a:t>>>24,r:t>>16&255,g:t>>8&255,b:t&255}:{a:255,r:t>>16&255,g:t>>8&255,b:t&255}};a.exports=y},13699:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(28915),p=function(l,n,u,f,s,c,d,v){d===void 0&&(d=100),v===void 0&&(v=0);var m=v/d;return{r:r(l,f,m),g:r(n,s,m),b:r(u,c,m)}},h=function(l,n,u,f){return u===void 0&&(u=100),f===void 0&&(f=0),p(l.r,l.g,l.b,n.r,n.g,n.b,u,f)},o=function(l,n,u,f,s,c){return s===void 0&&(s=100),c===void 0&&(c=0),p(l.r,l.g,l.b,n,u,f,s,c)};a.exports={RGBWithRGB:p,ColorWithRGB:o,ColorWithColor:h}},68957:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(40987),p=function(h){return new r(h.r,h.g,h.b,h.a)};a.exports=p},87388:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(40987),p=function(h){var o=new r,l=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(h.toLowerCase());if(l){var n=parseInt(l[1],10),u=parseInt(l[2],10),f=parseInt(l[3],10),s=l[4]!==void 0?parseFloat(l[4]):1;o.setTo(n,u,f,s*255)}return o};a.exports=p},87837:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p,h){h===void 0&&(h={h:0,s:0,v:0}),t/=255,r/=255,p/=255;var o=Math.min(t,r,p),l=Math.max(t,r,p),n=l-o,u=0,f=l===0?0:n/l,s=l;return l!==o&&(l===t?u=(r-p)/n+(r{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(62957),p=function(h,o,l,n,u){return n===void 0&&(n=255),u===void 0&&(u="#"),u==="#"?"#"+((1<<24)+(h<<16)+(o<<8)+l).toString(16).slice(1,7):"0x"+r(n)+r(h)+r(o)+r(l)};a.exports=p},85386:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(30976),p=t(40987),h=function(o,l){return o===void 0&&(o=0),l===void 0&&(l=255),new p(r(o,l),r(o,l),r(o,l))};a.exports=h},80333:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(70238),p=t(30100),h=t(68957),o=t(87388),l=function(n){var u=typeof n;switch(u){case"string":return n.substr(0,3).toLowerCase()==="rgb"?o(n):r(n);case"number":return p(n);case"object":return h(n)}};a.exports=l},3956:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(40987);r.ColorSpectrum=t(92728),r.ColorToRGBA=t(91588),r.ComponentToHex=t(62957),r.GetColor=t(37589),r.GetColor32=t(1e3),r.HexStringToColor=t(70238),r.HSLToColor=t(62183),r.HSVColorWheel=t(27939),r.HSVToRGB=t(7537),r.HueToComponent=t(89528),r.IntegerToColor=t(30100),r.IntegerToRGB=t(90664),r.Interpolate=t(13699),r.ObjectToColor=t(68957),r.RandomRGB=t(85386),r.RGBStringToColor=t(87388),r.RGBToHSV=t(87837),r.RGBToString=t(75723),r.ValueToColor=t(80333),a.exports=r},27460:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={Align:t(71926),BaseShader:t(73894),Bounds:t(58724),Canvas:t(26253),Color:t(3956),ColorMatrix:t(89422),Masks:t(69781),RGB:t(51767)}},6858:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(39429),h=new r({initialize:function(l,n,u,f,s,c){n||(n=l.sys.make.image({x:u,y:f,key:s,frame:c,add:!1})),this.bitmapMask=n,this.invertAlpha=!1,this.isStencil=!1},setBitmap:function(o){this.bitmapMask=o},preRenderWebGL:function(o,l,n){o.pipelines.BITMAPMASK_PIPELINE.beginMask(this,l,n)},postRenderWebGL:function(o,l,n){o.pipelines.BITMAPMASK_PIPELINE.endMask(this,l,n)},preRenderCanvas:function(){},postRenderCanvas:function(){},destroy:function(){this.bitmapMask=null}});p.register("bitmapMask",function(o,l,n,u,f){return new h(this.scene,o,l,n,u,f)}),a.exports=h},80661:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=new r({initialize:function(o,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,o,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,o,l){var n=h.gl,u=this.geometryMask,f=h.maskCount,s=255;n.colorMask(!1,!1,!1,!1),l?(n.stencilFunc(n.EQUAL,f,s),n.stencilOp(n.KEEP,n.KEEP,n.INCR),f++):(n.stencilFunc(n.EQUAL,f+1,s),n.stencilOp(n.KEEP,n.KEEP,n.DECR)),this.level=f,u.renderWebGL(h,u,o),h.flush(),n.colorMask(!0,!0,!0,!0),n.stencilOp(n.KEEP,n.KEEP,n.KEEP),this.invertAlpha?n.stencilFunc(n.NOTEQUAL,f,s):n.stencilFunc(n.EQUAL,f,s)},postRenderWebGL:function(h){var o=h.gl;h.maskStack.pop(),h.maskCount--,h.flush();var l=h.currentMask;if(h.maskStack.length===0)l.mask=null,o.disable(o.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,o,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}});a.exports=p},69781:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={BitmapMask:t(6858),GeometryMask:t(80661)}},73894:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=new r({initialize:function(o,l,n,u){(!l||l==="")&&(l=["precision mediump float;","uniform vec2 resolution;","varying vec2 fragCoord;","void main () {"," vec2 uv = fragCoord / resolution.xy;"," gl_FragColor = vec4(uv.xyx, 1.0);","}"].join(` +`)),(!n||n==="")&&(n=["precision mediump float;","uniform mat4 uProjectionMatrix;","uniform mat4 uViewMatrix;","uniform vec2 uResolution;","attribute vec2 inPosition;","varying vec2 fragCoord;","varying vec2 outTexCoord;","void main () {"," gl_Position = uProjectionMatrix * uViewMatrix * vec4(inPosition, 1.0, 1.0);"," fragCoord = vec2(inPosition.x, uResolution.y - inPosition.y);"," outTexCoord = vec2(inPosition.x / uResolution.x, fragCoord.y / uResolution.y);","}"].join(` +`)),u===void 0&&(u=null),this.key=o,this.fragmentSrc=l,this.vertexSrc=n,this.uniforms=u}});a.exports=p},40366:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){var p;if(r)typeof r=="string"?p=document.getElementById(r):typeof r=="object"&&r.nodeType===1&&(p=r);else if(t.parentElement||r===null)return t;return p||(p=document.body),p.appendChild(t),t};a.exports=y},83719:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(40366),p=function(h){var o=h.config;if(!(!o.parent||!o.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: "+o.domPointerEvents+";","transform: scale(1);","transform-origin: left top;"].join(" "),h.domContainer=l,r(l,o.parent)}};a.exports=p},57264:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(25892),p=function(h){if(document.readyState==="complete"||document.readyState==="interactive"){h();return}var o=function(){document.removeEventListener("deviceready",o,!0),document.removeEventListener("DOMContentLoaded",o,!0),window.removeEventListener("load",o,!0),h()};document.body?r.cordova?document.addEventListener("deviceready",o,!1):(document.addEventListener("DOMContentLoaded",o,!0),window.addEventListener("load",o,!0)):window.setTimeout(o,20)};a.exports=p},57811:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){if(!t)return window.innerHeight;var r=Math.abs(window.orientation),p={w:0,h:0},h=document.createElement("div");return h.setAttribute("style","position: fixed; height: 100vh; width: 0; top: 0"),document.documentElement.appendChild(h),p.w=r===90?h.offsetHeight:window.innerWidth,p.h=r===90?window.innerWidth:h.offsetHeight,document.documentElement.removeChild(h),h=null,Math.abs(window.orientation)!==90?p.h:p.w};a.exports=y},45818:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(13560),p=function(h,o){var l=window.screen,n=l?l.orientation||l.mozOrientation||l.msOrientation:!1;if(n&&typeof n.type=="string")return n.type;if(typeof n=="string")return n;if(typeof window.orientation=="number")return window.orientation===0||window.orientation===180?r.ORIENTATION.PORTRAIT:r.ORIENTATION.LANDSCAPE;if(window.matchMedia){if(window.matchMedia("(orientation: portrait)").matches)return r.ORIENTATION.PORTRAIT;if(window.matchMedia("(orientation: landscape)").matches)return r.ORIENTATION.LANDSCAPE}else return o>h?r.ORIENTATION.PORTRAIT:r.ORIENTATION.LANDSCAPE};a.exports=p},74403:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){var r;return t!==""&&(typeof t=="string"?r=document.getElementById(t):t&&t.nodeType===1&&(r=t)),r||(r=document.body),r};a.exports=y},56836:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){var r="";try{if(window.DOMParser){var p=new DOMParser;r=p.parseFromString(t,"text/xml")}else r=new ActiveXObject("Microsoft.XMLDOM"),r.loadXML(t)}catch{r=null}return!r||!r.documentElement||r.getElementsByTagName("parsererror").length?null:r};a.exports=y},35846:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){t.parentNode&&t.parentNode.removeChild(t)};a.exports=y},43092:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(29747),h=new r({initialize:function(){this.isRunning=!1,this.callback=p,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(o,l,n){this.isRunning||(this.callback=o,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=p}});a.exports=h},84902:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r={AddToDOM:t(40366),DOMContentLoaded:t(57264),GetInnerHeight:t(57811),GetScreenOrientation:t(45818),GetTarget:t(74403),ParseXML:t(56836),RemoveFromDOM:t(35846),RequestAnimationFrame:t(43092)};a.exports=r},47565:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(50792),h=t(37277),o=new r({Extends:p,initialize:function(){p.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});h.register("EventEmitter",o,"events"),a.exports=o},93055:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={EventEmitter:t(47565)}},20122:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(72898),h=t(14811),o=new r({Extends:p,initialize:function(n,u){u===void 0&&(u=1),p.call(this,h.BARREL,n),this.amount=u}});a.exports=o},32251:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(72898),h=t(14811),o=new r({Extends:p,initialize:function(n,u,f,s,c,d,v){f===void 0&&(f=1),s===void 0&&(s=1),c===void 0&&(c=1),d===void 0&&(d=1),v===void 0&&(v=4),p.call(this,h.BLOOM,n),this.steps=v,this.offsetX=f,this.offsetY=s,this.blurStrength=c,this.strength=d,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}}});a.exports=o},9047:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(72898),h=t(14811),o=new r({Extends:p,initialize:function(n,u,f,s,c,d,v){u===void 0&&(u=0),f===void 0&&(f=2),s===void 0&&(s=2),c===void 0&&(c=1),v===void 0&&(v=4),p.call(this,h.BLUR,n),this.quality=u,this.x=f,this.y=s,this.steps=v,this.strength=c,this.glcolor=[1,1,1],d!=null&&(this.color=d)},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}}});a.exports=o},27885:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(72898),h=t(14811),o=new r({Extends:p,initialize:function(n,u,f,s,c,d,v,m){u===void 0&&(u=.5),f===void 0&&(f=1),s===void 0&&(s=.2),c===void 0&&(c=!1),d===void 0&&(d=1),v===void 0&&(v=1),m===void 0&&(m=1),p.call(this,h.BOKEH,n),this.radius=u,this.amount=f,this.contrast=s,this.isTiltShift=c,this.strength=m,this.blurX=d,this.blurY=v}});a.exports=o},12578:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(72898),h=t(14811),o=new r({Extends:p,initialize:function(n,u,f,s,c,d){u===void 0&&(u=8),c===void 0&&(c=1),d===void 0&&(d=.005),p.call(this,h.CIRCLE,n),this.scale=c,this.feather=d,this.thickness=u,this.glcolor=[1,.2,.7],this.glcolor2=[1,0,0,.4],f!=null&&(this.color=f),s!=null&&(this.backgroundColor=s)},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}}});a.exports=o},15802:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(89422),h=t(14811),o=new r({Extends:p,initialize:function(n){p.call(this),this.type=h.COLOR_MATRIX,this.gameObject=n,this.active=!0},destroy:function(){this.gameObject=null,this._matrix=null,this._data=null}});a.exports=o},72898:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=new r({initialize:function(o,l){this.type=o,this.gameObject=l,this.active=!0},setActive:function(h){return this.active=h,this},destroy:function(){this.gameObject=null,this.active=!1}});a.exports=p},44553:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(72898),h=t(14811),o=new r({Extends:p,initialize:function(n,u,f,s){u===void 0&&(u="__WHITE"),f===void 0&&(f=.005),s===void 0&&(s=.005),p.call(this,h.DISPLACEMENT,n),this.x=f,this.y=s,this.glTexture,this.setTexture(u)},setTexture:function(l){var n=this.gameObject.scene.sys.textures.getFrame(l);return n&&(this.glTexture=n.glTexture),this}});a.exports=o},68531:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(72898),h=t(14811),o=new r({Extends:p,initialize:function(n,u,f,s,c){f===void 0&&(f=4),s===void 0&&(s=0),c===void 0&&(c=!1),p.call(this,h.GLOW,n),this.outerStrength=f,this.innerStrength=s,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}}});a.exports=o},37102:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(72898),h=t(14811),o=new r({Extends:p,initialize:function(n,u,f,s,c,d,v,m,S){s===void 0&&(s=.2),c===void 0&&(c=0),d===void 0&&(d=0),v===void 0&&(v=0),m===void 0&&(m=1),S===void 0&&(S=0),p.call(this,h.GRADIENT,n),this.alpha=s,this.size=S,this.fromX=c,this.fromY=d,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}}});a.exports=o},86886:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(72898),h=t(14811),o=new r({Extends:p,initialize:function(n,u){u===void 0&&(u=1),p.call(this,h.PIXELATE,n),this.amount=u}});a.exports=o},92322:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(72898),h=t(14811),o=new r({Extends:p,initialize:function(n,u,f,s,c,d,v,m){u===void 0&&(u=0),f===void 0&&(f=0),s===void 0&&(s=.1),c===void 0&&(c=1),v===void 0&&(v=6),m===void 0&&(m=1),p.call(this,h.SHADOW,n),this.x=u,this.y=f,this.decay=s,this.power=c,this.glcolor=[0,0,0,1],this.samples=v,this.intensity=m,d!==void 0&&(this.color=d)},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}}});a.exports=o},39563:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(72898),h=t(14811),o=new r({Extends:p,initialize:function(n,u,f,s,c){u===void 0&&(u=.5),f===void 0&&(f=.5),s===void 0&&(s=3),c===void 0&&(c=!1),p.call(this,h.SHINE,n),this.speed=u,this.lineWidth=f,this.gradient=s,this.reveal=c}});a.exports=o},56448:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(72898),h=t(14811),o=new r({Extends:p,initialize:function(n,u,f,s,c){u===void 0&&(u=.5),f===void 0&&(f=.5),s===void 0&&(s=.5),c===void 0&&(c=.5),p.call(this,h.VIGNETTE,n),this.x=u,this.y=f,this.radius=s,this.strength=c}});a.exports=o},38433:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(72898),h=t(14811),o=new r({Extends:p,initialize:function(n,u,f,s,c){u===void 0&&(u=.1),f===void 0&&(f=0),s===void 0&&(s=0),c===void 0&&(c=!1),p.call(this,h.WIPE,n),this.progress=0,this.wipeWidth=u,this.direction=f,this.axis=s,this.reveal=c}});a.exports=o},14811:a=>{/** + * @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};a.exports=y},66064:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(79291),p=t(14811),h={Barrel:t(20122),Controller:t(72898),Bloom:t(32251),Blur:t(9047),Bokeh:t(27885),Circle:t(12578),ColorMatrix:t(15802),Displacement:t(44553),Glow:t(68531),Gradient:t(37102),Pixelate:t(86886),Shadow:t(92322),Shine:t(39563),Vignette:t(56448),Wipe:t(38433)};h=r(!1,h,p),a.exports=h},25305:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(10312),p=t(23568),h=function(o,l,n){l.x=p(n,"x",0),l.y=p(n,"y",0),l.depth=p(n,"depth",0),l.flipX=p(n,"flipX",!1),l.flipY=p(n,"flipY",!1);var u=p(n,"scale",null);typeof u=="number"?l.setScale(u):u!==null&&(l.scaleX=p(u,"x",1),l.scaleY=p(u,"y",1));var f=p(n,"scrollFactor",null);typeof f=="number"?l.setScrollFactor(f):f!==null&&(l.scrollFactorX=p(f,"x",1),l.scrollFactorY=p(f,"y",1)),l.rotation=p(n,"rotation",0);var s=p(n,"angle",null);s!==null&&(l.angle=s),l.alpha=p(n,"alpha",1);var c=p(n,"origin",null);if(typeof c=="number")l.setOrigin(c);else if(c!==null){var d=p(c,"x",.5),v=p(c,"y",.5);l.setOrigin(d,v)}l.blendMode=p(n,"blendMode",r.NORMAL),l.visible=p(n,"visible",!0);var m=p(n,"add",!0);return m&&o.sys.displayList.add(l),l.preUpdate&&o.sys.updateList.add(l),l};a.exports=h},13059:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(23568),p=function(h,o){var l=r(o,"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),s=r(l,"delay",0),c=r(l,"repeat",0),d=r(l,"repeatDelay",0),v=r(l,"yoyo",!1),m=r(l,"play",!1),S=r(l,"delayedPlay",0),M={key:u,delay:s,repeat:c,repeatDelay:d,yoyo:v,startFrame:f};m?n.play(M):S>0?n.playAfterDelay(M,S):n.load(M)}}return h};a.exports=p},8050:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(73162),h=t(37277),o=t(51708),l=t(44594),n=t(19186),u=new r({Extends:p,initialize:function(s){p.call(this,s),this.sortChildrenFlag=!1,this.scene=s,this.systems=s.sys,this.events=s.sys.events,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.events.once(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(o.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(o.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,s){return f._depth-s._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"),a.exports=u},95643:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(53774),h=t(45893),o=t(50792),l=t(51708),n=t(44594),u=new r({Extends:o,initialize:function(s,c){o.call(this),this.scene=s,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),s.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,s){return this.data||(this.data=new h(this)),this.data.set(f,s),this},incData:function(f,s){return this.data||(this.data=new h(this)),this.data.inc(f,s),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,s,c){return this.scene.sys.input.enable(this,f,s,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 p(this)},willRender:function(f){var s=this.displayList&&this.displayList.active?this.displayList.willRender(f):!0;return!(!s||u.RENDER_MASK!==this.renderFlags||this.cameraFilter!==0&&this.cameraFilter&f.id)},getIndexList:function(){for(var f=this,s=this.parentContainer,c=[];s&&(c.unshift(s.getIndex(f)),f=s,s.parentContainer);)s=s.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,a.exports=u},44603:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(37277),h=t(44594),o=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}});o.register=function(l,n){o.prototype.hasOwnProperty(l)||(o.prototype[l]=n)},o.remove=function(l){o.prototype.hasOwnProperty(l)&&delete o.prototype[l]},p.register("GameObjectCreator",o,"make"),a.exports=o},39429:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(37277),h=t(44594),o=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}});o.register=function(l,n){o.prototype.hasOwnProperty(l)||(o.prototype[l]=n)},o.remove=function(l){o.prototype.hasOwnProperty(l)&&delete o.prototype[l]},p.register("GameObjectFactory",o,"add"),a.exports=o},91296:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(61340),p=new r,h=new r,o=new r,l={camera:p,sprite:h,calc:o},n=function(u,f,s){var c=p,d=h,v=o;return d.applyITRS(u.x,u.y,u.rotation,u.scaleX,u.scaleY),c.copyFrom(f.matrix),s?(c.multiplyWithOffset(s,-f.scrollX*u.scrollFactorX,-f.scrollY*u.scrollFactorY),d.e=u.x,d.f=u.y):(d.e-=f.scrollX*u.scrollFactorX,d.f-=f.scrollY*u.scrollFactorY),c.multiply(d,v),l};a.exports=n},45027:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(25774),h=t(37277),o=t(44594),l=new r({Extends:p,initialize:function(u){p.call(this),this.checkQueue=!0,this.scene=u,this.systems=u.sys,u.sys.events.once(o.BOOT,this.boot,this),u.sys.events.on(o.START,this.start,this)},boot:function(){this.systems.events.once(o.DESTROY,this.destroy,this)},start:function(){var n=this.systems.events;n.on(o.PRE_UPDATE,this.update,this),n.on(o.UPDATE,this.sceneUpdate,this),n.once(o.SHUTDOWN,this.shutdown,this)},sceneUpdate:function(n,u){for(var f=this._active,s=f.length,c=0;c{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p,h,o,l,n,u,f,s,c,d,v,m,S){var M=p.x-r.displayOriginX+o,A=p.y-r.displayOriginY+l,C=M+p.w,w=A+p.h,P=n.getXRound(M,A,u),L=n.getYRound(M,A,u),O=n.getXRound(M,w,u),I=n.getYRound(M,w,u),D=n.getXRound(C,w,u),B=n.getYRound(C,w,u),G=n.getXRound(C,A,u),z=n.getYRound(C,A,u);t.batchQuad(r,P,L,O,I,D,B,G,z,h.u0,h.v0,h.u1,h.v1,f,s,c,d,v,m,S)};a.exports=y},53048:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p,h){if(p===void 0&&(p=!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 o=t.text,l=o.length,n=t.maxWidth,u=t.wordWrapCharCode,f=Number.MAX_VALUE,s=Number.MAX_VALUE,c=0,d=0,v=t.fontData.chars,m=t.fontData.lineHeight,S=t.letterSpacing,M=t.lineSpacing,A=0,C=0,w=0,P=null,L=t._align,O=0,I=0,D=t.fontSize/t.fontData.size,B=D*t.scaleX,G=D*t.scaleY,z=null,W=0,k=[],J=Number.MAX_VALUE,Q=0,Y=0,K=0,U,V=[],j=[],$=null;if(n>0){for(U=0;Un||At>n?(et.push(ht.i-1),ht.cr?(et.push(ht.i+ht.word.length),nt=0,it=null):it=ht):ht.cr&&(et.push(ht.i+ht.word.length),nt=0,it=null)}var ot=function(le,ce,se){return le.substr(0,ce)+se+le.substr(ce+1)};for(U=et.length-1;U>=0;U--)o=ot(o,et[U],` +`);h.wrappedText=o,l=o.length,V=[],$=null}var st=0;for(U=0;UQ&&(Q=K),KO&&(f=O),s>I&&(s=I);var Tt=O+P.xAdvance,wt=I+m;cQ&&(Q=K),K0)for(var Gt=0;Gt{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(21859),p=function(h,o,l,n,u,f,s){var c=h.sys.textures.get(l),d=c.get(n),v=h.sys.cache.xml.get(u);if(d&&v){var m=r(v,d,f,s,c);return h.sys.cache.bitmapFont.add(o,{data:m,texture:l,frame:n,fromAtlas:!0}),!0}else return!1};a.exports=p},6925:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(35154),p=function(h,o){var l=o.width,n=o.height,u=Math.floor(l/2),f=Math.floor(n/2),s=r(o,"chars","");if(s!==""){var c=r(o,"image",""),d=h.sys.textures.getFrame(c),v=d.cutX,m=d.cutY,S=d.source.width,M=d.source.height,A=r(o,"offset.x",0),C=r(o,"offset.y",0),w=r(o,"spacing.x",0),P=r(o,"spacing.y",0),L=r(o,"lineSpacing",0),O=r(o,"charsPerRow",null);O===null&&(O=S/l,O>s.length&&(O=s.length));for(var I=A,D=C,B={retroFont:!0,font:c,size:l,lineHeight:n+L,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,p){return parseInt(r.getAttribute(p),10)}var t=function(r,p,h,o,l){h===void 0&&(h=0),o===void 0&&(o=0);var n=p.cutX,u=p.cutY,f=p.source.width,s=p.source.height,c=p.sourceIndex,d={},v=r.getElementsByTagName("info")[0],m=r.getElementsByTagName("common")[0];d.font=v.getAttribute("face"),d.size=y(v,"size"),d.lineHeight=y(m,"lineHeight")+o,d.chars={};var S=r.getElementsByTagName("char"),M=p!==void 0&&p.trimmed;if(M)var A=p.height,C=p.width;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=t(87662),p=t(79291),h={Parse:t(6925)};h=p(!1,h,r),a.exports=h},87662:a=>{/** + * @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`};a.exports=y},2638:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(22186),p=t(83419),h=t(12310),o=new p({Extends:r,Mixins:[h],initialize:function(n,u,f,s,c,d,v){r.call(this,n,u,f,s,c,d,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}});a.exports=o},86741:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(20926),p=function(h,o,l,n){var u=o._text,f=u.length,s=h.currentContext;if(!(f===0||!r(h,s,o,l,n))){l.addToRenderList(o);var c=o.fromAtlas?o.frame:o.texture.frames.__BASE,d=o.displayCallback,v=o.callbackData,m=o.fontData.chars,S=o.fontData.lineHeight,M=o._letterSpacing,A=0,C=0,w=0,P=null,L=0,O=0,I=0,D=0,B=0,G=0,z=null,W=0,k=o.frame.source.image,J=c.cutX,Q=c.cutY,Y=0,K=0,U=o._fontSize/o.fontData.size,V=o._align,j=0,$=0;o.getTextBounds(!1);var q=o._bounds.lines;V===1?$=(q.longest-q.lengths[0])/2:V===2&&($=q.longest-q.lengths[0]),s.translate(-o.displayOriginX,-o.displayOriginY);var it=l.roundPixels;o.cropWidth>0&&o.cropHeight>0&&(s.beginPath(),s.rect(0,0,o.cropWidth,o.cropHeight),s.clip());for(var nt=0;nt{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(2638),p=t(25305),h=t(44603),o=t(23568);h.register("dynamicBitmapText",function(l,n){l===void 0&&(l={});var u=o(l,"font",""),f=o(l,"text",""),s=o(l,"size",!1),c=new r(this.scene,0,0,u,f,s);return n!==void 0&&(l.add=n),p(this.scene,c,l),c})},72566:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(2638),p=t(39429);p.register("dynamicBitmapText",function(h,o,l,n,u){return this.displayList.add(new r(this.scene,h,o,l,n,u))})},12310:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(29747),p=r,h=r;p=t(73482),h=t(86741),a.exports={renderWebGL:p,renderCanvas:h}},73482:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(91296),p=t(61340),h=t(70554),o=new p,l=function(n,u,f,s){var c=u.text,d=c.length;if(d!==0){f.addToRenderList(u);var v=n.pipelines.set(u.pipeline,u),m=r(u,f,s);n.pipelines.preBatch(u);var S=m.sprite,M=m.calc,A=o,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 w=u.frame,P=w.glTexture,L=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,W=0,k=0,J=0,Q=u.letterSpacing,Y,K=0,U=0,V,j=u.scrollX,$=u.scrollY,q=u.fontData,it=q.chars,nt=q.lineHeight,et=u.fontSize/q.size,ht=0,ut=u._align,dt=0,mt=0,gt=u.getTextBounds(!1);u.maxWidth>0&&(c=gt.wrappedText,d=c.length);var At=u._bounds.lines;ut===1?mt=(At.longest-At.lengths[0])/2:ut===2&&(mt=At.longest-At.lengths[0]);for(var ot=f.roundPixels,st=u.displayCallback,yt=u.callbackData,Tt=0;Tt{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(45319),h=t(31401),o=t(95643),l=t(53048),n=t(61327),u=t(21859),f=t(87841),s=t(18658),c=new r({Extends:o,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,s],initialize:function(v,m,S,M,A,C,w){A===void 0&&(A=""),w===void 0&&(w=0),o.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=w,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(A)},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(d){return this._fontSize=d,this._dirty=!0,this},setLetterSpacing:function(d){return d===void 0&&(d=0),this._letterSpacing=d,this._dirty=!0,this},setLineSpacing:function(d){return d===void 0&&(d=0),this.lineSpacing=d,this},setText:function(d){return!d&&d!==0&&(d=""),Array.isArray(d)&&(d=d.join(` +`)),d!==this.text&&(this._text=d.toString(),this._dirty=!0,this.updateDisplayOrigin()),this},setDropShadow:function(d,v,m,S){return d===void 0&&(d=0),v===void 0&&(v=0),m===void 0&&(m=0),S===void 0&&(S=.5),this.dropShadowX=d,this.dropShadowY=v,this.dropShadowColor=m,this.dropShadowAlpha=S,this},setCharacterTint:function(d,v,m,S,M,A,C){d===void 0&&(d=0),v===void 0&&(v=1),m===void 0&&(m=!1),S===void 0&&(S=-1),M===void 0&&(M=S,A=S,C=S);var w=this.text.length;v===-1&&(v=w),d<0&&(d=w+d),d=p(d,0,w-1);for(var P=p(d+v,d,w),L=this.charColors,O=d;O{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(20926),p=function(h,o,l,n){var u=o._text,f=u.length,s=h.currentContext;if(!(f===0||!r(h,s,o,l,n))){l.addToRenderList(o);var c=o.fromAtlas?o.frame:o.texture.frames.__BASE,d=o.fontData.chars,v=o.fontData.lineHeight,m=o._letterSpacing,S=o._lineSpacing,M=0,A=0,C=0,w=null,P=0,L=0,O=0,I=0,D=0,B=0,G=null,z=0,W=c.source.image,k=c.cutX,J=c.cutY,Q=o._fontSize/o.fontData.size,Y=o._align,K=0,U=0,V=o.getTextBounds(!1);o.maxWidth>0&&(u=V.wrappedText,f=u.length);var j=o._bounds.lines;Y===1?U=(j.longest-j.lengths[0])/2:Y===2&&(U=j.longest-j.lengths[0]),s.translate(-o.displayOriginX,-o.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=t(22186),p=t(25305),h=t(44603),o=t(23568),l=t(35154);h.register("bitmapText",function(n,u){n===void 0&&(n={});var f=l(n,"font",""),s=o(n,"text",""),c=o(n,"size",!1),d=l(n,"align",0),v=new r(this.scene,0,0,f,s,c,d);return u!==void 0&&(n.add=u),p(this.scene,v,n),v})},34914:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(22186),p=t(39429);p.register("bitmapText",function(h,o,l,n,u,f){return this.displayList.add(new r(this.scene,h,o,l,n,u,f))})},18658:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(29747),p=r,h=r;p=t(33590),h=t(37289),a.exports={renderWebGL:p,renderCanvas:h}},33590:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(3217),p=t(91296),h=t(70554),o=function(l,n,u,f){var s=n._text,c=s.length;if(c!==0){u.addToRenderList(n);var d=l.pipelines.set(n.pipeline,n),v=p(n,u,f).calc;l.pipelines.preBatch(n);var m=u.roundPixels,S=u.alpha,M=n.charColors,A=n.tintFill,C=h.getTintAppendFloatAlpha,w=C(n.tintTopLeft,S*n._alphaTL),P=C(n.tintTopRight,S*n._alphaTR),L=C(n.tintBottomLeft,S*n._alphaBL),O=C(n.tintBottomRight,S*n._alphaBR),I=n.frame.glTexture,D=d.setGameObject(n),B=n.getTextBounds(!1),G,z,W,k=B.characters,J=n.dropShadowX,Q=n.dropShadowY,Y=J!==0||Q!==0;if(Y){var K=n.dropShadowColor,U=n.dropShadowAlpha,V=C(K,S*U*n._alphaTL),j=C(K,S*U*n._alphaTR),$=C(K,S*U*n._alphaBL),q=C(K,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} + */var r=t(48011),p=t(46590),h=t(83419),o=t(31401),l=t(4327),n=t(95643),u=t(73162),f=new h({Extends:n,Mixins:[o.Alpha,o.BlendMode,o.Depth,o.Mask,o.Pipeline,o.PostPipeline,o.ScrollFactor,o.Size,o.Texture,o.Transform,o.Visible,r],initialize:function(c,d,v,m,S){n.call(this,c,"Blitter"),this.setTexture(m,S),this.setPosition(d,v),this.initPipeline(),this.initPostPipeline(),this.children=new u,this.renderList=[],this.dirty=!1},create:function(s,c,d,v,m){v===void 0&&(v=!0),m===void 0&&(m=this.children.length),d===void 0?d=this.frame:d instanceof l||(d=this.texture.get(d));var S=new p(this,s,c,d,v);return this.children.addAt(S,m,!1),this.dirty=!0,S},createFromCallback:function(s,c,d,v){for(var m=this.createMultiple(c,d,v),S=0;S0},getRenderList:function(){return this.dirty&&(this.renderList=this.children.list.filter(this.childCanRender,this),this.dirty=!1),this.renderList},clear:function(){this.children.removeAll(),this.dirty=!0},preDestroy:function(){this.children.destroy(),this.renderList=[]}});a.exports=f},72396:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p,h){var o=r.getRenderList();if(o.length!==0){var l=t.currentContext,n=p.alpha*r.alpha;if(n!==0){p.addToRenderList(r),l.globalCompositeOperation=t.blendModes[r.blendMode],l.imageSmoothingEnabled=!r.frame.source.scaleMode;var u=r.x-p.scrollX*r.scrollFactorX,f=r.y-p.scrollY*r.scrollFactorY;l.save(),h&&h.copyToContext(l);for(var s=p.roundPixels,c=0;c0&&S.height>0&&(l.save(),l.translate(d.x+u,d.y+f),l.scale(C,w),l.drawImage(m.source.image,S.x,S.y,S.width,S.height,M,A,S.width,S.height),l.restore())):(s&&(M=Math.round(M),A=Math.round(A)),S.width>0&&S.height>0&&l.drawImage(m.source.image,S.x,S.y,S.width,S.height,M+d.x+u,A+d.y+f,S.width,S.height)))}l.restore()}}};a.exports=y},9403:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(6107),p=t(25305),h=t(44603),o=t(23568);h.register("blitter",function(l,n){l===void 0&&(l={});var u=o(l,"key",null),f=o(l,"frame",null),s=new r(this.scene,0,0,u,f);return n!==void 0&&(l.add=n),p(this.scene,s,l),s})},12709:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(6107),p=t(39429);p.register("blitter",function(h,o,l,n){return this.displayList.add(new r(this.scene,h,o,l,n))})},48011:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(29747),p=r,h=r;p=t(99485),h=t(72396),a.exports={renderWebGL:p,renderCanvas:h}},99485:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(61340),p=t(70554),h=new r,o=function(l,n,u,f){var s=n.getRenderList(),c=u.alpha*n.alpha;if(!(s.length===0||c===0)){u.addToRenderList(n);var d=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,A=n.y-m,C=-1,w=!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=t(83419),p=t(4327),h=new r({initialize:function(l,n,u,f,s){this.parent=l,this.x=n,this.y=u,this.frame=f,this.data={},this.tint=16777215,this._visible=s,this._alpha=1,this.flipX=!1,this.flipY=!1,this.hasTransformComponent=!0},setFrame:function(o){return o===void 0?this.frame=this.parent.frame:o instanceof p&&o.texture===this.parent.texture?this.frame=o:this.frame=this.parent.texture.get(o),this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this},reset:function(o,l,n){return this.x=o,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(o,l){return this.x=o,this.y=l,this},setFlipX:function(o){return this.flipX=o,this},setFlipY:function(o){return this.flipY=o,this},setFlip:function(o,l){return this.flipX=o,this.flipY=l,this},setVisible:function(o){return this.visible=o,this},setAlpha:function(o){return this.alpha=o,this},setTint:function(o){return this.tint=o,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(o){this.parent.dirty|=this._visible!==o,this._visible=o}},alpha:{get:function(){return this._alpha},set:function(o){this.parent.dirty|=this._alpha>0!=o>0,this._alpha=o}}});a.exports=h},16005:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(45319),p=2,h={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(o,l,n,u){return o===void 0&&(o=1),l===void 0?this.alpha=o:(this._alphaTL=r(o,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(o){var l=r(o,0,1);this._alpha=l,this._alphaTL=l,this._alphaTR=l,this._alphaBL=l,this._alphaBR=l,l===0?this.renderFlags&=~p:this.renderFlags|=p}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(o){var l=r(o,0,1);this._alphaTL=l,l!==0&&(this.renderFlags|=p)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(o){var l=r(o,0,1);this._alphaTR=l,l!==0&&(this.renderFlags|=p)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(o){var l=r(o,0,1);this._alphaBL=l,l!==0&&(this.renderFlags|=p)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(o){var l=r(o,0,1);this._alphaBR=l,l!==0&&(this.renderFlags|=p)}}};a.exports=h},88509:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(45319),p=2,h={_alpha:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(o){return o===void 0&&(o=1),this.alpha=o,this},alpha:{get:function(){return this._alpha},set:function(o){var l=r(o,0,1);this._alpha=l,l===0?this.renderFlags&=~p:this.renderFlags|=p}}};a.exports=h},90065:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(10312),p={_blendMode:r.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(h){typeof h=="string"&&(h=r[h]),h|=0,h>=-1&&(this._blendMode=h)}},setBlendMode:function(h){return this.blendMode=h,this}};a.exports=p},94215:a=>{/** + * @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(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,r){return this.width=t,this.height=r,this},setDisplaySize:function(t,r){return this.displayWidth=t,this.displayHeight=r,this}};a.exports=y},61683:a=>{/** + * @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(t,r,p,h){if(t===void 0)this.isCropped=!1;else if(this.frame){if(typeof t=="number")this.frame.setCropUVs(this._crop,t,r,p,h,this.flipX,this.flipY);else{var o=t;this.frame.setCropUVs(this._crop,o.x,o.y,o.width,o.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}}};a.exports=y},89272:a=>{/** + * @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(t){this.displayList&&this.displayList.queueDepthSort(),this._depth=t}},setDepth:function(t){return t===void 0&&(t=0),this.depth=t,this}};a.exports=y},47059:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(66064),h=t(19133),o=new r({initialize:function(n,u){this.gameObject=n,this.isPost=u,this.enabled=!1,this.list=[],this.padding=0},setPadding:function(l){return l===void 0&&(l=0),this.padding=l,this.gameObject},onFXCopy:function(){},onFX:function(){},enable:function(l){if(!this.isPost){var n=this.gameObject.scene.sys.renderer;n&&n.pipelines?(this.gameObject.pipeline=n.pipelines.FX_PIPELINE,l!==void 0&&(this.padding=l),this.enabled=!0):this.enabled=!1}},clear:function(){if(this.isPost)this.gameObject.resetPostPipeline(!0);else{for(var l=this.list,n=0;n{/** + * @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(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,r){return this.flipX=t,this.flipY=r,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}};a.exports=y},8004:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(87841),p=t(11520),h=t(26099),o={prepareBoundsOutput:function(l,n){if(n===void 0&&(n=!1),this.rotation!==0&&p(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,s,c,d,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,s=l.y,this.getBottomLeft(l),S.transformPoint(l.x,l.y,l),c=l.x,d=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,s=l.y,this.getBottomLeft(l),c=l.x,d=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,s,d,m),l.width=Math.max(n,f,c,v)-l.x,l.height=Math.max(u,s,d,m)-l.y,l}};a.exports=o},8573:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(6858),p=t(80661),h={mask:null,setMask:function(o){return this.mask=o,this},clearMask:function(o){return o===void 0&&(o=!1),o&&this.mask&&this.mask.destroy(),this.mask=null,this},createBitmapMask:function(o,l,n,u,f){return o===void 0&&(this.texture||this.shader||this.geom)&&(o=this),new r(this.scene,o,l,n,u,f)},createGeometryMask:function(o){return o===void 0&&(this.type==="Graphics"||this.geom)&&(o=this),new p(this.scene,o)}};a.exports=h},27387:a=>{/** + * @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(t){this._displayOriginX=t,this.originX=t/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(t){this._displayOriginY=t,this.originY=t/this.height}},setOrigin:function(t,r){return t===void 0&&(t=.5),r===void 0&&(r=t),this.originX=t,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(t,r){return t===void 0&&(t=0),r===void 0&&(r=t),this.displayOriginX=t,this.displayOriginY=r,this},updateDisplayOrigin:function(){return this._displayOriginX=this.originX*this.width,this._displayOriginY=this.originY*this.height,this}};a.exports=y},37640:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(39506),p=t(57355),h=t(35154),o=t(86353),l=t(26099),n={path:null,rotateToPath:!1,pathRotationOffset:0,pathOffset:null,pathVector:null,pathDelta:null,pathTween:null,pathConfig:null,_prevDirection:o.PLAYING_FORWARD,setPath:function(u,f){f===void 0&&(f=this.pathConfig);var s=this.pathTween;return s&&s.isPlaying()&&s.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 s=this.pathTween;s&&s.isPlaying()&&s.stop(),typeof u=="number"&&(u={duration:u}),u.from=h(u,"from",0),u.to=h(u,"to",1);var c=p(u,"positionOnPath",!1);this.rotateToPath=p(u,"rotateToPath",!1),this.pathRotationOffset=h(u,"rotationOffset",0);var d=h(u,"startAt",f);if(d&&(u.onStart=function(m){var S=m.data[0];S.progress=d,S.elapsed=S.duration*d;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=o.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],s=this.pathDelta,c=this.pathVector;if(s.copy(c).negate(),f.state===o.COMPLETE){this.path.getPoint(f.end,c),s.add(c),c.add(this.pathOffset),this.setPosition(c.x,c.y);return}else if(f.state!==o.PLAYING_FORWARD&&f.state!==o.PLAYING_BACKWARD)return;this.path.getPoint(u.getValue(),c),s.add(c),c.add(this.pathOffset);var d=this.x,v=this.y;this.setPosition(c.x,c.y);var m=this.x-d,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))}}};a.exports=n},72699:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(62644),p={defaultPipeline:null,pipeline:null,pipelineData:null,initPipeline:function(h){this.pipelineData={};var o=this.scene.sys.renderer;if(!o)return!1;var l=o.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,o,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),o&&(this.pipelineData=l?r(o):o)}return this},setPipelineData:function(h,o){var l=this.pipelineData;return o===void 0?delete l[h]:l[h]=o,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}};a.exports=p},17581:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(62644),p=t(47059),h=t(19133),o={hasPostPipeline:!1,postPipelines:null,postPipelineData:null,preFX:null,postFX:null,initPostPipeline:function(l){this.postPipelines=[],this.postPipelineData={},this.postFX=new p(this,!0),l&&(this.preFX=new p(this,!1))},setPostPipeline:function(l,n,u){var f=this.scene.sys.renderer;if(!f)return this;var s=f.pipelines;if(s){Array.isArray(l)||(l=[l]);for(var c=0;c0,this},setPostPipelineData:function(l,n){var u=this.postPipelineData;return n===void 0?delete u[l]:u[l]=n,this},getPostPipeline:function(l){for(var n=typeof l=="string",u=this.postPipelines,f=[],s=0;s=0;f--){var s=u[f];(n&&s.name===l||!n&&s===l)&&(s.destroy(),h(u,f))}return this.hasPostPipeline=this.postPipelines.length>0,this},clearFX:function(){return this.preFX&&this.preFX.clear(),this.postFX&&this.postFX.clear(),this}};a.exports=o},80227:a=>{/** + * @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(t,r){return r===void 0&&(r=t),this.scrollFactorX=t,this.scrollFactorY=r,this}};a.exports=y},16736:a=>{/** + * @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(t){this.scaleX=t/this.frame.realWidth}},displayHeight:{get:function(){return Math.abs(this.scaleY*this.frame.realHeight)},set:function(t){this.scaleY=t/this.frame.realHeight}},setSizeToFrame:function(t){t||(t=this.frame),this.width=t.realWidth,this.height=t.realHeight;var r=this.input;return r&&!r.customHitArea&&(r.hitArea.width=this.width,r.hitArea.height=this.height),this},setSize:function(t,r){return this.width=t,this.height=r,this},setDisplaySize:function(t,r){return this.displayWidth=t,this.displayHeight=r,this}};a.exports=y},37726:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(4327),p=8,h={texture:null,frame:null,isCropped:!1,setTexture:function(o,l,n,u){return this.texture=this.scene.sys.textures.get(o),this.setFrame(l,n,u)},setFrame:function(o,l,n){return l===void 0&&(l=!0),n===void 0&&(n=!0),o instanceof r?(this.texture=this.scene.sys.textures.get(o.texture.key),this.frame=o):this.frame=this.texture.get(o),!this.frame.cutWidth||!this.frame.cutHeight?this.renderFlags&=~p:this.renderFlags|=p,this._sizeComponent&&l&&this.setSizeToFrame(),this._originComponent&&n&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}};a.exports=h},79812:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(4327),p=8,h={texture:null,frame:null,isCropped:!1,setCrop:function(o,l,n,u){if(o===void 0)this.isCropped=!1;else if(this.frame){if(typeof o=="number")this.frame.setCropUVs(this._crop,o,l,n,u,this.flipX,this.flipY);else{var f=o;this.frame.setCropUVs(this._crop,f.x,f.y,f.width,f.height,this.flipX,this.flipY)}this.isCropped=!0}return this},setTexture:function(o,l){return this.texture=this.scene.sys.textures.get(o),this.setFrame(l)},setFrame:function(o,l,n){return l===void 0&&(l=!0),n===void 0&&(n=!0),o instanceof r?(this.texture=this.scene.sys.textures.get(o.texture.key),this.frame=o):this.frame=this.texture.get(o),!this.frame.cutWidth||!this.frame.cutHeight?this.renderFlags&=~p:this.renderFlags|=p,this._sizeComponent&&l&&this.setSizeToFrame(),this._originComponent&&n&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this.isCropped&&this.frame.updateCropUVs(this._crop,this.flipX,this.flipY),this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};a.exports=h},27472:a=>{/** + * @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(t,r,p,h){return t===void 0&&(t=16777215),r===void 0&&(r=t,p=t,h=t),this.tintTopLeft=t,this.tintTopRight=r,this.tintBottomLeft=p,this.tintBottomRight=h,this.tintFill=!1,this},setTintFill:function(t,r,p,h){return this.setTint(t,r,p,h),this.tintFill=!0,this},tint:{get:function(){return this.tintTopLeft},set:function(t){this.setTint(t,t,t,t)}},isTinted:{get:function(){var t=16777215;return this.tintFill||this.tintTopLeft!==t||this.tintTopRight!==t||this.tintBottomLeft!==t||this.tintBottomRight!==t}}};a.exports=y},53774:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){var r={name:t.name,type:t.type,x:t.x,y:t.y,depth:t.depth,scale:{x:t.scaleX,y:t.scaleY},origin:{x:t.originX,y:t.originY},flipX:t.flipX,flipY:t.flipY,rotation:t.rotation,alpha:t.alpha,visible:t.visible,blendMode:t.blendMode,textureKey:"",frameKey:"",data:{}};return t.texture&&(r.textureKey=t.texture.key,r.frameKey=t.frame.name),r};a.exports=y},16901:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(36383),p=t(61340),h=t(85955),o=t(86554),l=t(30954),n=t(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(s){this._scaleX=s,this._scaleY=s,s===0?this.renderFlags&=~u:this.renderFlags|=u}},scaleX:{get:function(){return this._scaleX},set:function(s){this._scaleX=s,s===0?this.renderFlags&=~u:this._scaleY!==0&&(this.renderFlags|=u)}},scaleY:{get:function(){return this._scaleY},set:function(s){this._scaleY=s,s===0?this.renderFlags&=~u:this._scaleX!==0&&(this.renderFlags|=u)}},angle:{get:function(){return l(this._rotation*r.RAD_TO_DEG)},set:function(s){this.rotation=l(s)*r.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(s){this._rotation=o(s)}},setPosition:function(s,c,d,v){return s===void 0&&(s=0),c===void 0&&(c=s),d===void 0&&(d=0),v===void 0&&(v=0),this.x=s,this.y=c,this.z=d,this.w=v,this},copyPosition:function(s){return s.x!==void 0&&(this.x=s.x),s.y!==void 0&&(this.y=s.y),s.z!==void 0&&(this.z=s.z),s.w!==void 0&&(this.w=s.w),this},setRandomPosition:function(s,c,d,v){return s===void 0&&(s=0),c===void 0&&(c=0),d===void 0&&(d=this.scene.sys.scale.width),v===void 0&&(v=this.scene.sys.scale.height),this.x=s+Math.random()*d,this.y=c+Math.random()*v,this},setRotation:function(s){return s===void 0&&(s=0),this.rotation=s,this},setAngle:function(s){return s===void 0&&(s=0),this.angle=s,this},setScale:function(s,c){return s===void 0&&(s=1),c===void 0&&(c=s),this.scaleX=s,this.scaleY=c,this},setX:function(s){return s===void 0&&(s=0),this.x=s,this},setY:function(s){return s===void 0&&(s=0),this.y=s,this},setZ:function(s){return s===void 0&&(s=0),this.z=s,this},setW:function(s){return s===void 0&&(s=0),this.w=s,this},getLocalTransformMatrix:function(s){return s===void 0&&(s=new p),s.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(s,c){s===void 0&&(s=new p);var d=this.parentContainer;if(!d)return this.getLocalTransformMatrix(s);for(c||(c=new p),s.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY);d;)c.applyITRS(d.x,d.y,d._rotation,d._scaleX,d._scaleY),c.multiply(s,s),d=d.parentContainer;return s},getLocalPoint:function(s,c,d,v){d||(d=new n),v||(v=this.scene.sys.cameras.main);var m=v.scrollX,S=v.scrollY,M=s+m*this.scrollFactorX-m,A=c+S*this.scrollFactorY-S;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(M,A,d):h(M,A,this.x,this.y,this.rotation,this.scaleX,this.scaleY,d),this._originComponent&&(d.x+=this._displayOriginX,d.y+=this._displayOriginY),d},getParentRotation:function(){for(var s=0,c=this.parentContainer;c;)s+=c.rotation,c=c.parentContainer;return s}};a.exports=f},61340:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(36383),h=t(26099),o=new r({initialize:function(n,u,f,s,c,d){n===void 0&&(n=1),u===void 0&&(u=0),f===void 0&&(f=0),s===void 0&&(s=1),c===void 0&&(c=0),d===void 0&&(d=0),this.matrix=new Float32Array([n,u,f,s,c,d,0,0,1]),this.decomposedMatrix={translateX:0,translateY:0,scaleX:1,scaleY:1,rotation:0},this.quad=new Float32Array(8)},a:{get:function(){return this.matrix[0]},set:function(l){this.matrix[0]=l}},b:{get:function(){return this.matrix[1]},set:function(l){this.matrix[1]=l}},c:{get:function(){return this.matrix[2]},set:function(l){this.matrix[2]=l}},d:{get:function(){return this.matrix[3]},set:function(l){this.matrix[3]=l}},e:{get:function(){return this.matrix[4]},set:function(l){this.matrix[4]=l}},f:{get:function(){return this.matrix[5]},set:function(l){this.matrix[5]=l}},tx:{get:function(){return this.matrix[4]},set:function(l){this.matrix[4]=l}},ty:{get:function(){return this.matrix[5]},set:function(l){this.matrix[5]=l}},rotation:{get:function(){return Math.acos(this.a/this.scaleX)*(Math.atan(-this.c/this.a)<0?-1:1)}},rotationNormalized:{get:function(){var l=this.matrix,n=l[0],u=l[1],f=l[2],s=l[3];return n||u?u>0?Math.acos(n/this.scaleX):-Math.acos(n/this.scaleX):f||s?p.TAU-(s>0?Math.acos(-f/this.scaleY):-Math.acos(f/this.scaleY)):0}},scaleX:{get:function(){return Math.sqrt(this.a*this.a+this.b*this.b)}},scaleY:{get:function(){return Math.sqrt(this.c*this.c+this.d*this.d)}},loadIdentity:function(){var l=this.matrix;return l[0]=1,l[1]=0,l[2]=0,l[3]=1,l[4]=0,l[5]=0,this},translate:function(l,n){var u=this.matrix;return u[4]=u[0]*l+u[2]*n+u[4],u[5]=u[1]*l+u[3]*n+u[5],this},scale:function(l,n){var u=this.matrix;return u[0]*=l,u[1]*=l,u[2]*=n,u[3]*=n,this},rotate:function(l){var n=Math.sin(l),u=Math.cos(l),f=this.matrix,s=f[0],c=f[1],d=f[2],v=f[3];return f[0]=s*u+d*n,f[1]=c*u+v*n,f[2]=s*-n+d*u,f[3]=c*-n+v*u,this},multiply:function(l,n){var u=this.matrix,f=l.matrix,s=u[0],c=u[1],d=u[2],v=u[3],m=u[4],S=u[5],M=f[0],A=f[1],C=f[2],w=f[3],P=f[4],L=f[5],O=n===void 0?u:n.matrix;return O[0]=M*s+A*d,O[1]=M*c+A*v,O[2]=C*s+w*d,O[3]=C*c+w*v,O[4]=P*s+L*d+m,O[5]=P*c+L*v+S,O},multiplyWithOffset:function(l,n,u){var f=this.matrix,s=l.matrix,c=f[0],d=f[1],v=f[2],m=f[3],S=f[4],M=f[5],A=n*c+u*v+S,C=n*d+u*m+M,w=s[0],P=s[1],L=s[2],O=s[3],I=s[4],D=s[5];return f[0]=w*c+P*v,f[1]=w*d+P*m,f[2]=L*c+O*v,f[3]=L*d+O*m,f[4]=I*c+D*v+A,f[5]=I*d+D*m+C,this},transform:function(l,n,u,f,s,c){var d=this.matrix,v=d[0],m=d[1],S=d[2],M=d[3],A=d[4],C=d[5];return d[0]=l*v+n*S,d[1]=l*m+n*M,d[2]=u*v+f*S,d[3]=u*m+f*M,d[4]=s*v+c*S+A,d[5]=s*m+c*M+C,this},transformPoint:function(l,n,u){u===void 0&&(u={x:0,y:0});var f=this.matrix,s=f[0],c=f[1],d=f[2],v=f[3],m=f[4],S=f[5];return u.x=l*s+n*d+m,u.y=l*c+n*v+S,u},invert:function(){var l=this.matrix,n=l[0],u=l[1],f=l[2],s=l[3],c=l[4],d=l[5],v=n*s-u*f;return l[0]=s/v,l[1]=-u/v,l[2]=-f/v,l[3]=n/v,l[4]=(f*d-s*c)/v,l[5]=-(n*d-u*c)/v,this},copyFrom:function(l){var n=this.matrix;return n[0]=l.a,n[1]=l.b,n[2]=l.c,n[3]=l.d,n[4]=l.e,n[5]=l.f,this},copyFromArray:function(l){var n=this.matrix;return n[0]=l[0],n[1]=l[1],n[2]=l[2],n[3]=l[3],n[4]=l[4],n[5]=l[5],this},copyToContext:function(l){var n=this.matrix;return l.transform(n[0],n[1],n[2],n[3],n[4],n[5]),l},setToContext:function(l){return l.setTransform(this),l},copyToArray:function(l){var n=this.matrix;return l===void 0?l=[n[0],n[1],n[2],n[3],n[4],n[5]]:(l[0]=n[0],l[1]=n[1],l[2]=n[2],l[3]=n[3],l[4]=n[4],l[5]=n[5]),l},setTransform:function(l,n,u,f,s,c){var d=this.matrix;return d[0]=l,d[1]=n,d[2]=u,d[3]=f,d[4]=s,d[5]=c,this},decomposeMatrix:function(){var l=this.decomposedMatrix,n=this.matrix,u=n[0],f=n[1],s=n[2],c=n[3],d=u*c-f*s;if(l.translateX=n[4],l.translateY=n[5],u||f){var v=Math.sqrt(u*u+f*f);l.rotation=f>0?Math.acos(u/v):-Math.acos(u/v),l.scaleX=v,l.scaleY=d/v}else if(s||c){var m=Math.sqrt(s*s+c*c);l.rotation=Math.PI*.5-(c>0?Math.acos(-s/m):-Math.acos(s/m)),l.scaleX=d/m,l.scaleY=m}else l.rotation=0,l.scaleX=0,l.scaleY=0;return l},applyITRS:function(l,n,u,f,s){var c=this.matrix,d=Math.sin(u),v=Math.cos(u);return c[4]=l,c[5]=n,c[0]=v*f,c[1]=d*f,c[2]=-d*s,c[3]=v*s,this},applyInverse:function(l,n,u){u===void 0&&(u=new h);var f=this.matrix,s=f[0],c=f[1],d=f[2],v=f[3],m=f[4],S=f[5],M=1/(s*v+d*-c);return u.x=v*M*l+-d*M*n+(S*d-m*v)*M,u.y=s*M*n+-c*M*l+(-S*s+m*c)*M,u},setQuad:function(l,n,u,f,s,c){s===void 0&&(s=!1),c===void 0&&(c=this.quad);var d=this.matrix,v=d[0],m=d[1],S=d[2],M=d[3],A=d[4],C=d[5];return s?(c[0]=Math.round(l*v+n*S+A),c[1]=Math.round(l*m+n*M+C),c[2]=Math.round(l*v+f*S+A),c[3]=Math.round(l*m+f*M+C),c[4]=Math.round(u*v+f*S+A),c[5]=Math.round(u*m+f*M+C),c[6]=Math.round(u*v+n*S+A),c[7]=Math.round(u*m+n*M+C)):(c[0]=l*v+n*S+A,c[1]=l*m+n*M+C,c[2]=l*v+f*S+A,c[3]=l*m+f*M+C,c[4]=u*v+f*S+A,c[5]=u*m+f*M+C,c[6]=u*v+n*S+A,c[7]=u*m+n*M+C),c},getX:function(l,n){return l*this.a+n*this.c+this.e},getY:function(l,n){return l*this.b+n*this.d+this.f},getXRound:function(l,n,u){var f=this.getX(l,n);return u&&(f=Math.round(f)),f},getYRound:function(l,n,u){var f=this.getY(l,n);return u&&(f=Math.round(f)),f},getCSSMatrix:function(){var l=this.matrix;return"matrix("+l[0]+","+l[1]+","+l[2]+","+l[3]+","+l[4]+","+l[5]+")"},destroy:function(){this.matrix=null,this.quad=null,this.decomposedMatrix=null}});a.exports=o},59715:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=1,t={_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}};a.exports=t},31401:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={Alpha:t(16005),AlphaSingle:t(88509),BlendMode:t(90065),ComputedSize:t(94215),Crop:t(61683),Depth:t(89272),Flip:t(54434),FX:t(47059),GetBounds:t(8004),Mask:t(8573),Origin:t(27387),PathFollower:t(37640),Pipeline:t(72699),PostPipeline:t(17581),ScrollFactor:t(80227),Size:t(16736),Texture:t(37726),TextureCrop:t(79812),Tint:t(27472),ToJSON:t(53774),Transform:t(16901),TransformMatrix:t(61340),Visible:t(59715)}},31559:(a,y,t)=>{/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(37105),p=t(10312),h=t(83419),o=t(31401),l=t(51708),n=t(95643),u=t(87841),f=t(29959),s=t(36899),c=t(26099),d=new h({Extends:n,Mixins:[o.AlphaSingle,o.BlendMode,o.ComputedSize,o.Depth,o.Mask,o.PostPipeline,o.Transform,o.Visible,f],initialize:function(m,S,M,A){n.call(this,m,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new o.TransformMatrix,this.tempTransformMatrix=new o.TransformMatrix,this._sortKey="",this._sysEvents=m.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.initPostPipeline(),this.setPosition(S,M),this.setBlendMode(p.SKIP_CHECK),A&&this.add(A)},originX:{get:function(){return .5}},originY:{get:function(){return .5}},displayOriginX:{get:function(){return this.width*.5}},displayOriginY:{get:function(){return this.height*.5}},setExclusive:function(v){return v===void 0&&(v=!0),this.exclusive=v,this},getBounds:function(v){if(v===void 0&&(v=new u),v.setTo(this.x,this.y,0,0),this.parentContainer){var m=this.parentContainer.getBoundsTransformMatrix(),S=m.transformPoint(this.x,this.y);v.setTo(S.x,S.y,0,0)}if(this.list.length>0){var M=this.list,A=new u,C=!1;v.setEmpty();for(var w=0;w-1},setAll:function(v,m,S,M){return r.SetAll(this.list,v,m,S,M),this},each:function(v,m){var S=[null],M,A=this.list.slice(),C=A.length;for(M=2;M0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[]},onChildDestroyed:function(v){r.Remove(this.list,v),this.exclusive&&(v.parentContainer=null,v.removedFromScene())}});a.exports=d},53584:a=>{/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p,h){p.addToRenderList(r);var o=r.list;if(o.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||t.setBlendMode(0);var u=r._alpha,f=r.scrollFactorX,s=r.scrollFactorY;r.mask&&r.mask.preRenderCanvas(t,null,p);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=t(25305),p=t(31559),h=t(44603),o=t(23568),l=t(95540);h.register("container",function(n,u){n===void 0&&(n={});var f=o(n,"x",0),s=o(n,"y",0),c=l(n,"children",null),d=new p(this.scene,f,s,c);return u!==void 0&&(n.add=u),r(this.scene,d,n),d})},24961:(a,y,t)=>{/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(31559),p=t(39429);p.register("container",function(h,o,l){return this.displayList.add(new r(this.scene,h,o,l))})},29959:(a,y,t)=>{/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(29747),p=r,h=r;p=t(72249),h=t(53584),a.exports={renderWebGL:p,renderCanvas:h}},72249:a=>{/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p,h){p.addToRenderList(r);var o=r.list,l=o.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),t.pipelines.preBatch(r);var u=r.blendMode!==-1;u||t.setBlendMode(0);for(var f=r.alpha,s=r.scrollFactorX,c=r.scrollFactorY,d=0;d{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports=["normal","multiply","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]},3069:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(31401),h=t(441),o=t(95643),l=t(41212),n=t(35846),u=t(44594),f=t(61369),s=new r({Extends:o,Mixins:[p.AlphaSingle,p.BlendMode,p.Depth,p.Origin,p.ScrollFactor,p.Transform,p.Visible,h],initialize:function(d,v,m,S,M,A){o.call(this,d,"DOMElement"),this.parent=d.sys.game.domContainer,this.cache=d.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,A):this.createElement(S,M,A):S&&this.setElement(S,M,A),d.sys.events.on(u.SLEEP,this.handleSceneEvent,this),d.sys.events.on(u.WAKE,this.handleSceneEvent,this),d.sys.events.on(u.PRE_RENDER,this.preRender,this)},handleSceneEvent:function(c){var d=this.node,v=d.style;d&&(v.display=c.settings.visible?"block":"none")},setSkew:function(c,d){return c===void 0&&(c=0),d===void 0&&(d=c),this.skewX=c,this.skewY=d,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 d=0;d{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(47407),p=t(95643),h=t(61340),o=new h,l=new h,n=new h,u=function(f,s,c,d){if(s.node){var v=s.node.style,m=s.scene.sys.settings;if(!v||!m.visible||p.RENDER_MASK!==s.renderFlags||s.cameraFilter!==0&&s.cameraFilter&c.id||s.parentContainer&&!s.parentContainer.willRender()){v.display="none";return}var S=s.parentContainer,M=c.alpha*s.alpha;S&&(M*=S.alpha);var A=o,C=l,w=n,P=0,L=0,O="0%",I="0%";d?(P=s.width*s.scaleX*s.originX,L=s.height*s.scaleY*s.originY,C.applyITRS(s.x-P,s.y-L,s.rotation,s.scaleX,s.scaleY),A.copyFrom(c.matrix),A.multiplyWithOffset(d,-c.scrollX*s.scrollFactorX,-c.scrollY*s.scrollFactorY),C.e=s.x-P,C.f=s.y-L,A.multiply(C,w)):(P=s.width*s.originX,L=s.height*s.originY,C.applyITRS(s.x-P,s.y-L,s.rotation,s.scaleX,s.scaleY),A.copyFrom(c.matrix),O=100*s.originX+"%",I=100*s.originY+"%",C.e-=c.scrollX*s.scrollFactorX,C.f-=c.scrollY*s.scrollFactorY,A.multiply(C,w)),s.transformOnly||(v.display="block",v.opacity=M,v.zIndex=s._depth,v.pointerEvents=s.pointerEvents,v.mixBlendMode=r[s._blendMode]),v.transform=w.getCSSMatrix()+" skew("+s.skewX+"rad, "+s.skewY+"rad) rotate3d("+s.rotate3d.x+","+s.rotate3d.y+","+s.rotate3d.z+","+s.rotate3d.w+s.rotate3dAngle+")",v.transformOrigin=O+" "+I}};a.exports=u},2611:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(3069),p=t(39429);p.register("dom",function(h,o,l,n,u){var f=new r(this.scene,h,o,l,n,u);return this.displayList.add(f),f})},441:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(29747),p=r,h=r;p=t(49381),h=t(49381),a.exports={renderWebGL:p,renderCanvas:h}},62980:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="addedtoscene"},41337:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="destroy"},44947:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="removedfromscene"},49358:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="complete"},35163:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="created"},97249:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="error"},19483:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="locked"},56059:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="loop"},26772:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="metadata"},64437:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="playing"},83411:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="play"},75780:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="seeked"},67799:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="seeking"},63500:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="stalled"},55541:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="stop"},53208:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="textureready"},4992:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="unlocked"},12:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="unsupported"},51708:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={ADDED_TO_SCENE:t(62980),DESTROY:t(41337),REMOVED_FROM_SCENE:t(44947),VIDEO_COMPLETE:t(49358),VIDEO_CREATED:t(35163),VIDEO_ERROR:t(97249),VIDEO_LOCKED:t(19483),VIDEO_LOOP:t(56059),VIDEO_METADATA:t(26772),VIDEO_PLAY:t(83411),VIDEO_PLAYING:t(64437),VIDEO_SEEKED:t(75780),VIDEO_SEEKING:t(67799),VIDEO_STALLED:t(63500),VIDEO_STOP:t(55541),VIDEO_TEXTURE:t(53208),VIDEO_UNLOCKED:t(4992),VIDEO_UNSUPPORTED:t(12)}},42421:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(31401),h=t(95643),o=t(64993),l=new r({Extends:h,Mixins:[p.Alpha,p.BlendMode,p.Depth,p.Flip,p.Origin,p.ScrollFactor,p.Size,p.Texture,p.Tint,p.Transform,p.Visible,o],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(){}});a.exports=l},70217:()=>{},56315:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(42421),p=t(39429);p.register("extern",function(){var h=new r(this.scene);return this.displayList.add(h),h})},64993:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(29747),p=r,h=r;p=t(80287),h=t(70217),a.exports={renderWebGL:p,renderCanvas:h}},80287:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(91296),p=function(h,o,l,n){h.pipelines.clear();var u=r(o,l,n).calc;o.render.call(o,h,l,u),h.pipelines.rebind()};a.exports=p},85592:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.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:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(71911),p=t(83419),h=t(85592),o=t(31401),l=t(8497),n=t(95643),u=t(95540),f=t(35154),s=t(36383),c=t(84503),d=new p({Extends:n,Mixins:[o.AlphaSingle,o.BlendMode,o.Depth,o.Mask,o.Pipeline,o.PostPipeline,o.Transform,o.Visible,o.ScrollFactor,c],initialize:function(m,S){var M=f(S,"x",0),A=f(S,"y",0);n.call(this,m,"Graphics"),this.setPosition(M,A),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,A,C,w,P){return A===void 0&&(A=1),C===void 0&&(C=A),w===void 0&&(w=A),P===void 0&&(P=A),this.commandBuffer.push(h.GRADIENT_FILL_STYLE,A,C,w,P,v,m,S,M),this},lineGradientStyle:function(v,m,S,M,A,C){return C===void 0&&(C=1),this.commandBuffer.push(h.GRADIENT_LINE_STYLE,v,C,m,S,M,A),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,s.PI2),this.fillPath(),this},strokeCircle:function(v,m,S){return this.beginPath(),this.arc(v,m,S,0,s.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 A=this._lineWidth/2,C=v-A,w=v+A;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(w+S,m),this.strokePath(),this.beginPath(),this.moveTo(C,m+M),this.lineTo(w+S,m+M),this.strokePath(),this},fillRoundedRect:function(v,m,S,M,A){A===void 0&&(A=20);var C=A,w=A,P=A,L=A;typeof A!="number"&&(C=u(A,"tl",20),w=u(A,"tr",20),P=u(A,"bl",20),L=u(A,"br",20));var O=C>=0,I=w>=0,D=P>=0,B=L>=0;return C=Math.abs(C),w=Math.abs(w),P=Math.abs(P),L=Math.abs(L),this.beginPath(),this.moveTo(v+C,m),this.lineTo(v+S-w,m),I?this.arc(v+S-w,m+w,w,-s.TAU,0):this.arc(v+S,m,w,Math.PI,s.TAU,!0),this.lineTo(v+S,m+M-L),B?this.arc(v+S-L,m+M-L,L,0,s.TAU):this.arc(v+S,m+M,L,-s.TAU,Math.PI,!0),this.lineTo(v+P,m+M),D?this.arc(v+P,m+M-P,P,s.TAU,Math.PI):this.arc(v,m+M,P,0,-s.TAU,!0),this.lineTo(v,m+C),O?this.arc(v+C,m+C,C,-Math.PI,-s.TAU):this.arc(v,m,C,s.TAU,0,!0),this.fillPath(),this},strokeRoundedRect:function(v,m,S,M,A){A===void 0&&(A=20);var C=A,w=A,P=A,L=A,O=Math.min(S,M)/2;typeof A!="number"&&(C=u(A,"tl",20),w=u(A,"tr",20),P=u(A,"bl",20),L=u(A,"br",20));var I=C>=0,D=w>=0,B=P>=0,G=L>=0;return C=Math.min(Math.abs(C),O),w=Math.min(Math.abs(w),O),P=Math.min(Math.abs(P),O),L=Math.min(Math.abs(L),O),this.beginPath(),this.moveTo(v+C,m),this.lineTo(v+S-w,m),this.moveTo(v+S-w,m),D?this.arc(v+S-w,m+w,w,-s.TAU,0):this.arc(v+S,m,w,Math.PI,s.TAU,!0),this.lineTo(v+S,m+M-L),this.moveTo(v+S,m+M-L),G?this.arc(v+S-L,m+M-L,L,0,s.TAU):this.arc(v+S,m+M,L,-s.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,s.TAU,Math.PI):this.arc(v,m+M,P,0,-s.TAU,!0),this.lineTo(v,m+C),this.moveTo(v,m+C),I?this.arc(v+C,m+C,C,-Math.PI,-s.TAU):this.arc(v,m,C,s.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,A,C){return this.commandBuffer.push(h.FILL_TRIANGLE,v,m,S,M,A,C),this},strokeTriangle:function(v,m,S,M,A,C){return this.commandBuffer.push(h.STROKE_TRIANGLE,v,m,S,M,A,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 A=1;A-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,A=M.game.renderer;m===void 0&&(m=M.scale.width),S===void 0&&(S=M.scale.height),d.TargetCamera.setScene(this.scene),d.TargetCamera.setViewport(0,0,m,S),d.TargetCamera.scrollX=this.x,d.TargetCamera.scrollY=this.y;var C,w,P={willReadFrequently:!0};if(typeof v=="string")if(M.textures.exists(v)){C=M.textures.get(v);var L=C.getSourceImage();L instanceof HTMLCanvasElement&&(w=L.getContext("2d",P))}else C=M.textures.createCanvas(v,m,S),w=C.getSourceImage().getContext("2d",P);else v instanceof HTMLCanvasElement&&(w=v.getContext("2d",P));return w&&(this.renderCanvas(A,this,d.TargetCamera,null,w,!1),C&&C.refresh()),this},preDestroy:function(){this.commandBuffer=[]}});d.TargetCamera=new r,a.exports=d},32768:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(85592),p=t(20926),h=function(o,l,n,u,f,s){var c=l.commandBuffer,d=c.length,v=f||o.currentContext;if(!(d===0||!p(o,v,l,n,u))){n.addToRenderList(l);var m=1,S=1,M=0,A=0,C=1,w=0,P=0,L=0;v.beginPath();for(var O=0;O>>16,P=(M&65280)>>>8,L=M&255,v.strokeStyle="rgba("+w+","+P+","+L+","+m+")",v.lineWidth=C,O+=3;break;case r.FILL_STYLE:A=c[O+1],S=c[O+2],w=(A&16711680)>>>16,P=(A&65280)>>>8,L=A&255,v.fillStyle="rgba("+w+","+P+","+L+","+S+")",O+=2;break;case r.BEGIN_PATH:v.beginPath();break;case r.CLOSE_PATH:v.closePath();break;case r.FILL_PATH:s||v.fill();break;case r.STROKE_PATH:s||v.stroke();break;case r.FILL_RECT:s?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(),s||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(),s||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()}};a.exports=h},87079:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(44603),p=t(43831);r.register("graphics",function(h,o){h===void 0&&(h={}),o!==void 0&&(h.add=o);var l=new p(this.scene,h);return h.add&&this.scene.sys.displayList.add(l),l})},1201:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(43831),p=t(39429);p.register("graphics",function(h){return this.displayList.add(new r(this.scene,h))})},84503:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(29747),p=r,h=r;p=t(77545),h=t(32768),h=t(32768),a.exports={renderWebGL:p,renderCanvas:h}},77545:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(85592),p=t(91296),h=t(61340),o=t(70554),l=function(c,d,v){this.x=c,this.y=d,this.width=v},n=function(c,d,v){this.points=[],this.pointsLength=1,this.points[0]=new l(c,d,v)},u=[],f=new h,s=function(c,d,v,m){if(d.commandBuffer.length!==0){v.addToRenderList(d);var S=c.pipelines.set(d.pipeline,d);c.pipelines.preBatch(d);for(var M=p(d,v,m).calc,A=f.loadIdentity(),C=d.commandBuffer,w=v.alpha*d.alpha,P=1,L=S.fillTint,O=S.strokeTint,I=0,D=0,B=0,G=.01,z=Math.PI*2,W,k=[],J=0,Q=!0,Y=null,K=o.getTintAppendFloatAlpha,U=0;U0&&(Tt=-z+Tt%z):Tt>z?Tt=z:Tt<0&&(Tt=z+Tt%z),Y===null&&(Y=new n(At+Math.cos(yt)*st,ot+Math.sin(yt)*st,P),k.push(Y),gt+=G);gt<1+Et;)B=Tt*gt+yt,I=At+Math.cos(B)*st,D=ot+Math.sin(B)*st,Y.points.push(new l(I,D,P)),gt+=G;B=Tt+yt,I=At+Math.cos(B)*st,D=ot+Math.sin(B)*st,Y.points.push(new l(I,D,P));break}case r.FILL_RECT:{S.batchFillRect(C[++U],C[++U],C[++U],C[++U],A,M);break}case r.FILL_TRIANGLE:{S.batchFillTriangle(C[++U],C[++U],C[++U],C[++U],C[++U],C[++U],A,M);break}case r.STROKE_TRIANGLE:{S.batchStrokeTriangle(C[++U],C[++U],C[++U],C[++U],C[++U],C[++U],P,A,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),k.push(Y));break}case r.MOVE_TO:{Y=new n(C[++U],C[++U],P),k.push(Y);break}case r.SAVE:{u.push(A.copyToArray());break}case r.RESTORE:{A.copyFromArray(u.pop());break}case r.TRANSLATE:{At=C[++U],ot=C[++U],A.translate(At,ot);break}case r.SCALE:{At=C[++U],ot=C[++U],A.scale(At,ot);break}case r.ROTATE:{A.rotate(C[++U]);break}}c.pipelines.postBatch(d)}};a.exports=s},26479:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(61061),p=t(83419),h=t(51708),o=t(50792),l=t(46710),n=t(95540),u=t(35154),f=t(97022),s=t(41212),c=t(88492),d=t(35072),v=t(68287),m=new p({Extends:o,initialize:function(M,A,C){o.call(this),C?A&&!Array.isArray(A)&&(A=[A]):Array.isArray(A)?s(A[0])&&(C=A,A=null):s(A)&&(C=A,A=null),this.scene=M,this.children=new d,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),A&&this.addMultiple(A),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,A,C,w,P){if(S===void 0&&(S=0),M===void 0&&(M=0),A===void 0&&(A=this.defaultKey),C===void 0&&(C=this.defaultFrame),w===void 0&&(w=!0),P===void 0&&(P=!0),this.isFull())return null;var L=new this.classType(this.scene,S,M,A,C);return L.addToDisplayList(this.scene.sys.displayList),L.addToUpdateList(),L.visible=w,L.setActive(P),this.add(L),L},createMultiple:function(S){if(this.isFull())return[];Array.isArray(S)||(S=[S]);var M=[];if(S[0].key)for(var A=0;A=0;B--)if(D=z[B],D.active===A){if(G++,G===M)break}else D=null;return D?(typeof w=="number"&&(D.x=w),typeof P=="number"&&(D.y=P),D):C?this.create(w,P,L,O,I):null},get:function(S,M,A,C,w){return this.getFirst(!1,!0,S,M,A,C,w)},getFirstAlive:function(S,M,A,C,w,P){return this.getFirst(!0,S,M,A,C,w,P)},getFirstDead:function(S,M,A,C,w,P){return this.getFirst(!1,S,M,A,C,w,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,A=0;A{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(44603),p=t(26479);r.register("group",function(h){return new p(this.scene,null,h)})},3385:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(26479),p=t(39429);p.register("group",function(h,o){return this.updateList.add(new r(this.scene,h,o))})},88571:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(31401),h=t(95643),o=t(59819),l=new r({Extends:h,Mixins:[p.Alpha,p.BlendMode,p.Depth,p.Flip,p.GetBounds,p.Mask,p.Origin,p.Pipeline,p.PostPipeline,p.ScrollFactor,p.Size,p.TextureCrop,p.Tint,p.Transform,p.Visible,o],initialize:function(u,f,s,c,d){h.call(this,u,"Image"),this._crop=this.resetCropObject(),this.setTexture(c,d),this.setPosition(f,s),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline(),this.initPostPipeline(!0)}});a.exports=l},40652:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p,h){p.addToRenderList(r),t.batchSprite(r,r.frame,p,h)};a.exports=y},82459:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(25305),p=t(44603),h=t(23568),o=t(88571);p.register("image",function(l,n){l===void 0&&(l={});var u=h(l,"key",null),f=h(l,"frame",null),s=new o(this.scene,0,0,u,f);return n!==void 0&&(l.add=n),r(this.scene,s,l),s})},2117:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(88571),p=t(39429);p.register("image",function(h,o,l,n){return this.displayList.add(new r(this.scene,h,o,l,n))})},59819:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(29747),p=r,h=r;p=t(99517),h=t(40652),a.exports={renderWebGL:p,renderCanvas:h}},99517:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p,h){p.addToRenderList(r),this.pipeline.batchSprite(r,p,h)};a.exports=y},77856:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r={Events:t(51708),DisplayList:t(8050),GameObjectCreator:t(44603),GameObjectFactory:t(39429),UpdateList:t(45027),Components:t(31401),GetCalcMatrix:t(91296),BuildGameObject:t(25305),BuildGameObjectAnimation:t(13059),GameObject:t(95643),BitmapText:t(22186),Blitter:t(6107),Bob:t(46590),Container:t(31559),DOMElement:t(3069),DynamicBitmapText:t(2638),Extern:t(42421),Graphics:t(43831),Group:t(26479),Image:t(88571),Layer:t(93595),Particles:t(18404),PathFollower:t(1159),RenderTexture:t(591),RetroFont:t(196),Rope:t(77757),Sprite:t(68287),Text:t(50171),GetTextSize:t(14220),MeasureText:t(79557),TextStyle:t(35762),TileSprite:t(20839),Zone:t(41481),Video:t(18471),Shape:t(17803),Arc:t(23629),Curve:t(89),Ellipse:t(19921),Grid:t(30479),IsoBox:t(61475),IsoTriangle:t(16933),Line:t(57847),Polygon:t(24949),Rectangle:t(74561),Star:t(55911),Triangle:t(36931),Factories:{Blitter:t(12709),Container:t(24961),DOMElement:t(2611),DynamicBitmapText:t(72566),Extern:t(56315),Graphics:t(1201),Group:t(3385),Image:t(2117),Layer:t(20005),Particles:t(676),PathFollower:t(90145),RenderTexture:t(60505),Rope:t(96819),Sprite:t(46409),StaticBitmapText:t(34914),Text:t(68005),TileSprite:t(91681),Zone:t(84175),Video:t(89025),Arc:t(42563),Curve:t(40511),Ellipse:t(1543),Grid:t(34137),IsoBox:t(3933),IsoTriangle:t(49803),Line:t(2481),Polygon:t(64827),Rectangle:t(87959),Star:t(93697),Triangle:t(45245)},Creators:{Blitter:t(9403),Container:t(77143),DynamicBitmapText:t(11164),Graphics:t(87079),Group:t(94975),Image:t(82459),Layer:t(25179),Particles:t(92730),RenderTexture:t(34495),Rope:t(26209),Sprite:t(15567),StaticBitmapText:t(57336),Text:t(71259),TileSprite:t(14167),Zone:t(95261),Video:t(11511)}};r.Shader=t(20071),r.Mesh=t(4703),r.NineSlice=t(28103),r.PointLight=t(80321),r.Plane=t(33663),r.Factories.Shader=t(74177),r.Factories.Mesh=t(9225),r.Factories.NineSlice=t(47521),r.Factories.PointLight=t(71255),r.Factories.Plane=t(30985),r.Creators.Shader=t(54935),r.Creators.Mesh=t(20527),r.Creators.NineSlice=t(28279),r.Creators.PointLight=t(39829),r.Creators.Plane=t(56015),r.Light=t(41432),r.LightsManager=t(61356),r.LightsPlugin=t(88992),a.exports=r},93595:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(10312),p=t(83419),h=t(31401),o=t(53774),l=t(45893),n=t(50792),u=t(51708),f=t(73162),s=t(33963),c=t(44594),d=t(19186),v=new p({Extends:f,Mixins:[h.AlphaSingle,h.BlendMode,h.Depth,h.Mask,h.PostPipeline,h.Visible,n,s],initialize:function(S,M){f.call(this,S),n.call(this),this.scene=S,this.displayList=null,this.type="Layer",this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.systems=S.sys,this.events=S.sys.events,this.sortChildrenFlag=!1,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.initPostPipeline(),this.clearAlpha(),this.setBlendMode(r.SKIP_CHECK),M&&this.add(M),S.sys.queueDepthSort()},setActive:function(m){return this.active=m,this},setName:function(m){return this.name=m,this},setState:function(m){return this.state=m,this},setDataEnabled:function(){return this.data||(this.data=new l(this)),this},setData:function(m,S){return this.data||(this.data=new l(this)),this.data.set(m,S),this},incData:function(m,S){return this.data||(this.data=new l(this)),this.data.inc(m,S),this},toggleData:function(m){return this.data||(this.data=new l(this)),this.data.toggle(m),this},getData:function(m){return this.data||(this.data=new l(this)),this.data.get(m)},setInteractive:function(){return this},disableInteractive:function(){return this},removeInteractive:function(){return this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return o(this)},willRender:function(m){return!(this.renderFlags!==15||this.list.length===0||this.cameraFilter!==0&&this.cameraFilter&m.id)},getIndexList:function(){for(var m=this,S=this.parentContainer,M=[];S&&(M.unshift(S.getIndex(m)),m=S,S.parentContainer);)S=S.parentContainer;return M.unshift(this.displayList.getIndex(m)),M},addChildCallback:function(m){var S=m.displayList;S&&S!==this&&m.removeFromDisplayList(),m.displayList||(this.queueDepthSort(),m.displayList=this,m.emit(u.ADDED_TO_SCENE,m,this.scene),this.events.emit(c.ADDED_TO_SCENE,m,this.scene))},removeChildCallback:function(m){this.queueDepthSort(),m.displayList=null,m.emit(u.REMOVED_FROM_SCENE,m,this.scene),this.events.emit(c.REMOVED_FROM_SCENE,m,this.scene)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(d(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(m,S){return m._depth-S._depth},getChildren:function(){return this.list},addToDisplayList:function(m){return m===void 0&&(m=this.scene.sys.displayList),this.displayList&&this.displayList!==m&&this.removeFromDisplayList(),m.exists(this)||(this.displayList=m,m.add(this,!0),m.queueDepthSort(),this.emit(u.ADDED_TO_SCENE,this,this.scene),m.events.emit(c.ADDED_TO_SCENE,this,this.scene)),this},removeFromDisplayList:function(){var m=this.displayList||this.scene.sys.displayList;return m.exists(this)&&(m.remove(this,!0),m.queueDepthSort(),this.displayList=null,this.emit(u.REMOVED_FROM_SCENE,this,this.scene),m.events.emit(c.REMOVED_FROM_SCENE,this,this.scene)),this},destroy:function(m){if(!(!this.scene||this.ignoreDestroy)){this.emit(u.DESTROY,this);for(var S=this.list;S.length;)S[0].destroy(m);this.removeAllListeners(),this.resetPostPipeline(!0),this.displayList&&(this.displayList.remove(this,!0,!1),this.displayList.queueDepthSort()),this.data&&(this.data.destroy(),this.data=void 0),this.active=!1,this.visible=!1,this.list=void 0,this.scene=void 0,this.displayList=void 0,this.systems=void 0,this.events=void 0}}});a.exports=v},2956:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){var h=r.list;if(h.length!==0){r.depthSort();var o=r.blendMode!==-1;o||t.setBlendMode(0);var l=r._alpha;r.mask&&r.mask.preRenderCanvas(t,null,p);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=t(25305),p=t(93595),h=t(44603),o=t(23568);h.register("layer",function(l,n){l===void 0&&(l={});var u=o(l,"children",null),f=new p(this.scene,u);return n!==void 0&&(l.add=n),r(this.scene,f,l),f})},20005:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(93595),p=t(39429);p.register("layer",function(h){return this.displayList.add(new r(this.scene,h))})},33963:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(29747),p=r,h=r;p=t(15869),h=t(2956),a.exports={renderWebGL:p,renderCanvas:h}},15869:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){var h=r.list,o=h.length;if(o!==0){r.depthSort(),t.pipelines.preBatch(r);var l=r.blendMode!==-1;l||t.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=t(96503),p=t(83419),h=t(31401),o=t(51767),l=t(70554),n=new p({Extends:r,Mixins:[h.Origin,h.ScrollFactor,h.Visible],initialize:function(f,s,c,d,v,m,S){r.call(this,f,s,c),this.color=new o(d,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,a.exports=n},61356:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(81491),p=t(83419),h=t(20339),o=t(41432),l=t(80321),n=t(51767),u=t(19133),f=t(19186),s=t(70554),c=new p({initialize:function(){this.lights=[],this.ambientColor=new n(.1,.1,.1),this.active=!1,this.maxLights=-1,this.visibleLights=0},addPointLight:function(d,v,m,S,M,A){return this.systems.displayList.add(new l(this.scene,d,v,m,S,M,A))},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(d){for(var v=this.lights,m=d.worldView,S=[],M=0;Mthis.maxLights&&(f(S,this.sortByDistance),S=S.slice(0,this.maxLights)),this.visibleLights=S.length,S},sortByDistance:function(d,v){return d.distance>=v.distance},setAmbientColor:function(d){var v=s.getFloatsFromUintRGB(d);return this.ambientColor.set(v[0],v[1],v[2]),this},getMaxVisibleLights:function(){return this.maxLights},getLightCount:function(){return this.lights.length},addLight:function(d,v,m,S,M){d===void 0&&(d=0),v===void 0&&(v=0),m===void 0&&(m=128),S===void 0&&(S=16777215),M===void 0&&(M=1);var A=s.getFloatsFromUintRGB(S),C=new o(d,v,m,A[0],A[1],A[2],M);return this.lights.push(C),C},removeLight:function(d){var v=this.lights.indexOf(d);return v>=0&&u(this.lights,v),this},shutdown:function(){this.lights.length=0},destroy:function(){this.shutdown()}});a.exports=c},88992:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(61356),h=t(37277),o=t(44594),l=new r({Extends:p,initialize:function(u){this.scene=u,this.systems=u.sys,u.sys.settings.isBooted||u.sys.events.once(o.BOOT,this.boot,this),p.call(this)},boot:function(){var n=this.systems.events;n.on(o.SHUTDOWN,this.shutdown,this),n.on(o.DESTROY,this.destroy,this)},destroy:function(){this.shutdown(),this.scene=void 0,this.systems=void 0}});h.register("LightsPlugin",l,"lights"),a.exports=l},4703:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(31401),h=t(39506),o=t(83997),l=t(95643),n=t(34684),u=t(92515),f=t(91296),s=t(37867),c=t(29807),d=t(43396),v=t(19186),m=t(25836),S=t(39318),M=new r({Extends:l,Mixins:[p.AlphaSingle,p.BlendMode,p.Depth,p.Mask,p.Pipeline,p.PostPipeline,p.ScrollFactor,p.Size,p.Texture,p.Transform,p.Visible,c],initialize:function(C,w,P,L,O,I,D,B,G,z,W,k){w===void 0&&(w=0),P===void 0&&(P=0),L===void 0&&(L="__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 s,this.viewPosition=new m,this.viewMatrix=new s,this.projectionMatrix=new s,this.totalRendered=0,this.totalFrame=0,this.ignoreDirtyCache=!1,this.fov,this.displayOriginX=0,this.displayOriginY=0;var J=C.sys.renderer;this.setPosition(w,P),this.setTexture(L,O),this.setSize(J.width,J.height),this.initPipeline(),this.initPostPipeline(),this.setPerspective(J.width,J.height),I&&this.addVertices(I,D,B,G,z,W,k)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},panX:function(A){return this.viewPosition.addScale(m.LEFT,A),this.dirtyCache[10]=1,this},panY:function(A){return this.viewPosition.y+=m.DOWN.y*A,this.dirtyCache[10]=1,this},panZ:function(A){return this.viewPosition.z+=A,this.dirtyCache[10]=1,this},setPerspective:function(A,C,w,P,L){return w===void 0&&(w=45),P===void 0&&(P=.01),L===void 0&&(L=1e3),this.fov=w,this.projectionMatrix.perspective(h(w),A/C,P,L),this.dirtyCache[10]=1,this.dirtyCache[11]=0,this},setOrtho:function(A,C,w,P){return A===void 0&&(A=this.scene.sys.renderer.getAspectRatio()),C===void 0&&(C=1),w===void 0&&(w=-1e3),P===void 0&&(P=1e3),this.fov=0,this.projectionMatrix.ortho(-A,A,-C,C,w,P),this.dirtyCache[10]=1,this.dirtyCache[11]=1,this},clear:function(){return this.faces.forEach(function(A){A.destroy()}),this.faces=[],this.vertices=[],this},addVerticesFromObj:function(A,C,w,P,L,O,I,D,B){var G=this.scene.sys.cache.obj.get(A),z;return G&&(z=n(G,this,C,w,P,L,O,I,D,B)),(!z||z.verts.length===0)&&console.warn("Mesh.addVerticesFromObj data empty:",A),this},sortByDepth:function(A,C){return A.depth-C.depth},depthSort:function(){return v(this.faces,this.sortByDepth),this},addVertex:function(A,C,w,P,L,O,I){var D=new S(A,C,w,P,L,O,I);return this.vertices.push(D),D},addFace:function(A,C,w){var P=new o(A,C,w);return this.faces.push(P),this.dirtyCache[9]=-1,P},addVertices:function(A,C,w,P,L,O,I){var D=u(A,C,w,P,L,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(A){return this.faces[A]},hasFaceAt:function(A,C,w){w===void 0&&(w=this.scene.sys.cameras.main);for(var P=f(this,w).calc,L=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(){};a.exports=y},20527:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(25305),p=t(44603),h=t(23568),o=t(35154),l=t(4703);p.register("mesh",function(n,u){n===void 0&&(n={});var f=h(n,"key",null),s=h(n,"frame",null),c=o(n,"vertices",[]),d=o(n,"uvs",[]),v=o(n,"indicies",[]),m=o(n,"containsZ",!1),S=o(n,"normals",[]),M=o(n,"colors",16777215),A=o(n,"alphas",1),C=new l(this.scene,0,0,f,s,c,d,v,m,S,M,A);return u!==void 0&&(n.add=u),r(this.scene,C,n),C})},9225:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(4703),p=t(39429);p.register("mesh",function(h,o,l,n,u,f,s,c,d,v,m){return this.displayList.add(new r(this.scene,h,o,l,n,u,f,s,c,d,v,m))})},29807:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(29747),p=r,h=r;p=t(48833),h=t(36488),a.exports={renderWebGL:p,renderCanvas:h}},48833:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(91296),p=function(h,o,l,n){var u=o.faces,f=u.length;if(f!==0){l.addToRenderList(o);var s=h.pipelines.set(o.pipeline,o),c=r(o,l,n).calc;h.pipelines.preBatch(o);for(var d=s.setGameObject(o),v=s.vertexViewF32,m=s.vertexViewU32,S=s.vertexCount*s.currentShader.vertexComponentCount-1,M=o.tintFill,A=[],C=o.debugCallback,w=c.a,P=c.b,L=c.c,O=c.d,I=c.e,D=c.f,B=o.viewPosition.z,G=o.hideCCW,z=l.roundPixels,W=l.alpha*o.alpha,k=0,J=0;J{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(31401),h=t(95643),o=t(78023),l=t(39318),n=new r({Extends:h,Mixins:[p.AlphaSingle,p.BlendMode,p.Depth,p.GetBounds,p.Mask,p.Origin,p.Pipeline,p.PostPipeline,p.ScrollFactor,p.Texture,p.Transform,p.Visible,o],initialize:function(f,s,c,d,v,m,S,M,A,C,w){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(d,v);this.is3Slice=!C&&!w,P.scale9&&(this.is3Slice=P.is3Slice);for(var L=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=t(25305),p=t(44603),h=t(23568),o=t(35154),l=t(28103);p.register("nineslice",function(n,u){n===void 0&&(n={});var f=h(n,"key",null),s=h(n,"frame",null),c=o(n,"width",256),d=o(n,"height",256),v=o(n,"leftWidth",10),m=o(n,"rightWidth",10),S=o(n,"topHeight",0),M=o(n,"bottomHeight",0),A=new l(this.scene,0,0,f,s,c,d,v,m,S,M);return u!==void 0&&(n.add=u),r(this.scene,A,n),A})},47521:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(28103),p=t(39429);p.register("nineslice",function(h,o,l,n,u,f,s,c,d,v){return this.displayList.add(new r(this.scene,h,o,l,n,u,f,s,c,d,v))})},78023:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(29747),p=r,h=r;p=t(52230),a.exports={renderWebGL:p,renderCanvas:h}},52230:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(91296),p=t(70554),h=function(o,l,n,u){var f=l.vertices,s=f.length;if(s!==0){n.addToRenderList(l);var c=o.pipelines.set(l.pipeline,l),d=r(l,n,u,!1).calc;o.pipelines.preBatch(l);var v=c.setGameObject(l),m=c.vertexViewF32,S=c.vertexViewU32,M=c.vertexCount*c.currentShader.vertexComponentCount-1,A=n.roundPixels,C=l.tintFill,w=n.alpha*l.alpha,P=p.getTintAppendFloatAlpha(l.tint,w),L=c.vertexAvailable(),O=-1;L{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(44777),h=t(37589),o=t(6113),l=t(91389),n=t(90664),u=new r({Extends:p,initialize:function(s){p.call(this,s,null,!1),this.active=!1,this.easeName="Linear",this.r=[],this.g=[],this.b=[]},getMethod:function(){return this.propertyValue===null?0:9},setMethods:function(){var f=this.propertyValue,s=f,c=this.defaultEmit,d=this.defaultUpdate;if(this.method===9){this.start=f[0],this.ease=o("Linear"),this.interpolation=l("linear"),c=this.easedValueEmit,d=this.easeValueUpdate,s=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=t(30976),p=t(45319),h=t(83419),o=t(99472),l=t(6113),n=t(95540),u=t(91389),f=t(77720),s=t(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(d,v){d===void 0&&(d={}),v&&(this.propertyKey=v),this.propertyValue=n(d,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(d){var v;switch(this.method){case 1:case 3:case 8:v=d;break;case 2:this.propertyValue.indexOf(d)>=0&&(v=d);break;case 4:var m=(this.end-this.start)/this.steps;v=f(d,m),this.counter=v;break;case 5:case 6:case 7:v=p(d,this.start,this.end);break;case 9:v=this.start[0];break}return this.current=v,this},getMethod:function(){var d=this.propertyValue;if(d===null)return 0;var v=typeof d;if(v==="number")return 1;if(Array.isArray(d))return 2;if(v==="function")return 3;if(v==="object"){if(this.hasBoth(d,"start","end"))return this.has(d,"steps")?4:5;if(this.hasBoth(d,"min","max"))return 6;if(this.has(d,"random"))return 7;if(this.hasEither(d,"onEmit","onUpdate"))return 8;if(this.hasEither(d,"values","interpolation"))return 9}return 0},setMethods:function(){var d=this.propertyValue,v=d,m=this.defaultEmit,S=this.defaultUpdate;switch(this.method){case 1:m=this.staticValueEmit;break;case 2:m=this.randomStaticValueEmit,v=d[0];break;case 3:this._onEmit=d,m=this.proxyEmit;break;case 4:this.start=d.start,this.end=d.end,this.steps=d.steps,this.counter=this.start,this.yoyo=this.has(d,"yoyo")?d.yoyo:!1,this.direction=0,m=this.steppedEmit,v=this.start;break;case 5:this.start=d.start,this.end=d.end;var M=this.has(d,"ease")?d.ease:"Linear";this.ease=l(M,d.easeParams),m=this.has(d,"random")&&d.random?this.randomRangedValueEmit:this.easedValueEmit,S=this.easeValueUpdate,v=this.start;break;case 6:this.start=d.min,this.end=d.max,m=this.has(d,"int")&&d.int?this.randomRangedIntEmit:this.randomRangedValueEmit,v=this.start;break;case 7:var A=d.random;Array.isArray(A)&&(this.start=A[0],this.end=A[1]),m=this.randomRangedIntEmit,v=this.start;break;case 8:this._onEmit=this.has(d,"onEmit")?d.onEmit:this.defaultEmit,this._onUpdate=this.has(d,"onUpdate")?d.onUpdate:this.defaultUpdate,m=this.proxyEmit,S=this.proxyUpdate;break;case 9:this.start=d.values;var C=this.has(d,"ease")?d.ease:"Linear";this.ease=l(C,d.easeParams),this.interpolation=u(d.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(d,v){return d.hasOwnProperty(v)},hasBoth:function(d,v,m){return d.hasOwnProperty(v)&&d.hasOwnProperty(m)},hasEither:function(d,v,m){return d.hasOwnProperty(v)||d.hasOwnProperty(m)},defaultEmit:function(d,v,m){return m},defaultUpdate:function(d,v,m,S){return S},proxyEmit:function(d,v,m){var S=this._onEmit(d,v,m);return this.current=S,S},proxyUpdate:function(d,v,m,S){var M=this._onUpdate(d,v,m,S);return this.current=M,M},staticValueEmit:function(){return this.current},staticValueUpdate:function(){return this.current},randomStaticValueEmit:function(){var d=Math.floor(Math.random()*this.propertyValue.length);return this.current=this.propertyValue[d],this.current},randomRangedValueEmit:function(d,v){var m=o(this.start,this.end);return d&&d.data[v]&&(d.data[v].min=m,d.data[v].max=this.end),this.current=m,m},randomRangedIntEmit:function(d,v){var m=r(this.start,this.end);return d&&d.data[v]&&(d.data[v].min=m,d.data[v].max=this.end),this.current=m,m},steppedEmit:function(){var d=this.counter,v=d,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=s(v+m,this.start,this.end);return this.current=d,d},easedValueEmit:function(d,v){if(d&&d.data[v]){var m=d.data[v];m.min=this.start,m.max=this.end}return this.current=this.start,this.start},easeValueUpdate:function(d,v,m){var S=d.data[v],M,A=this.ease(m);return this.interpolation?M=this.interpolation(this.start,A):M=(S.max-S.min)*A+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}});a.exports=c},24502:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(95540),h=t(20286),o=new r({Extends:h,initialize:function(n,u,f,s,c){if(typeof n=="object"){var d=n;n=p(d,"x",0),u=p(d,"y",0),f=p(d,"power",0),s=p(d,"epsilon",100),c=p(d,"gravity",50)}else n===void 0&&(n=0),u===void 0&&(u=0),f===void 0&&(f=0),s===void 0&&(s=100),c===void 0&&(c=50);h.call(this,n,u,!0),this._gravity=c,this._power=f*c,this._epsilon=s*s},update:function(l,n){var u=this.x-l.x,f=this.y-l.y,s=u*u+f*f;if(s!==0){var c=Math.sqrt(s);s{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(9674),p=t(45319),h=t(83419),o=t(39506),l=t(87841),n=t(11520),u=t(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(s,c,d,v,m,S){return this.emitter.emit(s,c,d,v,m,S)},isAlive:function(){return this.lifeCurrent>0},kill:function(){this.lifeCurrent=0},setPosition:function(s,c){s===void 0&&(s=0),c===void 0&&(c=0),this.x=s,this.y=c},fire:function(s,c){var d=this.emitter,v=d.ops,m=d.getAnim();if(m?this.anims.play(m):(this.frame=d.getFrame(),this.texture=this.frame.texture),!this.frame)throw new Error("Particle has no texture frame");if(d.getEmitZone(this),s===void 0?this.x+=v.x.onEmit(this,"x"):v.x.steps>0?this.x+=s+v.x.onEmit(this,"x"):this.x+=s,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=o(this.angle),d.worldMatrix.transformPoint(this.x,this.y,this.worldPosition),this.delayCurrent===0&&d.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(d.radial){var A=o(v.angle.onEmit(this,"angle"));this.velocityX=Math.cos(A)*Math.abs(S),this.velocityY=Math.sin(A)*Math.abs(M)}else if(d.moveTo){var C=v.moveToX.onEmit(this,"moveToX"),w=v.moveToY.onEmit(this,"moveToY"),P=this.life/1e3;this.velocityX=(C-this.x)/P,this.velocityY=(w-this.y)/P}else this.velocityX=S,this.velocityY=M;return d.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(s,c,d){if(this.lifeCurrent<=0)return this.holdCurrent>0?(this.holdCurrent-=s,this.holdCurrent<=0):!0;if(this.delayCurrent>0)return this.delayCurrent-=s,!1;this.anims.update(0,s);var 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),A=m.moveToY.onUpdate(this,"moveToY",S,v.moveToY),C=this.lifeCurrent/1e3;this.velocityX=(M-this.x)/C,this.velocityY=(A-this.y)/C}return this.computeVelocity(v,s,c,d,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=o(this.angle),v.getDeathZone(this)?(this.lifeCurrent=0,!0):(this.alpha=p(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-=s,this.lifeCurrent<=0&&this.holdCurrent<=0)},computeVelocity:function(s,c,d,v,m){var S=s.ops,M=this.velocityX,A=this.velocityY,C=S.accelerationX.onUpdate(this,"accelerationX",m,this.accelerationX),w=S.accelerationY.onUpdate(this,"accelerationY",m,this.accelerationY),P=S.maxVelocityX.onUpdate(this,"maxVelocityX",m,this.maxVelocityX),L=S.maxVelocityY.onUpdate(this,"maxVelocityY",m,this.maxVelocityY);this.bounce=S.bounce.onUpdate(this,"bounce",m,this.bounce),M+=s.gravityX*d+C*d,A+=s.gravityY*d+w*d,M=p(M,-P,P),A=p(A,-L,L),this.velocityX=M,this.velocityY=A,this.x+=M*d,this.y+=A*d,s.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=t(83419),p=t(20286),h=t(87841),o=new r({Extends:p,initialize:function(n,u,f,s,c,d,v,m){c===void 0&&(c=!0),d===void 0&&(d=!0),v===void 0&&(v=!0),m===void 0&&(m=!0),p.call(this,n,u,!0),this.bounds=new h(n,u,f,s),this.collideLeft=c,this.collideRight=d,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)}});a.exports=o},31600:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(31401),h=t(53774),o=t(43459),l=t(26388),n=t(19909),u=t(76472),f=t(44777),s=t(20696),c=t(95643),d=t(95540),v=t(26546),m=t(24502),S=t(1985),M=t(97022),A=t(86091),C=t(73162),w=t(20074),P=t(56480),L=t(68875),O=t(87841),I=t(59996),D=t(72905),B=t(90668),G=t(19186),z=t(61340),W=t(26099),k=t(15994),J=t(69601),Q=["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"],K=new r({Extends:c,Mixins:[p.AlphaSingle,p.BlendMode,p.Depth,p.Mask,p.Pipeline,p.PostPipeline,p.ScrollFactor,p.Texture,p.Transform,p.Visible,B],initialize:function(V,j,$,q,it){c.call(this,V,"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 W,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(j,$),this.setTexture(q),it&&this.setConfig(it)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},setConfig:function(U){if(!U)return this;var V=0,j="",$=this.ops;for(V=0;V=this.animQuantity&&(this.animCounter=0,this.currentAnim=k(this.currentAnim+1,0,V)),j},setAnim:function(U,V,j){V===void 0&&(V=!0),j===void 0&&(j=1),this.randomAnim=V,this.animQuantity=j,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=d(q,"anims",null),U&&(this.anims=this.anims.concat(U));var it=d(q,"cycle",!1);this.randomAnim=!it,this.animQuantity=d(q,"quantity",j)}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,V,j,$,q,it,nt,et){if(typeof U=="object"){var ht=U;U=ht.x,V=ht.y,j=M(ht,"w")?ht.w:ht.width,$=M(ht,"h")?ht.h:ht.height}return this.addParticleProcessor(new J(U,V,j,$,q,it,nt,et))},setParticleSpeed:function(U,V){return V===void 0&&(V=U),this.ops.speedX.onChange(U),U===V?this.ops.speedY.active=!1:this.ops.speedY.onChange(V),this.radial=!0,this},setParticleScale:function(U,V){return U===void 0&&(U=1),V===void 0&&(V=U),this.ops.scaleX.onChange(U),this.ops.scaleY.onChange(V),this},setParticleGravity:function(U,V){return this.gravityX=U,this.gravityY=V,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,V){return this.frequency=U,this.flowCounter=U>0?U:0,V&&(this.quantity=V),this},addDeathZone:function(U){Array.isArray(U)||(U=[U]);for(var V,j=[],$=0;$-1&&(this.zoneTotal++,this.zoneTotal===$.total&&(this.zoneTotal=0,this.zoneIndex++,this.zoneIndex===j&&(this.zoneIndex=0)))}},getDeathZone:function(U){for(var V=this.deathZones,j=0;j=0&&(this.zoneIndex=V),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 V=this.dead;if(this.maxParticles>0){var j=this.getParticleCount();j+U>this.maxParticles&&(U=this.maxParticles-(j+U))}for(var $=0;$0&&this.getParticleCount()>=this.maxParticles?!0:this.maxAliveParticles>0&&this.getAliveParticleCount()>=this.maxAliveParticles},onParticleEmit:function(U,V){return U===void 0?(this.emitCallback=null,this.emitCallbackScope=null):typeof U=="function"&&(this.emitCallback=U,V&&(this.emitCallbackScope=V)),this},onParticleDeath:function(U,V){return U===void 0?(this.deathCallback=null,this.deathCallbackScope=null):typeof U=="function"&&(this.deathCallback=U,V&&(this.deathCallbackScope=V)),this},killAll:function(){for(var U=this.dead,V=this.alive;V.length>0;)U.push(V.pop());return this},forEachAlive:function(U,V){for(var j=this.alive,$=j.length,q=0;q<$;q++)U.call(V,j[q],this);return this},forEachDead:function(U,V){for(var j=this.dead,$=j.length,q=0;q<$;q++)U.call(V,j[q],this);return this},start:function(U,V){return U===void 0&&(U=0),this.emitting||(U>0&&this.fastForward(U),this.emitting=!0,this.resetCounters(this.frequency,!0),V!==void 0&&(this.duration=Math.abs(V)),this.emit(s.START,this)),this},stop:function(U){return U===void 0&&(U=!1),this.emitting&&(this.emitting=!1,U&&this.killAll(),this.emit(s.STOP,this)),this},pause:function(){return this.active=!1,this},resume:function(){return this.active=!0,this},setSortProperty:function(U,V){return U===void 0&&(U=""),V===void 0&&(V=this.true),this.sortProperty=U,this.sortOrderAsc=V,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,V){var j=this.sortProperty;return this.sortOrderAsc?U[j]-V[j]:V[j]-U[j]},flow:function(U,V,j){return V===void 0&&(V=1),this.emitting=!1,this.frequency=U,this.quantity=V,j!==void 0&&(this.stopAfter=j),this.start()},explode:function(U,V,j){this.frequency=-1,this.resetCounters(-1,!0);var $=this.emitParticle(U,V,j);return this.emit(s.EXPLODE,this,$),$},emitParticleAt:function(U,V,j){return this.emitParticle(j,U,V)},emitParticle:function(U,V,j){if(!this.atLimit()){U===void 0&&(U=this.ops.quantity.onEmit());for(var $=this.dead,q=this.stopAfter,it=this.follow?this.follow.x+this.followOffset.x:V,nt=this.follow?this.follow.y+this.followOffset.y:j,et=0;et0&&(this.stopCounter++,this.stopCounter>=q)||this.atLimit())break}return ht}},fastForward:function(U,V){V===void 0&&(V=1e3/60);var j=0;for(this.skipping=!0;j0){var dt=this.deathCallback,mt=this.deathCallbackScope;for(nt=ht-1;nt>=0;nt--){var gt=et[nt];q.splice(gt.index,1),it.push(gt.particle),dt&&dt.call(mt,gt.particle),gt.particle.setPosition()}}if(!this.emitting&&!this.skipping){this.completeFlag===1&&q.length===0&&(this.completeFlag=0,this.emit(s.COMPLETE,this));return}if(this.frequency===0)this.emitParticle();else if(this.frequency>0)for(this.flowCounter-=V;this.flowCounter<=0;)this.emitParticle(),this.flowCounter+=this.frequency;this.skipping||(this.duration>0&&(this.elapsed+=V,this.elapsed>=this.duration&&this.stop()),this.stopAfter>0&&this.stopCounter>=this.stopAfter&&this.stop())},overlap:function(U){for(var V=this.getWorldTransformMatrix(),j=this.alive,$=j.length,q=[],it=0;it<$;it++){var nt=j[it];I(U,nt.getBounds(V))&&q.push(nt)}return q},getBounds:function(U,V,j,$){U===void 0&&(U=0),V===void 0&&(V=0),j===void 0&&(j=1e3/60),$===void 0&&($=new O);var q=this.getWorldTransformMatrix(),it,nt,et=this.alive,ht=!1;if($.setTo(0,0,0,0),V>0){var ut=0;for(this.skipping=!0;ut0&&A($,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,V=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=t(59996),p=t(61340),h=new p,o=new p,l=new p,n=new p,u=function(f,s,c,d){var v=h,m=o,S=l,M=n;d?(M.loadIdentity(),M.multiply(d),M.translate(s.x,s.y),M.rotate(s.rotation),M.scale(s.scaleX,s.scaleY)):M.applyITRS(s.x,s.y,s.rotation,s.scaleX,s.scaleY);var A=f.currentContext,C=c.roundPixels,w=c.alpha,P=s.alpha,L=s.alive,O=L.length,I=s.viewBounds;if(!(!s.visible||O===0||I&&!r(I,c.worldView))){s.sortCallback&&s.depthSort(),c.addToRenderList(s);var D=s.scrollFactorX,B=s.scrollFactorY;A.save(),A.globalCompositeOperation=f.blendModes[s.blendMode];for(var G=0;G0&&J.height>0){var Q=-k.halfWidth,Y=-k.halfHeight;A.globalAlpha=W,A.save(),m.setToContext(A),C&&(Q=Math.round(Q),Y=Math.round(Y)),A.imageSmoothingEnabled=!k.source.scaleMode,A.drawImage(k.source.image,J.x,J.y,J.width,J.height,Q,Y,J.width,J.height),A.restore()}}}A.restore()}};a.exports=u},92730:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(25305),p=t(44603),h=t(23568),o=t(95540),l=t(31600);p.register("particles",function(n,u){n===void 0&&(n={});var f=h(n,"key",null),s=o(n,"config",null),c=new l(this.scene,0,0,f);return u!==void 0&&(n.add=u),r(this.scene,c,n),s&&c.setConfig(s),c})},676:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(39429),p=t(31600);r.register("particles",function(h,o,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 p(this.scene,h,o,l,n))})},90668:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(29747),p=r,h=r;p=t(21188),h=t(9871),a.exports={renderWebGL:p,renderCanvas:h}},21188:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(59996),p=t(61340),h=t(70554),o=new p,l=new p,n=new p,u=new p,f=function(s,c,d,v){var m=s.pipelines.set(c.pipeline),S=o,M=l,A=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 w=h.getTintAppendFloatAlpha,P=d.alpha,L=c.alpha;s.pipelines.preBatch(c);var O=c.alive,I=O.length,D=c.viewBounds;if(!(I===0||D&&!r(D,d.worldView))){c.sortCallback&&c.depthSort(),d.addToRenderList(c),S.copyFrom(d.matrix),S.multiplyWithOffset(C,-d.scrollX*c.scrollFactorX,-d.scrollY*c.scrollFactorY),s.setBlendMode(c.blendMode),c.mask&&(c.mask.preRenderWebGL(s,c,d),s.pipelines.set(c.pipeline));for(var B=c.tintFill,G,z,W=0;W{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=new r({initialize:function(o,l,n){o===void 0&&(o=0),l===void 0&&(l=0),n===void 0&&(n=!0),this.emitter,this.x=o,this.y=l,this.active=n},update:function(){},destroy:function(){this.emitter=null}});a.exports=p},9774:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="complete"},812:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="deathzone"},30522:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="explode"},96695:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="start"},18677:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="stop"},20696:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={COMPLETE:t(9774),DEATH_ZONE:t(812),EXPLODE:t(30522),START:t(96695),STOP:t(18677)}},18404:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={EmitterColorOp:t(76472),EmitterOp:t(44777),Events:t(20696),GravityWell:t(24502),Particle:t(56480),ParticleBounds:t(69601),ParticleEmitter:t(31600),ParticleProcessor:t(20286),Zones:t(21024)}},26388:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=new r({initialize:function(o,l){this.source=o,this.killOnEnter=l},willKill:function(h){var o=h.worldPosition,l=this.source.contains(o.x,o.y);return l&&this.killOnEnter||!l&&!this.killOnEnter}});a.exports=p},19909:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=new r({initialize:function(o,l,n,u,f,s){u===void 0&&(u=!1),f===void 0&&(f=!0),s===void 0&&(s=-1),this.source=o,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=s,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var h=this.points[0],o=this.points[this.points.length-1];h.x===o.x&&h.y===o.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 o=this.points[this.counter];o&&(h.x=o.x,h.y=o.y)}});a.exports=p},68875:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(26099),h=new r({initialize:function(l){this.source=l,this._tempVec=new p,this.total=-1},getPoint:function(o){var l=this._tempVec;this.source.getRandomPoint(l),o.x=l.x,o.y=l.y}});a.exports=h},21024:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={DeathZone:t(26388),EdgeZone:t(19909),RandomZone:t(68875)}},1159:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(31401),h=t(68287),o=new r({Extends:h,Mixins:[p.PathFollower],initialize:function(n,u,f,s,c,d){h.call(this,n,f,s,c,d),this.path=u},preUpdate:function(l,n){this.anims.update(l,n),this.pathUpdate(l)}});a.exports=o},90145:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(39429),p=t(1159);r.register("follower",function(h,o,l,n,u){var f=new p(this.scene,h,o,l,n,u);return this.displayList.add(f),this.updateList.add(f),f})},33663:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(9674),p=t(83419),h=t(48803),o=t(90664),l=t(4703),n=t(45650),u=new p({Extends:l,initialize:function(s,c,d,v,m,S,M,A){v||(v="__DEFAULT"),l.call(this,s,c,d,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,A),this.setSizeToFrame(!1),this.setViewHeight()},originX:{get:function(){return .5}},originY:{get:function(){return .5}},setGridSize:function(f,s,c){f===void 0&&(f=8),s===void 0&&(s=8),c===void 0&&(c=!1);var d=!1;return c&&(d=!0),this.gridWidth=f,this.gridHeight=s,this.isTiled=c,this.clear(),h({mesh:this,widthSegments:f,heightSegments:s,isOrtho:!1,tile:c,flipY:d}),this},setSizeToFrame:function(f){f===void 0&&(f=!0);var s=this.frame;if(this.setPerspective(this.width/s.width,this.height/s.height),this._checkerboard&&this._checkerboard!==this.texture&&this.removeCheckerboard(),!f)return this;var c=this.gridWidth,d=this.gridHeight,v=this.vertices,m=s.u0,S=s.u1,M=s.v0,A=s.v1,C,w,P=0;if(this.isTiled)for(M=s.v1,A=s.v0,w=0;w7&&C>7?M.push(m.r,m.g,m.b,c):M.push(S.r,S.g,S.b,d);var w=this.scene.sys.textures.addUint8Array(n(),new Uint8Array(M),16,16);return this.removeCheckerboard(),this.setTexture(w),this.setSizeToFrame(),this.setViewHeight(v),this},removeCheckerboard:function(){this._checkerboard&&(this._checkerboard.destroy(),this._checkerboard=null)},play:function(f,s){return this.anims.play(f,s)},playReverse:function(f,s){return this.anims.playReverse(f,s)},playAfterDelay:function(f,s){return this.anims.playAfterDelay(f,s)},playAfterRepeat:function(f,s){return this.anims.playAfterRepeat(f,s)},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,s){l.prototype.preUpdate.call(this,f,s),this.anims.update(f,s)},preDestroy:function(){this.clear(),this.removeCheckerboard(),this.anims.destroy(),this.anims=void 0,this.debugCallback=null,this.debugGraphic=null}});a.exports=u},56015:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(25305),p=t(13059),h=t(44603),o=t(23568),l=t(35154),n=t(33663);h.register("plane",function(u,f){u===void 0&&(u={});var s=o(u,"key",null),c=o(u,"frame",null),d=l(u,"width",8),v=l(u,"height",8),m=l(u,"tile",!1),S=new n(this.scene,0,0,s,c,d,v,m);f!==void 0&&(u.add=f);var M=l(u,"checkerboard",null);if(M){var A=l(M,"color1",16777215),C=l(M,"color2",255),w=l(M,"alpha1",255),P=l(M,"alpha2",255),L=l(M,"height",128);S.createCheckerboard(A,C,w,P,L)}return r(this.scene,S,u),p(S,u),S})},30985:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(33663),p=t(39429);p.register("plane",function(h,o,l,n,u,f,s){return this.displayList.add(new r(this.scene,h,o,l,n,u,f,s))})},80321:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(31401),h=t(95643),o=t(30100),l=t(36060),n=t(67277),u=new r({Extends:h,Mixins:[p.AlphaSingle,p.BlendMode,p.Depth,p.Mask,p.Pipeline,p.PostPipeline,p.ScrollFactor,p.Transform,p.Visible,n],initialize:function(s,c,d,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,s,"PointLight"),this.initPipeline(l.POINTLIGHT_PIPELINE),this.initPostPipeline(),this.setPosition(c,d),this.color=o(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}}});a.exports=u},39829:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(25305),p=t(44603),h=t(23568),o=t(80321);p.register("pointlight",function(l,n){l===void 0&&(l={});var u=h(l,"color",16777215),f=h(l,"radius",128),s=h(l,"intensity",1),c=h(l,"attenuation",.1),d=new o(this.scene,0,0,u,f,s,c);return n!==void 0&&(l.add=n),r(this.scene,d,l),d})},71255:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(39429),p=t(80321);r.register("pointlight",function(h,o,l,n,u,f){return this.displayList.add(new p(this.scene,h,o,l,n,u,f))})},67277:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(29747),p=r,h=r;p=t(57787),a.exports={renderWebGL:p,renderCanvas:h}},57787:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(91296),p=function(h,o,l,n){l.addToRenderList(o);var u=h.pipelines.set(o.pipeline),f=r(o,l,n).calc,s=o.width,c=o.height,d=-o._radius,v=-o._radius,m=d+s,S=v+c,M=f.getX(0,0),A=f.getY(0,0),C=f.getX(d,v),w=f.getY(d,v),P=f.getX(d,S),L=f.getY(d,S),O=f.getX(m,S),I=f.getY(m,S),D=f.getX(m,v),B=f.getY(m,v);h.pipelines.preBatch(o),u.batchPointLight(o,l,C,w,P,L,O,I,D,B,M,A),h.pipelines.postBatch(o)};a.exports=p},591:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(81320),h=t(88571),o=new r({Extends:h,initialize:function(n,u,f,s,c){u===void 0&&(u=0),f===void 0&&(f=0),s===void 0&&(s=32),c===void 0&&(c=32);var d=new p(n.sys.textures,"",s,c);h.call(this,n,u,f,d),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,s,c){return this.texture.fill(l,n,u,f,s,c),this},clear:function(){return this.texture.clear(),this},stamp:function(l,n,u,f,s){return this.texture.stamp(l,n,u,f,s),this},erase:function(l,n,u){return this.texture.erase(l,n,u),this},draw:function(l,n,u,f,s){return this.texture.draw(l,n,u,f,s),this},drawFrame:function(l,n,u,f,s,c){return this.texture.drawFrame(l,n,u,f,s,c),this},repeat:function(l,n,u,f,s,c,d,v,m){return this.texture.repeat(l,n,u,f,s,c,d,v,m),this},beginDraw:function(){return this.texture.beginDraw(),this},batchDraw:function(l,n,u,f,s){return this.texture.batchDraw(l,n,u,f,s),this},batchDrawFrame:function(l,n,u,f,s,c){return this.texture.batchDrawFrame(l,n,u,f,s,c),this},endDraw:function(l){return this.texture.endDraw(l),this},snapshotArea:function(l,n,u,f,s,c,d){return this.texture.snapshotArea(l,n,u,f,s,c,d),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()}});a.exports=o},34495:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(25305),p=t(44603),h=t(23568),o=t(591);p.register("renderTexture",function(l,n){l===void 0&&(l={});var u=h(l,"x",0),f=h(l,"y",0),s=h(l,"width",32),c=h(l,"height",32),d=new o(this.scene,u,f,s,c);return n!==void 0&&(l.add=n),r(this.scene,d,l),d})},60505:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(39429),p=t(591);r.register("renderTexture",function(h,o,l,n){return this.displayList.add(new p(this.scene,h,o,l,n))})},77757:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(9674),p=t(83419),h=t(31401),o=t(95643),l=t(36060),n=t(38745),u=t(26099),f=new p({Extends:o,Mixins:[h.AlphaSingle,h.BlendMode,h.Depth,h.Flip,h.Mask,h.Pipeline,h.PostPipeline,h.Size,h.Texture,h.Transform,h.Visible,h.ScrollFactor,n],initialize:function(c,d,v,m,S,M,A,C,w){m===void 0&&(m="__DEFAULT"),M===void 0&&(M=2),A===void 0&&(A=!0),o.call(this,c,"Rope"),this.anims=new r(this),this.points=M,this.vertices,this.uv,this.colors,this.alphas,this.tintFill=m==="__DEFAULT",this.dirty=!1,this.horizontal=A,this._flipX=!1,this._flipY=!1,this._perp=new u,this.debugCallback=null,this.debugGraphic=null,this.setTexture(m,S),this.setPosition(d,v),this.setSizeToFrame(),this.initPipeline(l.ROPE_PIPELINE),this.initPostPipeline(),Array.isArray(M)&&this.resizeArrays(M.length),this.setPoints(M,C,w),this.updateVertices()},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(s,c){var d=this.anims.currentFrame;this.anims.update(s,c),this.anims.currentFrame!==d&&(this.updateUVs(),this.updateVertices())},play:function(s,c,d){return this.anims.play(s,c,d),this},setDirty:function(){return this.dirty=!0,this},setHorizontal:function(s,c,d){return s===void 0&&(s=this.points.length),this.horizontal?this:(this.horizontal=!0,this.setPoints(s,c,d))},setVertical:function(s,c,d){return s===void 0&&(s=this.points.length),this.horizontal?(this.horizontal=!1,this.setPoints(s,c,d)):this},setTintFill:function(s){return s===void 0&&(s=!1),this.tintFill=s,this},setAlphas:function(s,c){var d=this.points.length;if(d<1)return this;var v=this.alphas;s===void 0?s=[1]:!Array.isArray(s)&&c===void 0&&(s=[s]);var m,S=0;if(c!==void 0)for(m=0;mS&&(M=s[S]),v[S]=M,s.length>S+1&&(M=s[S+1]),v[S+1]=M}return this},setColors:function(s){var c=this.points.length;if(c<1)return this;var d=this.colors;s===void 0?s=[16777215]:Array.isArray(s)||(s=[s]);var v,m=0;if(s.length===c)for(v=0;vm&&(S=s[m]),d[m]=S,s.length>m+1&&(S=s[m+1]),d[m+1]=S}return this},setPoints:function(s,c,d){if(s===void 0&&(s=2),typeof s=="number"){var v=s;v<2&&(v=2),s=[];var m,S,M;if(this.horizontal)for(M=-this.frame.halfWidth,S=this.frame.width/(v-1),m=0;m{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(){};a.exports=y},26209:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(25305),p=t(44603),h=t(23568),o=t(35154),l=t(77757);p.register("rope",function(n,u){n===void 0&&(n={});var f=h(n,"key",null),s=h(n,"frame",null),c=h(n,"horizontal",!0),d=o(n,"points",void 0),v=o(n,"colors",void 0),m=o(n,"alphas",void 0),S=new l(this.scene,0,0,f,s,d,c,v,m);return u!==void 0&&(n.add=u),r(this.scene,S,n),S})},96819:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(77757),p=t(39429);p.register("rope",function(h,o,l,n,u,f,s,c){return this.displayList.add(new r(this.scene,h,o,l,n,u,f,s,c))})},38745:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(29747),p=r,h=r;p=t(20439),h=t(95262),a.exports={renderWebGL:p,renderCanvas:h}},20439:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(91296),p=t(70554),h=function(o,l,n,u){n.addToRenderList(l);var f=o.pipelines.set(l.pipeline,l),s=r(l,n,u).calc,c=l.vertices,d=l.uv,v=l.colors,m=l.alphas,S=l.alpha,M=p.getTintAppendFloatAlpha,A=n.roundPixels,C=c.length,w=Math.floor(C*.5);f.flush(),o.pipelines.preBatch(l);var P=f.setGameObject(l),L=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=[],W=0;W{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(31401),h=t(95643),o=t(95540),l=t(79291),n=t(61622),u=t(25479),f=t(61340),s=t(95428),c=t(92503),d=new r({Extends:h,Mixins:[p.ComputedSize,p.Depth,p.GetBounds,p.Mask,p.Origin,p.ScrollFactor,p.Transform,p.Visible,u],initialize:function(m,S,M,A,C,w,P,L){M===void 0&&(M=0),A===void 0&&(A=0),C===void 0&&(C=128),w===void 0&&(w=128),h.call(this,m,"Shader"),this.blendMode=-1,this.shader;var O=m.sys.renderer;this.renderer=O,this.gl=O.gl,this.vertexData=new ArrayBuffer(6*(Float32Array.BYTES_PER_ELEMENT*2)),this.vertexBuffer=O.createVertexBuffer(this.vertexData.byteLength,this.gl.STREAM_DRAW),this._deferSetShader=null,this._deferProjOrtho=null,this.program=null,this.bytes=new Uint8Array(this.vertexData),this.vertexViewF32=new Float32Array(this.vertexData),this._tempMatrix1=new f,this._tempMatrix2=new f,this._tempMatrix3=new f,this.viewMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.projectionMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.uniforms={},this.pointer=null,this._rendererWidth=O.width,this._rendererHeight=O.height,this._textureCount=0,this.framebuffer=null,this.glTexture=null,this.renderToTexture=!1,this.texture=null,this.setPosition(M,A),this.setSize(C,w),this.setOrigin(.5,.5),this.setShader(S,P,L),this.renderer.on(c.RESTORE_WEBGL,this.onContextRestored,this)},willRender:function(v){return this.renderToTexture?!0:!(h.RENDER_MASK!==this.renderFlags||this.cameraFilter!==0&&this.cameraFilter&v.id)},setRenderToTexture:function(v,m){if(!this.renderToTexture){var S=this.width,M=this.height,A=this.renderer;this.glTexture=A.createTextureFromSource(null,S,M,0),this.framebuffer=A.createFramebuffer(S,M,this.glTexture,!1),this._rendererWidth=S,this._rendererHeight=M,this.renderToTexture=!0,this.projOrtho(0,this.width,this.height,0),v&&(this.texture=this.scene.sys.textures.addGLTexture(v,this.glTexture))}return this.shader&&(A.pipelines.clear(),this.load(),this.flush(),A.pipelines.rebind()),this},setShader:function(v,m,S){if(this.renderer.contextLost)return this._deferSetShader={key:v,textures:m,textureData:S},this;if(m===void 0&&(m=[]),typeof v=="string"){var M=this.scene.sys.cache.shader;if(!M.has(v))return console.warn("Shader missing: "+v),this;this.shader=M.get(v)}else this.shader=v;var A=this.gl,C=this.renderer;this.program&&C.deleteProgram(this.program);var w=C.createProgram(this.shader.vertexSrc,this.shader.fragmentSrc);A.uniformMatrix4fv(A.getUniformLocation(w.webGLProgram,"uViewMatrix"),!1,this.viewMatrix),A.uniformMatrix4fv(A.getUniformLocation(w.webGLProgram,"uProjectionMatrix"),!1,this.projectionMatrix),A.uniform2f(A.getUniformLocation(w.webGLProgram,"uResolution"),this.width,this.height),this.program=w;var P=new Date,L={resolution:{type:"2f",value:{x:this.width,y:this.height}},time:{type:"1f",value:0},mouse:{type:"2f",value:{x:this.width/2,y:this.height/2}},date:{type:"4fv",value:[P.getFullYear(),P.getMonth(),P.getDate(),P.getHours()*60*60+P.getMinutes()*60+P.getSeconds()]},sampleRate:{type:"1f",value:44100},iChannel0:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel1:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel2:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel3:{type:"sampler2D",value:null,textureData:{repeat:!0}}};this.shader.uniforms?this.uniforms=l(!0,{},this.shader.uniforms,L):this.uniforms=L;for(var O=0;O<4;O++)m[O]&&this.setSampler2D("iChannel"+O,m[O],O,S);return this.initUniforms(),this.projOrtho(0,this._rendererWidth,this._rendererHeight,0),this},setPointer:function(v){return this.pointer=v,this},projOrtho:function(v,m,S,M){if(this.renderer.contextLost){this._deferProjOrtho={left:v,right:m,bottom:S,top:M};return}var A=-1e3,C=1e3,w=1/(v-m),P=1/(S-M),L=1/(A-C),O=this.projectionMatrix;O[0]=-2*w,O[5]=-2*P,O[10]=2*L,O[12]=(v+m)*w,O[13]=(M+S)*P,O[14]=(C+A)*L;var I=this.program,D=this.gl,B=this.renderer;B.setProgram(I),D.uniformMatrix4fv(D.getUniformLocation(I.webGLProgram,"uProjectionMatrix"),!1,this.projectionMatrix),this._rendererWidth=m,this._rendererHeight=S},initUniforms:function(){var v=this.renderer.glFuncMap,m=this.program;this._textureCount=0;for(var S in this.uniforms){var M=this.uniforms[S],A=M.type,C=v[A];M.uniformLocation=this.renderer.createUniformLocation(m,S),A!=="sampler2D"&&(M.glMatrix=C.matrix,M.glValueLength=C.length,M.glFunc=C.func)}},setSampler2DBuffer:function(v,m,S,M,A,C){A===void 0&&(A=0),C===void 0&&(C={});var w=this.uniforms[v];return w.value=m,C.width=S,C.height=M,w.textureData=C,this._textureCount=A,this.initSampler2D(w),this},setSampler2D:function(v,m,S,M){S===void 0&&(S=0);var A=this.scene.sys.textures;if(A.exists(m)){var C=A.getFrame(m);if(C.glTexture&&C.glTexture.isRenderTexture)return this.setSampler2DBuffer(v,C.glTexture,C.width,C.height,S,M);var w=this.uniforms[v],P=C.source;w.textureKey=m,w.source=P.image,w.value=C.glTexture,P.isGLTexture&&(M||(M={}),M.width=P.width,M.height=P.height),M&&(w.textureData=M),this._textureCount=S,this.initSampler2D(w)}return this},setUniform:function(v,m){return n(this.uniforms,v,m),this},getUniform:function(v){return o(this.uniforms,v,null)},setChannel0:function(v,m){return this.setSampler2D("iChannel0",v,0,m)},setChannel1:function(v,m){return this.setSampler2D("iChannel1",v,1,m)},setChannel2:function(v,m){return this.setSampler2D("iChannel2",v,2,m)},setChannel3:function(v,m){return this.setSampler2D("iChannel3",v,3,m)},initSampler2D:function(v){if(v.value){var m=v.textureData;if(m&&!v.value.isRenderTexture){var S=this.gl,M=v.value,A=S[o(m,"magFilter","linear").toUpperCase()],C=S[o(m,"minFilter","linear").toUpperCase()],w=S[o(m,"wrapS","repeat").toUpperCase()],P=S[o(m,"wrapT","repeat").toUpperCase()],L=S[o(m,"format","rgba").toUpperCase()],O=o(m,"flipY",!1),I=o(m,"width",M.width),D=o(m,"height",M.height),B=o(m,"source",M.pixels);m.repeat&&(w=S.REPEAT,P=S.REPEAT),m.width&&(B=null),M.update(B,I,D,O,w,P,C,A,L)}this.renderer.setProgram(this.program),this._textureCount++}},syncUniforms:function(){var v=this.gl,m=this.uniforms,S,M,A,C,w,P=0;for(var L in m)S=m[L],A=S.glFunc,M=S.glValueLength,C=S.uniformLocation,w=S.value,w!==null&&(M===1?S.glMatrix?A.call(v,C.webGLUniformLocation,S.transpose,w):A.call(v,C.webGLUniformLocation,w):M===2?A.call(v,C.webGLUniformLocation,w.x,w.y):M===3?A.call(v,C.webGLUniformLocation,w.x,w.y,w.z):M===4?A.call(v,C.webGLUniformLocation,w.x,w.y,w.z,w.w):S.type==="sampler2D"&&(v.activeTexture(v.TEXTURE0+P),v.bindTexture(v.TEXTURE_2D,w.webGLTexture),v.uniform1i(C.webGLUniformLocation,P),P++))},load:function(v){var m=this.gl,S=this.width,M=this.height,A=this.renderer,C=this.program,w=this.viewMatrix;if(!this.renderToTexture){var P=-this._displayOriginX,L=-this._displayOriginY;w[0]=v[0],w[1]=v[1],w[4]=v[2],w[5]=v[3],w[8]=v[4],w[9]=v[5],w[12]=w[0]*P+w[4]*L,w[13]=w[1]*P+w[5]*L}m.useProgram(C.webGLProgram),m.uniformMatrix4fv(m.getUniformLocation(C.webGLProgram,"uViewMatrix"),!1,w),m.uniformMatrix4fv(m.getUniformLocation(C.webGLProgram,"uProjectionMatrix"),!1,this.projectionMatrix),m.uniform2f(m.getUniformLocation(C.webGLProgram,"uResolution"),this.width,this.height);var O=this.uniforms,I=O.resolution;I.value.x=S,I.value.y=M,O.time.value=A.game.loop.getDuration();var D=this.pointer;if(D){var B=O.mouse,G=D.x/S,z=1-D.y/M;B.value.x=G.toFixed(2),B.value.y=z.toFixed(2)}this.syncUniforms()},flush:function(){var v=this.width,m=this.height,S=this.program,M=this.gl,A=this.vertexBuffer,C=this.renderer,w=Float32Array.BYTES_PER_ELEMENT*2;this.renderToTexture&&(C.setFramebuffer(this.framebuffer),M.clearColor(0,0,0,0),M.clear(M.COLOR_BUFFER_BIT)),M.bindBuffer(M.ARRAY_BUFFER,A.webGLBuffer);var P=M.getAttribLocation(S.webGLProgram,"inPosition");P!==-1&&(M.enableVertexAttribArray(P),M.vertexAttribPointer(P,2,M.FLOAT,!1,w,0));var L=this.vertexViewF32;L[3]=m,L[4]=v,L[5]=m,L[8]=v,L[9]=m,L[10]=v;var O=6;M.bufferSubData(M.ARRAY_BUFFER,0,this.bytes.subarray(0,O*w)),M.drawArrays(M.TRIANGLES,0,O),this.renderToTexture&&C.setFramebuffer(null,!1)},setAlpha:function(){},setBlendMode:function(){},onContextRestored:function(){if(this._deferSetShader!==null){var v=this._deferSetShader.key,m=this._deferSetShader.textures,S=this._deferSetShader.textureData;this._deferSetShader=null,this.setShader(v,m,S)}if(this._deferProjOrtho!==null){var M=this._deferProjOrtho.left,A=this._deferProjOrtho.right,C=this._deferProjOrtho.bottom,w=this._deferProjOrtho.top;this._deferProjOrtho=null,this.projOrtho(M,A,C,w)}},preDestroy:function(){var v=this.renderer;v.off(c.RESTORE_WEBGL,this.onContextRestored,this),v.deleteProgram(this.program),v.deleteBuffer(this.vertexBuffer),this.renderToTexture&&(v.deleteFramebuffer(this.framebuffer),this.texture.destroy(),this.framebuffer=null,this.glTexture=null,this.texture=null),s(this.uniforms,function(m){v.deleteUniformLocation(m.uniformLocation),m.uniformLocation=null})}});a.exports=d},80464:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(){};a.exports=y},54935:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(25305),p=t(44603),h=t(23568),o=t(20071);p.register("shader",function(l,n){l===void 0&&(l={});var u=h(l,"key",null),f=h(l,"x",0),s=h(l,"y",0),c=h(l,"width",128),d=h(l,"height",128),v=new o(this.scene,u,f,s,c,d);return n!==void 0&&(l.add=n),r(this.scene,v,l),v})},74177:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(20071),p=t(39429);p.register("shader",function(h,o,l,n,u,f,s){return this.displayList.add(new r(this.scene,h,o,l,n,u,f,s))})},25479:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(29747),p=r,h=r;p=t(19257),h=t(80464),a.exports={renderWebGL:p,renderCanvas:h}},19257:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(91296),p=function(h,o,l,n){if(o.shader){if(l.addToRenderList(o),h.pipelines.clear(),o.renderToTexture)o.load(),o.flush();else{var u=r(o,l,n).calc;(h.width!==o._rendererWidth||h.height!==o._rendererHeight)&&o.projOrtho(0,h.width,h.height,0),o.load(u.matrix),o.flush()}h.pipelines.rebind()}};a.exports=p},10441:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(70554),p=function(h,o,l,n,u,f){for(var s=r.getTintAppendFloatAlpha(l.fillColor,l.fillAlpha*n),c=l.pathData,d=l.pathIndexes,v=0;v{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p,h){var o=p||r.fillColor,l=h||r.fillAlpha,n=(o&16711680)>>>16,u=(o&65280)>>>8,f=o&255;t.fillStyle="rgba("+n+","+u+","+f+","+l+")"};a.exports=y},75177:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p,h){var o=p||r.strokeColor,l=h||r.strokeAlpha,n=(o&16711680)>>>16,u=(o&65280)>>>8,f=o&255;t.strokeStyle="rgba("+n+","+u+","+f+","+l+")",t.lineWidth=r.lineWidth};a.exports=y},17803:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(31401),h=t(95643),o=t(23031),l=new r({Extends:h,Mixins:[p.AlphaSingle,p.BlendMode,p.Depth,p.GetBounds,p.Mask,p.Origin,p.Pipeline,p.PostPipeline,p.ScrollFactor,p.Transform,p.Visible],initialize:function(u,f,s){f===void 0&&(f="Shape"),h.call(this,u,f),this.geom=s,this.pathData=[],this.pathIndexes=[],this.fillColor=16777215,this.fillAlpha=1,this.strokeColor=16777215,this.strokeAlpha=1,this.lineWidth=1,this.isFilled=!1,this.isStroked=!1,this.closePath=!0,this._tempLine=new o,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}}});a.exports=l},34682:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(70554),p=function(h,o,l,n,u){var f=h.strokeTint,s=r.getTintAppendFloatAlpha(o.strokeColor,o.strokeAlpha*l);f.TL=s,f.TR=s,f.BL=s,f.BR=s;var c=o.pathData,d=c.length-1,v=o.lineWidth,m=v/2,S=c[0]-n,M=c[1]-u;o.closePath||(d-=2);for(var A=2;A{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(13609),p=t(83419),h=t(39506),o=t(94811),l=t(96503),n=t(36383),u=t(17803),f=new p({Extends:u,Mixins:[r],initialize:function(c,d,v,m,S,M,A,C,w){d===void 0&&(d=0),v===void 0&&(v=0),m===void 0&&(m=128),S===void 0&&(S=0),M===void 0&&(M=360),A===void 0&&(A=!1),u.call(this,c,"Arc",new l(0,0,m)),this._startAngle=S,this._endAngle=M,this._anticlockwise=A,this._iterations=.01,this.setPosition(d,v);var P=this.geom.radius*2;this.setSize(P,P),C!==void 0&&this.setFillStyle(C,w),this.updateDisplayOrigin(),this.updateData()},iterations:{get:function(){return this._iterations},set:function(s){this._iterations=s,this.updateData()}},radius:{get:function(){return this.geom.radius},set:function(s){this.geom.radius=s;var c=s*2;this.setSize(c,c),this.updateDisplayOrigin(),this.updateData()}},startAngle:{get:function(){return this._startAngle},set:function(s){this._startAngle=s,this.updateData()}},endAngle:{get:function(){return this._endAngle},set:function(s){this._endAngle=s,this.updateData()}},anticlockwise:{get:function(){return this._anticlockwise},set:function(s){this._anticlockwise=s,this.updateData()}},setRadius:function(s){return this.radius=s,this},setIterations:function(s){return s===void 0&&(s=.01),this.iterations=s,this},setStartAngle:function(s,c){return this._startAngle=s,c!==void 0&&(this._anticlockwise=c),this.updateData()},setEndAngle:function(s,c){return this._endAngle=s,c!==void 0&&(this._anticlockwise=c),this.updateData()},updateData:function(){var s=this._iterations,c=s,d=this.geom.radius,v=h(this._startAngle),m=h(this._endAngle),S=this._anticlockwise,M=d,A=d;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)*d,A+Math.sin(v)*d],w;c<1;)w=m*c+v,C.push(M+Math.cos(w)*d,A+Math.sin(w)*d),c+=s;return w=m+v,C.push(M+Math.cos(w)*d,A+Math.sin(w)*d),C.push(M+Math.cos(v)*d,A+Math.sin(v)*d),this.pathIndexes=o(C),this.pathData=C,this}});a.exports=f},42542:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(39506),p=t(65960),h=t(75177),o=t(20926),l=function(n,u,f,s){f.addToRenderList(u);var c=n.currentContext;if(o(n,c,u,f,s)){var d=u.radius;c.beginPath(),c.arc(d-u.originX*(d*2),d-u.originY*(d*2),d,r(u._startAngle),r(u._endAngle),u.anticlockwise),u.closePath&&c.closePath(),u.isFilled&&(p(c,u),c.fill()),u.isStroked&&(h(c,u),c.stroke()),c.restore()}};a.exports=l},42563:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(23629),p=t(39429);p.register("arc",function(h,o,l,n,u,f,s,c){return this.displayList.add(new r(this.scene,h,o,l,n,u,f,s,c))}),p.register("circle",function(h,o,l,n,u){return this.displayList.add(new r(this.scene,h,o,l,0,360,!1,n,u))})},13609:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(29747),p=r,h=r;p=t(41447),h=t(42542),a.exports={renderWebGL:p,renderCanvas:h}},41447:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(91296),p=t(10441),h=t(34682),o=function(l,n,u,f){u.addToRenderList(n);var s=l.pipelines.set(n.pipeline),c=r(n,u,f),d=s.calcMatrix.copyFrom(c.calc),v=n._displayOriginX,m=n._displayOriginY,S=u.alpha*n.alpha;l.pipelines.preBatch(n),n.isFilled&&p(s,d,n,S,v,m),n.isStroked&&h(s,n,S,v,m),l.pipelines.postBatch(n)};a.exports=o},89:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(33141),h=t(94811),o=t(87841),l=t(17803),n=new r({Extends:l,Mixins:[p],initialize:function(f,s,c,d,v,m){s===void 0&&(s=0),c===void 0&&(c=0),l.call(this,f,"Curve",d),this._smoothness=32,this._curveBounds=new o,this.closePath=!1,this.setPosition(s,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 s=[],c=this.geom.getPoints(f),d=0;d{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(65960),p=t(75177),h=t(20926),o=function(l,n,u,f){u.addToRenderList(n);var s=l.currentContext;if(h(l,s,n,u,f)){var c=n._displayOriginX+n._curveBounds.x,d=n._displayOriginY+n._curveBounds.y,v=n.pathData,m=v.length-1,S=v[0]-c,M=v[1]-d;s.beginPath(),s.moveTo(S,M),n.closePath||(m-=2);for(var A=2;A{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(39429),p=t(89);r.register("curve",function(h,o,l,n,u){return this.displayList.add(new p(this.scene,h,o,l,n,u))})},33141:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(29747),p=r,h=r;p=t(53987),h=t(3170),a.exports={renderWebGL:p,renderCanvas:h}},53987:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(10441),p=t(91296),h=t(34682),o=function(l,n,u,f){u.addToRenderList(n);var s=l.pipelines.set(n.pipeline),c=p(n,u,f),d=s.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(s,d,n,S,v,m),n.isStroked&&h(s,n,S,v,m),l.pipelines.postBatch(n)};a.exports=o},19921:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(94811),h=t(54205),o=t(8497),l=t(17803),n=new r({Extends:l,Mixins:[h],initialize:function(f,s,c,d,v,m,S){s===void 0&&(s=0),c===void 0&&(c=0),d===void 0&&(d=128),v===void 0&&(v=128),l.call(this,f,"Ellipse",new o(d/2,v/2,d,v)),this._smoothness=64,this.setPosition(s,c),this.width=d,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),s=0;s{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(65960),p=t(75177),h=t(20926),o=function(l,n,u,f){u.addToRenderList(n);var s=l.currentContext;if(h(l,s,n,u,f)){var c=n._displayOriginX,d=n._displayOriginY,v=n.pathData,m=v.length-1,S=v[0]-c,M=v[1]-d;s.beginPath(),s.moveTo(S,M),n.closePath||(m-=2);for(var A=2;A{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(19921),p=t(39429);p.register("ellipse",function(h,o,l,n,u,f){return this.displayList.add(new r(this.scene,h,o,l,n,u,f))})},54205:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(29747),p=r,h=r;p=t(19467),h=t(7930),a.exports={renderWebGL:p,renderCanvas:h}},19467:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(10441),p=t(91296),h=t(34682),o=function(l,n,u,f){u.addToRenderList(n);var s=l.pipelines.set(n.pipeline),c=p(n,u,f),d=s.calcMatrix.copyFrom(c.calc),v=n._displayOriginX,m=n._displayOriginY,S=u.alpha*n.alpha;l.pipelines.preBatch(n),n.isFilled&&r(s,d,n,S,v,m),n.isStroked&&h(s,n,S,v,m),l.pipelines.postBatch(n)};a.exports=o},30479:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(17803),h=t(26015),o=new r({Extends:p,Mixins:[h],initialize:function(n,u,f,s,c,d,v,m,S,M,A){u===void 0&&(u=0),f===void 0&&(f=0),s===void 0&&(s=128),c===void 0&&(c=128),d===void 0&&(d=32),v===void 0&&(v=32),p.call(this,n,"Grid",null),this.cellWidth=d,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(s,c),this.setFillStyle(m,S),M!==void 0&&this.setOutlineStyle(M,A),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}});a.exports=o},49912:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(65960),p=t(75177),h=t(20926),o=function(l,n,u,f){u.addToRenderList(n);var s=l.currentContext;if(h(l,s,n,u,f)){var c=-n._displayOriginX,d=-n._displayOriginY,v=u.alpha*n.alpha,m=n.width,S=n.height,M=n.cellWidth,A=n.cellHeight,C=Math.ceil(m/M),w=Math.ceil(S/A),P=M,L=A,O=M-(C*M-m),I=A-(w*A-S),D=n.showCells,B=n.showAltCells,G=n.showOutline,z=0,W=0,k=0,J=0,Q=0;if(G&&(P--,L--,O===M&&O--,I===A&&I--),D&&n.fillAlpha>0)for(r(s,n),W=0;W0)for(r(s,n,n.altFillColor,n.altFillAlpha*v),W=0;W0){for(p(s,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=t(39429),p=t(30479);r.register("grid",function(h,o,l,n,u,f,s,c,d,v){return this.displayList.add(new p(this.scene,h,o,l,n,u,f,s,c,d,v))})},26015:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(29747),p=r,h=r;p=t(46161),h=t(49912),a.exports={renderWebGL:p,renderCanvas:h}},46161:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(91296),p=t(70554),h=function(o,l,n,u){n.addToRenderList(l);var f=o.pipelines.set(l.pipeline),s=r(l,n,u),c=f.calcMatrix.copyFrom(s.calc);c.translate(-l._displayOriginX,-l._displayOriginY);var d=n.alpha*l.alpha,v=l.width,m=l.height,S=l.cellWidth,M=l.cellHeight,A=Math.ceil(v/S),C=Math.ceil(m/M),w=S,P=M,L=S-(A*S-v),O=M-(C*M-m),I,D,B=l.showCells,G=l.showAltCells,z=l.showOutline,W=0,k=0,J=0,Q=0,Y=0;if(z&&(w--,P--,L===S&&L--,O===M&&O--),o.pipelines.preBatch(l),B&&l.fillAlpha>0)for(I=f.fillTint,D=p.getTintAppendFloatAlpha(l.fillColor,l.fillAlpha*d),I.TL=D,I.TR=D,I.BL=D,I.BR=D,k=0;k0)for(I=f.fillTint,D=p.getTintAppendFloatAlpha(l.altFillColor,l.altFillAlpha*d),I.TL=D,I.TR=D,I.BL=D,I.BR=D,k=0;k0){var K=f.strokeTint,U=p.getTintAppendFloatAlpha(l.outlineFillColor,l.outlineFillAlpha*d);for(K.TL=U,K.TR=U,K.BL=U,K.BR=U,W=1;W{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(99651),p=t(83419),h=t(17803),o=new p({Extends:h,Mixins:[r],initialize:function(n,u,f,s,c,d,v,m){u===void 0&&(u=0),f===void 0&&(f=0),s===void 0&&(s=48),c===void 0&&(c=32),d===void 0&&(d=15658734),v===void 0&&(v=10066329),m===void 0&&(m=13421772),h.call(this,n,"IsoBox",null),this.projection=4,this.fillTop=d,this.fillLeft=v,this.fillRight=m,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isFilled=!0,this.setPosition(u,f),this.setSize(s,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}});a.exports=o},11508:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(65960),p=t(20926),h=function(o,l,n,u){n.addToRenderList(l);var f=o.currentContext;if(p(o,f,l,n,u)&&l.isFilled){var s=l.width,c=l.height,d=s/2,v=s/l.projection;l.showTop&&(r(f,l,l.fillTop),f.beginPath(),f.moveTo(-d,-c),f.lineTo(0,-v-c),f.lineTo(d,-c),f.lineTo(d,-1),f.lineTo(0,v-1),f.lineTo(-d,-1),f.lineTo(-d,-c),f.fill()),l.showLeft&&(r(f,l,l.fillLeft),f.beginPath(),f.moveTo(-d,0),f.lineTo(0,v),f.lineTo(0,v-c),f.lineTo(-d,-c),f.lineTo(-d,0),f.fill()),l.showRight&&(r(f,l,l.fillRight),f.beginPath(),f.moveTo(d,0),f.lineTo(0,v),f.lineTo(0,v-c),f.lineTo(d,-c),f.lineTo(d,0),f.fill()),f.restore()}};a.exports=h},3933:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(39429),p=t(61475);r.register("isobox",function(h,o,l,n,u,f,s){return this.displayList.add(new p(this.scene,h,o,l,n,u,f,s))})},99651:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(29747),p=r,h=r;p=t(68149),h=t(11508),a.exports={renderWebGL:p,renderCanvas:h}},68149:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(91296),p=t(70554),h=function(o,l,n,u){n.addToRenderList(l);var f=o.pipelines.set(l.pipeline),s=r(l,n,u),c=f.calcMatrix.copyFrom(s.calc),d=l.width,v=l.height,m=d/2,S=d/l.projection,M=n.alpha*l.alpha;if(l.isFilled){var A,C,w,P,L,O,I,D,B;o.pipelines.preBatch(l),l.showTop&&(A=p.getTintAppendFloatAlpha(l.fillTop,M),C=c.getX(-m,-v),w=c.getY(-m,-v),P=c.getX(0,-S-v),L=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,w,P,L,O,I,D,B,0,0,1,1,A,A,A,A,2)),l.showLeft&&(A=p.getTintAppendFloatAlpha(l.fillLeft,M),C=c.getX(-m,0),w=c.getY(-m,0),P=c.getX(0,S),L=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,w,P,L,O,I,D,B,0,0,1,1,A,A,A,A,2)),l.showRight&&(A=p.getTintAppendFloatAlpha(l.fillRight,M),C=c.getX(m,0),w=c.getY(m,0),P=c.getX(0,S),L=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,w,P,L,O,I,D,B,0,0,1,1,A,A,A,A,2)),o.pipelines.postBatch(l)}};a.exports=h},16933:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(60561),h=t(17803),o=new r({Extends:h,Mixins:[p],initialize:function(n,u,f,s,c,d,v,m,S){u===void 0&&(u=0),f===void 0&&(f=0),s===void 0&&(s=48),c===void 0&&(c=32),d===void 0&&(d=!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=d,this.isFilled=!0,this.setPosition(u,f),this.setSize(s,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}});a.exports=o},79590:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(65960),p=t(20926),h=function(o,l,n,u){n.addToRenderList(l);var f=o.currentContext;if(p(o,f,l,n,u)&&l.isFilled){var s=l.width,c=l.height,d=s/2,v=s/l.projection,m=l.isReversed;l.showTop&&m&&(r(f,l,l.fillTop),f.beginPath(),f.moveTo(-d,-c),f.lineTo(0,-v-c),f.lineTo(d,-c),f.lineTo(0,v-c),f.fill()),l.showLeft&&(r(f,l,l.fillLeft),f.beginPath(),m?(f.moveTo(-d,-c),f.lineTo(0,v),f.lineTo(0,v-c)):(f.moveTo(-d,0),f.lineTo(0,v),f.lineTo(0,v-c)),f.fill()),l.showRight&&(r(f,l,l.fillRight),f.beginPath(),m?(f.moveTo(d,-c),f.lineTo(0,v),f.lineTo(0,v-c)):(f.moveTo(d,0),f.lineTo(0,v),f.lineTo(0,v-c)),f.fill()),f.restore()}};a.exports=h},49803:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(39429),p=t(16933);r.register("isotriangle",function(h,o,l,n,u,f,s,c){return this.displayList.add(new p(this.scene,h,o,l,n,u,f,s,c))})},60561:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(29747),p=r,h=r;p=t(51503),h=t(79590),a.exports={renderWebGL:p,renderCanvas:h}},51503:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(91296),p=t(70554),h=function(o,l,n,u){n.addToRenderList(l);var f=o.pipelines.set(l.pipeline),s=r(l,n,u),c=f.calcMatrix.copyFrom(s.calc),d=l.width,v=l.height,m=d/2,S=d/l.projection,M=l.isReversed,A=n.alpha*l.alpha;if(l.isFilled){o.pipelines.preBatch(l);var C,w,P,L,O,I,D;if(l.showTop&&M){C=p.getTintAppendFloatAlpha(l.fillTop,A),w=c.getX(-m,-v),P=c.getY(-m,-v),L=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,w,P,L,O,I,D,B,G,0,0,1,1,C,C,C,C,2)}l.showLeft&&(C=p.getTintAppendFloatAlpha(l.fillLeft,A),M?(w=c.getX(-m,-v),P=c.getY(-m,-v),L=c.getX(0,S),O=c.getY(0,S),I=c.getX(0,S-v),D=c.getY(0,S-v)):(w=c.getX(-m,0),P=c.getY(-m,0),L=c.getX(0,S),O=c.getY(0,S),I=c.getX(0,S-v),D=c.getY(0,S-v)),f.batchTri(l,w,P,L,O,I,D,0,0,1,1,C,C,C,2)),l.showRight&&(C=p.getTintAppendFloatAlpha(l.fillRight,A),M?(w=c.getX(m,-v),P=c.getY(m,-v),L=c.getX(0,S),O=c.getY(0,S),I=c.getX(0,S-v),D=c.getY(0,S-v)):(w=c.getX(m,0),P=c.getY(m,0),L=c.getX(0,S),O=c.getY(0,S),I=c.getX(0,S-v),D=c.getY(0,S-v)),f.batchTri(l,w,P,L,O,I,D,0,0,1,1,C,C,C,2)),o.pipelines.postBatch(l)}};a.exports=h},57847:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(17803),h=t(23031),o=t(36823),l=new r({Extends:p,Mixins:[o],initialize:function(u,f,s,c,d,v,m,S,M){f===void 0&&(f=0),s===void 0&&(s=0),c===void 0&&(c=0),d===void 0&&(d=0),v===void 0&&(v=128),m===void 0&&(m=0),p.call(this,u,"Line",new h(c,d,v,m));var A=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,s),this.setSize(A,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,s){return this.geom.setTo(n,u,f,s),this}});a.exports=l},17440:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(75177),p=t(20926),h=function(o,l,n,u){n.addToRenderList(l);var f=o.currentContext;if(p(o,f,l,n,u)){var s=l._displayOriginX,c=l._displayOriginY;l.isStroked&&(r(f,l),f.beginPath(),f.moveTo(l.geom.x1-s,l.geom.y1-c),f.lineTo(l.geom.x2-s,l.geom.y2-c),f.stroke()),f.restore()}};a.exports=h},2481:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(39429),p=t(57847);r.register("line",function(h,o,l,n,u,f,s,c){return this.displayList.add(new p(this.scene,h,o,l,n,u,f,s,c))})},36823:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(29747),p=r,h=r;p=t(77385),h=t(17440),a.exports={renderWebGL:p,renderCanvas:h}},77385:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(91296),p=t(70554),h=function(o,l,n,u){n.addToRenderList(l);var f=o.pipelines.set(l.pipeline),s=r(l,n,u);f.calcMatrix.copyFrom(s.calc);var c=l._displayOriginX,d=l._displayOriginY,v=n.alpha*l.alpha;if(o.pipelines.preBatch(l),l.isStroked){var m=f.strokeTint,S=p.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-d,l.geom.x2-c,l.geom.y2-d,l._startWidth/2,l._endWidth/2,1,0,!1,s.sprite,s.camera)}o.pipelines.postBatch(l)};a.exports=h},24949:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(90273),p=t(83419),h=t(94811),o=t(13829),l=t(25717),n=t(17803),u=t(5469),f=new p({Extends:n,Mixins:[r],initialize:function(c,d,v,m,S,M){d===void 0&&(d=0),v===void 0&&(v=0),n.call(this,c,"Polygon",new l(m));var A=o(this.geom);this.setPosition(d,v),this.setSize(A.width,A.height),S!==void 0&&this.setFillStyle(S,M),this.updateDisplayOrigin(),this.updateData()},smooth:function(s){s===void 0&&(s=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=t(65960),p=t(75177),h=t(20926),o=function(l,n,u,f){u.addToRenderList(n);var s=l.currentContext;if(h(l,s,n,u,f)){var c=n._displayOriginX,d=n._displayOriginY,v=n.pathData,m=v.length-1,S=v[0]-c,M=v[1]-d;s.beginPath(),s.moveTo(S,M),n.closePath||(m-=2);for(var A=2;A{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(39429),p=t(24949);r.register("polygon",function(h,o,l,n,u){return this.displayList.add(new p(this.scene,h,o,l,n,u))})},90273:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(29747),p=r,h=r;p=t(73695),h=t(38710),a.exports={renderWebGL:p,renderCanvas:h}},73695:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(10441),p=t(91296),h=t(34682),o=function(l,n,u,f){u.addToRenderList(n);var s=l.pipelines.set(n.pipeline),c=p(n,u,f),d=s.calcMatrix.copyFrom(c.calc),v=n._displayOriginX,m=n._displayOriginY,S=u.alpha*n.alpha;l.pipelines.preBatch(n),n.isFilled&&r(s,d,n,S,v,m),n.isStroked&&h(s,n,S,v,m),l.pipelines.postBatch(n)};a.exports=o},74561:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(87841),h=t(17803),o=t(95597),l=new r({Extends:h,Mixins:[o],initialize:function(u,f,s,c,d,v,m){f===void 0&&(f=0),s===void 0&&(s=0),c===void 0&&(c=128),d===void 0&&(d=128),h.call(this,u,"Rectangle",new p(0,0,c,d)),this.setPosition(f,s),this.setSize(c,d),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}});a.exports=l},48682:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(65960),p=t(75177),h=t(20926),o=function(l,n,u,f){u.addToRenderList(n);var s=l.currentContext;if(h(l,s,n,u,f)){var c=n._displayOriginX,d=n._displayOriginY;n.isFilled&&(r(s,n),s.fillRect(-c,-d,n.width,n.height)),n.isStroked&&(p(s,n),s.beginPath(),s.rect(-c,-d,n.width,n.height),s.stroke()),s.restore()}};a.exports=o},87959:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(39429),p=t(74561);r.register("rectangle",function(h,o,l,n,u,f){return this.displayList.add(new p(this.scene,h,o,l,n,u,f))})},95597:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(29747),p=r,h=r;p=t(52059),h=t(48682),a.exports={renderWebGL:p,renderCanvas:h}},52059:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(91296),p=t(34682),h=t(70554),o=function(l,n,u,f){u.addToRenderList(n);var s=l.pipelines.set(n.pipeline),c=r(n,u,f);s.calcMatrix.copyFrom(c.calc);var d=n._displayOriginX,v=n._displayOriginY,m=u.alpha*n.alpha;if(l.pipelines.preBatch(n),n.isFilled){var S=s.fillTint,M=h.getTintAppendFloatAlpha(n.fillColor,n.fillAlpha*m);S.TL=M,S.TR=M,S.BL=M,S.BR=M,s.batchFillRect(-d,-v,n.width,n.height)}n.isStroked&&p(s,n,m,d,v),l.pipelines.postBatch(n)};a.exports=o},55911:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(81991),p=t(83419),h=t(94811),o=t(17803),l=new p({Extends:o,Mixins:[r],initialize:function(u,f,s,c,d,v,m,S){f===void 0&&(f=0),s===void 0&&(s=0),c===void 0&&(c=5),d===void 0&&(d=32),v===void 0&&(v=64),o.call(this,u,"Star",null),this._points=c,this._innerRadius=d,this._outerRadius=v,this.setPosition(f,s),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,s=this._outerRadius,c=Math.PI/2*3,d=Math.PI/u,v=s,m=s;n.push(v,m+-s);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=t(65960),p=t(75177),h=t(20926),o=function(l,n,u,f){u.addToRenderList(n);var s=l.currentContext;if(h(l,s,n,u,f)){var c=n._displayOriginX,d=n._displayOriginY,v=n.pathData,m=v.length-1,S=v[0]-c,M=v[1]-d;s.beginPath(),s.moveTo(S,M),n.closePath||(m-=2);for(var A=2;A{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(55911),p=t(39429);p.register("star",function(h,o,l,n,u,f,s){return this.displayList.add(new r(this.scene,h,o,l,n,u,f,s))})},81991:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(29747),p=r,h=r;p=t(57017),h=t(64272),a.exports={renderWebGL:p,renderCanvas:h}},57017:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(10441),p=t(91296),h=t(34682),o=function(l,n,u,f){u.addToRenderList(n);var s=l.pipelines.set(n.pipeline),c=p(n,u,f),d=s.calcMatrix.copyFrom(c.calc),v=n._displayOriginX,m=n._displayOriginY,S=u.alpha*n.alpha;l.pipelines.preBatch(n),n.isFilled&&r(s,d,n,S,v,m),n.isStroked&&h(s,n,S,v,m),l.pipelines.postBatch(n)};a.exports=o},36931:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(17803),h=t(16483),o=t(96195),l=new r({Extends:p,Mixins:[o],initialize:function(u,f,s,c,d,v,m,S,M,A,C){f===void 0&&(f=0),s===void 0&&(s=0),c===void 0&&(c=0),d===void 0&&(d=128),v===void 0&&(v=64),m===void 0&&(m=0),S===void 0&&(S=128),M===void 0&&(M=128),p.call(this,u,"Triangle",new h(c,d,v,m,S,M));var w=this.geom.right-this.geom.left,P=this.geom.bottom-this.geom.top;this.setPosition(f,s),this.setSize(w,P),A!==void 0&&this.setFillStyle(A,C),this.updateDisplayOrigin(),this.updateData()},setTo:function(n,u,f,s,c,d){return this.geom.setTo(n,u,f,s,c,d),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}});a.exports=l},85172:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(65960),p=t(75177),h=t(20926),o=function(l,n,u,f){u.addToRenderList(n);var s=l.currentContext;if(h(l,s,n,u,f)){var c=n._displayOriginX,d=n._displayOriginY,v=n.geom.x1-c,m=n.geom.y1-d,S=n.geom.x2-c,M=n.geom.y2-d,A=n.geom.x3-c,C=n.geom.y3-d;s.beginPath(),s.moveTo(v,m),s.lineTo(S,M),s.lineTo(A,C),s.closePath(),n.isFilled&&(r(s,n),s.fill()),n.isStroked&&(p(s,n),s.stroke()),s.restore()}};a.exports=o},45245:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(39429),p=t(36931);r.register("triangle",function(h,o,l,n,u,f,s,c,d,v){return this.displayList.add(new p(this.scene,h,o,l,n,u,f,s,c,d,v))})},96195:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(29747),p=r,h=r;p=t(83253),h=t(85172),a.exports={renderWebGL:p,renderCanvas:h}},83253:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(91296),p=t(34682),h=t(70554),o=function(l,n,u,f){u.addToRenderList(n);var s=l.pipelines.set(n.pipeline),c=r(n,u,f);s.calcMatrix.copyFrom(c.calc);var d=n._displayOriginX,v=n._displayOriginY,m=u.alpha*n.alpha;if(l.pipelines.preBatch(n),n.isFilled){var S=s.fillTint,M=h.getTintAppendFloatAlpha(n.fillColor,n.fillAlpha*m);S.TL=M,S.TR=M,S.BL=M,S.BR=M;var A=n.geom.x1-d,C=n.geom.y1-v,w=n.geom.x2-d,P=n.geom.y2-v,L=n.geom.x3-d,O=n.geom.y3-v;s.batchFillTriangle(A,C,w,P,L,O,c.sprite,c.camera)}n.isStroked&&p(s,n,m,d,v),l.pipelines.postBatch(n)};a.exports=o},68287:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(9674),p=t(83419),h=t(31401),o=t(95643),l=t(92751),n=new p({Extends:o,Mixins:[h.Alpha,h.BlendMode,h.Depth,h.Flip,h.GetBounds,h.Mask,h.Origin,h.Pipeline,h.PostPipeline,h.ScrollFactor,h.Size,h.TextureCrop,h.Tint,h.Transform,h.Visible,l],initialize:function(f,s,c,d,v){o.call(this,f,"Sprite"),this._crop=this.resetCropObject(),this.anims=new r(this),this.setTexture(d,v),this.setPosition(s,c),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline(),this.initPostPipeline(!0)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(u,f){this.anims.update(u,f)},play:function(u,f){return this.anims.play(u,f)},playReverse:function(u,f){return this.anims.playReverse(u,f)},playAfterDelay:function(u,f){return this.anims.playAfterDelay(u,f)},playAfterRepeat:function(u,f){return this.anims.playAfterRepeat(u,f)},chain:function(u){return this.anims.chain(u)},stop:function(){return this.anims.stop()},stopAfterDelay:function(u){return this.anims.stopAfterDelay(u)},stopAfterRepeat:function(u){return this.anims.stopAfterRepeat(u)},stopOnFrame:function(u){return this.anims.stopOnFrame(u)},toJSON:function(){return h.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}});a.exports=n},76552:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p,h){p.addToRenderList(r),t.batchSprite(r,r.frame,p,h)};a.exports=y},15567:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(25305),p=t(13059),h=t(44603),o=t(23568),l=t(68287);h.register("sprite",function(n,u){n===void 0&&(n={});var f=o(n,"key",null),s=o(n,"frame",null),c=new l(this.scene,0,0,f,s);return u!==void 0&&(n.add=u),r(this.scene,c,n),p(c,n),c})},46409:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(39429),p=t(68287);r.register("sprite",function(h,o,l,n){return this.displayList.add(new p(this.scene,h,o,l,n))})},92751:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(29747),p=r,h=r;p=t(9409),h=t(76552),a.exports={renderWebGL:p,renderCanvas:h}},9409:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p,h){p.addToRenderList(r),r.pipeline.batchSprite(r,p,h)};a.exports=y},14220:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){var h=t.canvas,o=t.context,l=t.style,n=[],u=0,f=p.length;l.maxLines>0&&l.maxLines1&&(c+=t.letterSpacing*(p[s].length-1)),l.wordWrap&&(c-=o.measureText(" ").width),n[s]=Math.ceil(c),u=Math.max(u,n[s])}var d=r.fontSize+l.strokeThickness,v=d*f,m=t.lineSpacing;return f>1&&(v+=m*(f-1)),{width:u,height:v,lines:f,lineWidths:n,lineSpacing:m,lineHeight:d}};a.exports=y},79557:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(27919),p=function(h){var o=r.create(this),l=o.getContext("2d",{willReadFrequently:!0});h.syncFont(o,l);var n=l.measureText(h.testString);if("actualBoundingBoxAscent"in n){var u=n.actualBoundingBoxAscent,f=n.actualBoundingBoxDescent;return r.remove(o),{ascent:u,descent:f,fontSize:u+f}}var s=Math.ceil(n.width*h.baselineX),c=s,d=2*c;c=c*h.baselineY|0,o.width=s,o.height=d,l.fillStyle="#f00",l.fillRect(0,0,s,d),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,s,d);if(!m)return v.ascent=c,v.descent=c+6,v.fontSize=v.ascent+v.descent,r.remove(o),v;var S=m.data,M=S.length,A=s*4,C,w,P=0,L=!1;for(C=0;Cc;C--){for(w=0;w{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(40366),p=t(27919),h=t(83419),o=t(31401),l=t(95643),n=t(14220),u=t(35154),f=t(35846),s=t(61771),c=t(35762),d=t(45650),v=new h({Extends:l,Mixins:[o.Alpha,o.BlendMode,o.ComputedSize,o.Crop,o.Depth,o.Flip,o.GetBounds,o.Mask,o.Origin,o.Pipeline,o.PostPipeline,o.ScrollFactor,o.Tint,o.Transform,o.Visible,s],initialize:function(S,M,A,C,w){M===void 0&&(M=0),A===void 0&&(A=0),l.call(this,S,"Text"),this.renderer=S.sys.renderer,this.setPosition(M,A),this.setOrigin(0,0),this.initPipeline(),this.initPostPipeline(!0),this.canvas=p.create(this),this.context,this.style=new c(this,w),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=d(),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),w&&w.padding&&this.setPadding(w.padding),w&&w.lineSpacing&&this.setLineSpacing(w.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 A="",C=m.replace(/ +/gi," ").split(this.splitRegExp),w=C.length,P=0;PD){if(G===0){for(var J=W;J.length&&(J=J.slice(0,-1),k=S.measureText(J).width,!(k<=D)););if(!J.length)throw new Error("wordWrapWidth < a single character");var Q=z.substr(J.length);B[G]=Q,O+=J}var Y=B[G].length?G:G+1,K=B.slice(Y).join(" ").replace(/[ \n]*$/gi,"");C.splice(P+1,0,K),w=C.length;break}else O+=W,D-=k}A+=O.replace(/[ \n]*$/gi,"")+` +`}return A=A.replace(/[\s|\n]*$/gi,""),A},basicWordWrap:function(m,S,M){for(var A="",C=m.split(this.splitRegExp),w=C.length-1,P=S.measureText(" ").width,L=0;L<=w;L++){for(var O=M,I=C[L].split(" "),D=I.length-1,B=0;B<=D;B++){var G=I[B],z=S.measureText(G).width,W=z;BO&&B>0&&(A+=` +`,O=M),A+=G,B0&&(z+=L.lineSpacing*W),M.rtl)G=D-G-O.left-O.right;else if(M.align==="right")G+=I-L.lineWidths[W];else if(M.align==="center")G+=(I-L.lineWidths[W])/2;else if(M.align==="justify"){var k=.85;if(L.lineWidths[W]/L.width>=k){var J=L.width-L.lineWidths[W],Q=S.measureText(" ").width,Y=P[W].trim(),K=Y.split(" ");J+=(P[W].length-Y.length)*Q;for(var U=Math.floor(J/Q),V=0;U>0;)K[V]+=" ",V=(V+1)%(K.length-1||1),--U;P[W]=K.join(" ")}}if(this.autoRound&&(G=Math.round(G),z=Math.round(z)),M.strokeThickness&&(M.syncShadow(S,M.shadowStroke),S.strokeText(P[W],G,z)),M.color){M.syncShadow(S,M.shadowFill);var j=this.letterSpacing;if(j!==0)for(var $=0,q=P[W].split(""),it=0;it{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p,h){r.width===0||r.height===0||(p.addToRenderList(r),t.batchSprite(r,r.frame,p,h))};a.exports=y},71259:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(25305),p=t(44603),h=t(23568),o=t(50171);p.register("text",function(l,n){l===void 0&&(l={});var u=h(l,"text",""),f=h(l,"style",null),s=h(l,"padding",null);s!==null&&(f.padding=s);var c=new o(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:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(50171),p=t(39429);p.register("text",function(h,o,l,n){return this.displayList.add(new r(this.scene,h,o,l,n))})},61771:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(29747),p=r,h=r;p=t(34397),h=t(79724),a.exports={renderWebGL:p,renderCanvas:h}},35762:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(23568),h=t(35154),o=t(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,s){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(s,!1,!0)},setStyle:function(u,f,s){f===void 0&&(f=!0),s===void 0&&(s=!1),u&&u.hasOwnProperty("fontSize")&&typeof u.fontSize=="number"&&(u.fontSize=u.fontSize.toString()+"px");for(var c in l){var d=s?l[c][1]:this[c];c==="wordWrapCallback"||c==="wordWrapCallbackScope"?this[c]=h(u,l[c][0],d):this[c]=p(u,l[c][0],d)}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=o(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=o(this)),this.parent.updateText()},setFont:function(u,f){f===void 0&&(f=!0);var s=u,c="",d="";if(typeof u!="string")s=h(u,"fontFamily","Courier"),c=h(u,"fontSize","16px"),d=h(u,"fontStyle","");else{var v=u.split(" "),m=0;d=v.length>2?v[m++]:"",c=v[m++]||"16px",s=v[m++]||"Courier"}return(s!==this.fontFamily||c!==this.fontSize||d!==this.fontStyle)&&(this.fontFamily=s,this.fontSize=c,this.fontStyle=d,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,s,c,d,v){return u===void 0&&(u=0),f===void 0&&(f=0),s===void 0&&(s="#000"),c===void 0&&(c=0),d===void 0&&(d=!1),v===void 0&&(v=!0),this.shadowOffsetX=u,this.shadowOffsetY=f,this.shadowColor=s,this.shadowBlur=c,this.shadowStroke=d,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}});a.exports=n},34397:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(70554),p=function(h,o,l,n){if(!(o.width===0||o.height===0)){l.addToRenderList(o);var u=o.frame,f=u.width,s=u.height,c=r.getTintAppendFloatAlpha,d=h.pipelines.set(o.pipeline,o),v=d.setTexture2D(u.glTexture,o);d.batchTexture(o,u.glTexture,f,s,o.x,o.y,f/o.style.resolution,s/o.style.resolution,o.scaleX,o.scaleY,o.rotation,o.flipX,o.flipY,o.scrollFactorX,o.scrollFactorY,o.displayOriginX,o.displayOriginY,0,0,f,s,c(o.tintTopLeft,l.alpha*o._alphaTL),c(o.tintTopRight,l.alpha*o._alphaTR),c(o.tintBottomLeft,l.alpha*o._alphaBL),c(o.tintBottomRight,l.alpha*o._alphaBR),o.tintFill,0,0,l,n,!1,v)}};a.exports=p},20839:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(27919),p=t(83419),h=t(31401),o=t(95643),l=t(98439),n=t(68703),u=t(56295),f=t(45650),s=t(26099),c=8,d=new p({Extends:o,Mixins:[h.Alpha,h.BlendMode,h.ComputedSize,h.Crop,h.Depth,h.Flip,h.GetBounds,h.Mask,h.Origin,h.Pipeline,h.PostPipeline,h.ScrollFactor,h.Tint,h.Transform,h.Visible,u],initialize:function(m,S,M,A,C,w,P){var L=m.sys.renderer;o.call(this,m,"TileSprite");var O=m.sys.textures.get(w),I=O.get(P);I.source.compressionAlgorithm&&(console.warn("TileSprite cannot use compressed texture"),O=m.sys.textures.get("__MISSING"),I=O.get()),O.type==="DynamicTexture"&&(console.warn("TileSprite cannot use Dynamic Texture"),O=m.sys.textures.get("__MISSING"),I=O.get()),!A||!C?(A=I.width,C=I.height):(A=Math.floor(A),C=Math.floor(C)),this._tilePosition=new s,this._tileScale=new s(1,1),this.dirty=!1,this.renderer=L,this.canvas=r.create(this,A,C),this.context=this.canvas.getContext("2d",{willReadFrequently:!1}),this.displayTexture=O,this.displayFrame=I,this._crop=this.resetCropObject(),this._textureKey=f(),this.texture=m.sys.textures.addCanvas(this._textureKey,this.canvas),this.frame=this.texture.get(),this.potWidth=l(I.width),this.potHeight=l(I.height),this.fillCanvas=r.create2D(this,this.potWidth,this.potHeight),this.fillContext=this.fillCanvas.getContext("2d",{willReadFrequently:!1}),this.fillPattern=null,this.setPosition(S,M),this.setSize(A,C),this.setFrame(P),this.setOriginFromFrame(),this.initPipeline(),this.initPostPipeline(!0)},setTexture:function(v,m){return this.displayTexture=this.scene.sys.textures.get(v),this.setFrame(m)},setFrame:function(v){var m=this.displayTexture.get(v);return this.potWidth=l(m.width),this.potHeight=l(m.height),this.canvas.width=0,!m.cutWidth||!m.cutHeight?this.renderFlags&=~c:this.renderFlags|=c,this.displayFrame=m,this.dirty=!0,this.updateTileTexture(),this},setTilePosition:function(v,m){return v!==void 0&&(this.tilePositionX=v),m!==void 0&&(this.tilePositionY=m),this},setTileScale:function(v,m){return v===void 0&&(v=this.tileScaleX),m===void 0&&(m=v),this.tileScaleX=v,this.tileScaleY=m,this},updateTileTexture:function(){if(!(!this.dirty||!this.renderer)){var v=this.displayFrame;if(v.source.isRenderTexture||v.source.isGLTexture){console.warn("TileSprites can only use Image or Canvas based textures"),this.dirty=!1;return}var m=this.fillContext,S=this.fillCanvas,M=this.potWidth,A=this.potHeight;(!this.renderer||!this.renderer.gl)&&(M=v.cutWidth,A=v.cutHeight),m.clearRect(0,0,M,A),S.width=M,S.height=A,m.drawImage(v.source.image,v.cutX,v.cutY,v.cutWidth,v.cutHeight,0,0,M,A),this.renderer&&this.renderer.gl?this.fillPattern=this.renderer.canvasToTexture(S,this.fillPattern):this.fillPattern=m.createPattern(S,"repeat"),this.updateCanvas(),this.dirty=!1}},updateCanvas:function(){var v=this.canvas;if((v.width!==this.width||v.height!==this.height)&&(v.width=this.width,v.height=this.height,this.frame.setSize(this.width,this.height),this.updateDisplayOrigin(),this.dirty=!0),!this.dirty||this.renderer&&this.renderer.gl){this.dirty=!1;return}var m=this.context;this.scene.sys.game.config.antialias||n.disable(m);var S=this._tileScale.x,M=this._tileScale.y,A=this._tilePosition.x,C=this._tilePosition.y;m.clearRect(0,0,this.width,this.height),m.save(),m.scale(S,M),m.translate(-A,-C),m.fillStyle=this.fillPattern,m.fillRect(A,C,this.width/S,this.height/M),m.restore(),this.dirty=!1},preDestroy:function(){this.renderer&&this.renderer.gl&&this.renderer.deleteTexture(this.fillPattern),r.remove(this.canvas),r.remove(this.fillCanvas),this.fillPattern=null,this.fillContext=null,this.fillCanvas=null,this.displayTexture=null,this.displayFrame=null;var v=this.texture;v&&v.destroy(),this.renderer=null},tilePositionX:{get:function(){return this._tilePosition.x},set:function(v){this._tilePosition.x=v,this.dirty=!0}},tilePositionY:{get:function(){return this._tilePosition.y},set:function(v){this._tilePosition.y=v,this.dirty=!0}},tileScaleX:{get:function(){return this._tileScale.x},set:function(v){this._tileScale.x=v,this.dirty=!0}},tileScaleY:{get:function(){return this._tileScale.y},set:function(v){this._tileScale.y=v,this.dirty=!0}}});a.exports=d},46992:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p,h){r.updateCanvas(),p.addToRenderList(r),t.batchSprite(r,r.frame,p,h)};a.exports=y},14167:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(25305),p=t(44603),h=t(23568),o=t(20839);p.register("tileSprite",function(l,n){l===void 0&&(l={});var u=h(l,"x",0),f=h(l,"y",0),s=h(l,"width",512),c=h(l,"height",512),d=h(l,"key",""),v=h(l,"frame",""),m=new o(this.scene,u,f,s,c,d,v);return n!==void 0&&(l.add=n),r(this.scene,m,l),m})},91681:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(20839),p=t(39429);p.register("tileSprite",function(h,o,l,n,u,f){return this.displayList.add(new r(this.scene,h,o,l,n,u,f))})},56295:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(29747),p=r,h=r;p=t(18553),h=t(46992),a.exports={renderWebGL:p,renderCanvas:h}},18553:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(70554),p=function(h,o,l,n){o.updateCanvas();var u=o.width,f=o.height;if(!(u===0||f===0)){l.addToRenderList(o);var s=r.getTintAppendFloatAlpha,c=h.pipelines.set(o.pipeline,o),d=c.setTexture2D(o.fillPattern,o);c.batchTexture(o,o.fillPattern,o.displayFrame.width*o.tileScaleX,o.displayFrame.height*o.tileScaleY,o.x,o.y,u,f,o.scaleX,o.scaleY,o.rotation,o.flipX,o.flipY,o.scrollFactorX,o.scrollFactorY,o.originX*u,o.originY*f,0,0,u,f,s(o.tintTopLeft,l.alpha*o._alphaTL),s(o.tintTopRight,l.alpha*o._alphaTR),s(o.tintBottomLeft,l.alpha*o._alphaBL),s(o.tintBottomRight,l.alpha*o._alphaBR),o.tintFill,o.tilePositionX%o.displayFrame.width/o.displayFrame.width,o.tilePositionY%o.displayFrame.height/o.displayFrame.height,l,n,!1,d)}};a.exports=p},18471:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(45319),p=t(83419),h=t(31401),o=t(51708),l=t(8443),n=t(95643),u=t(36383),f=t(14463),s=t(45650),c=t(10247),d=new p({Extends:n,Mixins:[h.Alpha,h.BlendMode,h.ComputedSize,h.Depth,h.Flip,h.GetBounds,h.Mask,h.Origin,h.Pipeline,h.PostPipeline,h.ScrollFactor,h.TextureCrop,h.Tint,h.Transform,h.Visible,c],initialize:function(m,S,M,A){n.call(this,m,"Video"),this.video,this.videoTexture,this.videoTextureSource,this.snapshotTexture,this.flipY=!1,this._key=s(),this.touchLocked=!1,this.playWhenUnlocked=!1,this.frameReady=!1,this.isStalled=!1,this.failedPlayAttempts=0,this.metadata,this.retry=0,this.retryInterval=500,this._systemMuted=!1,this._codeMuted=!1,this._systemPaused=!1,this._codePaused=!1,this._callbacks={ended:this.completeHandler.bind(this),legacy:this.legacyPlayHandler.bind(this),playing:this.playingHandler.bind(this),seeked:this.seekedHandler.bind(this),seeking:this.seekingHandler.bind(this),stalled:this.stalledHandler.bind(this),suspend:this.stalledHandler.bind(this),waiting:this.stalledHandler.bind(this)},this._loadCallbackHandler=this.loadErrorHandler.bind(this),this._metadataCallbackHandler=this.metadataHandler.bind(this),this._crop=this.resetCropObject(),this.markers={},this._markerIn=0,this._markerOut=0,this._playingMarker=!1,this._lastUpdate=0,this.cacheKey="",this.isSeeking=!1,this._playCalled=!1,this._rfvCallbackId=0;var C=m.sys.game;this._device=C.device.video,this.setPosition(S,M),this.setSize(256,256),this.initPipeline(),this.initPostPipeline(!0),C.events.on(l.PAUSE,this.globalPause,this),C.events.on(l.RESUME,this.globalResume,this);var w=m.sys.sound;w&&w.on(f.GLOBAL_MUTE,this.globalMute,this),A&&this.load(A)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},load:function(v){var m=this.scene.sys.cache.video.get(v);return m?(this.cacheKey=v,this.loadHandler(m.url,m.noAudio,m.crossOrigin)):console.warn("No video in cache for key: "+v),this},changeSource:function(v,m,S,M,A){m===void 0&&(m=!0),S===void 0&&(S=!1),this.cacheKey!==v&&(this.load(v),m&&this.play(S,M,A))},getVideoKey:function(){return this.cacheKey},loadURL:function(v,m,S){m===void 0&&(m=!1);var M=this._device.getVideoURL(v);return M?(this.cacheKey="",this.loadHandler(M.url,m,S)):console.warn("No supported video format found for "+v),this},loadMediaStream:function(v,m,S){return this.loadHandler(null,m,S,v)},loadHandler:function(v,m,S,M){m||(m=!1);var A=this.video;if(A?(this.removeLoadEventHandlers(),this.stop()):(A=document.createElement("video"),A.controls=!1,A.setAttribute("playsinline","playsinline"),A.setAttribute("preload","auto"),A.setAttribute("disablePictureInPicture","true")),m?(A.muted=!0,A.defaultMuted=!0,A.setAttribute("autoplay","autoplay")):(A.muted=!1,A.defaultMuted=!1,A.removeAttribute("autoplay")),S?A.setAttribute("crossorigin",S):A.removeAttribute("crossorigin"),M)if("srcObject"in A)try{A.srcObject=M}catch(w){if(w.name!=="TypeError")throw w;A.src=URL.createObjectURL(M)}else A.src=URL.createObjectURL(M);else A.src=v;this.retry=0,this.video=A,this._playCalled=!1,A.load(),this.addLoadEventHandlers();var C=this.scene.sys.textures.get(this._key);return this.setTexture(C),this},requestVideoFrame:function(v,m){var S=this.video;if(S){var M=m.width,A=m.height,C=this.videoTexture,w=this.videoTextureSource,P=!C||w.source!==S;P?(this._codePaused=S.paused,this._codeMuted=S.muted,C?(w.source=S,w.width=M,w.height=A,C.get().setSize(M,A)):(C=this.scene.sys.textures.create(this._key,S,M,A),C.add("__BASE",0,0,0,M,A),this.setTexture(C),this.videoTexture=C,this.videoTextureSource=C.source[0],this.videoTextureSource.setFlipY(this.flipY),this.emit(o.VIDEO_TEXTURE,this,C)),this.setSizeToFrame(),this.updateDisplayOrigin()):w.update(),this.isStalled=!1,this.metadata=m;var L=m.mediaTime;P&&(this._lastUpdate=L,this.emit(o.VIDEO_CREATED,this,M,A),this.frameReady||(this.frameReady=!0,this.emit(o.VIDEO_PLAY,this))),this._playingMarker?L>=this._markerOut&&(S.loop?(S.currentTime=this._markerIn,this.emit(o.VIDEO_LOOP,this)):(this.stop(!1),this.emit(o.VIDEO_COMPLETE,this))):L-1&&S>m&&S=0&&!isNaN(S)&&S>m&&(this.markers[v]=[m,S]),this},playMarker:function(v,m){var S=this.markers[v];return S&&this.play(m,S[0],S[1]),this},removeMarker:function(v){return delete this.markers[v],this},snapshot:function(v,m){return v===void 0&&(v=this.width),m===void 0&&(m=this.height),this.snapshotArea(0,0,this.width,this.height,v,m)},snapshotArea:function(v,m,S,M,A,C){v===void 0&&(v=0),m===void 0&&(m=0),S===void 0&&(S=this.width),M===void 0&&(M=this.height),A===void 0&&(A=S),C===void 0&&(C=M);var w=this.video,P=this.snapshotTexture;return P?(P.setSize(A,C),w&&P.context.drawImage(w,v,m,S,M,0,0,A,C)):(P=this.scene.sys.textures.createCanvas(s(),A,C),this.snapshotTexture=P,w&&P.context.drawImage(w,v,m,S,M,0,0,A,C)),P.update()},saveSnapshotTexture:function(v){return this.snapshotTexture?this.scene.sys.textures.renameTexture(this.snapshotTexture.key,v):this.snapshotTexture=this.scene.sys.textures.createCanvas(v,this.width,this.height),this.snapshotTexture},playSuccess:function(){if(this._playCalled){this.addEventHandlers(),this._codePaused=!1,this.touchLocked&&(this.touchLocked=!1,this.emit(o.VIDEO_UNLOCKED,this));var v=this.scene.sys.sound;v&&v.mute&&this.setMute(!0),this._markerIn>-1&&(this.video.currentTime=this._markerIn)}},playError:function(v){var m=v.name;m==="NotAllowedError"?(this.touchLocked=!0,this.playWhenUnlocked=!0,this.failedPlayAttempts=1,this.emit(o.VIDEO_LOCKED,this)):m==="NotSupportedError"?(this.stop(!1),this.emit(o.VIDEO_UNSUPPORTED,this,v)):(this.stop(!1),this.emit(o.VIDEO_ERROR,this,v))},legacyPlayHandler:function(){var v=this.video;v&&(this.playSuccess(),v.removeEventListener("playing",this._callbacks.legacy))},playingHandler:function(){this.isStalled=!1,this.emit(o.VIDEO_PLAYING,this)},loadErrorHandler:function(v){this.stop(!1),this.emit(o.VIDEO_ERROR,this,v)},metadataHandler:function(v){this.emit(o.VIDEO_METADATA,this,v)},setSizeToFrame:function(v){v||(v=this.frame),this.width=v.realWidth,this.height=v.realHeight,this.scaleX!==1&&(this.scaleX=this.displayWidth/this.width),this.scaleY!==1&&(this.scaleY=this.displayHeight/this.height);var m=this.input;return m&&!m.customHitArea&&(m.hitArea.width=this.width,m.hitArea.height=this.height),this},stalledHandler:function(v){this.isStalled=!0,this.emit(o.VIDEO_STALLED,this,v)},completeHandler:function(){this._playCalled=!1,this.emit(o.VIDEO_COMPLETE,this)},preUpdate:function(v,m){var S=this.video;!S||!this._playCalled||this.touchLocked&&this.playWhenUnlocked&&(this.retry+=m,this.retry>=this.retryInterval&&(this.createPlayPromise(!1),this.retry=0))},seekTo:function(v){var m=this.video;if(m){var S=m.duration;if(S!==1/0&&!isNaN(S)){var M=S*v;this.setCurrentTime(M)}}return this},getCurrentTime:function(){return this.video?this.video.currentTime:0},setCurrentTime:function(v){var m=this.video;if(m){if(typeof v=="string"){var S=v[0],M=parseFloat(v.substr(1));S==="+"?v=m.currentTime+M:S==="-"&&(v=m.currentTime-M)}m.currentTime=v}return this},seekingHandler:function(){this.isSeeking=!0,this.emit(o.VIDEO_SEEKING,this)},seekedHandler:function(){this.isSeeking=!1,this.emit(o.VIDEO_SEEKED,this)},getProgress:function(){var v=this.video;if(v){var m=v.duration;if(m!==1/0&&!isNaN(m))return v.currentTime/m}return-1},getDuration:function(){return this.video?this.video.duration:0},setMute:function(v){v===void 0&&(v=!0),this._codeMuted=v;var m=this.video;return m&&(m.muted=this._systemMuted?!0:v),this},isMuted:function(){return this._codeMuted},globalMute:function(v,m){this._systemMuted=m;var S=this.video;S&&(S.muted=this._codeMuted?!0:m)},globalPause:function(){this._systemPaused=!0,this.video&&!this.video.ended&&(this.removeEventHandlers(),this.video.pause())},globalResume:function(){this._systemPaused=!1,this.video&&!this._codePaused&&!this.video.ended&&this.createPlayPromise()},setPaused:function(v){v===void 0&&(v=!0);var m=this.video;return this._codePaused=v,m&&!m.ended&&(v?m.paused||(this.removeEventHandlers(),m.pause()):v||(this._playCalled?m.paused&&!this._systemPaused&&this.createPlayPromise():this.play())),this},pause:function(){return this.setPaused(!0)},resume:function(){return this.setPaused(!1)},getVolume:function(){return this.video?this.video.volume:1},setVolume:function(v){return v===void 0&&(v=1),this.video&&(this.video.volume=r(v,0,1)),this},getPlaybackRate:function(){return this.video?this.video.playbackRate:1},setPlaybackRate:function(v){return this.video&&(this.video.playbackRate=v),this},getLoop:function(){return this.video?this.video.loop:!1},setLoop:function(v){return v===void 0&&(v=!0),this.video&&(this.video.loop=v),this},isPlaying:function(){return this.video?!(this.video.paused||this.video.ended):!1},isPaused:function(){return this.video&&this._playCalled&&this.video.paused||this._codePaused||this._systemPaused},saveTexture:function(v,m){return m===void 0&&(m=!1),this.videoTexture&&(this.scene.sys.textures.renameTexture(this._key,v),this.videoTextureSource.setFlipY(m)),this._key=v,this.flipY=m,!!this.videoTexture},stop:function(v){v===void 0&&(v=!0);var m=this.video;return m&&(this.removeEventHandlers(),m.cancelVideoFrameCallback(this._rfvCallbackId),m.pause()),this.retry=0,this._playCalled=!1,v&&this.emit(o.VIDEO_STOP,this),this},removeVideoElement:function(){var v=this.video;if(v){for(v.parentNode&&v.parentNode.removeChild(v);v.hasChildNodes();)v.removeChild(v.firstChild);v.removeAttribute("autoplay"),v.removeAttribute("src"),this.video=null}},preDestroy:function(){this.stop(!1),this.removeLoadEventHandlers(),this.removeVideoElement();var v=this.scene.sys.game.events;v.off(l.PAUSE,this.globalPause,this),v.off(l.RESUME,this.globalResume,this);var m=this.scene.sys.sound;m&&m.off(f.GLOBAL_MUTE,this.globalMute,this)}});a.exports=d},58352:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p,h){r.videoTexture&&(p.addToRenderList(r),t.batchSprite(r,r.frame,p,h))};a.exports=y},11511:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(25305),p=t(44603),h=t(23568),o=t(18471);p.register("video",function(l,n){l===void 0&&(l={});var u=h(l,"key",null),f=new o(this.scene,0,0,u);return n!==void 0&&(l.add=n),r(this.scene,f,l),f})},89025:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(18471),p=t(39429);p.register("video",function(h,o,l){return this.displayList.add(new r(this.scene,h,o,l))})},10247:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(29747),p=r,h=r;p=t(29849),h=t(58352),a.exports={renderWebGL:p,renderCanvas:h}},29849:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p,h){r.videoTexture&&(p.addToRenderList(r),r.pipeline.batchSprite(r,p,h))};a.exports=y},41481:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(10312),p=t(96503),h=t(87902),o=t(83419),l=t(31401),n=t(95643),u=t(87841),f=t(37303),s=new o({Extends:n,Mixins:[l.Depth,l.GetBounds,l.Origin,l.Transform,l.ScrollFactor,l.Visible],initialize:function(d,v,m,S,M){S===void 0&&(S=1),M===void 0&&(M=S),n.call(this,d,"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,d,v){v===void 0&&(v=!0),this.width=c,this.height=d,this.updateDisplayOrigin();var m=this.input;return v&&m&&!m.customHitArea&&(m.hitArea.width=c,m.hitArea.height=d),this},setDisplaySize:function(c,d){return this.displayWidth=c,this.displayHeight=d,this},setCircleDropZone:function(c){return this.setDropZone(new p(0,0,c),h)},setRectangleDropZone:function(c,d){return this.setDropZone(new u(0,0,c,d),f)},setDropZone:function(c,d){return this.input||this.setInteractive(c,d,!0),this},setAlpha:function(){},setBlendMode:function(){},renderCanvas:function(c,d,v){v.addToRenderList(d)},renderWebGL:function(c,d,v){v.addToRenderList(d)}});a.exports=s},95261:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(44603),p=t(23568),h=t(41481);r.register("zone",function(o){var l=p(o,"x",0),n=p(o,"y",0),u=p(o,"width",1),f=p(o,"height",u);return new h(this.scene,l,n,u,f)})},84175:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(41481),p=t(39429);p.register("zone",function(h,o,l,n){return this.displayList.add(new r(this.scene,h,o,l,n))})},95166:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return t.radius>0?Math.PI*t.radius*t.radius:0};a.exports=y},96503:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(87902),h=t(26241),o=t(79124),l=t(23777),n=t(28176),u=new r({initialize:function(s,c,d){s===void 0&&(s=0),c===void 0&&(c=0),d===void 0&&(d=0),this.type=l.CIRCLE,this.x=s,this.y=c,this._radius=d,this._diameter=d*2},contains:function(f,s){return p(this,f,s)},getPoint:function(f,s){return h(this,f,s)},getPoints:function(f,s,c){return o(this,f,s,c)},getRandomPoint:function(f){return n(this,f)},setTo:function(f,s,c){return this.x=f,this.y=s,this._radius=c,this._diameter=c*2,this},setEmpty:function(){return this._radius=0,this._diameter=0,this},setPosition:function(f,s){return s===void 0&&(s=f),this.x=f,this.y=s,this},isEmpty:function(){return this._radius<=0},radius:{get:function(){return this._radius},set:function(f){this._radius=f,this._diameter=f*2}},diameter:{get:function(){return this._diameter},set:function(f){this._diameter=f,this._radius=f*.5}},left:{get:function(){return this.x-this._radius},set:function(f){this.x=f+this._radius}},right:{get:function(){return this.x+this._radius},set:function(f){this.x=f-this._radius}},top:{get:function(){return this.y-this._radius},set:function(f){this.y=f+this._radius}},bottom:{get:function(){return this.y+this._radius},set:function(f){this.y=f-this._radius}}});a.exports=u},71562:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return 2*(Math.PI*t.radius)};a.exports=y},92110:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(2141),p=function(h,o,l){return l===void 0&&(l=new r),l.x=h.x+h.radius*Math.cos(o),l.y=h.y+h.radius*Math.sin(o),l};a.exports=p},42250:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(96503),p=function(h){return new r(h.x,h.y,h.radius)};a.exports=p},87902:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){if(t.radius>0&&r>=t.left&&r<=t.right&&p>=t.top&&p<=t.bottom){var h=(t.x-r)*(t.x-r),o=(t.y-p)*(t.y-p);return h+o<=t.radius*t.radius}else return!1};a.exports=y},5698:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(87902),p=function(h,o){return r(h,o.x,o.y)};a.exports=p},70588:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(87902),p=function(h,o){return r(h,o.x,o.y)&&r(h,o.right,o.y)&&r(h,o.x,o.bottom)&&r(h,o.right,o.bottom)};a.exports=p},26394:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){return r.setTo(t.x,t.y,t.radius)};a.exports=y},76278:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){return t.x===r.x&&t.y===r.y&&t.radius===r.radius};a.exports=y},2074:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(87841),p=function(h,o){return o===void 0&&(o=new r),o.x=h.left,o.y=h.top,o.width=h.diameter,o.height=h.diameter,o};a.exports=p},26241:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(92110),p=t(62945),h=t(36383),o=t(2141),l=function(n,u,f){f===void 0&&(f=new o);var s=p(u,0,h.PI2);return r(n,s,f)};a.exports=l},79124:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(71562),p=t(92110),h=t(62945),o=t(36383),l=function(n,u,f,s){s===void 0&&(s=[]),!u&&f>0&&(u=r(n)/f);for(var c=0;c{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){return t.x+=r,t.y+=p,t};a.exports=y},39212:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){return t.x+=r.x,t.y+=r.y,t};a.exports=y},28176:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(2141),p=function(h,o){o===void 0&&(o=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),s=u*Math.sin(l);return o.x=h.x+f*h.radius,o.y=h.y+s*h.radius,o};a.exports=p},88911:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(96503);r.Area=t(95166),r.Circumference=t(71562),r.CircumferencePoint=t(92110),r.Clone=t(42250),r.Contains=t(87902),r.ContainsPoint=t(5698),r.ContainsRect=t(70588),r.CopyFrom=t(26394),r.Equals=t(76278),r.GetBounds=t(2074),r.GetPoint=t(26241),r.GetPoints=t(79124),r.Offset=t(50884),r.OffsetPoint=t(39212),r.Random=t(28176),a.exports=r},23777:a=>{/** + * @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};a.exports=y},78874:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return t.isEmpty()?0:t.getMajorRadius()*t.getMinorRadius()*Math.PI};a.exports=y},92990:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){var r=t.width/2,p=t.height/2,h=Math.pow(r-p,2)/Math.pow(r+p,2);return Math.PI*(r+p)*(1+3*h/(10+Math.sqrt(4-3*h)))};a.exports=y},79522:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(2141),p=function(h,o,l){l===void 0&&(l=new r);var n=h.width/2,u=h.height/2;return l.x=h.x+n*Math.cos(o),l.y=h.y+u*Math.sin(o),l};a.exports=p},58102:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(8497),p=function(h){return new r(h.x,h.y,h.width,h.height)};a.exports=p},81154:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){if(t.width<=0||t.height<=0)return!1;var h=(r-t.x)/t.width,o=(p-t.y)/t.height;return h*=h,o*=o,h+o<.25};a.exports=y},46662:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(81154),p=function(h,o){return r(h,o.x,o.y)};a.exports=p},1632:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(81154),p=function(h,o){return r(h,o.x,o.y)&&r(h,o.right,o.y)&&r(h,o.x,o.bottom)&&r(h,o.right,o.bottom)};a.exports=p},65534:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){return r.setTo(t.x,t.y,t.width,t.height)};a.exports=y},8497:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(81154),h=t(90549),o=t(48320),l=t(23777),n=t(24820),u=new r({initialize:function(s,c,d,v){s===void 0&&(s=0),c===void 0&&(c=0),d===void 0&&(d=0),v===void 0&&(v=0),this.type=l.ELLIPSE,this.x=s,this.y=c,this.width=d,this.height=v},contains:function(f,s){return p(this,f,s)},getPoint:function(f,s){return h(this,f,s)},getPoints:function(f,s,c){return o(this,f,s,c)},getRandomPoint:function(f){return n(this,f)},setTo:function(f,s,c,d){return this.x=f,this.y=s,this.width=c,this.height=d,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(f,s){return s===void 0&&(s=f),this.x=f,this.y=s,this},setSize:function(f,s){return s===void 0&&(s=f),this.width=f,this.height=s,this},isEmpty:function(){return this.width<=0||this.height<=0},getMinorRadius:function(){return Math.min(this.width,this.height)/2},getMajorRadius:function(){return Math.max(this.width,this.height)/2},left:{get:function(){return this.x-this.width/2},set:function(f){this.x=f+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(f){this.x=f-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(f){this.y=f+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(f){this.y=f-this.height/2}}});a.exports=u},36146:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){return t.x===r.x&&t.y===r.y&&t.width===r.width&&t.height===r.height};a.exports=y},23694:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(87841),p=function(h,o){return o===void 0&&(o=new r),o.x=h.left,o.y=h.top,o.width=h.width,o.height=h.height,o};a.exports=p},90549:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(79522),p=t(62945),h=t(36383),o=t(2141),l=function(n,u,f){f===void 0&&(f=new o);var s=p(u,0,h.PI2);return r(n,s,f)};a.exports=l},48320:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(92990),p=t(79522),h=t(62945),o=t(36383),l=function(n,u,f,s){s===void 0&&(s=[]),!u&&f>0&&(u=r(n)/f);for(var c=0;c{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){return t.x+=r,t.y+=p,t};a.exports=y},44808:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){return t.x+=r.x,t.y+=r.y,t};a.exports=y},24820:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(2141),p=function(h,o){o===void 0&&(o=new r);var l=Math.random()*Math.PI*2,n=Math.sqrt(Math.random());return o.x=h.x+n*Math.cos(l)*h.width/2,o.y=h.y+n*Math.sin(l)*h.height/2,o};a.exports=p},49203:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(8497);r.Area=t(78874),r.Circumference=t(92990),r.CircumferencePoint=t(79522),r.Clone=t(58102),r.Contains=t(81154),r.ContainsPoint=t(46662),r.ContainsRect=t(1632),r.CopyFrom=t(65534),r.Equals=t(36146),r.GetBounds=t(23694),r.GetPoint=t(90549),r.GetPoints=t(48320),r.Offset=t(73424),r.OffsetPoint=t(44808),r.Random=t(24820),a.exports=r},55738:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(23777),p=t(79291),h={Circle:t(88911),Ellipse:t(49203),Intersects:t(91865),Line:t(2529),Mesh:t(73090),Point:t(43711),Polygon:t(58423),Rectangle:t(93232),Triangle:t(84435)};h=p(!1,h,r),a.exports=h},2044:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(20339),p=function(h,o){return r(h.x,h.y,o.x,o.y)<=h.radius+o.radius};a.exports=p},81491:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){var p=r.width/2,h=r.height/2,o=Math.abs(t.x-r.x-p),l=Math.abs(t.y-r.y-h),n=p+t.radius,u=h+t.radius;if(o>n||l>u)return!1;if(o<=p||l<=h)return!0;var f=o-p,s=l-h,c=f*f,d=s*s,v=t.radius*t.radius;return c+d<=v};a.exports=y},63376:(a,y,t)=>{/** + * @author Florian Vazelle + * @author Geoffrey Glaive + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(2141),p=t(2044),h=function(o,l,n){if(n===void 0&&(n=[]),p(o,l)){var u=o.x,f=o.y,s=o.radius,c=l.x,d=l.y,v=l.radius,m,S,M,A,C;if(f===d)C=(v*v-s*s-c*c+u*u)/(2*(u-c)),m=1,S=-2*d,M=c*c+C*C-2*c*C+d*d-v*v,A=S*S-4*m*M,A===0?n.push(new r(C,-S/(2*m))):A>0&&(n.push(new r(C,(-S+Math.sqrt(A))/(2*m))),n.push(new r(C,(-S-Math.sqrt(A))/(2*m))));else{var w=(u-c)/(f-d),P=(v*v-s*s-c*c+u*u-d*d+f*f)/(2*(f-d));m=w*w+1,S=2*f*w-2*P*w-2*u,M=u*u+f*f+P*P-s*s-2*f*P,A=S*S-4*m*M,A===0?(C=-S/(2*m),n.push(new r(C,P-C*w))):A>0&&(C=(-S+Math.sqrt(A))/(2*m),n.push(new r(C,P-C*w)),C=(-S-Math.sqrt(A))/(2*m),n.push(new r(C,P-C*w)))}}return n};a.exports=h},97439:(a,y,t)=>{/** + * @author Florian Vazelle + * @author Geoffrey Glaive + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(4042),p=t(81491),h=function(o,l,n){if(n===void 0&&(n=[]),p(o,l)){var u=l.getLineA(),f=l.getLineB(),s=l.getLineC(),c=l.getLineD();r(u,o,n),r(f,o,n),r(s,o,n),r(c,o,n)}return n};a.exports=h},4042:(a,y,t)=>{/** + * @author Florian Vazelle + * @author Geoffrey Glaive + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(2141),p=t(80462),h=function(o,l,n){if(n===void 0&&(n=[]),p(o,l)){var u=o.x1,f=o.y1,s=o.x2,c=o.y2,d=l.x,v=l.y,m=l.radius,S=s-u,M=c-f,A=u-d,C=f-v,w=S*S+M*M,P=2*(S*A+M*C),L=A*A+C*C-m*m,O=P*P-4*w*L,I,D;if(O===0){var B=-P/(2*w);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*w);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*w);I=u+z*S,D=f+z*M,z>=0&&z<=1&&n.push(new r(I,D))}}return n};a.exports=h},36100:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(25836),p=function(h,o,l,n){l===void 0&&(l=!1);var u=h.x1,f=h.y1,s=h.x2,c=h.y2,d=o.x1,v=o.y1,m=o.x2,S=o.y2,M=s-u,A=c-f,C=m-d,w=S-v,P=M*w-A*C;if(P===0)return null;var L,O,I;if(l){if(L=(M*(v-f)+A*(u-d))/(C*A-w*M),O=(d+C*L-u)/M,O<0||L<0||L>1)return null;I=O}else{if(L=((d-u)*w-(v-f)*C)/P,O=((f-v)*M-(u-d)*A)/P,L<0||L>1||O<0||O>1)return null;I=L}return n===void 0&&(n=new r),n.set(u+M*I,f+A*I,I)};a.exports=p},3073:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(36100),p=t(23031),h=t(25836),o=new p,l=new h,n=function(u,f,s,c){s===void 0&&(s=!1),c===void 0&&(c=new h);var d=!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=t(25836),p=t(61369),h=t(3073),o=new r,l=function(n,u,f,s){s===void 0&&(s=new p),Array.isArray(u)||(u=[u]);var c=!1;s.set(),o.set();for(var d=0;d{/** + * @author Florian Vazelle + * @author Geoffrey Glaive + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(2141),p=t(76112),h=t(92773),o=function(l,n,u){if(u===void 0&&(u=[]),h(l,n))for(var f=n.getLineA(),s=n.getLineB(),c=n.getLineC(),d=n.getLineD(),v=[new r,new r,new r,new r],m=[p(f,l,v[0]),p(s,l,v[1]),p(c,l,v[2]),p(d,l,v[3])],S=0;S<4;S++)m[S]&&u.push(v[S]);return u};a.exports=o},71147:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(61369),p=t(56362),h=t(23031),o=new h;function l(f,s,c,d,v){var m=Math.cos(f),S=Math.sin(f);o.setTo(s,c,s+m,c+S);var M=p(o,d,!0);M&&v.push(new r(M.x,M.y,f,M.w))}function n(f,s){return f.z-s.z}var u=function(f,s,c){Array.isArray(c)||(c=[c]);for(var d=[],v=[],m=0;m{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(87841),p=t(59996),h=function(o,l,n){return n===void 0&&(n=new r),p(o,l)&&(n.x=Math.max(o.x,l.x),n.y=Math.max(o.y,l.y),n.width=Math.min(o.right,l.right)-n.x,n.height=Math.min(o.bottom,l.bottom)-n.y),n};a.exports=h},52784:(a,y,t)=>{/** + * @author Florian Vazelle + * @author Geoffrey Glaive + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(60646),p=t(59996),h=function(o,l,n){if(n===void 0&&(n=[]),p(o,l)){var u=o.getLineA(),f=o.getLineB(),s=o.getLineC(),c=o.getLineD();r(u,l,n),r(f,l,n),r(s,l,n),r(c,l,n)}return n};a.exports=h},26341:(a,y,t)=>{/** + * @author Florian Vazelle + * @author Geoffrey Glaive + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(89265),p=t(60646),h=function(o,l,n){if(n===void 0&&(n=[]),r(o,l)){var u=l.getLineA(),f=l.getLineB(),s=l.getLineC();p(u,o,n),p(f,o,n),p(s,o,n)}return n};a.exports=h},38720:(a,y,t)=>{/** + * @author Florian Vazelle + * @author Geoffrey Glaive + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(4042),p=t(67636),h=function(o,l,n){if(n===void 0&&(n=[]),p(o,l)){var u=o.getLineA(),f=o.getLineB(),s=o.getLineC();r(u,l,n),r(f,l,n),r(s,l,n)}return n};a.exports=h},13882:(a,y,t)=>{/** + * @author Florian Vazelle + * @author Geoffrey Glaive + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(2141),p=t(2822),h=t(76112),o=function(l,n,u){if(u===void 0&&(u=[]),p(l,n))for(var f=l.getLineA(),s=l.getLineB(),c=l.getLineC(),d=[new r,new r,new r],v=[h(f,n,d[0]),h(s,n,d[1]),h(c,n,d[2])],m=0;m<3;m++)v[m]&&u.push(d[m]);return u};a.exports=o},75636:(a,y,t)=>{/** + * @author Florian Vazelle + * @author Geoffrey Glaive + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(82944),p=t(13882),h=function(o,l,n){if(n===void 0&&(n=[]),r(o,l)){var u=l.getLineA(),f=l.getLineB(),s=l.getLineC();p(o,u,n),p(o,f,n),p(o,s,n)}return n};a.exports=h},80462:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(87902),p=t(2141),h=new p,o=function(l,n,u){if(u===void 0&&(u=h),r(n,l.x1,l.y1))return u.x=l.x1,u.y=l.y1,!0;if(r(n,l.x2,l.y2))return u.x=l.x2,u.y=l.y2,!0;var f=l.x2-l.x1,s=l.y2-l.y1,c=n.x-l.x1,d=n.y-l.y1,v=f*f+s*s,m=f,S=s;if(v>0){var M=(c*f+d*s)/v;m*=M,S*=M}u.x=l.x1+m,u.y=l.y1+S;var A=m*m+S*S;return A<=v&&m*f+S*s>=0&&r(n,u.x,u.y)};a.exports=o},76112:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){var h=t.x1,o=t.y1,l=t.x2,n=t.y2,u=r.x1,f=r.y1,s=r.x2,c=r.y2;if(h===l&&o===n||u===s&&f===c)return!1;var d=(c-f)*(l-h)-(s-u)*(n-o);if(d===0)return!1;var v=((s-u)*(o-f)-(c-f)*(h-u))/d,m=((l-h)*(o-f)-(n-o)*(h-u))/d;return v<0||v>1||m<0||m>1?!1:(p&&(p.x=h+v*(l-h),p.y=o+v*(n-o)),!0)};a.exports=y},92773:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){var p=t.x1,h=t.y1,o=t.x2,l=t.y2,n=r.x,u=r.y,f=r.right,s=r.bottom,c=0;if(p>=n&&p<=f&&h>=u&&h<=s||o>=n&&o<=f&&l>=u&&l<=s)return!0;if(p=n){if(c=h+(l-h)*(n-p)/(o-p),c>u&&c<=s)return!0}else if(p>f&&o<=f&&(c=h+(l-h)*(f-p)/(o-p),c>=u&&c<=s))return!0;if(h=u){if(c=p+(o-p)*(u-h)/(l-h),c>=n&&c<=f)return!0}else if(h>s&&l<=s&&(c=p+(o-p)*(s-h)/(l-h),c>=n&&c<=f))return!0;return!1};a.exports=y},16204:a=>{/** + * @author Richard Davey + * @author Florian Mertens + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){p===void 0&&(p=1);var h=r.x1,o=r.y1,l=r.x2,n=r.y2,u=t.x,f=t.y,s=(l-h)*(l-h)+(n-o)*(n-o);if(s===0)return!1;var c=((u-h)*(l-h)+(f-o)*(n-o))/s;if(c<0)return Math.sqrt((h-u)*(h-u)+(o-f)*(o-f))<=p;if(c>=0&&c<=1){var d=((o-f)*(l-h)-(h-u)*(n-o))/s;return Math.abs(d)*Math.sqrt(s)<=p}else return Math.sqrt((l-u)*(l-u)+(n-f)*(n-f))<=p};a.exports=y},14199:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(16204),p=function(h,o){if(!r(h,o))return!1;var l=Math.min(o.x1,o.x2),n=Math.max(o.x1,o.x2),u=Math.min(o.y1,o.y2),f=Math.max(o.y1,o.y2);return h.x>=l&&h.x<=n&&h.y>=u&&h.y<=f};a.exports=p},59996:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){return t.width<=0||t.height<=0||r.width<=0||r.height<=0?!1:!(t.rightr.right||t.y>r.bottom)};a.exports=y},89265:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(76112),p=t(37303),h=t(48653),o=t(77493),l=function(n,u){if(u.left>n.right||u.rightn.bottom||u.bottom0};a.exports=l},84411:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p,h,o,l){return l===void 0&&(l=0),!(r>t.right+l||pt.bottom+l||o{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(80462),p=t(10690),h=function(o,l){return o.left>l.right||o.rightl.bottom||o.bottom{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(76112),p=function(h,o){return!!(h.contains(o.x1,o.y1)||h.contains(o.x2,o.y2)||r(h.getLineA(),o)||r(h.getLineB(),o)||r(h.getLineC(),o))};a.exports=p},82944:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(48653),p=t(71694),h=t(76112),o=function(l,n){if(l.left>n.right||l.rightn.bottom||l.bottom0||(m=p(n),S=r(l,m,!0),S.length>0)};a.exports=o},91865:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={CircleToCircle:t(2044),CircleToRectangle:t(81491),GetCircleToCircle:t(63376),GetCircleToRectangle:t(97439),GetLineToCircle:t(4042),GetLineToLine:t(36100),GetLineToPoints:t(3073),GetLineToPolygon:t(56362),GetLineToRectangle:t(60646),GetRaysFromPointToPolygon:t(71147),GetRectangleIntersection:t(68389),GetRectangleToRectangle:t(52784),GetRectangleToTriangle:t(26341),GetTriangleToCircle:t(38720),GetTriangleToLine:t(13882),GetTriangleToTriangle:t(75636),LineToCircle:t(80462),LineToLine:t(76112),LineToRectangle:t(92773),PointToLine:t(16204),PointToLineSegment:t(14199),RectangleToRectangle:t(59996),RectangleToTriangle:t(89265),RectangleToValues:t(84411),TriangleToCircle:t(67636),TriangleToLine:t(2822),TriangleToTriangle:t(82944)}},91938:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return Math.atan2(t.y2-t.y1,t.x2-t.x1)};a.exports=y},84993:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){r===void 0&&(r=1),p===void 0&&(p=[]);var h=Math.round(t.x1),o=Math.round(t.y1),l=Math.round(t.x2),n=Math.round(t.y2),u=Math.abs(l-h),f=Math.abs(n-o),s=h-f&&(d-=f,h+=s),m{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){var h=r-(t.x1+t.x2)/2,o=p-(t.y1+t.y2)/2;return t.x1+=h,t.y1+=o,t.x2+=h,t.y2+=o,t};a.exports=y},31116:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(23031),p=function(h){return new r(h.x1,h.y1,h.x2,h.y2)};a.exports=p},59944:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){return r.setTo(t.x1,t.y1,t.x2,t.y2)};a.exports=y},59220:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){return t.x1===r.x1&&t.y1===r.y1&&t.x2===r.x2&&t.y2===r.y2};a.exports=y},78177:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(35001),p=function(h,o,l){l===void 0&&(l=o);var n=r(h),u=h.x2-h.x1,f=h.y2-h.y1;return o&&(h.x1=h.x1-u/n*o,h.y1=h.y1-f/n*o),l&&(h.x2=h.x2+u/n*l,h.y2=h.y2+f/n*l),h};a.exports=p},26708:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(52816),p=t(6113),h=t(2141),o=function(l,n,u,f,s){f===void 0&&(f=0),s===void 0&&(s=[]);var c=[],d=l.x1,v=l.y1,m=l.x2-d,S=l.y2-v,M=p(n,s),A,C,w=u-1;for(A=0;A0){var P=c[0],L=[P];for(A=1;A=f&&(L.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=t(2141),p=function(h,o){return o===void 0&&(o=new r),o.x=(h.x1+h.x2)/2,o.y=(h.y1+h.y2)/2,o};a.exports=p},99569:(a,y,t)=>{/** + * @author Richard Davey + * @author Florian Mertens + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(2141),p=function(h,o,l){l===void 0&&(l=new r);var n=h.x1,u=h.y1,f=h.x2,s=h.y2,c=(f-n)*(f-n)+(s-u)*(s-u);if(c===0)return l;var d=((o.x-n)*(f-n)+(o.y-u)*(s-u))/c;return l.x=n+d*(f-n),l.y=u+d*(s-u),l};a.exports=p},34638:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(36383),p=t(91938),h=t(2141),o=function(l,n){n===void 0&&(n=new h);var u=p(l)-r.TAU;return n.x=Math.cos(u),n.y=Math.sin(u),n};a.exports=o},13151:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(2141),p=function(h,o,l){return l===void 0&&(l=new r),l.x=h.x1+(h.x2-h.x1)*o,l.y=h.y1+(h.y2-h.y1)*o,l};a.exports=p},15258:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(35001),p=t(2141),h=function(o,l,n,u){u===void 0&&(u=[]),!l&&n>0&&(l=r(o)/n);for(var f=o.x1,s=o.y1,c=o.x2,d=o.y2,v=0;v{/** + * @author Richard Davey + * @author Florian Mertens + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){var p=t.x1,h=t.y1,o=t.x2,l=t.y2,n=(o-p)*(o-p)+(l-h)*(l-h);if(n===0)return!1;var u=((h-r.y)*(o-p)-(p-r.x)*(l-h))/n;return Math.abs(u)*Math.sqrt(n)};a.exports=y},98770:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return Math.abs(t.y1-t.y2)};a.exports=y},35001:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))};a.exports=y},23031:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(13151),h=t(15258),o=t(23777),l=t(65822),n=t(26099),u=new r({initialize:function(s,c,d,v){s===void 0&&(s=0),c===void 0&&(c=0),d===void 0&&(d=0),v===void 0&&(v=0),this.type=o.LINE,this.x1=s,this.y1=c,this.x2=d,this.y2=v},getPoint:function(f,s){return p(this,f,s)},getPoints:function(f,s,c){return h(this,f,s,c)},getRandomPoint:function(f){return l(this,f)},setTo:function(f,s,c,d){return f===void 0&&(f=0),s===void 0&&(s=0),c===void 0&&(c=0),d===void 0&&(d=0),this.x1=f,this.y1=s,this.x2=c,this.y2=d,this},setFromObjects:function(f,s){return this.x1=f.x,this.y1=f.y,this.x2=s.x,this.y2=s.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}}});a.exports=u},64795:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(36383),p=t(15994),h=t(91938),o=function(l){var n=h(l)-r.TAU;return p(n,-Math.PI,Math.PI)};a.exports=o},52616:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(36383),p=t(91938),h=function(o){return Math.cos(p(o)-r.TAU)};a.exports=h},87231:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(36383),p=t(91938),h=function(o){return Math.sin(p(o)-r.TAU)};a.exports=h},89662:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){return t.x1+=r,t.y1+=p,t.x2+=r,t.y2+=p,t};a.exports=y},71165:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return-((t.x2-t.x1)/(t.y2-t.y1))};a.exports=y},65822:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(2141),p=function(h,o){o===void 0&&(o=new r);var l=Math.random();return o.x=h.x1+l*(h.x2-h.x1),o.y=h.y1+l*(h.y2-h.y1),o};a.exports=p},69777:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(91938),p=t(64795),h=function(o,l){return 2*p(l)-Math.PI-r(o)};a.exports=h},39706:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(64400),p=function(h,o){var l=(h.x1+h.x2)/2,n=(h.y1+h.y2)/2;return r(h,l,n,o)};a.exports=p},82585:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(64400),p=function(h,o,l){return r(h,o.x,o.y,l)};a.exports=p},64400:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p,h){var o=Math.cos(h),l=Math.sin(h),n=t.x1-r,u=t.y1-p;return t.x1=n*o-u*l+r,t.y1=n*l+u*o+p,n=t.x2-r,u=t.y2-p,t.x2=n*o-u*l+r,t.y2=n*l+u*o+p,t};a.exports=y},62377:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p,h,o){return t.x1=r,t.y1=p,t.x2=r+Math.cos(h)*o,t.y2=p+Math.sin(h)*o,t};a.exports=y},71366:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return(t.y2-t.y1)/(t.x2-t.x1)};a.exports=y},10809:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return Math.abs(t.x1-t.x2)};a.exports=y},2529:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(23031);r.Angle=t(91938),r.BresenhamPoints=t(84993),r.CenterOn=t(36469),r.Clone=t(31116),r.CopyFrom=t(59944),r.Equals=t(59220),r.Extend=t(78177),r.GetEasedPoints=t(26708),r.GetMidPoint=t(32125),r.GetNearestPoint=t(99569),r.GetNormal=t(34638),r.GetPoint=t(13151),r.GetPoints=t(15258),r.GetShortestDistance=t(26408),r.Height=t(98770),r.Length=t(35001),r.NormalAngle=t(64795),r.NormalX=t(52616),r.NormalY=t(87231),r.Offset=t(89662),r.PerpSlope=t(71165),r.Random=t(65822),r.ReflectAngle=t(69777),r.Rotate=t(39706),r.RotateAroundPoint=t(82585),r.RotateAroundXY=t(64400),r.SetToAngle=t(62377),r.Slope=t(71366),r.Width=t(10809),a.exports=r},83997:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(87841),h=t(26099);function o(n,u,f,s){var c=n-f,d=u-s,v=c*c+d*d;return Math.sqrt(v)}var l=new r({initialize:function(u,f,s){this.vertex1=u,this.vertex2=f,this.vertex3=s,this.bounds=new p,this._inCenter=new h},getInCenter:function(n){n===void 0&&(n=!0);var u=this.vertex1,f=this.vertex2,s=this.vertex3,c,d,v,m,S,M;n?(c=u.x,d=u.y,v=f.x,m=f.y,S=s.x,M=s.y):(c=u.vx,d=u.vy,v=f.vx,m=f.vy,S=s.vx,M=s.vy);var A=o(S,M,v,m),C=o(c,d,S,M),w=o(v,m,c,d),P=A+C+w;return this._inCenter.set((c*A+v*C+S*w)/P,(d*A+m*C+M*w)/P)},contains:function(n,u,f){var s=this.vertex1,c=this.vertex2,d=this.vertex3,v=s.vx,m=s.vy,S=c.vx,M=c.vy,A=d.vx,C=d.vy;if(f){var w=f.a,P=f.b,L=f.c,O=f.d,I=f.e,D=f.f;v=s.vx*w+s.vy*L+I,m=s.vx*P+s.vy*O+D,S=c.vx*w+c.vy*L+I,M=c.vx*P+c.vy*O+D,A=d.vx*w+d.vy*L+I,C=d.vx*P+d.vy*O+D}var B=A-v,G=C-m,z=S-v,W=M-m,k=n-v,J=u-m,Q=B*B+G*G,Y=B*z+G*W,K=B*k+G*J,U=z*z+W*W,V=z*k+W*J,j=Q*U-Y*Y,$=j===0?0:1/j,q=(U*K-Y*V)*$,it=(Q*V-Y*K)*$;return q>=0&&it>=0&&q+it<1},isCounterClockwise:function(n){var u=this.vertex1,f=this.vertex2,s=this.vertex3,c=(f.vx-u.vx)*(s.vy-u.vy)-(f.vy-u.vy)*(s.vx-u.vx);return n<=0?c>=0:c<0},load:function(n,u,f,s,c){return f=this.vertex1.load(n,u,f,s,c),f=this.vertex2.load(n,u,f,s,c),f=this.vertex3.load(n,u,f,s,c),f},transformCoordinatesLocal:function(n,u,f,s){return this.vertex1.transformCoordinatesLocal(n,u,f,s),this.vertex2.transformCoordinatesLocal(n,u,f,s),this.vertex3.transformCoordinatesLocal(n,u,f,s),this},updateBounds:function(){var n=this.vertex1,u=this.vertex2,f=this.vertex3,s=this.bounds;return s.x=Math.min(n.vx,u.vx,f.vx),s.y=Math.min(n.vy,u.vy,f.vy),s.width=Math.max(n.vx,u.vx,f.vx)-s.x,s.height=Math.max(n.vy,u.vy,f.vy)-s.y,this},isInView:function(n,u,f,s,c,d,v,m,S,M,A){this.update(s,c,d,v,m,S,M,A);var C=this.vertex1,w=this.vertex2,P=this.vertex3;if(C.ta<=0&&w.ta<=0&&P.ta<=0||u&&!this.isCounterClockwise(f))return!1;var L=this.bounds;L.x=Math.min(C.tx,w.tx,P.tx),L.y=Math.min(C.ty,w.ty,P.ty),L.width=Math.max(C.tx,w.tx,P.tx)-L.x,L.height=Math.max(C.ty,w.ty,P.ty)-L.y;var O=n.x+n.width,I=n.y+n.height;return L.width<=0||L.height<=0||n.width<=0||n.height<=0?!1:!(L.rightO||L.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,s,c,d,v,m){return this.vertex1.update(u,f,s,c,d,v,m,n),this.vertex2.update(u,f,s,c,d,v,m,n),this.vertex3.update(u,f,s,c,d,v,m,n),this},translate:function(n,u){u===void 0&&(u=0);var f=this.vertex1,s=this.vertex2,c=this.vertex3;return f.x+=n,f.y+=u,s.x+=n,s.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}});a.exports=l},48803:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83997),p=t(95540),h=t(37867),o=t(25836),l=t(39318),n=new o,u=new o,f=new h,s=function(c){var d=p(c,"mesh"),v=p(c,"texture",null),m=p(c,"frame"),S=p(c,"width",1),M=p(c,"height",S),A=p(c,"widthSegments",1),C=p(c,"heightSegments",A),w=p(c,"x",0),P=p(c,"y",0),L=p(c,"z",0),O=p(c,"rotateX",0),I=p(c,"rotateY",0),D=p(c,"rotateZ",0),B=p(c,"zIsUp",!0),G=p(c,"isOrtho",d?d.dirtyCache[11]:!1),z=p(c,"colors",[16777215]),W=p(c,"alphas",[1]),k=p(c,"tile",!1),J=p(c,"flipY",!1),Q=p(c,"width",null),Y={faces:[],verts:[]};n.set(w,P,L),u.set(O,I,D),f.fromRotationXYTranslation(u,n,B);var K;if(!v&&d)v=d.texture,m||(K=d.frame);else if(d&&typeof v=="string")v=d.scene.sys.textures.get(v);else if(!v)return Y;K||(K=v.get(m)),!Q&&G&&v&&d&&(S=K.width/d.height,M=K.height/d.height);var U=S/2,V=M/2,j=Math.floor(A),$=Math.floor(C),q=j+1,it=$+1,nt=S/j,et=M/$,ht=[],ut=[],dt,mt,gt=0,At=1,ot=0,st=1;K&&(gt=K.u0,At=K.u1,J?(ot=K.v1,st=K.v0):(ot=K.v0,st=K.v1));var yt=At-gt,Tt=st-ot;for(mt=0;mt{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83997),p=t(37867),h=t(25836),o=t(39318),l=new h,n=new h,u=new p,f=function(s,c,d,v,m,S,M,A,C,w){d===void 0&&(d=1),v===void 0&&(v=0),m===void 0&&(m=0),S===void 0&&(S=0),M===void 0&&(M=0),A===void 0&&(A=0),C===void 0&&(C=0),w===void 0&&(w=!0);var P={faces:[],verts:[]},L=s.materials;l.set(v,m,S),n.set(M,A,C),u.fromRotationXYTranslation(n,l,w);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=t(83997),p=t(39318),h=function(o,l,n,u,f,s,c,d){if(u===void 0&&(u=!1),s===void 0&&(s=16777215),c===void 0&&(c=1),d===void 0&&(d=!1),o.length!==l.length&&!u){console.warn("GenerateVerts: vertices and uvs count not equal");return}var v={faces:[],vertices:[]},m,S,M,A,C,w,P,L,O,I,D,B=u?3:2,G=Array.isArray(s),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,t="untitled",r="",p="";function h(S){var M=S.indexOf("#");return M>-1?S.substring(0,M):S}function o(S){return S.models.length===0&&S.models.push({faces:[],name:t,textureCoords:[],vertexNormals:[],vertices:[]}),r="",S.models[S.models.length-1]}function l(S,M){var A=S.length>=2?S[1]:t;M.models.push({faces:[],name:A,textureCoords:[],vertexNormals:[],vertices:[]}),r=""}function n(S){S.length===2&&(r=S[1])}function u(S,M){var A=S.length,C=A>=2?parseFloat(S[1]):0,w=A>=3?parseFloat(S[2]):0,P=A>=4?parseFloat(S[3]):0;o(M).vertices.push({x:C,y:w,z:P})}function f(S,M){var A=S.length,C=A>=2?parseFloat(S[1]):0,w=A>=3?parseFloat(S[2]):0,P=A>=4?parseFloat(S[3]):0;isNaN(C)&&(C=0),isNaN(w)&&(w=0),isNaN(P)&&(P=0),y&&(w=1-w),o(M).textureCoords.push({u:C,v:w,w:P})}function s(S,M){var A=S.length,C=A>=2?parseFloat(S[1]):0,w=A>=3?parseFloat(S[2]):0,P=A>=4?parseFloat(S[3]):0;o(M).vertexNormals.push({x:C,y:w,z:P})}function c(S,M){var A=S.length-1;if(!(A<3)){for(var C={group:r,material:p,vertices:[]},w=0;w3)){var I=0,D=0,B=0;I=parseInt(L[0],10),O>1&&L[1]!==""&&(D=parseInt(L[1],10)),O>2&&(B=parseInt(L[2],10)),I!==0&&(I<0&&(I=o(M).vertices.length+1+I),D-=1,I-=1,B-=1,C.vertices.push({textureCoordsIndex:D,vertexIndex:I,vertexNormalIndex:B}))}}o(M).faces.push(C)}}function d(S,M){S.length>=2&&M.materialLibraries.push(S[1])}function v(S){S.length>=2&&(p=S[1])}var m=function(S,M){M===void 0&&(M=!0),y=M;var A={materials:{},materialLibraries:[],models:[]};r="",p="";for(var C=S.split(` +`),w=0;w{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(37589),p=function(h){for(var o={},l=h.split(` +`),n="",u=0;u=2?Math.floor(s[2]*255):c,v=s.length>=3?Math.floor(s[3]*255):c;o[n]=r(c,d,v);break}}}}return o};a.exports=p},92570:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p,h){var o,l;if(p===void 0&&h===void 0){var n=t.getInCenter();o=n.x,l=n.y}var u=Math.cos(r),f=Math.sin(r),s=t.vertex1,c=t.vertex2,d=t.vertex3,v=s.x-o,m=s.y-l;s.set(v*u-m*f+o,v*f+m*u+l),v=c.x-o,m=c.y-l,c.set(v*u-m*f+o,v*f+m*u+l),v=d.x-o,m=d.y-l,d.set(v*u-m*f+o,v*f+m*u+l)};a.exports=y},39318:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(70554),h=t(25836),o=new r({Extends:h,initialize:function(n,u,f,s,c,d,v,m,S,M){d===void 0&&(d=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=s,this.v=c,this.color=d,this.alpha=v,this.tx=0,this.ty=0,this.ta=0,this.tu=s,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 s=this.x,c=this.y,d=this.z,v=l.val,m=s*v[0]+c*v[4]+d*v[8]+v[12],S=s*v[1]+c*v[5]+d*v[9]+v[13],M=s*v[2]+c*v[6]+d*v[10]+v[14],A=s*v[3]+c*v[7]+d*v[11]+v[15];this.vx=m/A*n,this.vy=-(S/A)*u,f<=0?this.vz=M/A:this.vz=-(M/A)},resize:function(l,n,u,f,s,c){return this.x=l,this.y=n,this.vx=this.x*u,this.vy=-this.y*f,this.vz=0,s<.5?this.vx+=u*(.5-s):s>.5&&(this.vx-=u*(s-.5)),c<.5?this.vy+=f*(.5-c):c>.5&&(this.vy-=f*(c-.5)),this},update:function(l,n,u,f,s,c,d,v){var m=this.vx*l+this.vy*u+s,S=this.vx*n+this.vy*f+c;return d&&(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,s){return l[++u]=this.tx,l[++u]=this.ty,l[++u]=this.tu,l[++u]=this.tv,l[++u]=f,l[++u]=s,n[++u]=p.getTintAppendFloatAlpha(this.color,this.ta),u}});a.exports=o},73090:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r={Face:t(83997),GenerateGridVerts:t(48803),GenerateObjVerts:t(34684),GenerateVerts:t(92515),ParseObj:t(85048),ParseObjMaterial:t(61485),RotateFace:t(92570),Vertex:t(39318)};a.exports=r},96550:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return t.setTo(Math.ceil(t.x),Math.ceil(t.y))};a.exports=y},99706:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(2141),p=function(h){return new r(h.x,h.y)};a.exports=p},68010:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){return r.setTo(t.x,t.y)};a.exports=y},27814:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){return t.x===r.x&&t.y===r.y};a.exports=y},73565:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return t.setTo(Math.floor(t.x),Math.floor(t.y))};a.exports=y},87555:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(2141),p=function(h,o){if(o===void 0&&(o=new r),!Array.isArray(h))throw new Error("GetCentroid points argument must be an array");var l=h.length;if(l<1)throw new Error("GetCentroid points array must not be empty");if(l===1)o.x=h[0].x,o.y=h[0].y;else{for(var n=0;n{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)};a.exports=y},44405:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return t.x*t.x+t.y*t.y};a.exports=y},20873:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(87841),p=function(h,o){o===void 0&&(o=new r);for(var l=Number.NEGATIVE_INFINITY,n=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY,f=Number.POSITIVE_INFINITY,s=0;sl&&(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} + */var r=t(2141),p=function(h,o,l,n){return l===void 0&&(l=0),n===void 0&&(n=new r),n.x=h.x+(o.x-h.x)*l,n.y=h.y+(o.y-h.y)*l,n};a.exports=p},55767:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return t.setTo(t.y,t.x)};a.exports=y},79432:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(2141),p=function(h,o){return o===void 0&&(o=new r),o.setTo(-h.x,-h.y)};a.exports=p},2141:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(23777),h=new r({initialize:function(l,n){l===void 0&&(l=0),n===void 0&&(n=l),this.type=p.POINT,this.x=l,this.y=n},setTo:function(o,l){return o===void 0&&(o=0),l===void 0&&(l=o),this.x=o,this.y=l,this}});a.exports=h},72930:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(2141),p=t(44405),h=function(o,l,n){n===void 0&&(n=new r);var u=o.x*l.x+o.y*l.y,f=u/p(l);return f!==0&&(n.x=f*l.x,n.y=f*l.y),n};a.exports=h},62880:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(2141),p=function(h,o,l){l===void 0&&(l=new r);var n=h.x*o.x+h.y*o.y;return n!==0&&(l.x=n*o.x,l.y=n*o.y),l};a.exports=p},15093:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(28793),p=function(h,o){if(h.x!==0||h.y!==0){var l=r(h);h.x/=l,h.y/=l}return h.x*=o,h.y*=o,h};a.exports=p},43711:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(2141);r.Ceil=t(96550),r.Clone=t(99706),r.CopyFrom=t(68010),r.Equals=t(27814),r.Floor=t(73565),r.GetCentroid=t(87555),r.GetMagnitude=t(28793),r.GetMagnitudeSq=t(44405),r.GetRectangleFromPoints=t(20873),r.Interpolate=t(26152),r.Invert=t(55767),r.Negative=t(79432),r.Project=t(72930),r.ProjectUnit=t(62880),r.SetMagnitude=t(15093),a.exports=r},12306:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(25717),p=function(h){return new r(h.points)};a.exports=p},63814:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){for(var h=!1,o=-1,l=t.points.length-1;++o{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(63814),p=function(h,o){return r(h,o.x,o.y)};a.exports=p},94811:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */function y(Y,K,U){U=U||2;var V=K&&K.length,j=V?K[0]*U:Y.length,$=t(Y,0,j,U,!0),q=[];if(!$||$.next===$.prev)return q;var it,nt,et,ht,ut,dt,mt;if(V&&($=u(Y,K,$,U)),Y.length>80*U){it=et=Y[0],nt=ht=Y[1];for(var gt=U;gtet&&(et=ut),dt>ht&&(ht=dt);mt=Math.max(et-it,ht-nt),mt=mt!==0?32767/mt:0}return p($,q,U,it,nt,mt,0),q}function t(Y,K,U,V,j){var $,q;if(j===Q(Y,K,U,V)>0)for($=K;$=K;$-=V)q=W($,Y[$],Y[$+1],q);return q&&P(q,q.next)&&(k(q),q=q.next),q}function r(Y,K){if(!Y)return Y;K||(K=Y);var U=Y,V;do if(V=!1,!U.steiner&&(P(U,U.next)||w(U.prev,U,U.next)===0)){if(k(U),U=K=U.prev,U===U.next)break;V=!0}else U=U.next;while(V||U!==K);return K}function p(Y,K,U,V,j,$,q){if(Y){!q&&$&&v(Y,V,j,$);for(var it=Y,nt,et;Y.prev!==Y.next;){if(nt=Y.prev,et=Y.next,$?o(Y,V,j,$):h(Y)){K.push(nt.i/U|0),K.push(Y.i/U|0),K.push(et.i/U|0),k(Y),Y=et.next,it=et.next;continue}if(Y=et,Y===it){q?q===1?(Y=l(r(Y),K,U),p(Y,K,U,V,j,$,2)):q===2&&n(Y,K,U,V,j,$):p(r(Y),K,U,V,j,$,1);break}}}}function h(Y){var K=Y.prev,U=Y,V=Y.next;if(w(K,U,V)>=0)return!1;for(var j=K.x,$=U.x,q=V.x,it=K.y,nt=U.y,et=V.y,ht=j<$?j$?j>q?j:q:$>q?$:q,mt=it>nt?it>et?it:et:nt>et?nt:et,gt=V.next;gt!==K;){if(gt.x>=ht&>.x<=dt&>.y>=ut&>.y<=mt&&A(j,it,$,nt,q,et,gt.x,gt.y)&&w(gt.prev,gt,gt.next)>=0)return!1;gt=gt.next}return!0}function o(Y,K,U,V){var j=Y.prev,$=Y,q=Y.next;if(w(j,$,q)>=0)return!1;for(var it=j.x,nt=$.x,et=q.x,ht=j.y,ut=$.y,dt=q.y,mt=itnt?it>et?it:et:nt>et?nt:et,ot=ht>ut?ht>dt?ht:dt:ut>dt?ut:dt,st=S(mt,gt,K,U,V),yt=S(At,ot,K,U,V),Tt=Y.prevZ,wt=Y.nextZ;Tt&&Tt.z>=st&&wt&&wt.z<=yt;){if(Tt.x>=mt&&Tt.x<=At&&Tt.y>=gt&&Tt.y<=ot&&Tt!==j&&Tt!==q&&A(it,ht,nt,ut,et,dt,Tt.x,Tt.y)&&w(Tt.prev,Tt,Tt.next)>=0||(Tt=Tt.prevZ,wt.x>=mt&&wt.x<=At&&wt.y>=gt&&wt.y<=ot&&wt!==j&&wt!==q&&A(it,ht,nt,ut,et,dt,wt.x,wt.y)&&w(wt.prev,wt,wt.next)>=0))return!1;wt=wt.nextZ}for(;Tt&&Tt.z>=st;){if(Tt.x>=mt&&Tt.x<=At&&Tt.y>=gt&&Tt.y<=ot&&Tt!==j&&Tt!==q&&A(it,ht,nt,ut,et,dt,Tt.x,Tt.y)&&w(Tt.prev,Tt,Tt.next)>=0)return!1;Tt=Tt.prevZ}for(;wt&&wt.z<=yt;){if(wt.x>=mt&&wt.x<=At&&wt.y>=gt&&wt.y<=ot&&wt!==j&&wt!==q&&A(it,ht,nt,ut,et,dt,wt.x,wt.y)&&w(wt.prev,wt,wt.next)>=0)return!1;wt=wt.nextZ}return!0}function l(Y,K,U){var V=Y;do{var j=V.prev,$=V.next.next;!P(j,$)&&L(j,V,V.next,$)&&B(j,$)&&B($,j)&&(K.push(j.i/U|0),K.push(V.i/U|0),K.push($.i/U|0),k(V),k(V.next),V=Y=$),V=V.next}while(V!==Y);return r(V)}function n(Y,K,U,V,j,$){var q=Y;do{for(var it=q.next.next;it!==q.prev;){if(q.i!==it.i&&C(q,it)){var nt=z(q,it);q=r(q,q.next),nt=r(nt,nt.next),p(q,K,U,V,j,$,0),p(nt,K,U,V,j,$,0);return}it=it.next}q=q.next}while(q!==Y)}function u(Y,K,U,V){var j=[],$,q,it,nt,et;for($=0,q=K.length;$=U.next.y&&U.next.y!==U.y){var it=U.x+(j-U.y)*(U.next.x-U.x)/(U.next.y-U.y);if(it<=V&&it>$&&($=it,q=U.x=U.x&&U.x>=et&&V!==U.x&&A(jq.x||U.x===q.x&&d(q,U)))&&(q=U,ut=dt)),U=U.next;while(U!==nt);return q}function d(Y,K){return w(Y.prev,Y,K.prev)<0&&w(K.next,Y,Y.next)<0}function v(Y,K,U,V){var j=Y;do j.z===0&&(j.z=S(j.x,j.y,K,U,V)),j.prevZ=j.prev,j.nextZ=j.next,j=j.next;while(j!==Y);j.prevZ.nextZ=null,j.prevZ=null,m(j)}function m(Y){var K,U,V,j,$,q,it,nt,et=1;do{for(U=Y,Y=null,$=null,q=0;U;){for(q++,V=U,it=0,K=0;K0||nt>0&&V;)it!==0&&(nt===0||!V||U.z<=V.z)?(j=U,U=U.nextZ,it--):(j=V,V=V.nextZ,nt--),$?$.nextZ=j:Y=j,j.prevZ=$,$=j;U=V}$.nextZ=null,et*=2}while(q>1);return Y}function S(Y,K,U,V,j){return Y=(Y-U)*j|0,K=(K-V)*j|0,Y=(Y|Y<<8)&16711935,Y=(Y|Y<<4)&252645135,Y=(Y|Y<<2)&858993459,Y=(Y|Y<<1)&1431655765,K=(K|K<<8)&16711935,K=(K|K<<4)&252645135,K=(K|K<<2)&858993459,K=(K|K<<1)&1431655765,Y|K<<1}function M(Y){var K=Y,U=Y;do(K.x=(Y-q)*($-it)&&(Y-q)*(V-it)>=(U-q)*(K-it)&&(U-q)*($-it)>=(j-q)*(V-it)}function C(Y,K){return Y.next.i!==K.i&&Y.prev.i!==K.i&&!D(Y,K)&&(B(Y,K)&&B(K,Y)&&G(Y,K)&&(w(Y.prev,Y,K.prev)||w(Y,K.prev,K))||P(Y,K)&&w(Y.prev,Y,Y.next)>0&&w(K.prev,K,K.next)>0)}function w(Y,K,U){return(K.y-Y.y)*(U.x-K.x)-(K.x-Y.x)*(U.y-K.y)}function P(Y,K){return Y.x===K.x&&Y.y===K.y}function L(Y,K,U,V){var j=I(w(Y,K,U)),$=I(w(Y,K,V)),q=I(w(U,V,Y)),it=I(w(U,V,K));return!!(j!==$&&q!==it||j===0&&O(Y,U,K)||$===0&&O(Y,V,K)||q===0&&O(U,Y,V)||it===0&&O(U,K,V))}function O(Y,K,U){return K.x<=Math.max(Y.x,U.x)&&K.x>=Math.min(Y.x,U.x)&&K.y<=Math.max(Y.y,U.y)&&K.y>=Math.min(Y.y,U.y)}function I(Y){return Y>0?1:Y<0?-1:0}function D(Y,K){var U=Y;do{if(U.i!==Y.i&&U.next.i!==Y.i&&U.i!==K.i&&U.next.i!==K.i&&L(U,U.next,Y,K))return!0;U=U.next}while(U!==Y);return!1}function B(Y,K){return w(Y.prev,Y,Y.next)<0?w(Y,K,Y.next)>=0&&w(Y,Y.prev,K)>=0:w(Y,K,Y.prev)<0||w(Y,Y.next,K)<0}function G(Y,K){var U=Y,V=!1,j=(Y.x+K.x)/2,$=(Y.y+K.y)/2;do U.y>$!=U.next.y>$&&U.next.y!==U.y&&j<(U.next.x-U.x)*($-U.y)/(U.next.y-U.y)+U.x&&(V=!V),U=U.next;while(U!==Y);return V}function z(Y,K){var U=new J(Y.i,Y.x,Y.y),V=new J(K.i,K.x,K.y),j=Y.next,$=K.prev;return Y.next=K,K.prev=Y,U.next=j,j.prev=U,V.next=U,U.prev=V,$.next=V,V.prev=$,V}function W(Y,K,U,V){var j=new J(Y,K,U);return V?(j.next=V.next,j.prev=V,V.next.prev=j,V.next=j):(j.prev=j,j.next=j),j}function k(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 J(Y,K,U){this.i=Y,this.x=K,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,K,U,V){var j=K&&K.length,$=j?K[0]*U:Y.length,q=Math.abs(Q(Y,0,$,U));if(j)for(var it=0,nt=K.length;it0&&(V+=Y[j-1].length,U.holes.push(V))}return U},a.exports=y},13829:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(87841),p=function(h,o){o===void 0&&(o=new r);for(var l=1/0,n=1/0,u=-l,f=-n,s,c=0;c{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){r===void 0&&(r=[]);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=t(35001),p=t(23031),h=t(30052),o=function(l,n,u,f){f===void 0&&(f=[]);var s=l.points,c=h(l);!n&&u>0&&(n=c/u);for(var d=0;dm+w){m+=w;continue}var P=C.getPoint((v-m)/w);f.push(P);break}return f};a.exports=o},30052:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(35001),p=t(23031),h=function(o){for(var l=o.points,n=0,u=0;u{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(63814),h=t(9564),o=t(23777),l=new r({initialize:function(u){this.type=o.POLYGON,this.area=0,this.points=[],u&&this.setTo(u)},contains:function(n,u){return p(this,n,u)},setTo:function(n){if(this.area=0,this.points=[],typeof n=="string"&&(n=n.split(" ")),!Array.isArray(n))return this;for(var u,f=0;f{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return t.points.reverse(),t};a.exports=y},29524:a=>{function y(l,n){var u=l.x-n.x,f=l.y-n.y;return u*u+f*f}function t(l,n,u){var f=n.x,s=n.y,c=u.x-f,d=u.y-s;if(c!==0||d!==0){var v=((l.x-f)*c+(l.y-s)*d)/(c*c+d*d);v>1?(f=u.x,s=u.y):v>0&&(f+=c*v,s+=d*v)}return c=l.x-f,d=l.y-s,c*c+d*d}function r(l,n){for(var u=l[0],f=[u],s,c=1,d=l.length;cn&&(f.push(s),u=s);return u!==s&&f.push(s),f}function p(l,n,u,f,s){for(var c=f,d,v=n+1;vc&&(d=v,c=m)}c>f&&(d-n>1&&p(l,n,d,f,s),s.push(l[d]),u-d>1&&p(l,d,u,f,s))}function h(l,n){var u=l.length-1,f=[l[0]];return p(l,0,u,n,f),f.push(l[u]),f}var o=function(l,n,u){n===void 0&&(n=1),u===void 0&&(u=!1);var f=l.points;if(f.length>2){var s=n*n;u||(f=r(f,s)),l.setTo(h(f,s))}return l};a.exports=o},5469:a=>{/** + * @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,p){return r[0]=p[0],r[1]=p[1],r},t=function(r){var p,h=[],o=r.points;for(p=0;p0&&l.push(y([0,0],h[0])),p=0;p1&&l.push(y([0,0],h[h.length-1])),r.setTo(l)};a.exports=t},24709:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){for(var h=t.points,o=0;o{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(25717);r.Clone=t(12306),r.Contains=t(63814),r.ContainsPoint=t(99338),r.Earcut=t(94811),r.GetAABB=t(13829),r.GetNumberArray=t(26173),r.GetPoints=t(9564),r.Perimeter=t(30052),r.Reverse=t(8133),r.Simplify=t(29524),r.Smooth=t(5469),r.Translate=t(24709),a.exports=r},62224:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return t.width*t.height};a.exports=y},98615:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return t.x=Math.ceil(t.x),t.y=Math.ceil(t.y),t};a.exports=y},31688:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return t.x=Math.ceil(t.x),t.y=Math.ceil(t.y),t.width=Math.ceil(t.width),t.height=Math.ceil(t.height),t};a.exports=y},67502:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){return t.x=r-t.width/2,t.y=p-t.height/2,t};a.exports=y},65085:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(87841),p=function(h){return new r(h.x,h.y,h.width,h.height)};a.exports=p},37303:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){return t.width<=0||t.height<=0?!1:t.x<=r&&t.x+t.width>=r&&t.y<=p&&t.y+t.height>=p};a.exports=y},96553:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(37303),p=function(h,o){return r(h,o.x,o.y)};a.exports=p},70273:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){return r.width*r.height>t.width*t.height?!1:r.x>t.x&&r.xt.x&&r.rightt.y&&r.yt.y&&r.bottom{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){return r.setTo(t.x,t.y,t.width,t.height)};a.exports=y},77493:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){return r===void 0&&(r=[]),r.push({x:t.x,y:t.y}),r.push({x:t.right,y:t.y}),r.push({x:t.right,y:t.bottom}),r.push({x:t.x,y:t.bottom}),r};a.exports=y},9219:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){return t.x===r.x&&t.y===r.y&&t.width===r.width&&t.height===r.height};a.exports=y},53751:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(8249),p=function(h,o){var l=r(h);return l{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(8249),p=function(h,o){var l=r(h);return l>r(o)?h.setSize(o.height*l,o.height):h.setSize(o.width,o.width/l),h.setPosition(o.centerX-h.width/2,o.centerY-h.height/2)};a.exports=p},80774:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t};a.exports=y},83859:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t.width=Math.floor(t.width),t.height=Math.floor(t.height),t};a.exports=y},19217:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(87841),p=t(36383),h=function(o,l){if(l===void 0&&(l=new r),o.length===0)return l;for(var n=Number.MAX_VALUE,u=Number.MAX_VALUE,f=p.MIN_SAFE_INTEGER,s=p.MIN_SAFE_INTEGER,c,d,v,m=0;m{/** + * @author samme + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(87841),p=function(h,o,l,n,u){return u===void 0&&(u=new r),u.setTo(Math.min(h,l),Math.min(o,n),Math.abs(h-l),Math.abs(o-n))};a.exports=p},8249:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return t.height===0?NaN:t.width/t.height};a.exports=y},27165:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(2141),p=function(h,o){return o===void 0&&(o=new r),o.x=h.centerX,o.y=h.centerY,o};a.exports=p},20812:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(13019),p=t(2141),h=function(o,l,n){if(n===void 0&&(n=new p),l<=0||l>=1)return n.x=o.x,n.y=o.y,n;var u=r(o)*l;return l>.5?(u-=o.width+o.height,u<=o.width?(n.x=o.right-u,n.y=o.bottom):(n.x=o.x,n.y=o.bottom-(u-o.width))):u<=o.width?(n.x=o.x+u,n.y=o.y):(n.x=o.right,n.y=o.y+(u-o.width)),n};a.exports=h},34819:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(20812),p=t(13019),h=function(o,l,n,u){u===void 0&&(u=[]),!l&&n>0&&(l=p(o)/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=t(2141),p=function(h,o){return o===void 0&&(o=new r),o.x=h.width,o.y=h.height,o};a.exports=p},86091:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(67502),p=function(h,o,l){var n=h.centerX,u=h.centerY;return h.setSize(h.width+o*2,h.height+l*2),r(h,n,u)};a.exports=p},53951:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(87841),p=t(59996),h=function(o,l,n){return n===void 0&&(n=new r),p(o,l)?(n.x=Math.max(o.x,l.x),n.y=Math.max(o.y,l.y),n.width=Math.min(o.right,l.right)-n.x,n.height=Math.min(o.bottom,l.bottom)-n.y):n.setEmpty(),n};a.exports=h},14649:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(13019),p=t(2141),h=function(o,l,n,u){if(u===void 0&&(u=[]),!l&&!n)return u;l?n=Math.round(r(o)/l):l=r(o)/n;for(var f=o.x,s=o.y,c=0,d=0;d=o.right&&(c=1,s+=f-o.right,f=o.right);break;case 1:s+=l,s>=o.bottom&&(c=2,f-=s-o.bottom,s=o.bottom);break;case 2:f-=l,f<=o.left&&(c=3,s-=o.left-f,f=o.left);break;case 3:s-=l,s<=o.top&&(c=0,s=o.top);break}return u};a.exports=h},33595:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){for(var p=t.x,h=t.right,o=t.y,l=t.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(t,r){var p=Math.min(t.x,r.x),h=Math.max(t.right,r.right);t.x=p,t.width=h-p;var o=Math.min(t.y,r.y),l=Math.max(t.bottom,r.bottom);return t.y=o,t.height=l-o,t};a.exports=y},92171:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){var h=Math.min(t.x,r),o=Math.max(t.right,r);t.x=h,t.width=o-h;var l=Math.min(t.y,p),n=Math.max(t.bottom,p);return t.y=l,t.height=n-l,t};a.exports=y},42981:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){return t.x+=r,t.y+=p,t};a.exports=y},46907:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){return t.x+=r.x,t.y+=r.y,t};a.exports=y},60170:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){return t.xr.x&&t.yr.y};a.exports=y},13019:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return 2*(t.width+t.height)};a.exports=y},85133:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(2141),p=t(39506),h=function(o,l,n){n===void 0&&(n=new r),l=p(l);var u=Math.sin(l),f=Math.cos(l),s=f>0?o.width/2:o.width/-2,c=u>0?o.height/2:o.height/-2;return Math.abs(s*u){/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(2141),p=function(h,o){return o===void 0&&(o=new r),o.x=h.x+Math.random()*h.width,o.y=h.y+Math.random()*h.height,o};a.exports=p},86470:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(30976),p=t(70273),h=t(2141),o=function(l,n,u){if(u===void 0&&(u=new h),p(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};a.exports=o},87841:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(37303),h=t(20812),o=t(34819),l=t(23777),n=t(23031),u=t(26597),f=new r({initialize:function(c,d,v,m){c===void 0&&(c=0),d===void 0&&(d=0),v===void 0&&(v=0),m===void 0&&(m=0),this.type=l.RECTANGLE,this.x=c,this.y=d,this.width=v,this.height=m},contains:function(s,c){return p(this,s,c)},getPoint:function(s,c){return h(this,s,c)},getPoints:function(s,c,d){return o(this,s,c,d)},getRandomPoint:function(s){return u(this,s)},setTo:function(s,c,d,v){return this.x=s,this.y=c,this.width=d,this.height=v,this},setEmpty:function(){return this.setTo(0,0,0,0)},setPosition:function(s,c){return c===void 0&&(c=s),this.x=s,this.y=c,this},setSize:function(s,c){return c===void 0&&(c=s),this.width=s,this.height=c,this},isEmpty:function(){return this.width<=0||this.height<=0},getLineA:function(s){return s===void 0&&(s=new n),s.setTo(this.x,this.y,this.right,this.y),s},getLineB:function(s){return s===void 0&&(s=new n),s.setTo(this.right,this.y,this.right,this.bottom),s},getLineC:function(s){return s===void 0&&(s=new n),s.setTo(this.right,this.bottom,this.x,this.bottom),s},getLineD:function(s){return s===void 0&&(s=new n),s.setTo(this.x,this.bottom,this.x,this.y),s},left:{get:function(){return this.x},set:function(s){s>=this.right?this.width=0:this.width=this.right-s,this.x=s}},right:{get:function(){return this.x+this.width},set:function(s){s<=this.x?this.width=0:this.width=s-this.x}},top:{get:function(){return this.y},set:function(s){s>=this.bottom?this.height=0:this.height=this.bottom-s,this.y=s}},bottom:{get:function(){return this.y+this.height},set:function(s){s<=this.y?this.height=0:this.height=s-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(s){this.x=s-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(s){this.y=s-this.height/2}}});a.exports=f},94845:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){return t.width===r.width&&t.height===r.height};a.exports=y},31730:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){return p===void 0&&(p=r),t.width*=r,t.height*=p,t};a.exports=y},36899:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(87841),p=function(h,o,l){l===void 0&&(l=new r);var n=Math.min(h.x,o.x),u=Math.min(h.y,o.y),f=Math.max(h.right,o.right)-n,s=Math.max(h.bottom,o.bottom)-u;return l.setTo(n,u,f,s)};a.exports=p},93232:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(87841);r.Area=t(62224),r.Ceil=t(98615),r.CeilAll=t(31688),r.CenterOn=t(67502),r.Clone=t(65085),r.Contains=t(37303),r.ContainsPoint=t(96553),r.ContainsRect=t(70273),r.CopyFrom=t(43459),r.Decompose=t(77493),r.Equals=t(9219),r.FitInside=t(53751),r.FitOutside=t(16088),r.Floor=t(80774),r.FloorAll=t(83859),r.FromPoints=t(19217),r.FromXY=t(9477),r.GetAspectRatio=t(8249),r.GetCenter=t(27165),r.GetPoint=t(20812),r.GetPoints=t(34819),r.GetSize=t(51313),r.Inflate=t(86091),r.Intersection=t(53951),r.MarchingAnts=t(14649),r.MergePoints=t(33595),r.MergeRect=t(20074),r.MergeXY=t(92171),r.Offset=t(42981),r.OffsetPoint=t(46907),r.Overlaps=t(60170),r.Perimeter=t(13019),r.PerimeterPoint=t(85133),r.Random=t(26597),r.RandomOutside=t(86470),r.SameDimensions=t(94845),r.Scale=t(31730),r.Union=t(36899),a.exports=r},41658:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){var r=t.x1,p=t.y1,h=t.x2,o=t.y2,l=t.x3,n=t.y3;return Math.abs(((l-r)*(o-p)-(h-r)*(n-p))/2)};a.exports=y},39208:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(16483),p=function(h,o,l){var n=l*(Math.sqrt(3)/2),u=h,f=o,s=h+l/2,c=o+n,d=h-l/2,v=o+n;return new r(u,f,s,c,d,v)};a.exports=p},39545:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(94811),p=t(16483),h=function(o,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 s=r(o,l),c,d,v,m,S,M,A,C,w,P=0;P{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(16483),p=function(h,o,l,n){n===void 0&&(n=l);var u=h,f=o,s=h,c=o-n,d=h+l,v=o;return new r(u,f,s,c,d,v)};a.exports=p},23707:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(97523),p=t(13584),h=function(o,l,n,u){u===void 0&&(u=r);var f=u(o),s=l-f.x,c=n-f.y;return p(o,s,c)};a.exports=h},97523:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(2141),p=function(h,o){return o===void 0&&(o=new r),o.x=(h.x1+h.x2+h.x3)/3,o.y=(h.y1+h.y2+h.y3)/3,o};a.exports=p},24951:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(26099);function p(o,l,n,u){return o*u-l*n}var h=function(o,l){l===void 0&&(l=new r);var n=o.x3,u=o.y3,f=o.x1-n,s=o.y1-u,c=o.x2-n,d=o.y2-u,v=2*p(f,s,c,d),m=p(s,f*f+s*s,d,c*c+d*d),S=p(f,f*f+s*s,c,c*c+d*d);return l.x=n-m/v,l.y=u+S/v,l};a.exports=h},85614:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(96503),p=function(h,o){o===void 0&&(o=new r);var l=h.x1,n=h.y1,u=h.x2,f=h.y2,s=h.x3,c=h.y3,d=u-l,v=f-n,m=s-l,S=c-n,M=d*(l+u)+v*(n+f),A=m*(l+s)+S*(n+c),C=2*(d*(c-f)-v*(s-u)),w,P;if(Math.abs(C)<1e-6){var L=Math.min(l,u,s),O=Math.min(n,f,c);w=(Math.max(l,u,s)-L)*.5,P=(Math.max(n,f,c)-O)*.5,o.x=L+w,o.y=O+P,o.radius=Math.sqrt(w*w+P*P)}else o.x=(S*M-v*A)/C,o.y=(d*A-m*M)/C,w=o.x-l,P=o.y-n,o.radius=Math.sqrt(w*w+P*P);return o};a.exports=p},74422:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(16483),p=function(h){return new r(h.x1,h.y1,h.x2,h.y2,h.x3,h.y3)};a.exports=p},10690:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){var h=t.x3-t.x1,o=t.y3-t.y1,l=t.x2-t.x1,n=t.y2-t.y1,u=r-t.x1,f=p-t.y1,s=h*h+o*o,c=h*l+o*n,d=h*u+o*f,v=l*l+n*n,m=l*u+n*f,S=s*v-c*c,M=S===0?0:1/S,A=(v*d-c*m)*M,C=(s*m-c*d)*M;return A>=0&&C>=0&&A+C<1};a.exports=y},48653:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p,h){p===void 0&&(p=!1),h===void 0&&(h=[]);for(var o=t.x3-t.x1,l=t.y3-t.y1,n=t.x2-t.x1,u=t.y2-t.y1,f=o*o+l*l,s=o*n+l*u,c=n*n+u*u,d=f*c-s*s,v=d===0?0:1/d,m,S,M,A,C,w,P=t.x1,L=t.y1,O=0;O=0&&S>=0&&m+S<1&&(h.push({x:r[O].x,y:r[O].y}),p)));O++);return h};a.exports=y},96006:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(10690),p=function(h,o){return r(h,o.x,o.y)};a.exports=p},71326:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){return r.setTo(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)};a.exports=y},71694:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){return r===void 0&&(r=[]),r.push({x:t.x1,y:t.y1}),r.push({x:t.x2,y:t.y2}),r.push({x:t.x3,y:t.y3}),r};a.exports=y},33522:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){return t.x1===r.x1&&t.y1===r.y1&&t.x2===r.x2&&t.y2===r.y2&&t.x3===r.x3&&t.y3===r.y3};a.exports=y},20437:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(2141),p=t(35001),h=function(o,l,n){n===void 0&&(n=new r);var u=o.getLineA(),f=o.getLineB(),s=o.getLineC();if(l<=0||l>=1)return n.x=u.x1,n.y=u.y1,n;var c=p(u),d=p(f),v=p(s),m=c+d+v,S=m*l,M=0;return Sc+d?(S-=c+d,M=S/v,n.x=s.x1+(s.x2-s.x1)*M,n.y=s.y1+(s.y2-s.y1)*M):(S-=c,M=S/d,n.x=f.x1+(f.x2-f.x1)*M,n.y=f.y1+(f.y2-f.y1)*M),n};a.exports=h},80672:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(35001),p=t(2141),h=function(o,l,n,u){u===void 0&&(u=[]);var f=o.getLineA(),s=o.getLineB(),c=o.getLineC(),d=r(f),v=r(s),m=r(c),S=d+v+m;!l&&n>0&&(l=S/n);for(var M=0;Md+v?(A-=d+v,C=A/m,w.x=c.x1+(c.x2-c.x1)*C,w.y=c.y1+(c.y2-c.y1)*C):(A-=d,C=A/v,w.x=s.x1+(s.x2-s.x1)*C,w.y=s.y1+(s.y2-s.y1)*C),u.push(w)}return u};a.exports=h},39757:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(2141);function p(o,l,n,u){var f=o-n,s=l-u,c=f*f+s*s;return Math.sqrt(c)}var h=function(o,l){l===void 0&&(l=new r);var n=o.x1,u=o.y1,f=o.x2,s=o.y2,c=o.x3,d=o.y3,v=p(c,d,f,s),m=p(n,u,c,d),S=p(f,s,n,u),M=v+m+S;return l.x=(n*v+f*m+c*S)/M,l.y=(u*v+s*m+d*S)/M,l};a.exports=h},13584:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){return t.x1+=r,t.y1+=p,t.x2+=r,t.y2+=p,t.x3+=r,t.y3+=p,t};a.exports=y},1376:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(35001),p=function(h){var o=h.getLineA(),l=h.getLineB(),n=h.getLineC();return r(o)+r(l)+r(n)};a.exports=p},90260:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(2141),p=function(h,o){o===void 0&&(o=new r);var l=h.x2-h.x1,n=h.y2-h.y1,u=h.x3-h.x1,f=h.y3-h.y1,s=Math.random(),c=Math.random();return s+c>=1&&(s=1-s,c=1-c),o.x=h.x1+(l*s+u*c),o.y=h.y1+(n*s+f*c),o};a.exports=p},52172:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(99614),p=t(39757),h=function(o,l){var n=p(o);return r(o,n.x,n.y,l)};a.exports=h},49907:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(99614),p=function(h,o,l){return r(h,o.x,o.y,l)};a.exports=p},99614:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p,h){var o=Math.cos(h),l=Math.sin(h),n=t.x1-r,u=t.y1-p;return t.x1=n*o-u*l+r,t.y1=n*l+u*o+p,n=t.x2-r,u=t.y2-p,t.x2=n*o-u*l+r,t.y2=n*l+u*o+p,n=t.x3-r,u=t.y3-p,t.x3=n*o-u*l+r,t.y3=n*l+u*o+p,t};a.exports=y},16483:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(10690),h=t(20437),o=t(80672),l=t(23777),n=t(23031),u=t(90260),f=new r({initialize:function(c,d,v,m,S,M){c===void 0&&(c=0),d===void 0&&(d=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=d,this.x2=v,this.y2=m,this.x3=S,this.y3=M},contains:function(s,c){return p(this,s,c)},getPoint:function(s,c){return h(this,s,c)},getPoints:function(s,c,d){return o(this,s,c,d)},getRandomPoint:function(s){return u(this,s)},setTo:function(s,c,d,v,m,S){return s===void 0&&(s=0),c===void 0&&(c=0),d===void 0&&(d=0),v===void 0&&(v=0),m===void 0&&(m=0),S===void 0&&(S=0),this.x1=s,this.y1=c,this.x2=d,this.y2=v,this.x3=m,this.y3=S,this},getLineA:function(s){return s===void 0&&(s=new n),s.setTo(this.x1,this.y1,this.x2,this.y2),s},getLineB:function(s){return s===void 0&&(s=new n),s.setTo(this.x2,this.y2,this.x3,this.y3),s},getLineC:function(s){return s===void 0&&(s=new n),s.setTo(this.x3,this.y3,this.x1,this.y1),s},left:{get:function(){return Math.min(this.x1,this.x2,this.x3)},set:function(s){var c=0;this.x1<=this.x2&&this.x1<=this.x3?c=this.x1-s:this.x2<=this.x1&&this.x2<=this.x3?c=this.x2-s:c=this.x3-s,this.x1-=c,this.x2-=c,this.x3-=c}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(s){var c=0;this.x1>=this.x2&&this.x1>=this.x3?c=this.x1-s:this.x2>=this.x1&&this.x2>=this.x3?c=this.x2-s:c=this.x3-s,this.x1-=c,this.x2-=c,this.x3-=c}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(s){var c=0;this.y1<=this.y2&&this.y1<=this.y3?c=this.y1-s:this.y2<=this.y1&&this.y2<=this.y3?c=this.y2-s:c=this.y3-s,this.y1-=c,this.y2-=c,this.y3-=c}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(s){var c=0;this.y1>=this.y2&&this.y1>=this.y3?c=this.y1-s:this.y2>=this.y1&&this.y2>=this.y3?c=this.y2-s:c=this.y3-s,this.y1-=c,this.y2-=c,this.y3-=c}}});a.exports=f},84435:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(16483);r.Area=t(41658),r.BuildEquilateral=t(39208),r.BuildFromPolygon=t(39545),r.BuildRight=t(90301),r.CenterOn=t(23707),r.Centroid=t(97523),r.CircumCenter=t(24951),r.CircumCircle=t(85614),r.Clone=t(74422),r.Contains=t(10690),r.ContainsArray=t(48653),r.ContainsPoint=t(96006),r.CopyFrom=t(71326),r.Decompose=t(71694),r.Equals=t(33522),r.GetPoint=t(20437),r.GetPoints=t(80672),r.InCenter=t(39757),r.Perimeter=t(1376),r.Offset=t(13584),r.Random=t(90260),r.Rotate=t(52172),r.RotateAroundPoint=t(49907),r.RotateAroundXY=t(99614),a.exports=r},74457:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){return{gameObject:t,enabled:!0,draggable:!1,dropZone:!1,cursor:!1,target:null,camera:null,hitArea:r,hitAreaCallback:p,hitAreaDebug:null,customHitArea:!1,localX:0,localY:0,dragState:0,dragStartX:0,dragStartY:0,dragStartXGlobal:0,dragStartYGlobal:0,dragX:0,dragY:0}};a.exports=y},84409:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){return function(p,h,o,l){var n=t.getPixelAlpha(h,o,l.texture.key,l.frame.name);return n&&n>=r}};a.exports=y},7003:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(93301),h=t(50792),o=t(8214),l=t(8443),n=t(78970),u=t(85098),f=t(42515),s=t(36210),c=t(61340),d=t(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 s(this):null,this.pointers=[],this.pointersTotal=M.inputActivePointers,M.inputTouch&&this.pointersTotal===1&&(this.pointersTotal=2);for(var A=0;A<=this.pointersTotal;A++){var C=new f(this,A);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(o.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(o.GAME_OVER,m)},setCanvasOut:function(m){this.isOver=!1,this.events.emit(o.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(o.MANAGER_UPDATE);for(var A=0;A10&&(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=t(96503),p=t(87902),h=t(83419),o=t(93301),l=t(74457),n=t(84409),u=t(20339),f=t(8497),s=t(81154),c=t(8214),d=t(50792),v=t(95540),m=t(23777),S=t(89639),M=t(41212),A=t(37277),C=t(87841),w=t(37303),P=t(44594),L=t(16483),O=t(10690),I=new h({Extends:d,initialize:function(B){d.call(this),this.scene=B,this.systems=B.sys,this.settings=B.sys.settings,this.manager=B.sys.game.input,this.pluginEvents=new d,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 W=this._list,k=0;k-1&&(W.splice(Q,1),this.clear(J,!0))}this._pendingRemoval.length=0,this._list=W.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,W=z.pointers,k=z.pointersTotal;for(G=0;G0)if(this._pollTimer-=B,this._pollTimer<0)this._pollTimer=this.pollRate;else return!1;var Q=!1;for(G=0;G0&&(Q=!0)}return Q},update:function(D,B){if(!this.isActive())return!1;for(var G=B.length,z=!1,W=0;W0&&(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,W=this.manager,k=0,J;k-1&&G[k].splice(J,1),J=z[k].indexOf(D),J>-1&&z[k].splice(J,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,W}return D.camera=B[0],[]},processDownEvents:function(D){var B=0,G=this._temp,z=this._eventData,W=this._eventContainer;z.cancelled=!1;for(var k=!1,J=0;J0&&u(D.x,D.y,D.downX,D.downY)>=W||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?(W.emit(c.GAMEOBJECT_DRAG_LEAVE,D,J),this.emit(c.DRAG_LEAVE,D,W,J),k.target=B[0],J=k.target,W.emit(c.GAMEOBJECT_DRAG_ENTER,D,J),this.emit(c.DRAG_ENTER,D,W,J)):(W.emit(c.GAMEOBJECT_DRAG_LEAVE,D,J),this.emit(c.DRAG_LEAVE,D,W,J),B[0]?(k.target=B[0],J=k.target,W.emit(c.GAMEOBJECT_DRAG_ENTER,D,J),this.emit(c.DRAG_ENTER,D,W,J)):k.target=null)}else!J&&B[0]&&(k.target=B[0],J=k.target,W.emit(c.GAMEOBJECT_DRAG_ENTER,D,J),this.emit(c.DRAG_ENTER,D,W,J));var Y,K;if(!W.parentContainer)Y=D.worldX-k.dragX,K=D.worldY-k.dragY;else{var U=D.worldX-k.dragStartXGlobal,V=D.worldY-k.dragStartYGlobal,j=W.getParentRotation(),$=U*Math.cos(j)+V*Math.sin(j),q=V*Math.cos(j)-U*Math.sin(j);$*=1/W.parentContainer.scaleX,q*=1/W.parentContainer.scaleY,Y=$+k.dragStartX,K=q+k.dragStartY}W.emit(c.GAMEOBJECT_DRAG,D,Y,K),this.emit(c.DRAG,D,W,Y,K)}return G.length},processDragUpEvent:function(D){for(var B=this._drag[D.id],G=0;G0){var k=this.manager,J=this._eventData,Q=this._eventContainer;J.cancelled=!1;for(var Y=!1,K=0;K0){var W=this.manager,k=this._eventData,J=this._eventContainer;k.cancelled=!1;var Q=!1;this.sortGameObjects(B,D);for(var Y=0;Y0){for(this.sortGameObjects(W,D),G=0;G0){for(this.sortGameObjects(k,D),G=0;G-1&&this._draggable.splice(W,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,W=!1,k=!1,J=!1,Q=!1,Y=!0;if(M(B)&&Object.keys(B).length){var K=B,U=D.some(function(it){return it.hasOwnProperty("faces")});if(!U){B=v(K,"hitArea",null),G=v(K,"hitAreaCallback",null),Q=v(K,"pixelPerfect",!1);var V=v(K,"alphaTolerance",1);Q&&(B={},G=this.makePixelPerfect(V))}z=v(K,"draggable",!1),W=v(K,"dropZone",!1),k=v(K,"cursor",!1),J=v(K,"useHandCursor",!1),(!B||!G)&&(this.setHitAreaFromTexture(D),Y=!1)}else typeof B=="function"&&!G&&(G=B,B={});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=t(35154),p={},h={};h.register=function(o,l,n,u,f){p[o]={plugin:l,mapping:n,settingsKey:u,configKey:f}},h.getPlugin=function(o){return p[o]},h.install=function(o){var l=o.scene.sys,n=l.settings.input,u=l.game.config;for(var f in p){var s=p[f].plugin,c=p[f].mapping,d=p[f].settingsKey,v=p[f].configKey;r(n,d,u[v])&&(o[c]=new s(o))}},h.remove=function(o){p.hasOwnProperty(o)&&delete p[o]},a.exports=h},42515:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(31040),p=t(83419),h=t(20339),o=t(43855),l=t(47235),n=t(26099),u=t(25892),f=new p({initialize:function(c,d){this.manager=c,this.id=d,this.event,this.downElement,this.upElement,this.camera=null,this.button=0,this.buttons=0,this.position=new n,this.prevPosition=new n,this.midPoint=new n(-1,-1),this.velocity=new n,this.angle=0,this.distance=0,this.smoothFactor=0,this.motionFactor=.2,this.worldX=0,this.worldY=0,this.moveTime=0,this.downX=0,this.downY=0,this.downTime=0,this.upX=0,this.upY=0,this.upTime=0,this.primaryDown=!1,this.isDown=!1,this.wasTouch=!1,this.wasCanceled=!1,this.movementX=0,this.movementY=0,this.identifier=0,this.pointerId=null,this.active=d===0,this.locked=!1,this.deltaX=0,this.deltaY=0,this.deltaZ=0},updateWorldPoint:function(s){var c=s.getWorldPoint(this.x,this.y);return this.worldX=c.x,this.worldY=c.y,this},positionToCamera:function(s,c){return s.getWorldPoint(this.x,this.y,c)},updateMotion:function(){var s=this.position.x,c=this.position.y,d=this.midPoint.x,v=this.midPoint.y;if(!(s===d&&c===v)){var m=l(this.motionFactor,d,s),S=l(this.motionFactor,v,c);o(m,s,.1)&&(m=s),o(S,c,.1)&&(S=c),this.midPoint.set(m,S);var M=s-m,A=c-S;this.velocity.set(M,A),this.angle=r(m,S,s,c),this.distance=Math.sqrt(M*M+A*A)}},up:function(s){"buttons"in s&&(this.buttons=s.buttons),this.event=s,this.button=s.button,this.upElement=s.target,this.manager.transformPointer(this,s.pageX,s.pageY,!1),s.button===0&&(this.primaryDown=!1,this.upX=this.x,this.upY=this.y),this.buttons===0&&(this.isDown=!1,this.upTime=s.timeStamp,this.wasTouch=!1)},down:function(s){"buttons"in s&&(this.buttons=s.buttons),this.event=s,this.button=s.button,this.downElement=s.target,this.manager.transformPointer(this,s.pageX,s.pageY,!1),s.button===0&&(this.primaryDown=!0,this.downX=this.x,this.downY=this.y),u.macOS&&s.ctrlKey&&(this.buttons=2,this.primaryDown=!1),this.isDown||(this.isDown=!0,this.downTime=s.timeStamp),this.wasTouch=!1},move:function(s){"buttons"in s&&(this.buttons=s.buttons),this.event=s,this.manager.transformPointer(this,s.pageX,s.pageY,!0),this.locked&&(this.movementX=s.movementX||s.mozMovementX||s.webkitMovementX||0,this.movementY=s.movementY||s.mozMovementY||s.webkitMovementY||0),this.moveTime=s.timeStamp,this.wasTouch=!1},wheel:function(s){"buttons"in s&&(this.buttons=s.buttons),this.event=s,this.manager.transformPointer(this,s.pageX,s.pageY,!1),this.deltaX=s.deltaX,this.deltaY=s.deltaY,this.deltaZ=s.deltaZ,this.wasTouch=!1},touchstart:function(s,c){s.pointerId&&(this.pointerId=s.pointerId),this.identifier=s.identifier,this.target=s.target,this.active=!0,this.buttons=1,this.event=c,this.downElement=s.target,this.manager.transformPointer(this,s.pageX,s.pageY,!1),this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=c.timeStamp,this.isDown=!0,this.wasTouch=!0,this.wasCanceled=!1,this.updateMotion()},touchmove:function(s,c){this.event=c,this.manager.transformPointer(this,s.pageX,s.pageY,!0),this.moveTime=c.timeStamp,this.wasTouch=!0,this.updateMotion()},touchend:function(s,c){this.buttons=0,this.event=c,this.upElement=s.target,this.manager.transformPointer(this,s.pageX,s.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=c.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!1,this.active=!1,this.updateMotion()},touchcancel:function(s,c){this.buttons=0,this.event=c,this.upElement=s.target,this.manager.transformPointer(this,s.pageX,s.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=c.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!0,this.active=!1},noButtonDown:function(){return this.buttons===0},leftButtonDown:function(){return!!(this.buttons&1)},rightButtonDown:function(){return!!(this.buttons&2)},middleButtonDown:function(){return!!(this.buttons&4)},backButtonDown:function(){return!!(this.buttons&8)},forwardButtonDown:function(){return!!(this.buttons&16)},leftButtonReleased:function(){return this.button===0&&!this.isDown},rightButtonReleased:function(){return this.button===2&&!this.isDown},middleButtonReleased:function(){return this.button===1&&!this.isDown},backButtonReleased:function(){return this.button===3&&!this.isDown},forwardButtonReleased:function(){return this.button===4&&!this.isDown},getDistance:function(){return this.isDown?h(this.downX,this.downY,this.x,this.y):h(this.downX,this.downY,this.upX,this.upY)},getDistanceX:function(){return this.isDown?Math.abs(this.downX-this.x):Math.abs(this.downX-this.upX)},getDistanceY:function(){return this.isDown?Math.abs(this.downY-this.y):Math.abs(this.downY-this.upY)},getDuration:function(){return this.isDown?this.manager.time-this.downTime:this.upTime-this.downTime},getAngle:function(){return this.isDown?r(this.downX,this.downY,this.x,this.y):r(this.downX,this.downY,this.upX,this.upY)},getInterpolatedPosition:function(s,c){s===void 0&&(s=10),c===void 0&&(c=[]);for(var d=this.prevPosition.x,v=this.prevPosition.y,m=this.position.x,S=this.position.y,M=0;M{/** + * @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};a.exports=y},7179:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="boot"},85375:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="destroy"},39843:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="dragend"},23388:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="dragenter"},16133:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="drag"},27829:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="dragleave"},53904:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="dragover"},56058:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="dragstart"},2642:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="drop"},88171:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="gameobjectdown"},36147:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="dragend"},71692:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="dragenter"},96149:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="drag"},81285:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="dragleave"},74048:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="dragover"},21322:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="dragstart"},49378:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="drop"},86754:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="gameobjectmove"},86433:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="gameobjectout"},60709:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="gameobjectover"},24081:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="pointerdown"},11172:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="pointermove"},18907:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="pointerout"},95579:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="pointerover"},35368:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="pointerup"},26972:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="wheel"},47078:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="gameobjectup"},73802:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="gameobjectwheel"},56718:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="gameout"},25936:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="gameover"},27503:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="boot"},50852:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="process"},96438:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="update"},59152:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="pointerlockchange"},47777:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="pointerdown"},27957:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="pointerdownoutside"},19444:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="pointermove"},54251:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="pointerout"},18667:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="pointerover"},27192:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="pointerup"},24652:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="pointerupoutside"},45132:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="wheel"},44512:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="preupdate"},15757:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="shutdown"},41637:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="start"},93802:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="update"},8214:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={BOOT:t(7179),DESTROY:t(85375),DRAG_END:t(39843),DRAG_ENTER:t(23388),DRAG:t(16133),DRAG_LEAVE:t(27829),DRAG_OVER:t(53904),DRAG_START:t(56058),DROP:t(2642),GAME_OUT:t(56718),GAME_OVER:t(25936),GAMEOBJECT_DOWN:t(88171),GAMEOBJECT_DRAG_END:t(36147),GAMEOBJECT_DRAG_ENTER:t(71692),GAMEOBJECT_DRAG:t(96149),GAMEOBJECT_DRAG_LEAVE:t(81285),GAMEOBJECT_DRAG_OVER:t(74048),GAMEOBJECT_DRAG_START:t(21322),GAMEOBJECT_DROP:t(49378),GAMEOBJECT_MOVE:t(86754),GAMEOBJECT_OUT:t(86433),GAMEOBJECT_OVER:t(60709),GAMEOBJECT_POINTER_DOWN:t(24081),GAMEOBJECT_POINTER_MOVE:t(11172),GAMEOBJECT_POINTER_OUT:t(18907),GAMEOBJECT_POINTER_OVER:t(95579),GAMEOBJECT_POINTER_UP:t(35368),GAMEOBJECT_POINTER_WHEEL:t(26972),GAMEOBJECT_UP:t(47078),GAMEOBJECT_WHEEL:t(73802),MANAGER_BOOT:t(27503),MANAGER_PROCESS:t(50852),MANAGER_UPDATE:t(96438),POINTER_DOWN:t(47777),POINTER_DOWN_OUTSIDE:t(27957),POINTER_MOVE:t(19444),POINTER_OUT:t(54251),POINTER_OVER:t(18667),POINTER_UP:t(27192),POINTER_UP_OUTSIDE:t(24652),POINTER_WHEEL:t(45132),POINTERLOCK_CHANGE:t(59152),PRE_UPDATE:t(44512),SHUTDOWN:t(15757),START:t(41637),UPDATE:t(93802)}},97421:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=new r({initialize:function(o,l){this.pad=o,this.events=o.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=t(83419),p=t(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(o){this.value=o;var l=this.pad,n=this.index;o>=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(p.BUTTON_DOWN,l,this,o),this.pad.emit(p.GAMEPAD_BUTTON_DOWN,n,o,this)):this.pressed&&(this.pressed=!1,this.events.emit(p.BUTTON_UP,l,this,o),this.pad.emit(p.GAMEPAD_BUTTON_UP,n,o,this))},destroy:function(){this.pad=null,this.events=null}});a.exports=h},99125:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(97421),p=t(28884),h=t(83419),o=t(50792),l=t(26099),n=new h({Extends:o,initialize:function(f,s){o.call(this),this.manager=f,this.pad=s,this.id=s.id,this.index=s.index;for(var c=[],d=0;d=2&&(this.leftStick.set(v[0].getValue(),v[1].getValue()),d>=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} + */var r=t(83419),p=t(50792),h=t(92734),o=t(99125),l=t(35154),n=t(89639),u=t(8214),f=new r({Extends:p,initialize:function(c){p.call(this),this.scene=c.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=c,this.enabled=!0,this.target,this.gamepads=[],this.queue=[],this.onGamepadHandler,this._pad1,this._pad2,this._pad3,this._pad4,c.pluginEvents.once(u.BOOT,this.boot,this),c.pluginEvents.on(u.START,this.start,this)},boot:function(){var s=this.scene.sys.game,c=this.settings.input,d=s.config;this.enabled=l(c,"gamepad",d.inputGamepad)&&s.device.input.gamepads,this.target=l(c,"gamepad.target",d.inputGamepadEventTarget),this.sceneInputPlugin.pluginEvents.once(u.DESTROY,this.destroy,this)},start:function(){this.enabled&&(this.startListeners(),this.refreshPads()),this.sceneInputPlugin.pluginEvents.once(u.SHUTDOWN,this.shutdown,this)},isActive:function(){return this.enabled&&this.scene.sys.isActive()},startListeners:function(){var s=this,c=this.target,d=function(v){v.defaultPrevented||!s.isActive()||(s.refreshPads(),s.queue.push(v))};this.onGamepadHandler=d,c.addEventListener("gamepadconnected",d,!1),c.addEventListener("gamepaddisconnected",d,!1),this.sceneInputPlugin.pluginEvents.on(u.UPDATE,this.update,this)},stopListeners:function(){this.target.removeEventListener("gamepadconnected",this.onGamepadHandler),this.target.removeEventListener("gamepaddisconnected",this.onGamepadHandler),this.sceneInputPlugin.pluginEvents.off(u.UPDATE,this.update);for(var s=0;s{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SELECT:8,START:9,B:0,A:1,Y:2,X:3,LEFT_SHOULDER:4,RIGHT_SHOULDER:5}},65294:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SHARE:8,OPTIONS:9,PS:16,TOUCHBAR:17,X:0,CIRCLE:1,SQUARE:2,TRIANGLE:3,L1:4,R1:5,L2:6,R2:7,L3:10,R3:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}},90089:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.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:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={DUALSHOCK_4:t(65294),SNES_USB:t(89651),XBOX_360:t(90089)}},46008:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="down"},7629:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="up"},42206:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="connected"},86544:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="disconnected"},94784:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="down"},14325:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="up"},92734:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={BUTTON_DOWN:t(46008),BUTTON_UP:t(7629),CONNECTED:t(42206),DISCONNECTED:t(86544),GAMEPAD_BUTTON_DOWN:t(94784),GAMEPAD_BUTTON_UP:t(14325)}},48646:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={Axis:t(97421),Button:t(28884),Events:t(92734),Gamepad:t(99125),GamepadPlugin:t(56654),Configs:t(64894)}},14350:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(93301),p=t(79291),h={CreatePixelPerfectHandler:t(84409),CreateInteractiveObject:t(74457),Events:t(8214),Gamepad:t(48646),InputManager:t(7003),InputPlugin:t(48205),InputPluginCache:t(89639),Keyboard:t(51442),Mouse:t(87078),Pointer:t(42515),Touch:t(95618)};h=p(!1,h,r),a.exports=h},78970:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(72905),p=t(83419),h=t(8443),o=t(8214),l=t(46032),n=t(29747),u=new p({initialize:function(s){this.manager=s,this.queue=[],this.preventDefault=!0,this.captures=[],this.enabled=!1,this.target,this.onKeyDown=n,this.onKeyUp=n,s.events.once(o.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(o.MANAGER_PROCESS);var d=c.altKey||c.ctrlKey||c.shiftKey||c.metaKey;f.preventDefault&&!d&&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(o.MANAGER_PROCESS);var d=c.altKey||c.ctrlKey||c.shiftKey||c.metaKey;f.preventDefault&&!d&&f.captures.indexOf(c.keyCode)>-1&&c.preventDefault()}};var s=this.target;s&&(s.addEventListener("keydown",this.onKeyDown,!1),s.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 s=this.captures,c=0;c0},removeCapture:function(f){typeof f=="string"&&(f=f.split(",")),Array.isArray(f)||(f=[f]);for(var s=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}});a.exports=u},28846:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(50792),h=t(95922),o=t(8443),l=t(35154),n=t(8214),u=t(89639),f=t(30472),s=t(46032),c=t(87960),d=t(74600),v=t(44594),m=t(56583),S=new r({Extends:p,initialize:function(A){p.call(this),this.game=A.systems.game,this.scene=A.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=A,this.manager=A.manager.keyboard,this.enabled=!0,this.keys=[],this.combos=[],this.prevCode=null,this.prevTime=0,this.prevType=null,A.pluginEvents.once(n.BOOT,this.boot,this),A.pluginEvents.on(n.START,this.start,this)},boot:function(){var M=this.settings.input;this.enabled=l(M,"keyboard",!0);var A=l(M,"keyboard.capture",null);A&&this.addCaptures(A),this.sceneInputPlugin.pluginEvents.once(n.DESTROY,this.destroy,this)},start:function(){this.sceneInputPlugin.manager.events.on(n.MANAGER_PROCESS,this.update,this),this.sceneInputPlugin.pluginEvents.once(n.SHUTDOWN,this.shutdown,this),this.game.events.on(o.BLUR,this.resetKeys,this),this.scene.sys.events.on(v.PAUSE,this.resetKeys,this),this.scene.sys.events.on(v.SLEEP,this.resetKeys,this)},isActive:function(){return this.enabled&&this.scene.sys.canInput()},addCapture:function(M){return this.manager.addCapture(M),this},removeCapture:function(M){return this.manager.removeCapture(M),this},getCaptures:function(){return this.manager.captures},enableGlobalCapture:function(){return this.manager.preventDefault=!0,this},disableGlobalCapture:function(){return this.manager.preventDefault=!1,this},clearCaptures:function(){return this.manager.clearCaptures(),this},createCursorKeys:function(){return this.addKeys({up:s.UP,down:s.DOWN,left:s.LEFT,right:s.RIGHT,space:s.SPACE,shift:s.SHIFT})},addKeys:function(M,A,C){A===void 0&&(A=!0),C===void 0&&(C=!1);var w={};if(typeof M=="string"){M=M.split(",");for(var P=0;P-1?w[P]=M:w[M.keyCode]=M,A&&this.addCapture(M.keyCode),M.setEmitOnRepeat(C),M}return typeof M=="string"&&(M=s[M.toUpperCase()]),w[M]||(w[M]=new f(this,M),A&&this.addCapture(M),w[M].setEmitOnRepeat(C)),w[M]},removeKey:function(M,A,C){A===void 0&&(A=!1),C===void 0&&(C=!1);var w=this.keys,P;if(M instanceof f){var L=w.indexOf(M);L>-1&&(P=this.keys[L],this.keys[L]=void 0)}else typeof M=="string"&&(M=s[M.toUpperCase()]);return w[M]&&(P=w[M],w[M]=void 0),P&&(P.plugin=null,C&&this.removeCapture(P.keyCode),A&&P.destroy()),this},removeAllKeys:function(M,A){M===void 0&&(M=!1),A===void 0&&(A=!1);for(var C=this.keys,w=0;wM._tick)return M._tick=C,!0}return!1},update:function(){var M=this.manager.queue,A=M.length;if(!(!this.isActive()||A===0))for(var C=this.keys,w=0;w{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){return r.timeLastMatched=t.timeStamp,r.index++,r.index===r.size?!0:(r.current=r.keyCodes[r.index],!1)};a.exports=y},87960:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(95922),h=t(95540),o=t(68769),l=t(92803),n=new r({initialize:function(f,s,c){if(c===void 0&&(c={}),s.length<2)return!1;this.manager=f,this.enabled=!0,this.keyCodes=[];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=t(66970),p=function(h,o){if(o.matched)return!0;var l=!1,n=!1;if(h.keyCode===o.current)if(o.index>0&&o.maxKeyDelay>0){var u=o.timeLastMatched+o.maxKeyDelay;h.timeStamp<=u&&(n=!0,l=r(h,o))}else n=!0,l=r(h,o);return!n&&o.resetOnWrongKey&&(o.index=0,o.current=o.keyCodes[0]),l&&(o.timeLastMatched=h.timeStamp,o.matched=!0,o.timeMatched=h.timeStamp),l};a.exports=p},92803:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return t.current=t.keyCodes[0],t.index=0,t.timeLastMatched=0,t.matched=!1,t.timeMatched=0,t};a.exports=y},92612:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="keydown"},23345:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="keyup"},21957:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="keycombomatch"},44743:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="down"},3771:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="keydown-"},46358:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="keyup-"},75674:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="up"},95922:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={ANY_KEY_DOWN:t(92612),ANY_KEY_UP:t(23345),COMBO_MATCH:t(21957),DOWN:t(44743),KEY_DOWN:t(3771),KEY_UP:t(46358),UP:t(75674)}},51442:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={Events:t(95922),KeyboardManager:t(78970),KeyboardPlugin:t(28846),Key:t(30472),KeyCodes:t(46032),KeyCombo:t(87960),AdvanceKeyCombo:t(66970),ProcessKeyCombo:t(68769),ResetKeyCombo:t(92803),JustDown:t(90229),JustUp:t(38796),DownDuration:t(37015),UpDuration:t(41170)}},37015:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){r===void 0&&(r=50);var p=t.plugin.game.loop.time-t.timeDown;return t.isDown&&p{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return t._justDown?(t._justDown=!1,!0):!1};a.exports=y},38796:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return t._justUp?(t._justUp=!1,!0):!1};a.exports=y},30472:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(50792),h=t(95922),o=new r({Extends:p,initialize:function(n,u){p.call(this),this.plugin=n,this.keyCode=u,this.originalEvent=void 0,this.enabled=!0,this.isDown=!1,this.isUp=!0,this.altKey=!1,this.ctrlKey=!1,this.shiftKey=!1,this.metaKey=!1,this.location=0,this.timeDown=0,this.duration=0,this.timeUp=0,this.emitOnRepeat=!1,this.repeats=0,this._justDown=!1,this._justUp=!1,this._tick=-1},setEmitOnRepeat:function(l){return this.emitOnRepeat=l,this},onDown:function(l){this.originalEvent=l,this.enabled&&(this.altKey=l.altKey,this.ctrlKey=l.ctrlKey,this.shiftKey=l.shiftKey,this.metaKey=l.metaKey,this.location=l.location,this.repeats++,this.isDown?this.emitOnRepeat&&this.emit(h.DOWN,this,l):(this.isDown=!0,this.isUp=!1,this.timeDown=l.timeStamp,this.duration=0,this._justDown=!0,this._justUp=!1,this.emit(h.DOWN,this,l)))},onUp:function(l){this.originalEvent=l,this.enabled&&(this.isDown=!1,this.isUp=!0,this.timeUp=l.timeStamp,this.duration=this.timeUp-this.timeDown,this.repeats=0,this._justDown=!1,this._justUp=!0,this._tick=-1,this.emit(h.UP,this,l))},reset:function(){return this.isDown=!1,this.isUp=!0,this.altKey=!1,this.ctrlKey=!1,this.shiftKey=!1,this.metaKey=!1,this.timeDown=0,this.duration=0,this.timeUp=0,this.repeats=0,this._justDown=!1,this._justUp=!1,this._tick=-1,this},getDuration:function(){return this.isDown?this.plugin.game.loop.time-this.timeDown:0},destroy:function(){this.removeAllListeners(),this.originalEvent=null,this.plugin=null}});a.exports=o},46032:a=>{/** + * @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};a.exports=y},74600:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(46032),p={};for(var h in r)p[r[h]]=h;a.exports=p},41170:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){r===void 0&&(r=50);var p=t.plugin.game.loop.time-t.timeUp;return t.isUp&&p{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(89357),h=t(8214),o=t(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=o,this.onMouseDown=o,this.onMouseUp=o,this.onMouseDownWindow=o,this.onMouseUpWindow=o,this.onMouseOver=o,this.onMouseOut=o,this.onMouseWheel=o,this.pointerLockChange=o,this.isTop=!0,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(p.pointerLock){var n=this.target;n.requestPointerLock=n.requestPointerLock||n.mozRequestPointerLock||n.webkitRequestPointerLock,n.requestPointerLock()}},releasePointerLock:function(){p.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,s=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===s&&v.preventDefault())},this.onMouseDownWindow=function(v){v.sourceCapabilities&&v.sourceCapabilities.firesTouchEvents||!v.defaultPrevented&&u.enabled&&f&&f.enabled&&v.target!==s&&f.onMouseDown(v)},this.onMouseUp=function(v){!v.defaultPrevented&&u.enabled&&f&&f.enabled&&(f.onMouseUp(v),u.preventDefaultUp&&v.target===s&&v.preventDefault())},this.onMouseUpWindow=function(v){v.sourceCapabilities&&v.sourceCapabilities.firesTouchEvents||!v.defaultPrevented&&u.enabled&&f&&f.enabled&&v.target!==s&&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===s&&v.preventDefault()};var d={passive:!0};if(n.addEventListener("mousemove",this.onMouseMove),n.addEventListener("mousedown",this.onMouseDown),n.addEventListener("mouseup",this.onMouseUp),n.addEventListener("mouseover",this.onMouseOver,d),n.addEventListener("mouseout",this.onMouseOut,d),this.preventDefaultWheel?n.addEventListener("wheel",this.onMouseWheel,{passive:!1}):n.addEventListener("wheel",this.onMouseWheel,d),window&&f.game.config.inputWindowEvents)try{window.top.addEventListener("mousedown",this.onMouseDownWindow,d),window.top.addEventListener("mouseup",this.onMouseUpWindow,d)}catch{window.addEventListener("mousedown",this.onMouseDownWindow,d),window.addEventListener("mouseup",this.onMouseUpWindow,d),this.isTop=!1}p.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)),p.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}});a.exports=l},87078:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={MouseManager:t(85098)}},36210:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(8214),h=t(29747),o=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(p.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,s=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){s&&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,d={passive:!0},v={passive:!1};if(l.addEventListener("touchstart",this.onTouchStart,c?v:d),l.addEventListener("touchmove",this.onTouchMove,c?v:d),l.addEventListener("touchend",this.onTouchEnd,c?v:d),l.addEventListener("touchcancel",this.onTouchCancel,c?v:d),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}});a.exports=o},95618:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={TouchManager:t(36210)}},41299:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(23906),h=t(54899),o=t(95540),l=t(98356),n=t(3374),u=t(84376),f=t(92638),s=new r({initialize:function(d,v){if(this.loader=d,this.cache=o(v,"cache",!1),this.type=o(v,"type",!1),!this.type)throw new Error("Invalid File type: "+this.type);this.key=o(v,"key",!1);var m=this.key;if(d.prefix&&d.prefix!==""&&(this.key=d.prefix+m),!this.key)throw new Error("Invalid File key: "+this.key);var S=o(v,"url");S===void 0?S=d.path+m+"."+o(v,"extension",""):typeof S=="string"&&!S.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)&&(S=d.path+S),this.url=S,this.src="",this.xhrSettings=f(o(v,"responseType",void 0)),o(v,"xhrSettings",!1)&&(this.xhrSettings=n(this.xhrSettings,o(v,"xhrSettings",{}))),this.xhrLoader=null,this.state=typeof this.url=="function"?p.FILE_POPULATED:p.FILE_PENDING,this.bytesTotal=0,this.bytesLoaded=-1,this.percentComplete=-1,this.crossOrigin=void 0,this.data=void 0,this.config=o(v,"config",{}),this.multiFile,this.linkFile,this.base64=typeof S=="string"&&S.indexOf("data:")===0},setLink:function(c){this.linkFile=c,c.linkFile=this},resetXHR:function(){this.xhrLoader&&(this.xhrLoader.onload=void 0,this.xhrLoader.onerror=void 0,this.xhrLoader.onprogress=void 0)},load:function(){this.state===p.FILE_POPULATED?this.loader.nextFile(this,!0):(this.state=p.FILE_LOADING,this.src=l(this,this.loader.baseURL),this.src.indexOf("data:")===0&&(this.base64=!0),this.xhrLoader=u(this,this.loader.xhr))},onLoad:function(c,d){var v=c.responseURL&&this.loader.localSchemes.some(function(M){return c.responseURL.indexOf(M)===0}),m=v&&d.target.status===0,S=!(d.target&&d.target.status!==200)||m;c.readyState===4&&c.status>=400&&c.status<=599&&(S=!1),this.state=p.FILE_LOADED,this.resetXHR(),this.loader.nextFile(this,S)},onBase64Load:function(c){this.xhrLoader=c,this.state=p.FILE_LOADED,this.percentComplete=1,this.loader.emit(h.FILE_PROGRESS,this,this.percentComplete),this.loader.nextFile(this,!0)},onError:function(){this.resetXHR(),this.loader.nextFile(this,!1)},onProgress:function(c){c.lengthComputable&&(this.bytesLoaded=c.loaded,this.bytesTotal=c.total,this.percentComplete=Math.min(this.bytesLoaded/this.bytesTotal,1),this.loader.emit(h.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=p.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=p.FILE_COMPLETE,this.multiFile&&this.multiFile.onFileComplete(this),this.loader.fileProcessComplete(this)},onProcessError:function(){console.error('Failed to process file: %s "%s"',this.type,this.key),this.state=p.FILE_ERRORED,this.multiFile&&this.multiFile.onFileFailed(this),this.loader.fileProcessComplete(this)},hasCacheConflict:function(){return this.cache&&this.cache.exists(this.key)},addToCache:function(){this.cache&&this.data&&this.cache.add(this.key,this.data)},pendingDestroy:function(c){if(this.state!==p.FILE_PENDING_DESTROY){c===void 0&&(c=this.data);var d=this.key,v=this.type;this.loader.emit(h.FILE_COMPLETE,d,v,c),this.loader.emit(h.FILE_KEY_COMPLETE+v+"-"+d,d,v,c),this.loader.flagForRemoval(this),this.state=p.FILE_PENDING_DESTROY}},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});s.createObjectURL=function(c,d,v){if(typeof URL=="function")c.src=URL.createObjectURL(d);else{var m=new FileReader;m.onload=function(){c.removeAttribute("crossOrigin"),c.src="data:"+(d.type||v)+";base64,"+m.result.split(",")[1]},m.onerror=c.onerror,m.readAsDataURL(d)}},s.revokeObjectURL=function(c){typeof URL=="function"&&URL.revokeObjectURL(c.src)},a.exports=s},74099:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y={},t={install:function(r){for(var p in y)r[p]=y[p]},register:function(r,p){y[r]=p},destroy:function(){y={}}};a.exports=t},98356:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){return t.url?t.url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)?t.url:r+t.url:!1};a.exports=y},74261:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(23906),h=t(35072),o=t(50792),l=t(54899),n=t(74099),u=t(95540),f=t(35154),s=t(37277),c=t(44594),d=t(92638),v=new r({Extends:o,initialize:function(S){o.call(this);var M=S.sys.game.config,A=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(A,"baseURL",M.loaderBaseURL)),this.setPath(u(A,"path",M.loaderPath)),this.setPrefix(u(A,"prefix",M.loaderPrefix)),this.maxParallelDownloads=u(A,"maxParallelDownloads",M.loaderMaxParallelDownloads),this.xhr=d(u(A,"responseType",M.loaderResponseType),u(A,"async",M.loaderAsync),u(A,"user",M.loaderUser),u(A,"password",M.loaderPassword),u(A,"timeout",M.loaderTimeout),u(A,"withCredentials",M.loaderWithCredentials)),this.crossOrigin=u(A,"crossOrigin",M.loaderCrossOrigin),this.imageLoadType=u(A,"imageLoadType",M.loaderImageLoadType),this.localSchemes=u(A,"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=p.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===p.LOADER_LOADING||this.state===p.LOADER_PROCESSING},isReady:function(){return this.state===p.LOADER_IDLE||this.state===p.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=p.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===p.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=t(79291),p=t(92638),h=function(o,l){var n=o===void 0?p():r({},o);if(l)for(var u in l)l[u]!==void 0&&(n[u]=l[u]);return n};a.exports=h},26430:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(23906),h=t(54899),o=new r({initialize:function(n,u,f,s){var c=[];s.forEach(function(m){m&&c.push(m)}),this.loader=n,this.type=u,this.key=f;var d=this.key;n.prefix&&n.prefix!==""&&(this.key=n.prefix+d),this.multiKeyIndex=n.multiKeyIndex++,this.files=c,this.state=p.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} + */var r=t(3374),p=function(h,o){var l=r(o,h.xhrSettings);if(h.base64){var n=h.url.split(";base64,").pop()||h.url.split(",").pop(),u={responseText:atob(n)};h.onBase64Load(u);return}var f=new XMLHttpRequest;if(f.open("GET",h.src,l.async,l.user,l.password),f.responseType=h.xhrSettings.responseType,f.timeout=l.timeout,l.headers)for(var s in l.headers)f.setRequestHeader(s,l.headers[s]);return l.header&&l.headerValue&&f.setRequestHeader(l.header,l.headerValue),l.requestedWith&&f.setRequestHeader("X-Requested-With",l.requestedWith),l.overrideMimeType&&f.overrideMimeType(l.overrideMimeType),l.withCredentials&&(f.withCredentials=!0),f.onload=h.onLoad.bind(h,f),f.onerror=h.onError.bind(h,f),f.onprogress=h.onProgress.bind(h),f.ontimeout=h.onError.bind(h,f),f.send(),f};a.exports=p},92638:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p,h,o,l){return t===void 0&&(t=""),r===void 0&&(r=!0),p===void 0&&(p=""),h===void 0&&(h=""),o===void 0&&(o=0),l===void 0&&(l=!1),{responseType:t,async:r,user:p,password:h,timeout:o,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:l}};a.exports=y},23906:a=>{/** + * @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};a.exports=y},42155:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="addfile"},38991:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="complete"},27540:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="filecomplete"},87464:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="filecomplete-"},94486:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="loaderror"},13035:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="load"},38144:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="fileprogress"},97520:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="postprocess"},85595:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="progress"},55680:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="start"},54899:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={ADD:t(42155),COMPLETE:t(38991),FILE_COMPLETE:t(27540),FILE_KEY_COMPLETE:t(87464),FILE_LOAD_ERROR:t(94486),FILE_LOAD:t(13035),FILE_PROGRESS:t(38144),POST_PROCESS:t(97520),PROGRESS:t(85595),START:t(55680)}},14135:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(74099),h=t(518),o=t(54899),l=new r({Extends:h,initialize:function(u,f,s,c,d){h.call(this,u,f,s,c,d),this.type="animationJSON"},onProcess:function(){this.loader.once(o.POST_PROCESS,this.onLoadComplete,this),h.prototype.onProcess.call(this)},onLoadComplete:function(){this.loader.systems.anims.fromJSON(this.data)}});p.register("animation",function(n,u,f,s){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=t(83419),p=t(74099),h=t(95540),o=t(19550),l=t(41212),n=t(518),u=t(26430),f=new r({Extends:u,initialize:function(c,d,v,m,S,M){var A,C;if(l(d)){var w=d;d=h(w,"key"),A=new o(c,{key:d,url:h(w,"textureURL"),extension:h(w,"textureExtension","png"),normalMap:h(w,"normalMap"),xhrSettings:h(w,"textureXhrSettings")}),C=new n(c,{key:d,url:h(w,"atlasURL"),extension:h(w,"atlasExtension","json"),xhrSettings:h(w,"atlasXhrSettings")})}else A=new o(c,d,v,S),C=new n(c,d,m,M);A.linkFile?u.call(this,c,"atlasjson",d,[A,C,A.linkFile]):u.call(this,c,"atlasjson",d,[A,C])},addToCache:function(){if(this.isReadyToProcess()){var s=this.files[0],c=this.files[1],d=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(s.key,s.data,c.data,d),c.addToCache(),this.complete=!0}}});p.register("aseprite",function(s,c,d,v,m){var S;if(Array.isArray(s))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=t(83419),p=t(74099),h=t(95540),o=t(19550),l=t(41212),n=t(518),u=t(26430),f=new r({Extends:u,initialize:function(c,d,v,m,S,M){var A,C;if(l(d)){var w=d;d=h(w,"key"),A=new o(c,{key:d,url:h(w,"textureURL"),extension:h(w,"textureExtension","png"),normalMap:h(w,"normalMap"),xhrSettings:h(w,"textureXhrSettings")}),C=new n(c,{key:d,url:h(w,"atlasURL"),extension:h(w,"atlasExtension","json"),xhrSettings:h(w,"atlasXhrSettings")})}else A=new o(c,d,v,S),C=new n(c,d,m,M);A.linkFile?u.call(this,c,"atlasjson",d,[A,C,A.linkFile]):u.call(this,c,"atlasjson",d,[A,C])},addToCache:function(){if(this.isReadyToProcess()){var s=this.files[0],c=this.files[1],d=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(s.key,s.data,c.data,d),this.complete=!0}}});p.register("atlas",function(s,c,d,v,m){var S;if(Array.isArray(s))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=t(83419),p=t(74099),h=t(95540),o=t(19550),l=t(41212),n=t(26430),u=t(57318),f=new r({Extends:n,initialize:function(c,d,v,m,S,M){var A,C;if(l(d)){var w=d;d=h(w,"key"),A=new o(c,{key:d,url:h(w,"textureURL"),extension:h(w,"textureExtension","png"),normalMap:h(w,"normalMap"),xhrSettings:h(w,"textureXhrSettings")}),C=new u(c,{key:d,url:h(w,"atlasURL"),extension:h(w,"atlasExtension","xml"),xhrSettings:h(w,"atlasXhrSettings")})}else A=new o(c,d,v,S),C=new u(c,d,m,M);A.linkFile?n.call(this,c,"atlasxml",d,[A,C,A.linkFile]):n.call(this,c,"atlasxml",d,[A,C])},addToCache:function(){if(this.isReadyToProcess()){var s=this.files[0],c=this.files[1],d=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlasXML(s.key,s.data,c.data,d),this.complete=!0}}});p.register("atlasXML",function(s,c,d,v,m){var S;if(Array.isArray(s))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=t(83419),p=t(23906),h=t(41299),o=t(74099),l=t(95540),n=t(89749),u=t(41212),f=new r({Extends:h,initialize:function(c,d,v,m,S){if(u(d)){var M=d;d=l(M,"key"),m=l(M,"xhrSettings"),S=l(M,"context",S)}var A={type:"audio",cache:c.cacheManager.audio,extension:v.type,responseType:"arraybuffer",key:d,url:v.url,xhrSettings:m,config:{context:S}};h.call(this,c,A)},onProcess:function(){this.state=p.FILE_PROCESSING;var s=this;this.config.context.decodeAudioData(this.xhrLoader.response,function(c){s.data=c,s.onProcessComplete()},function(c){console.error("Error decoding audio: "+s.key+" - ",c?c.message:null),s.onProcessError()}),this.config.context=null}});f.create=function(s,c,d,v,m){var S=s.systems.game,M=S.config.audio,A=S.device.audio;u(c)&&(d=l(c,"url",[]),v=l(c,"config",{}));var C=f.getAudioURL(S,d);return C?A.webAudio&&!M.disableWebAudio?new f(s,c,C,m,S.sound.context):new n(s,c,C,v):(console.warn('No audio URLs for "%s" matched this device',c),null)},f.getAudioURL=function(s,c){Array.isArray(c)||(c=[c]);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=t(21097),p=t(83419),h=t(74099),o=t(95540),l=t(41212),n=t(518),u=t(26430),f=new p({Extends:u,initialize:function(c,d,v,m,S,M,A){if(l(d)){var C=d;d=o(C,"key"),v=o(C,"jsonURL"),m=o(C,"audioURL"),S=o(C,"audioConfig"),M=o(C,"audioXhrSettings"),A=o(C,"jsonXhrSettings")}var w;if(!m)w=new n(c,d,v,A),u.call(this,c,"audiosprite",d,[w]),this.config.resourceLoad=!0,this.config.audioConfig=S,this.config.audioXhrSettings=M;else{var P=r.create(c,d,m,S,M);P&&(w=new n(c,d,v,A),u.call(this,c,"audiosprite",d,[P,w]),this.config.resourceLoad=!1)}},onFileComplete:function(s){var c=this.files.indexOf(s);if(c!==-1&&(this.pending--,this.config.resourceLoad&&s.type==="json"&&s.data.hasOwnProperty("resources"))){var d=s.data.resources,v=o(this.config,"audioConfig"),m=o(this.config,"audioXhrSettings"),S=r.create(this.loader,s.key,d,v,m);S&&(this.addToMultiFile(S),this.loader.addFile(S))}},addToCache:function(){if(this.isReadyToProcess()){var s=this.files[0],c=this.files[1];s.addToCache(),c.addToCache(),this.complete=!0}}});h.register("audioSprite",function(s,c,d,v,m,S){var M=this.systems.game,A=M.config.audio,C=M.device.audio;if(A&&A.noAudio||!C.webAudio&&!C.audioData)return this;var w;if(Array.isArray(s))for(var P=0;P{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(23906),h=t(41299),o=t(74099),l=t(95540),n=t(41212),u=new r({Extends:h,initialize:function(s,c,d,v,m){var S="bin";if(n(c)){var M=c;c=l(M,"key"),d=l(M,"url"),v=l(M,"xhrSettings"),S=l(M,"extension",S),m=l(M,"dataType",m)}var A={type:"binary",cache:s.cacheManager.binary,extension:S,responseType:"arraybuffer",key:c,url:d,xhrSettings:v,config:{dataType:m}};h.call(this,s,A)},onProcess:function(){this.state=p.FILE_PROCESSING;var f=this.config.dataType;this.data=f?new f(this.xhrLoader.response):this.xhrLoader.response,this.onProcessComplete()}});o.register("binary",function(f,s,c,d){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=t(83419),p=t(74099),h=t(95540),o=t(19550),l=t(41212),n=t(26430),u=t(21859),f=t(57318),s=new r({Extends:n,initialize:function(d,v,m,S,M,A){var C,w;if(l(v)){var P=v;v=h(P,"key"),C=new o(d,{key:v,url:h(P,"textureURL"),extension:h(P,"textureExtension","png"),normalMap:h(P,"normalMap"),xhrSettings:h(P,"textureXhrSettings")}),w=new f(d,{key:v,url:h(P,"fontDataURL"),extension:h(P,"fontDataExtension","xml"),xhrSettings:h(P,"fontDataXhrSettings")})}else C=new o(d,v,m,M),w=new f(d,v,S,A);C.linkFile?n.call(this,d,"bitmapfont",v,[C,w,C.linkFile]):n.call(this,d,"bitmapfont",v,[C,w])},addToCache:function(){if(this.isReadyToProcess()){var c=this.files[0],d=this.files[1];c.addToCache();var v=c.cache.get(c.key),m=u(d.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}}});p.register("bitmapFont",function(c,d,v,m,S){var M;if(Array.isArray(c))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=t(83419),p=t(23906),h=t(41299),o=t(74099),l=t(95540),n=t(41212),u=new r({Extends:h,initialize:function(s,c,d,v){var m="css";if(n(c)){var S=c;c=l(S,"key"),d=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:d,xhrSettings:v};h.call(this,s,M)},onProcess:function(){this.state=p.FILE_PROCESSING,this.data=document.createElement("style"),this.data.defer=!1,this.data.innerHTML=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});o.register("css",function(f,s,c){if(Array.isArray(f))for(var d=0;d{/** + * @author Richard Davey + * @copyright 2021 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(38734),p=t(85722),h=t(83419),o=t(74099),l=t(95540),n=t(19550),u=t(41212),f=t(518),s=t(31403),c=t(46975),d=t(59327),v=t(26430),m=t(82038),S=t(55222),M=new h({Extends:v,initialize:function(C,w,P,L){if(P.multiAtlasURL){var O=new f(C,{key:w,url:P.multiAtlasURL,xhrSettings:L,config:P});v.call(this,C,"texture",w,[O])}else{var I=P.textureURL.substr(P.textureURL.length-3);P.type||(P.type=I.toLowerCase()==="ktx"?"KTX":"PVR");var D=new p(C,{key:w,url:P.textureURL,extension:I,xhrSettings:L,config:P});if(P.atlasURL){var B=new f(C,{key:w,url:P.atlasURL,xhrSettings:L,config:P});v.call(this,C,"texture",w,[D,B])}else v.call(this,C,"texture",w,[D])}this.config=P},onFileComplete:function(A){var C=this.files.indexOf(A);if(C!==-1){if(this.pending--,!this.config.multiAtlasURL)return;if(A.type==="json"&&A.data.hasOwnProperty("textures")){var w=A.data.textures,P=this.config,L=this.loader,O=L.baseURL,I=L.path,D=L.prefix,B=l(P,"multiBaseURL",this.baseURL),G=l(P,"multiPath",this.path),z=l(P,"prefix",this.prefix),W=l(P,"textureXhrSettings");B&&L.setBaseURL(B),G&&L.setPath(G),z&&L.setPrefix(z);for(var k=0;k{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(23906),h=t(41299),o=t(74099),l=t(95540),n=t(41212),u=t(73894),f=new r({Extends:h,initialize:function(c,d,v,m,S){var M="glsl";if(n(d)){var A=d;d=l(A,"key"),v=l(A,"url"),m=l(A,"shaderType","fragment"),S=l(A,"xhrSettings"),M=l(A,"extension",M)}else m===void 0&&(m="fragment");var C={type:"glsl",cache:c.cacheManager.shader,extension:M,responseType:"text",key:d,url:v,config:{shaderType:m},xhrSettings:S};h.call(this,c,C)},onProcess:function(){this.state=p.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var s=this.data.split(` +`),c=this.extractBlock(s,0);if(c)for(;c;){var d=this.getShaderName(c.header),v=this.getShaderType(c.header),m=this.getShaderUniforms(c.header),S=c.shader;if(this.cache.has(d)){var M=this.cache.get(d);v==="fragment"?M.fragmentSrc=S:M.vertexSrc=S,M.uniforms||(M.uniforms=m)}else v==="fragment"?this.cache.add(d,new u(d,S,"",m)):this.cache.add(d,new u(d,"",S,m));c=this.extractBlock(s,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(s){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=t(83419),p=t(54899),h=t(41299),o=t(95540),l=t(98356),n=t(41212),u=new r({Extends:h,initialize:function(s,c,d,v){if(n(c)){var m=c;c=o(m,"key"),v=o(m,"config",v)}var S={type:"audio",cache:s.cacheManager.audio,extension:d.type,key:c,url:d.url,config:v};h.call(this,s,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=t(83419),p=t(23906),h=t(41299),o=t(74099),l=t(95540),n=t(41212),u=new r({Extends:h,initialize:function(s,c,d,v){var m="html";if(n(c)){var S=c;c=l(S,"key"),d=l(S,"url"),v=l(S,"xhrSettings"),m=l(S,"extension",m)}var M={type:"text",cache:s.cacheManager.html,extension:m,responseType:"text",key:c,url:d,xhrSettings:v};h.call(this,s,M)},onProcess:function(){this.state=p.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});o.register("html",function(f,s,c){if(Array.isArray(f))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=t(83419),p=t(23906),h=t(41299),o=t(74099),l=t(95540),n=t(41212),u=new r({Extends:h,initialize:function(s,c,d,v,m,S){v===void 0&&(v=512),m===void 0&&(m=512);var M="html";if(n(c)){var A=c;c=l(A,"key"),d=l(A,"url"),S=l(A,"xhrSettings"),M=l(A,"extension",M),v=l(A,"width",v),m=l(A,"height",m)}var C={type:"html",cache:s.textureManager,extension:M,responseType:"text",key:c,url:d,xhrSettings:S,config:{width:v,height:m}};h.call(this,s,C)},onProcess:function(){this.state=p.FILE_PROCESSING;var f=this.config.width,s=this.config.height,c=[];c.push(''),c.push(''),c.push(''),c.push(this.xhrLoader.responseText),c.push(""),c.push(""),c.push("");var d=[c.join(` +`)],v=this;try{var m=new window.Blob(d,{type:"image/svg+xml;charset=utf-8"})}catch{v.state=p.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)}});o.register("htmlTexture",function(f,s,c,d,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=t(83419),p=t(23906),h=t(41299),o=t(74099),l=t(95540),n=t(41212),u=t(98356),f=new r({Extends:h,initialize:function s(c,d,v,m,S){var M="png",A;if(n(d)){var C=d;d=l(C,"key"),v=l(C,"url"),A=l(C,"normalMap"),m=l(C,"xhrSettings"),M=l(C,"extension",M),S=l(C,"frameConfig")}Array.isArray(v)&&(A=v[1],v=v[0]);var w={type:"image",cache:c.textureManager,extension:M,responseType:"blob",key:d,url:v,xhrSettings:m,config:S};if(h.call(this,c,w),A){var P=new s(c,this.key,A,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=p.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var s=this;this.data.onload=function(){h.revokeObjectURL(s.data),s.onProcessComplete()},this.data.onerror=function(){h.revokeObjectURL(s.data),s.onProcessError()},h.createObjectURL(this.data,this.xhrLoader.response,"image/png")},onProcessImage:function(){var s=this.state;this.state=p.FILE_PROCESSING,s===p.FILE_LOADED?this.onProcessComplete():this.onProcessError()},loadImage:function(){this.state=p.FILE_LOADING,this.src=u(this,this.loader.baseURL),this.data=new Image,this.data.crossOrigin=this.crossOrigin;var s=this;this.data.onload=function(){s.state=p.FILE_LOADED,s.loader.nextFile(s,!0)},this.data.onerror=function(){s.loader.nextFile(s,!1)},this.data.src=this.src},addToCache:function(){var s=this.linkFile;s?s.state>=p.FILE_COMPLETE&&(s.type==="spritesheet"?s.addToCache():this.type==="normalMap"?this.cache.addImage(this.key,s.data,this.data):this.cache.addImage(this.key,this.data,s.data)):this.cache.addImage(this.key,this.data)}});o.register("image",function(s,c,d){if(Array.isArray(s))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=t(83419),p=t(23906),h=t(41299),o=t(74099),l=t(95540),n=t(35154),u=t(41212),f=new r({Extends:h,initialize:function(c,d,v,m,S){var M="json";if(u(d)){var A=d;d=l(A,"key"),v=l(A,"url"),m=l(A,"xhrSettings"),M=l(A,"extension",M),S=l(A,"dataKey",S)}var C={type:"json",cache:c.cacheManager.json,extension:M,responseType:"text",key:d,url:v,xhrSettings:m,config:S};h.call(this,c,C),u(v)&&(S?this.data=n(v,S):this.data=v,this.state=p.FILE_POPULATED)},onProcess:function(){if(this.state!==p.FILE_POPULATED){this.state=p.FILE_PROCESSING;try{var s=JSON.parse(this.xhrLoader.responseText)}catch(d){throw this.onProcessError(),d}var c=this.config;typeof c=="string"?this.data=n(s,c,s):this.data=s}this.onProcessComplete()}});o.register("json",function(s,c,d,v){if(Array.isArray(s))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=t(83419),p=t(74099),h=t(95540),o=t(19550),l=t(41212),n=t(518),u=t(26430),f=new r({Extends:u,initialize:function(c,d,v,m,S,M,A){if(l(d)){var C=d;d=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"),A=h(C,"textureXhrSettings")}var w=new n(c,d,v,M);u.call(this,c,"multiatlas",d,[w]),this.config.path=m,this.config.baseURL=S,this.config.textureXhrSettings=A},onFileComplete:function(s){var c=this.files.indexOf(s);if(c!==-1&&(this.pending--,s.type==="json"&&s.data.hasOwnProperty("textures"))){var d=s.data.textures,v=this.config,m=this.loader,S=m.baseURL,M=m.path,A=m.prefix,C=h(v,"baseURL",this.baseURL),w=h(v,"path",this.path),P=h(v,"prefix",this.prefix),L=h(v,"textureXhrSettings");m.setBaseURL(C),m.setPath(w),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=t(83419),p=t(74099),h=t(95540),o=t(41212),l=t(26430),n=t(34328),u=new r({Extends:l,initialize:function(s,c,d,v){var m="js",S=[];if(o(c)){var M=c;c=h(M,"key"),d=h(M,"url"),v=h(M,"xhrSettings"),m=h(M,"extension",m)}Array.isArray(d)||(d=[d]);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=t(83419),p=t(74099),h=t(95540),o=t(41212),l=t(26430),n=t(85048),u=t(61485),f=t(78776),s=new r({Extends:l,initialize:function(d,v,m,S,M,A){var C,w,P=d.cacheManager.obj;if(o(v)){var L=v;v=h(L,"key"),C=new f(d,{key:v,type:"obj",cache:P,url:h(L,"url"),extension:h(L,"extension","obj"),xhrSettings:h(L,"xhrSettings"),config:{flipUV:h(L,"flipUV",M)}}),S=h(L,"matURL"),S&&(w=new f(d,{key:v,type:"mat",cache:P,url:S,extension:h(L,"matExtension","mat"),xhrSettings:h(L,"xhrSettings")}))}else C=new f(d,{key:v,url:m,type:"obj",cache:P,extension:"obj",xhrSettings:A,config:{flipUV:M}}),S&&(w=new f(d,{key:v,url:S,type:"mat",cache:P,extension:"mat",xhrSettings:A}));l.call(this,d,"obj",v,[C,w])},addToCache:function(){if(this.isReadyToProcess()){var c=this.files[0],d=this.files[1],v=n(c.data,c.config.flipUV);d&&(v.materials=u(d.data)),c.cache.add(c.key,v),this.complete=!0}}});p.register("obj",function(c,d,v,m,S){var M;if(Array.isArray(c))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=t(83419),p=t(23906),h=t(74099),o=t(518),l=new r({Extends:o,initialize:function(u,f,s,c,d){o.call(this,u,f,s,c,d),this.type="packfile"},onProcess:function(){if(this.state!==p.FILE_POPULATED&&(this.state=p.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,s){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=t(83419),p=t(23906),h=t(41299),o=t(74099),l=t(95540),n=t(41212),u=new r({Extends:h,initialize:function(s,c,d,v,m,S){var M="js";if(n(c)){var A=c;c=l(A,"key"),d=l(A,"url"),S=l(A,"xhrSettings"),M=l(A,"extension",M),v=l(A,"start"),m=l(A,"mapping")}var C={type:"plugin",cache:!1,extension:M,responseType:"text",key:c,url:d,xhrSettings:S,config:{start:v,mapping:m}};h.call(this,s,C),typeof d=="function"&&(this.data=d,this.state=p.FILE_POPULATED)},onProcess:function(){var f=this.loader.systems.plugins,s=this.config,c=l(s,"start",!1),d=l(s,"mapping",null);if(this.state===p.FILE_POPULATED)f.install(this.key,this.data,c,d);else{this.state=p.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,d);(c||d)&&(this.loader.systems[d]=v,this.loader.scene[d]=v)}this.onProcessComplete()}});o.register("plugin",function(f,s,c,d,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=t(83419),p=t(23906),h=t(41299),o=t(74099),l=t(95540),n=t(41212),u=new r({Extends:h,initialize:function(s,c,d,v,m){var S="svg";if(n(c)){var M=c;c=l(M,"key"),d=l(M,"url"),v=l(M,"svgConfig",{}),m=l(M,"xhrSettings"),S=l(M,"extension",S)}var A={type:"svg",cache:s.textureManager,extension:S,responseType:"text",key:c,url:d,xhrSettings:m,config:{width:l(v,"width"),height:l(v,"height"),scale:l(v,"scale")}};h.call(this,s,A)},onProcess:function(){this.state=p.FILE_PROCESSING;var f=this.xhrLoader.responseText,s=[f],c=this.config.width,d=this.config.height,v=this.config.scale;t:if(c&&d||v){var m=null,S=new DOMParser;m=S.parseFromString(f,"text/xml");var M=m.getElementsByTagName("svg")[0],A=M.hasAttribute("viewBox"),C=parseFloat(M.getAttribute("width")),w=parseFloat(M.getAttribute("height"));if(!A&&C&&w)M.setAttribute("viewBox","0 0 "+C+" "+w);else if(A&&!C&&!w){var P=M.getAttribute("viewBox").split(/\s+|,/);C=P[2],w=P[3]}if(v)if(C&&w)c=C*v,d=w*v;else break t;M.setAttribute("width",c.toString()+"px"),M.setAttribute("height",d.toString()+"px"),s=[new XMLSerializer().serializeToString(M)]}try{var L=new window.Blob(s,{type:"image/svg+xml;charset=utf-8"})}catch{this.onProcessError();return}this.data=new Image,this.data.crossOrigin=this.crossOrigin;var 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(s.join("")))},h.createObjectURL(this.data,L,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});o.register("svg",function(f,s,c,d){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=t(83419),p=t(23906),h=t(41299),o=t(74099),l=t(95540),n=t(41212),u=new r({Extends:h,initialize:function(s,c,d,v){var m="js";if(n(c)){var S=c;c=l(S,"key"),d=l(S,"url"),v=l(S,"xhrSettings"),m=l(S,"extension",m)}var M={type:"text",extension:m,responseType:"text",key:c,url:d,xhrSettings:v};h.call(this,s,M)},onProcess:function(){this.state=p.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var f=this.data.concat(`(function(){ +return new `+this.key+`(); +}).call(this);`),s=eval;this.loader.sceneManager.add(this.key,s(f)),this.complete=!0}});o.register("sceneFile",function(f,s,c){if(Array.isArray(f))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=t(83419),p=t(23906),h=t(41299),o=t(74099),l=t(95540),n=t(41212),u=new r({Extends:h,initialize:function(s,c,d,v,m,S){var M="js";if(n(c)){var A=c;c=l(A,"key"),d=l(A,"url"),S=l(A,"xhrSettings"),M=l(A,"extension",M),v=l(A,"systemKey"),m=l(A,"sceneKey")}var C={type:"scenePlugin",cache:!1,extension:M,responseType:"text",key:c,url:d,xhrSettings:S,config:{systemKey:v,sceneKey:m}};h.call(this,s,C),typeof d=="function"&&(this.data=d,this.state=p.FILE_POPULATED)},onProcess:function(){var f=this.loader.systems.plugins,s=this.config,c=this.key,d=l(s,"systemKey",c),v=l(s,"sceneKey",c);this.state===p.FILE_POPULATED?f.installScenePlugin(d,this.data,v,this.loader.scene,!0):(this.state=p.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(d,window[this.key],v,this.loader.scene,!0)),this.onProcessComplete()}});o.register("scenePlugin",function(f,s,c,d,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=t(83419),p=t(23906),h=t(41299),o=t(74099),l=t(95540),n=t(41212),u=new r({Extends:h,initialize:function(s,c,d,v,m){var S="js";if(n(c)){var M=c;c=l(M,"key"),d=l(M,"url"),v=l(M,"type","script"),m=l(M,"xhrSettings"),S=l(M,"extension",S)}else v===void 0&&(v="script");var A={type:v,cache:!1,extension:S,responseType:"text",key:c,url:d,xhrSettings:m};h.call(this,s,A)},onProcess:function(){this.state=p.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()}});o.register("script",function(f,s,c,d){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=t(83419),p=t(23906),h=t(74099),o=t(19550),l=new r({Extends:o,initialize:function(u,f,s,c,d){o.call(this,u,f,s,d,c),this.type="spritesheet"},addToCache:function(){var n=this.linkFile;n?n.state>=p.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,s){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=t(83419),p=t(23906),h=t(41299),o=t(74099),l=t(95540),n=t(41212),u=new r({Extends:h,initialize:function(s,c,d,v){var m="text",S="txt",M=s.cacheManager.text;if(n(c)){var A=c;c=l(A,"key"),d=l(A,"url"),v=l(A,"xhrSettings"),S=l(A,"extension",S),m=l(A,"type",m),M=l(A,"cache",M)}var C={type:m,cache:M,extension:S,responseType:"text",key:c,url:d,xhrSettings:v};h.call(this,s,C)},onProcess:function(){this.state=p.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});o.register("text",function(f,s,c){if(Array.isArray(f))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=t(83419),p=t(23906),h=t(41299),o=t(74099),l=t(95540),n=t(41212),u=t(80341),f=new r({Extends:h,initialize:function(c,d,v,m){var S="csv";if(n(d)){var M=d;d=l(M,"key"),v=l(M,"url"),m=l(M,"xhrSettings"),S=l(M,"extension",S)}var A={type:"tilemapCSV",cache:c.cacheManager.tilemap,extension:S,responseType:"text",key:d,url:v,xhrSettings:m};h.call(this,c,A),this.tilemapFormat=u.CSV},onProcess:function(){this.state=p.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var s={format:this.tilemapFormat,data:this.data};this.cache.add(this.key,s)}});o.register("tilemapCSV",function(s,c,d){if(Array.isArray(s))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=t(83419),p=t(74099),h=t(518),o=t(80341),l=new r({Extends:h,initialize:function(u,f,s,c){h.call(this,u,f,s,c),this.type="tilemapJSON",this.cache=u.cacheManager.tilemap},addToCache:function(){var n={format:o.WELTMEISTER,data:this.data};this.cache.add(this.key,n)}});p.register("tilemapImpact",function(n,u,f){if(Array.isArray(n))for(var s=0;s{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(74099),h=t(518),o=t(80341),l=new r({Extends:h,initialize:function(u,f,s,c){h.call(this,u,f,s,c),this.type="tilemapJSON",this.cache=u.cacheManager.tilemap},addToCache:function(){var n={format:o.TILED_JSON,data:this.data};this.cache.add(this.key,n)}});p.register("tilemapTiledJSON",function(n,u,f){if(Array.isArray(n))for(var s=0;s{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(74099),h=t(95540),o=t(19550),l=t(41212),n=t(26430),u=t(78776),f=new r({Extends:n,initialize:function(c,d,v,m,S,M){var A,C;if(l(d)){var w=d;d=h(w,"key"),A=new o(c,{key:d,url:h(w,"textureURL"),extension:h(w,"textureExtension","png"),normalMap:h(w,"normalMap"),xhrSettings:h(w,"textureXhrSettings")}),C=new u(c,{key:d,url:h(w,"atlasURL"),extension:h(w,"atlasExtension","txt"),xhrSettings:h(w,"atlasXhrSettings")})}else A=new o(c,d,v,S),C=new u(c,d,m,M);A.linkFile?n.call(this,c,"unityatlas",d,[A,C,A.linkFile]):n.call(this,c,"unityatlas",d,[A,C])},addToCache:function(){if(this.isReadyToProcess()){var s=this.files[0],c=this.files[1],d=this.files[2]?this.files[2].data:null;this.loader.textureManager.addUnityAtlas(s.key,s.data,c.data,d),this.complete=!0}}});p.register("unityAtlas",function(s,c,d,v,m){var S;if(Array.isArray(s))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=t(83419),p=t(23906),h=t(41299),o=t(74099),l=t(98356),n=t(95540),u=t(41212),f=new r({Extends:h,initialize:function(c,d,v,m){if(m===void 0&&(m=!1),u(d)){var S=d;d=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 "+d);var A={type:"video",cache:c.cacheManager.video,extension:M.type,key:d,url:M.url,config:{noAudio:m}};h.call(this,c,A)},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=p.FILE_LOADED,this.loader.nextFile(this,!0)}});o.register("video",function(s,c,d){if(Array.isArray(s))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=t(83419),p=t(23906),h=t(41299),o=t(74099),l=t(95540),n=t(41212),u=t(56836),f=new r({Extends:h,initialize:function(c,d,v,m){var S="xml";if(n(d)){var M=d;d=l(M,"key"),v=l(M,"url"),m=l(M,"xhrSettings"),S=l(M,"extension",S)}var A={type:"xml",cache:c.cacheManager.xml,extension:S,responseType:"text",key:d,url:v,xhrSettings:m};h.call(this,c,A)},onProcess:function(){this.state=p.FILE_PROCESSING,this.data=u(this.xhrLoader.responseText),this.data?this.onProcessComplete():this.onProcessError()}});o.register("xml",function(s,c,d){if(Array.isArray(s))for(var v=0;v{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={AnimationJSONFile:t(14135),AsepriteFile:t(76272),AtlasJSONFile:t(38734),AtlasXMLFile:t(74599),AudioFile:t(21097),AudioSpriteFile:t(89524),BinaryFile:t(85722),BitmapFontFile:t(97025),CompressedTextureFile:t(69559),CSSFile:t(16024),GLSLFile:t(47931),HTML5AudioFile:t(89749),HTMLFile:t(88470),HTMLTextureFile:t(14643),ImageFile:t(19550),JSONFile:t(518),MultiAtlasFile:t(59327),MultiScriptFile:t(99297),OBJFile:t(41846),PackFile:t(58610),PluginFile:t(48988),SceneFile:t(88423),ScenePluginFile:t(56812),ScriptFile:t(34328),SpriteSheetFile:t(85035),SVGFile:t(67397),TextFile:t(78776),TilemapCSVFile:t(49477),TilemapImpactFile:t(40807),TilemapJSONFile:t(56775),UnityAtlasFile:t(25771),VideoFile:t(33720),XMLFile:t(57318)}},57777:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(23906),p=t(79291),h={Events:t(54899),FileTypes:t(64589),File:t(41299),FileTypesManager:t(74099),GetURL:t(98356),LoaderPlugin:t(74261),MergeXHRSettings:t(3374),MultiFile:t(26430),XHRLoader:t(84376),XHRSettings:t(92638)};h=p(!1,h,r),a.exports=h},53307:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){for(var r=0,p=0;p{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(6411),p=function(h,o){return r(h)/r(o)/r(h-o)};a.exports=p},30976:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){return Math.floor(Math.random()*(r-t+1)+t)};a.exports=y},87842:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p,h,o){var l=(h-r)*.5,n=(o-p)*.5,u=t*t,f=t*u;return(2*p-2*h+l+n)*f+(-3*p+3*h-2*l-n)*u+l*t+p};a.exports=y},26302:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){r===void 0&&(r=0),p===void 0&&(p=10);var h=Math.pow(p,-r);return Math.ceil(t*h)/h};a.exports=y},45319:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){return Math.max(r,Math.min(p,t))};a.exports=y},39506:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(36383),p=function(h){return h*r.DEG_TO_RAD};a.exports=p},61241:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){return Math.abs(t-r)};a.exports=y},38857:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(45319),p=t(83419),h=t(37867),o=t(29747),l=new h,n=new p({initialize:function u(f,s,c,d){f===void 0&&(f=0),s===void 0&&(s=0),c===void 0&&(c=0),d===void 0&&(d=u.DefaultOrder),this._x=f,this._y=s,this._z=c,this._order=d,this.onChangeCallback=o},x:{get:function(){return this._x},set:function(u){this._x=u,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(u){this._y=u,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(u){this._z=u,this.onChangeCallback(this)}},order:{get:function(){return this._order},set:function(u){this._order=u,this.onChangeCallback(this)}},set:function(u,f,s,c){return c===void 0&&(c=this._order),this._x=u,this._y=f,this._z=s,this._order=c,this.onChangeCallback(this),this},copy:function(u){return this.set(u.x,u.y,u.z,u.order)},setFromQuaternion:function(u,f,s){return f===void 0&&(f=this._order),s===void 0&&(s=!1),l.fromQuat(u),this.setFromRotationMatrix(l,f,s)},setFromRotationMatrix:function(u,f,s){f===void 0&&(f=this._order),s===void 0&&(s=!1);var c=u.val,d=c[0],v=c[4],m=c[8],S=c[1],M=c[5],A=c[9],C=c[2],w=c[6],P=c[10],L=0,O=0,I=0,D=.99999;switch(f){case"XYZ":{O=Math.asin(r(m,-1,1)),Math.abs(m){/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){if(t===0)return 1;for(var r=t;--t;)r*=t;return r};a.exports=y},99472:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){return Math.random()*(r-t)+t};a.exports=y},77623:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){r===void 0&&(r=0),p===void 0&&(p=10);var h=Math.pow(p,-r);return Math.floor(t*h)/h};a.exports=y},62945:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(45319),p=function(h,o,l){return h=r(h,0,1),(l-o)*h+o};a.exports=p},38265:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){return t/r/1e3};a.exports=y},78702:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return t==parseFloat(t)?!(t%2):void 0};a.exports=y},94883:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return t===parseFloat(t)?!(t%2):void 0};a.exports=y},28915:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){return(r-t)*p+t};a.exports=y},94908:a=>{/** + * @author Greg McLean + * @copyright 2021 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){return p===void 0&&(p=0),t.clone().lerp(r,p)};a.exports=y},94434:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=new r({initialize:function(o){this.val=new Float32Array(9),o?this.copy(o):this.identity()},clone:function(){return new p(this)},set:function(h){return this.copy(h)},copy:function(h){var o=this.val,l=h.val;return o[0]=l[0],o[1]=l[1],o[2]=l[2],o[3]=l[3],o[4]=l[4],o[5]=l[5],o[6]=l[6],o[7]=l[7],o[8]=l[8],this},fromMat4:function(h){var o=h.val,l=this.val;return l[0]=o[0],l[1]=o[1],l[2]=o[2],l[3]=o[4],l[4]=o[5],l[5]=o[6],l[6]=o[8],l[7]=o[9],l[8]=o[10],this},fromArray:function(h){var o=this.val;return o[0]=h[0],o[1]=h[1],o[2]=h[2],o[3]=h[3],o[4]=h[4],o[5]=h[5],o[6]=h[6],o[7]=h[7],o[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,o=h[1],l=h[2],n=h[5];return h[1]=h[3],h[2]=h[6],h[3]=o,h[5]=h[7],h[6]=l,h[7]=n,this},invert:function(){var h=this.val,o=h[0],l=h[1],n=h[2],u=h[3],f=h[4],s=h[5],c=h[6],d=h[7],v=h[8],m=v*f-s*d,S=-v*u+s*c,M=d*u-f*c,A=o*m+l*S+n*M;return A?(A=1/A,h[0]=m*A,h[1]=(-v*l+n*d)*A,h[2]=(s*l-n*f)*A,h[3]=S*A,h[4]=(v*o-n*c)*A,h[5]=(-s*o+n*u)*A,h[6]=M*A,h[7]=(-d*o+l*c)*A,h[8]=(f*o-l*u)*A,this):null},adjoint:function(){var h=this.val,o=h[0],l=h[1],n=h[2],u=h[3],f=h[4],s=h[5],c=h[6],d=h[7],v=h[8];return h[0]=f*v-s*d,h[1]=n*d-l*v,h[2]=l*s-n*f,h[3]=s*c-u*v,h[4]=o*v-n*c,h[5]=n*u-o*s,h[6]=u*d-f*c,h[7]=l*c-o*d,h[8]=o*f-l*u,this},determinant:function(){var h=this.val,o=h[0],l=h[1],n=h[2],u=h[3],f=h[4],s=h[5],c=h[6],d=h[7],v=h[8];return o*(v*f-s*d)+l*(-v*u+s*c)+n*(d*u-f*c)},multiply:function(h){var o=this.val,l=o[0],n=o[1],u=o[2],f=o[3],s=o[4],c=o[5],d=o[6],v=o[7],m=o[8],S=h.val,M=S[0],A=S[1],C=S[2],w=S[3],P=S[4],L=S[5],O=S[6],I=S[7],D=S[8];return o[0]=M*l+A*f+C*d,o[1]=M*n+A*s+C*v,o[2]=M*u+A*c+C*m,o[3]=w*l+P*f+L*d,o[4]=w*n+P*s+L*v,o[5]=w*u+P*c+L*m,o[6]=O*l+I*f+D*d,o[7]=O*n+I*s+D*v,o[8]=O*u+I*c+D*m,this},translate:function(h){var o=this.val,l=h.x,n=h.y;return o[6]=l*o[0]+n*o[3]+o[6],o[7]=l*o[1]+n*o[4]+o[7],o[8]=l*o[2]+n*o[5]+o[8],this},rotate:function(h){var o=this.val,l=o[0],n=o[1],u=o[2],f=o[3],s=o[4],c=o[5],d=Math.sin(h),v=Math.cos(h);return o[0]=v*l+d*f,o[1]=v*n+d*s,o[2]=v*u+d*c,o[3]=v*f-d*l,o[4]=v*s-d*n,o[5]=v*c-d*u,this},scale:function(h){var o=this.val,l=h.x,n=h.y;return o[0]=l*o[0],o[1]=l*o[1],o[2]=l*o[2],o[3]=n*o[3],o[4]=n*o[4],o[5]=n*o[5],this},fromQuat:function(h){var o=h.x,l=h.y,n=h.z,u=h.w,f=o+o,s=l+l,c=n+n,d=o*f,v=o*s,m=o*c,S=l*s,M=l*c,A=n*c,C=u*f,w=u*s,P=u*c,L=this.val;return L[0]=1-(S+A),L[3]=v+P,L[6]=m-w,L[1]=v-P,L[4]=1-(d+A),L[7]=M+C,L[2]=m+w,L[5]=M-C,L[8]=1-(d+S),this},normalFromMat4:function(h){var o=h.val,l=this.val,n=o[0],u=o[1],f=o[2],s=o[3],c=o[4],d=o[5],v=o[6],m=o[7],S=o[8],M=o[9],A=o[10],C=o[11],w=o[12],P=o[13],L=o[14],O=o[15],I=n*d-u*c,D=n*v-f*c,B=n*m-s*c,G=u*v-f*d,z=u*m-s*d,W=f*m-s*v,k=S*P-M*w,J=S*L-A*w,Q=S*O-C*w,Y=M*L-A*P,K=M*O-C*P,U=A*O-C*L,V=I*U-D*K+B*Y+G*Q-z*J+W*k;return V?(V=1/V,l[0]=(d*U-v*K+m*Y)*V,l[1]=(v*Q-c*U-m*J)*V,l[2]=(c*K-d*Q+m*k)*V,l[3]=(f*K-u*U-s*Y)*V,l[4]=(n*U-f*Q+s*J)*V,l[5]=(u*Q-n*K-s*k)*V,l[6]=(P*W-L*z+O*G)*V,l[7]=(L*B-w*W-O*D)*V,l[8]=(w*z-P*B+O*I)*V,this):null}});a.exports=p},37867:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(25836),h=1e-6,o=new r({initialize:function(d){this.val=new Float32Array(16),d?this.copy(d):this.identity()},clone:function(){return new o(this)},set:function(c){return this.copy(c)},setValues:function(c,d,v,m,S,M,A,C,w,P,L,O,I,D,B,G){var z=this.val;return z[0]=c,z[1]=d,z[2]=v,z[3]=m,z[4]=S,z[5]=M,z[6]=A,z[7]=C,z[8]=w,z[9]=P,z[10]=L,z[11]=O,z[12]=I,z[13]=D,z[14]=B,z[15]=G,this},copy:function(c){var d=c.val;return this.setValues(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],d[8],d[9],d[10],d[11],d[12],d[13],d[14],d[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,d,v){var m=l.fromQuat(v),S=m.val,M=d.x,A=d.y,C=d.z;return this.setValues(S[0]*M,S[1]*M,S[2]*M,0,S[4]*A,S[5]*A,S[6]*A,0,S[8]*C,S[9]*C,S[10]*C,0,c.x,c.y,c.z,1)},xyz:function(c,d,v){this.identity();var m=this.val;return m[12]=c,m[13]=d,m[14]=v,this},scaling:function(c,d,v){this.zero();var m=this.val;return m[0]=c,m[5]=d,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,d=c[1],v=c[2],m=c[3],S=c[6],M=c[7],A=c[11];return c[1]=c[4],c[2]=c[8],c[3]=c[12],c[4]=d,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]=A,this},getInverse:function(c){return this.copy(c),this.invert()},invert:function(){var c=this.val,d=c[0],v=c[1],m=c[2],S=c[3],M=c[4],A=c[5],C=c[6],w=c[7],P=c[8],L=c[9],O=c[10],I=c[11],D=c[12],B=c[13],G=c[14],z=c[15],W=d*A-v*M,k=d*C-m*M,J=d*w-S*M,Q=v*C-m*A,Y=v*w-S*A,K=m*w-S*C,U=P*B-L*D,V=P*G-O*D,j=P*z-I*D,$=L*G-O*B,q=L*z-I*B,it=O*z-I*G,nt=W*it-k*q+J*$+Q*j-Y*V+K*U;return nt?(nt=1/nt,this.setValues((A*it-C*q+w*$)*nt,(m*q-v*it-S*$)*nt,(B*K-G*Y+z*Q)*nt,(O*Y-L*K-I*Q)*nt,(C*j-M*it-w*V)*nt,(d*it-m*j+S*V)*nt,(G*J-D*K-z*k)*nt,(P*K-O*J+I*k)*nt,(M*q-A*j+w*U)*nt,(v*j-d*q-S*U)*nt,(D*Y-B*J+z*W)*nt,(L*J-P*Y-I*W)*nt,(A*V-M*$-C*U)*nt,(d*$-v*V+m*U)*nt,(B*k-D*Q-G*W)*nt,(P*Q-L*k+O*W)*nt)):this},adjoint:function(){var c=this.val,d=c[0],v=c[1],m=c[2],S=c[3],M=c[4],A=c[5],C=c[6],w=c[7],P=c[8],L=c[9],O=c[10],I=c[11],D=c[12],B=c[13],G=c[14],z=c[15];return this.setValues(A*(O*z-I*G)-L*(C*z-w*G)+B*(C*I-w*O),-(v*(O*z-I*G)-L*(m*z-S*G)+B*(m*I-S*O)),v*(C*z-w*G)-A*(m*z-S*G)+B*(m*w-S*C),-(v*(C*I-w*O)-A*(m*I-S*O)+L*(m*w-S*C)),-(M*(O*z-I*G)-P*(C*z-w*G)+D*(C*I-w*O)),d*(O*z-I*G)-P*(m*z-S*G)+D*(m*I-S*O),-(d*(C*z-w*G)-M*(m*z-S*G)+D*(m*w-S*C)),d*(C*I-w*O)-M*(m*I-S*O)+P*(m*w-S*C),M*(L*z-I*B)-P*(A*z-w*B)+D*(A*I-w*L),-(d*(L*z-I*B)-P*(v*z-S*B)+D*(v*I-S*L)),d*(A*z-w*B)-M*(v*z-S*B)+D*(v*w-S*A),-(d*(A*I-w*L)-M*(v*I-S*L)+P*(v*w-S*A)),-(M*(L*G-O*B)-P*(A*G-C*B)+D*(A*O-C*L)),d*(L*G-O*B)-P*(v*G-m*B)+D*(v*O-m*L),-(d*(A*G-C*B)-M*(v*G-m*B)+D*(v*C-m*A)),d*(A*O-C*L)-M*(v*O-m*L)+P*(v*C-m*A))},determinant:function(){var c=this.val,d=c[0],v=c[1],m=c[2],S=c[3],M=c[4],A=c[5],C=c[6],w=c[7],P=c[8],L=c[9],O=c[10],I=c[11],D=c[12],B=c[13],G=c[14],z=c[15],W=d*A-v*M,k=d*C-m*M,J=d*w-S*M,Q=v*C-m*A,Y=v*w-S*A,K=m*w-S*C,U=P*B-L*D,V=P*G-O*D,j=P*z-I*D,$=L*G-O*B,q=L*z-I*B,it=O*z-I*G;return W*it-k*q+J*$+Q*j-Y*V+K*U},multiply:function(c){var d=this.val,v=d[0],m=d[1],S=d[2],M=d[3],A=d[4],C=d[5],w=d[6],P=d[7],L=d[8],O=d[9],I=d[10],D=d[11],B=d[12],G=d[13],z=d[14],W=d[15],k=c.val,J=k[0],Q=k[1],Y=k[2],K=k[3];return d[0]=J*v+Q*A+Y*L+K*B,d[1]=J*m+Q*C+Y*O+K*G,d[2]=J*S+Q*w+Y*I+K*z,d[3]=J*M+Q*P+Y*D+K*W,J=k[4],Q=k[5],Y=k[6],K=k[7],d[4]=J*v+Q*A+Y*L+K*B,d[5]=J*m+Q*C+Y*O+K*G,d[6]=J*S+Q*w+Y*I+K*z,d[7]=J*M+Q*P+Y*D+K*W,J=k[8],Q=k[9],Y=k[10],K=k[11],d[8]=J*v+Q*A+Y*L+K*B,d[9]=J*m+Q*C+Y*O+K*G,d[10]=J*S+Q*w+Y*I+K*z,d[11]=J*M+Q*P+Y*D+K*W,J=k[12],Q=k[13],Y=k[14],K=k[15],d[12]=J*v+Q*A+Y*L+K*B,d[13]=J*m+Q*C+Y*O+K*G,d[14]=J*S+Q*w+Y*I+K*z,d[15]=J*M+Q*P+Y*D+K*W,this},multiplyLocal:function(c){var d=this.val,v=c.val;return this.setValues(d[0]*v[0]+d[1]*v[4]+d[2]*v[8]+d[3]*v[12],d[0]*v[1]+d[1]*v[5]+d[2]*v[9]+d[3]*v[13],d[0]*v[2]+d[1]*v[6]+d[2]*v[10]+d[3]*v[14],d[0]*v[3]+d[1]*v[7]+d[2]*v[11]+d[3]*v[15],d[4]*v[0]+d[5]*v[4]+d[6]*v[8]+d[7]*v[12],d[4]*v[1]+d[5]*v[5]+d[6]*v[9]+d[7]*v[13],d[4]*v[2]+d[5]*v[6]+d[6]*v[10]+d[7]*v[14],d[4]*v[3]+d[5]*v[7]+d[6]*v[11]+d[7]*v[15],d[8]*v[0]+d[9]*v[4]+d[10]*v[8]+d[11]*v[12],d[8]*v[1]+d[9]*v[5]+d[10]*v[9]+d[11]*v[13],d[8]*v[2]+d[9]*v[6]+d[10]*v[10]+d[11]*v[14],d[8]*v[3]+d[9]*v[7]+d[10]*v[11]+d[11]*v[15],d[12]*v[0]+d[13]*v[4]+d[14]*v[8]+d[15]*v[12],d[12]*v[1]+d[13]*v[5]+d[14]*v[9]+d[15]*v[13],d[12]*v[2]+d[13]*v[6]+d[14]*v[10]+d[15]*v[14],d[12]*v[3]+d[13]*v[7]+d[14]*v[11]+d[15]*v[15])},premultiply:function(c){return this.multiplyMatrices(c,this)},multiplyMatrices:function(c,d){var v=c.val,m=d.val,S=v[0],M=v[4],A=v[8],C=v[12],w=v[1],P=v[5],L=v[9],O=v[13],I=v[2],D=v[6],B=v[10],G=v[14],z=v[3],W=v[7],k=v[11],J=v[15],Q=m[0],Y=m[4],K=m[8],U=m[12],V=m[1],j=m[5],$=m[9],q=m[13],it=m[2],nt=m[6],et=m[10],ht=m[14],ut=m[3],dt=m[7],mt=m[11],gt=m[15];return this.setValues(S*Q+M*V+A*it+C*ut,w*Q+P*V+L*it+O*ut,I*Q+D*V+B*it+G*ut,z*Q+W*V+k*it+J*ut,S*Y+M*j+A*nt+C*dt,w*Y+P*j+L*nt+O*dt,I*Y+D*j+B*nt+G*dt,z*Y+W*j+k*nt+J*dt,S*K+M*$+A*et+C*mt,w*K+P*$+L*et+O*mt,I*K+D*$+B*et+G*mt,z*K+W*$+k*et+J*mt,S*U+M*q+A*ht+C*gt,w*U+P*q+L*ht+O*gt,I*U+D*q+B*ht+G*gt,z*U+W*q+k*ht+J*gt)},translate:function(c){return this.translateXYZ(c.x,c.y,c.z)},translateXYZ:function(c,d,v){var m=this.val;return m[12]=m[0]*c+m[4]*d+m[8]*v+m[12],m[13]=m[1]*c+m[5]*d+m[9]*v+m[13],m[14]=m[2]*c+m[6]*d+m[10]*v+m[14],m[15]=m[3]*c+m[7]*d+m[11]*v+m[15],this},scale:function(c){return this.scaleXYZ(c.x,c.y,c.z)},scaleXYZ:function(c,d,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]*d,m[5]=m[5]*d,m[6]=m[6]*d,m[7]=m[7]*d,m[8]=m[8]*v,m[9]=m[9]*v,m[10]=m[10]*v,m[11]=m[11]*v,this},makeRotationAxis:function(c,d){var v=Math.cos(d),m=Math.sin(d),S=1-v,M=c.x,A=c.y,C=c.z,w=S*M,P=S*A;return this.setValues(w*M+v,w*A-m*C,w*C+m*A,0,w*A+m*C,P*A+v,P*C-m*M,0,w*C-m*A,P*C+m*M,S*C*C+v,0,0,0,0,1)},rotate:function(c,d){var v=this.val,m=d.x,S=d.y,M=d.z,A=Math.sqrt(m*m+S*S+M*M);if(Math.abs(A){/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){return Math.min(t+r,p)};a.exports=y},50040:a=>{/** + * @author Vladislav Forsh + * @copyright 2021 RoboWhale + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){var r=t.length;if(r===0)return 0;t.sort(function(h,o){return h-o});var p=Math.floor(r/2);return r%2===0?(t[p]+t[p-1])/2:t[p]};a.exports=y},37204:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){return Math.max(t-r,p)};a.exports=y},65201:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p,h){p===void 0&&(p=r+1);var o=(t-r)/(p-r);return o>1?h!==void 0?(o=(h-t)/(h-p),o<0&&(o=0)):o=1:o<0&&(o=0),o};a.exports=y},15746:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(94434),h=t(29747),o=t(25836),l=1e-6,n=new Int8Array([1,2,0]),u=new Float32Array([0,0,0]),f=new o(1,0,0),s=new o(0,1,0),c=new o,d=new p,v=new r({initialize:function(S,M,A,C){this.onChangeCallback=h,this.set(S,M,A,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,A,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=A||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,A=this.w;return Math.sqrt(m*m+S*S+M*M+A*A)},lengthSq:function(){var m=this.x,S=this.y,M=this.z,A=this.w;return m*m+S*S+M*M+A*A},normalize:function(){var m=this.x,S=this.y,M=this.z,A=this.w,C=m*m+S*S+M*M+A*A;return C>0&&(C=1/Math.sqrt(C),this._x=m*C,this._y=S*C,this._z=M*C,this._w=A*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,A=this.y,C=this.z,w=this.w;return this.set(M+S*(m.x-M),A+S*(m.y-A),C+S*(m.z-C),w+S*(m.w-w))},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 A=d.val;return A[0]=S.x,A[3]=S.y,A[6]=S.z,A[1]=M.x,A[4]=M.y,A[7]=M.z,A[2]=-m.x,A[5]=-m.y,A[8]=-m.z,this.fromMat3(d).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,A=this.z,C=this.w,w=m.x,P=m.y,L=m.z,O=m.w;return this.set(S*O+C*w+M*L-A*P,M*O+C*P+A*w-S*L,A*O+C*L+S*P-M*w,C*O-S*w-M*P-A*L)},slerp:function(m,S){var M=this.x,A=this.y,C=this.z,w=this.w,P=m.x,L=m.y,O=m.z,I=m.w,D=M*P+A*L+C*O+w*I;D<0&&(D=-D,P=-P,L=-L,O=-O,I=-I);var B=1-S,G=S;if(1-D>l){var z=Math.acos(D),W=Math.sin(z);B=Math.sin((1-S)*z)/W,G=Math.sin(S*z)/W}return this.set(B*M+G*P,B*A+G*L,B*C+G*O,B*w+G*I)},invert:function(){var m=this.x,S=this.y,M=this.z,A=this.w,C=m*m+S*S+M*M+A*A,w=C?1/C:0;return this.set(-m*w,-S*w,-M*w,A*w)},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,A=this.z,C=this.w,w=Math.sin(m),P=Math.cos(m);return this.set(S*P+C*w,M*P+A*w,A*P-M*w,C*P-S*w)},rotateY:function(m){m*=.5;var S=this.x,M=this.y,A=this.z,C=this.w,w=Math.sin(m),P=Math.cos(m);return this.set(S*P-A*w,M*P+C*w,A*P+S*w,C*P-M*w)},rotateZ:function(m){m*=.5;var S=this.x,M=this.y,A=this.z,C=this.w,w=Math.sin(m),P=Math.cos(m);return this.set(S*P+M*w,M*P-S*w,A*P+C*w,C*P-A*w)},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,A=m.y/2,C=m.z/2,w=Math.cos(M),P=Math.cos(A),L=Math.cos(C),O=Math.sin(M),I=Math.sin(A),D=Math.sin(C);switch(m.order){case"XYZ":{this.set(O*P*L+w*I*D,w*I*L-O*P*D,w*P*D+O*I*L,w*P*L-O*I*D,S);break}case"YXZ":{this.set(O*P*L+w*I*D,w*I*L-O*P*D,w*P*D-O*I*L,w*P*L+O*I*D,S);break}case"ZXY":{this.set(O*P*L-w*I*D,w*I*L+O*P*D,w*P*D+O*I*L,w*P*L-O*I*D,S);break}case"ZYX":{this.set(O*P*L-w*I*D,w*I*L+O*P*D,w*P*D-O*I*L,w*P*L+O*I*D,S);break}case"YZX":{this.set(O*P*L+w*I*D,w*I*L+O*P*D,w*P*D-O*I*L,w*P*L-O*I*D,S);break}case"XZY":{this.set(O*P*L-w*I*D,w*I*L-O*P*D,w*P*D+O*I*L,w*P*L+O*I*D,S);break}}return this},setFromRotationMatrix:function(m){var S=m.val,M=S[0],A=S[4],C=S[8],w=S[1],P=S[5],L=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-L)*G,(C-O)*G,(w-A)*G,.25/G)):M>P&&M>D?(G=2*Math.sqrt(1+M-P-D),this.set(.25*G,(A+w)/G,(C+O)/G,(I-L)/G)):P>D?(G=2*Math.sqrt(1+P-M-D),this.set((A+w)/G,.25*G,(L+I)/G,(C-O)/G)):(G=2*Math.sqrt(1+D-M-P),this.set((C+O)/G,(L+I)/G,.25*G,(w-A)/G)),this},fromMat3:function(m){var S=m.val,M=S[0]+S[4]+S[8],A;if(M>0)A=Math.sqrt(M+1),this.w=.5*A,A=.5/A,this._x=(S[7]-S[5])*A,this._y=(S[2]-S[6])*A,this._z=(S[3]-S[1])*A;else{var C=0;S[4]>S[0]&&(C=1),S[8]>S[C*3+C]&&(C=2);var w=n[C],P=n[w];A=Math.sqrt(S[C*3+C]-S[w*3+w]-S[P*3+P]+1),u[C]=.5*A,A=.5/A,u[w]=(S[w*3+C]+S[C*3+w])*A,u[P]=(S[P*3+C]+S[C*3+P])*A,this._x=u[0],this._y=u[1],this._z=u[2],this._w=(S[P*3+w]-S[w*3+P])*A}return this.onChangeCallback(this),this}});a.exports=v},43396:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(36383),p=function(h){return h*r.RAD_TO_DEG};a.exports=p},74362:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){r===void 0&&(r=1);var p=Math.random()*2*Math.PI;return t.x=Math.cos(p)*r,t.y=Math.sin(p)*r,t};a.exports=y},60706:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){r===void 0&&(r=1);var p=Math.random()*2*Math.PI,h=Math.random()*2-1,o=Math.sqrt(1-h*h)*r;return t.x=Math.cos(p)*o,t.y=Math.sin(p)*o,t.z=h*r,t};a.exports=y},67421:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){return r===void 0&&(r=1),t.x=(Math.random()*2-1)*r,t.y=(Math.random()*2-1)*r,t.z=(Math.random()*2-1)*r,t.w=(Math.random()*2-1)*r,t};a.exports=y},36305:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){var p=t.x,h=t.y;return t.x=p*Math.cos(r)-h*Math.sin(r),t.y=p*Math.sin(r)+h*Math.cos(r),t};a.exports=y},11520:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p,h){var o=Math.cos(h),l=Math.sin(h),n=t.x-r,u=t.y-p;return t.x=n*o-u*l+r,t.y=n*l+u*o+p,t};a.exports=y},1163:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p,h,o){var l=h+Math.atan2(t.y-p,t.x-r);return t.x=r+o*Math.cos(l),t.y=p+o*Math.sin(l),t};a.exports=y},70336:a=>{/** + * @author samme + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p,h,o){return t.x=r+o*Math.cos(h),t.y=p+o*Math.sin(h),t};a.exports=y},72678:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(25836),p=t(37867),h=t(15746),o=new p,l=new h,n=new r,u=function(f,s,c){return l.setAxisAngle(s,c),o.fromRotationTranslation(l,n.set(0,0,0)),f.transformMat4(o)};a.exports=u},2284:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return t>0?Math.ceil(t):Math.floor(t)};a.exports=y},41013:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){r===void 0&&(r=0),p===void 0&&(p=10);var h=Math.pow(p,-r);return Math.round(t*h)/h};a.exports=y},16922:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p,h){r===void 0&&(r=1),p===void 0&&(p=1),h===void 0&&(h=1),h*=Math.PI/t;for(var o=[],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(t,r,p){return t<=r?0:t>=p?1:(t=(t-r)/(p-r),t*t*(3-2*t))};a.exports=y},54261:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){return t=Math.max(0,Math.min(1,(t-r)/(p-r))),t*t*t*(t*(t*6-15)+10)};a.exports=y},44408:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(26099),p=function(h,o,l,n){n===void 0&&(n=new r);var u=0,f=0,s=o*l;return h>0&&h<=s&&(h>o-1?(f=Math.floor(h/o),u=h-f*o):u=h),n.set(u,f)};a.exports=p},85955:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(26099),p=function(h,o,l,n,u,f,s,c){c===void 0&&(c=new r);var d=Math.sin(u),v=Math.cos(u),m=v*f,S=d*f,M=-d*s,A=v*s,C=1/(m*A+M*-S);return c.x=A*C*h+-M*C*o+(n*M-l*A)*C,c.y=m*C*o+-S*C*h+(-n*m+l*S)*C,c};a.exports=p},26099:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(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(o){return this.x=o.x||0,this.y=o.y||0,this},setFromObject:function(o){return this.x=o.x||0,this.y=o.y||0,this},set:function(o,l){return l===void 0&&(l=o),this.x=o,this.y=l,this},setTo:function(o,l){return this.set(o,l)},setToPolar:function(o,l){return l==null&&(l=1),this.x=Math.cos(o)*l,this.y=Math.sin(o)*l,this},equals:function(o){return this.x===o.x&&this.y===o.y},fuzzyEquals:function(o,l){return p(this.x,o.x,l)&&p(this.y,o.y,l)},angle:function(){var o=Math.atan2(this.y,this.x);return o<0&&(o+=2*Math.PI),o},setAngle:function(o){return this.setToPolar(o,this.length())},add:function(o){return this.x+=o.x,this.y+=o.y,this},subtract:function(o){return this.x-=o.x,this.y-=o.y,this},multiply:function(o){return this.x*=o.x,this.y*=o.y,this},scale:function(o){return isFinite(o)?(this.x*=o,this.y*=o):(this.x=0,this.y=0),this},divide:function(o){return this.x/=o.x,this.y/=o.y,this},negate:function(){return this.x=-this.x,this.y=-this.y,this},distance:function(o){var l=o.x-this.x,n=o.y-this.y;return Math.sqrt(l*l+n*n)},distanceSq:function(o){var l=o.x-this.x,n=o.y-this.y;return l*l+n*n},length:function(){var o=this.x,l=this.y;return Math.sqrt(o*o+l*l)},setLength:function(o){return this.normalize().scale(o)},lengthSq:function(){var o=this.x,l=this.y;return o*o+l*l},normalize:function(){var o=this.x,l=this.y,n=o*o+l*l;return n>0&&(n=1/Math.sqrt(n),this.x=o*n,this.y=l*n),this},normalizeRightHand:function(){var o=this.x;return this.x=this.y*-1,this.y=o,this},normalizeLeftHand:function(){var o=this.x;return this.x=this.y,this.y=o*-1,this},dot:function(o){return this.x*o.x+this.y*o.y},cross:function(o){return this.x*o.y-this.y*o.x},lerp:function(o,l){l===void 0&&(l=0);var n=this.x,u=this.y;return this.x=n+l*(o.x-n),this.y=u+l*(o.y-u),this},transformMat3:function(o){var l=this.x,n=this.y,u=o.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(o){var l=this.x,n=this.y,u=o.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(o){var l=this.length();return l&&l>o&&this.scale(o/l),this},reflect:function(o){return o=o.clone().normalize(),this.subtract(o.scale(2*this.dot(o)))},mirror:function(o){return this.reflect(o).negate()},rotate:function(o){var l=Math.cos(o),n=Math.sin(o);return this.set(l*this.x-n*this.y,n*this.x+l*this.y)},project:function(o){var l=this.dot(o)/o.dot(o);return this.copy(o).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),a.exports=h},25836:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=new r({initialize:function(o,l,n){this.x=0,this.y=0,this.z=0,typeof o=="object"?(this.x=o.x||0,this.y=o.y||0,this.z=o.z||0):(this.x=o||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 p(this.x,this.y,this.z)},addVectors:function(h,o){return this.x=h.x+o.x,this.y=h.y+o.y,this.z=h.z+o.z,this},crossVectors:function(h,o){var l=h.x,n=h.y,u=h.z,f=o.x,s=o.y,c=o.z;return this.x=n*c-u*s,this.y=u*f-l*c,this.z=l*s-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,o,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=o||0,this.z=l||0),this},setFromMatrixPosition:function(h){return this.fromArray(h.val,12)},setFromMatrixColumn:function(h,o){return this.fromArray(h.val,o*4)},fromArray:function(h,o){return o===void 0&&(o=0),this.x=h[o],this.y=h[o+1],this.z=h[o+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,o){return this.x+=h.x*o,this.y+=h.y*o,this.z+=h.z*o||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 o=h.x-this.x,l=h.y-this.y,n=h.z-this.z||0;return Math.sqrt(o*o+l*l+n*n)},distanceSq:function(h){var o=h.x-this.x,l=h.y-this.y,n=h.z-this.z||0;return o*o+l*l+n*n},length:function(){var h=this.x,o=this.y,l=this.z;return Math.sqrt(h*h+o*o+l*l)},lengthSq:function(){var h=this.x,o=this.y,l=this.z;return h*h+o*o+l*l},normalize:function(){var h=this.x,o=this.y,l=this.z,n=h*h+o*o+l*l;return n>0&&(n=1/Math.sqrt(n),this.x=h*n,this.y=o*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 o=this.x,l=this.y,n=this.z,u=h.x,f=h.y,s=h.z;return this.x=l*s-n*f,this.y=n*u-o*s,this.z=o*f-l*u,this},lerp:function(h,o){o===void 0&&(o=0);var l=this.x,n=this.y,u=this.z;return this.x=l+o*(h.x-l),this.y=n+o*(h.y-n),this.z=u+o*(h.z-u),this},applyMatrix3:function(h){var o=this.x,l=this.y,n=this.z,u=h.val;return this.x=u[0]*o+u[3]*l+u[6]*n,this.y=u[1]*o+u[4]*l+u[7]*n,this.z=u[2]*o+u[5]*l+u[8]*n,this},applyMatrix4:function(h){var o=this.x,l=this.y,n=this.z,u=h.val,f=1/(u[3]*o+u[7]*l+u[11]*n+u[15]);return this.x=(u[0]*o+u[4]*l+u[8]*n+u[12])*f,this.y=(u[1]*o+u[5]*l+u[9]*n+u[13])*f,this.z=(u[2]*o+u[6]*l+u[10]*n+u[14])*f,this},transformMat3:function(h){var o=this.x,l=this.y,n=this.z,u=h.val;return this.x=o*u[0]+l*u[3]+n*u[6],this.y=o*u[1]+l*u[4]+n*u[7],this.z=o*u[2]+l*u[5]+n*u[8],this},transformMat4:function(h){var o=this.x,l=this.y,n=this.z,u=h.val;return this.x=u[0]*o+u[4]*l+u[8]*n+u[12],this.y=u[1]*o+u[5]*l+u[9]*n+u[13],this.z=u[2]*o+u[6]*l+u[10]*n+u[14],this},transformCoordinates:function(h){var o=this.x,l=this.y,n=this.z,u=h.val,f=o*u[0]+l*u[4]+n*u[8]+u[12],s=o*u[1]+l*u[5]+n*u[9]+u[13],c=o*u[2]+l*u[6]+n*u[10]+u[14],d=o*u[3]+l*u[7]+n*u[11]+u[15];return this.x=f/d,this.y=s/d,this.z=c/d,this},transformQuat:function(h){var o=this.x,l=this.y,n=this.z,u=h.x,f=h.y,s=h.z,c=h.w,d=c*o+f*n-s*l,v=c*l+s*o-u*n,m=c*n+u*l-f*o,S=-u*o-f*l-s*n;return this.x=d*c+S*-u+v*-s-m*-f,this.y=v*c+S*-f+m*-u-d*-s,this.z=m*c+S*-s+d*-f-v*-u,this},project:function(h){var o=this.x,l=this.y,n=this.z,u=h.val,f=u[0],s=u[1],c=u[2],d=u[3],v=u[4],m=u[5],S=u[6],M=u[7],A=u[8],C=u[9],w=u[10],P=u[11],L=u[12],O=u[13],I=u[14],D=u[15],B=1/(o*d+l*M+n*P+D);return this.x=(o*f+l*v+n*A+L)*B,this.y=(o*s+l*m+n*C+O)*B,this.z=(o*c+l*S+n*w+I)*B,this},projectViewMatrix:function(h,o){return this.applyMatrix4(h).applyMatrix4(o)},unprojectViewMatrix:function(h,o){return this.applyMatrix4(h).applyMatrix4(o)},unproject:function(h,o){var l=h.x,n=h.y,u=h.z,f=h.w,s=this.x-l,c=f-this.y-1-n,d=this.z;return this.x=2*s/u-1,this.y=2*c/f-1,this.z=2*d-1,this.project(o)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});p.ZERO=new p,p.RIGHT=new p(1,0,0),p.LEFT=new p(-1,0,0),p.UP=new p(0,-1,0),p.DOWN=new p(0,1,0),p.FORWARD=new p(0,0,1),p.BACK=new p(0,0,-1),p.ONE=new p(1,1,1),a.exports=p},61369:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=new r({initialize:function(o,l,n,u){this.x=0,this.y=0,this.z=0,this.w=0,typeof o=="object"?(this.x=o.x||0,this.y=o.y||0,this.z=o.z||0,this.w=o.w||0):(this.x=o||0,this.y=l||0,this.z=n||0,this.w=u||0)},clone:function(){return new p(this.x,this.y,this.z,this.w)},copy:function(h){return this.x=h.x,this.y=h.y,this.z=h.z||0,this.w=h.w||0,this},equals:function(h){return this.x===h.x&&this.y===h.y&&this.z===h.z&&this.w===h.w},set:function(h,o,l,n){return typeof h=="object"?(this.x=h.x||0,this.y=h.y||0,this.z=h.z||0,this.w=h.w||0):(this.x=h||0,this.y=o||0,this.z=l||0,this.w=n||0),this},add:function(h){return this.x+=h.x,this.y+=h.y,this.z+=h.z||0,this.w+=h.w||0,this},subtract:function(h){return this.x-=h.x,this.y-=h.y,this.z-=h.z||0,this.w-=h.w||0,this},scale:function(h){return this.x*=h,this.y*=h,this.z*=h,this.w*=h,this},length:function(){var h=this.x,o=this.y,l=this.z,n=this.w;return Math.sqrt(h*h+o*o+l*l+n*n)},lengthSq:function(){var h=this.x,o=this.y,l=this.z,n=this.w;return h*h+o*o+l*l+n*n},normalize:function(){var h=this.x,o=this.y,l=this.z,n=this.w,u=h*h+o*o+l*l+n*n;return u>0&&(u=1/Math.sqrt(u),this.x=h*u,this.y=o*u,this.z=l*u,this.w=n*u),this},dot:function(h){return this.x*h.x+this.y*h.y+this.z*h.z+this.w*h.w},lerp:function(h,o){o===void 0&&(o=0);var l=this.x,n=this.y,u=this.z,f=this.w;return this.x=l+o*(h.x-l),this.y=n+o*(h.y-n),this.z=u+o*(h.z-u),this.w=f+o*(h.w-f),this},multiply:function(h){return this.x*=h.x,this.y*=h.y,this.z*=h.z||1,this.w*=h.w||1,this},divide:function(h){return this.x/=h.x,this.y/=h.y,this.z/=h.z||1,this.w/=h.w||1,this},distance:function(h){var o=h.x-this.x,l=h.y-this.y,n=h.z-this.z||0,u=h.w-this.w||0;return Math.sqrt(o*o+l*l+n*n+u*u)},distanceSq:function(h){var o=h.x-this.x,l=h.y-this.y,n=h.z-this.z||0,u=h.w-this.w||0;return o*o+l*l+n*n+u*u},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(h){var o=this.x,l=this.y,n=this.z,u=this.w,f=h.val;return this.x=f[0]*o+f[4]*l+f[8]*n+f[12]*u,this.y=f[1]*o+f[5]*l+f[9]*n+f[13]*u,this.z=f[2]*o+f[6]*l+f[10]*n+f[14]*u,this.w=f[3]*o+f[7]*l+f[11]*n+f[15]*u,this},transformQuat:function(h){var o=this.x,l=this.y,n=this.z,u=h.x,f=h.y,s=h.z,c=h.w,d=c*o+f*n-s*l,v=c*l+s*o-u*n,m=c*n+u*l-f*o,S=-u*o-f*l-s*n;return this.x=d*c+S*-u+v*-s-m*-f,this.y=v*c+S*-f+m*-u-d*-s,this.z=m*c+S*-s+d*-f-v*-u,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});p.prototype.sub=p.prototype.subtract,p.prototype.mul=p.prototype.multiply,p.prototype.div=p.prototype.divide,p.prototype.dist=p.prototype.distance,p.prototype.distSq=p.prototype.distanceSq,p.prototype.len=p.prototype.length,p.prototype.lenSq=p.prototype.lengthSq,a.exports=p},60417:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){return Math.abs(t-r)<=p};a.exports=y},15994:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){var h=p-r;return r+((t-r)%h+h)%h};a.exports=y},31040:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p,h){return Math.atan2(h-r,p-t)};a.exports=y},55495:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){return Math.atan2(r.y-t.y,r.x-t.x)};a.exports=y},128:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){return Math.atan2(r.x-t.x,r.y-t.y)};a.exports=y},41273:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p,h){return Math.atan2(p-t,h-r)};a.exports=y},1432:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(36383),p=function(h){return h>Math.PI&&(h-=r.PI2),Math.abs(((h+r.TAU)%r.PI2-r.PI2)%r.PI2)};a.exports=p},12407:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return t=t%(2*Math.PI),t>=0?t:t+2*Math.PI};a.exports=y},53993:(a,y,t)=>{/** + * @author Richard Davey + * @author @samme + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(99472),p=function(){return r(-Math.PI,Math.PI)};a.exports=p},86564:(a,y,t)=>{/** + * @author Richard Davey + * @author @samme + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(99472),p=function(){return r(-180,180)};a.exports=p},90154:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(12407),p=function(h){return r(h+Math.PI)};a.exports=p},48736:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(36383),p=function(h,o,l){return l===void 0&&(l=.05),h===o||(Math.abs(o-h)<=l||Math.abs(o-h)>=r.PI2-l?h=o:(Math.abs(o-h)>Math.PI&&(oh?h+=l:o{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){var p=r-t;if(p===0)return 0;var h=Math.floor((p- -180)/360);return p-h*360};a.exports=y},86554:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(15994),p=function(h){return r(h,-Math.PI,Math.PI)};a.exports=p},30954:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(15994),p=function(h){return r(h,-180,180)};a.exports=p},25588:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={Between:t(31040),BetweenPoints:t(55495),BetweenPointsY:t(128),BetweenY:t(41273),CounterClockwise:t(1432),Normalize:t(12407),Random:t(53993),RandomDegrees:t(86564),Reverse:t(90154),RotateTo:t(48736),ShortestBetween:t(61430),Wrap:t(86554),WrapDegrees:t(30954)}},36383:a=>{/** + * @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};a.exports=y},20339:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p,h){var o=t-p,l=r-h;return Math.sqrt(o*o+l*l)};a.exports=y},52816:a=>{/** + * @author samme + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){var p=t.x-r.x,h=t.y-r.y;return Math.sqrt(p*p+h*h)};a.exports=y},64559:a=>{/** + * @author samme + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){var p=t.x-r.x,h=t.y-r.y;return p*p+h*h};a.exports=y},82340:a=>{/** + * @author samme + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p,h){return Math.max(Math.abs(t-p),Math.abs(r-h))};a.exports=y},14390:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p,h,o){return o===void 0&&(o=2),Math.sqrt(Math.pow(p-t,o)+Math.pow(h-r,o))};a.exports=y},2243:a=>{/** + * @author samme + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p,h){return Math.abs(t-p)+Math.abs(r-h)};a.exports=y},89774:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p,h){var o=t-p,l=r-h;return o*o+l*l};a.exports=y},50994:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={Between:t(20339),BetweenPoints:t(52816),BetweenPointsSquared:t(64559),Chebyshev:t(82340),Power:t(14390),Snake:t(2243),Squared:t(89774)}},62640:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(54178),p=t(41521),h=t(79980),o=t(85433),l=t(99140),n=t(48857),u=t(81596),f=t(59133),s=t(98516),c=t(35248),d=t(82500),v=t(49752);a.exports={Power0:u,Power1:f.Out,Power2:o.Out,Power3:s.Out,Power4:c.Out,Linear:u,Quad:f.Out,Cubic:o.Out,Quart:s.Out,Quint:c.Out,Sine:d.Out,Expo:n.Out,Circ:h.Out,Elastic:l.Out,Back:r.Out,Bounce:p.Out,Stepped:v,"Quad.easeIn":f.In,"Cubic.easeIn":o.In,"Quart.easeIn":s.In,"Quint.easeIn":c.In,"Sine.easeIn":d.In,"Expo.easeIn":n.In,"Circ.easeIn":h.In,"Elastic.easeIn":l.In,"Back.easeIn":r.In,"Bounce.easeIn":p.In,"Quad.easeOut":f.Out,"Cubic.easeOut":o.Out,"Quart.easeOut":s.Out,"Quint.easeOut":c.Out,"Sine.easeOut":d.Out,"Expo.easeOut":n.Out,"Circ.easeOut":h.Out,"Elastic.easeOut":l.Out,"Back.easeOut":r.Out,"Bounce.easeOut":p.Out,"Quad.easeInOut":f.InOut,"Cubic.easeInOut":o.InOut,"Quart.easeInOut":s.InOut,"Quint.easeInOut":c.InOut,"Sine.easeInOut":d.InOut,"Expo.easeInOut":n.InOut,"Circ.easeInOut":h.InOut,"Elastic.easeInOut":l.InOut,"Back.easeInOut":r.InOut,"Bounce.easeInOut":p.InOut}},1639:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){return r===void 0&&(r=1.70158),t*t*((r+1)*t-r)};a.exports=y},50099:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){r===void 0&&(r=1.70158);var p=r*1.525;return(t*=2)<1?.5*(t*t*((p+1)*t-p)):.5*((t-=2)*t*((p+1)*t+p)+2)};a.exports=y},41286:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){return r===void 0&&(r=1.70158),--t*t*((r+1)*t+r)+1};a.exports=y},54178:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={In:t(1639),Out:t(41286),InOut:t(50099)}},59590:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return t=1-t,t<.36363636363636365?1-7.5625*t*t:t<.7272727272727273?1-(7.5625*(t-=.5454545454545454)*t+.75):t<.9090909090909091?1-(7.5625*(t-=.8181818181818182)*t+.9375):1-(7.5625*(t-=.9545454545454546)*t+.984375)};a.exports=y},41788:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){var r=!1;return t<.5?(t=1-t*2,r=!0):t=t*2-1,t<.36363636363636365?t=7.5625*t*t:t<.7272727272727273?t=7.5625*(t-=.5454545454545454)*t+.75:t<.9090909090909091?t=7.5625*(t-=.8181818181818182)*t+.9375:t=7.5625*(t-=.9545454545454546)*t+.984375,r?(1-t)*.5:t*.5+.5};a.exports=y},69905:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return t<.36363636363636365?7.5625*t*t:t<.7272727272727273?7.5625*(t-=.5454545454545454)*t+.75:t<.9090909090909091?7.5625*(t-=.8181818181818182)*t+.9375:7.5625*(t-=.9545454545454546)*t+.984375};a.exports=y},41521:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={In:t(59590),Out:t(69905),InOut:t(41788)}},91861:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return 1-Math.sqrt(1-t*t)};a.exports=y},4177:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)};a.exports=y},57512:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return Math.sqrt(1- --t*t)};a.exports=y},79980:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={In:t(91861),Out:t(57512),InOut:t(4177)}},51150:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return t*t*t};a.exports=y},82820:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)};a.exports=y},35033:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return--t*t*t+1};a.exports=y},85433:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={In:t(51150),Out:t(35033),InOut:t(82820)}},69965:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){if(r===void 0&&(r=.1),p===void 0&&(p=.1),t===0)return 0;if(t===1)return 1;var h=p/4;return r<1?r=1:h=p*Math.asin(1/r)/(2*Math.PI),-(r*Math.pow(2,10*(t-=1))*Math.sin((t-h)*(2*Math.PI)/p))};a.exports=y},50665:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){if(r===void 0&&(r=.1),p===void 0&&(p=.1),t===0)return 0;if(t===1)return 1;var h=p/4;return r<1?r=1:h=p*Math.asin(1/r)/(2*Math.PI),(t*=2)<1?-.5*(r*Math.pow(2,10*(t-=1))*Math.sin((t-h)*(2*Math.PI)/p)):r*Math.pow(2,-10*(t-=1))*Math.sin((t-h)*(2*Math.PI)/p)*.5+1};a.exports=y},7744:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){if(r===void 0&&(r=.1),p===void 0&&(p=.1),t===0)return 0;if(t===1)return 1;var h=p/4;return r<1?r=1:h=p*Math.asin(1/r)/(2*Math.PI),r*Math.pow(2,-10*t)*Math.sin((t-h)*(2*Math.PI)/p)+1};a.exports=y},99140:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={In:t(69965),Out:t(7744),InOut:t(50665)}},24590:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return Math.pow(2,10*(t-1))-.001};a.exports=y},87844:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))};a.exports=y},89433:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return 1-Math.pow(2,-10*t)};a.exports=y},48857:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={In:t(24590),Out:t(89433),InOut:t(87844)}},48820:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={Back:t(54178),Bounce:t(41521),Circular:t(79980),Cubic:t(85433),Elastic:t(99140),Expo:t(48857),Linear:t(81596),Quadratic:t(59133),Quartic:t(98516),Quintic:t(35248),Sine:t(82500),Stepped:t(49752)}},7147:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return t};a.exports=y},81596:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports=t(7147)},34826:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return t*t};a.exports=y},20544:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)};a.exports=y},92029:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return t*(2-t)};a.exports=y},59133:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={In:t(34826),Out:t(92029),InOut:t(20544)}},64413:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return t*t*t*t};a.exports=y},78137:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)};a.exports=y},45840:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return 1- --t*t*t*t};a.exports=y},98516:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={In:t(64413),Out:t(45840),InOut:t(78137)}},87745:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return t*t*t*t*t};a.exports=y},16509:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)};a.exports=y},17868:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return--t*t*t*t*t+1};a.exports=y},35248:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={In:t(87745),Out:t(17868),InOut:t(16509)}},80461:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return t===0?0:t===1?1:1-Math.cos(t*Math.PI/2)};a.exports=y},34025:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return t===0?0:t===1?1:.5*(1-Math.cos(Math.PI*t))};a.exports=y},52768:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return t===0?0:t===1?1:Math.sin(t*Math.PI/2)};a.exports=y},82500:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={In:t(80461),Out:t(52768),InOut:t(34025)}},72251:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){return r===void 0&&(r=1),t<=0?0:t>=1?1:((r*t|0)+1)*(1/r)};a.exports=y},49752:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports=t(72251)},75698:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){return r===void 0&&(r=1e-4),Math.ceil(t-r)};a.exports=y},43855:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){return p===void 0&&(p=1e-4),Math.abs(t-r){/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){return r===void 0&&(r=1e-4),Math.floor(t+r)};a.exports=y},5470:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){return p===void 0&&(p=1e-4),t>r-p};a.exports=y},94977:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){return p===void 0&&(p=1e-4),t{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={Ceil:t(75698),Equal:t(43855),Floor:t(25777),GreaterThan:t(5470),LessThan:t(94977)}},75508:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(36383),p=t(79291),h={Angle:t(25588),Distance:t(50994),Easing:t(48820),Fuzzy:t(48379),Interpolation:t(38289),Pow2:t(49001),Snap:t(73697),RandomDataGenerator:t(28453),Average:t(53307),Bernstein:t(85710),Between:t(30976),CatmullRom:t(87842),CeilTo:t(26302),Clamp:t(45319),DegToRad:t(39506),Difference:t(61241),Euler:t(38857),Factorial:t(6411),FloatBetween:t(99472),FloorTo:t(77623),FromPercent:t(62945),GetSpeed:t(38265),IsEven:t(78702),IsEvenStrict:t(94883),Linear:t(28915),LinearXY:t(94908),MaxAdd:t(86883),Median:t(50040),MinSub:t(37204),Percent:t(65201),RadToDeg:t(43396),RandomXY:t(74362),RandomXYZ:t(60706),RandomXYZW:t(67421),Rotate:t(36305),RotateAround:t(11520),RotateAroundDistance:t(1163),RotateTo:t(70336),RoundAwayFromZero:t(2284),RoundTo:t(41013),SinCosTableGenerator:t(16922),SmootherStep:t(54261),SmoothStep:t(7602),ToXY:t(44408),TransformXY:t(85955),Within:t(60417),Wrap:t(15994),Vector2:t(26099),Vector3:t(25836),Vector4:t(61369),Matrix3:t(94434),Matrix4:t(37867),Quaternion:t(15746),RotateVec3:t(72678)};h=p(!1,h,r),a.exports=h},89318:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(85710),p=function(h,o){for(var l=0,n=h.length-1,u=0;u<=n;u++)l+=Math.pow(1-o,n-u)*Math.pow(o,u)*h[u]*r(n,u);return l};a.exports=p},77259:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(87842),p=function(h,o){var l=h.length-1,n=l*o,u=Math.floor(n);return h[0]===h[l]?(o<0&&(u=Math.floor(n=l*(1+o))),r(n-u,h[(u-1+l)%l],h[u],h[(u+1)%l],h[(u+2)%l])):o<0?h[0]-(r(-n,h[0],h[0],h[1],h[1])-h[0]):o>1?h[l]-(r(n-l,h[l],h[l],h[l-1],h[l-1])-h[l]):r(n-u,h[u?u-1:0],h[u],h[l{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */function y(o,l){var n=1-o;return n*n*n*l}function t(o,l){var n=1-o;return 3*n*n*o*l}function r(o,l){return 3*(1-o)*o*o*l}function p(o,l){return o*o*o*l}var h=function(o,l,n,u,f){return y(o,l)+t(o,n)+r(o,u)+p(o,f)};a.exports=h},28392:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(28915),p=function(h,o){var l=h.length-1,n=l*o,u=Math.floor(n);return o<0?r(h[0],h[1],n):o>1?r(h[l],h[l-1],l-n):r(h[u],h[u+1>l?l:u+1],n-u)};a.exports=p},32112:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */function y(h,o){var l=1-h;return l*l*o}function t(h,o){return 2*(1-h)*h*o}function r(h,o){return h*h*o}var p=function(h,o,l,n){return y(h,o)+t(h,l)+r(h,n)};a.exports=p},47235:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(7602),p=function(h,o,l){return o+(l-o)*r(h,0,1)};a.exports=p},50178:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(54261),p=function(h,o,l){return o+(l-o)*r(h,0,1)};a.exports=p},38289:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={Bezier:t(89318),CatmullRom:t(77259),CubicBezier:t(36316),Linear:t(28392),QuadraticBezier:t(32112),SmoothStep:t(47235),SmootherStep:t(50178)}},98439:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){var r=Math.log(t)/.6931471805599453;return 1<{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){return t>0&&(t&t-1)===0&&r>0&&(r&r-1)===0};a.exports=y},81230:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return t>0&&(t&t-1)===0};a.exports=y},49001:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={GetNext:t(98439),IsSize:t(50030),IsValue:t(81230)}},28453:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=new r({initialize:function(o){o===void 0&&(o=[(Date.now()*Math.random()).toString()]),this.c=1,this.s0=0,this.s1=0,this.s2=0,this.n=0,this.signs=[-1,1],o&&this.init(o)},rnd:function(){var h=2091639*this.s0+this.c*23283064365386963e-26;return this.c=h|0,this.s0=this.s1,this.s1=this.s2,this.s2=h-this.c,this.s2},hash:function(h){var o,l=this.n;h=h.toString();for(var n=0;n>>0,o-=l,o*=l,l=o>>>0,o-=l,l+=o*4294967296;return this.n=l,(l>>>0)*23283064365386963e-26},init:function(h){typeof h=="string"?this.state(h):this.sow(h)},sow:function(h){if(this.n=4022871197,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,!!h)for(var o=0;o0;l--){var n=Math.floor(this.frac()*(l+1)),u=h[n];h[n]=h[l],h[l]=u}return h}});a.exports=p},63448:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p,h){return p===void 0&&(p=0),r===0?t:(t-=p,t=r*Math.ceil(t/r),h?(p+t)/r:p+t)};a.exports=y},56583:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p,h){return p===void 0&&(p=0),r===0?t:(t-=p,t=r*Math.floor(t/r),h?(p+t)/r:p+t)};a.exports=y},77720:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p,h){return p===void 0&&(p=0),r===0?t:(t-=p,t=r*Math.round(t/r),h?(p+t)/r:p+t)};a.exports=y},73697:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={Ceil:t(63448),Floor:t(56583),To:t(77720)}},85454:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */t(63595);var r=t(8054),p=t(79291),h={Actions:t(61061),Animations:t(60421),BlendModes:t(10312),Cache:t(83388),Cameras:t(26638),Core:t(42857),Class:t(83419),Create:t(15822),Curves:t(25410),Data:t(44965),Display:t(27460),DOM:t(84902),Events:t(93055),FX:t(66064),Game:t(50127),GameObjects:t(77856),Geom:t(55738),Input:t(14350),Loader:t(57777),Math:t(75508),Physics:t(44563),Plugins:t(18922),Renderer:t(36909),Scale:t(93364),ScaleModes:t(29795),Scene:t(97482),Scenes:t(62194),Structs:t(41392),Textures:t(27458),Tilemaps:t(62501),Time:t(90291),Tweens:t(43066),Utils:t(91799)};h.Sound=t(23717),h=p(!1,h,r),a.exports=h,t.g.Phaser=h},71289:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(92209),h=t(88571),o=new r({Extends:h,Mixins:[p.Acceleration,p.Angular,p.Bounce,p.Collision,p.Debug,p.Drag,p.Enable,p.Friction,p.Gravity,p.Immovable,p.Mass,p.Pushable,p.Size,p.Velocity],initialize:function(n,u,f,s,c){h.call(this,n,u,f,s,c),this.body=null}});a.exports=o},86689:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(39506),h=t(20339),o=t(89774),l=t(66022),n=t(95540),u=t(46975),f=t(72441),s=t(47956),c=t(37277),d=t(44594),v=t(26099),m=t(82248),S=new r({initialize:function(A){this.scene=A,this.systems=A.sys,this.config=this.getConfig(),this.world,this.add,this._category=1,A.sys.events.once(d.BOOT,this.boot,this),A.sys.events.on(d.START,this.start,this)},boot:function(){this.world=new m(this.scene,this.config),this.add=new l(this.world),this.systems.events.once(d.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(d.UPDATE,this.world.update,this.world),M.on(d.POST_UPDATE,this.world.postUpdate,this.world),M.once(d.SHUTDOWN,this.shutdown,this)},enableUpdate:function(){this.systems.events.on(d.UPDATE,this.world.update,this.world)},disableUpdate:function(){this.systems.events.off(d.UPDATE,this.world.update,this.world)},getConfig:function(){var M=this.systems.game.config.physics,A=this.systems.settings.physics,C=u(n(A,"arcade",{}),n(M,"arcade",{}));return C},nextCategory:function(){return this._category=this._category<<1,this._category},overlap:function(M,A,C,w,P){return C===void 0&&(C=null),w===void 0&&(w=null),P===void 0&&(P=C),this.world.collideObjects(M,A,C,w,P,!0)},collide:function(M,A,C,w,P){return C===void 0&&(C=null),w===void 0&&(w=null),P===void 0&&(P=C),this.world.collideObjects(M,A,C,w,P,!1)},collideTiles:function(M,A,C,w,P){return this.world.collideTiles(M,A,C,w,P)},overlapTiles:function(M,A,C,w,P){return this.world.overlapTiles(M,A,C,w,P)},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},accelerateTo:function(M,A,C,w,P,L){w===void 0&&(w=60);var O=Math.atan2(C-M.y,A-M.x);return M.body.acceleration.setToPolar(O,w),P!==void 0&&L!==void 0&&M.body.maxVelocity.set(P,L),O},accelerateToObject:function(M,A,C,w,P){return this.accelerateTo(M,A.x,A.y,C,w,P)},closest:function(M,A){A||(A=this.world.bodies.entries);for(var C=Number.MAX_VALUE,w=null,P=M.x,L=M.y,O=A.length,I=0;IC&&(w=D,C=G)}}return w},moveTo:function(M,A,C,w,P){w===void 0&&(w=60),P===void 0&&(P=0);var L=Math.atan2(C-M.y,A-M.x);return P>0&&(w=h(M.x,M.y,A,C)/(P/1e3)),M.body.velocity.setToPolar(L,w),L},moveToObject:function(M,A,C,w){return this.moveTo(M,A.x,A.y,C,w)},velocityFromAngle:function(M,A,C){return A===void 0&&(A=60),C===void 0&&(C=new v),C.setToPolar(p(M),A)},velocityFromRotation:function(M,A,C){return A===void 0&&(A=60),C===void 0&&(C=new v),C.setToPolar(M,A)},overlapRect:function(M,A,C,w,P,L){return s(this.world,M,A,C,w,P,L)},overlapCirc:function(M,A,C,w,P){return f(this.world,M,A,C,w,P)},shutdown:function(){if(this.world){var M=this.systems.events;M.off(d.UPDATE,this.world.update,this.world),M.off(d.POST_UPDATE,this.world.postUpdate,this.world),M.off(d.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(d.START,this.start,this),this.scene=null,this.systems=null}});c.register("ArcadePhysics",S,"arcadePhysics"),a.exports=S},13759:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(92209),h=t(68287),o=new r({Extends:h,Mixins:[p.Acceleration,p.Angular,p.Bounce,p.Collision,p.Debug,p.Drag,p.Enable,p.Friction,p.Gravity,p.Immovable,p.Mass,p.Pushable,p.Size,p.Velocity],initialize:function(n,u,f,s,c){h.call(this,n,u,f,s,c),this.body=null}});a.exports=o},37742:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(78389),h=t(37747),o=t(63012),l=t(43396),n=t(87841),u=t(37303),f=t(95829),s=t(26099),c=new r({Mixins:[p],initialize:function(v,m){var S=64,M=64,A={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=A),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 s,this.position=new s(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 s(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=new s,this.newVelocity=new s,this.deltaMax=new s,this.acceleration=new s,this.allowDrag=!0,this.drag=new s,this.allowGravity=!0,this.gravity=new s,this.bounce=new s,this.worldBounce=null,this.customBoundsRectangle=v.bounds,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.maxVelocity=new s(1e4,1e4),this.maxSpeed=-1,this.friction=new s(1,0),this.useDamping=!1,this.angularVelocity=0,this.angularAcceleration=0,this.angularDrag=0,this.maxAngular=1e3,this.mass=1,this.angle=0,this.speed=0,this.facing=h.FACING_NONE,this.immovable=!1,this.pushable=!0,this.slideFactor=new s(1,1),this.moves=!0,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision=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 d=this.gameObject,v=this.transform;if(d.parentContainer){var m=d.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=d.displayOriginX,v.displayOriginY=d.displayOriginY}else v.x=d.x,v.y=d.y,v.rotation=d.angle,v.scaleX=d.scaleX,v.scaleY=d.scaleY,v.displayOriginX=d.displayOriginX,v.displayOriginY=d.displayOriginY;var S=!1;if(this.syncBounds){var M=d.getBounds(this._bounds);this.width=M.width,this.height=M.height,S=!0}else{var A=Math.abs(v.scaleX),C=Math.abs(v.scaleY);(this._sx!==A||this._sy!==C)&&(this.width=this.sourceWidth*A,this.height=this.sourceHeight*C,this._sx=A,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 d=this.transform;this.position.x=d.x+d.scaleX*(this.offset.x-d.displayOriginX),this.position.y=d.y+d.scaleY*(this.offset.y-d.displayOriginY),this.updateCenter()},resetFlags:function(d){d===void 0&&(d=!1);var v=this.wasTouching,m=this.touching,S=this.blocked;d?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(d,v){if(d&&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}d&&this.update(v)},update:function(d){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)/d,(m.y-M.y)/d),this.world.updateMotion(this,d),this._dx=m.x-M.x,this._dy=m.y-M.y}else this.world.updateMotion(this,d),this.newVelocity.set(S.x*d,S.y*d),m.add(this.newVelocity),this._dx=m.x-v.x,this._dy=m.y-v.y;var A=S.x,C=S.y;if(this.updateCenter(),this.angle=Math.atan2(C,A),this.speed=Math.sqrt(A*A+C*C),this.collideWorldBounds&&this.checkWorldBounds()&&this.onWorldBounds){var w=this.blocked;this.world.emit(o.WORLD_BOUNDS,this,w.up,w.down,w.left,w.right)}},postUpdate:function(){var d=this.position,v=d.x-this.prevFrame.x,m=d.y-this.prevFrame.y,S=this.gameObject;if(this.moves){var M=this.deltaMax.x,A=this.deltaMax.y;M!==0&&v!==0&&(v<0&&v<-M?v=-M:v>0&&v>M&&(v=M)),A!==0&&m!==0&&(m<0&&m<-A?m=-A:m>0&&m>A&&(m=A)),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(d.x,d.y)},setBoundsRectangle:function(d){return this.customBoundsRectangle=d||this.world.bounds,this},checkWorldBounds:function(){var d=this.position,v=this.velocity,m=this.blocked,S=this.customBoundsRectangle,M=this.world.checkCollision,A=this.worldBounce?-this.worldBounce.x:-this.bounce.x,C=this.worldBounce?-this.worldBounce.y:-this.bounce.y,w=!1;return d.xS.right&&M.right&&(d.x=S.right-this.width,v.x*=A,m.right=!0,w=!0),d.yS.bottom&&M.down&&(d.y=S.bottom-this.height,v.y*=C,m.down=!0,w=!0),w&&(this.blocked.none=!1,this.updateCenter()),w},setOffset:function(d,v){return v===void 0&&(v=d),this.offset.set(d,v),this},setGameObject:function(d,v){return v===void 0&&(v=!0),this.world.remove(this),this.gameObject&&this.gameObject.body&&(this.gameObject.body=null),this.gameObject=d,d.body&&(d.body=this),this.setSize(),this.world.add(this),this.enable=v,this},setSize:function(d,v,m){m===void 0&&(m=!0);var S=this.gameObject;if(S&&(!d&&S.frame&&(d=S.frame.realWidth),!v&&S.frame&&(v=S.frame.realHeight)),this.sourceWidth=d,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-d)/2,A=(S.height-v)/2;this.offset.set(M,A)}return this.isCircle=!1,this.radius=0,this},setCircle:function(d,v,m){return v===void 0&&(v=this.offset.x),m===void 0&&(m=this.offset.y),d>0?(this.isCircle=!0,this.radius=d,this.sourceWidth=d*2,this.sourceHeight=d*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(d,v){this.stop();var m=this.gameObject;m&&(m.setPosition(d,v),this.rotation=m.angle,this.preRotation=m.angle);var S=this.position;m&&m.getTopLeft?m.getTopLeft(S):S.set(d,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(d){return d.x=this.x,d.y=this.y,d.right=this.right,d.bottom=this.bottom,d},hitTest:function(d,v){if(!this.isCircle)return u(this,d,v);if(this.radius>0&&d>=this.left&&d<=this.right&&v>=this.top&&v<=this.bottom){var m=(this.center.x-d)*(this.center.x-d),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(d){var v=this.position,m=v.x+this.halfWidth,S=v.y+this.halfHeight;this.debugShowBody&&(d.lineStyle(d.defaultStrokeWidth,this.debugBodyColor),this.isCircle?d.strokeCircle(m,S,this.width/2):(this.checkCollision.up&&d.lineBetween(v.x,v.y,v.x+this.width,v.y),this.checkCollision.right&&d.lineBetween(v.x+this.width,v.y,v.x+this.width,v.y+this.height),this.checkCollision.down&&d.lineBetween(v.x,v.y+this.height,v.x+this.width,v.y+this.height),this.checkCollision.left&&d.lineBetween(v.x,v.y,v.x,v.y+this.height))),this.debugShowVelocity&&(d.lineStyle(d.defaultStrokeWidth,this.world.defaults.velocityDebugColor,1),d.lineBetween(m,S,m+this.velocity.x/2,S+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setDirectControl:function(d){return d===void 0&&(d=!0),this.directControl=d,this},setCollideWorldBounds:function(d,v,m,S){d===void 0&&(d=!0),this.collideWorldBounds=d;var M=v!==void 0,A=m!==void 0;return(M||A)&&(this.worldBounce||(this.worldBounce=new s),M&&(this.worldBounce.x=v),A&&(this.worldBounce.y=m)),S!==void 0&&(this.onWorldBounds=S),this},setVelocity:function(d,v){return this.velocity.set(d,v),d=this.velocity.x,v=this.velocity.y,this.speed=Math.sqrt(d*d+v*v),this},setVelocityX:function(d){return this.setVelocity(d,this.velocity.y)},setVelocityY:function(d){return this.setVelocity(this.velocity.x,d)},setMaxVelocity:function(d,v){return this.maxVelocity.set(d,v),this},setMaxVelocityX:function(d){return this.maxVelocity.x=d,this},setMaxVelocityY:function(d){return this.maxVelocity.y=d,this},setMaxSpeed:function(d){return this.maxSpeed=d,this},setSlideFactor:function(d,v){return this.slideFactor.set(d,v),this},setBounce:function(d,v){return this.bounce.set(d,v),this},setBounceX:function(d){return this.bounce.x=d,this},setBounceY:function(d){return this.bounce.y=d,this},setAcceleration:function(d,v){return this.acceleration.set(d,v),this},setAccelerationX:function(d){return this.acceleration.x=d,this},setAccelerationY:function(d){return this.acceleration.y=d,this},setAllowDrag:function(d){return d===void 0&&(d=!0),this.allowDrag=d,this},setAllowGravity:function(d){return d===void 0&&(d=!0),this.allowGravity=d,this},setAllowRotation:function(d){return d===void 0&&(d=!0),this.allowRotation=d,this},setDrag:function(d,v){return this.drag.set(d,v),this},setDamping:function(d){return this.useDamping=d,this},setDragX:function(d){return this.drag.x=d,this},setDragY:function(d){return this.drag.y=d,this},setGravity:function(d,v){return this.gravity.set(d,v),this},setGravityX:function(d){return this.gravity.x=d,this},setGravityY:function(d){return this.gravity.y=d,this},setFriction:function(d,v){return this.friction.set(d,v),this},setFrictionX:function(d){return this.friction.x=d,this},setFrictionY:function(d){return this.friction.y=d,this},setAngularVelocity:function(d){return this.angularVelocity=d,this},setAngularAcceleration:function(d){return this.angularAcceleration=d,this},setAngularDrag:function(d){return this.angularDrag=d,this},setMass:function(d){return this.mass=d,this},setImmovable:function(d){return d===void 0&&(d=!0),this.immovable=d,this},setEnable:function(d){return d===void 0&&(d=!0),this.enable=d,this},processX:function(d,v,m,S){this.x+=d,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(d,v,m,S){this.y+=d,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(d){this.position.x=d}},y:{get:function(){return this.position.y},set:function(d){this.position.y=d}},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}}});a.exports=c},79342:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=new r({initialize:function(o,l,n,u,f,s,c){this.world=o,this.name="",this.active=!0,this.overlapOnly=l,this.object1=n,this.object2=u,this.collideCallback=f,this.processCallback=s,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}});a.exports=p},66022:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(71289),p=t(13759),h=t(37742),o=t(83419),l=t(37747),n=t(60758),u=t(72624),f=t(71464),s=new o({initialize:function(d){this.world=d,this.scene=d.scene,this.sys=d.scene.sys},collider:function(c,d,v,m,S){return this.world.addCollider(c,d,v,m,S)},overlap:function(c,d,v,m,S){return this.world.addOverlap(c,d,v,m,S)},existing:function(c,d){var v=d?l.STATIC_BODY:l.DYNAMIC_BODY;return this.world.enableBody(c,v),c},staticImage:function(c,d,v,m){var S=new r(this.scene,c,d,v,m);return this.sys.displayList.add(S),this.world.enableBody(S,l.STATIC_BODY),S},image:function(c,d,v,m){var S=new r(this.scene,c,d,v,m);return this.sys.displayList.add(S),this.world.enableBody(S,l.DYNAMIC_BODY),S},staticSprite:function(c,d,v,m){var S=new p(this.scene,c,d,v,m);return this.sys.displayList.add(S),this.sys.updateList.add(S),this.world.enableBody(S,l.STATIC_BODY),S},sprite:function(c,d,v,m){var S=new p(this.scene,c,d,v,m);return this.sys.displayList.add(S),this.sys.updateList.add(S),this.world.enableBody(S,l.DYNAMIC_BODY),S},staticGroup:function(c,d){return this.sys.updateList.add(new f(this.world,this.world.scene,c,d))},group:function(c,d){return this.sys.updateList.add(new n(this.world,this.world.scene,c,d))},body:function(c,d,v,m){var S=new h(this.world);return S.position.set(c,d),v&&m&&S.setSize(v,m),this.world.add(S,l.DYNAMIC_BODY),S},staticBody:function(c,d,v,m){var S=new u(this.world);return S.position.set(c,d),v&&m&&S.setSize(v,m),this.world.add(S,l.STATIC_BODY),S},destroy:function(){this.world=null,this.scene=null,this.sys=null}});a.exports=s},79599:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){var r=0;if(!Array.isArray(t))r=t;else 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=t(37747),p=function(h,o,l,n){var u=0,f=h.deltaAbsX()+o.deltaAbsX()+n;return h._dx===0&&o._dx===0?(h.embedded=!0,o.embedded=!0):h._dx>o._dx?(u=h.right-o.x,u>f&&!l||h.checkCollision.right===!1||o.checkCollision.left===!1?u=0:(h.touching.none=!1,h.touching.right=!0,o.touching.none=!1,o.touching.left=!0,o.physicsType===r.STATIC_BODY&&!l&&(h.blocked.none=!1,h.blocked.right=!0),h.physicsType===r.STATIC_BODY&&!l&&(o.blocked.none=!1,o.blocked.left=!0))):h._dxf&&!l||h.checkCollision.left===!1||o.checkCollision.right===!1?u=0:(h.touching.none=!1,h.touching.left=!0,o.touching.none=!1,o.touching.right=!0,o.physicsType===r.STATIC_BODY&&!l&&(h.blocked.none=!1,h.blocked.left=!0),h.physicsType===r.STATIC_BODY&&!l&&(o.blocked.none=!1,o.blocked.right=!0))),h.overlapX=u,o.overlapX=u,u};a.exports=p},45170:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(37747),p=function(h,o,l,n){var u=0,f=h.deltaAbsY()+o.deltaAbsY()+n;return h._dy===0&&o._dy===0?(h.embedded=!0,o.embedded=!0):h._dy>o._dy?(u=h.bottom-o.y,u>f&&!l||h.checkCollision.down===!1||o.checkCollision.up===!1?u=0:(h.touching.none=!1,h.touching.down=!0,o.touching.none=!1,o.touching.up=!0,o.physicsType===r.STATIC_BODY&&!l&&(h.blocked.none=!1,h.blocked.down=!0),h.physicsType===r.STATIC_BODY&&!l&&(o.blocked.none=!1,o.blocked.up=!0))):h._dyf&&!l||h.checkCollision.up===!1||o.checkCollision.down===!1?u=0:(h.touching.none=!1,h.touching.up=!0,o.touching.none=!1,o.touching.down=!0,o.physicsType===r.STATIC_BODY&&!l&&(h.blocked.none=!1,h.blocked.up=!0),h.physicsType===r.STATIC_BODY&&!l&&(o.blocked.none=!1,o.blocked.down=!0))),h.overlapY=u,o.overlapY=u,u};a.exports=p},60758:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(13759),p=t(83419),h=t(78389),o=t(37747),l=t(95540),n=t(26479),u=t(41212),f=new p({Extends:n,Mixins:[h],initialize:function(c,d,v,m){if(!v&&!m)m={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};else if(u(v))m=v,v=null,m.internalCreateCallback=this.createCallbackHandler,m.internalRemoveCallback=this.removeCallbackHandler;else if(Array.isArray(v)&&u(v[0])){var S=this;v.forEach(function(M){M.internalCreateCallback=S.createCallbackHandler,M.internalRemoveCallback=S.removeCallbackHandler,M.classType=l(M,"classType",r)}),m=null}else m={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};this.world=c,m&&(m.classType=l(m,"classType",r)),this.physicsType=o.DYNAMIC_BODY,this.collisionCategory=1,this.collisionMask=1,this.defaults={setCollideWorldBounds:l(m,"collideWorldBounds",!1),setBoundsRectangle:l(m,"customBoundsRectangle",null),setAccelerationX:l(m,"accelerationX",0),setAccelerationY:l(m,"accelerationY",0),setAllowDrag:l(m,"allowDrag",!0),setAllowGravity:l(m,"allowGravity",!0),setAllowRotation:l(m,"allowRotation",!0),setDamping:l(m,"useDamping",!1),setBounceX:l(m,"bounceX",0),setBounceY:l(m,"bounceY",0),setDragX:l(m,"dragX",0),setDragY:l(m,"dragY",0),setEnable:l(m,"enable",!0),setGravityX:l(m,"gravityX",0),setGravityY:l(m,"gravityY",0),setFrictionX:l(m,"frictionX",0),setFrictionY:l(m,"frictionY",0),setMaxSpeed:l(m,"maxSpeed",-1),setMaxVelocityX:l(m,"maxVelocityX",1e4),setMaxVelocityY:l(m,"maxVelocityY",1e4),setVelocityX:l(m,"velocityX",0),setVelocityY:l(m,"velocityY",0),setAngularVelocity:l(m,"angularVelocity",0),setAngularAcceleration:l(m,"angularAcceleration",0),setAngularDrag:l(m,"angularDrag",0),setMass:l(m,"mass",1),setImmovable:l(m,"immovable",!1)},n.call(this,d,v,m),this.type="PhysicsGroup"},createCallbackHandler:function(s){s.body||this.world.enableBody(s,o.DYNAMIC_BODY);var c=s.body;for(var d in this.defaults)c[d](this.defaults[d])},removeCallbackHandler:function(s){s.body&&this.world.disableBody(s)},setVelocity:function(s,c,d){d===void 0&&(d=0);for(var v=this.getChildren(),m=0;m{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y,t,r,p,h,o,l,n,u,f,s,c,d,v,m,S,M,A=function(I,D,B){y=I,t=D;var G=y.velocity.x,z=t.velocity.x;return r=y.pushable,u=y._dx<0,f=y._dx>0,s=y._dx===0,m=Math.abs(y.right-t.x)<=Math.abs(t.right-y.x),l=z-G*y.bounce.x,p=t.pushable,c=t._dx<0,d=t._dx>0,v=t._dx===0,S=!m,n=G-z*t.bounce.x,M=Math.abs(B),C()},C=function(){return f&&m&&t.blocked.right?(y.processX(-M,l,!1,!0),1):u&&S&&t.blocked.left?(y.processX(M,l,!0),1):d&&S&&y.blocked.right?(t.processX(-M,n,!1,!0),2):c&&m&&y.blocked.left?(t.processX(M,n,!0),2):0},w=function(){var I=y.velocity.x,D=t.velocity.x,B=Math.sqrt(D*D*t.mass/y.mass)*(D>0?1:-1),G=Math.sqrt(I*I*y.mass/t.mass)*(I>0?1:-1),z=(B+G)*.5;return B-=z,G-=z,h=z+B*y.bounce.x,o=z+G*t.bounce.x,u&&S?P(0):c&&m?P(1):f&&m?P(2):d&&S?P(3):!1},P=function(I){if(r&&p)M*=.5,I===0||I===3?(y.processX(M,h),t.processX(-M,o)):(y.processX(-M,h),t.processX(M,o));else if(r&&!p)I===0||I===3?y.processX(M,l,!0):y.processX(-M,l,!1,!0);else if(!r&&p)I===0||I===3?t.processX(-M,n,!1,!0):t.processX(M,n,!0);else{var D=M*.5;I===0?v?(y.processX(M,0,!0),t.processX(0,null,!1,!0)):d?(y.processX(D,0,!0),t.processX(-D,0,!1,!0)):(y.processX(D,t.velocity.x,!0),t.processX(-D,null,!1,!0)):I===1?s?(y.processX(0,null,!1,!0),t.processX(M,0,!0)):f?(y.processX(-D,0,!1,!0),t.processX(D,0,!0)):(y.processX(-D,null,!1,!0),t.processX(D,y.velocity.x,!0)):I===2?v?(y.processX(-M,0,!1,!0),t.processX(0,null,!0)):c?(y.processX(-D,0,!1,!0),t.processX(D,0,!0)):(y.processX(-D,t.velocity.x,!1,!0),t.processX(D,null,!0)):I===3&&(s?(y.processX(0,null,!0),t.processX(-M,0,!1,!0)):u?(y.processX(D,0,!0),t.processX(-D,0,!1,!0)):(y.processX(D,t.velocity.y,!0),t.processX(-D,null,!1,!0)))}return!0},L=function(I){I===1?t.velocity.x=0:m?t.processX(M,n,!0):t.processX(-M,n,!1,!0),y.moves&&(t.y+=(y.y-y.prev.y)*y.friction.y,t._dy=t.y-t.prev.y)},O=function(I){I===2?y.velocity.x=0:S?y.processX(M,l,!0):y.processX(-M,l,!1,!0),t.moves&&(y.y+=(t.y-t.prev.y)*t.friction.y,y._dy=y.y-y.prev.y)};a.exports={BlockCheck:C,Check:w,Set:A,Run:P,RunImmovableBody1:L,RunImmovableBody2:O}},47962:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y,t,r,p,h,o,l,n,u,f,s,c,d,v,m,S,M,A=function(I,D,B){y=I,t=D;var G=y.velocity.y,z=t.velocity.y;return r=y.pushable,u=y._dy<0,f=y._dy>0,s=y._dy===0,m=Math.abs(y.bottom-t.y)<=Math.abs(t.bottom-y.y),l=z-G*y.bounce.y,p=t.pushable,c=t._dy<0,d=t._dy>0,v=t._dy===0,S=!m,n=G-z*t.bounce.y,M=Math.abs(B),C()},C=function(){return f&&m&&t.blocked.down?(y.processY(-M,l,!1,!0),1):u&&S&&t.blocked.up?(y.processY(M,l,!0),1):d&&S&&y.blocked.down?(t.processY(-M,n,!1,!0),2):c&&m&&y.blocked.up?(t.processY(M,n,!0),2):0},w=function(){var I=y.velocity.y,D=t.velocity.y,B=Math.sqrt(D*D*t.mass/y.mass)*(D>0?1:-1),G=Math.sqrt(I*I*y.mass/t.mass)*(I>0?1:-1),z=(B+G)*.5;return B-=z,G-=z,h=z+B*y.bounce.y,o=z+G*t.bounce.y,u&&S?P(0):c&&m?P(1):f&&m?P(2):d&&S?P(3):!1},P=function(I){if(r&&p)M*=.5,I===0||I===3?(y.processY(M,h),t.processY(-M,o)):(y.processY(-M,h),t.processY(M,o));else if(r&&!p)I===0||I===3?y.processY(M,l,!0):y.processY(-M,l,!1,!0);else if(!r&&p)I===0||I===3?t.processY(-M,n,!1,!0):t.processY(M,n,!0);else{var D=M*.5;I===0?v?(y.processY(M,0,!0),t.processY(0,null,!1,!0)):d?(y.processY(D,0,!0),t.processY(-D,0,!1,!0)):(y.processY(D,t.velocity.y,!0),t.processY(-D,null,!1,!0)):I===1?s?(y.processY(0,null,!1,!0),t.processY(M,0,!0)):f?(y.processY(-D,0,!1,!0),t.processY(D,0,!0)):(y.processY(-D,null,!1,!0),t.processY(D,y.velocity.y,!0)):I===2?v?(y.processY(-M,0,!1,!0),t.processY(0,null,!0)):c?(y.processY(-D,0,!1,!0),t.processY(D,0,!0)):(y.processY(-D,t.velocity.y,!1,!0),t.processY(D,null,!0)):I===3&&(s?(y.processY(0,null,!0),t.processY(-M,0,!1,!0)):u?(y.processY(D,0,!0),t.processY(-D,0,!1,!0)):(y.processY(D,t.velocity.y,!0),t.processY(-D,null,!1,!0)))}return!0},L=function(I){I===1?t.velocity.y=0:m?t.processY(M,n,!0):t.processY(-M,n,!1,!0),y.moves&&(t.x+=(y.x-y.prev.x)*y.friction.x,t._dx=t.x-t.prev.x)},O=function(I){I===2?y.velocity.y=0:S?y.processY(M,l,!0):y.processY(-M,l,!1,!0),t.moves&&(y.x+=(t.x-t.prev.x)*t.friction.x,y._dx=y.x-y.prev.x)};a.exports={BlockCheck:C,Check:w,Set:A,Run:P,RunImmovableBody1:L,RunImmovableBody2:O}},14087:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(64897),p=t(3017),h=function(o,l,n,u,f){f===void 0&&(f=r(o,l,n,u));var s=o.immovable,c=l.immovable;if(n||f===0||s&&c||o.customSeparateX||l.customSeparateX)return f!==0||o.embedded&&l.embedded;var d=p.Set(o,l,f);return!s&&!c?d>0?!0:p.Check():(s?p.RunImmovableBody1(d):c&&p.RunImmovableBody2(d),!0)};a.exports=h},89936:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(45170),p=t(47962),h=function(o,l,n,u,f){f===void 0&&(f=r(o,l,n,u));var s=o.immovable,c=l.immovable;if(n||f===0||s&&c||o.customSeparateY||l.customSeparateY)return f!==0||o.embedded&&l.embedded;var d=p.Set(o,l,f);return!s&&!c?d>0?!0:p.Check():(s?p.RunImmovableBody1(d):c&&p.RunImmovableBody2(d),!0)};a.exports=h},95829:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){return r===void 0&&(r={}),r.none=t,r.up=!1,r.down=!1,r.left=!1,r.right=!1,t||(r.up=!0,r.down=!0,r.left=!0,r.right=!0),r};a.exports=y},72624:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(87902),p=t(83419),h=t(78389),o=t(37747),l=t(37303),n=t(95829),u=t(26099),f=new p({Mixins:[h],initialize:function(c,d){var v=64,m=64,S={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0},M=d!==void 0;M&&d.displayWidth&&(v=d.displayWidth,m=d.displayHeight),M||(d=S),this.world=c,this.gameObject=M?d: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(d.x-v*d.originX,d.y-m*d.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=o.STATIC_BODY,this.collisionCategory=1,this.collisionMask=1,this._dx=0,this._dy=0},setGameObject:function(s,c){return s&&s!==this.gameObject&&(this.gameObject.body=null,s.body=this,this.gameObject=s),c&&this.updateFromGameObject(),this},updateFromGameObject:function(){this.world.staticTree.remove(this);var s=this.gameObject;return s.getTopLeft(this.position),this.width=s.displayWidth,this.height=s.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.world.staticTree.insert(this),this},setOffset:function(s,c){return c===void 0&&(c=s),this.world.staticTree.remove(this),this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(s,c),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this),this},setSize:function(s,c,d){d===void 0&&(d=!0);var v=this.gameObject;if(v&&v.frame&&(s||(s=v.frame.realWidth),c||(c=v.frame.realHeight)),this.world.staticTree.remove(this),this.width=s,this.height=c,this.halfWidth=Math.floor(s/2),this.halfHeight=Math.floor(c/2),d&&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(s,c,d){return c===void 0&&(c=this.offset.x),d===void 0&&(d=this.offset.y),s>0?(this.world.staticTree.remove(this),this.isCircle=!0,this.radius=s,this.width=s*2,this.height=s*2,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(c,d),this.updateCenter(),this.world.staticTree.insert(this)):this.isCircle=!1,this},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},reset:function(s,c){var d=this.gameObject;s===void 0&&(s=d.x),c===void 0&&(c=d.y),this.world.staticTree.remove(this),d.setPosition(s,c),d.getTopLeft(this.position),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this)},stop:function(){return this},getBounds:function(s){return s.x=this.x,s.y=this.y,s.right=this.right,s.bottom=this.bottom,s},hitTest:function(s,c){return this.isCircle?r(this,s,c):l(this,s,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(s){var c=this.position,d=c.x+this.halfWidth,v=c.y+this.halfHeight;this.debugShowBody&&(s.lineStyle(s.defaultStrokeWidth,this.debugBodyColor,1),this.isCircle?s.strokeCircle(d,v,this.width/2):s.strokeRect(c.x,c.y,this.width,this.height))},willDrawDebug:function(){return this.debugShowBody},setMass:function(s){return s<=0&&(s=.1),this.mass=s,this},x:{get:function(){return this.position.x},set:function(s){this.world.staticTree.remove(this),this.position.x=s,this.world.staticTree.insert(this)}},y:{get:function(){return this.position.y},set:function(s){this.world.staticTree.remove(this),this.position.y=s,this.world.staticTree.insert(this)}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});a.exports=f},71464:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(13759),p=t(83419),h=t(78389),o=t(37747),l=t(95540),n=t(26479),u=t(41212),f=new p({Extends:n,Mixins:[h],initialize:function(c,d,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=o.STATIC_BODY,this.collisionCategory=1,this.collisionMask=1,n.call(this,d,v,m),this.type="StaticPhysicsGroup"},createCallbackHandler:function(s){s.body||this.world.enableBody(s,o.STATIC_BODY)},removeCallbackHandler:function(s){s.body&&this.world.disableBody(s)},createMultipleCallbackHandler:function(){this.refresh()},refresh:function(){for(var s=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=t(55495),p=t(37742),h=t(45319),o=t(83419),l=t(79342),n=t(37747),u=t(20339),f=t(52816),s=t(50792),c=t(63012),d=t(43855),v=t(5470),m=t(94977),S=t(64897),M=t(45170),A=t(96523),C=t(35154),w=t(36383),P=t(25774),L=t(96602),O=t(87841),I=t(59542),D=t(40012),B=t(14087),G=t(89936),z=t(35072),W=t(72624),k=t(2483),J=t(61340),Q=t(26099),Y=t(15994),K=new o({Extends:s,initialize:function(V,j){s.call(this),this.scene=V,this.bodies=new z,this.staticBodies=new z,this.pendingDestroy=new z,this.colliders=new P,this.gravity=new Q(C(j,"gravity.x",0),C(j,"gravity.y",0)),this.bounds=new O(C(j,"x",0),C(j,"y",0),C(j,"width",V.sys.scale.width),C(j,"height",V.sys.scale.height)),this.checkCollision={up:C(j,"checkCollision.up",!0),down:C(j,"checkCollision.down",!0),left:C(j,"checkCollision.left",!0),right:C(j,"checkCollision.right",!0)},this.fps=C(j,"fps",60),this.fixedStep=C(j,"fixedStep",!0),this._elapsed=0,this._frameTime=1/this.fps,this._frameTimeMS=1e3*this._frameTime,this.stepsLastFrame=0,this.timeScale=C(j,"timeScale",1),this.OVERLAP_BIAS=C(j,"overlapBias",4),this.TILE_BIAS=C(j,"tileBias",16),this.forceX=C(j,"forceX",!1),this.isPaused=C(j,"isPaused",!1),this._total=0,this.drawDebug=C(j,"debug",!1),this.debugGraphic,this.defaults={debugShowBody:C(j,"debugShowBody",!0),debugShowStaticBody:C(j,"debugShowStaticBody",!0),debugShowVelocity:C(j,"debugShowVelocity",!0),bodyDebugColor:C(j,"debugBodyColor",16711935),staticBodyDebugColor:C(j,"debugStaticBodyColor",255),velocityDebugColor:C(j,"debugVelocityColor",65280)},this.maxEntries=C(j,"maxEntries",16),this.useTree=C(j,"useTree",!0),this.tree=new I(this.maxEntries),this.staticTree=new I(this.maxEntries),this.treeMinMax={minX:0,minY:0,maxX:0,maxY:0},this._tempMatrix=new J,this._tempMatrix2=new J,this.tileFilterOptions={isColliding:!0,isNotEmpty:!0,hasInterestingFace:!0},this.drawDebug&&this.createDebugGraphic()},enable:function(U,V){V===void 0&&(V=n.DYNAMIC_BODY),Array.isArray(U)||(U=[U]);for(var j=0;j=q;for(this.fixedStep||($=V*.001,et=!0,this._elapsed=0),j=0;j=q;)this._elapsed-=q,this.step($)}},step:function(U){var V,j,$=this.bodies.entries,q=$.length;for(V=0;V0){var ht=this.tree,ut=this.staticTree;for(j=et.entries,$=j.length,U=0;U<$;U++)V=j[U],V.physicsType===n.DYNAMIC_BODY?(ht.remove(V),q.delete(V)):V.physicsType===n.STATIC_BODY&&(ut.remove(V),it.delete(V)),V.world=void 0,V.gameObject=void 0;et.clear()}},updateMotion:function(U,V){U.allowRotation&&this.computeAngularVelocity(U,V),this.computeVelocity(U,V)},computeAngularVelocity:function(U,V){var j=U.angularVelocity,$=U.angularAcceleration,q=U.angularDrag,it=U.maxAngular;$?j+=$*V:U.allowDrag&&q&&(q*=V,v(j-q,0,.1)?j-=q:m(j+q,0,.1)?j+=q:j=0),j=h(j,-it,it);var nt=j-U.angularVelocity;U.angularVelocity+=nt,U.rotation+=U.angularVelocity*V},computeVelocity:function(U,V){var j=U.velocity.x,$=U.acceleration.x,q=U.drag.x,it=U.maxVelocity.x,nt=U.velocity.y,et=U.acceleration.y,ht=U.drag.y,ut=U.maxVelocity.y,dt=U.speed,mt=U.maxSpeed,gt=U.allowDrag,At=U.useDamping;U.allowGravity&&(j+=(this.gravity.x+U.gravity.x)*V,nt+=(this.gravity.y+U.gravity.y)*V),$?j+=$*V:gt&&q&&(At?(q=Math.pow(q,V),j*=q,dt=Math.sqrt(j*j+nt*nt),d(dt,0,.001)&&(j=0)):(q*=V,v(j-q,0,.01)?j-=q:m(j+q,0,.01)?j+=q:j=0)),et?nt+=et*V:gt&&ht&&(At?(ht=Math.pow(ht,V),nt*=ht,dt=Math.sqrt(j*j+nt*nt),d(dt,0,.001)&&(nt=0)):(ht*=V,v(nt-ht,0,.01)?nt-=ht:m(nt+ht,0,.01)?nt+=ht:nt=0)),j=h(j,-it,it),nt=h(nt,-ut,ut),U.velocity.set(j,nt),mt>-1&&U.velocity.length()>mt&&(U.velocity.normalize().scale(mt),dt=mt),U.speed=dt},separate:function(U,V,j,$,q){var it,nt,et=!1,ht=!0;if(!U.enable||!V.enable||U.checkCollision.none||V.checkCollision.none||!this.intersects(U,V)||j&&j.call($,U.gameObject,V.gameObject)===!1)return et;if(U.isCircle||V.isCircle){var ut=this.separateCircle(U,V,q);ut.result?(et=!0,ht=!1):(it=ut.x,nt=ut.y,ht=!0)}if(ht){var dt=!1,mt=!1,gt=this.OVERLAP_BIAS;q?(dt=B(U,V,q,gt,it),mt=G(U,V,q,gt,nt)):this.forceX||Math.abs(this.gravity.y+U.gravity.y)wt&&(mt=u(At,ot,wt,Tt)-st):ot>Et&&(Atwt&&(mt=u(At,ot,wt,Et)-st)),mt*=-1}else mt=U.halfWidth+V.halfWidth-f(it,nt);U.overlapR=mt,V.overlapR=mt;var Gt=r(it,nt),Wt=(mt+w.EPSILON)*Math.cos(Gt),Jt=(mt+w.EPSILON)*Math.sin(Gt),$t={overlap:mt,result:!1,x:Wt,y:Jt};if(j&&(!gt||gt&&mt!==0))return $t.result=!0,$t;if(!gt&&mt===0||et&&ht||U.customSeparateX||V.customSeparateX)return $t.x=void 0,$t.y=void 0,$t;var te=!U.pushable&&!V.pushable;if(gt){var Nt=it.x-nt.x,Te=it.y-nt.y,le=Math.sqrt(Math.pow(Nt,2)+Math.pow(Te,2)),ce=(nt.x-it.x)/le||0,se=(nt.y-it.y)/le||0,ee=2*(ut.x*ce+ut.y*se-dt.x*ce-dt.y*se)/(U.mass+V.mass);(et||ht)&&(ee*=2),et||(ut.x=ut.x-ee/U.mass*ce,ut.y=ut.y-ee/U.mass*se,ut.multiply(U.bounce)),ht||(dt.x=dt.x+ee/V.mass*ce,dt.y=dt.y+ee/V.mass*se,dt.multiply(V.bounce)),!et&&!ht&&(Wt*=.5,Jt*=.5),et||(U.x-=Wt,U.y-=Jt,U.updateCenter()),ht||(V.x+=Wt,V.y+=Jt,V.updateCenter()),$t.result=!0}else!et||U.pushable||te?(U.x-=Wt,U.y-=Jt,U.updateCenter()):(!ht||V.pushable||te)&&(V.x+=Wt,V.y+=Jt,V.updateCenter()),$t.x=void 0,$t.y=void 0;return $t},intersects:function(U,V){return U===V?!1:!U.isCircle&&!V.isCircle?!(U.right<=V.left||U.bottom<=V.top||U.left>=V.right||U.top>=V.bottom):U.isCircle?V.isCircle?f(U.center,V.center)<=U.halfWidth+V.halfWidth:this.circleBodyIntersects(U,V):this.circleBodyIntersects(V,U)},circleBodyIntersects:function(U,V){var j=h(U.center.x,V.left,V.right),$=h(U.center.y,V.top,V.bottom),q=(U.center.x-j)*(U.center.x-j),it=(U.center.y-$)*(U.center.y-$);return q+it<=U.halfWidth*U.halfWidth},overlap:function(U,V,j,$,q){return j===void 0&&(j=null),$===void 0&&($=null),q===void 0&&(q=j),this.collideObjects(U,V,j,$,q,!0)},collide:function(U,V,j,$,q){return j===void 0&&(j=null),$===void 0&&($=null),q===void 0&&(q=j),this.collideObjects(U,V,j,$,q,!1)},collideObjects:function(U,V,j,$,q,it){var nt,et;U.isParent&&(U.physicsType===void 0||V===void 0||U===V)&&(U=U.children.entries),V&&V.isParent&&V.physicsType===void 0&&(V=V.children.entries);var ht=Array.isArray(U),ut=Array.isArray(V);if(this._total=0,!ht&&!ut)this.collideHandler(U,V,j,$,q,it);else if(!ht&&ut)for(nt=0;nt0},collideHandler:function(U,V,j,$,q,it){if(V===void 0&&U.isParent)return this.collideGroupVsGroup(U,U,j,$,q,it);if(!U||!V)return!1;if(U.body||U.isBody){if(V.body||V.isBody)return this.collideSpriteVsSprite(U,V,j,$,q,it);if(V.isParent)return this.collideSpriteVsGroup(U,V,j,$,q,it);if(V.isTilemap)return this.collideSpriteVsTilemapLayer(U,V,j,$,q,it)}else if(U.isParent){if(V.body||V.isBody)return this.collideSpriteVsGroup(V,U,j,$,q,it);if(V.isParent)return this.collideGroupVsGroup(U,V,j,$,q,it);if(V.isTilemap)return this.collideGroupVsTilemapLayer(U,V,j,$,q,it)}else if(U.isTilemap){if(V.body||V.isBody)return this.collideSpriteVsTilemapLayer(V,U,j,$,q,it);if(V.isParent)return this.collideGroupVsTilemapLayer(V,U,j,$,q,it)}},canCollide:function(U,V){return U&&V&&(U.collisionMask&V.collisionCategory)!==0&&(V.collisionMask&U.collisionCategory)!==0},collideSpriteVsSprite:function(U,V,j,$,q,it){var nt=U.isBody?U:U.body,et=V.isBody?V:V.body;return this.canCollide(nt,et)?(this.separate(nt,et,$,q,it)&&(j&&j.call(q,U,V),this._total++),!0):!1},collideSpriteVsGroup:function(U,V,j,$,q,it){var nt=U.isBody?U:U.body;if(!(V.length===0||!nt||!nt.enable||nt.checkCollision.none||!this.canCollide(nt,V))){var et,ht,ut;if(this.useTree||V.physicsType===n.STATIC_BODY){var dt=this.treeMinMax;dt.minX=nt.left,dt.minY=nt.top,dt.maxX=nt.right,dt.maxY=nt.bottom;var mt=V.physicsType===n.DYNAMIC_BODY?this.tree.search(dt):this.staticTree.search(dt);for(ht=mt.length,et=0;et{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y={setAcceleration:function(t,r){return this.body.acceleration.set(t,r),this},setAccelerationX:function(t){return this.body.acceleration.x=t,this},setAccelerationY:function(t){return this.body.acceleration.y=t,this}};a.exports=y},59023:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y={setAngularVelocity:function(t){return this.body.angularVelocity=t,this},setAngularAcceleration:function(t){return this.body.angularAcceleration=t,this},setAngularDrag:function(t){return this.body.angularDrag=t,this}};a.exports=y},62069:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y={setBounce:function(t,r){return this.body.bounce.set(t,r),this},setBounceX:function(t){return this.body.bounce.x=t,this},setBounceY:function(t){return this.body.bounce.y=t,this},setCollideWorldBounds:function(t,r,p,h){return this.body.setCollideWorldBounds(t,r,p,h),this}};a.exports=y},78389:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(79599),p={setCollisionCategory:function(h){var o=this.body?this.body:this;return o.collisionCategory=h,this},willCollideWith:function(h){var o=this.body?this.body:this;return(o.collisionMask&h)!==0},addCollidesWith:function(h){var o=this.body?this.body:this;return o.collisionMask=o.collisionMask|h,this},removeCollidesWith:function(h){var o=this.body?this.body:this;return o.collisionMask=o.collisionMask&~h,this},setCollidesWith:function(h){var o=this.body?this.body:this;return o.collisionMask=r(h),this},resetCollisionCategory:function(){var h=this.body?this.body:this;return h.collisionCategory=1,h.collisionMask=1,this}};a.exports=p},87118:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y={setDebug:function(t,r,p){return this.debugShowBody=t,this.debugShowVelocity=r,this.debugBodyColor=p,this},setDebugBodyColor:function(t){return this.body.debugBodyColor=t,this},debugShowBody:{get:function(){return this.body.debugShowBody},set:function(t){this.body.debugShowBody=t}},debugShowVelocity:{get:function(){return this.body.debugShowVelocity},set:function(t){this.body.debugShowVelocity=t}},debugBodyColor:{get:function(){return this.body.debugBodyColor},set:function(t){this.body.debugBodyColor=t}}};a.exports=y},52819:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y={setDrag:function(t,r){return this.body.drag.set(t,r),this},setDragX:function(t){return this.body.drag.x=t,this},setDragY:function(t){return this.body.drag.y=t,this},setDamping:function(t){return this.body.useDamping=t,this}};a.exports=y},4074:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y={setDirectControl:function(t){return this.body.setDirectControl(t),this},enableBody:function(t,r,p,h,o){return t&&this.body.reset(r,p),h&&(this.body.gameObject.active=!0),o&&(this.body.gameObject.visible=!0),this.body.enable=!0,this},disableBody:function(t,r){return t===void 0&&(t=!1),r===void 0&&(r=!1),this.body.stop(),this.body.enable=!1,t&&(this.body.gameObject.active=!1),r&&(this.body.gameObject.visible=!1),this},refreshBody:function(){return this.body.updateFromGameObject(),this}};a.exports=y},40831:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y={setFriction:function(t,r){return this.body.friction.set(t,r),this},setFrictionX:function(t){return this.body.friction.x=t,this},setFrictionY:function(t){return this.body.friction.y=t,this}};a.exports=y},26775:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y={setGravity:function(t,r){return this.body.gravity.set(t,r),this},setGravityX:function(t){return this.body.gravity.x=t,this},setGravityY:function(t){return this.body.gravity.y=t,this}};a.exports=y},9437:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y={setImmovable:function(t){return t===void 0&&(t=!0),this.body.immovable=t,this}};a.exports=y},30621:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y={setMass:function(t){return this.body.mass=t,this}};a.exports=y},72441:(a,y,t)=>{var r=t(47956),p=t(96503),h=t(2044),o=t(81491),l=function(n,u,f,s,c,d){var v=r(n,u-s,f-s,2*s,2*s,c,d);if(v.length===0)return v;for(var m=new p(u,f,s),S=new p,M=[],A=0;A{var y=function(t,r,p,h,o,l,n){l===void 0&&(l=!0),n===void 0&&(n=!1);var u=[],f=[],s=t.treeMinMax;if(s.minX=r,s.minY=p,s.maxX=r+h,s.maxY=p+o,n&&(f=t.staticTree.search(s)),l&&t.useTree)u=t.tree.search(s);else if(l){var c=t.bodies,d={position:{x:r,y:p},left:r,top:p,right:r+h,bottom:p+o,isCircle:!1},v=t.intersects;c.iterate(function(m){v(m,d)&&u.push(m)})}return f.concat(u)};a.exports=y},62121:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y={setPushable:function(t){return t===void 0&&(t=!0),this.body.pushable=t,this}};a.exports=y},29384:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y={setOffset:function(t,r){return this.body.setOffset(t,r),this},setSize:function(t,r,p){return this.body.setSize(t,r,p),this},setBodySize:function(t,r,p){return this.body.setSize(t,r,p),this},setCircle:function(t,r,p){return this.body.setCircle(t,r,p),this}};a.exports=y},15098:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y={setVelocity:function(t,r){return this.body.setVelocity(t,r),this},setVelocityX:function(t){return this.body.setVelocityX(t),this},setVelocityY:function(t){return this.body.setVelocityY(t),this},setMaxVelocity:function(t,r){return this.body.maxVelocity.set(t,r),this}};a.exports=y},92209:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={Acceleration:t(1093),Angular:t(59023),Bounce:t(62069),Collision:t(78389),Debug:t(87118),Drag:t(52819),Enable:t(4074),Friction:t(40831),Gravity:t(26775),Immovable:t(9437),Mass:t(30621),OverlapCirc:t(72441),OverlapRect:t(47956),Pushable:t(62121),Size:t(29384),Velocity:t(15098)}},37747:a=>{/** + * @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};a.exports=y},20009:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="collide"},36768:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="overlap"},60473:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="pause"},89954:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="resume"},61804:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="tilecollide"},7161:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="tileoverlap"},34689:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="worldbounds"},16006:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="worldstep"},63012:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={COLLIDE:t(20009),OVERLAP:t(36768),PAUSE:t(60473),RESUME:t(89954),TILE_COLLIDE:t(61804),TILE_OVERLAP:t(7161),WORLD_BOUNDS:t(34689),WORLD_STEP:t(16006)}},27064:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(37747),p=t(79291),h={ArcadePhysics:t(86689),Body:t(37742),Collider:t(79342),Components:t(92209),Events:t(63012),Factory:t(66022),GetCollidesWith:t(79599),GetOverlapX:t(64897),GetOverlapY:t(45170),SeparateX:t(14087),SeparateY:t(89936),Group:t(60758),Image:t(71289),Sprite:t(13759),StaticBody:t(72624),StaticGroup:t(71464),Tilemap:t(55173),World:t(82248)};h=p(!1,h,r),a.exports=h},96602:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){return t.collisionCallback?!t.collisionCallback.call(t.collisionCallbackContext,r,t):t.layer.callbacks[t.index]?!t.layer.callbacks[t.index].callback.call(t.layer.callbacks[t.index].callbackContext,r,t):!0};a.exports=y},36294:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){r<0?(t.blocked.none=!1,t.blocked.left=!0):r>0&&(t.blocked.none=!1,t.blocked.right=!0),t.position.x-=r,t.updateCenter(),t.bounce.x===0?t.velocity.x=0:t.velocity.x=-t.velocity.x*t.bounce.x};a.exports=y},67013:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){r<0?(t.blocked.none=!1,t.blocked.up=!0):r>0&&(t.blocked.none=!1,t.blocked.down=!0),t.position.y-=r,t.updateCenter(),t.bounce.y===0?t.velocity.y=0:t.velocity.y=-t.velocity.y*t.bounce.y};a.exports=y},40012:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(21329),p=t(53442),h=t(2483),o=function(l,n,u,f,s,c,d){var v=f.left,m=f.top,S=f.right,M=f.bottom,A=u.faceLeft||u.faceRight,C=u.faceTop||u.faceBottom;if(d||(A=!0,C=!0),!A&&!C)return!1;var w=0,P=0,L=0,O=1;if(n.deltaAbsX()>n.deltaAbsY()?L=-1:n.deltaAbsX(){/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(36294),p=function(h,o,l,n,u,f){var s=0,c=o.faceLeft,d=o.faceRight,v=o.collideLeft,m=o.collideRight;return f||(c=!0,d=!0,v=!0,m=!0),h.deltaX()<0&&m&&h.checkCollision.left?d&&h.x0&&v&&h.checkCollision.right&&c&&h.right>l&&(s=h.right-l,s>u&&(s=0)),s!==0&&(h.customSeparateX?h.overlapX=s:r(h,s)),s};a.exports=p},53442:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(67013),p=function(h,o,l,n,u,f){var s=0,c=o.faceTop,d=o.faceBottom,v=o.collideUp,m=o.collideDown;return f||(c=!0,d=!0,v=!0,m=!0),h.deltaY()<0&&m&&h.checkCollision.up?d&&h.y0&&v&&h.checkCollision.down&&c&&h.bottom>l&&(s=h.bottom-l,s>u&&(s=0)),s!==0&&(h.customSeparateY?h.overlapY=s:r(h,s)),s};a.exports=p},2483:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){return!(r.right<=t.left||r.bottom<=t.top||r.position.x>=t.right||r.position.y>=t.bottom)};a.exports=y},55173:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r={ProcessTileCallbacks:t(96602),ProcessTileSeparationX:t(36294),ProcessTileSeparationY:t(67013),SeparateTile:t(40012),TileCheckX:t(21329),TileCheckY:t(53442),TileIntersectsBody:t(2483)};a.exports=r},44563:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={Arcade:t(27064),Matter:t(3875)}},68174:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(26099),h=new r({initialize:function(){this.boundsCenter=new p,this.centerDiff=new p},parseBody:function(o){if(o=o.hasOwnProperty("body")?o.body:o,!o.hasOwnProperty("bounds")||!o.hasOwnProperty("centerOfMass"))return!1;var l=this.boundsCenter,n=this.centerDiff,u=o.bounds.max.x-o.bounds.min.x,f=o.bounds.max.y-o.bounds.min.y,s=u*o.centerOfMass.x,c=f*o.centerOfMass.y;return l.set(u/2,f/2),n.set(s-l.x,c-l.y),!0},getTopLeft:function(o,l,n){if(l===void 0&&(l=0),n===void 0&&(n=0),this.parseBody(o)){var u=this.boundsCenter,f=this.centerDiff;return new p(l+u.x+f.x,n+u.y+f.y)}return!1},getTopCenter:function(o,l,n){if(l===void 0&&(l=0),n===void 0&&(n=0),this.parseBody(o)){var u=this.boundsCenter,f=this.centerDiff;return new p(l+f.x,n+u.y+f.y)}return!1},getTopRight:function(o,l,n){if(l===void 0&&(l=0),n===void 0&&(n=0),this.parseBody(o)){var u=this.boundsCenter,f=this.centerDiff;return new p(l-(u.x-f.x),n+u.y+f.y)}return!1},getLeftCenter:function(o,l,n){if(l===void 0&&(l=0),n===void 0&&(n=0),this.parseBody(o)){var u=this.boundsCenter,f=this.centerDiff;return new p(l+u.x+f.x,n+f.y)}return!1},getCenter:function(o,l,n){if(l===void 0&&(l=0),n===void 0&&(n=0),this.parseBody(o)){var u=this.centerDiff;return new p(l+u.x,n+u.y)}return!1},getRightCenter:function(o,l,n){if(l===void 0&&(l=0),n===void 0&&(n=0),this.parseBody(o)){var u=this.boundsCenter,f=this.centerDiff;return new p(l-(u.x-f.x),n+f.y)}return!1},getBottomLeft:function(o,l,n){if(l===void 0&&(l=0),n===void 0&&(n=0),this.parseBody(o)){var u=this.boundsCenter,f=this.centerDiff;return new p(l+u.x+f.x,n-(u.y-f.y))}return!1},getBottomCenter:function(o,l,n){if(l===void 0&&(l=0),n===void 0&&(n=0),this.parseBody(o)){var u=this.boundsCenter,f=this.centerDiff;return new p(l+f.x,n-(u.y-f.y))}return!1},getBottomRight:function(o,l,n){if(l===void 0&&(l=0),n===void 0&&(n=0),this.parseBody(o)){var u=this.boundsCenter,f=this.centerDiff;return new p(l-(u.x-f.x),n-(u.y-f.y))}return!1}});a.exports=h},19933:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(6790);r.Body=t(22562),r.Composite=t(69351),r.World=t(4372),r.Collision=t(52284),r.Detector=t(81388),r.Pairs=t(99561),r.Pair=t(4506),r.Query=t(73296),r.Resolver=t(66272),r.Constraint=t(48140),r.Common=t(53402),r.Engine=t(48413),r.Events=t(35810),r.Sleeping=t(53614),r.Plugin=t(73832),r.Bodies=t(66280),r.Composites=t(74116),r.Axes=t(66615),r.Bounds=t(15647),r.Svg=t(74058),r.Vector=t(31725),r.Vertices=t(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,a.exports=r},28137:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(66280),p=t(83419),h=t(74116),o=t(48140),l=t(74058),n=t(75803),u=t(23181),f=t(34803),s=t(73834),c=t(19496),d=t(85791),v=t(98713),m=t(41598),S=new p({initialize:function(A){this.world=A,this.scene=A.scene,this.sys=A.scene.sys},rectangle:function(M,A,C,w,P){var L=r.rectangle(M,A,C,w,P);return this.world.add(L),L},trapezoid:function(M,A,C,w,P,L){var O=r.trapezoid(M,A,C,w,P,L);return this.world.add(O),O},circle:function(M,A,C,w,P){var L=r.circle(M,A,C,w,P);return this.world.add(L),L},polygon:function(M,A,C,w,P){var L=r.polygon(M,A,C,w,P);return this.world.add(L),L},fromVertices:function(M,A,C,w,P,L,O){typeof C=="string"&&(C=m.fromPath(C));var I=r.fromVertices(M,A,C,w,P,L,O);return this.world.add(I),I},fromPhysicsEditor:function(M,A,C,w,P){P===void 0&&(P=!0);var L=c.parseBody(M,A,C,w);return P&&!this.world.has(L)&&this.world.add(L),L},fromSVG:function(M,A,C,w,P,L){w===void 0&&(w=1),P===void 0&&(P={}),L===void 0&&(L=!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=t(31884),p=t(95540),h=t(26099);function o(n){return!!n.get&&typeof n.get=="function"||!!n.set&&typeof n.set=="function"}var l=function(n,u,f,s){f===void 0&&(f={}),s===void 0&&(s=!0);var c=u.x,d=u.y;u.body={temp:!0,position:{x:c,y:d}};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)o(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,d),f.hasOwnProperty("type")&&f.type==="body")u.setExistingBody(f,s);else{var m=p(f,"shape",null);m||(m="rectangle"),f.addToWorld=s,u.setBody(m,f)}return u};a.exports=l},23181:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(31884),h=t(95643),o=t(95540),l=t(88571),n=t(72699),u=t(26099),f=new r({Extends:l,Mixins:[p.Bounce,p.Collision,p.Force,p.Friction,p.Gravity,p.Mass,p.Sensor,p.SetBody,p.Sleep,p.Static,p.Transform,p.Velocity,n],initialize:function(c,d,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(d,v);var A=o(M,"shape",null);A?this.setBody(A,M):this.setRectangle(this.width,this.height,M),this.setPosition(d,v),this.initPipeline(),this.initPostPipeline(!0)}});a.exports=f},42045:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(60461),p=t(66615),h=t(66280),o=t(22562),l=t(68174),n=t(15647),u=t(83419),f=t(52284),s=t(53402),c=t(69351),d=t(74116),v=t(48140),m=t(81388),S=t(20339),M=t(28137),A=t(95540),C=t(35154),w=t(18210),P=t(40178),L=t(6790),O=t(74507),I=t(46975),D=t(4506),B=t(99561),G=t(73832),z=t(37277),W=t(73296),k=t(66272),J=t(44594),Q=t(74058),Y=t(31725),K=t(41598),U=t(68243);s.setDecomp(t(55973));var V=new u({initialize:function($){this.scene=$,this.systems=$.sys,this.config=this.getConfig(),this.world,this.add,this.bodyBounds,this.body=o,this.composite=c,this.collision=f,this.detector=m,this.pair=D,this.pairs=B,this.query=W,this.resolver=k,this.constraint=v,this.bodies=h,this.composites=d,this.axes=p,this.bounds=n,this.svg=Q,this.vector=Y,this.vertices=K,this.verts=K,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(),k._restingThresh=C(this.config,"restingThresh",4),k._restingThreshTangent=C(this.config,"restingThreshTangent",6),k._positionDampen=C(this.config,"positionDampen",.9),k._positionWarming=C(this.config,"positionWarming",.8),k._frictionNormalMultiplier=C(this.config,"frictionNormalMultiplier",5),$.sys.events.once(J.BOOT,this.boot,this),$.sys.events.on(J.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(J.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new U(this.scene,this.config),this.add=new M(this.world));var j=this.systems.events;j.on(J.UPDATE,this.world.update,this.world),j.on(J.POST_UPDATE,this.world.postUpdate,this.world),j.once(J.SHUTDOWN,this.shutdown,this)},getConfig:function(){var j=this.systems.game.config.physics,$=this.systems.settings.physics,q=I(A($,"matter",{}),A(j,"matter",{}));return q},enableAttractorPlugin:function(){return G.register(w),G.use(L,w),this},enableWrapPlugin:function(){return G.register(O),G.use(L,O),this},enableCollisionEventsPlugin:function(){return G.register(P),G.use(L,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(j,$){this.world.step(j,$)},containsPoint:function(j,$,q){j=this.getMatterBodies(j);var it=Y.create($,q),nt=W.point(j,it);return nt.length>0},intersectPoint:function(j,$,q){q=this.getMatterBodies(q);var it=Y.create(j,$),nt=[],et=W.point(q,it);return et.forEach(function(ht){nt.indexOf(ht)===-1&&nt.push(ht)}),nt},intersectRect:function(j,$,q,it,nt,et){nt===void 0&&(nt=!1),et=this.getMatterBodies(et);var ht={min:{x:j,y:$},max:{x:j+q,y:$+it}},ut=[],dt=W.region(et,ht,nt);return dt.forEach(function(mt){ut.indexOf(mt)===-1&&ut.push(mt)}),ut},intersectRay:function(j,$,q,it,nt,et){nt===void 0&&(nt=1),et=this.getMatterBodies(et);for(var ht=[],ut=W.ray(et,Y.create(j,$),Y.create(q,it),nt),dt=0;dt{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(9674),p=t(83419),h=t(31884),o=t(95643),l=t(95540),n=t(72699),u=t(68287),f=t(26099),s=new p({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(d,v,m,S,M,A){o.call(this,d.scene,"Sprite"),this._crop=this.resetCropObject(),this.anims=new r(this),this.setTexture(S,M),this.setSizeToFrame(),this.setOrigin(),this.world=d,this._tempVec2=new f(v,m);var C=l(A,"shape",null);C?this.setBody(C,A):this.setRectangle(this.width,this.height,A),this.setPosition(v,m),this.initPipeline(),this.initPostPipeline(!0)}});a.exports=s},73834:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(66280),p=t(22562),h=t(83419),o=t(31884),l=t(62644),n=t(50792),u=t(95540),f=t(97022),s=t(41598),c=new h({Extends:n,Mixins:[o.Bounce,o.Collision,o.Friction,o.Gravity,o.Mass,o.Sensor,o.Sleep,o.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),A=u(S,"addToWorld",!0);if(M)this.setBody(M,A);else{var C=m.getCollisionGroup(),w=u(C,"objects",[]);w.length>0?this.setFromTileCollision(S):this.setFromTileRectangle(S)}if(m.flipX||m.flipY){var P={x:m.getCenterX(),y:m.getCenterY()},L=m.flipX?-1:1,O=m.flipY?-1:1;p.scale(M,L,O,P)}},setFromTileRectangle:function(d){d===void 0&&(d={}),f(d,"isStatic")||(d.isStatic=!0),f(d,"addToWorld")||(d.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,d);return this.setBody(M,d.addToWorld),this},setFromTileCollision:function(d){d===void 0&&(d={}),f(d,"isStatic")||(d.isStatic=!0),f(d,"addToWorld")||(d.addToWorld=!0);for(var v=this.tile.tilemapLayer.scaleX,m=this.tile.tilemapLayer.scaleY,S=this.tile.getLeft(),M=this.tile.getTop(),A=this.tile.getCollisionGroup(),C=u(A,"objects",[]),w=[],P=0;P1){var Q=l(d);Q.parts=w,this.setBody(p.create(Q),Q.addToWorld)}return this},setBody:function(d,v){return v===void 0&&(v=!0),this.body&&this.removeBody(),this.body=d,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()}});a.exports=c},19496:(a,y,t)=>{/** + * @author Joachim Grill + * @author Richard Davey + * @copyright 2018 CodeAndWeb GmbH + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(66280),p=t(22562),h=t(53402),o=t(95540),l=t(41598),n={parseBody:function(u,f,s,c){c===void 0&&(c={});for(var d=o(s,"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=t(66280),p=t(22562),h={parseBody:function(o,l,n,u){u===void 0&&(u={});var f,s=n.vertices;if(s.length===1)u.vertices=s[0],f=p.create(u),r.flagCoincidentParts(f.parts);else{for(var c=[],d=0;d{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(15647),p=t(83419),h=t(69351),o=t(48140),l=t(81388),n=t(1121),u=t(8214),f=t(46975),s=t(53614),c=t(26099),d=t(41598),v=new p({initialize:function(S,M,A){A===void 0&&(A={});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=o.create(f(A,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 A=h.allBodies(this.world.localWorld),C=0;C1?1:0,w=C;w{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(66280),p=t(22562),h=t(83419),o=t(53402),l=t(69351),n=t(48413),u=t(50792),f=t(1121),s=t(95540),c=t(35154),d=t(22562),v=t(35810),m=t(73834),S=t(4372),M=t(31725),A=new h({Extends:u,initialize:function(w,P){u.call(this),this.scene=w,this.engine=n.create(P),this.localWorld=this.engine.world;var L=c(P,"gravity",null);L?this.setGravity(L.x,L.y,L.scale):L===!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=s(P,"runner",{}),I=s(O,"fps",!1),D=s(O,"fps",60),B=s(O,"delta",1e3/D),G=s(O,"deltaMin",1e3/D),z=s(O,"deltaMax",1e3/(D*.5));I||(D=1e3/B),this.runner={fps:D,deltaSampleSize:s(O,"deltaSampleSize",60),counterTimestamp:0,frameCounter:0,deltaHistory:[],timePrev:null,timeScalePrev:1,frameRequestId:null,isFixed:s(O,"isFixed",!1),delta:B,deltaMin:G,deltaMax:z},this.autoUpdate=c(P,"autoUpdate",!0);var W=c(P,"debug",!1);if(this.drawDebug=typeof W=="object"?!0:W,this.debugGraphic,this.debugConfig={showAxes:s(W,"showAxes",!1),showAngleIndicator:s(W,"showAngleIndicator",!1),angleColor:s(W,"angleColor",15208787),showBroadphase:s(W,"showBroadphase",!1),broadphaseColor:s(W,"broadphaseColor",16757760),showBounds:s(W,"showBounds",!1),boundsColor:s(W,"boundsColor",16777215),showVelocity:s(W,"showVelocity",!1),velocityColor:s(W,"velocityColor",44783),showCollisions:s(W,"showCollisions",!1),collisionColor:s(W,"collisionColor",16094476),showSeparations:s(W,"showSeparations",!1),separationColor:s(W,"separationColor",16753920),showBody:s(W,"showBody",!0),showStaticBody:s(W,"showStaticBody",!0),showInternalEdges:s(W,"showInternalEdges",!1),renderFill:s(W,"renderFill",!1),renderLine:s(W,"renderLine",!0),fillColor:s(W,"fillColor",1075465),fillOpacity:s(W,"fillOpacity",1),lineColor:s(W,"lineColor",2678297),lineOpacity:s(W,"lineOpacity",1),lineThickness:s(W,"lineThickness",1),staticFillColor:s(W,"staticFillColor",857979),staticLineColor:s(W,"staticLineColor",1255396),showSleeping:s(W,"showSleeping",!1),staticBodySleepOpacity:s(W,"staticBodySleepOpacity",.7),sleepFillColor:s(W,"sleepFillColor",4605510),sleepLineColor:s(W,"sleepLineColor",10066585),showSensors:s(W,"showSensors",!0),sensorFillColor:s(W,"sensorFillColor",857979),sensorLineColor:s(W,"sensorLineColor",1255396),showPositions:s(W,"showPositions",!0),positionSize:s(W,"positionSize",4),positionColor:s(W,"positionColor",14697178),showJoint:s(W,"showJoint",!0),jointColor:s(W,"jointColor",14737474),jointLineOpacity:s(W,"jointLineOpacity",1),jointLineThickness:s(W,"jointLineThickness",2),pinSize:s(W,"pinSize",4),pinColor:s(W,"pinColor",4382944),springColor:s(W,"springColor",14697184),anchorColor:s(W,"anchorColor",15724527),anchorSize:s(W,"anchorSize",4),showConvexHulls:s(W,"showConvexHulls",!1),hullColor:s(W,"hullColor",14091216)},this.drawDebug&&this.createDebugGraphic(),this.setEventsProxy(),s(P,"setBounds",!1)){var k=P.setBounds;if(typeof k=="boolean")this.setBounds();else{var J=s(k,"x",0),Q=s(k,"y",0),Y=s(k,"width",w.sys.scale.width),K=s(k,"height",w.sys.scale.height),U=s(k,"thickness",64),V=s(k,"left",!0),j=s(k,"right",!0),$=s(k,"top",!0),q=s(k,"bottom",!0);this.setBounds(J,Q,Y,K,U,V,j,$,q)}}},setCompositeRenderStyle:function(C){var w=C.bodies,P=C.constraints,L=C.composites,O,I,D;for(O=0;O0&&(I=O[0].bodyA,D=O[0].bodyB),C.emit(f.COLLISION_START,L,I,D)}),v.on(w,"collisionActive",function(L){var O=L.pairs,I,D;O.length>0&&(I=O[0].bodyA,D=O[0].bodyB),C.emit(f.COLLISION_ACTIVE,L,I,D)}),v.on(w,"collisionEnd",function(L){var O=L.pairs,I,D;O.length>0&&(I=O[0].bodyA,D=O[0].bodyB),C.emit(f.COLLISION_END,L,I,D)})},setBounds:function(C,w,P,L,O,I,D,B,G){return C===void 0&&(C=0),w===void 0&&(w=0),P===void 0&&(P=this.scene.sys.scale.width),L===void 0&&(L=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,w-O,O,L+O*2),this.updateWall(D,"right",C+P,w-O,O,L+O*2),this.updateWall(B,"top",C,w-O,P,O),this.updateWall(G,"bottom",C,w+L,P,O),this},updateWall:function(C,w,P,L,O,I){var D=this.walls[w];C?(D&&S.remove(this.localWorld,D),P+=O/2,L+=I/2,this.walls[w]=this.create(P,L,O,I,{isStatic:!0,friction:0,frictionStatic:0})):(D&&S.remove(this.localWorld,D),this.walls[w]=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,w,P){return C===void 0&&(C=0),w===void 0&&(w=1),P===void 0&&(P=.001),this.localWorld.gravity.x=C,this.localWorld.gravity.y=w,this.localWorld.gravity.scale=P,this},create:function(C,w,P,L,O){var I=r.rectangle(C,w,P,L,O);return S.add(this.localWorld,I),I},add:function(C){return S.add(this.localWorld,C),this},remove:function(C,w){Array.isArray(C)||(C=[C]);for(var P=0;PL.deltaMax?L.deltaMax:w,L.delta=w),L.timeScalePrev=O.timeScale,L.frameCounter+=1,C-L.counterTimestamp>=1e3&&(L.fps=L.frameCounter*((C-L.counterTimestamp)/1e3),L.counterTimestamp=C,L.frameCounter=0),n.update(P,w)}},step:function(C){n.update(this.engine,C)},update60Hz:function(){return 1e3/60},update30Hz:function(){return 1e3/30},has:function(C){var w=C.hasOwnProperty("body")?C.body:C;return l.get(this.localWorld,w.id,w.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,w=this.engine,P=this.debugGraphic,L=l.allBodies(this.localWorld);this.debugGraphic.clear(),C.showBroadphase&&w.broadphase.controller&&this.renderGrid(w.broadphase,P,C.broadphaseColor,.5),C.showBounds&&this.renderBodyBounds(L,P,C.boundsColor,.5),(C.showBody||C.showStaticBody)&&this.renderBodies(L),C.showJoint&&this.renderJoints(),(C.showAxes||C.showAngleIndicator)&&this.renderBodyAxes(L,P,C.showAxes,C.angleColor,.5),C.showVelocity&&this.renderBodyVelocity(L,P,C.velocityColor,1,2),C.showSeparations&&this.renderSeparations(w.pairs.list,P,C.separationColor),C.showCollisions&&this.renderCollisions(w.pairs.list,P,C.collisionColor)}},renderGrid:function(C,w,P,L){w.lineStyle(1,P,L);for(var O=o.keys(C.buckets),I=0;I0){var W=z[0].vertex.x,k=z[0].vertex.y;z.length===2&&(W=(z[0].vertex.x+z[1].vertex.x)/2,k=(z[0].vertex.y+z[1].vertex.y)/2),G.bodyB===G.supports[0].body||G.bodyA.isStatic?w.lineBetween(W-G.normal.x*8,k-G.normal.y*8,W,k):w.lineBetween(W+G.normal.x*8,k+G.normal.y*8,W,k)}}return this},renderBodyBounds:function(C,w,P,L){w.lineStyle(1,P,L);for(var O=0;O1?1:0;G1?1:0;z1?1:0;z1&&this.renderConvexHull(K,w,Q,j)}}},renderBody:function(C,w,P,L,O,I,D,B){L===void 0&&(L=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,W=G.sensorLineColor,k=C.parts,J=k.length,Q=J>1?1:0;Q1){var D=C.vertices;w.lineStyle(L,P),w.beginPath(),w.moveTo(D[0].x,D[0].y);for(var B=1;B0&&(w.fillStyle(D),w.fillCircle(k.x,k.y,B),w.fillCircle(J.x,J.y,B)),this},resetCollisionIDs:function(){return p._nextCollidingGroupId=1,p._nextNonCollidingGroupId=-1,p._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()}});a.exports=A},70410:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y={setBounce:function(t){return this.body.restitution=t,this}};a.exports=y},66968:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y={setCollisionCategory:function(t){return this.body.collisionFilter.category=t,this},setCollisionGroup:function(t){return this.body.collisionFilter.group=t,this},setCollidesWith:function(t){var r=0;if(!Array.isArray(t))r=t;else 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=t(22562),p={applyForce:function(h){return this._tempVec2.set(this.body.position.x,this.body.position.y),r.applyForce(this.body,this._tempVec2,h),this},applyForceFrom:function(h,o){return r.applyForce(this.body,h,o),this},thrust:function(h){var o=this.body.angle;return this._tempVec2.set(h*Math.cos(o),h*Math.sin(o)),r.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustLeft:function(h){var o=this.body.angle-Math.PI/2;return this._tempVec2.set(h*Math.cos(o),h*Math.sin(o)),r.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustRight:function(h){var o=this.body.angle+Math.PI/2;return this._tempVec2.set(h*Math.cos(o),h*Math.sin(o)),r.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustBack:function(h){var o=this.body.angle-Math.PI;return this._tempVec2.set(h*Math.cos(o),h*Math.sin(o)),r.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this}};a.exports=p},5436:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y={setFriction:function(t,r,p){return this.body.friction=t,r!==void 0&&(this.body.frictionAir=r),p!==void 0&&(this.body.frictionStatic=p),this},setFrictionAir:function(t){return this.body.frictionAir=t,this},setFrictionStatic:function(t){return this.body.frictionStatic=t,this}};a.exports=y},39858:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y={setIgnoreGravity:function(t){return this.body.ignoreGravity=t,this}};a.exports=y},37302:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(22562),p=t(26099),h={setMass:function(o){return r.setMass(this.body,o),this},setDensity:function(o){return r.setDensity(this.body,o),this},centerOfMass:{get:function(){return new p(this.body.centerOfMass.x,this.body.centerOfMass.y)}}};a.exports=h},39132:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y={setSensor:function(t){return this.body.isSensor=t,this},isSensor:function(){return this.body.isSensor}};a.exports=y},57772:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(66280),p=t(22562),h=t(43855),o=t(95540),l=t(19496),n=t(85791),u=t(41598),f={setRectangle:function(s,c,d){return this.setBody({type:"rectangle",width:s,height:c},d)},setCircle:function(s,c){return this.setBody({type:"circle",radius:s},c)},setPolygon:function(s,c,d){return this.setBody({type:"polygon",sides:c,radius:s},d)},setTrapezoid:function(s,c,d,v){return this.setBody({type:"trapezoid",width:s,height:c,slope:d},v)},setExistingBody:function(s,c){c===void 0&&(c=!0),this.body&&this.world.remove(this.body,!0),this.body=s;for(var d=0;d{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(1121),p=t(53614),h=t(35810),o={setToSleep:function(){return p.set(this.body,!0),this},setAwake:function(){return p.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}};a.exports=o},90556:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(22562),p={setStatic:function(h){return r.setStatic(this.body,h),this},isStatic:function(){return this.body.isStatic}};a.exports=p},85436:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(22562),p=t(36383),h=t(86554),o=t(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,s=1/this._scaleY;this._scaleX=u,this._scaleX===0?this.renderFlags&=~l:this.renderFlags|=l,r.scale(this.body,f,s),r.scale(this.body,u,this._scaleY)}},scaleY:{get:function(){return this._scaleY},set:function(u){var f=1/this._scaleX,s=1/this._scaleY;this._scaleY=u,this._scaleY===0?this.renderFlags&=~l:this.renderFlags|=l,r.scale(this.body,f,s),r.scale(this.body,this._scaleX,u)}},angle:{get:function(){return o(this.body.angle*p.RAD_TO_DEG)},set:function(u){this.rotation=o(u)*p.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,s){u===void 0&&(u=1),f===void 0&&(f=u);var c=1/this._scaleX,d=1/this._scaleY;return this._scaleX=u,this._scaleY=f,r.scale(this.body,c,d,s),r.scale(this.body,u,f,s),this}};a.exports=n},42081:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(22562),p={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,o){return this._tempVec2.set(h,o),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)}};a.exports=p},31884:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={Bounce:t(70410),Collision:t(66968),Force:t(51607),Friction:t(5436),Gravity:t(39858),Mass:t(37302),Sensor:t(39132),SetBody:t(57772),Sleep:t(38083),Static:t(90556),Transform:t(85436),Velocity:t(42081)}},85608:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="afteradd"},1213:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="afterremove"},25968:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="afterupdate"},67205:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="beforeadd"},39438:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="beforeremove"},44823:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="beforeupdate"},92593:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="collisionactive"},60128:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="collisionend"},76861:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="collisionstart"},92362:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="dragend"},76408:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="drag"},93971:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="dragstart"},5656:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="pause"},47861:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="resume"},79099:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="sleepend"},35906:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="sleepstart"},1121:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={AFTER_ADD:t(85608),AFTER_REMOVE:t(1213),AFTER_UPDATE:t(25968),BEFORE_ADD:t(67205),BEFORE_REMOVE:t(39438),BEFORE_UPDATE:t(44823),COLLISION_ACTIVE:t(92593),COLLISION_END:t(60128),COLLISION_START:t(76861),DRAG_END:t(92362),DRAG:t(76408),DRAG_START:t(93971),PAUSE:t(5656),RESUME:t(47861),SLEEP_END:t(79099),SLEEP_START:t(35906)}},3875:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={BodyBounds:t(68174),Components:t(31884),Events:t(1121),Factory:t(28137),MatterGameObject:t(75803),Image:t(23181),Matter:t(19933),MatterPhysics:t(42045),PolyDecomp:t(55973),Sprite:t(34803),TileBody:t(73834),PhysicsEditorParser:t(19496),PhysicsJSONParser:t(85791),PointerConstraint:t(98713),World:t(68243)}},22562:(a,y,t)=>{var r={};a.exports=r;var p=t(41598),h=t(31725),o=t(53614),l=t(53402),n=t(15647),u=t(66615);(function(){r._timeCorrection=!0,r._inertiaScale=4,r._nextCollidingGroupId=1,r._nextNonCollidingGroupId=-1,r._nextCategory=1,r._baseDelta=16.666666666666668,r.create=function(s){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:{}};!s.hasOwnProperty("position")&&s.hasOwnProperty("vertices")?s.position=p.centre(s.vertices):s.hasOwnProperty("vertices")||(c.vertices=p.fromPath("L 0 0 L 40 0 L 40 40 L 0 40"));var d=l.extend(c,s);return f(d,s),d.setOnCollideWith=function(v,m){return m?this.onCollideWith[v.id]=m:delete this.onCollideWith[v.id],this},d},r.nextGroup=function(s){return s?r._nextNonCollidingGroupId--:r._nextCollidingGroupId++},r.nextCategory=function(){return r._nextCategory=r._nextCategory<<1,r._nextCategory};var f=function(s,c){if(c=c||{},r.set(s,{bounds:s.bounds||n.create(s.vertices),positionPrev:s.positionPrev||h.clone(s.position),anglePrev:s.anglePrev||s.angle,vertices:s.vertices,parts:s.parts||[s],isStatic:s.isStatic,isSleeping:s.isSleeping,parent:s.parent||s}),p.rotate(s.vertices,s.angle,s.position),u.rotate(s.axes,s.angle),n.update(s.bounds,s.vertices,s.velocity),r.set(s,{axes:c.axes||s.axes,area:c.area||s.area,mass:c.mass||s.mass,inertia:c.inertia||s.inertia}),s.parts.length===1){var d=s.bounds,v=s.centerOfMass,m=s.centerOffset,S=d.max.x-d.min.x,M=d.max.y-d.min.y;v.x=-(d.min.x-s.position.x)/S,v.y=-(d.min.y-s.position.y)/M,m.x=S*v.x,m.y=M*v.y}};r.set=function(s,c,d){var v;typeof c=="string"&&(v=c,c={},c[v]=d);for(v in c)if(Object.prototype.hasOwnProperty.call(c,v))switch(d=c[v],v){case"isStatic":r.setStatic(s,d);break;case"isSleeping":o.set(s,d);break;case"mass":r.setMass(s,d);break;case"density":r.setDensity(s,d);break;case"inertia":r.setInertia(s,d);break;case"vertices":r.setVertices(s,d);break;case"position":r.setPosition(s,d);break;case"angle":r.setAngle(s,d);break;case"velocity":r.setVelocity(s,d);break;case"angularVelocity":r.setAngularVelocity(s,d);break;case"speed":r.setSpeed(s,d);break;case"angularSpeed":r.setAngularSpeed(s,d);break;case"parts":r.setParts(s,d);break;case"centre":r.setCentre(s,d);break;default:s[v]=d}},r.setStatic=function(s,c){for(var d=0;d0&&h.rotateAbout(S.position,v,s.position,S.position)}},r.setVelocity=function(s,c){var d=s.deltaTime/r._baseDelta;s.positionPrev.x=s.position.x-c.x*d,s.positionPrev.y=s.position.y-c.y*d,s.velocity.x=(s.position.x-s.positionPrev.x)/d,s.velocity.y=(s.position.y-s.positionPrev.y)/d,s.speed=h.magnitude(s.velocity)},r.getVelocity=function(s){var c=r._baseDelta/s.deltaTime;return{x:(s.position.x-s.positionPrev.x)*c,y:(s.position.y-s.positionPrev.y)*c}},r.getSpeed=function(s){return h.magnitude(r.getVelocity(s))},r.setSpeed=function(s,c){r.setVelocity(s,h.mult(h.normalise(r.getVelocity(s)),c))},r.setAngularVelocity=function(s,c){var d=s.deltaTime/r._baseDelta;s.anglePrev=s.angle-c*d,s.angularVelocity=(s.angle-s.anglePrev)/d,s.angularSpeed=Math.abs(s.angularVelocity)},r.getAngularVelocity=function(s){return(s.angle-s.anglePrev)*r._baseDelta/s.deltaTime},r.getAngularSpeed=function(s){return Math.abs(r.getAngularVelocity(s))},r.setAngularSpeed=function(s,c){r.setAngularVelocity(s,l.sign(r.getAngularVelocity(s))*c)},r.translate=function(s,c,d){r.setPosition(s,h.add(s.position,c),d)},r.rotate=function(s,c,d,v){if(!d)r.setAngle(s,s.angle+c,v);else{var m=Math.cos(c),S=Math.sin(c),M=s.position.x-d.x,A=s.position.y-d.y;r.setPosition(s,{x:d.x+(M*m-A*S),y:d.y+(M*S+A*m)},v),r.setAngle(s,s.angle+c,v)}},r.scale=function(s,c,d,v){var m=0,S=0;v=v||s.position;for(var M=s.inertia===1/0,A=0;A0&&(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)*d,n.update(C.bounds,C.vertices,s.velocity)}s.parts.length>1&&(s.area=m,s.isStatic||(r.setMass(s,s.density*m),r.setInertia(s,S))),s.circleRadius&&(c===d?s.circleRadius*=c:s.circleRadius=null),M&&r.setInertia(s,1/0)},r.update=function(s,c){c=(typeof c<"u"?c:16.666666666666668)*s.timeScale;var d=c*c,v=r._timeCorrection?c/(s.deltaTime||c):1,m=1-s.frictionAir*(c/l._baseDelta),S=(s.position.x-s.positionPrev.x)*v,M=(s.position.y-s.positionPrev.y)*v;s.velocity.x=S*m+s.force.x/s.mass*d,s.velocity.y=M*m+s.force.y/s.mass*d,s.positionPrev.x=s.position.x,s.positionPrev.y=s.position.y,s.position.x+=s.velocity.x,s.position.y+=s.velocity.y,s.deltaTime=c,s.angularVelocity=(s.angle-s.anglePrev)*m*v+s.torque/s.inertia*d,s.anglePrev=s.angle,s.angle+=s.angularVelocity,s.speed=h.magnitude(s.velocity),s.angularSpeed=Math.abs(s.angularVelocity);for(var A=0;A0&&(C.position.x+=s.velocity.x,C.position.y+=s.velocity.y),s.angularVelocity!==0&&(p.rotate(C.vertices,s.angularVelocity,s.position),u.rotate(C.axes,s.angularVelocity),A>0&&h.rotateAbout(C.position,s.angularVelocity,s.position,C.position)),n.update(C.bounds,C.vertices,s.velocity)}},r.updateVelocities=function(s){var c=r._baseDelta/s.deltaTime,d=s.velocity;d.x=(s.position.x-s.positionPrev.x)*c,d.y=(s.position.y-s.positionPrev.y)*c,s.speed=Math.sqrt(d.x*d.x+d.y*d.y),s.angularVelocity=(s.angle-s.anglePrev)*c,s.angularSpeed=Math.abs(s.angularVelocity)},r.applyForce=function(s,c,d){var v={x:c.x-s.position.x,y:c.y-s.position.y};s.force.x+=d.x,s.force.y+=d.y,s.torque+=v.x*d.y-v.y*d.x},r._totalProperties=function(s){for(var c={mass:0,area:0,inertia:0,centre:{x:0,y:0}},d=s.parts.length===1?0:1;d{var r={};a.exports=r;var p=t(35810),h=t(53402),o=t(15647),l=t(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,s){if(p.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,s),s)for(var c=0;c{var r={};a.exports=r;var p=t(69351);(function(){r.create=p.create,r.add=p.add,r.remove=p.remove,r.clear=p.clear,r.addComposite=p.addComposite,r.addBody=p.addBody,r.addConstraint=p.addConstraint})()},52284:(a,y,t)=>{var r={};a.exports=r;var p=t(41598),h=t(4506);(function(){var o=[],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,s){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=s&&s.table[h.id(u,f)],d;c?d=c.collision:(d=r.create(u,f),d.collided=!0,d.bodyA=u.idY?Y=D:DK?K=D:Dd?d=m:m{var y={};a.exports=y,function(){y.create=function(t){return{vertex:t,normalImpulse:0,tangentImpulse:0}}}()},81388:(a,y,t)=>{var r={};a.exports=r;var p=t(53402),h=t(52284);(function(){r.create=function(o){var l={bodies:[],pairs:null};return p.extend(l,o)},r.setBodies=function(o,l){o.bodies=l.slice(0)},r.clear=function(o){o.bodies=[]},r.collisions=function(o){var l=[],n=o.pairs,u=o.bodies,f=u.length,s=r.canCollide,c=h.collides,d,v;for(u.sort(r._compareBoundsX),d=0;dM)break;if(!(AI.max.y)&&!(w&&(O.isStatic||O.isSleeping))&&s(m.collisionFilter,O.collisionFilter)){var D=O.parts.length;if(L&&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,W=G;WI.max.x||S.max.xI.max.y)){var B=c(k,Q,n);B&&l.push(B)}}}}}return l},r.canCollide=function(o,l){return o.group===l.group&&o.group!==0?o.group>0:(o.mask&l.category)!==0&&(l.mask&o.category)!==0},r._compareBoundsX=function(o,l){return o.bounds.min.x-l.bounds.min.x}})()},4506:(a,y,t)=>{var r={};a.exports=r;var p=t(43424);(function(){r.create=function(h,o){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:o,timeUpdated:o,inverseMass:0,friction:0,frictionStatic:0,restitution:0,slop:0};return r.update(u,h,o),u},r.update=function(h,o,l){var n=h.contacts,u=o.supports,f=h.activeContacts,s=o.parentA,c=o.parentB,d=s.vertices.length;h.isActive=!0,h.timeUpdated=l,h.collision=o,h.separation=o.depth,h.inverseMass=s.inverseMass+c.inverseMass,h.friction=s.frictionc.frictionStatic?s.frictionStatic:c.frictionStatic,h.restitution=s.restitution>c.restitution?s.restitution:c.restitution,h.slop=s.slop>c.slop?s.slop:c.slop,o.pair=h,f.length=0;for(var v=0;v{var r={};a.exports=r;var p=t(4506),h=t(53402);(function(){r.create=function(o){return h.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},o)},r.update=function(o,l,n){var u=o.list,f=u.length,s=o.table,c=l.length,d=o.collisionStart,v=o.collisionEnd,m=o.collisionActive,S,M,A,C;for(d.length=0,v.length=0,m.length=0,C=0;C{var r={};a.exports=r;var p=t(31725),h=t(52284),o=t(15647),l=t(66280),n=t(41598);(function(){r.collides=function(u,f){for(var s=[],c=f.length,d=u.bounds,v=h.collides,m=o.overlaps,S=0;S{var r={};a.exports=r;var p=t(41598),h=t(53402),o=t(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,s=l.length;for(n=0;nTt?(A=ot>0?ot:-ot,M=P.friction*(ot>0?1:-1)*s,M<-A?M=-A:M>A&&(M=A)):(M=ot,A=m);var wt=$*z-q*G,Et=it*z-nt*G,Gt=Y/(K+O.inverseInertia*wt*wt+I.inverseInertia*Et*Et),Wt=(1+P.restitution)*At*Gt;if(M*=Gt,At0&&(V.normalImpulse=0),Wt=V.normalImpulse-Jt}if(ot<-d||ot>d)V.tangentImpulse=0;else{var $t=V.tangentImpulse;V.tangentImpulse+=M,V.tangentImpulse<-A&&(V.tangentImpulse=-A),V.tangentImpulse>A&&(V.tangentImpulse=A),M=V.tangentImpulse-$t}var te=G*Wt+W*M,Nt=z*Wt+k*M;O.isStatic||O.isSleeping||(O.positionPrev.x+=te*O.inverseMass,O.positionPrev.y+=Nt*O.inverseMass,O.anglePrev+=($*Nt-q*te)*O.inverseInertia),I.isStatic||I.isSleeping||(I.positionPrev.x-=te*I.inverseMass,I.positionPrev.y-=Nt*I.inverseMass,I.anglePrev-=(it*Nt-nt*te)*I.inverseInertia)}}}}})()},48140:(a,y,t)=>{var r={};a.exports=r;var p=t(41598),h=t(31725),o=t(53614),l=t(15647),n=t(66615),u=t(53402);(function(){r._warming=.4,r._torqueDampen=1,r._minLength=1e-6,r.create=function(f){var s=f;s.bodyA&&!s.pointA&&(s.pointA={x:0,y:0}),s.bodyB&&!s.pointB&&(s.pointB={x:0,y:0});var c=s.bodyA?h.add(s.bodyA.position,s.pointA):s.pointA,d=s.bodyB?h.add(s.bodyB.position,s.pointB):s.pointB,v=h.magnitude(h.sub(c,d));s.length=typeof s.length<"u"?s.length:v,s.id=s.id||u.nextId(),s.label=s.label||"Constraint",s.type="constraint",s.stiffness=s.stiffness||(s.length>0?1:.7),s.damping=s.damping||0,s.angularStiffness=s.angularStiffness||0,s.angleA=s.bodyA?s.bodyA.angle:s.angleA,s.angleB=s.bodyB?s.bodyB.angle:s.angleB,s.plugin={};var m={visible:!0,type:"line",anchors:!0,lineColor:null,lineOpacity:null,lineThickness:null,pinSize:null,anchorColor:null,anchorSize:null};return s.length===0&&s.stiffness>.1?(m.type="pin",m.anchors=!1):s.stiffness<.9&&(m.type="spring"),s.render=u.extend(m,s.render),s},r.preSolveAll=function(f){for(var s=0;s=1||f.length===0,L=P?f.stiffness*s:f.stiffness*s*s,O=f.damping*s,I=h.mult(A,w*L),D=(c?c.inverseMass:0)+(d?d.inverseMass:0),B=(c?c.inverseInertia:0)+(d?d.inverseInertia:0),G=D+B,z,W,k,J,Q;if(O>0){var Y=h.create();k=h.div(A,C),Q=h.sub(d&&h.sub(d.position,d.positionPrev)||Y,c&&h.sub(c.position,c.positionPrev)||Y),J=h.dot(k,Q)}c&&!c.isStatic&&(W=c.inverseMass/D,c.constraintImpulse.x-=I.x*W,c.constraintImpulse.y-=I.y*W,c.position.x-=I.x*W,c.position.y-=I.y*W,O>0&&(c.positionPrev.x-=O*k.x*J*W,c.positionPrev.y-=O*k.y*J*W),z=h.cross(v,I)/G*r._torqueDampen*c.inverseInertia*(1-f.angularStiffness),c.constraintImpulse.angle-=z,c.angle-=z),d&&!d.isStatic&&(W=d.inverseMass/D,d.constraintImpulse.x+=I.x*W,d.constraintImpulse.y+=I.y*W,d.position.x+=I.x*W,d.position.y+=I.y*W,O>0&&(d.positionPrev.x+=O*k.x*J*W,d.positionPrev.y+=O*k.y*J*W),z=h.cross(m,I)/G*r._torqueDampen*d.inverseInertia*(1-f.angularStiffness),d.constraintImpulse.angle+=z,d.angle+=z)}}},r.postSolveAll=function(f){for(var s=0;s0&&(m.position.x+=d.x,m.position.y+=d.y),d.angle!==0&&(p.rotate(m.vertices,d.angle,c.position),n.rotate(m.axes,d.angle),v>0&&h.rotateAbout(m.position,d.angle,c.position,m.position)),l.update(m.bounds,m.vertices,c.velocity)}d.angle*=r._warming,d.x*=r._warming,d.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 s=(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),d=(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=s-d,S=c-v;return Math.sqrt(m*m+S*S)}})()},53402:(a,y,t)=>{var r={};a.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,o){var l,n;typeof o=="boolean"?(l=2,n=o):(l=1,n=!0);for(var u=l;u0;o--){var l=Math.floor(r.random()*(o+1)),n=h[o];h[o]=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,o,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,o){return h=typeof h<"u"?h:0,o=typeof o<"u"?o:1,h+p()*(o-h)};var p=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,o,l){h[o]=r.chain(function(){r.warnOnce("🔅 deprecated 🔅",l)},h[o])},r.nextId=function(){return r._nextId++},r.indexOf=function(h,o){if(h.indexOf)return h.indexOf(o);for(var l=0;l{var r={};a.exports=r;var p=t(53614),h=t(66272),o=t(81388),l=t(99561),n=t(35810),u=t(69351),f=t(48140),s=t(53402),c=t(22562);(function(){r.create=function(d){d=d||{};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=s.extend(v,d);return m.world=d.world||u.create({label:"World"}),m.pairs=d.pairs||l.create(),m.detector=d.detector||o.create(),m.grid={buckets:[]},m.world.gravity=m.gravity,m.broadphase=m.grid,m.metrics={},m},r.update=function(d,v){var m=s.now(),S=d.world,M=d.detector,A=d.pairs,C=d.timing,w=C.timestamp,P;v=typeof v<"u"?v:s._baseDelta,v*=C.timeScale,C.timestamp+=v,C.lastDelta=v;var L={timestamp:C.timestamp,delta:v};n.trigger(d,"beforeUpdate",L);var O=u.allBodies(S),I=u.allConstraints(S);for(S.isModified&&(o.setBodies(M,O),u.setModified(S,!1,!1,!0)),d.enableSleeping&&p.update(O,v),r._bodiesApplyGravity(O,d.gravity),v>0&&r._bodiesUpdate(O,v),n.trigger(d,"beforeSolve",L),f.preSolveAll(O),P=0;P0&&n.trigger(d,"collisionStart",{pairs:A.collisionStart,timestamp:C.timestamp,delta:v});var B=s.clamp(20/d.positionIterations,0,1);for(h.preSolvePosition(A.list),P=0;P0&&n.trigger(d,"collisionActive",{pairs:A.collisionActive,timestamp:C.timestamp,delta:v}),A.collisionEnd.length>0&&n.trigger(d,"collisionEnd",{pairs:A.collisionEnd,timestamp:C.timestamp,delta:v}),r._bodiesClearForces(O),n.trigger(d,"afterUpdate",L),d.timing.lastElapsed=s.now()-m,d},r.merge=function(d,v){if(s.extend(d,v),v.world){d.world=v.world,r.clear(d);for(var m=u.allBodies(d.world),S=0;S{var r={};a.exports=r;var p=t(53402);(function(){r.on=function(h,o,l){for(var n=o.split(" "),u,f=0;f0){l||(l={}),n=o.split(" ");for(var d=0;d{var r={};a.exports=r;var p=t(73832),h=t(53402);(function(){r.name="matter-js",r.version="0.19.0",r.uses=[],r.used=[],r.use=function(){p.use(r,Array.prototype.slice.call(arguments))},r.before=function(o,l){return o=o.replace(/^Matter./,""),h.chainPathBefore(r,o,l)},r.after=function(o,l){return o=o.replace(/^Matter./,""),h.chainPathAfter(r,o,l)}})()},73832:(a,y,t)=>{var r={};a.exports=r;var p=t(53402);(function(){r._registry={},r.register=function(h){if(r.isPlugin(h)||p.warn("Plugin.register:",r.toString(h),"does not implement all required fields."),h.name in r._registry){var o=r._registry[h.name],l=r.versionParse(h.version).number,n=r.versionParse(o.version).number;l>n?(p.warn("Plugin.register:",r.toString(o),"was upgraded to",r.toString(h)),r._registry[h.name]=h):l-1},r.isFor=function(h,o){var l=h.for&&r.dependencyParse(h.for);return!h.for||o.name===l.name&&r.versionSatisfies(o.version,l.range)},r.use=function(h,o){if(h.uses=(h.uses||[]).concat(o||[]),h.uses.length===0){p.warn("Plugin.use:",r.toString(h),"does not specify any dependencies to install.");return}for(var l=r.dependencies(h),n=p.topologicalSort(l),u=[],f=0;f0&&!s.silent&&p.info(u.join(" "))},r.dependencies=function(h,o){var l=r.dependencyParse(h),n=l.name;if(o=o||{},!(n in o)){h=r.resolve(h)||h,o[n]=p.map(h.uses||[],function(f){r.isPlugin(f)&&r.register(f);var s=r.dependencyParse(f),c=r.resolve(f);return c&&!r.versionSatisfies(c.version,s.range)?(p.warn("Plugin.dependencies:",r.toString(c),"does not satisfy",r.toString(s),"used by",r.toString(l)+"."),c._warned=!0,h._warned=!0):c||(p.warn("Plugin.dependencies:",r.toString(f),"used by",r.toString(l),"could not be resolved."),h._warned=!0),s.name});for(var u=0;u=|>)?\s*((\d+)\.(\d+)\.(\d+))(-[0-9A-Za-z-+]+)?$/;o.test(h)||p.warn("Plugin.versionParse:",h,"is not a valid version or range.");var l=o.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,o){o=o||"*";var l=r.versionParse(o),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===o||h==="*"}})()},53614:(a,y,t)=>{var r={};a.exports=r;var p=t(22562),h=t(35810),o=t(53402);(function(){r._motionWakeThreshold=.18,r._motionSleepThreshold=.08,r._minBias=.9,r.update=function(l,n){for(var u=n/o._baseDelta,f=r._motionSleepThreshold,s=0;s0&&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:(a,y,t)=>{var r={};a.exports=r;var p=t(41598),h=t(53402),o=t(22562),l=t(15647),n=t(31725);(function(){r.rectangle=function(u,f,s,c,d){d=d||{};var v={label:"Rectangle Body",position:{x:u,y:f},vertices:p.fromPath("L 0 0 L "+s+" 0 L "+s+" "+c+" L 0 "+c)};if(d.chamfer){var m=d.chamfer;v.vertices=p.chamfer(v.vertices,m.radius,m.quality,m.qualityMin,m.qualityMax),delete d.chamfer}return o.create(h.extend({},v,d))},r.trapezoid=function(u,f,s,c,d,v){v=v||{},d*=.5;var m=(1-d*2)*s,S=s*d,M=S+m,A=M+S,C;d<.5?C="L 0 0 L "+S+" "+-c+" L "+M+" "+-c+" L "+A+" 0":C="L 0 0 L "+M+" "+-c+" L "+A+" 0";var w={label:"Trapezoid Body",position:{x:u,y:f},vertices:p.fromPath(C)};if(v.chamfer){var P=v.chamfer;w.vertices=p.chamfer(w.vertices,P.radius,P.quality,P.qualityMin,P.qualityMax),delete v.chamfer}return o.create(h.extend({},w,v))},r.circle=function(u,f,s,c,d){c=c||{};var v={label:"Circle Body",circleRadius:s};d=d||25;var m=Math.ceil(Math.max(10,Math.min(d,s)));return m%2===1&&(m+=1),r.polygon(u,f,m,s,h.extend({},v,c))},r.polygon=function(u,f,s,c,d){if(d=d||{},s<3)return r.circle(u,f,c,d);for(var v=2*Math.PI/s,m="",S=v*.5,M=0;M0&&p.area(Q)1?(C=o.create(h.extend({parts:w.slice(0)},c)),o.setPosition(C,{x:u,y:f}),C):w[0]},r.flagCoincidentParts=function(u,f){f===void 0&&(f=5);for(var s=0;s{var r={};a.exports=r;var p=t(69351),h=t(48140),o=t(53402),l=t(22562),n=t(66280);(function(){r.stack=function(u,f,s,c,d,v,m){for(var S=p.create({label:"Stack"}),M=u,A=f,C,w=0,P=0;PL&&(L=D),l.translate(I,{x:B*.5,y:D*.5}),M=I.bounds.max.x+d,p.addBody(S,I),C=I,w+=1}else M+=d}A+=L+v,M=u}return S},r.chain=function(u,f,s,c,d,v){for(var m=u.bodies,S=1;S0)for(S=0;S0&&(C=v[S-1+(m-1)*f],p.addConstraint(u,h.create(o.extend({bodyA:C,bodyB:A},d)))),c&&SL)){C=L-C;var I=C,D=s-1-C;if(!(AD)){P===1&&l.translate(w,{x:(A+(s%2===1?1:-1))*O,y:0});var B=w?A*O:0;return m(u+B+A*d,M,A,C,w,P)}}})},r.newtonsCradle=function(u,f,s,c,d){for(var v=p.create({label:"Newtons Cradle"}),m=0;m{var r={};a.exports=r;var p=t(31725),h=t(53402);(function(){r.fromVertices=function(o){for(var l={},n=0;n{var y={};a.exports=y,function(){y.create=function(t){var r={min:{x:0,y:0},max:{x:0,y:0}};return t&&y.update(r,t),r},y.update=function(t,r,p){t.min.x=1/0,t.max.x=-1/0,t.min.y=1/0,t.max.y=-1/0;for(var h=0;ht.max.x&&(t.max.x=o.x),o.xt.max.y&&(t.max.y=o.y),o.y0?t.max.x+=p.x:t.min.x+=p.x,p.y>0?t.max.y+=p.y:t.min.y+=p.y)},y.contains=function(t,r){return r.x>=t.min.x&&r.x<=t.max.x&&r.y>=t.min.y&&r.y<=t.max.y},y.overlaps=function(t,r){return t.min.x<=r.max.x&&t.max.x>=r.min.x&&t.max.y>=r.min.y&&t.min.y<=r.max.y},y.translate=function(t,r){t.min.x+=r.x,t.max.x+=r.x,t.min.y+=r.y,t.max.y+=r.y},y.shift=function(t,r){var p=t.max.x-t.min.x,h=t.max.y-t.min.y;t.min.x=r.x,t.max.x=r.x+p,t.min.y=r.y,t.max.y=r.y+h}}()},74058:(a,y,t)=>{var r={};a.exports=r,t(15647);var p=t(53402);(function(){r.pathToVertices=function(h,o){typeof window<"u"&&!("SVGPathSeg"in window)&&p.warn("Svg.pathToVertices: SVGPathSeg not defined, a polyfill is required.");var l,n,u,f,s,c,d,v,m,S,M=[],A,C,w=0,P=0,L=0;o=o||15;var O=function(D,B,G){var z=G%2===1&&G>1;if(!m||D!=m.x||B!=m.y){m&&z?(A=m.x,C=m.y):(A=0,C=0);var W={x:A+D,y:C+B};(z||!m)&&(m=W),M.push(W),P=A+D,L=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,L=D.y;break;case"H":P=D.x;break;case"V":L=D.y;break}O(P,L,D.pathSegType)}};for(r._svgPathToAbsolute(h),u=h.getTotalLength(),c=[],l=0;l{var y={};a.exports=y,function(){y.create=function(t,r){return{x:t||0,y:r||0}},y.clone=function(t){return{x:t.x,y:t.y}},y.magnitude=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},y.magnitudeSquared=function(t){return t.x*t.x+t.y*t.y},y.rotate=function(t,r,p){var h=Math.cos(r),o=Math.sin(r);p||(p={});var l=t.x*h-t.y*o;return p.y=t.x*o+t.y*h,p.x=l,p},y.rotateAbout=function(t,r,p,h){var o=Math.cos(r),l=Math.sin(r);h||(h={});var n=p.x+((t.x-p.x)*o-(t.y-p.y)*l);return h.y=p.y+((t.x-p.x)*l+(t.y-p.y)*o),h.x=n,h},y.normalise=function(t){var r=y.magnitude(t);return r===0?{x:0,y:0}:{x:t.x/r,y:t.y/r}},y.dot=function(t,r){return t.x*r.x+t.y*r.y},y.cross=function(t,r){return t.x*r.y-t.y*r.x},y.cross3=function(t,r,p){return(r.x-t.x)*(p.y-t.y)-(r.y-t.y)*(p.x-t.x)},y.add=function(t,r,p){return p||(p={}),p.x=t.x+r.x,p.y=t.y+r.y,p},y.sub=function(t,r,p){return p||(p={}),p.x=t.x-r.x,p.y=t.y-r.y,p},y.mult=function(t,r){return{x:t.x*r,y:t.y*r}},y.div=function(t,r){return{x:t.x/r,y:t.y/r}},y.perp=function(t,r){return r=r===!0?-1:1,{x:r*-t.y,y:r*t.x}},y.neg=function(t){return{x:-t.x,y:-t.y}},y.angle=function(t,r){return Math.atan2(r.y-t.y,r.x-t.x)},y._temp=[y.create(),y.create(),y.create(),y.create(),y.create(),y.create()]}()},41598:(a,y,t)=>{var r={};a.exports=r;var p=t(31725),h=t(53402);(function(){r.create=function(o,l){for(var n=[],u=0;u0)return!1;s=c}return!0},r.scale=function(o,l,n,u){if(l===1&&n===1)return o;u=u||r.centre(o);for(var f,s,c=0;c=0?c-1:o.length-1],v=o[c],m=o[(c+1)%o.length],S=l[c0&&(l|=2),l===3)return!1;return l!==0?!0:null},r.hull=function(o){var l=[],n=[],u,f;for(o=o.slice(0),o.sort(function(s,c){var d=s.x-c.x;return d!==0?d:s.y-c.y}),f=0;f=2&&p.cross3(n[n.length-2],n[n.length-1],u)<=0;)n.pop();n.push(u)}for(f=o.length-1;f>=0;f-=1){for(u=o[f];l.length>=2&&p.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:(a,y,t)=>{var r=t(19933),p={name:"matter-attractors",version:"0.1.7",for:"matter-js@^0.19.0",silent:!0,install:function(h){h.after("Body.create",function(){p.Body.init(this)}),h.before("Engine.update",function(o){p.Engine.update(o)})},Body:{init:function(h){h.plugin.attractors=h.plugin.attractors||[]}},Engine:{update:function(h){for(var o=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(t){t.after("Engine.create",function(){t.Events.on(this,"collisionStart",function(r){r.pairs.map(function(p){var h=p.bodyA,o=p.bodyB;h.gameObject&&h.gameObject.emit("collide",h,o,p),o.gameObject&&o.gameObject.emit("collide",o,h,p),t.Events.trigger(h,"onCollide",{pair:p}),t.Events.trigger(o,"onCollide",{pair:p}),h.onCollideCallback&&h.onCollideCallback(p),o.onCollideCallback&&o.onCollideCallback(p),h.onCollideWith[o.id]&&h.onCollideWith[o.id](o,p),o.onCollideWith[h.id]&&o.onCollideWith[h.id](h,p)})}),t.Events.on(this,"collisionActive",function(r){r.pairs.map(function(p){var h=p.bodyA,o=p.bodyB;h.gameObject&&h.gameObject.emit("collideActive",h,o,p),o.gameObject&&o.gameObject.emit("collideActive",o,h,p),t.Events.trigger(h,"onCollideActive",{pair:p}),t.Events.trigger(o,"onCollideActive",{pair:p}),h.onCollideActiveCallback&&h.onCollideActiveCallback(p),o.onCollideActiveCallback&&o.onCollideActiveCallback(p)})}),t.Events.on(this,"collisionEnd",function(r){r.pairs.map(function(p){var h=p.bodyA,o=p.bodyB;h.gameObject&&h.gameObject.emit("collideEnd",h,o,p),o.gameObject&&o.gameObject.emit("collideEnd",o,h,p),t.Events.trigger(h,"onCollideEnd",{pair:p}),t.Events.trigger(o,"onCollideEnd",{pair:p}),h.onCollideEndCallback&&h.onCollideEndCallback(p),o.onCollideEndCallback&&o.onCollideEndCallback(p)})})})}};a.exports=y},74507:(a,y,t)=>{var r=t(19933),p={name:"matter-wrap",version:"0.1.4",for:"matter-js@^0.19.0",silent:!0,install:function(h){h.after("Engine.update",function(){p.Engine.update(this)})},Engine:{update:function(h){for(var o=h.world,l=r.Composite.allBodies(o),n=r.Composite.allComposites(o),u=0;uo.max.x?l=o.min.x-h.max.x:h.max.xo.max.y?n=o.min.y-h.max.y:h.max.y{/** + * @author Stefan Hedman (http://steffe.se) + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={decomp:I,quickDecomp:z,isSimple:B,removeCollinearPoints:W,removeDuplicatePoints:k,makeCCW:m};function y(Y,K,U){U=U||0;var V=[0,0],j,$,q,it,nt,et,ht;return j=Y[1][1]-Y[0][1],$=Y[0][0]-Y[1][0],q=j*Y[0][0]+$*Y[0][1],it=K[1][1]-K[0][1],nt=K[0][0]-K[1][0],et=it*K[0][0]+nt*K[0][1],ht=j*nt-it*$,J(ht,0,U)||(V[0]=(nt*q-$*et)/ht,V[1]=(j*et-it*q)/ht),V}function t(Y,K,U,V){var j=K[0]-Y[0],$=K[1]-Y[1],q=V[0]-U[0],it=V[1]-U[1];if(q*$-it*j===0)return!1;var nt=(j*(U[1]-Y[1])+$*(Y[0]-U[0]))/(q*$-it*j),et=(q*(Y[1]-U[1])+it*(U[0]-Y[0]))/(it*j-q*$);return nt>=0&&nt<=1&&et>=0&&et<=1}function r(Y,K,U){return(K[0]-Y[0])*(U[1]-Y[1])-(U[0]-Y[0])*(K[1]-Y[1])}function p(Y,K,U){return r(Y,K,U)>0}function h(Y,K,U){return r(Y,K,U)>=0}function o(Y,K,U){return r(Y,K,U)<0}function l(Y,K,U){return r(Y,K,U)<=0}var n=[],u=[];function f(Y,K,U,V){if(V){var j=n,$=u;j[0]=K[0]-Y[0],j[1]=K[1]-Y[1],$[0]=U[0]-K[0],$[1]=U[1]-K[1];var q=j[0]*$[0]+j[1]*$[1],it=Math.sqrt(j[0]*j[0]+j[1]*j[1]),nt=Math.sqrt($[0]*$[0]+$[1]*$[1]),et=Math.acos(q/(it*nt));return etU[K][0])&&(K=V);return p(c(Y,K-1),c(Y,K),c(Y,K+1))?!1:(S(Y),!0)}function S(Y){for(var K=[],U=Y.length,V=0;V!==U;V++)K.push(Y.pop());for(var V=0;V!==U;V++)Y[V]=K[V]}function M(Y,K){return o(c(Y,K-1),c(Y,K),c(Y,K+1))}var A=[],C=[];function w(Y,K,U){var V,j,$=A,q=C;if(h(c(Y,K+1),c(Y,K),c(Y,U))&&l(c(Y,K-1),c(Y,K),c(Y,U)))return!1;j=s(c(Y,K),c(Y,U));for(var it=0;it!==Y.length;++it)if(!((it+1)%Y.length===K||it===K)&&h(c(Y,K),c(Y,U),c(Y,it+1))&&l(c(Y,K),c(Y,U),c(Y,it))&&($[0]=c(Y,K),$[1]=c(Y,U),q[0]=c(Y,it),q[1]=c(Y,it+1),V=y($,q),s(c(Y,K),V)0?D(Y,K):[Y]}function D(Y,K){if(K.length===0)return[Y];if(K instanceof Array&&K.length&&K[0]instanceof Array&&K[0].length===2&&K[0][0]instanceof Array){for(var U=[Y],V=0;V$)return console.warn("quickDecomp: max level ("+$+") reached."),K;for(var Et=0;Etgt&&(gt+=Y.length),mt=Number.MAX_VALUE,gt3&&V>=0;--V)f(c(Y,V-1),c(Y,V),c(Y,V+1),K)&&(Y.splice(V%Y.length,1),U++);return U}function k(Y,K){for(var U=Y.length-1;U>=1;--U)for(var V=Y[U],j=U-1;j>=0;--j)if(Q(V,Y[j],K)){Y.splice(U,1);continue}}function J(Y,K,U){return U=U||0,Math.abs(Y-K)<=U}function Q(Y,K,U){return J(Y[0],K[0],U)&&J(Y[1],K[1],U)}},52018:(a,y,t)=>{/** +* @author Richard Davey +* @copyright 2013-2024 Phaser Studio Inc. +* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} +*/var r=t(83419),p=new r({initialize:function(o){this.pluginManager=o,this.game=o.game},init:function(){},start:function(){},stop:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});a.exports=p},42363:a=>{/** + * @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"]};a.exports=y},37277:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y={},t={},r={};r.register=function(p,h,o,l){l===void 0&&(l=!1),y[p]={plugin:h,mapping:o,custom:l}},r.registerCustom=function(p,h,o,l){t[p]={plugin:h,mapping:o,data:l}},r.hasCore=function(p){return y.hasOwnProperty(p)},r.hasCustom=function(p){return t.hasOwnProperty(p)},r.getCore=function(p){return y[p]},r.getCustom=function(p){return t[p]},r.getCustomClass=function(p){return t.hasOwnProperty(p)?t[p].plugin:null},r.remove=function(p){y.hasOwnProperty(p)&&delete y[p]},r.removeCustom=function(p){t.hasOwnProperty(p)&&delete t[p]},r.destroyCorePlugins=function(){for(var p in y)y.hasOwnProperty(p)&&delete y[p]},r.destroyCustomPlugins=function(){for(var p in t)t.hasOwnProperty(p)&&delete t[p]},a.exports=r},77332:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(8443),h=t(50792),o=t(74099),l=t(44603),n=t(39429),u=t(95540),f=t(37277),s=t(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(p.BOOT,this.boot,this)},boot:function(){var d,v,m,S,M,A,C,w=this.game.config,P=w.installGlobalPlugins;for(P=P.concat(this._pendingGlobal),d=0;d{/** +* @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=t(52018),p=t(83419),h=t(44594),o=new p({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}});a.exports=o},18922:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={BasePlugin:t(52018),DefaultPlugins:t(42363),PluginCache:t(37277),PluginManager:t(77332),ScenePlugin:t(45145)}},63595:()=>{HTMLVideoElement&&!("requestVideoFrameCallback"in HTMLVideoElement.prototype)&&"getVideoPlaybackQuality"in HTMLVideoElement.prototype&&(HTMLVideoElement.prototype._rvfcpolyfillmap={},HTMLVideoElement.prototype.requestVideoFrameCallback=function(a){const y=performance.now(),t=this.getVideoPlaybackQuality(),r=this.mozPresentedFrames||this.mozPaintedFrames||t.totalVideoFrames-t.droppedVideoFrames,p=(h,o)=>{const l=this.getVideoPlaybackQuality(),n=this.mozPresentedFrames||this.mozPaintedFrames||l.totalVideoFrames-l.droppedVideoFrames;if(n>r){const u=this.mozFrameDelay||l.totalFrameDelay-t.totalFrameDelay||0,f=o-h;a(o,{presentationTime:o+u*1e3,expectedDisplayTime:o+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=>p(o,u))};return this._rvfcpolyfillmap[y]=requestAnimationFrame(h=>p(y,h)),y},HTMLVideoElement.prototype.cancelVideoFrameCallback=function(a){cancelAnimationFrame(this._rvfcpolyfillmap[a]),delete this._rvfcpolyfillmap[a]})},10312:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={SKIP_CHECK:-1,NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16,ERASE:17,SOURCE_IN:18,SOURCE_OUT:19,SOURCE_ATOP:20,DESTINATION_OVER:21,DESTINATION_IN:22,DESTINATION_OUT:23,DESTINATION_ATOP:24,LIGHTER:25,COPY:26,XOR:27}},29795:a=>{/** + * @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};a.exports=y},68627:(a,y,t)=>{/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(19715),p=t(32880),h=t(83419),o=t(8054),l=t(50792),n=t(92503),u=t(56373),f=t(97480),s=t(69442),c=t(61340),d=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=o.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(s.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 A=S.x,C=S.y,w=S.width,P=S.height,L=S.renderToTexture?S.context:v.sys.context;L.save(),this.game.scene.customViewports&&(L.beginPath(),L.rect(A,C,w,P),L.clip()),S.emit(r.PRE_RENDER,S),this.currentContext=L;var O=S.mask;O&&O.preRenderCanvas(this,null,S._maskCamera),S.transparent||(L.fillStyle=S.backgroundColor.rgba,L.fillRect(A,C,w,P)),L.globalAlpha=S.alpha,L.globalCompositeOperation="source-over",this.drawCount+=M,S.renderToTexture&&S.emit(r.PRE_RENDER,S),S.matrix.copyToContext(L);for(var I=0;I=0?J=-(J+D):J<0&&(J=Math.abs(J)-D)),v.flipY&&(Q>=0?Q=-(Q+B):Q<0&&(Q=Math.abs(Q)-B))}var K=1,U=1;v.flipX&&(G||(J+=-m.realWidth+W*2),K=-1),v.flipY&&(G||(Q+=-m.realHeight+k*2),U=-1);var V=v.x,j=v.y;P.applyITRS(V,j,v.rotation,v.scaleX*K,v.scaleY*U),w.copyFrom(S.matrix),M?(w.multiplyWithOffset(M,-S.scrollX*v.scrollFactorX,-S.scrollY*v.scrollFactorY),P.e=V,P.f=j):(P.e-=S.scrollX*v.scrollFactorX,P.f-=S.scrollY*v.scrollFactorY),w.multiply(P),S.roundPixels&&(w.e=Math.round(w.e),w.f=Math.round(w.f)),C.save(),w.setToContext(C),C.globalCompositeOperation=this.blendModes[v.blendMode],C.globalAlpha=A,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(J),Math.round(Q),Math.round(D/z),Math.round(B/z)):C.drawImage(m.source.image,O,I,D,B,J,Q,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}});a.exports=d},55830:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={CanvasRenderer:t(68627),GetBlendModes:t(56373),SetTransform:t(20926)}},56373:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(10312),p=t(89289),h=function(){var o=[],l=p.supportNewBlendModes,n="source-over";return o[r.NORMAL]=n,o[r.ADD]="lighter",o[r.MULTIPLY]=l?"multiply":n,o[r.SCREEN]=l?"screen":n,o[r.OVERLAY]=l?"overlay":n,o[r.DARKEN]=l?"darken":n,o[r.LIGHTEN]=l?"lighten":n,o[r.COLOR_DODGE]=l?"color-dodge":n,o[r.COLOR_BURN]=l?"color-burn":n,o[r.HARD_LIGHT]=l?"hard-light":n,o[r.SOFT_LIGHT]=l?"soft-light":n,o[r.DIFFERENCE]=l?"difference":n,o[r.EXCLUSION]=l?"exclusion":n,o[r.HUE]=l?"hue":n,o[r.SATURATION]=l?"saturation":n,o[r.COLOR]=l?"color":n,o[r.LUMINOSITY]=l?"luminosity":n,o[r.ERASE]="destination-out",o[r.SOURCE_IN]="source-in",o[r.SOURCE_OUT]="source-out",o[r.SOURCE_ATOP]="source-atop",o[r.DESTINATION_OVER]="destination-over",o[r.DESTINATION_IN]="destination-in",o[r.DESTINATION_OUT]="destination-out",o[r.DESTINATION_ATOP]="destination-atop",o[r.LIGHTER]="lighter",o[r.COPY]="copy",o[r.XOR]="xor",o};a.exports=h},20926:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(91296),p=function(h,o,l,n,u){var f=n.alpha*l.alpha;if(f<=0)return!1;var s=r(l,n,u).calc;return o.globalCompositeOperation=h.blendModes[l.blendMode],o.globalAlpha=f,o.save(),s.setToContext(o),o.imageSmoothingEnabled=l.frame?!l.frame.source.scaleMode:h.antialias,!0};a.exports=p},63899:a=>{/** + * @author Benjamin D. Richards + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="losewebgl"},6119:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="postrender"},48070:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="prerender"},15640:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="render"},8912:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="resize"},87124:a=>{/** + * @author Benjamin D. Richards + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="restorewebgl"},92503:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={LOSE_WEBGL:t(63899),POST_RENDER:t(6119),PRE_RENDER:t(48070),RENDER:t(15640),RESIZE:t(8912),RESTORE_WEBGL:t(87124)}},36909:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={Events:t(92503),Snapshot:t(89966)},a.exports.Canvas=t(55830),a.exports.WebGL=t(4159)},32880:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(27919),p=t(40987),h=t(95540),o=function(l,n){var u=h(n,"callback"),f=h(n,"type","image/png"),s=h(n,"encoder",.92),c=Math.abs(Math.round(h(n,"x",0))),d=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}),A=M.getImageData(c,d,1,1),C=A.data;u.call(null,new p(C[0],C[1],C[2],C[3]))}else if(c!==0||d!==0||v!==l.width||m!==l.height){var w=r.createWebGL(this,v,m),P=w.getContext("2d",{willReadFrequently:!0});v>0&&m>0&&P.drawImage(l,c,d,v,m,0,0,v,m);var L=new Image;L.onerror=function(){u.call(null),r.remove(w)},L.onload=function(){u.call(null,L),r.remove(w)},L.src=w.toDataURL(f,s)}else{var O=new Image;O.onerror=function(){u.call(null)},O.onload=function(){u.call(null,O)},O.src=l.toDataURL(f,s)}};a.exports=o},88815:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(27919),p=t(40987),h=t(95540),o=function(l,n){var u=l,f=h(n,"callback"),s=h(n,"type","image/png"),c=h(n,"encoder",.92),d=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,A=S?h(n,"bufferHeight",1):u.drawingBufferHeight;if(m){var C=new Uint8Array(4),w=S?v:A-v;u.readPixels(d,w,1,1,u.RGBA,u.UNSIGNED_BYTE,C),f.call(null,new p(C[0],C[1],C[2],C[3]))}else{var P=Math.floor(h(n,"width",M)),L=Math.floor(h(n,"height",A)),O=P*L*4,I=new Uint8Array(O);u.readPixels(d,A-v-L,P,L,u.RGBA,u.UNSIGNED_BYTE,I);for(var D=r.createWebGL(this,P,L),B=D.getContext("2d",{willReadFrequently:!0}),G=B.getImageData(0,0,P,L),z=G.data,W=0;W{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={Canvas:t(32880),WebGL:t(88815)}},7530:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(36060),h=t(90330),o=t(82264),l=t(95540),n=t(32302),u=t(63448),f=t(31302),s=t(58918),c=t(14811),d=t(92651),v=t(96569),m=t(56527),S=t(57516),M=t(43439),A=t(81041),C=t(12385),w=t(7589),P=t(95428),L=t(72905),O=new r({initialize:function(D){this.game=D.game,this.renderer=D,this.classes=new h([[p.UTILITY_PIPELINE,w],[p.MULTI_PIPELINE,S],[p.BITMAPMASK_PIPELINE,f],[p.SINGLE_PIPELINE,C],[p.ROPE_PIPELINE,A],[p.LIGHT_PIPELINE,v],[p.POINTLIGHT_PIPELINE,M],[p.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 W=G.width,k=G.height,J=this.game.config.disablePreFX,Q=this.game.config.disablePostFX;if(Q||this.postPipelineClasses.setAll([[String(c.BARREL),s.Barrel],[String(c.BLOOM),s.Bloom],[String(c.BLUR),s.Blur],[String(c.BOKEH),s.Bokeh],[String(c.CIRCLE),s.Circle],[String(c.COLOR_MATRIX),s.ColorMatrix],[String(c.DISPLACEMENT),s.Displacement],[String(c.GLOW),s.Glow],[String(c.GRADIENT),s.Gradient],[String(c.PIXELATE),s.Pixelate],[String(c.SHADOW),s.Shadow],[String(c.SHINE),s.Shine],[String(c.VIGNETTE),s.Vignette],[String(c.WIPE),s.Wipe]]),!J){this.classes.set(p.FX_PIPELINE,d);for(var Y=Math.min(W,k),K=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}});a.exports=O},32302:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(92503),h=new r({initialize:function(l,n,u,f,s,c,d,v,m){f===void 0&&(f=1),s===void 0&&(s=0),c===void 0&&(c=!0),d===void 0&&(d=!1),v===void 0&&(v=!0),m===void 0&&(m=!0),this.renderer=l,this.framebuffer=null,this.texture=null,this.width=0,this.height=0,this.scale=f,this.minFilter=s,this.autoClear=c,this.autoResize=!0,this.hasDepthBuffer=v,this.forceClamp=m,this.resize(n,u),d?this.setAutoResize(!0):this.autoResize=!1},setAutoResize:function(o){return o&&!this.autoResize?(this.renderer.on(p.RESIZE,this.resize,this),this.autoResize=!0):!o&&this.autoResize&&(this.renderer.off(p.RESIZE,this.resize,this),this.autoResize=!1),this},resize:function(o,l){if(o=Math.round(o*this.scale),l=Math.round(l*this.scale),o<=0&&(o=1),l<=0&&(l=1),this.autoResize&&(o!==this.width||l!==this.height)){var n=this.renderer;n.deleteFramebuffer(this.framebuffer),n.deleteTexture(this.texture),this.texture=n.createTextureFromSource(null,o,l,this.minFilter,this.forceClamp),this.framebuffer=n.createFramebuffer(o,l,this.texture,this.hasDepthBuffer),this.width=o,this.height=l}return this},willResize:function(o,l){return o=Math.round(o*this.scale),l=Math.round(l*this.scale),o<=0&&(o=1),l<=0&&(l=1),o!==this.width||l!==this.height},bind:function(o,l,n){o===void 0&&(o=!1);var u=this.renderer;if(o&&u.flush(),l&&n&&this.resize(l,n),u.pushFramebuffer(this.framebuffer,!1,!1),o&&this.adjustViewport(),this.autoClear){var f=this.renderer.gl;f.clearColor(0,0,0,0),f.clear(f.COLOR_BUFFER_BIT)}u.clearStencilMask()},adjustViewport:function(){var o=this.renderer.gl;o.viewport(0,0,this.width,this.height),o.disable(o.SCISSOR_TEST)},clear:function(){var o=this.renderer,l=o.gl;o.pushFramebuffer(this.framebuffer),l.disable(l.SCISSOR_TEST),l.clearColor(0,0,0,0),l.clear(l.COLOR_BUFFER_BIT),o.popFramebuffer(),o.resetScissor()},unbind:function(o){o===void 0&&(o=!1);var l=this.renderer;return o&&l.flush(),l.popFramebuffer()},destroy:function(){var o=this.renderer;o.off(p.RESIZE,this.resize,this),o.deleteFramebuffer(this.framebuffer),o.deleteTexture(this.texture),this.renderer=null,this.framebuffer=null,this.texture=null}});a.exports=h},70554:a=>{/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @author Matthew Groves <@doormat> + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={getTintFromFloats:function(y,t,r,p){var h=(y*255|0)&255,o=(t*255|0)&255,l=(r*255|0)&255,n=(p*255|0)&255;return(n<<24|h<<16|o<<8|l)>>>0},getTintAppendFloatAlpha:function(y,t){var r=(t*255|0)&255;return(r<<24|y)>>>0},getTintAppendFloatAlphaAndSwap:function(y,t){var r=(y>>16|0)&255,p=(y>>8|0)&255,h=(y|0)&255,o=(t*255|0)&255;return(o<<24|h<<16|p<<8|r)>>>0},getFloatsFromUintRGB:function(y){var t=(y>>16|0)&255,r=(y>>8|0)&255,p=(y|0)&255;return[t/255,r/255,p/255]},checkShaderMax:function(y,t){var r=Math.min(16,y.getParameter(y.MAX_TEXTURE_IMAGE_UNITS));return!t||t===-1?r:Math.min(r,t)},parseFragmentShaderMaxTextures:function(y,t){if(!y)return"";for(var r="",p=0;p0&&(r+=` + else `),p{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(62644),h=t(50792),o=t(77085),l=t(95540),n=t(37867),u=t(92503),f=t(32302),s=t(70554),c=t(38683),d=new r({Extends:h,initialize:function(m){h.call(this);var S=m.game,M=S.renderer,A=M.gl;this.name=l(m,"name","WebGLPipeline"),this.game=S,this.renderer=M,this.manager,this.gl=A,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",A.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 A=this.renderTargets,C=l(S,"renderTarget",!1);typeof C=="boolean"&&C&&(C=1);var w=M.width,P=M.height;if(typeof C=="number")for(v=0;vW&&(W=z[v].vertexSize);var k=l(S,"batchSize",M.config.batchSize);this.vertexCapacity=k*6;var J=new ArrayBuffer(this.vertexCapacity*W);this.vertexData=J,this.bytes=new Uint8Array(J),this.vertexViewF32=new Float32Array(J),this.vertexViewU32=new Uint32Array(J);var Q=l(S,"vertices",null);for(Q?(this.vertexViewF32.set(Q),this.vertexBuffer=M.createVertexBuffer(J,m.STATIC_DRAW)):this.vertexBuffer=M.createVertexBuffer(J.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(o.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 A=this.setVertexBuffer(S);A&&!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))}W&&k&&B.push(new c(this,z,W,k,p(J)))}this.shaders=B}return this.shaders.length===0?console.warn("Pipeline: "+this.name+" - Invalid shader config"):this.currentShader=this.shaders[0],this},createBatch:function(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(o.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(o.BEFORE_FLUSH,this,v),this.onBeforeFlush(v);var m=this.gl,S=this.vertexCount,M=this.currentShader.vertexSize,A=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,w,P,L=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=t(95428),p=t(72905),h=t(19715),o=t(83419),l=t(8054),n=t(50792),u=t(92503),f=t(50030),s=t(37867),c=t(29747),d=t(7530),v=t(32302),m=t(97480),S=t(69442),M=t(70554),A=t(88815),C=t(26128),w=t(1482),P=t(82751),L=t(84387),O=t(93567),I=t(57183),D=new o({Extends:n,initialize:function(G){n.call(this);var z=G.config,W={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:W,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,W=this.canvas,k=B.backgroundColor;if(z.config.context?G=z.config.context:G=W.getContext("webgl",B.contextCreation)||W.getContext("experimental-webgl",B.contextCreation),!G||G.isContextLost())throw this.contextLost=!0,new Error("WebGL unsupported");this.gl=G;var J=this,Q=function(){var U=G.getSupportedExtensions();J.supportedExtensions=U;var V="ANGLE_instanced_arrays";J.instancedArraysExtension=U.indexOf(V)>-1?G.getExtension(V):null;var j="OES_vertex_array_object";J.vaoExtension=U.indexOf(j)>-1?G.getExtension(j):null};Q(),this.contextLostHandler=function(U){J.contextLost=!0,console&&console.warn("WebGL Context lost. Renderer disabled"),J.emit(u.LOSE_WEBGL,J),U.preventDefault()},W.addEventListener("webglcontextlost",this.contextLostHandler,!1),this.contextRestoredHandler=function(U){if(G.isContextLost()){console&&console.log("WebGL Context restored, but context is still lost");return}J.currentProgram=null,J.currentFramebuffer=null,J.setBlendMode(l.BlendModes.NORMAL),G.disable(G.BLEND),G.disable(G.DEPTH_TEST),G.enable(G.CULL_FACE),J.compression=J.getCompressedTextures();var V=function(j){j.createResource()};r(J.glTextureWrappers,V),r(J.glBufferWrappers,V),r(J.glFramebufferWrappers,V),r(J.glProgramWrappers,V),r(J.glAttribLocationWrappers,V),r(J.glUniformLocationWrappers,V),J.createTemporaryTextures(),J.pipelines.restoreContext(),J.resize(J.game.scale.baseSize.width,J.game.scale.baseSize.height),Q(),J.contextLost=!1,console&&console.warn("WebGL Context restored. Renderer running again."),J.emit(u.RESTORE_WEBGL,J),U.preventDefault()},W.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(k.redGL,k.greenGL,k.blueGL,k.alphaGL);var K=["NEAREST","LINEAR","NEAREST_MIPMAP_NEAREST","LINEAR_MIPMAP_NEAREST","NEAREST_MIPMAP_LINEAR","LINEAR_MIPMAP_LINEAR"];return K.indexOf(B.mipmapFilter)!==-1&&(this.mipmapFilter=G[B.mipmapFilter]),this.maxTextures=M.checkShaderMax(G,B.maxTextures),this.textureIndexes=[],this.createTemporaryTextures(),this.pipelines=new d(this),this.setBlendMode(l.BlendModes.NORMAL),this.projectionMatrix=new s().identity(),z.textures.once(S.READY,this.boot,this),this},boot:function(){var B=this.game,G=this.pipelines,z=B.scale.baseSize,W=z.width,k=z.height;this.width=W,this.height=k,this.isBooted=!0,this.renderTarget=new v(this,W,k,1,0,!0,!0),this.maskTarget=new v(this,W,k,1,0,!0,!0),this.maskSource=new v(this,W,k,1,0,!0,!0);var J=B.config;G.boot(J.pipeline,J.defaultPipeline,J.autoMobilePipeline),this.blankTexture=B.textures.getFrame("__DEFAULT").glTexture,this.normalTexture=B.textures.getFrame("__NORMAL").glTexture,this.whiteTexture=B.textures.getFrame("__WHITE").glTexture;var Q=this.gl;Q.bindFramebuffer(Q.FRAMEBUFFER,null),Q.enable(Q.SCISSOR_TEST),B.scale.on(m.RESIZE,this.onResize,this),this.resize(W,k)},createTemporaryTextures:function(){for(var B=this.gl,G=0;G0&&W>0;if(Q&&Y){var K=Q[0],U=Q[1],V=Q[2],j=Q[3];Y=K!==B||U!==G||V!==z||j!==W}Y&&(this.flush(),J.scissor(B,k-G-W,z,W))},resetScissor:function(){var B=this.gl;B.enable(B.SCISSOR_TEST);var G=this.currentScissor;if(G){var z=G[0],W=G[1],k=G[2],J=G[3];k>0&&J>0&&B.scissor(z,this.drawingBufferHeight-W-J,k,J)}},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,W=this.blendModes[B];return G||B!==l.BlendModes.SKIP_CHECK&&this.currentBlendMode!==B?(this.flush(),z.enable(z.BLEND),z.blendEquation(W.equation),W.func.length>2?z.blendFuncSeparate(W.func[0],W.func[1],W.func[2],W.func[3]):z.blendFunc(W.func[0],W.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,W,k){return B===this.currentFramebuffer?this:(this.fboStack.push(B),this.setFramebuffer(B,G,z,W,k))},setFramebuffer:function(B,G,z,W,k){if(G===void 0&&(G=!1),z===void 0&&(z=!0),W===void 0&&(W=null),k===void 0&&(k=!1),B===this.currentFramebuffer)return this;var J=this.gl,Q=this.width,Y=this.height;return B&&B.renderTexture&&z?(Q=B.renderTexture.width,Y=B.renderTexture.height):this.flush(),B?J.bindFramebuffer(J.FRAMEBUFFER,B.webGLFramebuffer):J.bindFramebuffer(J.FRAMEBUFFER,null),z&&J.viewport(0,0,Q,Y),W&&J.framebufferTexture2D(J.FRAMEBUFFER,J.COLOR_ATTACHMENT0,J.TEXTURE_2D,W.webGLTexture,0),k&&(J.clearColor(0,0,0,0),J.clear(J.COLOR_BUFFER_BIT)),G&&(B?(this.drawingBufferHeight=Y,this.pushScissor(0,0,Q,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 W=z[z.length-1];return W||(W=null),this.setFramebuffer(W,B,G),W},restoreFramebuffer:function(B,G){B===void 0&&(B=!1),G===void 0&&(G=!0);var z=this.fboStack,W=z[z.length-1];W||(W=null),this.currentFramebuffer=null,this.setFramebuffer(W,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,W,k){k===void 0&&(k=!1);var J=this.gl,Q=J.NEAREST,Y=J.NEAREST,K=J.CLAMP_TO_EDGE,U=null;G=B?B.width:G,z=B?B.height:z;var V=f(G,z);if(V&&!k&&(K=J.REPEAT),W===l.ScaleModes.LINEAR&&this.config.antialias){var j=B&&B.compressed,$=!j&&V||j&&B.mipmaps.length>1;Q=this.mipmapFilter&&$?this.mipmapFilter:J.LINEAR,Y=J.LINEAR}return!B&&typeof G=="number"&&typeof z=="number"?U=this.createTexture2D(0,Q,Y,K,K,J.RGBA,null,G,z):U=this.createTexture2D(0,Q,Y,K,K,J.RGBA,B),U},createTexture2D:function(B,G,z,W,k,J,Q,Y,K,U,V,j){typeof Y!="number"&&(Y=Q?Q.width:1),typeof K!="number"&&(K=Q?Q.height:1);var $=new P(this.gl,B,G,z,W,k,J,Q,Y,K,U,V,j);return this.glTextureWrappers.push($),$},createFramebuffer:function(B,G,z,W){this.currentFramebuffer=null;var k=new L(this.gl,B,G,z,W);return this.glFramebufferWrappers.push(k),k},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 W=this.gl,k=this.getCurrentStencilMask();k?(W.enable(W.STENCIL_TEST),k.mask.applyStencil(this,k.camera,!0)):this.currentMask.mask=null,this.pipelines.set(z),W.activeTexture(W.TEXTURE0),W.bindTexture(W.TEXTURE_2D,this.maskTarget.texture.webGLTexture),W.activeTexture(W.TEXTURE1),W.bindTexture(W.TEXTURE_2D,this.maskSource.texture.webGLTexture)},createProgram:function(B,G){var z=new w(this.gl,B,G);return this.glProgramWrappers.push(z),z},createVertexBuffer:function(B,G){var z=this.gl,W=new C(z,B,z.ARRAY_BUFFER,G);return this.glBufferWrappers.push(W),W},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,W=new C(z,B,z.ELEMENT_ARRAY_BUFFER,G);return this.glBufferWrappers.push(W),W},deleteTexture:function(B){if(B)return p(this.glTextureWrappers,B),B.destroy(),this},deleteFramebuffer:function(B){return B?(p(this.fboStack,B),p(this.glFramebufferWrappers,B),B.destroy(),this):this},deleteProgram:function(B){return B&&(p(this.glProgramWrappers,B),B.destroy()),this},deleteAttribLocation:function(B){return B&&(p(this.glAttribLocationWrappers,B),B.destroy()),this},deleteUniformLocation:function(B){return B&&(p(this.glUniformLocationWrappers,B),B.destroy()),this},deleteBuffer:function(B){return B?(p(this.glBufferWrappers,B),B.destroy(),this):this},preRenderCamera:function(B){var G=B.x,z=B.y,W=B.width,k=B.height,J=B.backgroundColor;if(B.emit(h.PRE_RENDER,B),this.pipelines.preBatchCamera(B),this.pushScissor(G,z,W,k),B.mask&&(this.currentCameraMask.mask=B.mask,this.currentCameraMask.camera=B._maskCamera,B.mask.preRenderWebGL(this,B,B._maskCamera)),J.alphaGL>0){var Q=this.pipelines.setMulti();Q.drawFillRect(G,z,W,k,M.getTintFromFloats(J.blueGL,J.greenGL,J.redGL,1),J.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 W=this.pipelines.setMulti();G.postRenderWebGL(W,M.getTintFromFloats),z.postRenderWebGL(W,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 W=G.length;if(this.emit(u.RENDER,B,z),this.preRenderCamera(z),W===0){this.setBlendMode(l.BlendModes.NORMAL),this.postRenderCamera(z);return}this.currentType="";for(var k=this.currentMask,J=0;J{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(95428),h=t(95540),o=t(14500),l=new r({initialize:function(u,f,s,c,d){this.pipeline=u,this.name=f,this.renderer=u.renderer,this.gl=this.renderer.gl,this.fragSrc=c,this.vertSrc=s,this.program=this.renderer.createProgram(s,c),this.attributes,this.vertexComponentCount=0,this.vertexSize=0,this.uniforms={},this.createAttributes(d),this.createUniforms()},createAttributes:function(n){var u=0,f=0,s=[];this.vertexComponentCount=0;for(var c=0;c=0?(u.enableVertexAttribArray(L.webGLAttribLocation),u.vertexAttribPointer(L.webGLAttribLocation,S,M,P,s,A),m.enabled=!0,m.location=L):L.webGLAttribLocation!==-1&&u.disableVertexAttribArray(L.webGLAttribLocation)}else C?u.vertexAttribPointer(w.webGLAttribLocation,S,M,P,s,A):!C&&w!==-1&&w.webGLAttribLocation>-1&&(u.disableVertexAttribArray(w.webGLAttribLocation),m.location=-1)}return this},createUniforms:function(){var n=this.gl,u=this.program,f=this.uniforms,s,c,d,v=n.getProgramParameter(u.webGLProgram,n.ACTIVE_UNIFORMS);for(s=0;s0&&(c=c.substr(0,S),f.hasOwnProperty(c)||(d=this.renderer.createUniformLocation(u,c),d!==null&&(f[c]={name:c,location:d,setter:null,value1:null,value2:null,value3:null,value4:null})))}}return this},syncUniforms:function(){var n=this.gl;this.renderer.setProgram(this.program);for(var u in this.uniforms){var f=this.uniforms[u];f.setter&&f.setter.call(n,f.location.webGLUniformLocation,f.value1,f.value2,f.value3,f.value4)}},hasUniform:function(n){return this.uniforms.hasOwnProperty(n)},resetUniform:function(n){var u=this.uniforms[n];return u&&(u.value1=null,u.value2=null,u.value3=null,u.value4=null),this},setUniform1:function(n,u,f,s){var c=this.uniforms[u];return c?((s||c.value1!==f)&&(c.setter||(c.setter=n),c.value1=f,this.renderer.setProgram(this.program),n.call(this.gl,c.location.webGLUniformLocation,f),this.pipeline.currentShader=this),this):this},setUniform2:function(n,u,f,s,c){var d=this.uniforms[u];return d?((c||d.value1!==f||d.value2!==s)&&(d.setter||(d.setter=n),d.value1=f,d.value2=s,this.renderer.setProgram(this.program),n.call(this.gl,d.location.webGLUniformLocation,f,s),this.pipeline.currentShader=this),this):this},setUniform3:function(n,u,f,s,c,d){var v=this.uniforms[u];return v?((d||v.value1!==f||v.value2!==s||v.value3!==c)&&(v.setter||(v.setter=n),v.value1=f,v.value2=s,v.value3=c,this.renderer.setProgram(this.program),n.call(this.gl,v.location.webGLUniformLocation,f,s,c),this.pipeline.currentShader=this),this):this},setUniform4:function(n,u,f,s,c,d,v){var m=this.uniforms[u];return m?((v||m.value1!==f||m.value2!==s||m.value3!==c||m.value4!==d)&&(m.setter||(m.setter=n),m.value1=f,m.value2=s,m.value3=c,m.value4=d,this.renderer.setProgram(this.program),n.call(this.gl,m.location.webGLUniformLocation,f,s,c,d),this.pipeline.currentShader=this),this):this},setBoolean:function(n,u){return this.setUniform1(this.gl.uniform1i,n,Number(u))},set1f:function(n,u){return this.setUniform1(this.gl.uniform1f,n,u)},set2f:function(n,u,f){return this.setUniform2(this.gl.uniform2f,n,u,f)},set3f:function(n,u,f,s){return this.setUniform3(this.gl.uniform3f,n,u,f,s)},set4f:function(n,u,f,s,c){return this.setUniform4(this.gl.uniform4f,n,u,f,s,c)},set1fv:function(n,u){return this.setUniform1(this.gl.uniform1fv,n,u,!0)},set2fv:function(n,u){return this.setUniform1(this.gl.uniform2fv,n,u,!0)},set3fv:function(n,u){return this.setUniform1(this.gl.uniform3fv,n,u,!0)},set4fv:function(n,u){return this.setUniform1(this.gl.uniform4fv,n,u,!0)},set1iv:function(n,u){return this.setUniform1(this.gl.uniform1iv,n,u,!0)},set2iv:function(n,u){return this.setUniform1(this.gl.uniform2iv,n,u,!0)},set3iv:function(n,u){return this.setUniform1(this.gl.uniform3iv,n,u,!0)},set4iv:function(n,u){return this.setUniform1(this.gl.uniform4iv,n,u,!0)},set1i:function(n,u){return this.setUniform1(this.gl.uniform1i,n,u)},set2i:function(n,u,f){return this.setUniform2(this.gl.uniform2i,n,u,f)},set3i:function(n,u,f,s){return this.setUniform3(this.gl.uniform3i,n,u,f,s)},set4i:function(n,u,f,s,c){return this.setUniform4(this.gl.uniform4i,n,u,f,s,c)},setMatrix2fv:function(n,u,f){return this.setUniform2(this.gl.uniformMatrix2fv,n,u,f,!0)},setMatrix3fv:function(n,u,f){return this.setUniform2(this.gl.uniformMatrix3fv,n,u,f,!0)},setMatrix4fv:function(n,u,f){return this.setUniform2(this.gl.uniformMatrix4fv,n,u,f,!0)},createProgram:function(n,u){return n===void 0&&(n=this.vertSrc),u===void 0&&(u=this.fragSrc),this.program&&this.renderer.deleteProgram(this.program),this.vertSrc=n,this.fragSrc=u,this.program=this.renderer.createProgram(n,u),this.createUniforms(),this.rebind()},destroy:function(){var n=this.renderer;p(this.uniforms,function(u){n.deleteUniformLocation(u.location)}),this.uniforms=null,p(this.attributes,function(u){n.deleteAttribLocation(u.location)}),this.attributes=null,n.deleteProgram(this.program),this.pipeline=null,this.renderer=null,this.gl=null,this.program=null}});a.exports=l},14500:a=>{/** + * @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}};a.exports=y},4159:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(14500),p=t(79291),h={PipelineManager:t(7530),Pipelines:t(96615),RenderTarget:t(32302),Utils:t(70554),WebGLPipeline:t(29100),WebGLRenderer:t(74797),WebGLShader:t(38683),Wrappers:t(9503)};h=p(!1,h,r),a.exports=h},31302:(a,y,t)=>{/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(95540),h=t(78908),o=t(85191),l=t(14500),n=t(29100),u=new r({Extends:n,initialize:function(s){s.fragShader=p(s,"fragShader",h),s.vertShader=p(s,"vertShader",o),s.batchSize=p(s,"batchSize",1),s.vertices=p(s,"vertices",[-1,1,-1,-7,7,1]),s.attributes=p(s,"attributes",[{name:"inPosition",size:2,type:l.FLOAT}]),n.call(this,s)},boot:function(){n.prototype.boot.call(this),this.set1i("uMainSampler",0),this.set1i("uMaskSampler",1)},resize:function(f,s){n.prototype.resize.call(this,f,s),this.set2f("uResolution",f,s)},beginMask:function(f,s,c){this.renderer.beginBitmapMask(f,c)},endMask:function(f,s,c){var d=this.gl,v=this.renderer,m=f.bitmapMask;m&&d&&(v.drawBitmapMask(m,s,this),c&&this.set2f("uResolution",c.width,c.height),this.set1i("uInvertMaskAlpha",f.invertAlpha),d.drawArrays(this.topology,0,3),c&&this.set2f("uResolution",this.width,this.height),d.bindTexture(d.TEXTURE_2D,null))}});a.exports=u},92651:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(58918),h=t(14811),o=t(95540),l=t(43558),n=t(89350),u=t(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 d=this.game;this.glow=new p.Glow(d),this.shadow=new p.Shadow(d),this.pixelate=new p.Pixelate(d),this.vignette=new p.Vignette(d),this.shine=new p.Shine(d),this.gradient=new p.Gradient(d),this.circle=new p.Circle(d),this.barrel=new p.Barrel(d),this.wipe=new p.Wipe(d),this.bokeh=new p.Bokeh(d);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(s,c,d){this.source=s,this.target=c,this.swap=d;var v=s.width,m=s.height,S=this.tempSprite,M=this.fxHandlers;if(S&&S.preFX)for(var A=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=t(83419),p=t(95540),h=t(31063),o=t(57516),l=t(61340),n=t(26099),u=t(29100),f=new r({Extends:o,initialize:function(c){var d=p(c,"fragShader",h);c.fragShader=d.replace("%LIGHT_COUNT%",c.game.renderer.config.maxLights),o.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(s,c){var d=s.sys.lights;if(this.lightsActive=!1,!(!d||!d.active)){var v=d.getLights(c),m=v.length;this.lightsActive=!0;var S,M=this.renderer,A=M.height,C=c.matrix,w=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",d.ambientColor.r,d.ambientColor.g,d.ambientColor.b),this.set1i("uLightCount",m),S=0;S0&&this.flush();var c=this.inverseRotationMatrix;if(s){var d=-s,v=Math.cos(d),m=Math.sin(d);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=s}},setTexture2D:function(s,c){var d=this.renderer;s===void 0&&(s=d.whiteTexture);var v=this.getNormalMap(c);this.isNewNormalMap(s,v)&&(this.flush(),this.createBatch(s),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(s,c){c===void 0&&(c=s.frame);var d=c.glTexture,v=this.getNormalMap(s);if(this.isNewNormalMap(d,v)&&(this.flush(),this.createBatch(d),this.addTextureToBatch(v),this.currentNormalMap=v),s.parentContainer){var m=s.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2);this.setNormalMapRotation(m.rotationNormalized)}else this.setNormalMapRotation(s.rotation);return 0},isNewNormalMap:function(s,c){return this.currentTexture!==s||this.currentNormalMap!==c},getNormalMap:function(s){var c;if(s)s.displayTexture?c=s.displayTexture.dataSource[s.displayFrame.sourceIndex]:s.texture?c=s.texture.dataSource[s.frame.sourceIndex]:s.tileset&&(Array.isArray(s.tileset)?c=s.tileset[0].image.dataSource[0]:c=s.tileset.image.dataSource[0]);else return this.renderer.normalTexture;return c?c.glTexture:this.renderer.normalTexture},batchSprite:function(s,c,d){this.lightsActive&&o.prototype.batchSprite.call(this,s,c,d)},batchTexture:function(s,c,d,v,m,S,M,A,C,w,P,L,O,I,D,B,G,z,W,k,J,Q,Y,K,U,V,j,$,q,it,nt,et){this.lightsActive&&o.prototype.batchTexture.call(this,s,c,d,v,m,S,M,A,C,w,P,L,O,I,D,B,G,z,W,k,J,Q,Y,K,U,V,j,$,q,it,nt,et)},batchTextureFrame:function(s,c,d,v,m,S,M){this.lightsActive&&o.prototype.batchTextureFrame.call(this,s,c,d,v,m,S,M)}});a.exports=f},56527:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(95540),h=t(57516),o=t(45561),l=t(60722),n=t(14500),u=t(29100),f=new r({Extends:h,initialize:function(c){c.fragShader=p(c,"fragShader",o),c.vertShader=p(c,"vertShader",l),c.attributes=p(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 s=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",s.width,s.height),this.set1i("uRoundPixels",s.config.roundPixels)}});a.exports=f},57516:(a,y,t)=>{/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(94811),h=t(95540),o=t(98840),l=t(44667),n=t(61340),u=t(70554),f=t(14500),s=t(29100),c=new r({Extends:s,initialize:function(v){var m=v.game.renderer,S=h(v,"fragShader",o);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",s.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(){s.prototype.boot.call(this);var d=this.renderer;this.set1iv("uMainSampler",d.textureIndexes),this.set2f("uResolution",d.width,d.height),this.set1i("uRoundPixels",d.config.roundPixels)},batchSprite:function(d,v,m){this.manager.set(this,d);var S=this._tempMatrix1,M=this._tempMatrix2,A=this._tempMatrix3,C=d.frame,w=C.glTexture,P=C.u0,L=C.v0,O=C.u1,I=C.v1,D=C.x,B=C.y,G=C.cutWidth,z=C.cutHeight,W=C.customPivot,k=d.displayOriginX,J=d.displayOriginY,Q=-k+D,Y=-J+B;if(d.isCropped){var K=d._crop;(K.flipX!==d.flipX||K.flipY!==d.flipY)&&C.updateCropUVs(K,d.flipX,d.flipY),P=K.u0,L=K.v0,O=K.u1,I=K.v1,G=K.width,z=K.height,D=K.x,B=K.y,Q=-k+D,Y=-J+B}var U=1,V=1;d.flipX&&(W||(Q+=-C.realWidth+k*2),U=-1),d.flipY&&(W||(Y+=-C.realHeight+J*2),V=-1);var j=d.x,$=d.y;M.applyITRS(j,$,d.rotation,d.scaleX*U,d.scaleY*V),S.copyFrom(v.matrix),m?(S.multiplyWithOffset(m,-v.scrollX*d.scrollFactorX,-v.scrollY*d.scrollFactorY),M.e=j,M.f=$):(M.e-=v.scrollX*d.scrollFactorX,M.f-=v.scrollY*d.scrollFactorY),S.multiply(M,A);var q=A.setQuad(Q,Y,Q+G,Y+z),it=u.getTintAppendFloatAlpha,nt=v.alpha,et=it(d.tintTopLeft,nt*d._alphaTL),ht=it(d.tintTopRight,nt*d._alphaTR),ut=it(d.tintBottomLeft,nt*d._alphaBL),dt=it(d.tintBottomRight,nt*d._alphaBR);this.shouldFlush(6)&&this.flush();var mt=this.setGameObject(d,C);this.manager.preBatch(d),this.currentShader.set1i("uRoundPixels",v.roundPixels),this.batchQuad(d,q[0],q[1],q[2],q[3],q[4],q[5],q[6],q[7],P,L,O,I,et,ht,ut,dt,d.tintFill,w,mt),this.manager.postBatch(d)},batchTexture:function(d,v,m,S,M,A,C,w,P,L,O,I,D,B,G,z,W,k,J,Q,Y,K,U,V,j,$,q,it,nt,et,ht,ut,dt){dt===void 0&&(dt=!1),this.manager.set(this,d);var mt=this._tempMatrix1,gt=this._tempMatrix2,At=this._tempMatrix3,ot=k/m+q,st=J/S+it,yt=(k+Q)/m+q,Tt=(J+Y)/S+it,wt=C,Et=w,Gt=-z,Wt=-W;if(d.isCropped){var Jt=d._crop,$t=Jt.width,te=Jt.height;wt=$t,Et=te,C=$t,w=te,k=Jt.x,J=Jt.y;var Nt=k,Te=J;I&&(Nt=Q-Jt.x-$t),D&&(Te=Y-Jt.y-te),ot=Nt/m+q,st=Te/S+it,yt=(Nt+$t)/m+q,Tt=(Te+te)/S+it,Gt=-z+k,Wt=-W+J}D=D^(!ht&&v.isRenderTexture?1:0),I&&(wt*=-1,Gt+=C),D&&(Et*=-1,Wt+=w),gt.applyITRS(M,A,O,P,L),mt.copyFrom(nt.matrix),et?(mt.multiplyWithOffset(et,-nt.scrollX*B,-nt.scrollY*G),gt.e=M,gt.f=A):(gt.e-=nt.scrollX*B,gt.f-=nt.scrollY*G),mt.multiply(gt,At);var le=At.setQuad(Gt,Wt,Gt+wt,Wt+Et);ut==null&&(ut=this.setTexture2D(v)),d&&!dt&&this.manager.preBatch(d),this.currentShader.set1i("uRoundPixels",nt.roundPixels),this.batchQuad(d,le[0],le[1],le[2],le[3],le[4],le[5],le[6],le[7],ot,st,yt,Tt,K,U,V,j,$,v,ut),d&&!dt&&this.manager.postBatch(d)},batchTextureFrame:function(d,v,m,S,M,A,C){this.manager.set(this);var w=this._tempMatrix1.copyFrom(A),P=this._tempMatrix2;C?w.multiply(C,P):P=w;var L=P.setQuad(v,m,v+d.width,m+d.height),O=this.setTexture2D(d.source.glTexture);S=u.getTintAppendFloatAlpha(S,M),this.batchQuad(null,L[0],L[1],L[2],L[3],L[4],L[5],L[6],L[7],d.u0,d.v0,d.u1,d.v1,S,S,S,S,0,d.glTexture,O)},batchFillRect:function(d,v,m,S,M,A){this.renderer.pipelines.set(this);var C=this.calcMatrix;A&&A.multiply(M,C);var w=C.setQuad(d,v,d+m,v+S),P=this.fillTint;this.batchQuad(null,w[0],w[1],w[2],w[3],w[4],w[5],w[6],w[7],0,0,1,1,P.TL,P.TR,P.BL,P.BR,2)},batchFillTriangle:function(d,v,m,S,M,A,C,w){this.renderer.pipelines.set(this);var P=this.calcMatrix;w&&w.multiply(C,P);var L=P.getX(d,v),O=P.getY(d,v),I=P.getX(m,S),D=P.getY(m,S),B=P.getX(M,A),G=P.getY(M,A),z=this.fillTint;this.currentShader.set1i("uRoundPixels",!1),this.batchTri(null,L,O,I,D,B,G,0,0,1,1,z.TL,z.TR,z.BL,2)},batchStrokeTriangle:function(d,v,m,S,M,A,C,w,P){var L=this.tempTriangle;L[0].x=d,L[0].y=v,L[0].width=C,L[1].x=m,L[1].y=S,L[1].width=C,L[2].x=M,L[2].y=A,L[2].width=C,L[3].x=d,L[3].y=v,L[3].width=C,this.batchStrokePath(L,C,!1,w,P)},batchFillPath:function(d,v,m){this.renderer.pipelines.set(this);var S=this.calcMatrix;m&&m.multiply(v,S);for(var M=d.length,A=this.polygonCache,C,w,P=this.fillTint.TL,L=this.fillTint.TR,O=this.fillTint.BL,I=0;I0&&wt[4]?this.batchQuad(null,mt,gt,et,ht,wt[0],wt[1],wt[2],wt[3],0,0,1,1,ot,st,yt,Tt,2):(Et[0]=mt,Et[1]=gt,Et[2]=et,Et[3]=ht,Et[4]=1),P&&Et[4]?this.batchQuad(null,it,nt,ut,dt,Et[0],Et[1],Et[2],Et[3],0,0,1,1,ot,st,yt,Tt,2):(wt[0]=it,wt[1]=nt,wt[2]=ut,wt[3]=dt,wt[4]=1)}}},destroy:function(){return this._tempMatrix1.destroy(),this._tempMatrix2.destroy(),this._tempMatrix3.destroy(),this._tempMatrix1=null,this._tempMatrix1=null,this._tempMatrix1=null,s.prototype.destroy.call(this),this}});a.exports=c},43439:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(95540),h=t(4127),o=t(89924),l=t(29100),n=new r({Extends:l,initialize:function(f){f.vertShader=p(f,"vertShader",o),f.fragShader=p(f,"fragShader",h),f.attributes=p(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,s,c,d,v,m,S,M,A,C,w){var P=u.color,L=u.intensity,O=u.radius,I=u.attenuation,D=P.r*L,B=P.g*L,G=P.b*L,z=f.alpha*u.alpha;this.shouldFlush(6)&&this.flush(),this.currentBatch||this.setTexture2D(),this.batchLightVert(s,c,C,w,O,I,D,B,G,z),this.batchLightVert(d,v,C,w,O,I,D,B,G,z),this.batchLightVert(m,S,C,w,O,I,D,B,G,z),this.batchLightVert(s,c,C,w,O,I,D,B,G,z),this.batchLightVert(m,S,C,w,O,I,D,B,G,z),this.batchLightVert(M,A,C,w,O,I,D,B,G,z),this.currentBatch.count=this.vertexCount-this.currentBatch.start},batchLightVert:function(u,f,s,c,d,v,m,S,M,A){var C=this.vertexViewF32,w=this.vertexCount*this.currentShader.vertexComponentCount-1;C[++w]=u,C[++w]=f,C[++w]=s,C[++w]=c,C[++w]=d,C[++w]=v,C[++w]=m,C[++w]=S,C[++w]=M,C[++w]=A,this.vertexCount++}});a.exports=n},84057:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(89422),h=t(95540),o=t(27681),l=t(49627),n=t(29100),u=new r({Extends:n,initialize:function(s){s.renderTarget=h(s,"renderTarget",1),s.fragShader=h(s,"fragShader",o),s.vertShader=h(s,"vertShader",l),s.attributes=h(s,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),s.batchSize=1,s.vertices=[-1,-1,0,0,-1,1,0,1,1,1,1,1,-1,-1,0,0,1,1,1,1,1,-1,1,0],n.call(this,s),this.isPostFX=!0,this.gameObject,this.controller,this.colorMatrix=new p,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 s=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",s.width,s.height),this.set1i("uRoundPixels",s.config.roundPixels);for(var c=this.renderTargets,d=0;d{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(10312),p=t(67502),h=t(83419),o=t(96293),l=t(95540),n=t(57516),u=t(27681),f=t(87841),s=t(32302),c=t(45561),d=t(60722),v=t(29100),m=new h({Extends:n,initialize:function(M){var A=l(M,"fragShader",u),C=l(M,"vertShader",d),w=l(M,"drawShader",u),P=[{name:"DrawSprite",fragShader:c,vertShader:d},{name:"CopySprite",fragShader:A,vertShader:C},{name:"DrawGame",fragShader:w,vertShader:d},{name:"ColorMatrix",fragShader:o}],L=l(M,"shaders",[]);M.shaders=P.concat(L),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 s(M,M.width,M.height,1,0,!0,!0),this.renderTargets=this.manager.renderTargets.concat(this.fsTarget);var A=new ArrayBuffer(168);this.quadVertexData=A,this.quadVertexViewF32=new Float32Array(A),this.quadVertexBuffer=M.createVertexBuffer(A,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 A=this.quadVertexViewF32;A[1]=M,A[22]=M,A[14]=S,A[28]=S,A[35]=S,A[36]=M},batchQuad:function(S,M,A,C,w,P,L,O,I,D,B,G,z,W,k,J,Q,Y,K){var U=Math.min(M,C,P,O),V=Math.min(A,w,L,I),j=Math.max(M,C,P,O),$=Math.max(A,w,L,I),q=j-U,it=$-V,nt=this.spriteBounds.setTo(U,V,q,it),et=S?S.preFX.padding:0,ht=q+et*2,ut=it+et*2,dt=Math.abs(Math.max(ht,ut)),mt=this.manager.getRenderTarget(dt),gt=this.targetBounds.setTo(0,0,mt.width,mt.height);p(gt,nt.centerX,nt.centerY),this.tempSprite=S;var At=this.gl,ot=this.renderer;ot.clearStencilMask(),this.setShader(this.drawSpriteShader),this.set1i("uMainSampler",0),this.set2f("uResolution",ot.width,ot.height),this.set1i("uRoundPixels",ot.config.roundPixels),this.flipProjectionMatrix(!0),S&&(this.onDrawSprite(S,mt),S.preFX.onFX(this));var st=this.fsTarget;return this.flush(),At.viewport(0,0,ot.width,ot.height),At.bindFramebuffer(At.FRAMEBUFFER,st.framebuffer.webGLFramebuffer),At.framebufferTexture2D(At.FRAMEBUFFER,At.COLOR_ATTACHMENT0,At.TEXTURE_2D,st.texture.webGLTexture,0),At.clearColor(0,0,0,0),At.clear(At.COLOR_BUFFER_BIT),this.setTexture2D(K),this.batchVert(M,A,D,B,0,Y,W),this.batchVert(C,w,D,z,0,Y,J),this.batchVert(P,L,G,z,0,Y,Q),this.batchVert(M,A,D,B,0,Y,W),this.batchVert(P,L,G,z,0,Y,Q),this.batchVert(O,I,G,B,0,Y,k),this.flush(),this.flipProjectionMatrix(!1),At.activeTexture(At.TEXTURE0),At.bindTexture(At.TEXTURE_2D,mt.texture.webGLTexture),At.copyTexSubImage2D(At.TEXTURE_2D,0,0,0,gt.x,gt.y,gt.width,gt.height),At.bindFramebuffer(At.FRAMEBUFFER,null),At.bindTexture(At.TEXTURE_2D,null),this.onBatch(S),this.currentShader=this.copyShader,this.onDraw(mt,this.manager.getSwapRenderTarget(),this.manager.getAltSwapRenderTarget()),!0},onDrawSprite:function(){},onCopySprite:function(){},copySprite:function(S,M,A,C,w,P,L){A===void 0&&(A=!0),C===void 0&&(C=!0),w===void 0&&(w=!1),L===void 0&&(L=this.copyShader);var O=this.gl,I=this.tempSprite;P&&(L=this.colorMatrixShader),this.currentShader=L;var D=this.setVertexBuffer(this.quadVertexBuffer);L.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),A&&(O.clearColor(0,0,0,+!C),O.clear(O.COLOR_BUFFER_BIT)),w){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),w&&this.renderer.setBlendMode(z),O.bindFramebuffer(O.FRAMEBUFFER,null)},copy:function(S,M){var A=this.gl;this.set1i("uMainSampler",0),A.activeTexture(A.TEXTURE0),A.bindTexture(A.TEXTURE_2D,S.texture.webGLTexture),A.viewport(0,0,S.width,S.height),this.setUVs(0,0,0,1,1,1,1,0),A.bindFramebuffer(A.FRAMEBUFFER,M.framebuffer.webGLFramebuffer),A.framebufferTexture2D(A.FRAMEBUFFER,A.COLOR_ATTACHMENT0,A.TEXTURE_2D,M.texture.webGLTexture,0),A.clearColor(0,0,0,0),A.clear(A.COLOR_BUFFER_BIT),A.bufferData(A.ARRAY_BUFFER,this.quadVertexData,A.STATIC_DRAW),A.drawArrays(A.TRIANGLES,0,6),A.bindFramebuffer(A.FRAMEBUFFER,null)},blendFrames:function(S,M,A,C,w){this.manager.blendFrames(S,M,A,C,w)},blendFramesAdditive:function(S,M,A,C,w){this.manager.blendFramesAdditive(S,M,A,C,w)},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,A=this.renderer;this.set1i("uMainSampler",0),this.customMainSampler?this.setTexture2D(this.customMainSampler):this.setTexture2D(S.texture);var C=this._tempMatrix1.loadIdentity(),w=this.targetBounds.x,P=this.targetBounds.y,L=w+S.width,O=P+S.height,I=C.getX(w,P),D=C.getX(w,O),B=C.getX(L,O),G=C.getX(L,P),z=C.getY(w,P),W=C.getY(w,O),k=C.getY(L,O),J=C.getY(L,P),Q=16777215;this.batchVert(I,z,0,0,0,0,Q),this.batchVert(D,W,0,1,0,0,Q),this.batchVert(B,k,1,1,0,0,Q),this.batchVert(I,z,0,0,0,0,Q),this.batchVert(B,k,1,1,0,0,Q),this.batchVert(G,J,1,0,0,0,Q),A.restoreFramebuffer(!1,!0),A.currentFramebuffer||M.viewport(0,0,A.width,A.height),A.restoreStencilMask(),this.flush(),this.tempSprite=null},onDraw:function(S){this.drawToGame(S)},setUVs:function(S,M,A,C,w,P,L,O){var I=this.quadVertexViewF32;I[2]=S,I[3]=M,I[9]=A,I[10]=C,I[16]=w,I[17]=P,I[23]=S,I[24]=M,I[30]=w,I[31]=P,I[37]=L,I[38]=O},setTargetUVs:function(S,M){var A=M.height/S.height;A>.5?A=.5-(A-.5):A=.5+(.5-A),this.setUVs(0,A,0,1+A,1,1+A,1,A)},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}});a.exports=m},81041:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(95540),h=t(57516),o=new r({Extends:h,initialize:function(n){n.topology=5,n.batchSize=p(n,"batchSize",256),h.call(this,n)}});a.exports=o},12385:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(95540),h=t(57516),o=t(45561),l=t(60722),n=t(29100),u=new r({Extends:h,initialize:function(s){s.fragShader=p(s,"fragShader",o),s.vertShader=p(s,"vertShader",l),s.forceZero=!0,h.call(this,s)},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)}});a.exports=u},7589:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(35407),p=t(10312),h=t(83419),o=t(89422),l=t(96293),n=t(36682),u=t(95540),f=t(48247),s=t(49627),c=t(29100),d=new h({Extends:c,initialize:function(m){m.renderTarget=u(m,"renderTarget",[{scale:1,autoResize:!0},{scale:1,autoResize:!0},{scale:.5,autoResize:!0},{scale:.5,autoResize:!0}]),m.vertShader=u(m,"vertShader",s),m.shaders=u(m,"shaders",[{name:"Copy",fragShader:n},{name:"AddBlend",fragShader:r},{name:"LinearBlend",fragShader:f},{name:"ColorMatrix",fragShader:l}]),m.attributes=u(m,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),m.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],m.batchSize=1,c.call(this,m),this.colorMatrix=new o,this.copyShader,this.addShader,this.linearShader,this.colorMatrixShader,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2},boot:function(){c.prototype.boot.call(this);var v=this.shaders,m=this.renderTargets;this.copyShader=v[0],this.addShader=v[1],this.linearShader=v[2],this.colorMatrixShader=v[3],this.fullFrame1=m[0],this.fullFrame2=m[1],this.halfFrame1=m[2],this.halfFrame2=m[3]},copyFrame:function(v,m,S,M,A){S===void 0&&(S=1),M===void 0&&(M=!0),A===void 0&&(A=!0);var C=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",S),C.activeTexture(C.TEXTURE0),C.bindTexture(C.TEXTURE_2D,v.texture.webGLTexture),m?(C.viewport(0,0,m.width,m.height),C.bindFramebuffer(C.FRAMEBUFFER,m.framebuffer.webGLFramebuffer),C.framebufferTexture2D(C.FRAMEBUFFER,C.COLOR_ATTACHMENT0,C.TEXTURE_2D,m.texture.webGLTexture,0)):C.viewport(0,0,v.width,v.height),M&&(A?C.clearColor(0,0,0,0):C.clearColor(0,0,0,1),C.clear(C.COLOR_BUFFER_BIT)),C.bufferData(C.ARRAY_BUFFER,this.vertexData,C.STATIC_DRAW),C.drawArrays(C.TRIANGLES,0,6),C.bindFramebuffer(C.FRAMEBUFFER,null),C.bindTexture(C.TEXTURE_2D,null)},blitFrame:function(v,m,S,M,A,C,w){S===void 0&&(S=1),M===void 0&&(M=!0),A===void 0&&(A=!0),C===void 0&&(C=!1),w===void 0&&(w=!1);var P=this.gl;if(this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",S),P.activeTexture(P.TEXTURE0),P.bindTexture(P.TEXTURE_2D,v.texture.webGLTexture),v.height>m.height)P.viewport(0,0,v.width,v.height),this.setTargetUVs(v,m);else{var L=m.height-v.height;P.viewport(0,L,v.width,v.height)}if(P.bindFramebuffer(P.FRAMEBUFFER,m.framebuffer.webGLFramebuffer),P.framebufferTexture2D(P.FRAMEBUFFER,P.COLOR_ATTACHMENT0,P.TEXTURE_2D,m.texture.webGLTexture,0),M&&(A?P.clearColor(0,0,0,0):P.clearColor(0,0,0,1),P.clear(P.COLOR_BUFFER_BIT)),C){var O=this.renderer.currentBlendMode;this.renderer.setBlendMode(p.ERASE)}w&&this.flipY(),P.bufferData(P.ARRAY_BUFFER,this.vertexData,P.STATIC_DRAW),P.drawArrays(P.TRIANGLES,0,6),C&&this.renderer.setBlendMode(O),P.bindFramebuffer(P.FRAMEBUFFER,null),P.bindTexture(P.TEXTURE_2D,null),this.resetUVs()},copyFrameRect:function(v,m,S,M,A,C,w,P){w===void 0&&(w=!0),P===void 0&&(P=!0);var L=this.gl;L.bindFramebuffer(L.FRAMEBUFFER,v.framebuffer.webGLFramebuffer),L.framebufferTexture2D(L.FRAMEBUFFER,L.COLOR_ATTACHMENT0,L.TEXTURE_2D,v.texture.webGLTexture,0),w&&(P?L.clearColor(0,0,0,0):L.clearColor(0,0,0,1),L.clear(L.COLOR_BUFFER_BIT)),L.activeTexture(L.TEXTURE0),L.bindTexture(L.TEXTURE_2D,m.texture.webGLTexture),L.copyTexSubImage2D(L.TEXTURE_2D,0,0,0,S,M,A,C),L.bindFramebuffer(L.FRAMEBUFFER,null),L.bindTexture(L.TEXTURE_2D,null)},copyToGame:function(v){var m=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",1),this.renderer.popFramebuffer(),m.activeTexture(m.TEXTURE0),m.bindTexture(m.TEXTURE_2D,v.texture.webGLTexture),m.bufferData(m.ARRAY_BUFFER,this.vertexData,m.STATIC_DRAW),m.drawArrays(m.TRIANGLES,0,6)},drawFrame:function(v,m,S,M){S===void 0&&(S=!0),M===void 0&&(M=this.colorMatrix);var A=this.gl;this.setShader(this.colorMatrixShader),this.set1i("uMainSampler",0),this.set1fv("uColorMatrix",M.getData()),this.set1f("uAlpha",M.alpha),A.activeTexture(A.TEXTURE0),A.bindTexture(A.TEXTURE_2D,v.texture.webGLTexture),m?(A.viewport(0,0,m.width,m.height),A.bindFramebuffer(A.FRAMEBUFFER,m.framebuffer.webGLFramebuffer),A.framebufferTexture2D(A.FRAMEBUFFER,A.COLOR_ATTACHMENT0,A.TEXTURE_2D,m.texture.webGLTexture,0)):A.viewport(0,0,v.width,v.height),S?A.clearColor(0,0,0,0):A.clearColor(0,0,0,1),A.clear(A.COLOR_BUFFER_BIT),A.bufferData(A.ARRAY_BUFFER,this.vertexData,A.STATIC_DRAW),A.drawArrays(A.TRIANGLES,0,6),A.bindFramebuffer(A.FRAMEBUFFER,null),A.bindTexture(A.TEXTURE_2D,null)},blendFrames:function(v,m,S,M,A,C){M===void 0&&(M=1),A===void 0&&(A=!0),C===void 0&&(C=this.linearShader);var w=this.gl;this.setShader(C),this.set1i("uMainSampler1",0),this.set1i("uMainSampler2",1),this.set1f("uStrength",M),w.activeTexture(w.TEXTURE0),w.bindTexture(w.TEXTURE_2D,v.texture.webGLTexture),w.activeTexture(w.TEXTURE1),w.bindTexture(w.TEXTURE_2D,m.texture.webGLTexture),S?(w.bindFramebuffer(w.FRAMEBUFFER,S.framebuffer.webGLFramebuffer),w.framebufferTexture2D(w.FRAMEBUFFER,w.COLOR_ATTACHMENT0,w.TEXTURE_2D,S.texture.webGLTexture,0),w.viewport(0,0,S.width,S.height)):w.viewport(0,0,v.width,v.height),A?w.clearColor(0,0,0,0):w.clearColor(0,0,0,1),w.clear(w.COLOR_BUFFER_BIT),w.bufferData(w.ARRAY_BUFFER,this.vertexData,w.STATIC_DRAW),w.drawArrays(w.TRIANGLES,0,6),w.bindFramebuffer(w.FRAMEBUFFER,null),w.bindTexture(w.TEXTURE_2D,null)},blendFramesAdditive:function(v,m,S,M,A){this.blendFrames(v,m,S,M,A,this.addShader)},clearFrame:function(v,m){m===void 0&&(m=!0);var S=this.gl;S.viewport(0,0,v.width,v.height),S.bindFramebuffer(S.FRAMEBUFFER,v.framebuffer.webGLFramebuffer),m?S.clearColor(0,0,0,0):S.clearColor(0,0,0,1),S.clear(S.COLOR_BUFFER_BIT);var M=this.renderer.currentFramebuffer;S.bindFramebuffer(S.FRAMEBUFFER,M.webGLFramebuffer)},setUVs:function(v,m,S,M,A,C,w,P){var L=this.vertexViewF32;L[2]=v,L[3]=m,L[6]=S,L[7]=M,L[10]=A,L[11]=C,L[14]=v,L[15]=m,L[18]=A,L[19]=C,L[22]=w,L[23]=P},setTargetUVs:function(v,m){var S=m.height/v.height;S>.5?S=.5-(S-.5):S=.5+(.5-S),this.setUVs(0,S,0,1+S,1,1+S,1,S)},flipX:function(){this.setUVs(1,0,1,1,0,1,0,0)},flipY:function(){this.setUVs(0,1,0,0,1,0,1,1)},resetUVs:function(){this.setUVs(0,0,0,1,1,1,1,0)}});a.exports=d},36060:a=>{/** + * @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"};a.exports=y},84817:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="pipelineafterflush"},36712:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="pipelinebeforeflush"},40285:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="pipelinebind"},65918:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="pipelineboot"},92852:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="pipelinedestroy"},56072:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="pipelinerebind"},57566:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="pipelineresize"},77085:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={AFTER_FLUSH:t(84817),BEFORE_FLUSH:t(36712),BIND:t(40285),BOOT:t(65918),DESTROY:t(92852),REBIND:t(56072),RESIZE:t(57566)}},54812:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(99155),h=t(84057),o=new r({Extends:h,initialize:function(n){h.call(this,{game:n,fragShader:p}),this.amount=1},onPreRender:function(l,n){l=this.getController(l),this.set1f("amount",l.amount,n)}});a.exports=o},67329:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(24400),h=t(84057),o=new r({Extends:h,initialize:function(n){h.call(this,{game:n,fragShader:p}),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 s=2/l.width*n.offsetX,c=2/l.height*n.offsetY,d=0;d{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(41514),h=t(51078),o=t(94328),l=t(84057),n=new r({Extends:l,initialize:function(f){l.call(this,{game:f,shaders:[{name:"Gaussian5",fragShader:p},{name:"Gaussian9",fragShader:h},{name:"Gaussian13",fragShader:o}]}),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(),s=this.gl,c=this.fullFrame1,d=s.getParameter(s.FRAMEBUFFER_BINDING);this.bind(this.shaders[f.quality]),s.activeTexture(s.TEXTURE0),s.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=t(83419),p=t(90610),h=t(84057),o=new r({Extends:h,initialize:function(n){h.call(this,{game:n,fragShader:p}),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)}});a.exports=o},89428:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(91899),h=t(84057),o=new r({Extends:h,initialize:function(n){h.call(this,{game:n,fragShader:p}),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)}});a.exports=o},88904:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(84057),h=new r({Extends:p,initialize:function(l){p.call(this,{game:l})},onDraw:function(o){var l=this.fullFrame1;this.controller?this.manager.drawFrame(o,l,!0,this.controller):this.drawFrame(o,l),this.copyToGame(l)}});a.exports=h},63563:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(47838),h=t(84057),o=new r({Extends:h,initialize:function(n){h.call(this,{game:n,fragShader:p}),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)}});a.exports=o},94045:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(95540),h=t(98656),o=t(84057),l=t(70554),n=new r({Extends:o,initialize:function(f,s){var c=p(s,"quality",.1),d=p(s,"distance",10);o.call(this,{game:f,fragShader:l.setGlowQuality(h,f,c,d)}),this.outerStrength=4,this.innerStrength=0,this.knockout=!1,this.glcolor=[1,1,1,1]},onPreRender:function(u,f,s,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),s&&c&&this.set2f("resolution",s,c,f)},onDraw:function(u){this.set2f("resolution",u.width,u.height),this.bindAndDraw(u)}});a.exports=n},74088:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(70463),h=t(84057),o=new r({Extends:h,initialize:function(n){h.call(this,{game:n,fragShader:p}),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)}});a.exports=o},99636:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(50831),h=t(84057),o=new r({Extends:h,initialize:function(n){h.call(this,{game:n,fragShader:p}),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)}});a.exports=o},34700:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(92595),h=t(84057),o=new r({Extends:h,initialize:function(n){h.call(this,{game:n,fragShader:p}),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)}});a.exports=o},91157:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(72464),h=t(84057),o=new r({Extends:h,initialize:function(n){h.call(this,{game:n,fragShader:p}),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)}});a.exports=o},27797:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(39249),h=t(84057),o=new r({Extends:h,initialize:function(n){h.call(this,{game:n,fragShader:p}),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)}});a.exports=o},67603:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(2878),h=t(84057),o=new r({Extends:h,initialize:function(n){h.call(this,{game:n,fragShader:p}),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,s=l.direction,c=l.axis;this.set4f("config",u,f,s,c,n),this.setBoolean("reveal",l.reveal,n)}});a.exports=o},58918:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r={Barrel:t(54812),Bloom:t(67329),Blur:t(8861),Bokeh:t(51051),Circle:t(89428),ColorMatrix:t(88904),Displacement:t(63563),Glow:t(94045),Gradient:t(74088),Pixelate:t(99636),Shadow:t(34700),Shine:t(91157),Vignette:t(27797),Wipe:t(67603)};a.exports=r},96615:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(36060),p=t(79291),h={FX:t(58918),BitmapMaskPipeline:t(31302),Events:t(77085),FXPipeline:t(92651),LightPipeline:t(96569),MobilePipeline:t(56527),MultiPipeline:t(57516),PointLightPipeline:t(43439),PostFXPipeline:t(84057),PreFXPipeline:t(43558),RopePipeline:t(81041),SinglePipeline:t(12385),UtilityPipeline:t(7589)};h=p(!1,h,r),a.exports=h},35407:a=>{a.exports=["#define SHADER_NAME PHASER_ADD_BLEND_FS","precision mediump float;","uniform sampler2D uMainSampler1;","uniform sampler2D uMainSampler2;","uniform float uStrength;","varying vec2 outTexCoord;","void main ()","{"," vec4 frame1 = texture2D(uMainSampler1, outTexCoord);"," vec4 frame2 = texture2D(uMainSampler2, outTexCoord);"," gl_FragColor = frame1 + frame2 * uStrength;","}"].join(` +`)},78908:a=>{a.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_FS","precision mediump float;","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uMaskSampler;","uniform bool uInvertMaskAlpha;","void main ()","{"," vec2 uv = gl_FragCoord.xy / uResolution;"," vec4 mainColor = texture2D(uMainSampler, uv);"," vec4 maskColor = texture2D(uMaskSampler, uv);"," if (!uInvertMaskAlpha)"," {"," mainColor *= maskColor.a;"," }"," else"," {"," mainColor *= (1.0 - maskColor.a);"," }"," gl_FragColor = mainColor;","}"].join(` +`)},85191:a=>{a.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_VS","precision mediump float;","attribute vec2 inPosition;","void main ()","{"," gl_Position = vec4(inPosition, 0.0, 1.0);","}"].join(` +`)},96293:a=>{a.exports=["#define SHADER_NAME PHASER_COLORMATRIX_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform float uColorMatrix[20];","uniform float uAlpha;","varying vec2 outTexCoord;","void main ()","{"," vec4 c = texture2D(uMainSampler, outTexCoord);"," if (uAlpha == 0.0)"," {"," gl_FragColor = c;"," return;"," }"," if (c.a > 0.0)"," {"," c.rgb /= c.a;"," }"," vec4 result;"," result.r = (uColorMatrix[0] * c.r) + (uColorMatrix[1] * c.g) + (uColorMatrix[2] * c.b) + (uColorMatrix[3] * c.a) + uColorMatrix[4];"," result.g = (uColorMatrix[5] * c.r) + (uColorMatrix[6] * c.g) + (uColorMatrix[7] * c.b) + (uColorMatrix[8] * c.a) + uColorMatrix[9];"," result.b = (uColorMatrix[10] * c.r) + (uColorMatrix[11] * c.g) + (uColorMatrix[12] * c.b) + (uColorMatrix[13] * c.a) + uColorMatrix[14];"," result.a = (uColorMatrix[15] * c.r) + (uColorMatrix[16] * c.g) + (uColorMatrix[17] * c.b) + (uColorMatrix[18] * c.a) + uColorMatrix[19];"," vec3 rgb = mix(c.rgb, result.rgb, uAlpha);"," rgb *= result.a;"," gl_FragColor = vec4(rgb, result.a);","}"].join(` +`)},36682:a=>{a.exports=["#define SHADER_NAME PHASER_COPY_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform float uBrightness;","varying vec2 outTexCoord;","void main ()","{"," gl_FragColor = texture2D(uMainSampler, outTexCoord) * uBrightness;","}"].join(` +`)},99155:a=>{a.exports=["#define SHADER_NAME BARREL_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform float amount;","varying vec2 outTexCoord;","vec2 Distort(vec2 p)","{"," float theta = atan(p.y, p.x);"," float radius = length(p);"," radius = pow(radius, amount);"," p.x = radius * cos(theta);"," p.y = radius * sin(theta);"," return 0.5 * (p + 1.0);","}","void main()","{"," vec2 xy = 2.0 * outTexCoord - 1.0;"," vec2 texCoord = outTexCoord;"," if (length(xy) < 1.0)"," {"," texCoord = Distort(xy);"," }"," gl_FragColor = texture2D(uMainSampler, texCoord);","}"].join(` +`)},24400:a=>{a.exports=["#define SHADER_NAME BLOOM_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","void main ()","{"," vec4 sum = texture2D(uMainSampler, outTexCoord) * 0.204164 * strength;"," sum = sum + texture2D(uMainSampler, outTexCoord + offset * 1.407333) * 0.304005;"," sum = sum + texture2D(uMainSampler, outTexCoord - offset * 1.407333) * 0.304005;"," sum = sum + texture2D(uMainSampler, outTexCoord + offset * 3.294215) * 0.093913;"," gl_FragColor = (sum + texture2D(uMainSampler, outTexCoord - offset * 3.294215) * 0.093913) * vec4(color, 1);","}"].join(` +`)},94328:a=>{a.exports=["#define SHADER_NAME BLUR_HIGH_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = outTexCoord;"," vec4 col = vec4(0.0);"," vec2 off1 = vec2(1.411764705882353) * offset * strength;"," vec2 off2 = vec2(3.2941176470588234) * offset * strength;"," vec2 off3 = vec2(5.176470588235294) * offset * strength;"," col += texture2D(uMainSampler, uv) * 0.1964825501511404;"," col += texture2D(uMainSampler, uv + (off1 / resolution)) * 0.2969069646728344;"," col += texture2D(uMainSampler, uv - (off1 / resolution)) * 0.2969069646728344;"," col += texture2D(uMainSampler, uv + (off2 / resolution)) * 0.09447039785044732;"," col += texture2D(uMainSampler, uv - (off2 / resolution)) * 0.09447039785044732;"," col += texture2D(uMainSampler, uv + (off3 / resolution)) * 0.010381362401148057;"," col += texture2D(uMainSampler, uv - (off3 / resolution)) * 0.010381362401148057;"," gl_FragColor = col * vec4(color, 1.0);","}"].join(` +`)},41514:a=>{a.exports=["#define SHADER_NAME BLUR_LOW_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = outTexCoord;"," vec4 col = vec4(0.0);"," vec2 offset = vec2(1.333) * offset * strength;"," col += texture2D(uMainSampler, uv) * 0.29411764705882354;"," col += texture2D(uMainSampler, uv + (offset / resolution)) * 0.35294117647058826;"," col += texture2D(uMainSampler, uv - (offset / resolution)) * 0.35294117647058826;"," gl_FragColor = col * vec4(color, 1.0);","}"].join(` +`)},51078:a=>{a.exports=["#define SHADER_NAME BLUR_MED_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = outTexCoord;"," vec4 col = vec4(0.0);"," vec2 off1 = vec2(1.3846153846) * offset * strength;"," vec2 off2 = vec2(3.2307692308) * offset * strength;"," col += texture2D(uMainSampler, uv) * 0.2270270270;"," col += texture2D(uMainSampler, uv + (off1 / resolution)) * 0.3162162162;"," col += texture2D(uMainSampler, uv - (off1 / resolution)) * 0.3162162162;"," col += texture2D(uMainSampler, uv + (off2 / resolution)) * 0.0702702703;"," col += texture2D(uMainSampler, uv - (off2 / resolution)) * 0.0702702703;"," gl_FragColor = col * vec4(color, 1.0);","}"].join(` +`)},90610:a=>{a.exports=["#define SHADER_NAME BOKEH_FS","precision mediump float;","#define ITERATIONS 100.0","#define ONEOVER_ITR 1.0 / ITERATIONS","#define PI 3.141596","#define GOLDEN_ANGLE 2.39996323","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform float radius;","uniform float amount;","uniform float contrast;","uniform bool isTiltShift;","uniform float strength;","uniform vec2 blur;","varying vec2 outTexCoord;","vec2 Sample (in float theta, inout float r)","{"," r += 1.0 / r;"," return (r - 1.0) * vec2(cos(theta), sin(theta)) * 0.06;","}","vec3 Bokeh (sampler2D tex, vec2 uv, float radius)","{"," vec3 acc = vec3(0.0);"," vec3 div = vec3(0.0);"," vec2 pixel = vec2(resolution.y / resolution.x, 1.0) * radius * .025;"," float r = 1.0;"," for (float j = 0.0; j < GOLDEN_ANGLE * ITERATIONS; j += GOLDEN_ANGLE)"," {"," vec3 col = texture2D(tex, uv + pixel * Sample(j, r)).xyz;"," col = contrast > 0.0 ? col * col * (1.0 + contrast) : col;"," vec3 bokeh = vec3(0.5) + pow(col, vec3(10.0)) * amount;"," acc += col * bokeh;"," div += bokeh;"," }"," return acc / div;","}","void main ()","{"," float shift = 1.0;"," if (isTiltShift)"," {"," vec2 uv = vec2(gl_FragCoord.xy / resolution + vec2(-0.5, -0.5)) * 2.0;"," float centerStrength = 1.0;"," shift = length(uv * blur * strength) * centerStrength;"," }"," gl_FragColor = vec4(Bokeh(uMainSampler, outTexCoord * vec2(1.0, 1.0), radius * shift), 0.0);","}"].join(` +`)},91899:a=>{a.exports=["#define SHADER_NAME CIRCLE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec3 color;","uniform vec4 backgroundColor;","uniform float thickness;","uniform float scale;","uniform float feather;","varying vec2 outTexCoord;","void main ()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec2 position = (gl_FragCoord.xy / resolution.xy) * 2.0 - 1.0;"," float aspectRatio = resolution.x / resolution.y;"," position.x *= aspectRatio;"," float grad = length(position);"," float outer = aspectRatio;"," float inner = outer - (thickness * 2.0 / resolution.y);"," if (aspectRatio >= 1.0)"," {"," float f = 2.0 + (resolution.y / resolution.x);"," outer = 1.0;"," inner = 1.0 - (thickness * f / resolution.x);"," }"," outer *= scale;"," inner *= scale;"," float circle = smoothstep(outer, outer - 0.01, grad);"," float ring = circle - smoothstep(inner, inner - feather, grad);"," texture = mix(backgroundColor * backgroundColor.a, texture, texture.a);"," texture = (texture * (circle - ring));"," gl_FragColor = vec4(texture.rgb + (ring * color), texture.a);","}"].join(` +`)},47838:a=>{a.exports=["#define SHADER_NAME DISPLACEMENT_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform sampler2D uDisplacementSampler;","uniform vec2 amount;","varying vec2 outTexCoord;","void main ()","{"," vec2 disp = (-vec2(0.5, 0.5) + texture2D(uDisplacementSampler, outTexCoord).rr) * amount;"," gl_FragColor = texture2D(uMainSampler, outTexCoord + disp).rgba;","}"].join(` +`)},98656:a=>{a.exports=["#define SHADER_NAME GLOW_FS","precision mediump float;","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","uniform float outerStrength;","uniform float innerStrength;","uniform vec2 resolution;","uniform vec4 glowColor;","uniform bool knockout;","const float PI = 3.14159265358979323846264;","const float DIST = __DIST__;","const float SIZE = min(__SIZE__, PI * 2.0);","const float STEP = ceil(PI * 2.0 / SIZE);","const float MAX_ALPHA = STEP * DIST * (DIST + 1.0) / 2.0;","void main ()","{"," vec2 px = vec2(1.0 / resolution.x, 1.0 / resolution.y);"," float totalAlpha = 0.0;"," vec2 direction;"," vec2 displaced;"," vec4 color;"," for (float angle = 0.0; angle < PI * 2.0; angle += SIZE)"," {"," direction = vec2(cos(angle), sin(angle)) * px;"," for (float curDistance = 0.0; curDistance < DIST; curDistance++)"," {"," displaced = outTexCoord + direction * (curDistance + 1.0);"," color = texture2D(uMainSampler, displaced);"," totalAlpha += (DIST - curDistance) * color.a;"," }"," }"," color = texture2D(uMainSampler, outTexCoord);"," float alphaRatio = (totalAlpha / MAX_ALPHA);"," float innerGlowAlpha = (1.0 - alphaRatio) * innerStrength * color.a;"," float innerGlowStrength = min(1.0, innerGlowAlpha);"," vec4 innerColor = mix(color, glowColor, innerGlowStrength);"," float outerGlowAlpha = alphaRatio * outerStrength * (1.0 - color.a);"," float outerGlowStrength = min(1.0 - innerColor.a, outerGlowAlpha);"," vec4 outerGlowColor = outerGlowStrength * glowColor.rgba;"," if (knockout)"," {"," float resultAlpha = outerGlowAlpha + innerGlowAlpha;"," gl_FragColor = vec4(glowColor.rgb * resultAlpha, resultAlpha);"," }"," else"," {"," gl_FragColor = innerColor + outerGlowColor;"," }","}"].join(` +`)},70463:a=>{a.exports=["#define SHADER_NAME GRADIENT_FS","#define SRGB_TO_LINEAR(c) pow((c), vec3(2.2))","#define LINEAR_TO_SRGB(c) pow((c), vec3(1.0 / 2.2))","#define SRGB(r, g, b) SRGB_TO_LINEAR(vec3(float(r), float(g), float(b)) / 255.0)","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 positionFrom;","uniform vec2 positionTo;","uniform vec3 color1;","uniform vec3 color2;","uniform float alpha;","uniform int size;","varying vec2 outTexCoord;","float gradientNoise(in vec2 uv)","{"," const vec3 magic = vec3(0.06711056, 0.00583715, 52.9829189);"," return fract(magic.z * fract(dot(uv, magic.xy)));","}","float stepped (in float s, in float scale, in int steps)","{"," return steps > 0 ? floor( s / ((1.0 * scale) / float(steps))) * 1.0 / float(steps - 1) : s;","}","void main ()","{"," vec2 a = positionFrom;"," vec2 b = positionTo;"," vec2 ba = b - a;"," float d = dot(outTexCoord - a, ba) / dot(ba, ba);"," float t = size > 0 ? stepped(d, 1.0, size) : d;"," t = smoothstep(0.0, 1.0, clamp(t, 0.0, 1.0));"," vec3 color = mix(SRGB(color1.r, color1.g, color1.b), SRGB(color2.r, color2.g, color2.b), t);"," color = LINEAR_TO_SRGB(color);"," color += (1.0 / 255.0) * gradientNoise(outTexCoord) - (0.5 / 255.0);"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," gl_FragColor = vec4(mix(color.rgb, texture.rgb, alpha), 1.0) * texture.a;","}"].join(` +`)},50831:a=>{a.exports=["#define SHADER_NAME PIXELATE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform float amount;","varying vec2 outTexCoord;","void main ()","{"," float pixelSize = floor(2.0 + amount);"," vec2 center = pixelSize * floor(outTexCoord * resolution / pixelSize) + pixelSize * vec2(0.5, 0.5);"," vec2 corner1 = center + pixelSize * vec2(-0.5, -0.5);"," vec2 corner2 = center + pixelSize * vec2(+0.5, -0.5);"," vec2 corner3 = center + pixelSize * vec2(+0.5, +0.5);"," vec2 corner4 = center + pixelSize * vec2(-0.5, +0.5);"," vec4 pixel = 0.4 * texture2D(uMainSampler, center / resolution);"," pixel += 0.15 * texture2D(uMainSampler, corner1 / resolution);"," pixel += 0.15 * texture2D(uMainSampler, corner2 / resolution);"," pixel += 0.15 * texture2D(uMainSampler, corner3 / resolution);"," pixel += 0.15 * texture2D(uMainSampler, corner4 / resolution);"," gl_FragColor = pixel;","}"].join(` +`)},92595:a=>{a.exports=["#define SHADER_NAME SHADOW_FS","precision mediump float;","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","uniform vec2 lightPosition;","uniform vec4 color;","uniform float decay;","uniform float power;","uniform float intensity;","uniform int samples;","const int MAX = 12;","void main ()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec2 pc = (lightPosition - outTexCoord) * intensity;"," float shadow = 0.0;"," float limit = max(float(MAX), float(samples));"," for (int i = 0; i < MAX; ++i)"," {"," if (i >= samples)"," {"," break;"," }"," shadow += texture2D(uMainSampler, outTexCoord + float(i) * decay / limit * pc).a * power;"," }"," float mask = 1.0 - texture.a;"," gl_FragColor = mix(texture, color, shadow * mask);","}"].join(` +`)},72464:a=>{a.exports=["#define SHADER_NAME SHINE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform bool reveal;","uniform float speed;","uniform float time;","uniform float lineWidth;","uniform float gradient;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = gl_FragCoord.xy / resolution.xy;"," vec4 tex = texture2D(uMainSampler, outTexCoord);"," vec4 col1 = vec4(0.3, 0.0, 0.0, 1.0);"," vec4 col2 = vec4(0.85, 0.85, 0.85, 1.0);"," uv.x = uv.x - mod(time * speed, 2.0) + 0.5;"," float y = uv.x * gradient;"," float s = smoothstep(y - lineWidth, y, uv.y) - smoothstep(y, y + lineWidth, uv.y);"," gl_FragColor = (((s * col1) + (s * col2)) * tex);"," if (!reveal)"," {"," gl_FragColor += tex;"," }","}"].join(` +`)},39249:a=>{a.exports=["#define SHADER_NAME VIGNETTE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform float radius;","uniform float strength;","uniform vec2 position;","varying vec2 outTexCoord;","void main ()","{"," vec4 col = vec4(1.0);"," float d = length(outTexCoord - position);"," if (d <= radius)"," {"," float g = d / radius;"," g = sin(g * 3.14 * strength);"," col = vec4(g * g * g);"," }"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," gl_FragColor = texture * (1.0 - col);","}"].join(` +`)},2878:a=>{a.exports=["#define SHADER_NAME WIPE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec4 config;","uniform bool reveal;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = outTexCoord;"," vec4 color0;"," vec4 color1;"," if (reveal)"," {"," color0 = vec4(0);"," color1 = texture2D(uMainSampler, uv);"," }"," else"," {"," color0 = texture2D(uMainSampler, uv);"," color1 = vec4(0);"," }"," float distance = config.x;"," float width = config.y;"," float direction = config.z;"," float axis = uv.x;"," if (config.w == 1.0)"," {"," axis = uv.y;"," }"," float adjust = mix(width, -width, distance);"," float value = smoothstep(distance - width, distance + width, abs(direction - axis) + adjust);"," gl_FragColor = mix(color1, color0, value);","}"].join(` +`)},31063:a=>{a.exports=["#define SHADER_NAME PHASER_LIGHT_FS","precision mediump float;","struct Light","{"," vec2 position;"," vec3 color;"," float intensity;"," float radius;","};","const int kMaxLights = %LIGHT_COUNT%;","uniform vec4 uCamera; /* x, y, rotation, zoom */","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uNormSampler;","uniform vec3 uAmbientLightColor;","uniform Light uLights[kMaxLights];","uniform mat3 uInverseRotationMatrix;","uniform int uLightCount;","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," vec3 finalColor = vec3(0.0, 0.0, 0.0);"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 color = texture * texel;"," if (outTintEffect == 1.0)"," {"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," color = texel;"," }"," vec3 normalMap = texture2D(uNormSampler, outTexCoord).rgb;"," vec3 normal = normalize(uInverseRotationMatrix * vec3(normalMap * 2.0 - 1.0));"," vec2 res = vec2(min(uResolution.x, uResolution.y)) * uCamera.w;"," for (int index = 0; index < kMaxLights; ++index)"," {"," if (index < uLightCount)"," {"," Light light = uLights[index];"," vec3 lightDir = vec3((light.position.xy / res) - (gl_FragCoord.xy / res), 0.1);"," vec3 lightNormal = normalize(lightDir);"," float distToSurf = length(lightDir) * uCamera.w;"," float diffuseFactor = max(dot(normal, lightNormal), 0.0);"," float radius = (light.radius / res.x * uCamera.w) * uCamera.w;"," float attenuation = clamp(1.0 - distToSurf * distToSurf / (radius * radius), 0.0, 1.0);"," vec3 diffuse = light.color * diffuseFactor;"," finalColor += (attenuation * diffuse) * light.intensity;"," }"," }"," vec4 colorOutput = vec4(uAmbientLightColor + finalColor, 1.0);"," gl_FragColor = color * vec4(colorOutput.rgb * colorOutput.a, colorOutput.a);","}"].join(` +`)},48247:a=>{a.exports=["#define SHADER_NAME PHASER_LINEAR_BLEND_FS","precision mediump float;","uniform sampler2D uMainSampler1;","uniform sampler2D uMainSampler2;","uniform float uStrength;","varying vec2 outTexCoord;","void main ()","{"," vec4 frame1 = texture2D(uMainSampler1, outTexCoord);"," vec4 frame2 = texture2D(uMainSampler2, outTexCoord);"," gl_FragColor = mix(frame1, frame2 * uStrength, 0.5);","}"].join(` +`)},41214:a=>{a.exports=["#define SHADER_NAME PHASER_MESH_FS","precision mediump float;","uniform vec3 uLightPosition;","uniform vec3 uLightAmbient;","uniform vec3 uLightDiffuse;","uniform vec3 uLightSpecular;","uniform vec3 uFogColor;","uniform float uFogNear;","uniform float uFogFar;","uniform vec3 uMaterialAmbient;","uniform vec3 uMaterialDiffuse;","uniform vec3 uMaterialSpecular;","uniform float uMaterialShine;","uniform vec3 uCameraPosition;","uniform sampler2D uTexture;","varying vec2 vTextureCoord;","varying vec3 vNormal;","varying vec3 vPosition;","void main (void)","{"," vec4 color = texture2D(uTexture, vTextureCoord);"," vec3 ambient = uLightAmbient * uMaterialAmbient;"," vec3 norm = normalize(vNormal);"," vec3 lightDir = normalize(uLightPosition - vPosition);"," float diff = max(dot(norm, lightDir), 0.0);"," vec3 diffuse = uLightDiffuse * (diff * uMaterialDiffuse);"," vec3 viewDir = normalize(uCameraPosition - vPosition);"," vec3 reflectDir = reflect(-lightDir, norm);"," float spec = pow(max(dot(viewDir, reflectDir), 0.0), uMaterialShine);"," vec3 specular = uLightSpecular * (spec * uMaterialSpecular);"," vec3 result = (ambient + diffuse + specular) * color.rgb;"," float depth = gl_FragCoord.z / gl_FragCoord.w;"," float fogFactor = smoothstep(uFogNear, uFogFar, depth);"," gl_FragColor.rgb = mix(result.rgb, uFogColor, fogFactor);"," gl_FragColor.a = color.a;","}"].join(` +`)},39653:a=>{a.exports=["#define SHADER_NAME PHASER_MESH_VS","precision mediump float;","attribute vec3 aVertexPosition;","attribute vec3 aVertexNormal;","attribute vec2 aTextureCoord;","uniform mat4 uViewProjectionMatrix;","uniform mat4 uModelMatrix;","uniform mat4 uNormalMatrix;","varying vec2 vTextureCoord;","varying vec3 vNormal;","varying vec3 vPosition;","void main ()","{"," vTextureCoord = aTextureCoord;"," vPosition = vec3(uModelMatrix * vec4(aVertexPosition, 1.0));"," vNormal = vec3(uNormalMatrix * vec4(aVertexNormal, 1.0));"," gl_Position = uViewProjectionMatrix * uModelMatrix * vec4(aVertexPosition, 1.0);","}"].join(` +`)},62143:a=>{a.exports=["#define SHADER_NAME PHASER_MOBILE_FS","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 color = texture * texel;"," if (outTintEffect == 1.0)"," {"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," color = texel;"," }"," gl_FragColor = color;","}"].join(` +`)},47940:a=>{a.exports=["#define SHADER_NAME PHASER_MOBILE_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(` +`)},98840:a=>{a.exports=["#define SHADER_NAME PHASER_MULTI_FS","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","uniform sampler2D uMainSampler[%count%];","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," vec4 texture;"," %forloop%"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);"," vec4 color = texture * texel;"," if (outTintEffect == 1.0)"," {"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," color = texel;"," }"," gl_FragColor = color;","}"].join(` +`)},44667:a=>{a.exports=["#define SHADER_NAME PHASER_MULTI_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 outTexId;","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;"," outTexId = inTexId;"," outTint = inTint;"," outTintEffect = inTintEffect;","}"].join(` +`)},4127:a=>{a.exports=["#define SHADER_NAME PHASER_POINTLIGHT_FS","precision mediump float;","uniform vec2 uResolution;","uniform float uCameraZoom;","varying vec4 lightPosition;","varying vec4 lightColor;","varying float lightRadius;","varying float lightAttenuation;","void main ()","{"," vec2 center = (lightPosition.xy + 1.0) * (uResolution.xy * 0.5);"," float distToSurf = length(center - gl_FragCoord.xy);"," float radius = 1.0 - distToSurf / (lightRadius * uCameraZoom);"," float intensity = smoothstep(0.0, 1.0, radius * lightAttenuation);"," vec4 color = vec4(intensity, intensity, intensity, 0.0) * lightColor;"," gl_FragColor = vec4(color.rgb * lightColor.a, color.a);","}"].join(` +`)},89924:a=>{a.exports=["#define SHADER_NAME PHASER_POINTLIGHT_VS","precision mediump float;","uniform mat4 uProjectionMatrix;","attribute vec2 inPosition;","attribute vec2 inLightPosition;","attribute vec4 inLightColor;","attribute float inLightRadius;","attribute float inLightAttenuation;","varying vec4 lightPosition;","varying vec4 lightColor;","varying float lightRadius;","varying float lightAttenuation;","void main ()","{"," lightColor = inLightColor;"," lightRadius = inLightRadius;"," lightAttenuation = inLightAttenuation;"," lightPosition = uProjectionMatrix * vec4(inLightPosition, 1.0, 1.0);"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);","}"].join(` +`)},27681:a=>{a.exports=["#define SHADER_NAME PHASER_POSTFX_FS","precision mediump float;","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","void main ()","{"," gl_FragColor = texture2D(uMainSampler, outTexCoord);","}"].join(` +`)},49627:a=>{a.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:a=>{a.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:a=>{a.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:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={AddBlendFrag:t(35407),BitmapMaskFrag:t(78908),BitmapMaskVert:t(85191),ColorMatrixFrag:t(96293),CopyFrag:t(36682),FXBarrelFrag:t(99155),FXBloomFrag:t(24400),FXBlurHighFrag:t(94328),FXBlurLowFrag:t(41514),FXBlurMedFrag:t(51078),FXBokehFrag:t(90610),FXCircleFrag:t(91899),FXDisplacementFrag:t(47838),FXGlowFrag:t(98656),FXGradientFrag:t(70463),FXPixelateFrag:t(50831),FXShadowFrag:t(92595),FXShineFrag:t(72464),FXVignetteFrag:t(39249),FXWipeFrag:t(2878),LightFrag:t(31063),LinearBlendFrag:t(48247),MeshFrag:t(41214),MeshVert:t(39653),MobileFrag:t(62143),MobileVert:t(47940),MultiFrag:t(98840),MultiVert:t(44667),PointLightFrag:t(4127),PointLightVert:t(89924),PostFXFrag:t(27681),QuadVert:t(49627),SingleFrag:t(45561),SingleVert:t(60722)}},93567:(a,y,t)=>{/** + * @author Benjamin D. Richards + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=new r({initialize:function(o,l,n){this.webGLAttribLocation=-1,this.gl=o,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}});a.exports=p},26128:(a,y,t)=>{/** + * @author Benjamin D. Richards + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=new r({initialize:function(o,l,n,u){this.webGLBuffer=null,this.gl=o,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 o=this.bufferType,l=h.createBuffer();this.webGLBuffer=l,h.bindBuffer(o,this.webGLBuffer),h.bufferData(o,this.initialDataOrSize,this.bufferUsage),h.bindBuffer(o,null)}}},destroy:function(){var h=this.gl;h.isContextLost()||h.deleteBuffer(this.webGLBuffer),this.webGLBuffer=null,this.initialDataOrSize=null,this.gl=null}});a.exports=p},84387:(a,y,t)=>{/** + * @author Benjamin D. Richards + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p={36054:"Incomplete Attachment",36055:"Missing Attachment",36057:"Incomplete Dimensions",36061:"Framebuffer Unsupported"},h=new r({initialize:function(l,n,u,f,s){this.webGLFramebuffer=null,this.gl=l,this.width=n,this.height=u,this.renderTexture=f,this.addDepthStencilBuffer=!!s,this.createResource()},createResource:function(){var o=this.gl;if(!o.isContextLost()){var l=this.renderTexture,n=0,u=o.createFramebuffer();if(this.webGLFramebuffer=u,o.bindFramebuffer(o.FRAMEBUFFER,u),l.isRenderTexture=!0,l.isAlphaPremultiplied=!1,o.framebufferTexture2D(o.FRAMEBUFFER,o.COLOR_ATTACHMENT0,o.TEXTURE_2D,l.webGLTexture,0),n=o.checkFramebufferStatus(o.FRAMEBUFFER),n!==o.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer status: "+(p[n]||n));if(this.addDepthStencilBuffer){var f=o.createRenderbuffer();o.bindRenderbuffer(o.RENDERBUFFER,f),o.renderbufferStorage(o.RENDERBUFFER,o.DEPTH_STENCIL,this.width,this.height),o.framebufferRenderbuffer(o.FRAMEBUFFER,o.DEPTH_STENCIL_ATTACHMENT,o.RENDERBUFFER,f)}o.bindFramebuffer(o.FRAMEBUFFER,null)}},destroy:function(){if(this.webGLFramebuffer!==null){var o=this.gl;if(!o.isContextLost()){o.bindFramebuffer(o.FRAMEBUFFER,this.webGLFramebuffer);var l=o.getFramebufferAttachmentParameter(o.FRAMEBUFFER,o.COLOR_ATTACHMENT0,o.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME);l!==null&&(o.framebufferTexture2D(o.FRAMEBUFFER,o.COLOR_ATTACHMENT0,o.TEXTURE_2D,null,0),o.deleteTexture(l));var n=o.getFramebufferAttachmentParameter(o.FRAMEBUFFER,o.DEPTH_STENCIL_ATTACHMENT,o.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME);n!==null&&o.deleteRenderbuffer(n),o.bindFramebuffer(o.FRAMEBUFFER,null),o.deleteFramebuffer(this.webGLFramebuffer)}this.renderTexture=null,this.webGLFramebuffer=null,this.gl=null}}});a.exports=h},1482:(a,y,t)=>{/** + * @author Benjamin D. Richards + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=new r({initialize:function(o,l,n){this.webGLProgram=null,this.gl=o,this.vertexSource=l,this.fragmentSource=n,this.createResource()},createResource:function(){var h=this.gl;if(!h.isContextLost()){var o=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(o,l),h.attachShader(o,n),h.linkProgram(o),!h.getProgramParameter(o,h.LINK_STATUS))throw new Error("Link "+u+h.getProgramInfoLog(o));h.useProgram(o),this.webGLProgram=o}},destroy:function(){this.webGLProgram&&(this.gl.isContextLost()||this.gl.deleteProgram(this.webGLProgram),this.webGLProgram=null,this.gl=null)}});a.exports=p},82751:(a,y,t)=>{/** + * @author Benjamin D. Richards + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(50030),h=new r({initialize:function(l,n,u,f,s,c,d,v,m,S,M,A,C){this.webGLTexture=null,this.isRenderTexture=!1,this.gl=l,this.mipLevel=n,this.minFilter=u,this.magFilter=f,this.wrapT=s,this.wrapS=c,this.format=d,this.pixels=v,this.width=m,this.height=S,this.pma=M??!0,this.forceSize=!!A,this.flipY=!!C,this.__SPECTOR_Metadata={},this.createResource()},createResource:function(){var o=this.gl;if(!o.isContextLost()){if(this.pixels instanceof h){this.webGLTexture=this.pixels.webGLTexture;return}var l=o.createTexture();l.__SPECTOR_Metadata=this.__SPECTOR_Metadata,this.webGLTexture=l,this._processTexture()}},update:function(o,l,n,u,f,s,c,d,v){if(!(l===0||n===0)){this.pixels=o,this.width=l,this.height=n,this.flipY=u,this.wrapS=f,this.wrapT=s,this.minFilter=c,this.magFilter=d,this.format=v;var m=this.gl;m.isContextLost()||this._processTexture()}},_processTexture:function(){var o=this.gl;o.activeTexture(o.TEXTURE0);var l=o.getParameter(o.TEXTURE_BINDING_2D);o.bindTexture(o.TEXTURE_2D,this.webGLTexture),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MIN_FILTER,this.minFilter),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MAG_FILTER,this.magFilter),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_S,this.wrapS),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_T,this.wrapT),o.pixelStorei(o.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.pma),o.pixelStorei(o.UNPACK_FLIP_Y_WEBGL,this.flipY);var n=this.pixels,u=this.mipLevel,f=this.width,s=this.height,c=this.format,d=!1;if(n==null)o.texImage2D(o.TEXTURE_2D,u,c,f,s,0,c,o.UNSIGNED_BYTE,null),d=p(f,s);else if(n.compressed){f=n.width,s=n.height,d=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=t(83419),p=new r({initialize:function(o,l,n){this.webGLUniformLocation=null,this.gl=o,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}});a.exports=p},9503:(a,y,t)=>{/** + * @author Benjamin D. Richards + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r={WebGLAttribLocationWrapper:t(93567),WebGLBufferWrapper:t(26128),WebGLProgramWrapper:t(1482),WebGLTextureWrapper:t(82751),WebGLFramebufferWrapper:t(84387),WebGLUniformLocationWrapper:t(57183)};a.exports=r},76531:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(13560),p=t(83419),h=t(50792),o=t(97480),l=t(8443),n=t(57811),u=t(74403),f=t(45818),s=t(29747),c=t(87841),d=t(86555),v=t(56583),m=t(26099),S=t(38058),M=new p({Extends:h,initialize:function(C){h.call(this),this.game=C,this.canvas,this.canvasBounds=new c,this.parent=null,this.parentIsWindow=!1,this.parentSize=new d,this.gameSize=new d,this.baseSize=new d,this.displaySize=new d,this.scaleMode=r.SCALE_MODE.NONE,this.zoom=1,this._resetZoom=!1,this.displayScale=new m(1,1),this.autoRound=!1,this.autoCenter=r.CENTER.NO_CENTER,this.orientation=r.ORIENTATION.LANDSCAPE,this.fullscreen,this.fullscreenTarget=null,this._createdFullscreenTarget=!1,this.dirty=!1,this.resizeInterval=500,this._lastCheck=0,this._checkOrientation=!1,this.domlisteners={orientationChange:s,windowResize:s,fullScreenChange:s,fullScreenError:s}},preBoot:function(){this.parseConfig(this.game.config),this.game.events.once(l.BOOT,this.boot,this)},boot:function(){var A=this.game;this.canvas=A.canvas,this.fullscreen=A.device.fullscreen,this.scaleMode!==r.SCALE_MODE.RESIZE&&this.scaleMode!==r.SCALE_MODE.EXPAND&&this.displaySize.setAspectMode(this.scaleMode),this.scaleMode===r.SCALE_MODE.NONE?this.resize(this.width,this.height):(this.getParentBounds(),this.parentSize.width>0&&this.parentSize.height>0&&this.displaySize.setParent(this.parentSize),this.refresh()),A.events.on(l.PRE_STEP,this.step,this),A.events.once(l.READY,this.refresh,this),A.events.once(l.DESTROY,this.destroy,this),this.startListeners()},parseConfig:function(A){this.getParent(A),this.getParentBounds();var C=A.width,w=A.height,P=A.scaleMode,L=A.zoom,O=A.autoRound;if(typeof C=="string")if(C.substr(-1)!=="%")C=parseInt(C,10);else{var I=this.parentSize.width;I===0&&(I=window.innerWidth);var D=parseInt(C,10)/100;C=Math.floor(I*D)}if(typeof w=="string")if(w.substr(-1)!=="%")w=parseInt(w,10);else{var B=this.parentSize.height;B===0&&(B=window.innerHeight);var G=parseInt(w,10)/100;w=Math.floor(B*G)}this.scaleMode=P,this.autoRound=O,this.autoCenter=A.autoCenter,this.resizeInterval=A.resizeInterval,O&&(C=Math.floor(C),w=Math.floor(w)),this.gameSize.setSize(C,w),L===r.ZOOM.MAX_ZOOM&&(L=this.getMaxZoom()),this.zoom=L,L!==1&&(this._resetZoom=!0),this.baseSize.setSize(C,w),O&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),A.minWidth>0&&this.displaySize.setMin(A.minWidth*L,A.minHeight*L),A.maxWidth>0&&this.displaySize.setMax(A.maxWidth*L,A.maxHeight*L),this.displaySize.setSize(C,w),(A.snapWidth>0||A.snapHeight>0)&&this.displaySize.setSnap(A.snapWidth,A.snapHeight),this.orientation=f(C,w)},getParent:function(A){var C=A.parent;if(C!==null){if(this.parent=u(C),this.parentIsWindow=this.parent===document.body,A.expandParent&&A.scaleMode!==r.SCALE_MODE.NONE){var w=this.parent.getBoundingClientRect();(this.parentIsWindow||w.height===0)&&(document.documentElement.style.height="100%",document.body.style.height="100%",w=this.parent.getBoundingClientRect(),!this.parentIsWindow&&w.height===0&&(this.parent.style.overflow="hidden",this.parent.style.width="100%",this.parent.style.height="100%"))}A.fullscreenTarget&&!this.fullscreenTarget&&(this.fullscreenTarget=u(A.fullscreenTarget))}},getParentBounds:function(){if(!this.parent)return!1;var A=this.parentSize,C=this.parent.getBoundingClientRect();this.parentIsWindow&&this.game.device.os.iOS&&(C.height=n(!0));var w=C.width,P=C.height;if(A.width!==w||A.height!==P)return A.setSize(w,P),!0;if(this.canvas){var L=this.canvasBounds,O=this.canvas.getBoundingClientRect();if(O.x!==L.x||O.y!==L.y)return!0}return!1},lockOrientation:function(A){var C=screen.lockOrientation||screen.mozLockOrientation||screen.msLockOrientation;return C?C.call(screen,A):!1},setParentSize:function(A,C){return this.parentSize.setSize(A,C),this.refresh()},setGameSize:function(A,C){var w=this.autoRound;w&&(A=Math.floor(A),C=Math.floor(C));var P=this.width,L=this.height;return this.gameSize.resize(A,C),this.baseSize.resize(A,C),w&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setAspectRatio(A/C),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height,this.refresh(P,L)},resize:function(A,C){var w=this.zoom,P=this.autoRound;P&&(A=Math.floor(A),C=Math.floor(C));var L=this.width,O=this.height;this.gameSize.resize(A,C),this.baseSize.resize(A,C),P&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setSize(A*w,C*w),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height;var I=this.canvas.style,D=A*w,B=C*w;return P&&(D=Math.floor(D),B=Math.floor(B)),(D!==A||B!==C)&&(I.width=D+"px",I.height=B+"px"),this.refresh(L,O)},setZoom:function(A){return this.zoom=A,this._resetZoom=!0,this.refresh()},setMaxZoom:function(){return this.zoom=this.getMaxZoom(),this._resetZoom=!0,this.refresh()},setSnap:function(A,C){return A===void 0&&(A=0),C===void 0&&(C=A),this.displaySize.setSnap(A,C),this.refresh()},refresh:function(A,C){A===void 0&&(A=this.width),C===void 0&&(C=this.height),this.updateScale(),this.updateBounds(),this.updateOrientation(),this.displayScale.set(this.baseSize.width/this.canvasBounds.width,this.baseSize.height/this.canvasBounds.height);var w=this.game.domContainer;if(w){this.baseSize.setCSS(w);var P=this.canvas.style,L=w.style;L.transform="scale("+this.displaySize.width/this.baseSize.width+","+this.displaySize.height/this.baseSize.height+")",L.marginLeft=P.marginLeft,L.marginTop=P.marginTop}return this.emit(o.RESIZE,this.gameSize,this.baseSize,this.displaySize,A,C),this},updateOrientation:function(){if(this._checkOrientation){this._checkOrientation=!1;var A=f(this.width,this.height);A!==this.orientation&&(this.orientation=A,this.emit(o.ORIENTATION_CHANGE,A))}},updateScale:function(){var A=this.canvas.style,C=this.gameSize.width,w=this.gameSize.height,P,L,O=this.zoom,I=this.autoRound;if(this.scaleMode===r.SCALE_MODE.NONE)this.displaySize.setSize(C*O,w*O),P=this.displaySize.width,L=this.displaySize.height,I&&(P=Math.floor(P),L=Math.floor(L)),this._resetZoom&&(A.width=P+"px",A.height=L+"px",this._resetZoom=!1);else if(this.scaleMode===r.SCALE_MODE.RESIZE)this.displaySize.setSize(this.parentSize.width,this.parentSize.height),this.gameSize.setSize(this.displaySize.width,this.displaySize.height),this.baseSize.setSize(this.displaySize.width,this.displaySize.height),P=this.displaySize.width,L=this.displaySize.height,I&&(P=Math.floor(P),L=Math.floor(L)),this.canvas.width=P,this.canvas.height=L;else if(this.scaleMode===r.SCALE_MODE.EXPAND){this.displaySize.setSize(this.parentSize.width,this.parentSize.height),P=this.displaySize.width,L=this.displaySize.height,I&&(P=Math.floor(P),L=Math.floor(L)),A.width=P+"px",A.height=L+"px";var D=this.parentSize.width/this.gameSize.width,B=this.parentSize.height/this.gameSize.height;D=0?0:-(L.x*O.x),D=L.y>=0?0:-(L.y*O.y),B;P.width>=L.width?B=w.width:B=w.width-(L.width-P.width)*O.x;var G;return P.height>=L.height?G=w.height:G=w.height-(L.height-P.height)*O.y,C.setTo(I,D,B,G),A&&(C.width/=A.zoomX,C.height/=A.zoomY,C.centerX=A.centerX+A.scrollX,C.centerY=A.centerY+A.scrollY),C},step:function(A,C){this.parent&&(this._lastCheck+=C,(this.dirty||this._lastCheck>this.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0))},stopListeners:function(){var A=this.domlisteners;window.removeEventListener("orientationchange",A.orientationChange,!1),window.removeEventListener("resize",A.windowResize,!1);var C=["webkit","moz",""];C.forEach(function(w){document.removeEventListener(w+"fullscreenchange",A.fullScreenChange,!1),document.removeEventListener(w+"fullscreenerror",A.fullScreenError,!1)}),document.removeEventListener("MSFullscreenChange",A.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",A.fullScreenError,!1)},destroy:function(){this.removeAllListeners(),this.stopListeners(),this.game=null,this.canvas=null,this.canvasBounds=null,this.parent=null,this.fullscreenTarget=null,this.parentSize.destroy(),this.gameSize.destroy(),this.baseSize.destroy(),this.displaySize.destroy()},isFullscreen:{get:function(){return this.fullscreen.active}},width:{get:function(){return this.gameSize.width}},height:{get:function(){return this.gameSize.height}},isPortrait:{get:function(){return this.orientation===r.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===r.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});a.exports=M},64743:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={NO_CENTER:0,CENTER_BOTH:1,CENTER_HORIZONTALLY:2,CENTER_VERTICALLY:3}},39218:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={LANDSCAPE:"landscape-primary",PORTRAIT:"portrait-primary"}},81050:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={NONE:0,WIDTH_CONTROLS_HEIGHT:1,HEIGHT_CONTROLS_WIDTH:2,FIT:3,ENVELOP:4,RESIZE:5,EXPAND:6}},80805:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={NO_ZOOM:1,ZOOM_2X:2,ZOOM_4X:4,MAX_ZOOM:-1}},13560:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r={CENTER:t(64743),ORIENTATION:t(39218),SCALE_MODE:t(81050),ZOOM:t(80805)};a.exports=r},56139:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="enterfullscreen"},2336:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="fullscreenfailed"},47412:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="fullscreenunsupported"},51452:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="leavefullscreen"},20666:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="orientationchange"},47945:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="resize"},97480:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={ENTER_FULLSCREEN:t(56139),FULLSCREEN_FAILED:t(2336),FULLSCREEN_UNSUPPORTED:t(47412),LEAVE_FULLSCREEN:t(51452),ORIENTATION_CHANGE:t(20666),RESIZE:t(47945)}},93364:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(79291),p=t(13560),h={Center:t(64743),Events:t(97480),Orientation:t(39218),ScaleManager:t(76531),ScaleModes:t(81050),Zoom:t(80805)};h=r(!1,h,p.CENTER),h=r(!1,h,p.ORIENTATION),h=r(!1,h,p.SCALE_MODE),h=r(!1,h,p.ZOOM),a.exports=h},27397:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(95540),p=t(35355),h=function(o){var l=o.game.config.defaultPhysicsSystem,n=r(o.settings,"physics",!1);if(!(!l&&!n)){var u=[];if(l&&u.push(p(l+"Physics")),n)for(var f in n)f=p(f.concat("Physics")),u.indexOf(f)===-1&&u.push(f);return u}};a.exports=h},52106:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(95540),p=function(h){var o=h.plugins.getDefaultScenePlugins(),l=r(h.settings,"plugins",!1);return Array.isArray(l)?l:o||[]};a.exports=p},87033:a=>{/** + * @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"};a.exports=y},97482:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(2368),h=new r({initialize:function(l){this.sys=new p(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(){}});a.exports=h},60903:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(89993),h=t(44594),o=t(8443),l=t(35154),n=t(54899),u=t(29747),f=t(97482),s=t(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(d){var v=d.sys,m=v.settings;v.sceneUpdate=u,d.init&&(d.init.call(d,m.data),m.status=p.INIT,m.isTransition&&v.events.emit(h.TRANSITION_INIT,m.transitionFrom,m.transitionDuration));var S;v.load&&(S=v.load,S.reset()),S&&d.preload?(d.preload.call(d),m.status=p.LOADING,S.once(n.COMPLETE,this.loadComplete,this),S.start()):this.create(d)},loadComplete:function(d){this.game.sound&&this.game.sound.onBlurPausedSounds&&this.game.sound.unlock(),this.create(d.scene)},payloadComplete:function(d){this.bootScene(d.scene)},update:function(d,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>p.START&&S.settings.status<=p.RUNNING&&S.step(d,v),S.scenePlugin&&S.scenePlugin._target&&S.scenePlugin.step(d,v)}},render:function(d){for(var v=0;v=p.LOADING&&m.settings.status=p.START&&M<=p.CREATING)return this;if(M>=p.RUNNING&&M<=p.SLEEPING)S.shutdown(),S.sceneUpdate=u,S.start(v);else{S.sceneUpdate=u,S.start(v);var A;if(S.load&&(A=S.load),A&&S.settings.hasOwnProperty("pack")&&(A.reset(),A.addPack({payload:S.settings.pack})))return S.settings.status=p.LOADING,A.once(n.COMPLETE,this.payloadComplete,this),A.start(),this}return this.bootScene(m),this},stop:function(d,v){var m=this.getScene(d);if(m&&!m.sys.isTransitioning()&&m.sys.settings.status!==p.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(d,v){var m=this.getScene(d),S=this.getScene(v);return m&&S&&m!==S&&(this.sleep(d),this.isSleeping(v)?this.wake(v):this.start(v)),this},getAt:function(d){return this.scenes[d]},getIndex:function(d){var v=this.getScene(d);return this.scenes.indexOf(v)},bringToTop:function(d){if(this.isProcessing)this._queue.push({op:"bringToTop",keyA:d,keyB:null});else{var v=this.getIndex(d);if(v!==-1&&v0){var m=this.getScene(d);this.scenes.splice(v,1),this.scenes.unshift(m)}}return this},moveDown:function(d){if(this.isProcessing)this._queue.push({op:"moveDown",keyA:d,keyB:null});else{var v=this.getIndex(d);if(v>0){var m=v-1,S=this.getScene(d),M=this.getAt(m);this.scenes[v]=M,this.scenes[m]=S}}return this},moveUp:function(d){if(this.isProcessing)this._queue.push({op:"moveUp",keyA:d,keyB:null});else{var v=this.getIndex(d);if(vm),0,M)}}return this},moveBelow:function(d,v){if(d===v)return this;if(this.isProcessing)this._queue.push({op:"moveBelow",keyA:d,keyB:v});else{var m=this.getIndex(d),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{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(45319),p=t(83419),h=t(44594),o=t(95540),l=t(37277),n=new p({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=o(u,"target",!1),s=this.manager.getScene(f);if(!f||!this.checkValidTransition(s))return!1;var c=o(u,"duration",1e3);this._elapsed=0,this._target=s,this._duration=c,this._willSleep=o(u,"sleep",!1),this._willRemove=o(u,"remove",!1);var d=o(u,"onUpdate",null);d&&(this._onUpdate=d,this._onUpdateScope=o(u,"onUpdateScope",this.scene));var v=o(u,"allowInput",!1);this.settings.transitionAllowInput=v;var m=s.sys.settings;m.isTransition=!0,m.transitionFrom=this.scene,m.transitionDuration=c,m.transitionAllowInput=v,o(u,"moveAbove",!1)?this.manager.moveAbove(this.key,f):o(u,"moveBelow",!1)&&this.manager.moveBelow(this.key,f),s.sys.isSleeping()?s.sys.wake(o(u,"data")):this.manager.start(f,o(u,"data"));var S=o(u,"onStart",null),M=o(u,"onStartScope",this.scene);return S&&S.call(M,this.scene,s,c),this.systems.events.emit(h.TRANSITION_OUT,s,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,s,c){return this.manager.add(u,f,s,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,s){f===void 0&&(f=this.key);var c=this.manager.getScene(f);return c&&c.sys.setActive(u,s),this},setVisible:function(u,f){f===void 0&&(f=this.key);var s=this.manager.getScene(f);return s&&s.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"),a.exports=n},55681:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(89993),p=t(35154),h=t(46975),o=t(87033),l={create:function(n){return typeof n=="string"?n={key:n}:n===void 0&&(n={}),{status:r.PENDING,key:p(n,"key",""),active:p(n,"active",!1),visible:p(n,"visible",!0),isBooted:!1,isTransition:!1,transitionFrom:null,transitionDuration:0,transitionAllowInput:!0,data:{},pack:p(n,"pack",!1),cameras:p(n,"cameras",null),map:p(n,"map",h(o,p(n,"mapAdd",{}))),physics:p(n,"physics",{}),loader:p(n,"loader",{}),plugins:p(n,"plugins",!1),input:p(n,"input",{})}}};a.exports=l},2368:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(89993),h=t(42363),o=t(44594),l=t(27397),n=t(52106),u=t(29747),f=t(55681),s=new r({initialize:function(d,v){this.scene=d,this.game,this.renderer,this.config=v,this.settings=f.create(v),this.canvas,this.context,this.anims,this.cache,this.plugins,this.registry,this.scale,this.sound,this.textures,this.add,this.cameras,this.displayList,this.events,this.make,this.scenePlugin,this.updateList,this.sceneUpdate=u},init:function(c){this.settings.status=p.INIT,this.sceneUpdate=u,this.game=c,this.renderer=c.renderer,this.canvas=c.canvas,this.context=c.context;var d=c.plugins;this.plugins=d,d.addToScene(this,h.Global,[h.CoreScene,n(this),l(this)]),this.events.emit(o.BOOT,this),this.settings.isBooted=!0},step:function(c,d){var v=this.events;v.emit(o.PRE_UPDATE,c,d),v.emit(o.UPDATE,c,d),this.sceneUpdate.call(this.scene,c,d),v.emit(o.POST_UPDATE,c,d)},render:function(c){var d=this.displayList;d.depthSort(),this.events.emit(o.PRE_RENDER,c),this.cameras.render(c,d),this.events.emit(o.RENDER,c)},queueDepthSort:function(){this.displayList.queueDepthSort()},depthSort:function(){this.displayList.depthSort()},pause:function(c){var d=this.settings,v=this.getStatus();return v!==p.CREATING&&v!==p.RUNNING?console.warn("Cannot pause non-running Scene",d.key):this.settings.active&&(d.status=p.PAUSED,d.active=!1,this.events.emit(o.PAUSE,this,c)),this},resume:function(c){var d=this.events,v=this.settings;return this.settings.active||(v.status=p.RUNNING,v.active=!0,d.emit(o.RESUME,this,c)),this},sleep:function(c){var d=this.settings,v=this.getStatus();return v!==p.CREATING&&v!==p.RUNNING?console.warn("Cannot sleep non-running Scene",d.key):(d.status=p.SLEEPING,d.active=!1,d.visible=!1,this.events.emit(o.SLEEP,this,c)),this},wake:function(c){var d=this.events,v=this.settings;return v.status=p.RUNNING,v.active=!0,v.visible=!0,d.emit(o.WAKE,this,c),v.isTransition&&d.emit(o.TRANSITION_WAKE,v.transitionFrom,v.transitionDuration),this},getData:function(){return this.settings.data},getStatus:function(){return this.settings.status},canInput:function(){var c=this.settings.status;return c>p.PENDING&&c<=p.RUNNING},isSleeping:function(){return this.settings.status===p.SLEEPING},isActive:function(){return this.settings.status===p.RUNNING},isPaused:function(){return this.settings.status===p.PAUSED},isTransitioning:function(){return this.settings.isTransition||this.scenePlugin._target!==null},isTransitionOut:function(){return this.scenePlugin._target!==null&&this.scenePlugin._duration>0},isTransitionIn:function(){return this.settings.isTransition},isVisible:function(){return this.settings.visible},setVisible:function(c){return this.settings.visible=c,this},setActive:function(c,d){return c?this.resume(d):this.pause(d)},start:function(c){var d=this.events,v=this.settings;c&&(v.data=c),v.status=p.START,v.active=!0,v.visible=!0,d.emit(o.START,this),d.emit(o.READY,this,c)},shutdown:function(c){var d=this.events,v=this.settings;d.off(o.TRANSITION_INIT),d.off(o.TRANSITION_START),d.off(o.TRANSITION_COMPLETE),d.off(o.TRANSITION_OUT),v.status=p.SHUTDOWN,v.active=!1,v.visible=!1,d.emit(o.SHUTDOWN,this,c)},destroy:function(){var c=this.events,d=this.settings;d.status=p.DESTROYED,d.active=!1,d.visible=!1,c.emit(o.DESTROY,this),c.removeAllListeners();for(var v=["scene","game","anims","cache","plugins","registry","sound","textures","add","camera","displayList","events","make","scenePlugin","updateList"],m=0;m{/** + * @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};a.exports=y},69830:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="addedtoscene"},7919:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="boot"},46763:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="create"},11763:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="destroy"},71555:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="pause"},36735:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="postupdate"},3809:a=>{/** + * @author samme + * @copyright 2021 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="prerender"},90716:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="preupdate"},58262:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="ready"},91633:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="removedfromscene"},10319:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="render"},87132:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="resume"},81961:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="shutdown"},90194:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="sleep"},6265:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="start"},33178:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="transitioncomplete"},43063:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="transitioninit"},11259:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="transitionout"},61611:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="transitionstart"},45209:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="transitionwake"},22966:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="update"},21747:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="wake"},44594:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={ADDED_TO_SCENE:t(69830),BOOT:t(7919),CREATE:t(46763),DESTROY:t(11763),PAUSE:t(71555),POST_UPDATE:t(36735),PRE_RENDER:t(3809),PRE_UPDATE:t(90716),READY:t(58262),REMOVED_FROM_SCENE:t(91633),RENDER:t(10319),RESUME:t(87132),SHUTDOWN:t(81961),SLEEP:t(90194),START:t(6265),TRANSITION_COMPLETE:t(33178),TRANSITION_INIT:t(43063),TRANSITION_OUT:t(11259),TRANSITION_START:t(61611),TRANSITION_WAKE:t(45209),UPDATE:t(22966),WAKE:t(21747)}},62194:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(89993),p=t(79291),h={Events:t(44594),GetPhysicsPlugins:t(27397),GetScenePlugins:t(52106),SceneManager:t(60903),ScenePlugin:t(52209),Settings:t(55681),Systems:t(2368)};h=p(!1,h,r),a.exports=h},30341:(a,y,t)=>{/** + * @author Richard Davey + * @author Pavle Goloskokovic (http://prunegames.com) + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(50792),h=t(14463),o=t(79291),l=t(29747),n=new r({Extends:p,initialize:function(f,s,c){p.call(this),this.manager=f,this.key=s,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=this.duration||0,this.totalDuration=this.totalDuration||0,this.config={mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0},this.currentConfig=this.config,this.config=o(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=o(!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]=o(!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=o(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,s=Math.pow(u,f);this.totalRate=this.currentConfig.rate*this.manager.rate*s},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)}});a.exports=n},85034:(a,y,t)=>{/** + * @author Richard Davey + * @author Pavle Goloskokovic (http://prunegames.com) + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(41786),h=t(50792),o=t(14463),l=t(8443),n=t(46710),u=t(58731),f=t(29747),s=t(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 s,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(d,v){v===void 0&&(v={});var m=this.add(d,v);m.spritemap=this.jsonCache.get(d).spritemap;for(var S in m.spritemap)if(m.spritemap.hasOwnProperty(S)){var M=p(v),A=m.spritemap[S];M.loop=A.hasOwnProperty("loop")?A.loop:!1,m.addMarker({name:S,start:A.start,duration:A.end-A.start,config:M})}return m},get:function(d){return u(this.sounds,"key",d)},getAll:function(d){return d?n(this.sounds,"key",d):n(this.sounds)},getAllPlaying:function(){return n(this.sounds,"isPlaying",!0)},play:function(d,v){var m=this.add(d);return m.once(o.COMPLETE,m.destroy,m),v?v.name?(m.addMarker(v),m.play(v.name)):m.play(v):m.play()},playAudioSprite:function(d,v,m){var S=this.addAudioSprite(d);return S.once(o.COMPLETE,S.destroy,S),S.play(v,m)},remove:function(d){var v=this.sounds.indexOf(d);return v!==-1?(d.destroy(),this.sounds.splice(v,1),!0):!1},removeAll:function(){this.sounds.forEach(function(d){d.destroy()}),this.sounds.length=0},removeByKey:function(d){for(var v=0,m=this.sounds.length-1;m>=0;m--){var S=this.sounds[m];S.key===d&&(S.destroy(),this.sounds.splice(m,1),v++)}return v},pauseAll:function(){this.forEachActiveSound(function(d){d.pause()}),this.emit(o.PAUSE_ALL,this)},resumeAll:function(){this.forEachActiveSound(function(d){d.resume()}),this.emit(o.RESUME_ALL,this)},setListenerPosition:f,stopAll:function(){this.forEachActiveSound(function(d){d.stop()}),this.emit(o.STOP_ALL,this)},stopByKey:function(d){var v=0;return this.getAll(d).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(d,v){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit(o.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(d,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(d,v){var m=this;this.sounds.forEach(function(S,M){S&&!S.pendingRemove&&d.call(v||m,S,M,m.sounds)})},setRate:function(d){return this.rate=d,this},rate:{get:function(){return this._rate},set:function(d){this._rate=d,this.forEachActiveSound(function(v){v.calculateRate()}),this.emit(o.GLOBAL_RATE,this,d)}},setDetune:function(d){return this.detune=d,this},detune:{get:function(){return this._detune},set:function(d){this._detune=d,this.forEachActiveSound(function(v){v.calculateRate()}),this.emit(o.GLOBAL_DETUNE,this,d)}}});a.exports=c},14747:(a,y,t)=>{/** + * @author Richard Davey + * @author Pavle Goloskokovic (http://prunegames.com) + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(33684),p=t(25960),h=t(57490),o={create:function(l){var n=l.config.audio,u=l.device.audio;return n.noAudio||!u.webAudio&&!u.audioData?new p(l):u.webAudio&&!n.disableWebAudio?new h(l):new r(l)}};a.exports=o},19723:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="complete"},98882:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="decodedall"},57506:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="decoded"},73146:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="destroy"},11305:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="detune"},40577:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="detune"},30333:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="mute"},20394:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="rate"},21802:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="volume"},1299:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="looped"},99190:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="loop"},97125:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="mute"},89259:a=>{/** + * @author pi-kei + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="pan"},79986:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="pauseall"},17586:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="pause"},19618:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="play"},42306:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="rate"},10387:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="resumeall"},48959:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="resume"},9960:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="seek"},19180:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="stopall"},98328:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="stop"},50401:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="unlocked"},52498:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="volume"},14463:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={COMPLETE:t(19723),DECODED:t(57506),DECODED_ALL:t(98882),DESTROY:t(73146),DETUNE:t(11305),GLOBAL_DETUNE:t(40577),GLOBAL_MUTE:t(30333),GLOBAL_RATE:t(20394),GLOBAL_VOLUME:t(21802),LOOP:t(99190),LOOPED:t(1299),MUTE:t(97125),PAN:t(89259),PAUSE_ALL:t(79986),PAUSE:t(17586),PLAY:t(19618),RATE:t(42306),RESUME_ALL:t(10387),RESUME:t(48959),SEEK:t(9960),STOP_ALL:t(19180),STOP:t(98328),UNLOCKED:t(50401),VOLUME:t(52498)}},64895:(a,y,t)=>{/** + * @author Richard Davey + * @author Pavle Goloskokovic (http://prunegames.com) + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(30341),p=t(83419),h=t(14463),o=t(45319),l=new p({Extends:r,initialize:function(u,f,s){if(s===void 0&&(s={}),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,s)},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,s-f),s=this.audio.currentTime):s=f){this.reset(),this.stopAndReleaseAudioTag(),this.emit(h.COMPLETE,this);return}this.previousTime=s}},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=o(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}});a.exports=l},33684:(a,y,t)=>{/** + * @author Richard Davey + * @author Pavle Goloskokovic (http://prunegames.com) + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(85034),p=t(83419),h=t(14463),o=t(64895),l=new p({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 o(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,d){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} + */a.exports={SoundManagerCreator:t(14747),Events:t(14463),BaseSound:t(30341),BaseSoundManager:t(85034),WebAudioSound:t(71741),WebAudioSoundManager:t(57490),HTML5AudioSound:t(64895),HTML5AudioSoundManager:t(33684),NoAudioSound:t(4603),NoAudioSoundManager:t(25960)}},4603:(a,y,t)=>{/** + * @author Richard Davey + * @author Pavle Goloskokovic (http://prunegames.com) + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(30341),p=t(83419),h=t(50792),o=t(79291),l=t(29747),n=function(){return!1},u=function(){return null},f=function(){return this},s=new p({Extends:h,initialize:function(d,v,m){m===void 0&&(m={}),h.call(this),this.manager=d,this.key=v,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=0,this.totalDuration=0,this.config=o({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0},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)}});a.exports=s},25960:(a,y,t)=>{/** + * @author Richard Davey + * @author Pavle Goloskokovic (http://prunegames.com) + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(85034),p=t(83419),h=t(50792),o=t(4603),l=t(29747),n=new p({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 s=new o(this,u,f);return this.sounds.push(s),s},addAudioSprite:function(u,f){var s=this.add(u,f);return s.spritemap={},s},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,s){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)}});a.exports=n},71741:(a,y,t)=>{/** + * @author Richard Davey + * @author Pavle Goloskokovic (http://prunegames.com) + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(30341),p=t(83419),h=t(14463),o=t(95540),l=new p({Extends:r,initialize:function(u,f,s){if(s===void 0&&(s={}),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,s)},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=t(53134),p=t(85034),h=t(83419),o=t(14463),l=t(8443),n=t(71741),u=t(95540),f=new h({Extends:p,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),p.call(this,c),this.locked&&c.isBooted?this.unlock():c.events.once(l.BOOT,this.unlock,this)},createAudioContext:function(s){var c=s.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(s){return this.context&&this.context.close(),this.masterMuteNode&&this.masterMuteNode.disconnect(),this.masterVolumeNode&&this.masterVolumeNode.disconnect(),this.context=s,this.masterMuteNode=s.createGain(),this.masterVolumeNode=s.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(s.destination),this.destination=this.masterMuteNode,this},add:function(s,c){var d=new n(this,s,c);return this.sounds.push(d),d},decodeAudio:function(s,c){var d;Array.isArray(s)?d=s:d=[{key:s,data:c}];for(var v=this.game.cache.audio,m=d.length,S=0;S{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(37105),p=t(83419),h=t(29747),o=t(19186),l=new p({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,s){return f[n]-s[n]}),o(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,s){return r.GetFirst(this.list,n,u,f,s)},getAll:function(n,u,f,s){return r.GetAll(this.list,n,u,f,s)},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,s){return r.SetAll(this.list,n,u,f,s),this},each:function(n,u){for(var f=[null],s=2;s0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}}});a.exports=l},90330:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=new r({initialize:function(o){this.entries={},this.size=0,this.setAll(o)},setAll:function(h){if(Array.isArray(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=t(83419),p=t(50792),h=t(82348),o=new r({Extends:p,initialize:function(){p.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=t(43886);function p(C){if(!(this instanceof p))return new p(C);this._maxEntries=Math.max(4,C||9),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}p.prototype={all:function(){return this._all(this.data,[])},search:function(C){var w=this.data,P=[],L=this.toBBox;if(!S(C,w))return P;for(var O=[],I,D,B,G;w;){for(I=0,D=w.children.length;I=0&&I[w].children.length>this._maxEntries;)this._split(I,w),w--;this._adjustParentBBoxes(O,I,w)},_split:function(C,w){var P=C[w],L=P.children.length,O=this._minEntries;this._chooseSplitAxis(P,O,L);var I=this._chooseSplitIndex(P,O,L),D=M(P.children.splice(I,P.children.length-I));D.height=P.height,D.leaf=P.leaf,o(P,this.toBBox),o(D,this.toBBox),w?C[w-1].children.push(D):this._splitRoot(P,D)},_splitRoot:function(C,w){this.data=M([C,w]),this.data.height=C.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},_chooseSplitIndex:function(C,w,P){var L,O,I,D,B,G,z,W;for(G=z=1/0,L=w;L<=P-w;L++)O=l(C,0,L,this.toBBox),I=l(C,L,P,this.toBBox),D=v(O,I),B=s(O)+s(I),D=w;G--)z=C.children[G],n(D,C.leaf?O(z):z),B+=c(D);return B},_adjustParentBBoxes:function(C,w,P){for(var L=P;L>=0;L--)n(w[L],C)},_condense:function(C){for(var w=C.length-1,P;w>=0;w--)C[w].children.length===0?w>0?(P=C[w-1].children,P.splice(P.indexOf(C[w]),1)):this.clear():o(C[w],this.toBBox)},compareMinX:function(C,w){return C.left-w.left},compareMinY:function(C,w){return C.top-w.top},toBBox:function(C){return{minX:C.left,minY:C.top,maxX:C.right,maxY:C.bottom}}};function h(C,w,P){if(!P)return w.indexOf(C);for(var L=0;L=C.minX&&w.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 A(C,w,P,L,O){for(var I=[w,P],D;I.length;)P=I.pop(),w=I.pop(),!(P-w<=L)&&(D=w+Math.ceil((P-w)/L/2)*L,r(C,D,w,P,O),I.push(w,D,D,P))}a.exports=p},35072:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=new r({initialize:function(o){if(this.entries=[],Array.isArray(o))for(var l=0;l-1&&this.entries.splice(o,1),this},dump:function(){console.group("Set");for(var h=0;h-1},union:function(h){var o=new p;return h.entries.forEach(function(l){o.set(l)}),this.entries.forEach(function(l){o.set(l)}),o},intersect:function(h){var o=new p;return this.entries.forEach(function(l){h.contains(l)&&o.set(l)}),o},difference:function(h){var o=new p;return this.entries.forEach(function(l){h.contains(l)||o.set(l)}),o},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} + */var r=t(45319),p=t(83419),h=t(56583),o=t(26099),l=new p({initialize:function(u,f,s,c){u===void 0&&(u=0),f===void 0&&(f=u),s===void 0&&(s=0),c===void 0&&(c=null),this._width=u,this._height=f,this._parent=c,this.aspectMode=s,this.aspectRatio=f===0?1:u/f,this.minWidth=0,this.minHeight=0,this.maxWidth=Number.MAX_VALUE,this.maxHeight=Number.MAX_VALUE,this.snapTo=new o},setAspectMode:function(n){return n===void 0&&(n=0),this.aspectMode=n,this.setSize(this._width,this._height)},setSnap:function(n,u){return n===void 0&&(n=0),u===void 0&&(u=n),this.snapTo.set(n,u),this.setSize(this._width,this._height)},setParent:function(n){return this._parent=n,this.setSize(this._width,this._height)},setMin:function(n,u){return n===void 0&&(n=0),u===void 0&&(u=n),this.minWidth=r(n,0,this.maxWidth),this.minHeight=r(u,0,this.maxHeight),this.setSize(this._width,this._height)},setMax:function(n,u){return n===void 0&&(n=Number.MAX_VALUE),u===void 0&&(u=n),this.maxWidth=r(n,this.minWidth,Number.MAX_VALUE),this.maxHeight=r(u,this.minHeight,Number.MAX_VALUE),this.setSize(this._width,this._height)},setSize:function(n,u){switch(n===void 0&&(n=0),u===void 0&&(u=n),this.aspectMode){case l.NONE:this._width=this.getNewWidth(h(n,this.snapTo.x)),this._height=this.getNewHeight(h(u,this.snapTo.y)),this.aspectRatio=this._height===0?1:this._width/this._height;break;case l.WIDTH_CONTROLS_HEIGHT:this._width=this.getNewWidth(h(n,this.snapTo.x)),this._height=this.getNewHeight(this._width*(1/this.aspectRatio),!1);break;case l.HEIGHT_CONTROLS_WIDTH:this._height=this.getNewHeight(h(u,this.snapTo.y)),this._width=this.getNewWidth(this._height*this.aspectRatio,!1);break;case l.FIT:this.constrain(n,u,!0);break;case l.ENVELOP:this.constrain(n,u,!1);break}return this},setAspectRatio:function(n){return this.aspectRatio=n,this.setSize(this._width,this._height)},resize:function(n,u){return this._width=this.getNewWidth(h(n,this.snapTo.x)),this._height=this.getNewHeight(h(u,this.snapTo.y)),this.aspectRatio=this._height===0?1:this._width/this._height,this},getNewWidth:function(n,u){return u===void 0&&(u=!0),n=r(n,this.minWidth,this.maxWidth),u&&this._parent&&n>this._parent.width&&(n=Math.max(this.minWidth,this._parent.width)),n},getNewHeight:function(n,u){return u===void 0&&(u=!0),n=r(n,this.minHeight,this.maxHeight),u&&this._parent&&n>this._parent.height&&(n=Math.max(this.minHeight,this._parent.height)),n},constrain:function(n,u,f){n===void 0&&(n=0),u===void 0&&(u=n),f===void 0&&(f=!0),n=this.getNewWidth(n),u=this.getNewHeight(u);var s=this.snapTo,c=u===0?1:n/u;return f&&this.aspectRatio>c||!f&&this.aspectRatio0&&(u=h(u,s.y),n=u*this.aspectRatio)):(f&&this.aspectRatioc)&&(u=h(u,s.y),n=u*this.aspectRatio,s.x>0&&(n=h(n,s.x),u=n*(1/this.aspectRatio))),this._width=n,this._height=u,this},fitTo:function(n,u){return this.constrain(n,u,!0)},envelop:function(n,u){return this.constrain(n,u,!1)},setWidth:function(n){return this.setSize(n,this._height)},setHeight:function(n){return this.setSize(this._width,n)},toString:function(){return"[{ Size (width="+this._width+" height="+this._height+" aspectRatio="+this.aspectRatio+" aspectMode="+this.aspectMode+") }]"},setCSS:function(n){n&&n.style&&(n.style.width=this._width+"px",n.style.height=this._height+"px")},copy:function(n){return n.setAspectMode(this.aspectMode),n.aspectRatio=this.aspectRatio,n.setSize(this.width,this.height)},destroy:function(){this._parent=null,this.snapTo=null},width:{get:function(){return this._width},set:function(n){this.setSize(n,this._height)}},height:{get:function(){return this._height},set:function(n){this.setSize(this._width,n)}}});l.NONE=0,l.WIDTH_CONTROLS_HEIGHT=1,l.HEIGHT_CONTROLS_WIDTH=2,l.FIT=3,l.ENVELOP=4,a.exports=l},15238:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="add"},56187:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="remove"},82348:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={PROCESS_QUEUE_ADD:t(15238),PROCESS_QUEUE_REMOVE:t(56187)}},41392:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={Events:t(82348),List:t(73162),Map:t(90330),ProcessQueue:t(25774),RTree:t(59542),Set:t(35072),Size:t(86555)}},57382:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(45319),h=t(40987),o=t(8054),l=t(50030),n=t(79237),u=new r({Extends:n,initialize:function(s,c,d,v,m){n.call(this,s,c,d,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===o.WEBGL&&this.refresh(),this},draw:function(f,s,c,d){return d===void 0&&(d=!0),this.context.drawImage(c,f,s),d&&this.update(),this},drawFrame:function(f,s,c,d,v){c===void 0&&(c=0),d===void 0&&(d=0),v===void 0&&(v=!0);var m=this.manager.getFrame(f,s);if(m){var S=m.canvasData,M=m.cutWidth,A=m.cutHeight,C=m.source.resolution;this.context.drawImage(m.source.image,S.x,S.y,M,A,c,d,M/C,A/C),v&&this.update()}return this},setPixel:function(f,s,c,d,v,m){m===void 0&&(m=255),f=Math.abs(Math.floor(f)),s=Math.abs(Math.floor(s));var S=this.getIndex(f,s);if(S>-1){var M=this.context.getImageData(f,s,1,1);M.data[0]=c,M.data[1]=d,M.data[2]=v,M.data[3]=m,this.context.putImageData(M,f,s)}return this},putData:function(f,s,c,d,v,m,S){return d===void 0&&(d=0),v===void 0&&(v=0),m===void 0&&(m=f.width),S===void 0&&(S=f.height),this.context.putImageData(f,s,c,d,v,m,S),this},getData:function(f,s,c,d){f=p(Math.floor(f),0,this.width-1),s=p(Math.floor(s),0,this.height-1),c=p(c,1,this.width-f),d=p(d,1,this.height-s);var v=this.context.getImageData(f,s,c,d);return v},getPixel:function(f,s,c){c||(c=new h);var d=this.getIndex(f,s);if(d>-1){var v=this.data,m=v[d+0],S=v[d+1],M=v[d+2],A=v[d+3];c.setTo(m,S,M,A)}return c},getPixels:function(f,s,c,d){f===void 0&&(f=0),s===void 0&&(s=0),c===void 0&&(c=this.width),d===void 0&&(d=c),f=Math.abs(Math.round(f)),s=Math.abs(Math.round(s));for(var v=p(f,0,this.width),m=p(f+c,0,this.width),S=p(s,0,this.height),M=p(s+d,0,this.height),A=new h,C=[],w=S;w{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(10312),p=t(71911),h=t(27919),o=t(83419),l=t(8054),n=t(4327),u=t(95540),f=t(36060),s=t(32302),c=t(79237),d=t(70554),v=new o({Extends:c,initialize:function(S,M,A,C){A===void 0&&(A=256),C===void 0&&(C=256),this.type="DynamicTexture";var w=S.game.renderer,P=w&&w.type===l.CANVAS,L=P?h.create2D(this,A,C):[this];c.call(this,S,M,L,A,C),this.add("__BASE",0,0,0,A,C),this.renderer=w,this.width=-1,this.height=-1,this.isDrawing=!1,this.canvas=P?L:null,this.context=P?L.getContext("2d",{willReadFrequently:!0}):null,this.dirty=!1,this.isSpriteTexture=!0,this._eraseMode=!1,this.camera=new p(0,0,A,C).setScene(S.game.scene.systemScene,!1),this.renderTarget=P?null:new s(w,A,C,1,0,!1,!0,!0,!1),this.pipeline=P?null:w.pipelines.get(f.SINGLE_PIPELINE),this.setSize(A,C)},setSize:function(m,S){S===void 0&&(S=m);var M=this.get(),A=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!==A.glTexture&&this.renderer.deleteTexture(A.glTexture),this.setFromRenderTarget()),this.camera.setSize(m,S),A.width=m,A.height=S,M.setSize(m,S),this.width=m,this.height=S}else{var w=this.getSourceImage();M.cutX+m>w.width&&(m=w.width-M.cutX),M.cutY+S>w.height&&(S=w.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,A,C,w){var P=this.camera,L=this.renderer;S===void 0&&(S=1),M===void 0&&(M=0),A===void 0&&(A=0),C===void 0&&(C=this.width),w===void 0&&(w=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=L.width/B.width,W=L.height/B.height,k=B.height-(A+w);G.drawFillRect(M*z,k*W,C*z,w*W,d.getTintFromFloats(D/255,I/255,O/255,1),S),B.unbind(!0)}else{var J=this.context;L.setContext(J),J.globalCompositeOperation="source-over",J.fillStyle="rgba("+O+","+I+","+D+","+S+")",J.fillRect(M,A,C,w),L.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,A,C){M===void 0&&(M=0),A===void 0&&(A=0);var w=u(C,"alpha",1),P=u(C,"tint",16777215),L=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),W=u(C,"blendMode",0),k=u(C,"erase",!1),J=u(C,"skipBatch",!1),Q=this.manager.resetStamp(w,P);return Q.setAngle(0),L!==0?Q.setAngle(L):O!==0&&Q.setRotation(O),Q.setScale(D,B),Q.setTexture(m,S),Q.setOrigin(G,z),Q.setBlendMode(W),k&&(this._eraseMode=!0),J?this.batchGameObject(Q,M,A):this.draw(Q,M,A),k&&(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,A,C){return this.beginDraw(),this.batchDraw(m,S,M,A,C),this.endDraw(),this},drawFrame:function(m,S,M,A,C,w){return this.beginDraw(),this.batchDrawFrame(m,S,M,A,C,w),this.endDraw(),this},repeat:function(m,S,M,A,C,w,P,L,O){if(M===void 0&&(M=0),A===void 0&&(A=0),C===void 0&&(C=this.width),w===void 0&&(w=this.height),P===void 0&&(P=1),L===void 0&&(L=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,L);I.setFrame(S),I.setOrigin(0);var D=S.width,B=S.height;C=Math.floor(C),w=Math.floor(w);var G=Math.ceil(C/D),z=Math.ceil(w/B),W=G*D-C,k=z*B-w;W>0&&(W=D-W),k>0&&(k=B-k),M<0&&(G+=Math.ceil(Math.abs(M)/D)),A<0&&(z+=Math.ceil(Math.abs(A)/B));var J=M,Q=A,Y=!1,K=this.manager.stampCrop.setTo(0,0,D,B);O||this.beginDraw();for(var U=0;U0&&V===G-1&&(Y=!0,K.width=W),k>0&&U===z-1&&(Y=!0,K.height=k),Y&&I.setCrop(K),this.batchGameObject(I,J,Q),I.isCropped=!1,K.setTo(0,0,D,B),J+=D}J=M,Q+=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,A,C){return Array.isArray(m)||(m=[m]),this.batchList(m,S,M,A,C),this},batchDrawFrame:function(m,S,M,A,C,w){M===void 0&&(M=0),A===void 0&&(A=0),C===void 0&&(C=1),w===void 0&&(w=16777215);var P=this.manager.getFrame(m,S);return P&&(this.renderTarget?this.pipeline.batchTextureFrame(P,M,A,w,C,this.camera.matrix,null):this.batchTextureFrame(P,M,A,C,w)),this},endDraw:function(m){if(m===void 0&&(m=this._eraseMode),this.isDrawing){var S=this.renderer,M=this.renderTarget;if(M){var A=S.endCapture(),C=S.pipelines.setUtility();C.blitFrame(A,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,A,C){var w=m.length;if(w!==0)for(var P=0;P0&&O.height>0&&L.drawImage(I,O.x,O.y,O.width,O.height,S,M,O.width,O.height),L.restore()}},snapshotArea:function(m,S,M,A,C,w,P){return this.renderTarget?this.renderer.snapshotFramebuffer(this.renderTarget.framebuffer,this.width,this.height,C,!1,m,S,M,A,w,P):this.renderer.snapshotCanvas(this.canvas,C,!1,m,S,M,A,w,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,A){var C=this.manager.resetStamp();C.setTexture(this),C.setOrigin(0),C.renderWebGL(m,C,M,A)},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}});a.exports=v},4327:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(45319),h=t(79291),o=new r({initialize:function(n,u,f,s,c,d,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(d,v,s,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 s=this.data,c=s.cut;c.x=u,c.y=f,c.w=l,c.h=n,c.r=u+l,c.b=f+n,s.sourceSize.w=l,s.sourceSize.h=n,s.spriteSourceSize.w=l,s.spriteSourceSize.h=n,s.radius=.5*Math.sqrt(l*l+n*n);var d=s.drawImage;return d.x=u,d.y=f,d.width=l,d.height=n,this.updateUVs()},setTrim:function(l,n,u,f,s,c){var d=this.data,v=d.spriteSourceSize;return d.trim=!0,d.sourceSize.w=l,d.sourceSize.h=n,v.x=u,v.y=f,v.w=s,v.h=c,v.r=u+s,v.b=f+c,this.x=u,this.y=f,this.width=s,this.height=c,this.halfWidth=s*.5,this.halfHeight=c*.5,this.centerX=Math.floor(s/2),this.centerY=Math.floor(c/2),this.updateUVs()},setScale9:function(l,n,u,f){var s=this.data;return s.scale9=!0,s.is3Slice=n===0&&f===this.height,s.scale9Borders.x=l,s.scale9Borders.y=n,s.scale9Borders.w=u,s.scale9Borders.h=f,this},setCropUVs:function(l,n,u,f,s,c,d){var v=this.cutX,m=this.cutY,S=this.cutWidth,M=this.cutHeight,A=this.realWidth,C=this.realHeight;n=p(n,0,A),u=p(u,0,C),f=p(f,0,A-n),s=p(s,0,C-u);var w=v+n,P=m+u,L=f,O=s,I=this.data;if(I.trim){var D=I.spriteSourceSize;f=p(f,0,S-n),s=p(s,0,M-u);var B=n+f,G=u+s,z=!(D.rB||D.y>G);if(z){var W=Math.max(D.x,n),k=Math.max(D.y,u),J=Math.min(D.r,B)-W,Q=Math.min(D.b,G)-k;L=J,O=Q,c?w=v+(S-(W-D.x)-J):w=v+(W-D.x),d?P=m+(M-(k-D.y)-Q):P=m+(k-D.y),n=W,u=k,f=J,s=Q}else w=0,P=0,L=0,O=0}else c&&(w=v+(S-n-f)),d&&(P=m+(M-u-s));var Y=this.source.width,K=this.source.height;return l.u0=Math.max(0,w/Y),l.v0=Math.max(0,P/K),l.u1=Math.min(1,(w+L)/Y),l.v1=Math.min(1,(P+O)/K),l.x=n,l.y=u,l.cx=w,l.cy=P,l.cw=L,l.ch=O,l.width=f,l.height=s,l.flipX=c,l.flipY=d,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,s,c){var d=this.data.drawImage;return d.width=l,d.height=n,this.u0=u,this.v0=f,this.u1=s,this.v1=c,this},updateUVs:function(){var l=this.cutX,n=this.cutY,u=this.cutWidth,f=this.cutHeight,s=this.data.drawImage;s.width=u,s.height=f;var c=this.source.width,d=this.source.height;return this.u0=l/c,this.v0=n/d,this.u1=(l+u)/c,this.v1=(n+f)/d,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 o(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}}});a.exports=o},79237:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(4327),h=t(11876),o='Texture "%s" has no frame "%s"',l=new r({initialize:function(u,f,s,c,d){Array.isArray(s)||(s=[s]),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>d&&(d=m.cutY+m.cutHeight)}return{x:f,y:s,width:c-f,height:d-s}},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(o,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(o,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=t(27919),p=t(57382),h=t(83419),o=t(40987),l=t(8054),n=t(81320),u=t(50792),f=t(69442),s=t(4327),c=t(8443),d=t(99584),v=t(35154),m=t(88571),S=t(41212),M=t(61309),A=t(87841),C=t(79237),w=new h({Extends:u,initialize:function(L){u.call(this),this.game=L,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 A,this.silentWarnings=!1,L.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(L){this.stamp=new m(L).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 L=P.key;return this.list.hasOwnProperty(L)&&(P.destroy(),this.emit(f.REMOVE,L),this.emit(f.REMOVE_KEY+L)),this},removeKey:function(P){return this.list.hasOwnProperty(P)&&delete this.list[P],this},addBase64:function(P,L){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=L}return this},getBase64:function(P,L,O,I){O===void 0&&(O="image/png"),I===void 0&&(I=.92);var D="",B=this.getFrame(P,L);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),W=z.getContext("2d",{willReadFrequently:!0});G.width>0&&G.height>0&&W.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,L,O){var I=null;return this.checkKey(P)&&(I=this.create(P,L),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,L){var O=null;if(this.checkKey(P)){var I=L.width,D=L.height;O=this.create(P,L,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,L,O){var I=null;if(this.checkKey(P)){if(I=this.create(P,L),I.add("__BASE",0,0,0,L.width,L.height),O){var D=function(G,z,W){Array.isArray(W.textures)||Array.isArray(W.frames)?M.JSONArray(G,z,W):M.JSONHash(G,z,W)};if(Array.isArray(O))for(var B=0;B=B.x&&P=B.y&&L=B.x&&P=B.y&&L{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(27919),p=t(83419),h=t(50030),o=t(29795),l=t(82751),n=new p({initialize:function(f,s,c,d,v){v===void 0&&(v=!1);var m=f.manager.game;this.renderer=m.renderer,this.texture=f,this.source=s,this.image=s.compressed?null:s,this.compressionAlgorithm=s.compressed?s.format:null,this.resolution=1,this.width=c||s.naturalWidth||s.videoWidth||s.width||0,this.height=d||s.naturalHeight||s.videoHeight||s.height||0,this.scaleMode=o.DEFAULT,this.isCanvas=s instanceof HTMLCanvasElement,this.isVideo=window.hasOwnProperty("HTMLVideoElement")&&s instanceof HTMLVideoElement,this.isRenderTexture=s.type==="RenderTexture"||s.type==="DynamicTexture",this.isGLTexture=s instanceof l,this.isPowerOf2=h(this.width,this.height),this.glTexture=null,this.flipY=v,this.init(m)},init:function(u){var f=this.renderer;if(f){var s=this.source;if(f.gl){var c=this.image,d=this.flipY,v=this.width,m=this.height,S=this.scaleMode;this.isCanvas?this.glTexture=f.createCanvasTexture(c,!1,d):this.isVideo?this.glTexture=f.createVideoTexture(c,!1,d):this.isRenderTexture?this.glTexture=f.createTextureFromSource(null,v,m,S):this.isGLTexture?this.glTexture=s:this.compressionAlgorithm?this.glTexture=f.createTextureFromSource(s,void 0,void 0,S):s instanceof Uint8Array?this.glTexture=f.createUint8ArrayTexture(s,v,m,S):this.glTexture=f.createTextureFromSource(c,v,m,S)}else this.isRenderTexture&&(this.image=s.canvas)}u.config.antialias||this.setFilter(1)},setFilter:function(u){this.renderer&&this.renderer.gl&&this.renderer.setTextureFilter(this.glTexture,u),this.scaleMode=u},setFlipY:function(u){return u===void 0&&(u=!0),u===this.flipY?this:(this.flipY=u,this.update(),this)},update:function(){var u=this.renderer,f=this.image,s=this.flipY,c=u.gl;c&&this.isCanvas?u.updateCanvasTexture(f,this.glTexture,s):c&&this.isVideo&&u.updateVideoTexture(f,this.glTexture,s)},destroy:function(){this.glTexture&&this.renderer.deleteTexture(this.glTexture),this.isCanvas&&r.remove(this.image),this.renderer=null,this.texture=null,this.source=null,this.image=null,this.glTexture=null}});a.exports=n},19673:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y={LINEAR:0,NEAREST:1};a.exports=y},44538:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="addtexture"},63486:a=>{/** + * @author samme + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="addtexture-"},94851:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="onerror"},29099:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="onload"},8678:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="ready"},86415:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="removetexture"},30879:a=>{/** + * @author samme + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="removetexture-"},69442:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={ADD:t(44538),ADD_KEY:t(63486),ERROR:t(94851),LOAD:t(29099),READY:t(8678),REMOVE:t(86415),REMOVE_KEY:t(30879)}},27458:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(79291),p=t(19673),h={CanvasTexture:t(57382),DynamicTexture:t(81320),Events:t(69442),FilterMode:p,Frame:t(4327),Parsers:t(61309),Texture:t(79237),TextureManager:t(17130),TextureSource:t(11876)};h=r(!1,h,p),a.exports=h},89905:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){if(!p.getElementsByTagName("TextureAtlas")){console.warn("Invalid Texture Atlas XML given");return}var h=t.source[r];t.add("__BASE",r,0,0,h.width,h.height);for(var o=p.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(t,r){var p=t.source[r];return t.add("__BASE",r,0,0,p.width,p.height),t};a.exports=y},4832:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){var p=t.source[r];return t.add("__BASE",r,0,0,p.width,p.height),t};a.exports=y},78566:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(41786),p=function(h,o,l){if(!l.frames&&!l.textures){console.warn("Invalid Texture Atlas JSON Array");return}var n=h.source[o];h.add("__BASE",o,0,0,n.width,n.height);for(var u=Array.isArray(l.textures)?l.textures[o].frames:l.frames,f,s=0;s{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(41786),p=function(h,o,l){if(!l.frames){console.warn("Invalid Texture Atlas JSON Hash given, missing 'frames' Object");return}var n=h.source[o];h.add("__BASE",o,0,0,n.width,n.height);var u=l.frames,f;for(var s in u)if(u.hasOwnProperty(s)){var c=u[s];if(f=h.add(s,o,c.frame.x,c.frame.y,c.frame.w,c.frame.h),!f){console.warn("Invalid atlas json, frame already exists: "+s);continue}c.trimmed&&f.setTrim(c.sourceSize.w,c.sourceSize.h,c.spriteSourceSize.x,c.spriteSourceSize.y,c.spriteSourceSize.w,c.spriteSourceSize.h),c.rotated&&(f.rotated=!0,f.updateUVsInverted());var d=c.anchor||c.pivot;d&&(f.customPivot=!0,f.pivotX=d.x,f.pivotY=d.y),c.scale9Borders&&f.setScale9(c.scale9Borders.x,c.scale9Borders.y,c.scale9Borders.w,c.scale9Borders.h),f.customData=r(c)}for(var v in l)v!=="frames"&&(Array.isArray(l[v])?h.customData[v]=l[v].slice(0):h.customData[v]=l[v]);return h};a.exports=p},31403:a=>{/** + * @author Richard Davey + * @copyright 2021 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){var r=[171,75,84,88,32,49,49,187,13,10,26,10],p,h=new Uint8Array(t,0,12);for(p=0;p>1),A=Math.max(1,A>>1),S+=C}return{mipmaps:m,width:s,height:c,internalFormat:f,compressed:!0,generateMipmap:!1}};a.exports=y},82038:a=>{/** + * @author Richard Davey + * @copyright 2021 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */function y(L,O,I,D,B,G,z){return z===void 0&&(z=16),Math.floor((L+I)/B)*Math.floor((O+D)/G)*z}function t(L,O){return L=Math.max(L,16),O=Math.max(O,8),L*O/4}function r(L,O){return L=Math.max(L,8),O=Math.max(O,8),L*O/2}function p(L,O){return Math.ceil(L/4)*Math.ceil(O/4)*16}function h(L,O){return y(L,O,3,3,4,4,8)}function o(L,O){return y(L,O,3,3,4,4)}function l(L,O){return y(L,O,4,3,5,4)}function n(L,O){return y(L,O,4,4,5,5)}function u(L,O){return y(L,O,5,4,6,5)}function f(L,O){return y(L,O,5,5,6,6)}function s(L,O){return y(L,O,7,4,8,5)}function c(L,O){return y(L,O,7,5,8,6)}function d(L,O){return y(L,O,7,7,8,8)}function v(L,O){return y(L,O,9,4,10,5)}function m(L,O){return y(L,O,9,5,10,6)}function S(L,O){return y(L,O,9,7,10,8)}function M(L,O){return y(L,O,9,9,10,10)}function A(L,O){return y(L,O,11,9,12,10)}function C(L,O){return y(L,O,11,11,12,12)}var w={0:{sizeFunc:t,glFormat:[35841]},1:{sizeFunc:t,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:o,glFormat:[33777,35917]},9:{sizeFunc:o,glFormat:[33778,35918]},11:{sizeFunc:o,glFormat:[33779,35919]},14:{sizeFunc:p,glFormat:[36494,36495]},15:{sizeFunc:p,glFormat:[36492,36493]},22:{sizeFunc:h,glFormat:[37492,37493]},23:{sizeFunc:o,glFormat:[37496,37497]},24:{sizeFunc:h,glFormat:[37494,37495]},25:{sizeFunc:h,glFormat:[37488]},26:{sizeFunc:o,glFormat:[37490]},27:{sizeFunc:o,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:s,glFormat:[37813,37845]},33:{sizeFunc:c,glFormat:[37814,37846]},34:{sizeFunc:d,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:A,glFormat:[37820,37852]},40:{sizeFunc:C,glFormat:[37821,37853]}},P=function(L){for(var O=new Uint32Array(L,0,13),I=O[0],D=I===55727696,B=D?O[2]:O[3],G=O[4],z=w[B].glFormat[G],W=w[B].sizeFunc,k=O[11],J=O[7],Q=O[6],Y=52+O[12],K=new Uint8Array(L,Y),U=new Array(k),V=0,j=J,$=Q,q=0;q>1),$=Math.max(1,$>>1),V+=it}return{mipmaps:U,width:J,height:Q,internalFormat:z,compressed:!0,generateMipmap:!1}};a.exports=P},75549:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(95540),p=function(h,o,l,n,u,f,s){var c=r(s,"frameWidth",null),d=r(s,"frameHeight",c);if(c===null)throw new Error("TextureManager.SpriteSheet: Invalid frameWidth given.");var v=h.source[o];h.add("__BASE",o,0,0,v.width,v.height);var m=r(s,"startFrame",0),S=r(s,"endFrame",-1),M=r(s,"margin",0),A=r(s,"spacing",0),C=Math.floor((u-M+A)/(c+A)),w=Math.floor((f-M+A)/(d+A)),P=C*w;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),W>f&&(D=W-f),G>=m&&G<=S&&(h.add(B,o,l+L,n+O,c-I,d-D),B++),L+=c+A,L+c>u&&(L=M,O+=d+A)}return h};a.exports=p},47534:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(95540),p=function(h,o,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 s=r(l,"margin",0),c=r(l,"spacing",0),d=o.cutX,v=o.cutY,m=o.cutWidth,S=o.cutHeight,M=o.realWidth,A=o.realHeight,C=Math.floor((M-s+c)/(n+c)),w=Math.floor((A-s+c)/(u+c)),P=o.x,L=n-P,O=n-(M-m-P),I=o.y,D=u-I,B=u-(A-S-I),G,z=s,W=s,k=0,J=0,Q=0;Q{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=0,t=function(p,h,o,l){var n=y-l.y-l.height;p.add(o,h,l.x,n,l.width,l.height)},r=function(p,h,o){var l=p.source[h];p.add("__BASE",h,0,0,l.width,l.height),y=l.height;for(var n=o.split(` +`),u=/^[ ]*(- )*(\w+)+[: ]+(.*)/,f="",s="",c={x:0,y:0,width:0,height:0},d=0;d{/** + * @author Ben Richards + * @copyright 2024 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(50030),p=function(f){for(var s=f.mipmaps,c=1;c{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={AtlasXML:t(89905),Canvas:t(72893),Image:t(4832),JSONArray:t(78566),JSONHash:t(39711),KTXParser:t(31403),PVRParser:t(82038),SpriteSheet:t(75549),SpriteSheetFromAtlas:t(47534),UnityYAML:t(86147)}},80341:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={CSV:0,TILED_JSON:1,ARRAY_2D:2,WELTMEISTER:3}},16536:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=new r({initialize:function(o,l,n,u,f,s,c){(n===void 0||n<=0)&&(n=32),(u===void 0||u<=0)&&(u=32),f===void 0&&(f=0),s===void 0&&(s=0),this.name=o,this.firstgid=l|0,this.imageWidth=n|0,this.imageHeight=u|0,this.imageMargin=f|0,this.imageSpacing=s|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=t(83419),p=new r({initialize:function(o){if(this.gids=[],o!==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=t(80341),p=t(87010),h=t(46177),o=t(49075),l=function(n,u,f,s,c,d,v,m){f===void 0&&(f=32),s===void 0&&(s=32),c===void 0&&(c=10),d===void 0&&(d=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,s,m)}else if(u!==void 0){var A=n.cache.tilemap.get(u);A?S=h(u,A.format,A.data,f,s,m):console.warn("No map data found for key "+u)}return S===null&&(S=new p({tileWidth:f,tileHeight:s,width:c,height:d})),new o(n,S)};a.exports=l},23029:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(31401),h=t(91907),o=t(62644),l=t(93232),n=new r({Mixins:[p.AlphaSingle,p.Flip,p.Visible],initialize:function(f,s,c,d,v,m,S,M){this.layer=f,this.index=s,this.x=c,this.y=d,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=o(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 s=f.tileToWorldXY(this.x,this.y,void 0,u);return s.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 s=f.tileToWorldXY(this.x,this.y,void 0,u);return s.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,s,c){return!(s<=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,s,c,d){if(f===void 0&&(f=u),s===void 0&&(s=u),c===void 0&&(c=u),d===void 0&&(d=!0),this.collideLeft=u,this.collideRight=f,this.collideUp=s,this.collideDown=c,this.faceLeft=u,this.faceRight=f,this.faceTop=s,this.faceBottom=c,d){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,s,c){return u!==void 0&&(this.width=u),f!==void 0&&(this.height=f),s!==void 0&&(this.baseWidth=s),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,s=this.layer.staggerIndex,c=this.layer.hexSideLength,d,v;f==="y"?(v=(this.baseHeight-c)/2+c,s==="odd"?this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2):this.pixelX=this.x*this.baseWidth-this.y%2*(this.baseWidth/2),this.pixelY=this.y*v):f==="x"&&(d=(this.baseWidth-c)/2+c,this.pixelX=this.x*d,s==="odd"?this.pixelY=this.y*this.baseHeight+this.x%2*(this.baseHeight/2):this.pixelY=this.y*this.baseHeight-this.x%2*(this.baseHeight/2))}return this.right=this.pixelX+this.baseWidth,this.bottom=this.pixelY+this.baseHeight,this},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||this.collisionCallback!==void 0}},collides:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}},hasInterestingFace:{get:function(){return this.faceTop||this.faceBottom||this.faceLeft||this.faceRight}},tileset:{get:function(){var 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}}});a.exports=n},49075:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(84101),p=t(83419),h=t(39506),o=t(80341),l=t(95540),n=t(14977),u=t(27462),f=t(91907),s=t(36305),c=t(19133),d=t(68287),v=t(23029),m=t(81086),S=t(20442),M=t(33629),A=new p({initialize:function(w,P){this.scene=w,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 L=this.orientation;this._convert={WorldToTileXY:m.GetWorldToTileXYFunction(L),WorldToTileX:m.GetWorldToTileXFunction(L),WorldToTileY:m.GetWorldToTileYFunction(L),TileToWorldXY:m.GetTileToWorldXYFunction(L),TileToWorldX:m.GetTileToWorldXFunction(L),TileToWorldY:m.GetTileToWorldYFunction(L),GetTileCorners:m.GetTileCornersFunction(L)}},setRenderOrder:function(C){var w=["right-down","left-down","right-up","left-up"];return typeof C=="number"&&(C=w[C]),w.indexOf(C)>-1&&(this.renderOrder=C),this},addTilesetImage:function(C,w,P,L,O,I,D,B){if(C===void 0)return null;w==null&&(w=C);var G=this.scene.sys.textures;if(!G.exists(w))return console.warn('Texture key "%s" not found',w),null;var z=G.get(w),W=this.getTilesetIndex(C);if(W===null&&this.format===o.TILED_JSON)return console.warn('Tilemap has no tileset "%s". Its tilesets are %o',C,this.tilesets),null;var k=this.tilesets[W];return k?(k.setTileSize(P,L),k.setSpacing(O,I),k.setImage(z),k):(P===void 0&&(P=this.tileWidth),L===void 0&&(L=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}),k=new M(C,D,P,L,O,I,void 0,void 0,B),k.setImage(z),this.tilesets.push(k),this.tiles=r(this),k)},copy:function(C,w,P,L,O,I,D,B){return B=this.getLayer(B),B!==null?(m.Copy(C,w,P,L,O,I,D,B),this):null},createBlankLayer:function(C,w,P,L,O,I,D,B){P===void 0&&(P=0),L===void 0&&(L=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}),W,k=0;k-1&&this.putTileAt(w,I.x,I.y,P,I.tilemapLayer)}return L},removeTileAt:function(C,w,P,L,O){return P===void 0&&(P=!0),L===void 0&&(L=!0),O=this.getLayer(O),O===null?null:m.RemoveTileAt(C,w,P,L,O)},removeTileAtWorldXY:function(C,w,P,L,O,I){return P===void 0&&(P=!0),L===void 0&&(L=!0),I=this.getLayer(I),I===null?null:m.RemoveTileAtWorldXY(C,w,P,L,O,I)},renderDebug:function(C,w,P){return P=this.getLayer(P),P===null?null:(this.orientation===f.ORTHOGONAL&&m.RenderDebug(C,w,P),this)},renderDebugFull:function(C,w){for(var P=this.layers,L=0;L{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(44603),p=t(31989);r.register("tilemap",function(h){var o=h!==void 0?h:{};return p(this.scene,o.key,o.tileWidth,o.tileHeight,o.width,o.height,o.data,o.insertNull)})},46029:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(39429),p=t(31989);r.register("tilemap",function(h,o,l,n,u,f,s){return h===null&&(h=void 0),o===null&&(o=void 0),l===null&&(l=void 0),n===null&&(n=void 0),u===null&&(u=void 0),p(this.scene,h,o,l,n,u,f,s)})},20442:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(78389),h=t(31401),o=t(95643),l=t(81086),n=t(19218),u=t(26099),f=new r({Extends:o,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,p,n],initialize:function(c,d,v,m,S,M){o.call(this,c,"TilemapLayer"),this.isTilemap=!0,this.tilemap=d,this.layerIndex=v,this.layer=d.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(d.tileWidth*this.layer.width,d.tileHeight*this.layer.height),this.initPipeline(),this.initPostPipeline(!1)},setTilesets:function(s){var c=[],d=[],v=this.tilemap;Array.isArray(s)||(s=[s]);for(var m=0;m=0&&s<4&&(this._renderOrder=s),this},calculateFacesAt:function(s,c){return l.CalculateFacesAt(s,c,this.layer),this},calculateFacesWithin:function(s,c,d,v){return l.CalculateFacesWithin(s,c,d,v,this.layer),this},createFromTiles:function(s,c,d,v,m){return l.CreateFromTiles(s,c,d,v,m,this.layer)},cull:function(s){return this.cullCallback(this.layer,s,this.culledTiles,this._renderOrder)},copy:function(s,c,d,v,m,S,M){return l.Copy(s,c,d,v,m,S,M,this.layer),this},fill:function(s,c,d,v,m,S){return l.Fill(s,c,d,v,m,S,this.layer),this},filterTiles:function(s,c,d,v,m,S,M){return l.FilterTiles(s,c,d,v,m,S,M,this.layer)},findByIndex:function(s,c,d){return l.FindByIndex(s,c,d,this.layer)},findTile:function(s,c,d,v,m,S,M){return l.FindTile(s,c,d,v,m,S,M,this.layer)},forEachTile:function(s,c,d,v,m,S,M){return l.ForEachTile(s,c,d,v,m,S,M,this.layer),this},setTint:function(s,c,d,v,m,S){s===void 0&&(s=16777215);var M=function(A){A.tint=s,A.tintFill=!1};return this.forEachTile(M,this,c,d,v,m,S)},setTintFill:function(s,c,d,v,m,S){s===void 0&&(s=16777215);var M=function(A){A.tint=s,A.tintFill=!0};return this.forEachTile(M,this,c,d,v,m,S)},getTileAt:function(s,c,d){return l.GetTileAt(s,c,d,this.layer)},getTileAtWorldXY:function(s,c,d,v){return l.GetTileAtWorldXY(s,c,d,v,this.layer)},getIsoTileAtWorldXY:function(s,c,d,v,m){d===void 0&&(d=!0);var S=this.tempVec;return l.IsometricWorldToTileXY(s,c,!0,S,m,this.layer,d),this.getTileAt(S.x,S.y,v)},getTilesWithin:function(s,c,d,v,m){return l.GetTilesWithin(s,c,d,v,m,this.layer)},getTilesWithinShape:function(s,c,d){return l.GetTilesWithinShape(s,c,d,this.layer)},getTilesWithinWorldXY:function(s,c,d,v,m,S){return l.GetTilesWithinWorldXY(s,c,d,v,m,S,this.layer)},hasTileAt:function(s,c){return l.HasTileAt(s,c,this.layer)},hasTileAtWorldXY:function(s,c,d){return l.HasTileAtWorldXY(s,c,d,this.layer)},putTileAt:function(s,c,d,v){return l.PutTileAt(s,c,d,v,this.layer)},putTileAtWorldXY:function(s,c,d,v,m){return l.PutTileAtWorldXY(s,c,d,v,m,this.layer)},putTilesAt:function(s,c,d,v){return l.PutTilesAt(s,c,d,v,this.layer),this},randomize:function(s,c,d,v,m){return l.Randomize(s,c,d,v,m,this.layer),this},removeTileAt:function(s,c,d,v){return l.RemoveTileAt(s,c,d,v,this.layer)},removeTileAtWorldXY:function(s,c,d,v,m){return l.RemoveTileAtWorldXY(s,c,d,v,m,this.layer)},renderDebug:function(s,c){return l.RenderDebug(s,c,this.layer),this},replaceByIndex:function(s,c,d,v,m,S){return l.ReplaceByIndex(s,c,d,v,m,S,this.layer),this},setSkipCull:function(s){return s===void 0&&(s=!0),this.skipCull=s,this},setCullPadding:function(s,c){return s===void 0&&(s=1),c===void 0&&(c=1),this.cullPaddingX=s,this.cullPaddingY=c,this},setCollision:function(s,c,d,v){return l.SetCollision(s,c,d,this.layer,v),this},setCollisionBetween:function(s,c,d,v){return l.SetCollisionBetween(s,c,d,v,this.layer),this},setCollisionByProperty:function(s,c,d){return l.SetCollisionByProperty(s,c,d,this.layer),this},setCollisionByExclusion:function(s,c,d){return l.SetCollisionByExclusion(s,c,d,this.layer),this},setCollisionFromCollisionGroup:function(s,c){return l.SetCollisionFromCollisionGroup(s,c,this.layer),this},setTileIndexCallback:function(s,c,d){return l.SetTileIndexCallback(s,c,d,this.layer),this},setTileLocationCallback:function(s,c,d,v,m,S){return l.SetTileLocationCallback(s,c,d,v,m,S,this.layer),this},shuffle:function(s,c,d,v){return l.Shuffle(s,c,d,v,this.layer),this},swapByIndex:function(s,c,d,v,m,S){return l.SwapByIndex(s,c,d,v,m,S,this.layer),this},tileToWorldX:function(s,c){return this.tilemap.tileToWorldX(s,c,this)},tileToWorldY:function(s,c){return this.tilemap.tileToWorldY(s,c,this)},tileToWorldXY:function(s,c,d,v){return this.tilemap.tileToWorldXY(s,c,d,v,this)},getTileCorners:function(s,c,d){return this.tilemap.getTileCorners(s,c,d,this)},weightedRandomize:function(s,c,d,v,m){return l.WeightedRandomize(c,d,v,m,s,this.layer),this},worldToTileX:function(s,c,d){return this.tilemap.worldToTileX(s,c,d,this)},worldToTileY:function(s,c,d){return this.tilemap.worldToTileY(s,c,d,this)},worldToTileXY:function(s,c,d,v,m){return this.tilemap.worldToTileXY(s,c,d,v,m,this)},destroy:function(s){s===void 0&&(s=!0),this.tilemap&&(this.layer.tilemapLayer===this&&(this.layer.tilemapLayer=void 0),s&&this.tilemap.removeLayer(this),this.tilemap=void 0,this.layer=void 0,this.culledTiles.length=0,this.cullCallback=null,this.gidMap=[],this.tileset=[],o.prototype.destroy.call(this))}});a.exports=f},16153:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(61340),p=new r,h=new r,o=new r,l=function(n,u,f,s){var c=u.cull(f),d=c.length,v=f.alpha*u.alpha;if(!(d===0||v<=0)){var m=p,S=h,M=o;S.applyITRS(u.x,u.y,u.rotation,u.scaleX,u.scaleY),m.copyFrom(f.matrix);var A=n.currentContext,C=u.gidMap;A.save(),s?(m.multiplyWithOffset(s,-f.scrollX*u.scrollFactorX,-f.scrollY*u.scrollFactorY),S.e=u.x,S.f=u.y,m.multiply(S,M),M.copyToContext(A)):(S.e-=f.scrollX*u.scrollFactorX,S.f-=f.scrollY*u.scrollFactorY,S.copyToContext(A)),(!n.antialias||u.scaleX>1||u.scaleY>1)&&(A.imageSmoothingEnabled=!1);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=t(29747),p=r,h=r;p=t(99558),h=t(16153),a.exports={renderWebGL:p,renderCanvas:h}},99558:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(70554),p=function(h,o,l){var n=o.cull(l),u=n.length,f=l.alpha*o.alpha;if(!(u===0||f<=0)){var s=o.gidMap,c=h.pipelines.set(o.pipeline,o),d=r.getTintAppendFloatAlpha,v=o.scrollFactorX,m=o.scrollFactorY,S=o.x,M=o.y,A=o.scaleX,C=o.scaleY;h.pipelines.preBatch(o);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=t(83419),p=t(26099),h=new r({initialize:function(l,n,u,f,s,c,d,v,m){(u===void 0||u<=0)&&(u=32),(f===void 0||f<=0)&&(f=32),s===void 0&&(s=0),c===void 0&&(c=0),d===void 0&&(d={}),v===void 0&&(v={}),this.name=l,this.firstgid=n,this.tileWidth=u,this.tileHeight=f,this.tileMargin=s,this.tileSpacing=c,this.tileProperties=d,this.tileData=v,this.tileOffset=new p,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(o){return this.containsTileIndex(o)?this.tileProperties[o-this.firstgid]:null},getTileData:function(o){return this.containsTileIndex(o)?this.tileData[o-this.firstgid]:null},getTileCollisionGroup:function(o){var l=this.getTileData(o);return l&&l.objectgroup?l.objectgroup:null},containsTileIndex:function(o){return o>=this.firstgid&&on.width||l.height>n.height?this.updateTileData(l.width,l.height):this.updateTileData(n.width,n.height,n.x,n.y),this},setTileSize:function(o,l){return o!==void 0&&(this.tileWidth=o),l!==void 0&&(this.tileHeight=l),this.image&&this.updateTileData(this.image.source[0].width,this.image.source[0].height),this},setSpacing:function(o,l){return o!==void 0&&(this.tileMargin=o),l!==void 0&&(this.tileSpacing=l),this.image&&this.updateTileData(this.image.source[0].width,this.image.source[0].height),this},updateTileData:function(o,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),s=(o-this.tileMargin*2+this.tileSpacing)/(this.tileWidth+this.tileSpacing);(f%1!==0||s%1!==0)&&console.warn("Image tile area not tile size multiple in: "+this.name),f=Math.floor(f),s=Math.floor(s),this.rows=f,this.columns=s,this.total=f*s,this.texCoordinates.length=0;for(var c=this.tileMargin+n,d=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=t(7423),p=function(h,o,l){var n=r(h,o,!0,l),u=r(h,o-1,!0,l),f=r(h,o+1,!0,l),s=r(h-1,o,!0,l),c=r(h+1,o,!0,l),d=n&&n.collides;return d&&(n.faceTop=!0,n.faceBottom=!0,n.faceLeft=!0,n.faceRight=!0),u&&u.collides&&(d&&(n.faceTop=!1),u.faceBottom=!d),f&&f.collides&&(d&&(n.faceBottom=!1),f.faceTop=!d),s&&s.collides&&(d&&(n.faceLeft=!1),s.faceRight=!d),c&&c.collides&&(d&&(n.faceRight=!1),c.faceLeft=!d),n&&!n.collides&&n.resetFaces(),n};a.exports=p},42573:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(7423),p=t(7386),h=function(o,l,n,u,f){for(var s=null,c=null,d=null,v=null,m=p(o,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=t(26099),p=new r,h=function(o,l,n,u){var f=n.tilemapLayer,s=f.cullPaddingX,c=f.cullPaddingY,d=f.tilemap.tileToWorldXY(o,l,p,u,f);return d.x>u.worldView.x+f.scaleX*n.tileWidth*(-s-.5)&&d.xu.worldView.y+f.scaleY*n.tileHeight*(-c-1)&&d.y{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(42573),p=t(7386),h=t(62991),o=t(23029),l=function(n,u,f,s,c,d,v,m){v===void 0&&(v=!0);var S=p(n,u,f,s,null,m),M=[];S.forEach(function(I){var D=new o(I.layer,I.index,I.x,I.y,I.width,I.height,I.baseWidth,I.baseHeight);D.copy(I),M.push(D)});for(var A=c-n,C=d-u,w=0;w{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(62644),p=t(7386),h=t(27987),o=function(l,n,u,f,s,c){u||(u={}),Array.isArray(l)||(l=[l]);var d=c.tilemapLayer;f||(f=d.scene),s||(s=f.cameras.main);var v=c.width,m=c.height,S=p(0,0,v,m,null,c),M=[],A,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=t(87841),p=t(63448),h=t(56583),o=new r,l=function(n,u){var f=n.tilemapLayer.tilemap,s=n.tilemapLayer,c=Math.floor(f.tileWidth*s.scaleX),d=Math.floor(f.tileHeight*s.scaleY),v=h(u.worldView.x-s.x,c,0,!0)-s.cullPaddingX,m=p(u.worldView.right-s.x,c,0,!0)+s.cullPaddingX,S=h(u.worldView.y-s.y,d,0,!0)-s.cullPaddingY,M=p(u.worldView.bottom-s.y,d,0,!0)+s.cullPaddingY;return o.setTo(v,S,m-v,M-S)};a.exports=l},30003:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(19545),p=t(32483),h=function(o,l,n,u){n===void 0&&(n=[]),u===void 0&&(u=0),n.length=0;var f=o.tilemapLayer,s=r(o,l);return(f.skipCull||f.scrollFactorX!==1||f.scrollFactorY!==1)&&(s.left=0,s.right=o.width,s.top=0,s.bottom=o.height),p(o,s,u,n),n};a.exports=h},35137:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(7386),p=t(42573),h=t(20576),o=function(l,n,u,f,s,c,d){for(var v=d.collideIndexes.indexOf(l)!==-1,m=r(n,u,f,s,null,d),S=0;S{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(7386),p=function(h,o,l,n,u,f,s,c){var d=r(l,n,u,f,s,c);return d.filter(h,o)};a.exports=p},52692:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p,h){r===void 0&&(r=0),p===void 0&&(p=!1);var o=0,l,n,u;if(p){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===t){if(o===r)return u;o+=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=t(7386),p=function(h,o,l,n,u,f,s,c){var d=r(l,n,u,f,s,c);return d.find(h,o)||null};a.exports=p},97560:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(7386),p=function(h,o,l,n,u,f,s,c){var d=r(l,n,u,f,s,c);d.forEach(h,o)};a.exports=p},43305:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(91907),p=t(30003),h=t(9474),o=t(14018),l=t(29747),n=t(54503),u=function(f){return f===r.ORTHOGONAL?p:f===r.HEXAGONAL?h:f===r.STAGGERED?n:f===r.ISOMETRIC?o:l};a.exports=u},7423:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(62991),p=function(h,o,l,n){if(l===void 0&&(l=!1),r(h,o,n)){var u=n.data[o][h]||null;return u?u.index===-1?l?u:null:u:null}else return null};a.exports=p},60540:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(7423),p=t(26099),h=new p,o=function(l,n,u,f,s){return s.tilemapLayer.worldToTileXY(l,n,!0,h,f),r(h.x,h.y,u,s)};a.exports=o},55826:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(26099),p=function(h,o,l,n){var u=n.baseTileWidth,f=n.baseTileHeight,s=n.tilemapLayer,c=0,d=0;s&&(l||(l=s.scene.cameras.main),c=s.x+l.scrollX*(1-s.scrollFactorX),d=s.y+l.scrollY*(1-s.scrollFactorY),u*=s.scaleX,f*=s.scaleY);var v=c+h*u,m=d+o*f;return[new r(v,m),new r(v+u,m),new r(v+u,m+f),new r(v,m+f)]};a.exports=p},11758:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(91907),p=t(27229),h=t(29747),o=t(55826),l=function(n){return n===r.ORTHOGONAL?o:n===r.ISOMETRIC?h:n===r.HEXAGONAL?p:(n===r.STAGGERED,h)};a.exports=l},39167:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(91907),p=t(29747),h=t(97281),o=function(l){return l===r.ORTHOGONAL?h:p};a.exports=o},62e3:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(91907),p=t(19951),h=t(14127),o=t(29747),l=t(97202),n=t(70326),u=function(f){return f===r.ORTHOGONAL?n:f===r.ISOMETRIC?h:f===r.HEXAGONAL?p:f===r.STAGGERED?l:o};a.exports=u},5984:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(91907),p=t(29747),h=t(28054),o=t(29650),l=function(n){return n===r.ORTHOGONAL?o:n===r.STAGGERED?h:p};a.exports=l},7386:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(95540),p=function(h,o,l,n,u,f){h===void 0&&(h=0),o===void 0&&(o=0),l===void 0&&(l=f.width),n===void 0&&(n=f.height),u||(u={});var s=r(u,"isNotEmpty",!1),c=r(u,"isColliding",!1),d=r(u,"hasInterestingFace",!1);h<0&&(l+=h,h=0),o<0&&(n+=o,o=0),h+l>f.width&&(l=Math.max(f.width-h,0)),o+n>f.height&&(n=Math.max(f.height-o,0));for(var v=[],m=o;m{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(55738),p=t(7386),h=t(91865),o=t(29747),l=t(26099),n=function(d,v){return h.RectangleToTriangle(v,d)},u=new l,f=new l,s=new l,c=function(d,v,m,S){if(d===void 0)return[];var M=o;d instanceof r.Circle?M=h.CircleToRectangle:d instanceof r.Rectangle?M=h.RectangleToRectangle:d instanceof r.Triangle?M=n:d instanceof r.Line&&(M=h.LineToRectangle),S.tilemapLayer.worldToTileXY(d.left,d.top,!0,f,m);var A=f.x,C=f.y;S.tilemapLayer.worldToTileXY(d.right,d.bottom,!1,s,m);var w=Math.ceil(s.x),P=Math.ceil(s.y),L=Math.max(w-A,1),O=Math.max(P-C,1),I=p(A,C,L,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),W=0;W{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(7386),p=t(26099),h=new p,o=new p,l=function(n,u,f,s,c,d,v){var m=v.tilemapLayer.tilemap._convert.WorldToTileXY;m(n,u,!0,h,d,v);var S=h.x,M=h.y;m(n+f,u+s,!1,o,d,v);var A=Math.ceil(o.x),C=Math.ceil(o.y);return r(S,M,A-S,C-M,c,v)};a.exports=l},96113:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(91907),p=t(20242),h=t(10095),o=function(l){return l===r.ORTHOGONAL?h:p};a.exports=o},16926:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(91907),p=t(86625),h=t(96897),o=t(29747),l=t(15108),n=t(85896),u=function(f){return f===r.ORTHOGONAL?n:f===r.ISOMETRIC?h:f===r.HEXAGONAL?p:f===r.STAGGERED?l:o};a.exports=u},55762:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(91907),p=t(20242),h=t(51900),o=t(63288),l=function(n){return n===r.ORTHOGONAL?o:n===r.STAGGERED?h:p};a.exports=l},45091:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(62991),p=function(h,o,l){if(r(h,o,l)){var n=l.data[o][h];return n!==null&&n.index>-1}else return!1};a.exports=p},24152:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(45091),p=t(26099),h=new p,o=function(l,n,u,f){f.tilemapLayer.worldToTileXY(l,n,!0,h,u);var s=h.x,c=h.y;return r(s,c,f)};a.exports=o},90454:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(63448),p=t(56583),h=function(o,l){var n=o.tilemapLayer.tilemap,u=o.tilemapLayer,f=Math.floor(n.tileWidth*u.scaleX),s=Math.floor(n.tileHeight*u.scaleY),c=o.hexSideLength,d,v,m,S;if(o.staggerAxis==="y"){var M=(s-c)/2+c;d=p(l.worldView.x-u.x,f,0,!0)-u.cullPaddingX,v=r(l.worldView.right-u.x,f,0,!0)+u.cullPaddingX,m=p(l.worldView.y-u.y,M,0,!0)-u.cullPaddingY,S=r(l.worldView.bottom-u.y,M,0,!0)+u.cullPaddingY}else{var A=(f-c)/2+c;d=p(l.worldView.x-u.x,A,0,!0)-u.cullPaddingX,v=r(l.worldView.right-u.x,A,0,!0)+u.cullPaddingX,m=p(l.worldView.y-u.y,s,0,!0)-u.cullPaddingY,S=r(l.worldView.bottom-u.y,s,0,!0)+u.cullPaddingY}return{left:d,right:v,top:m,bottom:S}};a.exports=h},9474:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(90454),p=t(32483),h=function(o,l,n,u){n===void 0&&(n=[]),u===void 0&&(u=0),n.length=0;var f=o.tilemapLayer,s=r(o,l);return f.skipCull&&f.scrollFactorX===1&&f.scrollFactorY===1&&(s.left=0,s.right=o.width,s.top=0,s.bottom=o.height),p(o,s,u,n),n};a.exports=h},27229:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(19951),p=t(26099),h=new p,o=function(l,n,u,f){var s=f.baseTileWidth,c=f.baseTileHeight,d=f.tilemapLayer;d&&(s*=d.scaleX,c*=d.scaleY);var v=r(l,n,h,u,f),m=[],S=.5773502691896257,M,A;f.staggerAxis==="y"?(M=S*s,A=c/2):(M=s/2,A=S*c);for(var C=0;C<6;C++){var w=2*Math.PI*(.5-C)/6;m.push(new p(v.x+M*Math.cos(w),v.y+A*Math.sin(w)))}return m};a.exports=o},19951:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(26099),p=function(h,o,l,n,u){l||(l=new r);var f=u.baseTileWidth,s=u.baseTileHeight,c=u.tilemapLayer,d=0,v=0;c&&(n||(n=c.scene.cameras.main),d=c.x+n.scrollX*(1-c.scrollFactorX),v=c.y+n.scrollY*(1-c.scrollFactorY),f*=c.scaleX,s*=c.scaleY);var m=f/2,S=s/2,M,A;return u.staggerAxis==="y"?(M=d+f*h+f,A=v+1.5*o*S+S,o%2===0&&(this.staggerIndex==="odd"?M-=m:M+=m)):this.staggerAxis==="x"&&this.staggerIndex==="odd"&&(M=d+1.5*h*m+m,A=v+s*h+s,h%2===0&&(this.staggerIndex==="odd"?A-=S:A+=S)),l.set(M,A)};a.exports=p},86625:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(26099),p=function(h,o,l,n,u,f){n||(n=new r);var s=f.baseTileWidth,c=f.baseTileHeight,d=f.tilemapLayer;d&&(u||(u=d.scene.cameras.main),h=h-(d.x+u.scrollX*(1-d.scrollFactorX)),o=o-(d.y+u.scrollY*(1-d.scrollFactorY)),s*=d.scaleX,c*=d.scaleY);var v=.5773502691896257,m=-.3333333333333333,S=0,M=.6666666666666666,A=s/2,C=c/2,w,P,L,O,I;f.staggerAxis==="y"?(w=(h-A)/(v*s),P=(o-C)/C,L=v*w+m*P,O=S*w+M*P):(w=(h-A)/A,P=(o-C)/(v*c),L=m*w+v*P,O=M*w+S*P),I=-L-O;var D=Math.round(L),B=Math.round(O),G=Math.round(I),z=Math.abs(D-L),W=Math.abs(B-O),k=Math.abs(G-I);z>W&&z>k?D=-B-G:W>k&&(B=-D-G);var J,Q=B;return f.staggerIndex==="odd"?J=Q%2===0?B/2+D:B/2+D-.5:J=Q%2===0?B/2+D:B/2+D+.5,n.set(J,Q)};a.exports=p},62991:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){return t>=0&&t=0&&r{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(33528),p=function(h,o,l,n){l===void 0&&(l=[]),n===void 0&&(n=0),l.length=0;var u=h.tilemapLayer,f=h.data,s=h.width,c=h.height,d=u.skipCull,v=0,m=s,S=0,M=c,A,C,w;if(n===0)for(C=S;C=v;A--)w=f[C][A],!(!w||w.index===-1||!w.visible||w.alpha===0)&&(!d&&!r(A,C,h,o)||l.push(w));else if(n===2)for(C=M;C>=S;C--)for(A=v;A=S;C--)for(A=m;A>=v;A--)w=f[C][A],!(!w||w.index===-1||!w.visible||w.alpha===0)&&(!d&&!r(A,C,h,o)||l.push(w));return u.tilesDrawn=l.length,u.tilesTotal=s*c,l};a.exports=p},14127:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(26099),p=function(h,o,l,n,u){l||(l=new r);var f=u.baseTileWidth,s=u.baseTileHeight,c=u.tilemapLayer,d=0,v=0;c&&(n||(n=c.scene.cameras.main),d=c.x+n.scrollX*(1-c.scrollFactorX),f*=c.scaleX,v=c.y+n.scrollY*(1-c.scrollFactorY),s*=c.scaleY);var m=d+(h-o)*(f/2),S=v+(h+o)*(s/2);return l.set(m,S)};a.exports=p},96897:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(26099),p=function(h,o,l,n,u,f,s){n||(n=new r);var c=f.baseTileWidth,d=f.baseTileHeight,v=f.tilemapLayer;v&&(u||(u=v.scene.cameras.main),o=o-(v.y+u.scrollY*(1-v.scrollFactorY)),d*=v.scaleY,h=h-(v.x+u.scrollX*(1-v.scrollFactorX)),c*=v.scaleX);var m=c/2,S=d/2;h=h-m,s||(o=o-d);var M=.5*(h/m+o/S),A=.5*(-h/m+o/S);return l&&(M=Math.floor(M),A=Math.floor(A)),n.set(M,A)};a.exports=p},71558:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(23029),p=t(62991),h=t(72023),o=t(20576),l=function(n,u,f,s,c){if(s===void 0&&(s=!0),!p(u,f,c))return null;var d,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)):(d=n,c.data[f][u]===null?c.data[f][u]=new r(c,d,u,f,c.tileWidth,c.tileHeight):c.data[f][u].index=d);var S=c.data[f][u],M=c.collideIndexes.indexOf(S.index)!==-1;if(d=n instanceof r?n.index:n,d===-1)S.width=c.tileWidth,S.height=c.tileHeight;else{var A=c.tilemapLayer.tilemap,C=A.tiles,w=C[d][2],P=A.tilesets[w];S.width=P.tileWidth,S.height=P.tileHeight}return o(S,M),s&&m!==S.collides&&h(u,f,c),S};a.exports=l},26303:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(71558),p=t(26099),h=new p,o=function(l,n,u,f,s,c){return c.tilemapLayer.worldToTileXY(n,u,!0,h,s,c),r(l,h.x,h.y,f,c)};a.exports=o},14051:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(42573),p=t(71558),h=function(o,l,n,u,f){if(u===void 0&&(u=!0),!Array.isArray(o))return null;Array.isArray(o[0])||(o=[o]);for(var s=o.length,c=o[0].length,d=0;d{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(7386),p=t(26546),h=function(o,l,n,u,f,s){var c,d=r(o,l,n,u,{},s);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=t(23029),p=t(62991),h=t(72023),o=function(l,n,u,f,s){if(u===void 0&&(u=!0),f===void 0&&(f=!0),!p(l,n,s))return null;var c=s.data[n][l];if(c)s.data[n][l]=u?null:new r(s,-1,l,n,s.tileWidth,s.tileHeight);else return null;return f&&c&&c.collides&&h(l,n,s),c};a.exports=o},94178:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(63557),p=t(26099),h=new p,o=function(l,n,u,f,s,c){return c.tilemapLayer.worldToTileXY(l,n,!0,h,s,c),r(h.x,h.y,u,f,c)};a.exports=o},15533:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(7386),p=t(3956),h=new p(105,210,231,150),o=new p(243,134,48,200),l=new p(40,39,37,150),n=function(u,f,s){f===void 0&&(f={});var c=f.tileColor!==void 0?f.tileColor:h,d=f.collidingTileColor!==void 0?f.collidingTileColor:o,v=f.faceColor!==void 0?f.faceColor:l,m=r(0,0,s.width,s.height,null,s);u.translateCanvas(s.tilemapLayer.x,s.tilemapLayer.y),u.scaleCanvas(s.tilemapLayer.scaleX,s.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} + */var r=t(7386),p=function(h,o,l,n,u,f,s){for(var c=r(l,n,u,f,null,s),d=0;d{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p,h){var o=t.data,l=t.width,n=t.height,u=t.tilemapLayer,f=Math.max(0,r.left),s=Math.min(l,r.right),c=Math.max(0,r.top),d=Math.min(n,r.bottom),v,m,S;if(p===0)for(m=c;m=f;v--)S=o[m][v],!(!S||S.index===-1||!S.visible||S.alpha===0)&&h.push(S);else if(p===2)for(m=d;m>=c;m--)for(v=f;o[m]&&v=c;m--)for(v=s;o[m]&&v>=f;v--)S=o[m][v],!(!S||S.index===-1||!S.visible||S.alpha===0)&&h.push(S);return u.tilesDrawn=h.length,u.tilesTotal=l*n,h};a.exports=y},57068:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(20576),p=t(42573),h=t(9589),o=function(l,n,u,f,s){n===void 0&&(n=!0),u===void 0&&(u=!0),s===void 0&&(s=!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=t(20576),p=t(42573),h=t(9589),o=function(l,n,u,f,s,c){if(u===void 0&&(u=!0),f===void 0&&(f=!0),c===void 0&&(c=!0),!(l>n)){for(var d=l;d<=n;d++)h(d,u,s);if(c)for(var v=0;v=l&&S.index<=n&&r(S,u)}f&&p(0,0,s.width,s.height,s)}};a.exports=o},75661:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(20576),p=t(42573),h=t(9589),o=function(l,n,u,f){n===void 0&&(n=!0),u===void 0&&(u=!0),Array.isArray(l)||(l=[l]);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=t(20576),p=t(42573),h=t(97022),o=function(l,n,u,f){n===void 0&&(n=!0),u===void 0&&(u=!0);for(var s=0;s{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(20576),p=t(42573),h=function(o,l,n){o===void 0&&(o=!0),l===void 0&&(l=!0);for(var u=0;u0&&r(s,o)}}l&&p(0,0,n.width,n.height,n)};a.exports=h},9589:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){var h=p.collideIndexes.indexOf(t);r&&h===-1?p.collideIndexes.push(t):!r&&h!==-1&&p.collideIndexes.splice(h,1)};a.exports=y},20576:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){r?t.setCollision(!0,!0,!0,!0,!1):t.resetCollision(!1)};a.exports=y},79583:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p,h){if(typeof t=="number")h.callbacks[t]=r!==null?{callback:r,callbackContext:p}:void 0;else for(var o=0,l=t.length;o{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(7386),p=function(h,o,l,n,u,f,s){for(var c=r(h,o,l,n,null,s),d=0;d{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(7386),p=t(33680),h=function(o,l,n,u,f){var s=r(o,l,n,u,null,f),c=s.map(function(v){return v.index});p(c);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=t(63448),p=t(56583),h=function(o,l){var n=o.tilemapLayer.tilemap,u=o.tilemapLayer,f=Math.floor(n.tileWidth*u.scaleX),s=Math.floor(n.tileHeight*u.scaleY),c=p(l.worldView.x-u.x,f,0,!0)-u.cullPaddingX,d=r(l.worldView.right-u.x,f,0,!0)+u.cullPaddingX,v=p(l.worldView.y-u.y,s/2,0,!0)-u.cullPaddingY,m=r(l.worldView.bottom-u.y,s/2,0,!0)+u.cullPaddingY;return{left:c,right:d,top:v,bottom:m}};a.exports=h},54503:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(61325),p=t(32483),h=function(o,l,n,u){n===void 0&&(n=[]),u===void 0&&(u=0),n.length=0;var f=o.tilemapLayer,s=r(o,l);return f.skipCull&&f.scrollFactorX===1&&f.scrollFactorY===1&&(s.left=0,s.right=o.width,s.top=0,s.bottom=o.height),p(o,s,u,n),n};a.exports=h},97202:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(26099),p=function(h,o,l,n,u){l||(l=new r);var f=u.baseTileWidth,s=u.baseTileHeight,c=u.tilemapLayer,d=0,v=0;c&&(n||(n=c.scene.cameras.main),d=c.x+n.scrollX*(1-c.scrollFactorX),f*=c.scaleX,v=c.y+n.scrollY*(1-c.scrollFactorY),s*=c.scaleY);var m=d+h*f+o%2*(f/2),S=v+o*(s/2);return l.set(m,S)};a.exports=p},28054:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){var h=p.baseTileHeight,o=p.tilemapLayer,l=0;return o&&(r===void 0&&(r=o.scene.cameras.main),l=o.y+r.scrollY*(1-o.scrollFactorY),h*=o.scaleY),l+t*(h/2)+h};a.exports=y},15108:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(26099),p=function(h,o,l,n,u,f){n||(n=new r);var s=f.baseTileWidth,c=f.baseTileHeight,d=f.tilemapLayer;d&&(u||(u=d.scene.cameras.main),o=o-(d.y+u.scrollY*(1-d.scrollFactorY)),c*=d.scaleY,h=h-(d.x+u.scrollX*(1-d.scrollFactorX)),s*=d.scaleX);var v=l?Math.floor(o/(c/2)):o/(c/2),m=l?Math.floor((h+v%2*.5*s)/s):(h+v%2*.5*s)/s;return n.set(m,v)};a.exports=p},51900:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p,h){var o=h.baseTileHeight,l=h.tilemapLayer;return l&&(p||(p=l.scene.cameras.main),t=t-(l.y+p.scrollY*(1-l.scrollFactorY)),o*=l.scaleY),r?Math.floor(t/(o/2)):t/(o/2)};a.exports=y},86560:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(7386),p=function(h,o,l,n,u,f,s){for(var c=r(l,n,u,f,null,s),d=0;d{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){var h=p.baseTileWidth,o=p.tilemapLayer,l=0;return o&&(r||(r=o.scene.cameras.main),l=o.x+r.scrollX*(1-o.scrollFactorX),h*=o.scaleX),l+t*h};a.exports=y},70326:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(97281),p=t(29650),h=t(26099),o=function(l,n,u,f,s){return u||(u=new h(0,0)),u.x=r(l,f,s),u.y=p(n,f,s),u};a.exports=o},29650:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){var h=p.baseTileHeight,o=p.tilemapLayer,l=0;return o&&(r||(r=o.scene.cameras.main),l=o.y+r.scrollY*(1-o.scrollFactorY),h*=o.scaleY),l+t*h};a.exports=y},77366:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(7386),p=t(75508),h=function(o,l,n,u,f,s){if(f){var c,d=r(o,l,n,u,null,s),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=t(85896),p=t(26099),h=new p,o=function(l,n,u,f){return r(l,0,n,h,u,f),h.x};a.exports=o},85896:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(26099),p=function(h,o,l,n,u,f){l===void 0&&(l=!0),n||(n=new r);var s=f.baseTileWidth,c=f.baseTileHeight,d=f.tilemapLayer;d&&(u||(u=d.scene.cameras.main),h=h-(d.x+u.scrollX*(1-d.scrollFactorX)),o=o-(d.y+u.scrollY*(1-d.scrollFactorY)),s*=d.scaleX,c*=d.scaleY);var v=h/s,m=o/c;return l&&(v=Math.floor(v),m=Math.floor(m)),n.set(v,m)};a.exports=p},63288:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(85896),p=t(26099),h=new p,o=function(l,n,u,f){return r(0,l,n,h,u,f),h.y};a.exports=o},81086:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={CalculateFacesAt:t(72023),CalculateFacesWithin:t(42573),CheckIsoBounds:t(33528),Copy:t(1785),CreateFromTiles:t(78419),CullBounds:t(19545),CullTiles:t(30003),Fill:t(35137),FilterTiles:t(40253),FindByIndex:t(52692),FindTile:t(66151),ForEachTile:t(97560),GetCullTilesFunction:t(43305),GetTileAt:t(7423),GetTileAtWorldXY:t(60540),GetTileCorners:t(55826),GetTileCornersFunction:t(11758),GetTilesWithin:t(7386),GetTilesWithinShape:t(91141),GetTilesWithinWorldXY:t(96523),GetTileToWorldXFunction:t(39167),GetTileToWorldXYFunction:t(62e3),GetTileToWorldYFunction:t(5984),GetWorldToTileXFunction:t(96113),GetWorldToTileXYFunction:t(16926),GetWorldToTileYFunction:t(55762),HasTileAt:t(45091),HasTileAtWorldXY:t(24152),HexagonalCullBounds:t(90454),HexagonalCullTiles:t(9474),HexagonalGetTileCorners:t(27229),HexagonalTileToWorldXY:t(19951),HexagonalWorldToTileXY:t(86625),IsInLayerBounds:t(62991),IsometricCullTiles:t(14018),IsometricTileToWorldXY:t(14127),IsometricWorldToTileXY:t(96897),PutTileAt:t(71558),PutTileAtWorldXY:t(26303),PutTilesAt:t(14051),Randomize:t(77389),RemoveTileAt:t(63557),RemoveTileAtWorldXY:t(94178),RenderDebug:t(15533),ReplaceByIndex:t(27987),RunCull:t(32483),SetCollision:t(57068),SetCollisionBetween:t(37266),SetCollisionByExclusion:t(75661),SetCollisionByProperty:t(64740),SetCollisionFromCollisionGroup:t(63307),SetLayerCollisionIndex:t(9589),SetTileCollision:t(20576),SetTileIndexCallback:t(79583),SetTileLocationCallback:t(93254),Shuffle:t(32903),StaggeredCullBounds:t(61325),StaggeredCullTiles:t(54503),StaggeredTileToWorldXY:t(97202),StaggeredTileToWorldY:t(28054),StaggeredWorldToTileXY:t(15108),StaggeredWorldToTileY:t(51900),SwapByIndex:t(86560),TileToWorldX:t(97281),TileToWorldXY:t(70326),TileToWorldY:t(29650),WeightedRandomize:t(77366),WorldToTileX:t(10095),WorldToTileXY:t(85896),WorldToTileY:t(63288)}},91907:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={ORTHOGONAL:0,ISOMETRIC:1,STAGGERED:2,HEXAGONAL:3}},21829:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r={ORIENTATION:t(91907)};a.exports=r},62501:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(79291),p=t(21829),h={Components:t(81086),Parsers:t(57442),Formats:t(80341),ImageCollection:t(16536),ParseToTilemap:t(31989),Tile:t(23029),Tilemap:t(49075),TilemapCreator:t(45939),TilemapFactory:t(46029),Tileset:t(33629),TilemapLayer:t(20442),Orientation:t(91907),LayerData:t(14977),MapData:t(87010),ObjectLayer:t(48700)};h=r(!1,h,p.ORIENTATION),a.exports=h},14977:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(91907),h=t(95540),o=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",p.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")}});a.exports=o},87010:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(91907),h=t(95540),o=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",p.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")}});a.exports=o},48700:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(95540),h=new r({initialize:function(l){l===void 0&&(l={}),this.name=p(l,"name","object layer"),this.id=p(l,"id",0),this.opacity=p(l,"opacity",1),this.properties=p(l,"properties",{}),this.propertyTypes=p(l,"propertytypes",{}),this.type=p(l,"type","objectgroup"),this.visible=p(l,"visible",!0),this.objects=p(l,"objects",[]),Array.isArray(this.objects)||(this.objects=[])}});a.exports=h},6641:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(91907),p=function(h){return h=h.toLowerCase(),h==="isometric"?r.ISOMETRIC:h==="staggered"?r.STAGGERED:h==="hexagonal"?r.HEXAGONAL:r.ORTHOGONAL};a.exports=p},46177:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(80341),p=t(2342),h=t(82593),o=t(46594),l=t(87021),n=function(u,f,s,c,d,v){var m;switch(f){case r.ARRAY_2D:m=p(u,s,c,d,v);break;case r.CSV:m=h(u,s,c,d,v);break;case r.TILED_JSON:m=o(u,s,v);break;case r.WELTMEISTER:m=l(u,s,v);break;default:console.warn("Unrecognized tilemap data format: "+f),m=null}return m};a.exports=n},2342:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(80341),p=t(14977),h=t(87010),o=t(23029),l=function(n,u,f,s,c){for(var d=new p({tileWidth:f,tileHeight:s}),v=new h({name:n,tileWidth:f,tileHeight:s,format:r.ARRAY_2D,layers:[d]}),m=[],S=u.length,M=0,A=0;A{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(80341),p=t(2342),h=function(o,l,n,u,f){var s=l.trim().split(` +`).map(function(d){return d.split(",")}),c=p(o,s,n,u,f);return c.format=r.CSV,c};a.exports=h},6656:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(14977),p=t(23029),h=function(o,l){for(var n=[],u=0;u-1?M=new p(s,S,m,v,f.tilesize,f.tilesize):M=l?null:new p(s,-1,m,v,f.tilesize,f.tilesize),c.push(M)}d.push(c),c=[]}s.data=d,n.push(s)}return n};a.exports=h},96483:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(33629),p=function(h){for(var o=[],l=[],n=0;n{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(80341),p=t(87010),h=t(6656),o=t(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 s=0,c=0,d=0;ds&&(s=u.layer[d].width),u.layer[d].height>c&&(c=u.layer[d].height);var v=new p({width:s,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=o(u),v};a.exports=l},52833:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={ParseTileLayers:t(6656),ParseTilesets:t(96483),ParseWeltmeister:t(87021)}},57442:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={FromOrientationString:t(6641),Parse:t(46177),Parse2DArray:t(2342),ParseCSV:t(82593),Impact:t(52833),Tiled:t(96761)}},51233:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(79291),p=function(h){for(var o,l,n,u,f,s=0;s{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){for(var r=window.atob(t),p=r.length,h=new Array(p/4),o=0;o>>0;return h};a.exports=y},84101:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(33629),p=function(h){var o,l,n=[];for(o=0;o{/** + * @author Seth Berrier + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(95540),p=function(h,o,l){if(!o)return{i:0,layers:h.layers,name:"",opacity:1,visible:!0,x:0,y:0};var n=o.x+r(o,"startx",0)*h.tilewidth+r(o,"offsetx",0),u=o.y+r(o,"starty",0)*h.tileheight+r(o,"offsety",0);return{i:0,layers:o.layers,name:l.name+o.name+"/",opacity:l.opacity*o.opacity,visible:l.visible&&o.visible,x:l.x+n,y:l.y+u}};a.exports=p},29920:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=2147483648,t=1073741824,r=536870912,p=function(h){var o=!!(h&y),l=!!(h&t),n=!!(h&r);h=h&~(y|t|r);var u=0,f=!1;return o&&l&&n?(u=Math.PI/2,f=!0):o&&l&&!n?(u=Math.PI,f=!1):o&&!l&&n?(u=Math.PI/2,f=!1):o&&!l&&!n?(u=0,f=!0):!o&&l&&n?(u=3*Math.PI/2,f=!1):!o&&l&&!n?(u=Math.PI,f=!0):!o&&!l&&n?(u=3*Math.PI/2,f=!0):!o&&!l&&!n&&(u=0,f=!1),{gid:h,flippedHorizontal:o,flippedVertical:l,flippedAntiDiagonal:n,rotation:u,flipped:f}};a.exports=p},12635:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(95540),p=t(79677),h=function(o){for(var l=[],n=[],u=p(o);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 s=p(o,f,u);n.push(u),u=s}continue}var c=r(f,"offsetx",0)+r(f,"startx",0),d=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+d+f.y,alpha:u.opacity*f.opacity,visible:u.visible&&f.visible,properties:r(f,"properties",{})})}return l};a.exports=h},46594:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(51233),p=t(84101),h=t(91907),o=t(62644),l=t(80341),n=t(6641),u=t(87010),f=t(12635),s=t(22611),c=t(28200),d=t(24619),v=function(m,S,M){var A=o(S),C=new u({width:A.width,height:A.height,name:m,tileWidth:A.tilewidth,tileHeight:A.tileheight,orientation:n(A.orientation),format:l.TILED_JSON,version:A.version,properties:A.properties,renderOrder:A.renderorder,infinite:A.infinite});C.orientation===h.HEXAGONAL&&(C.hexSideLength=A.hexsidelength,C.staggerAxis=A.staggeraxis,C.staggerIndex=A.staggerindex),C.layers=c(A,M),C.images=f(A);var w=d(A);return C.tilesets=w.tilesets,C.imageCollections=w.imageCollections,C.objects=s(A),C.tiles=p(C),r(C),C};a.exports=v},52205:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(18254),p=t(29920),h=function(n){return{x:n.x,y:n.y}},o=["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 s=r(n,o);if(s.x+=u,s.y+=f,n.gid){var c=p(n.gid);s.gid=c.gid,s.flippedHorizontal=c.flippedHorizontal,s.flippedVertical=c.flippedVertical,s.flippedAntiDiagonal=c.flippedAntiDiagonal}else n.polyline?s.polyline=n.polyline.map(h):n.polygon?s.polygon=n.polygon.map(h):n.ellipse?s.ellipse=n.ellipse:n.text?s.text=n.text:n.point?s.point=!0:s.rectangle=!0;return s};a.exports=l},22611:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(95540),p=t(52205),h=t(48700),o=t(79677),l=function(n){for(var u=[],f=[],s=o(n);s.i0;){if(s.i>=s.layers.length){if(f.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}s=f.pop();continue}var c=s.layers[s.i];if(s.i++,c.opacity*=s.opacity,c.visible=s.visible&&c.visible,c.type!=="objectgroup"){if(c.type==="group"){var d=o(n,c,s);f.push(s),s=d}continue}c.name=s.name+c.name;for(var v=s.x+r(c,"startx",0)+r(c,"offsetx",0),m=s.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=t(41868),p=t(91907),h=t(79677),o=t(6641),l=t(95540),n=t(14977),u=t(29920),f=t(23029),s=function(c,d){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 A=M.layers[M.i];if(M.i++,A.type!=="tilelayer"){if(A.type==="group"){var C=h(c,A,M);S.push(M),M=C}continue}if(A.compression){console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+A.name+"'");continue}else if(A.encoding&&A.encoding==="base64"){if(A.chunks)for(var w=0;w0?(O=new f(P,L.gid,j,$,c.tilewidth,c.tileheight),O.rotation=L.rotation,O.flipX=L.flipped,D[$][j]=O):(I=d?null:new f(P,-1,j,$,c.tilewidth,c.tileheight),D[$][j]=I),B++,B===J.width&&(K++,B=0)}}else{P=new n({name:M.name+A.name,id:A.id,x:M.x+l(A,"offsetx",0)+A.x,y:M.y+l(A,"offsety",0)+A.y,width:A.width,height:A.height,tileWidth:c.tilewidth,tileHeight:c.tileheight,alpha:M.opacity*A.opacity,visible:M.visible&&A.visible,properties:l(A,"properties",[]),orientation:o(c.orientation)}),P.orientation===p.HEXAGONAL&&(P.hexSideLength=c.hexsidelength,P.staggerAxis=c.staggeraxis,P.staggerIndex=c.staggerindex);for(var q=[],it=0,nt=A.data.length;it0?(O=new f(P,L.gid,B,D.length,c.tilewidth,c.tileheight),O.rotation=L.rotation,O.flipX=L.flipped,q.push(O)):(I=d?null:new f(P,-1,B,D.length,c.tilewidth,c.tileheight),q.push(I)),B++,B===A.width&&(D.push(q),B=0,q=[])}P.data=D,m.push(P)}return m};a.exports=s},24619:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(33629),p=t(16536),h=t(52205),o=t(57880),l=function(n){for(var u=[],f=[],s=null,c,d=0;d1){var S=void 0,M=void 0;if(Array.isArray(v.tiles)){S=S||{},M=M||{};for(var A=0;A{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){for(var p=0;p0){var l={},n={},u,f,s;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} + */a.exports={AssignTileProperties:t(51233),Base64Decode:t(41868),BuildTilesetIndex:t(84101),CreateGroupLayer:t(79677),ParseGID:t(29920),ParseImageLayers:t(12635),ParseJSONTiled:t(46594),ParseObject:t(52205),ParseObjectLayers:t(22611),ParseTileLayers:t(28200),ParseTilesets:t(24619)}},33385:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(37277),h=t(44594),o=t(94880),l=t(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 o?(f=u,this.removeEvent(f),f.elapsed=f.startAt,f.hasDispatched=!1,f.repeatCount=f.repeat===-1||f.loop?999999999999:f.repeat):f=new o(u),this._pendingInsertion.push(f),f},delayedCall:function(u,f,s,c){return this.addEvent({delay:u,callback:f,args:s,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(d,1),c.destroy()}for(s=0;s=c.delay)){var d=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--,d>=c.delay)for(;d>=c.delay&&c.repeatCount>0;)c.callback&&c.callback.apply(c.callbackScope,c.args),d-=c.delay,c.repeatCount--;c.elapsed=d,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=t(83419),p=t(50792),h=t(39429),o=t(95540),l=t(44594),n=t(89809),u=new r({Extends:p,initialize:function(s,c){p.call(this),this.scene=s,this.systems=s.sys,this.elapsed=0,this.paused=!0,this.complete=!1,this.totalComplete=0,this.loop=0,this.iteration=0,this.events=[];var d=this.systems.events;d.on(l.PRE_UPDATE,this.preUpdate,this),d.on(l.UPDATE,this.update,this),d.once(l.SHUTDOWN,this.destroy,this),c&&this.add(c)},preUpdate:function(f,s){this.paused||(this.elapsed+=s)},update:function(){if(!(this.paused||this.complete)){var f,s=this.events,c=!1,d=this.systems,v;for(f=0;f=s.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 s=0;s0&&(c=s[s.length-1].time);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=t(83419),p=t(95540),h=new r({initialize:function(l){this.delay=0,this.repeat=0,this.repeatCount=0,this.loop=!1,this.callback,this.callbackScope,this.args,this.timeScale=1,this.startAt=0,this.elapsed=0,this.paused=!1,this.hasDispatched=!1,this.reset(l)},reset:function(o){if(this.delay=p(o,"delay",0),this.repeat=p(o,"repeat",0),this.loop=p(o,"loop",!1),this.callback=p(o,"callback",void 0),this.callbackScope=p(o,"callbackScope",this),this.args=p(o,"args",[]),this.timeScale=p(o,"timeScale",1),this.startAt=p(o,"startAt",0),this.paused=p(o,"paused",!1),this.elapsed=this.startAt,this.hasDispatched=!1,this.repeatCount=this.repeat===-1||this.loop?999999999999:this.repeat,this.delay===0&&(this.repeat>0||this.loop))throw new Error("TimerEvent infinite loop created via zero delay");return this},getProgress:function(){return this.elapsed/this.delay},getOverallProgress:function(){if(this.repeat>0){var o=this.delay+this.delay*this.repeat,l=this.elapsed+this.delay*(this.repeat-this.repeatCount);return l/o}else return this.getProgress()},getRepeatCount:function(){return this.repeatCount},getElapsed:function(){return this.elapsed},getElapsedSeconds:function(){return this.elapsed*.001},getRemaining:function(){return this.delay-this.elapsed},getRemainingSeconds:function(){return this.getRemaining()*.001},getOverallRemaining:function(){return this.delay*(1+this.repeatCount)-this.elapsed},getOverallRemainingSeconds:function(){return this.getOverallRemaining()*.001},remove:function(o){o===void 0&&(o=!1),this.elapsed=this.delay,this.hasDispatched=!o,this.repeatCount=0},destroy:function(){this.callback=void 0,this.callbackScope=void 0,this.args=[]}});a.exports=h},35945:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="complete"},89809:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={COMPLETE:t(35945)}},90291:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={Clock:t(33385),Events:t(89809),Timeline:t(96120),TimerEvent:t(94880)}},40382:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(72905),p=t(83419),h=t(43491),o=t(88032),l=t(37277),n=t(44594),u=t(93109),f=t(86081),s=t(8357),c=t(43960),d=t(26012),v=new p({initialize:function(S){this.scene=S,this.events=S.sys.events,this.timeScale=1,this.paused=!1,this.processing=!1,this.tweens=[],this.time=0,this.startTime=0,this.nextTime=0,this.prevTime=0,this.maxLag=500,this.lagSkip=33,this.gap=1e3/240,this.events.once(n.BOOT,this.boot,this),this.events.on(n.START,this.start,this)},boot:function(){this.events.once(n.DESTROY,this.destroy,this)},start:function(){this.timeScale=1,this.paused=!1,this.startTime=Date.now(),this.prevTime=this.startTime,this.nextTime=this.gap,this.events.on(n.UPDATE,this.update,this),this.events.once(n.SHUTDOWN,this.shutdown,this)},create:function(m){Array.isArray(m)||(m=[m]);for(var S=[],M=0;M-1},existing:function(m){return this.has(m)||this.tweens.push(m.reset()),this},addCounter:function(m){var S=o(this,m);return this.tweens.push(S.reset()),S},stagger:function(m,S){return u(m,S)},setLagSmooth:function(m,S){return m===void 0&&(m=1/1e-8),S===void 0&&(S=0),this.maxLag=m,this.lagSkip=Math.min(S,this.maxLag),this},setFps:function(m){return m===void 0&&(m=240),this.gap=1e3/m,this.nextTime=this.time*1e3+this.gap,this},getDelta:function(m){var S=Date.now()-this.prevTime;S>this.maxLag&&(this.startTime+=S-this.lagSkip),this.prevTime+=S;var M=this.prevTime-this.startTime,A=M-this.nextTime,C=M-this.time*1e3;return A>0||m?(M/=1e3,this.time=M,this.nextTime+=A+(A>=this.gap?4:this.gap-A)):C=0,C},tick:function(){return this.step(!0),this},update:function(){this.paused||this.step(!1)},step:function(m){m===void 0&&(m=!1);var S=this.getDelta(m);if(!(S<=0)){this.processing=!0;var M,A,C=[],w=this.tweens;for(M=0;M0){for(M=0;M-1&&(A.isPendingRemove()||A.isDestroyed())&&(w.splice(L,1),A.destroy())}C.length=0}this.processing=!1}},remove:function(m){return this.processing?m.setPendingRemoveState():(r(this.tweens,m),m.setRemovedState()),this},reset:function(m){return this.existing(m),m.seek(),m.setActiveState(),this},makeActive:function(m){return this.existing(m),m.setActiveState(),this},each:function(m,S){var M,A=[null];for(M=1;M{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){return t&&t.hasOwnProperty(r)?t[r]:p};a.exports=y},6113:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(62640),p=t(35355),h=function(o,l){var n=r.Power0;if(typeof o=="string")if(r.hasOwnProperty(o))n=r[o];else{var u="";if(o.indexOf(".")){u=o.substring(o.indexOf(".")+1);var f=u.toLowerCase();f==="in"?u="easeIn":f==="out"?u="easeOut":f==="inout"&&(u="easeInOut")}o=p(o.substring(0,o.indexOf(".")+1)+u),r.hasOwnProperty(o)&&(n=r[o])}else typeof o=="function"&&(n=o);if(!l)return n;var s=l.slice(0);return s.unshift(0),function(c){return s[0]=c,n.apply(this,s)}};a.exports=h},91389:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(89318),p=t(77259),h=t(28392),o={bezier:r,catmull:p,catmullrom:p,linear:h},l=function(n){if(n===null)return null;var u=o.linear;return typeof n=="string"?o.hasOwnProperty(n)&&(u=o[n]):typeof n=="function"&&(u=n),u};a.exports=l},55292:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){var h;if(t.hasOwnProperty(r)){var o=typeof t[r];o==="function"?h=function(l,n,u,f,s,c){return t[r](l,n,u,f,s,c)}:h=function(){return t[r]}}else typeof p=="function"?h=p:h=function(){return p};return h};a.exports=y},82985:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(81076),p=function(h){var o,l=[];if(h.hasOwnProperty("props"))for(o in h.props)o.substring(0,1)!=="_"&&l.push({key:o,value:h.props[o]});else for(o in h)r.indexOf(o)===-1&&o.substring(0,1)!=="_"&&l.push({key:o,value:h[o]});return l};a.exports=p},62329:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(35154),p=function(h){var o=r(h,"targets",null);return o===null||(typeof o=="function"&&(o=o.call()),Array.isArray(o)||(o=[o])),o};a.exports=p},17777:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(30976),p=t(99472);function h(f){return!!f.getActive&&typeof f.getActive=="function"}function o(f){return!!f.getStart&&typeof f.getStart=="function"}function l(f){return!!f.getEnd&&typeof f.getEnd=="function"}function n(f){return o(f)||l(f)||h(f)}var u=function(f,s){var c,d=function(J,Q,Y){return Y},v=function(J,Q,Y){return Y},m=null,S=typeof s;if(S==="number")d=function(){return s};else if(Array.isArray(s))v=function(){return s[0]},d=function(){return s[s.length-1]};else if(S==="string"){var M=s.toLowerCase(),A=M.substring(0,6)==="random",C=M.substring(0,3)==="int";if(A||C){var w=M.indexOf("("),P=M.indexOf(")"),L=M.indexOf(",");if(w&&P&&L){var O=parseFloat(M.substring(w+1,L)),I=parseFloat(M.substring(L+1,P));A?d=function(){return p(O,I)}:d=function(){return r(O,I)}}else throw new Error("invalid random() format")}else{M=M[0];var D=parseFloat(s.substr(2));switch(M){case"+":d=function(J,Q,Y){return Y+D};break;case"-":d=function(J,Q,Y){return Y-D};break;case"*":d=function(J,Q,Y){return Y*D};break;case"/":d=function(J,Q,Y){return Y/D};break;default:d=function(){return parseFloat(s)}}}}else if(S==="function")d=s;else if(S==="object")if(n(s))h(s)&&(m=s.getActive),l(s)&&(d=s.getEnd),o(s)&&(v=s.getStart);else if(s.hasOwnProperty("value"))c=u(f,s.value);else{var B=s.hasOwnProperty("to"),G=s.hasOwnProperty("from"),z=s.hasOwnProperty("start");if(B&&(G||z)){if(c=u(f,s.to),z){var W=u(f,s.start);c.getActive=W.getEnd}if(G){var k=u(f,s.from);c.getStart=k.getEnd}}}return c||(c={getActive:m,getEnd:d,getStart:v}),c};a.exports=u},88032:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(70402),p=t(69902),h=t(23568),o=t(57355),l=t(6113),n=t(55292),u=t(35154),f=t(17777),s=t(269),c=t(86081),d=function(v,m,S){if(m instanceof c)return m.parent=v,m;S===void 0?S=p:S=s(p,S);var M=u(m,"from",0),A=u(m,"to",1),C=[{value:M}],w=u(m,"delay",S.delay),P=u(m,"easeParams",S.easeParams),L=u(m,"ease",S.ease),O=f("value",A),I=new c(v,C),D=I.add(0,"value",O.getEnd,O.getStart,O.getActive,l(u(m,"ease",L),u(m,"easeParams",P)),n(m,"delay",w),u(m,"duration",S.duration),o(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=o(m,"paused",!1),I.persist=o(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=t(6113),p=t(35154),h=t(36383),o=function(l,n){n===void 0&&(n={});var u,f=p(n,"start",0),s=p(n,"ease",null),c=p(n,"grid",null),d=p(n,"from",0),v=d==="first",m=d==="center",S=d==="last",M=typeof d=="number",A=Array.isArray(l),C=parseFloat(A?l[0]:l),w=A?parseFloat(l[1]):0,P=Math.max(C,w);if(A&&(f+=C),c){var L=c[0],O=c[1],I=0,D=0,B=0,G=0,z=[];S?(I=L-1,D=O-1):M?(I=d%L,D=Math.floor(d/L)):m&&(I=(L-1)/2,D=(O-1)/2);for(var W=h.MIN_SAFE_INTEGER,k=0;kW&&(W=Q),z[k][J]=Q}}}var Y=s?r(s):null;return c?u=function(K,U,V,j){var $=0,q=j%L,it=Math.floor(j/L);q>=0&&q=0&&it{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(70402),p=t(69902),h=t(23568),o=t(57355),l=t(6113),n=t(91389),u=t(55292),f=t(82985),s=t(62329),c=t(35154),d=t(17777),v=t(269),m=t(86081),S=function(M,A,C){if(A instanceof m)return A.parent=M,A;C===void 0?C=p:C=v(p,C);var w=s(A);!w&&C.targets&&(w=C.targets);for(var P=f(A),L=c(A,"delay",C.delay),O=c(A,"duration",C.duration),I=c(A,"easeParams",C.easeParams),D=c(A,"ease",C.ease),B=c(A,"hold",C.hold),G=c(A,"repeat",C.repeat),z=c(A,"repeatDelay",C.repeatDelay),W=o(A,"yoyo",C.yoyo),k=o(A,"flipX",C.flipX),J=o(A,"flipY",C.flipY),Q=c(A,"interpolation",C.interpolation),Y=function(ut,dt,mt,gt){if(mt==="texture"){var At=gt,ot=void 0;Array.isArray(gt)?(At=gt[0],ot=gt[1]):gt.hasOwnProperty("value")?(At=gt.value,Array.isArray(gt.value)?(At=gt.value[0],ot=gt.value[1]):typeof gt.value=="string"&&(At=gt.value)):typeof gt=="string"&&(At=gt),ut.addFrame(dt,At,ot,u(gt,"delay",L),c(gt,"duration",O),c(gt,"hold",B),c(gt,"repeat",G),c(gt,"repeatDelay",z),o(gt,"flipX",k),o(gt,"flipY",J))}else{var st=d(mt,gt),yt=n(c(gt,"interpolation",Q));ut.add(dt,mt,st.getEnd,st.getStart,st.getActive,l(c(gt,"ease",D),c(gt,"easeParams",I)),u(gt,"delay",L),c(gt,"duration",O),o(gt,"yoyo",W),c(gt,"hold",B),c(gt,"repeat",G),c(gt,"repeatDelay",z),o(gt,"flipX",k),o(gt,"flipY",J),yt,yt?gt:null)}},K=new m(M,w),U=0;U{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(70402),p=t(23568),h=t(57355),o=t(62329),l=t(35154),n=t(8357),u=t(43960),f=function(s,c){if(c instanceof u)return c.parent=s,c;var d=new u(s);d.startDelay=l(c,"delay",0),d.completeDelay=p(c,"completeDelay",0),d.loop=Math.round(p(c,"loop",l(c,"repeat",0))),d.loopDelay=Math.round(p(c,"loopDelay",l(c,"repeatDelay",0))),d.paused=h(c,"paused",!1),d.persist=h(c,"persist",!1),d.callbackScope=l(c,"callbackScope",d);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} + */a.exports={GetBoolean:t(57355),GetEaseFunction:t(6113),GetInterpolationFunction:t(91389),GetNewValue:t(55292),GetProps:t(82985),GetTargets:t(62329),GetValueOp:t(17777),NumberTweenBuilder:t(88032),StaggerBuilder:t(93109),TweenBuilder:t(8357)}},73685:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="active"},98540:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="complete"},67233:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="loop"},2859:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="pause"},98336:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="repeat"},25764:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="resume"},32193:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="start"},84371:a=>{/** + * @author samme + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="stop"},70766:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="update"},55659:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports="yoyo"},842:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={TWEEN_ACTIVE:t(73685),TWEEN_COMPLETE:t(98540),TWEEN_LOOP:t(67233),TWEEN_PAUSE:t(2859),TWEEN_RESUME:t(25764),TWEEN_REPEAT:t(98336),TWEEN_START:t(32193),TWEEN_STOP:t(84371),TWEEN_UPDATE:t(70766),TWEEN_YOYO:t(55659)}},43066:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r={States:t(86353),Builders:t(30231),Events:t(842),TweenManager:t(40382),Tween:t(86081),TweenData:t(48177),TweenFrameData:t(42220),BaseTween:t(70402),TweenChain:t(43960)};a.exports=r},70402:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(50792),h=t(842),o=t(86353),l=new r({Extends:p,initialize:function(u){p.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=o.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=o.PENDING},setActiveState:function(){this.state=o.ACTIVE},setLoopDelayState:function(){this.state=o.LOOP_DELAY},setCompleteDelayState:function(){this.state=o.COMPLETE_DELAY},setStartDelayState:function(){this.state=o.START_DELAY,this.countdown=this.startDelay,this.hasStarted=!1},setPendingRemoveState:function(){this.state=o.PENDING_REMOVE},setRemovedState:function(){this.state=o.REMOVED},setFinishedState:function(){this.state=o.FINISHED},setDestroyedState:function(){this.state=o.DESTROYED},isPending:function(){return this.state===o.PENDING},isActive:function(){return this.state===o.ACTIVE},isLoopDelayed:function(){return this.state===o.LOOP_DELAY},isCompleteDelayed:function(){return this.state===o.COMPLETE_DELAY},isStartDelayed:function(){return this.state===o.START_DELAY},isPendingRemove:function(){return this.state===o.PENDING_REMOVE},isRemoved:function(){return this.state===o.REMOVED},isFinished:function(){return this.state===o.FINISHED},isDestroyed:function(){return this.state===o.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"],a.exports=l},95042:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(83419),p=t(842),h=t(86353),o=new r({initialize:function(n,u,f,s,c,d,v,m,S,M){this.tween=n,this.targetIndex=u,this.duration=s,this.totalDuration=0,this.delay=0,this.getDelay=f,this.yoyo=c,this.hold=d,this.repeat=v,this.repeatDelay=m,this.repeatCounter=0,this.flipX=S,this.flipY=M,this.progress=0,this.elapsed=0,this.state=0,this.isCountdown=!1},getTarget:function(){return this.tween.targets[this.targetIndex]},setTargetValue:function(l){l===void 0&&(l=this.current),this.tween.targets[this.targetIndex][this.key]=l},setCreatedState:function(){this.state=h.CREATED,this.isCountdown=!1},setDelayState:function(){this.state=h.DELAY,this.isCountdown=!0},setPendingRenderState:function(){this.state=h.PENDING_RENDER,this.isCountdown=!1},setPlayingForwardState:function(){this.state=h.PLAYING_FORWARD,this.isCountdown=!1},setPlayingBackwardState:function(){this.state=h.PLAYING_BACKWARD,this.isCountdown=!1},setHoldState:function(){this.state=h.HOLD_DELAY,this.isCountdown=!0},setRepeatState:function(){this.state=h.REPEAT_DELAY,this.isCountdown=!0},setCompleteState:function(){this.state=h.COMPLETE,this.isCountdown=!1},isCreated:function(){return this.state===h.CREATED},isDelayed:function(){return this.state===h.DELAY},isPendingRender:function(){return this.state===h.PENDING_RENDER},isPlayingForward:function(){return this.state===h.PLAYING_FORWARD},isPlayingBackward:function(){return this.state===h.PLAYING_BACKWARD},isHolding:function(){return this.state===h.HOLD_DELAY},isRepeating:function(){return this.state===h.REPEAT_DELAY},isComplete:function(){return this.state===h.COMPLETE},setStateFromEnd:function(l){this.yoyo?this.onRepeat(l,!0,!0):this.repeatCounter>0?this.onRepeat(l,!0,!1):this.setCompleteState()},setStateFromStart:function(l){this.repeatCounter>0?this.onRepeat(l,!1):this.setCompleteState()},reset:function(){var l=this.tween,n=l.totalTargets,u=this.targetIndex,f=l.targets[u],s=this.key;this.progress=0,this.elapsed=0,this.delay=this.getDelay(f,s,0,u,n,l),this.repeatCounter=this.repeat===-1?h.MAX:this.repeat,this.setPendingRenderState();var c=this.duration+this.hold;this.yoyo&&(c+=this.duration);var d=c+this.repeatDelay;this.totalDuration=this.delay+c,this.repeat===-1?(this.totalDuration+=d*h.MAX,l.isInfinite=!0):this.repeat>0&&(this.totalDuration+=d*this.repeat),this.totalDuration>l.duration&&(l.duration=this.totalDuration),this.delay0&&(this.elapsed=this.delay,this.setDelayState())},onRepeat:function(l,n,u){var f=this.tween,s=f.totalTargets,c=this.targetIndex,d=f.targets[c],v=this.key,m=v!=="texture";if(this.elapsed=l,this.progress=l/this.duration,this.flipX&&d.toggleFlipX(),this.flipY&&d.toggleFlipY(),m&&(n||u)&&(this.start=this.getStartValue(d,v,this.start,c,s,f)),u){this.setPlayingBackwardState(),this.dispatchEvent(p.TWEEN_YOYO,"onYoyo");return}this.repeatCounter--,m&&(this.end=this.getEndValue(d,v,this.start,c,s,f)),this.repeatDelay>0?(this.elapsed=this.repeatDelay-l,m&&(this.current=this.start,d[v]=this.current),this.setRepeatState()):(this.setPlayingForwardState(),this.dispatchEvent(p.TWEEN_REPEAT,"onRepeat"))},destroy:function(){this.tween=null,this.getDelay=null,this.setCompleteState()}});a.exports=o},69902:a=>{/** + * @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};a.exports=y},81076:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.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:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(70402),p=t(83419),h=t(842),o=t(44603),l=t(39429),n=t(36383),u=t(86353),f=t(48177),s=t(42220),c=new p({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(d,v,m,S,M,A,C,w,P,L,O,I,D,B,G,z){var W=new f(this,d,v,m,S,M,A,C,w,P,L,O,I,D,B,G,z);return this.totalData=this.data.push(W),W},addFrame:function(d,v,m,S,M,A,C,w,P,L){var O=new s(this,d,v,m,S,M,A,C,w,P,L);return this.totalData=this.data.push(O),O},getValue:function(d){d===void 0&&(d=0);var v=null;return this.data&&(v=this.data[d].current),v},hasTarget:function(d){return this.targets&&this.targets.indexOf(d)!==-1},updateTo:function(d,v,m){if(m===void 0&&(m=!1),d!=="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(d,v,m){if(d===void 0&&(d=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,d>0){for(var M=Math.floor(d/v),A=d-M*v,C=0;C0&&this.update(A)}return this.paused=S,this.isSeeking=!1,this},initTweenData:function(d){d===void 0&&(d=!1),this.duration=0,this.startDelay=n.MAX_SAFE_INTEGER;for(var v=this.data,m=0;m0?this.totalDuration=S+M+(S+C)*A:this.totalDuration=S+M},reset:function(d){return d===void 0&&(d=!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),d||(this.initTweenData(),this.setActiveState(),this.dispatchEvent(h.TWEEN_ACTIVE,"onActive")),this},update:function(d){if(this.isPendingRemove()||this.isDestroyed())return!0;if(this.paused||this.isFinished())return!1;if(d*=this.timeScale*this.parent.timeScale,this.isLoopDelayed())return this.updateLoopCountdown(d),!1;if(this.isCompleteDelayed())return this.updateCompleteDelay(d),!1;this.hasStarted||(this.startDelay-=d,this.startDelay<=0&&(this.hasStarted=!0,this.dispatchEvent(h.TWEEN_START,"onStart"),d=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=t(72905),p=t(70402),h=t(83419),o=t(842),l=t(44603),n=t(39429),u=t(86353),f=new h({Extends:p,initialize:function(c){p.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(o.TWEEN_ACTIVE,"onActive"),this},add:function(s){var c=this.parent.create(s);Array.isArray(c)||(c=[c]);for(var d=this.data,v=0;v0)this.loopCounter--,this.resetTweens(),this.loopDelay>0?(this.countdown=this.loopDelay,this.setLoopDelayState()):(this.setActiveState(),this.dispatchEvent(o.TWEEN_LOOP,"onLoop"));else if(this.completeDelay>0)this.countdown=this.completeDelay,this.setCompleteDelayState();else return this.onCompleteHandler(),!0;return!1},play:function(){return this.isDestroyed()?(console.warn("Cannot play destroyed TweenChain",this),this):((this.isPendingRemove()||this.isPending())&&this.resetTweens(),this.paused=!1,this.startDelay>0&&!this.isStartDelayed()?this.setStartDelayState():this.setActiveState(),this)},resetTweens:function(){for(var s=this.data,c=this.totalData,d=0;d{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(95042),p=t(45319),h=t(83419),o=t(842),l=new h({Extends:r,initialize:function(u,f,s,c,d,v,m,S,M,A,C,w,P,L,O,I,D){r.call(this,u,f,S,M,A,C,w,P,L,O),this.key=s,this.getActiveValue=v,this.getEndValue=c,this.getStartValue=d,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,s=this.targetIndex,c=u.targets[s],d=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(o.TWEEN_REPEAT,"onRepeat")):this.isHolding()&&this.setStateFromEnd(0))),this.isPendingRender())return this.start=this.getStartValue(c,d,c[d],s,f,u),this.end=this.getEndValue(c,d,this.start,s,f,u),this.current=this.start,c[d]=this.start,this.setPlayingForwardState(),!0;var v=this.isPlayingForward(),m=this.isPlayingBackward();if(v||m){var S=this.elapsed,M=this.duration,A=0,C=!1;S+=n,S>=M?(A=S-M,S=M,C=!0):S<0&&(S=0);var w=p(S/M,0,1);if(this.elapsed=S,this.progress=w,this.previous=this.current,C)v?(this.current=this.end,c[d]=this.end,this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(A)):(this.current=this.start,c[d]=this.start,this.setStateFromStart(A));else{v||(w=1-w);var P=this.ease(w);this.interpolation?this.current=this.interpolation(this.interpolationData,P):this.current=this.start+(this.end-this.start)*P,c[d]=this.current}this.dispatchEvent(o.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(n,u){var f=this.tween;if(!f.isSeeking){var s=f.targets[this.targetIndex],c=this.key,d=this.current,v=this.previous;f.emit(n,f,c,s,d,v);var m=f.callbacks[u];m&&m.func.apply(f.callbackScope,[f,s,c,d,v].concat(m.params))}},destroy:function(){r.prototype.destroy.call(this),this.getActiveValue=null,this.getEndValue=null,this.getStartValue=null,this.ease=null}});a.exports=l},42220:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(95042),p=t(45319),h=t(83419),o=t(842),l=new h({Extends:r,initialize:function(u,f,s,c,d,v,m,S,M,A,C){r.call(this,u,f,d,v,!1,m,S,M,A,C),this.key="texture",this.startTexture=null,this.endTexture=s,this.startFrame=null,this.endFrame=c,this.yoyo=S!==0},reset:function(n){r.prototype.reset.call(this);var u=this.tween.targets[this.targetIndex];this.startTexture||(this.startTexture=u.texture.key,this.startFrame=u.frame.name),n&&u.setTexture(this.startTexture,this.startFrame)},update:function(n){var u=this.tween,f=this.targetIndex,s=u.targets[f];if(!s)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(o.TWEEN_REPEAT,"onRepeat")):this.isHolding()&&this.setStateFromEnd(0))),this.isPendingRender())return this.startTexture&&s.setTexture(this.startTexture,this.startFrame),this.setPlayingForwardState(),!0;var c=this.isPlayingForward(),d=this.isPlayingBackward();if(c||d){var v=this.elapsed,m=this.duration,S=0,M=!1;v+=n,v>=m?(S=v-m,v=m,M=!0):v<0&&(v=0);var A=p(v/m,0,1);this.elapsed=v,this.progress=A,M&&(c?(s.setTexture(this.endTexture,this.endFrame),this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(S)):(s.setTexture(this.startTexture,this.startFrame),this.setStateFromStart(S))),this.dispatchEvent(o.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(n,u){var f=this.tween;if(!f.isSeeking){var s=f.targets[this.targetIndex],c=this.key;f.emit(n,f,c,s);var d=f.callbacks[u];d&&d.func.apply(f.callbackScope,[f,s,c].concat(d.params))}},destroy:function(){r.prototype.destroy.call(this),this.startTexture=null,this.endTexture=null,this.startFrame=null,this.endFrame=null}});a.exports=l},86353:a=>{/** + * @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};a.exports=y},83419:a=>{/** + * @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 t(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 p(l,n,u,f){for(var s in n)if(n.hasOwnProperty(s)){var c=t(n,s,u);if(c!==!1){var d=f||l;if(r(d.prototype,s)){if(o.ignoreFinals)continue;throw new Error("cannot override final property '"+s+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(l.prototype,s,c)}else l.prototype[s]=n[s]}}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(){};a.exports=y},20242:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(){return null};a.exports=y},71146:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p,h,o){if(o===void 0&&(o=t),p>0){var l=p-t.length;if(l<=0)return null}if(!Array.isArray(r))return t.indexOf(r)===-1?(t.push(r),h&&h.call(o,r),r):null;for(var n=r.length-1;n>=0;)t.indexOf(r[n])!==-1&&r.splice(n,1),n--;if(n=r.length,n===0)return null;p>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(t,r,p,h,o,l){if(p===void 0&&(p=0),l===void 0&&(l=t),h>0){var n=h-t.length;if(n<=0)return null}if(!Array.isArray(r))return t.indexOf(r)===-1?(t.splice(p,0,r),o&&o.call(l,r),r):null;for(var u=r.length-1;u>=0;)t.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 s=r[f];t.splice(p,0,s),o&&o.call(l,s)}return r};a.exports=y},66905:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){var p=t.indexOf(r);return p!==-1&&p{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(82011),p=function(h,o,l,n,u){n===void 0&&(n=0),u===void 0&&(u=h.length);var f=0;if(r(h,n,u))for(var s=n;s{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){var h,o=[null];for(h=3;h{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(82011),p=function(h,o,l,n,u){if(n===void 0&&(n=0),u===void 0&&(u=h.length),r(h,n,u)){var f,s=[null];for(f=5;f{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){if(r.length){if(r.length===1)return r[0]}else return NaN;var h=1,o,l;if(p){if(tr.length&&(h=r.length),p?(o=r[h-1][p],l=r[h][p],l-t<=t-o?r[h]:r[h-1]):(o=r[h-1],l=r[h],l-t<=t-o?l:o)};a.exports=y},43491:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){r===void 0&&(r=[]);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=t(82011),p=function(h,o,l,n,u){n===void 0&&(n=0),u===void 0&&(u=h.length);var f=[];if(r(h,n,u))for(var s=n;s{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(82011),p=function(h,o,l,n,u){if(n===void 0&&(n=0),u===void 0&&(u=h.length),r(h,n,u))for(var f=n;f{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){r===void 0&&(r=0),p===void 0&&(p=t.length);var h=r+Math.floor(Math.random()*p);return t[h]===void 0?null:t[h]};a.exports=y},85835:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){if(r===p)return t;var h=t.indexOf(r),o=t.indexOf(p);if(h<0||o<0)throw new Error("Supplied items must be elements of the same array");return h>o||(t.splice(h,1),o===t.length-1?t.push(r):t.splice(o,0,r)),t};a.exports=y},83371:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){if(r===p)return t;var h=t.indexOf(r),o=t.indexOf(p);if(h<0||o<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(t,r){var p=t.indexOf(r);if(p>0){var h=t[p-1],o=t.indexOf(h);t[p]=h,t[o]=r}return t};a.exports=y},69693:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){var h=t.indexOf(r);if(h===-1||p<0||p>=t.length)throw new Error("Supplied index out of bounds");return h!==p&&(t.splice(h,1),t.splice(p,0,r)),r};a.exports=y},40853:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){var p=t.indexOf(r);if(p!==-1&&p{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p,h){var o=[],l,n=!1;if((p||h)&&(n=!0,p||(p=""),h||(h="")),r=r;l--)n?o.push(p+l.toString()+h):o.push(l);else for(l=t;l<=r;l++)n?o.push(p+l.toString()+h):o.push(l);return o};a.exports=y},593:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(2284),p=function(h,o,l){h===void 0&&(h=0),o===void 0&&(o=null),l===void 0&&(l=1),o===null&&(o=h,h=0);for(var n=[],u=Math.max(r((o-h)/(l||1)),0),f=0;f{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */function y(p,h,o){var l=p[h];p[h]=p[o],p[o]=l}function t(p,h){return ph?1:0}var r=function(p,h,o,l,n){for(o===void 0&&(o=0),l===void 0&&(l=p.length-1),n===void 0&&(n=t);l>o;){if(l-o>600){var u=l-o+1,f=h-o+1,s=Math.log(u),c=.5*Math.exp(2*s/3),d=.5*Math.sqrt(s*c*(u-c)/u)*(f-u/2<0?-1:1),v=Math.max(o,Math.floor(h-f*c/u+d)),m=Math.min(l,Math.floor(h+(u-f)*c/u+d));r(p,h,v,m,n)}var S=p[h],M=o,A=l;for(y(p,o,h),n(p[l],S)>0&&y(p,o,l);M0;)A--}n(p[o],S)===0?y(p,o,A):(A++,y(p,A,l)),A<=h&&(o=A+1),h<=A&&(l=A-1)}};a.exports=r},88492:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(35154),p=t(33680),h=function(l,n,u){for(var f=[],s=0;s{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(19133),p=function(h,o,l,n){n===void 0&&(n=h);var u;if(!Array.isArray(o))return u=h.indexOf(o),u!==-1?(r(h,u),l&&l.call(n,o),o):null;for(var f=o.length-1,s=[];f>=0;){var c=o[f];u=h.indexOf(c),u!==-1&&(r(h,u),s.push(c),l&&l.call(n,c)),f--}return s};a.exports=p},60248:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(19133),p=function(h,o,l,n){if(n===void 0&&(n=h),o<0||o>h.length-1)throw new Error("Index out of bounds");var u=r(h,o);return l&&l.call(n,u),u};a.exports=p},81409:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(82011),p=function(h,o,l,n,u){if(o===void 0&&(o=0),l===void 0&&(l=h.length),u===void 0&&(u=h),r(h,o,l)){var f=l-o,s=h.splice(o,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} + */var r=t(19133),p=function(h,o,l){o===void 0&&(o=0),l===void 0&&(l=h.length);var n=o+Math.floor(Math.random()*l);return r(h,n)};a.exports=p},42169:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){var h=t.indexOf(r),o=t.indexOf(p);return h!==-1&&o===-1?(t[h]=p,!0):!1};a.exports=y},86003:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){r===void 0&&(r=1);for(var p=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(t,r){r===void 0&&(r=1);for(var p=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(t,r,p,h){var o=t.length;if(r<0||r>o||r>=p||p>o){if(h)throw new Error("Range Error: Values outside acceptable range");return!1}else return!0};a.exports=y},89545:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){var p=t.indexOf(r);return p!==-1&&p>0&&(t.splice(p,1),t.unshift(r)),r};a.exports=y},17810:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(82011),p=function(h,o,l,n,u){if(n===void 0&&(n=0),u===void 0&&(u=h.length),r(h,n,u))for(var f=n;f{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){for(var r=t.length-1;r>0;r--){var p=Math.floor(Math.random()*(r+1)),h=t[r];t[r]=t[p],t[p]=h}return t};a.exports=y},90126:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){var r=/\D/g;return t.sort(function(p,h){return parseInt(p.replace(r,""),10)-parseInt(h.replace(r,""),10)}),t};a.exports=y},19133:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){if(!(r>=t.length)){for(var p=t.length-1,h=t[r],o=r;o{/** + * @author Richard Davey + * @author Angry Bytes (and contributors) + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(82264);function p(n,u){return String(n).localeCompare(u)}function h(n,u){var f=n.length;if(f<=1)return n;for(var s=new Array(f),c=1;cc&&(S=c),M>c&&(M=c),A=m,C=S;;)if(A{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){if(r===p)return t;var h=t.indexOf(r),o=t.indexOf(p);if(h<0||o<0)throw new Error("Supplied items must be elements of the same array");return t[h]=p,t[o]=r,t};a.exports=y},37105:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={Matrix:t(54915),Add:t(71146),AddAt:t(51067),BringToTop:t(66905),CountAllMatching:t(21612),Each:t(95428),EachInRange:t(36914),FindClosestInSorted:t(81957),Flatten:t(43491),GetAll:t(46710),GetFirst:t(58731),GetRandom:t(26546),MoveDown:t(70864),MoveTo:t(69693),MoveUp:t(40853),MoveAbove:t(85835),MoveBelow:t(83371),NumberArray:t(20283),NumberArrayStep:t(593),QuickSelect:t(43886),Range:t(88492),Remove:t(72905),RemoveAt:t(60248),RemoveBetween:t(81409),RemoveRandomElement:t(31856),Replace:t(42169),RotateLeft:t(86003),RotateRight:t(49498),SafeRange:t(82011),SendToBack:t(89545),SetAll:t(17810),Shuffle:t(33680),SortByDigits:t(90126),SpliceOne:t(19133),StableSort:t(19186),Swap:t(25630)}},86922:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){if(!Array.isArray(t)||!Array.isArray(t[0]))return!1;for(var r=t[0].length,p=1;p{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(41836),p=t(86922),h=function(o){var l="";if(!p(o))return l;for(var n=0;n{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return t.reverse()};a.exports=y},21224:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){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=t(37829),p=function(h){return r(h,180)};a.exports=p},44657:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(37829),p=function(h,o){o===void 0&&(o=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=t(86922),p=t(2429),h=function(o,l){if(l===void 0&&(l=90),!r(o))return null;if(typeof l!="string"&&(l=(l%360+360)%360),l===90||l===-270||l==="rotateLeft")o=p(o),o.reverse();else if(l===-90||l===270||l==="rotateRight")o.reverse(),o=p(o);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=t(37829),p=function(h,o){o===void 0&&(o=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=t(86003),p=t(49498),h=function(o,l,n){if(l===void 0&&(l=0),n===void 0&&(n=0),n!==0&&(n<0?r(o,Math.abs(n)):p(o,n)),l!==0)for(var u=0;u{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){for(var r=t.length,p=t[0].length,h=new Array(p),o=0;o-1;l--)h[o][l]=t[l][o]}return h};a.exports=y},54915:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={CheckMatrix:t(86922),MatrixToString:t(63362),ReverseColumns:t(92598),ReverseRows:t(21224),Rotate180:t(98717),RotateLeft:t(44657),RotateMatrix:t(37829),RotateRight:t(92632),Translate:t(69512),TransposeMatrix:t(2429)}},71334:a=>{/** + * @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} + */var y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=function(r,p){for(var h=new Uint8Array(r),o=h.length,l=p?"data:"+p+";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 o%3===2?l=l.substring(0,l.length-1)+"=":o%3===1&&(l=l.substring(0,l.length-2)+"=="),l};a.exports=t},53134:a=>{/** + * @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+/",t=new Uint8Array(256),r=0;r>4,v[n++]=(f&15)<<4|s>>2,v[n++]=(s&3)<<6|c&63;return d};a.exports=p},65839:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={ArrayBufferToBase64:t(71334),Base64ToArrayBuffer:t(53134)}},91799:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={Array:t(37105),Base64:t(65839),Objects:t(1183),String:t(31749),NOOP:t(29747),NULL:t(20242)}},41786:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){var r={};for(var p in t)Array.isArray(t[p])?r[p]=t[p].slice(0):r[p]=t[p];return r};a.exports=y},62644:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){var r,p,h;if(typeof t!="object"||t===null)return t;r=Array.isArray(t)?[]:{};for(h in t)p=t[h],r[h]=y(p);return r};a.exports=y},79291:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(41212),p=function(){var h,o,l,n,u,f,s=arguments[0]||{},c=1,d=arguments.length,v=!1;for(typeof s=="boolean"&&(v=s,s=arguments[1]||{},c=2),d===c&&(s=this,--c);c{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(75508),p=t(35154),h=function(o,l,n){var u=p(o,l,null);if(u===null)return n;if(Array.isArray(u))return r.RND.pick(u);if(typeof u=="object"){if(u.hasOwnProperty("randInt"))return r.RND.integerInRange(u.randInt[0],u.randInt[1]);if(u.hasOwnProperty("randFloat"))return r.RND.realInRange(u.randFloat[0],u.randFloat[1])}else if(typeof u=="function")return u(l);return u};a.exports=h},95540:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p){var h=typeof t;return!t||h==="number"||h==="string"?p:t.hasOwnProperty(r)&&t[r]!==void 0?t[r]:p};a.exports=y},82840:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(35154),p=t(45319),h=function(o,l,n,u,f){f===void 0&&(f=n);var s=r(o,l,f);return p(s,n,u)};a.exports=h},35154:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p,h){if(!t&&!h||typeof t=="number")return p;if(t&&t.hasOwnProperty(r))return t[r];if(h&&h.hasOwnProperty(r))return h[r];if(r.indexOf(".")!==-1){for(var o=r.split("."),l=t,n=h,u=p,f=p,s=!0,c=!0,d=0;d{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){for(var p=0;p{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){for(var p=0;p{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){return t.hasOwnProperty(r)};a.exports=y},41212:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){if(!t||typeof t!="object"||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch{return!1}return!0};a.exports=y},46975:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(41786),p=function(h,o){var l=r(h);for(var n in o)l.hasOwnProperty(n)||(l[n]=o[n]);return l};a.exports=p},269:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(41786),p=function(h,o){var l=r(h);for(var n in o)l.hasOwnProperty(n)&&(l[n]=o[n]);return l};a.exports=p},18254:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var r=t(97022),p=function(h,o){for(var 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(t,r,p){if(!t||typeof t=="number")return!1;if(t.hasOwnProperty(r))return t[r]=p,!0;if(r.indexOf(".")!==-1){for(var h=r.split("."),o=t,l=t,n=0;n{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={Clone:t(41786),DeepCopy:t(62644),Extend:t(79291),GetAdvancedValue:t(23568),GetFastValue:t(95540),GetMinMaxValue:t(82840),GetValue:t(35154),HasAll:t(69036),HasAny:t(1985),HasValue:t(97022),IsPlainObject:t(41212),Merge:t(46975),MergeRight:t(269),Pick:t(18254),SetValue:t(61622)}},27902:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){return t.replace(/%([0-9]+)/g,function(p,h){return r[Number(h)-1]})};a.exports=y},41836:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r,p,h){r===void 0&&(r=0),p===void 0&&(p=" "),h===void 0&&(h=3),t=t.toString();var o=0;if(r+1>=t.length)switch(h){case 1:t=new Array(r+1-t.length).join(p)+t;break;case 3:var l=Math.ceil((o=r-t.length)/2),n=o-l;t=new Array(n+1).join(p)+t+new Array(l+1).join(p);break;default:t=t+new Array(r+1-t.length).join(p);break}return t};a.exports=y},33628:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t,r){return r===0?t.slice(1):t.slice(0,r-1)+t.slice(r)};a.exports=y},27671:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return t.split("").reverse().join("")};a.exports=y},45650:a=>{/** + * @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(t){var r=Math.random()*16|0,p=t==="x"?r:r&3|8;return p.toString(16)})};a.exports=y},35355:a=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var y=function(t){return t&&t[0].toUpperCase()+t.slice(1)};a.exports=y},31749:(a,y,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */a.exports={Format:t(27902),Pad:t(41836),RemoveAt:t(33628),Reverse:t(27671),UppercaseFirst:t(35355),UUID:t(45650)}}},x={};function T(a){var y=x[a];if(y!==void 0)return y.exports;var t=x[a]={exports:{}};return i[a](t,t.exports,T),t.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})())})(FM);var Hm=FM.exports;const Bc=xm(Hm);var EF=Object.create,Nx=Object.defineProperty,MF=Object.defineProperties,CF=Object.getOwnPropertyDescriptor,AF=Object.getOwnPropertyDescriptors,wF=Object.getOwnPropertyNames,YS=Object.getOwnPropertySymbols,PF=Object.getPrototypeOf,OM=Object.prototype.hasOwnProperty,RF=Object.prototype.propertyIsEnumerable,kS=(g,e,i)=>e in g?Nx(g,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):g[e]=i,Gi=(g,e)=>{for(var i in e||(e={}))OM.call(e,i)&&kS(g,i,e[i]);if(YS)for(var i of YS(e))RF.call(e,i)&&kS(g,i,e[i]);return g},al=(g,e)=>MF(g,AF(e)),Le=(g,e)=>()=>(e||g((e={exports:{}}).exports,e),e.exports),LF=(g,e,i,x)=>{if(e&&typeof e=="object"||typeof e=="function")for(let T of wF(e))!OM.call(g,T)&&T!==i&&Nx(g,T,{get:()=>e[T],enumerable:!(x=CF(e,T))||x.enumerable});return g},DM=(g,e,i)=>(i=g!=null?EF(PF(g)):{},LF(e||!g||!g.__esModule?Nx(i,"default",{value:g,enumerable:!0}):i,g)),Wm=Le(g=>{var e=function(E,a){return Ea?1:0},i=function(E,a){return Ea?-1:0};function x(E){return function(a,y){return E(y,a)}}function T(E){return E===2?function(a,y){return a[0]y[0]?1:a[1]y[1]?1:0}:function(a,y){for(var t=0;ty[t])return 1;t++}return 0}}g.DEFAULT_COMPARATOR=e,g.DEFAULT_REVERSE_COMPARATOR=i,g.reverseComparator=x,g.createTupleComparator=T}),bF=Le(g=>{g.ARRAY_BUFFER_SUPPORT=typeof ArrayBuffer<"u",g.SYMBOL_SUPPORT=typeof Symbol<"u"}),Ji=Le((g,e)=>{var i=bF(),x=i.ARRAY_BUFFER_SUPPORT,T=i.SYMBOL_SUPPORT;e.exports=function(E,a){var y,t,r,p,h;if(!E)throw new Error("obliterator/forEach: invalid iterable.");if(typeof a!="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,p=E.length;r{var i=Wm(),x=Ji(),T=i.DEFAULT_COMPARATOR,E=i.reverseComparator;function a(u){if(this.clear(),this.comparator=u||T,typeof this.comparator!="function")throw new Error("mnemonist/FibonacciHeap.constructor: given comparator should be a function.")}a.prototype.clear=function(){this.root=null,this.min=null,this.size=0};function y(u){return{item:u,degree:0}}function t(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}a.prototype.push=function(u){var f=y(u);return f.left=f,f.right=f,t(this,f),(!this.min||this.comparator(f.item,this.min.item)<=0)&&(this.min=f),++this.size},a.prototype.peek=function(){return this.min?this.min.item:void 0};function r(u){for(var f=[],s=u,c=!1;!(s===u&&c);)s===u&&(c=!0),f.push(s),s=s.right;return f}function p(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 o(u,f,s){p(u,f),f.left=f,f.right=f,h(s,f),s.degree++,f.parent=s}function l(u){var f=new Array(u.size),s=r(u.root),c,d,v,m,S,M;for(c=0,d=s.length;c0&&(M=v,v=m,m=M),o(u,m,v),f[S]=null,S++;f[S]=v}for(c=0;c{var e=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,a=Math.pow(2,31)-1;g.getPointerArray=function(t){var r=t-1;if(r<=e)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(t){var r=t-1;return r<=T?Int8Array:r<=E?Int16Array:r<=a?Int32Array:Float64Array},g.getNumberType=function(t){return t===(t|0)?Math.sign(t)===-1?t<=127&&t>=-128?Int8Array:t<=32767&&t>=-32768?Int16Array:Int32Array:t<=255?Uint8Array:t<=65535?Uint16Array:Uint32Array:Float64Array};var y={Uint8Array:1,Int8Array:2,Uint16Array:3,Int16Array:4,Uint32Array:5,Int32Array:6,Float32Array:7,Float64Array:8};g.getMinimalRepresentation=function(t,r){var p=null,h=0,o,l,n,u,f;for(u=0,f=t.length;uh&&(h=o,p=l);return p},g.isTypedArray=function(t){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView(t)},g.concat=function(){var t=0,r,p,h;for(r=0,h=arguments.length;r{var e=Ji(),i=zr();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 t=T(y),r=typeof t=="number"?new Array(t):[],p=0;return e(y,function(h){r[p++]=h}),r}function a(y){var t=T(y),r=typeof t=="number"?i.getPointerArray(t):Array,p=typeof t=="number"?new Array(t):[],h=typeof t=="number"?new r(t):[],o=0;return e(y,function(l){p[o]=l,h[o]=o++}),[p,h]}g.isArrayLike=x,g.guessLength=T,g.toArray=E,g.toArrayWithIndices=a}),Ux=Le((g,e)=>{var i=Ji(),x=Wm(),T=ls(),E=x.DEFAULT_COMPARATOR,a=x.reverseComparator;function y(d,v,m,S){for(var M=v[S],A,C;S>m;){if(A=S-1>>1,C=v[A],d(M,C)<0){v[S]=C,S=A;continue}break}v[S]=M}function t(d,v,m){for(var S=v.length,M=m,A=v[m],C=2*m+1,w;C=0&&(C=w),v[m]=v[C],m=C,C=2*m+1;v[m]=A,y(d,v,M,m)}function r(d,v,m){v.push(m),y(d,v,0,v.length-1)}function p(d,v){var m=v.pop();if(v.length!==0){var S=v[0];return v[0]=m,t(d,v,0),S}return m}function h(d,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,t(d,v,0),S}function o(d,v,m){var S;return v.length!==0&&d(v[0],m)<0&&(S=v[0],v[0]=m,m=S,t(d,v,0)),m}function l(d,v){for(var m=v.length,S=m>>1,M=S;--M>=0;)t(d,v,M)}function n(d,v){for(var m=v.length,S=0,M=new Array(m);S=m.length)return m.slice().sort(d);for(P=m.slice(0,v),l(S,P),M=v,A=m.length;M0&&h(S,P,m[M]);return P.sort(d)}var L=T.guessLength(m);return L!==null&&L0&&h(S,P,O)),M++}),P.length>M&&(P.length=M),P.sort(d)}function f(d,v,m){arguments.length===2&&(m=v,v=d,d=E);var S=a(d),M,A,C,w=-1/0,P;if(v===1){if(T.isArrayLike(m)){for(M=0,A=m.length;M0)&&(w=C);return P=new m.constructor(1),P[0]=w,P}return i(m,function(O){(w===-1/0||d(O,w)>0)&&(w=O)}),[w]}if(T.isArrayLike(m)){if(v>=m.length)return m.slice().sort(S);for(P=m.slice(0,v),l(d,P),M=v,A=m.length;M0&&h(d,P,m[M]);return P.sort(S)}var L=T.guessLength(m);return L!==null&&L0&&h(d,P,O)),M++}),P.length>M&&(P.length=M),P.sort(S)}function s(d){if(this.clear(),this.comparator=d||E,typeof this.comparator!="function")throw new Error("mnemonist/Heap.constructor: given comparator should be a function.")}s.prototype.clear=function(){this.items=[],this.size=0},s.prototype.push=function(d){return r(this.comparator,this.items,d),++this.size},s.prototype.peek=function(){return this.items[0]},s.prototype.pop=function(){return this.size!==0&&this.size--,p(this.comparator,this.items)},s.prototype.replace=function(d){return h(this.comparator,this.items,d)},s.prototype.pushpop=function(d){return o(this.comparator,this.items,d)},s.prototype.consume=function(){return this.size=0,n(this.comparator,this.items)},s.prototype.toArray=function(){return n(this.comparator,this.items.slice())},s.prototype.inspect=function(){var d=this.toArray();return Object.defineProperty(d,"constructor",{value:s,enumerable:!1}),d},typeof Symbol<"u"&&(s.prototype[Symbol.for("nodejs.util.inspect.custom")]=s.prototype.inspect);function c(d){if(this.clear(),this.comparator=d||E,typeof this.comparator!="function")throw new Error("mnemonist/MaxHeap.constructor: given comparator should be a function.");this.comparator=a(this.comparator)}c.prototype=s.prototype,s.from=function(d,v){var m=new s(v),S;return T.isArrayLike(d)?S=d.slice():S=T.toArray(d),l(m.comparator,S),m.items=S,m.size=S.length,m},c.from=function(d,v){var m=new c(v),S;return T.isArrayLike(d)?S=d.slice():S=T.toArray(d),l(m.comparator,S),m.items=S,m.size=S.length,m},s.siftUp=t,s.siftDown=y,s.push=r,s.pop=p,s.replace=h,s.pushpop=o,s.heapify=l,s.consume=n,s.nsmallest=u,s.nlargest=f,s.MinHeap=s,s.MaxHeap=c,e.exports=s}),FF=Le((g,e)=>{var i="";function x(r,p,h){for(var o=p.length,l=[],n=o,u=-1,f,s=0,c;n--;)u=Math.max(r[p[n]+h],u);for(c=u>>24&&32||u>>16&&24||u>>8&&16||8;s>s&15].push(p[n]);for(f=0;f<16;f++)for(u=l[f].length;u--;)p[++n]=l[f][u]}}function T(r,p,h,o){return r[h]-r[o]||(h%3===2?r[h+1]-r[o+1]||p[h+2]-p[o+2]:p[h+1]-p[o+1])}function E(r,p){var h=[],o=[],l=2*p/3|0,n=p-l,u=l+1>>1,f=l,s=0,c,d=[],v=[];if(p===1)return[0];for(;f--;)h[f]=(f*3>>1)+1;for(f=3;f--;)x(r,h,f);for(s=o[(h[0]/3|0)+(h[0]%3===1?0:u)]=1,f=1;fthis.firstLength&&n>this.firstLength)){for(p=Math.min(this.length-l,this.length-n),o=0;or.length&&(r=this.text.slice(l,l+p))}return r},t.prototype.toString=function(){return this.array.join(",")},t.prototype.toJSON=function(){return this.array},t.prototype.inspect=function(){for(var r=new Array(this.length),p=0;p{var i=Ji();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 a(r,p){if(this.items.has(r)){var h=this.items.get(r);if(h===p)return this;this.inverse.items.delete(h)}if(this.inverse.items.has(p)){var o=this.inverse.items.get(p);if(o===r)return this;this.items.delete(o)}return this.items.set(r,p),this.inverse.items.set(p,r),this.size=this.items.size,this.inverse.size=this.inverse.items.size,this}T.prototype.set=a,x.prototype.set=a;function y(r){if(this.items.has(r)){var p=this.items.get(r);return this.items.delete(r),this.inverse.items.delete(p),this.size=this.items.size,this.inverse.size=this.inverse.items.size,!0}return!1}T.prototype.delete=y,x.prototype.delete=y;var t=["has","get","forEach","keys","values","entries"];t.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 p=new T;return i(r,function(h,o){p.set(o,h)}),p},e.exports=T}),Qn=Le((g,e)=>{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"},e.exports=i}),IM=Le(g=>{function e(a){return a|=a>>1,a|=a>>2,a|=a>>4,a|=a>>8,a|=a>>16,a&~(a>>1)}g.msb32=e;function i(a){return a|=a>>1,a|=a>>2,a|=a>>4,a&~(a>>1)}g.msb8=i,g.test=function(a,y){return a>>y&1},g.criticalBit8=function(a,y){return i(a^y)},g.criticalBit8Mask=function(a,y){return~i(a^y)>>>0&255},g.testCriticalBit8=function(a,y){return 1+(a|y)>>8},g.criticalBit32Mask=function(a,y){return~e(a^y)>>>0&4294967295},g.popcount=function(a){return a-=a>>1&1431655765,a=(a&858993459)+(a>>2&858993459),a=a+(a>>4)&252645135,a+=a>>8,a+=a>>16,a&127};var x=new Uint8Array(Math.pow(2,8));for(T=0,E=x.length;T>8&255]+x[a>>16&255]+x[a>>24&255]}}),DF=Le((g,e)=>{var i=Qn(),x=IM();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,a){var y=E>>5,t=E&31,r=this.array[y],p;return a===0||a===!1?p=this.array[y]&=~(1<>>0,p>r?this.size++:p>5,y=E&31,t=this.array[a],r;return r=this.array[a]&=~(1<>5,y=E&31,t=this.array[a],r=this.array[a]^=1<>>0,r>t?this.size++:r>5,y=E&31;return this.array[a]>>y&1},T.prototype.test=function(E){return!!this.get(E)},T.prototype.rank=function(E){if(this.size===0)return 0;for(var a=E>>5,y=E&31,t=0,r=0;r=this.length)return-1;for(var a,y=32,t=0,r=0,p=0,h=this.array.length;p>o&1,r===E)return t}},T.prototype.forEach=function(E,a){a=arguments.length>1?a:this;for(var y=this.length,t,r,p=32,h=0,o=this.array.length;h>l&1,E.call(a,r,h*32+l)}},T.prototype.values=function(){var E=this.length,a=!1,y,t,r=this.array,p=r.length,h=0,o=-1,l=32;return new i(function n(){if(!a){if(h>=p)return{done:!0};h===p-1&&(l=E%32||32),y=r[h++],a=!0,o=-1}return o++,o>=l?(a=!1,n()):(t=y>>o&1,{value:t})})},T.prototype.entries=function(){var E=this.length,a=!1,y,t,r=this.array,p,h=r.length,o=0,l=-1,n=32;return new i(function u(){if(!a){if(o>=h)return{done:!0};o===h-1&&(n=E%32||32),y=r[o++],a=!0,l=-1}return l++,p=~-o*32+l,l>=n?(a=!1,u()):(t=y>>l&1,{value:[p,t]})})},typeof Symbol<"u"&&(T.prototype[Symbol.iterator]=T.prototype.values),T.prototype.inspect=function(){var E=new Uint8Array(this.length);return this.forEach(function(a,y){E[y]=a}),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)},e.exports=T}),IF=Le((g,e)=>{var i=Qn(),x=IM(),T=function(y){return Math.max(1,Math.ceil(y*1.5))};function E(y){return new Uint32Array(Math.ceil(y/32))}function a(y){var t=y||0,r=T;typeof y=="object"&&(t=y.initialLength||y.initialCapacity||0,r=y.policy||r),this.size=0,this.length=t,this.capacity=Math.ceil(this.length/32)*32,this.policy=r,this.array=E(this.capacity)}a.prototype.set=function(y,t){if(this.length>5,p=y&31,h=this.array[r],o;return t===0||t===!1?o=this.array[r]&=~(1<>>0,o>h?this.size++:o>5,r=y&31,p=this.array[t],h;return h=this.array[t]&=~(1<>5,r=y&31,p=this.array[t],h=this.array[t]^=1<>>0,h>p?this.size++:hthis.array.length?(this.array=new Uint32Array(p),this.array.set(r,0)):this.array=r.slice(0,p),this.capacity=y,this)},a.prototype.grow=function(y){var t;if(typeof y=="number"){if(this.capacity>=y)return this;for(t=this.capacity;t>5,p=t&31;return this.array[r]|=1<>5,r=y&31;return this.array[t]>>r&1}},a.prototype.get=function(y){if(!(this.length>5,r=y&31;return this.array[t]>>r&1}},a.prototype.test=function(y){return this.length>5,r=y&31,p=0,h=0;h=this.length)return-1;for(var t,r=32,p=0,h=0,o=0,l=this.array.length;o>n&1,h===y)return p}},a.prototype.forEach=function(y,t){t=arguments.length>1?t:this;for(var r=this.length,p,h,o=32,l=0,n=this.array.length;l>u&1,y.call(t,h,l*32+u)}},a.prototype.values=function(){var y=this.length,t=!1,r,p,h=this.array,o=h.length,l=0,n=-1,u=32;return new i(function f(){if(!t){if(l>=o)return{done:!0};l===o-1&&(u=y%32||32),r=h[l++],t=!0,n=-1}return n++,n>=u?(t=!1,f()):(p=r>>n&1,{value:p})})},a.prototype.entries=function(){var y=this.length,t=!1,r,p,h=this.array,o,l=h.length,n=0,u=-1,f=32;return new i(function s(){if(!t){if(n>=l)return{done:!0};n===l-1&&(f=y%32||32),r=h[n++],t=!0,u=-1}return u++,o=~-n*32+u,u>=f?(t=!1,s()):(p=r>>u&1,{value:[o,p]})})},typeof Symbol<"u"&&(a.prototype[Symbol.iterator]=a.prototype.values),a.prototype.inspect=function(){var y=new Uint8Array(this.length);return this.forEach(function(t,r){y[r]=t}),Object.defineProperty(y,"constructor",{value:a,enumerable:!1}),y},typeof Symbol<"u"&&(a.prototype[Symbol.for("nodejs.util.inspect.custom")]=a.prototype.inspect),a.prototype.toJSON=function(){return Array.from(this.array.slice(0,(this.length>>5)+1))},e.exports=a}),NF=Le((g,e)=>{function i(E,a){return(E&65535)*a+(((E>>>16)*a&65535)<<16)&4294967295}function x(E,a){return(E&65535)+(a>>>16)+(((E>>>16)+a&65535)<<16)&4294967295}function T(E,a){return E<>>32-a}e.exports=function(E,a){var y=3432918353,t=461845907,r=15,p=13,h=5,o=1801774676,l=E,n,u,f;for(u=0,f=a.length-4;u<=f;u+=4)n=a[u]|a[u+1]<<8|a[u+2]<<16|a[u+3]<<24,n=i(n,y),n=T(n,r),n=i(n,t),l^=n,l=T(l,p),l=i(l,h),l=x(l,o);switch(n=0,a.length&3){case 3:n^=a[u+2]<<16;case 2:n^=a[u+1]<<8;case 1:n^=a[u],n=i(n,y),n=T(n,r),n=i(n,t),l^=n}return l^=a.length,l^=l>>>16,l=i(l,2246822507),l^=l>>>13,l=i(l,3266489909),l^=l>>>16,l>>>0}}),BF=Le((g,e)=>{var i=NF(),x=Ji(),T=Math.LN2*Math.LN2,E={errorRate:.005};function a(r){var p=new Uint16Array(r.length),h,o;for(h=0,o=r.length;h>3]|=n}return this},t.prototype.test=function(r){for(var p=a(r),h=0,o=this.hashFunctions;h>3]&1<<(7&l)))return!1}return!0},t.prototype.toJSON=function(){return this.data},t.from=function(r,p){if(!p&&(p=r.length||r.size,typeof p!="number"))throw new Error("BloomFilter.from: could not infer the filter's capacity. Try passing it as second argument.");var h=new t(p);return x(r,function(o){h.add(o)}),h},e.exports=t}),UF=Le((g,e)=>{var i=Ji();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,a;a=this.distance(T,E.item),!!E.children[a];)E=E.children[a];return E.children[a]={item:T,children:{}},this.size++,this},x.prototype.search=function(T,E){if(!this.root)return[];for(var a=[],y=[this.root],t,r,p,h,o;y.length;)for(t=y.pop(),p=this.distance(E,t.item),p<=T&&a.push({item:t.item,distance:p}),h=p-T,o=p+T+1;h{var i=ls(),x=Qn();function T(E,a){if(arguments.length<2)throw new Error("mnemonist/fixed-deque: expecting an Array class and a capacity.");if(typeof a!="number"||a<=0)throw new Error("mnemonist/fixed-deque: `capacity` should be a positive number.");this.ArrayClass=E,this.capacity=a,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 a=this.start+this.size;return a>=this.capacity&&(a-=this.capacity),this.items[a]=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 a=this.start-1;return this.start===0&&(a=this.capacity-1),this.items[a]=E,this.start=a,++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,a){a=arguments.length>1?a:this;for(var y=this.capacity,t=this.size,r=this.start,p=0;p=y)return{done:!0};var p=E[t];return t++,r++,t===a&&(t=0),{value:p,done:!1}})},T.prototype.entries=function(){var E=this.items,a=this.capacity,y=this.size,t=this.start,r=0;return new x(function(){if(r>=y)return{done:!0};var p=E[t];return t++,t===a&&(t=0),{value:[r++,p],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,a,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 t=new T(a,y);if(i.isArrayLike(E)){var r,p;for(r=0,p=E.length;r{var i=ls(),x=NM();function T(a,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=a,this.capacity=y,this.items=new a(this.capacity),this.clear()}function E(a){T.prototype[a]=x.prototype[a]}Object.keys(x.prototype).forEach(E),typeof Symbol<"u"&&Object.getOwnPropertySymbols(x.prototype).forEach(E),T.prototype.push=function(a){var y=this.start+this.size;return y>=this.capacity&&(y-=this.capacity),this.items[y]=a,this.size===this.capacity?(y++,y>=this.capacity?this.start=0:this.start=y,this.size):++this.size},T.prototype.unshift=function(a){var y=this.start-1;return this.start===0&&(y=this.capacity-1),this.items[y]=a,this.size===this.capacity?(this.start=y,this.size):(this.start=y,++this.size)},T.from=function(a,y,t){if(arguments.length<3&&(t=i.guessLength(a),typeof t!="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,t);if(i.isArrayLike(a)){var p,h;for(p=0,h=a.length;p{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++}},e.exports=i}),VF=Le((g,e)=>{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),e.exports=i}),HF=Le((g,e)=>{var i=zr();function x(T){var E=i.getPointerArray(T),a=i.getPointerArray(Math.log2(T));this.size=T,this.dimension=T,this.parents=new E(T),this.ranks=new a(T);for(var y=0;yr?this.parents[y]=a:(this.parents[y]=a,this.ranks[a]++),this},x.prototype.connected=function(T,E){var a=this.find(T);return a===this.find(E)},x.prototype.mapping=function(){for(var T=i.getPointerArray(this.dimension),E={},a=new T(this.size),y=0,t,r=0,p=this.parents.length;r"u"?(a[r]=y,E[t]=y++):a[r]=E[t];return a},x.prototype.compile=function(){for(var T={},E=new Array(this.dimension),a=0,y,t=0,r=this.parents.length;t"u"?(E[a]=[t],T[y]=a++):E[T[y]].push(t);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),e.exports=x}),zx=Le((g,e)=>{var i=Wm(),x=Ux(),T=i.DEFAULT_COMPARATOR,E=i.reverseComparator;function a(r,p,h,o){for(var l=h,n=o,u=p[o],f=2*o+1,s;f=0&&(f=s),p[o]=p[f],o=f,f=2*o+1;p[o]=u,x.siftDown(r,p,n,o)}function y(r,p,h,o){for(var l=o,n=l,u=new r(o),f,s;n>0;)f=h[--n],n!==0&&(s=h[0],h[0]=f,a(p,h,--o,0),f=s),u[n]=f;return u}function t(r,p,h){if(arguments.length===2&&(h=p,p=null),this.ArrayClass=r,this.capacity=h,this.items=new r(h),this.clear(),this.comparator=p||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)}t.prototype.clear=function(){this.size=0},t.prototype.push=function(r){return this.size0&&x.replace(this.comparator,this.items,r),this.size},t.prototype.peek=function(){return this.items[0]},t.prototype.consume=function(){var r=y(this.ArrayClass,this.comparator,this.items,this.size);return this.size=0,r},t.prototype.toArray=function(){return y(this.ArrayClass,this.comparator,this.items.slice(0,this.size),this.size)},t.prototype.inspect=function(){var r=this.toArray();return Object.defineProperty(r,"constructor",{value:t,enumerable:!1}),r},typeof Symbol<"u"&&(t.prototype[Symbol.for("nodejs.util.inspect.custom")]=t.prototype.inspect),e.exports=t}),WF=Le((g,e)=>{var i=Ji(),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 a=this.writeHashFunction(E);return this.items.set(a,E),this.size=this.items.size,this},T.prototype.set=function(E,a){return E=this.writeHashFunction(E),this.items.set(E,a),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,a){a=arguments.length>1?a:this,this.items.forEach(function(y){E.call(a,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,a,y){var t=new T(a);return i(E,function(r,p){y?t.set(p,r):t.add(r)}),t},e.exports=T}),BM=Le((g,e)=>{var i=Qn(),x=Ji();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,a){var y=this.items.get(E),t;return y||(this.dimension++,y=new this.Container,this.items.set(E,y)),this.Container===Set?(t=y.size,y.add(a),t"u"?0:this.Container===Set?a.size:a.length},T.prototype.count=T.prototype.multiplicity,T.prototype.forEach=function(E,a){a=arguments.length>1?a:this;var y;function t(r){E.call(a,r,y)}this.items.forEach(function(r,p){y=p,r.forEach(t)})},T.prototype.forEachAssociation=function(E,a){a=arguments.length>1?a:this,this.items.forEach(E,a)},T.prototype.keys=function(){return this.items.keys()},T.prototype.values=function(){var E=this.items.values(),a=!1,y,t,r,p;return this.Container===Set?new i(function h(){if(!a){if(t=E.next(),t.done)return{done:!0};a=!0,y=t.value.values()}return t=y.next(),t.done?(a=!1,h()):{done:!1,value:t.value}}):new i(function h(){if(!a){if(t=E.next(),t.done)return{done:!0};a=!0,y=t.value,r=0,p=y.length}return r>=p?(a=!1,h()):{done:!1,value:y[r++]}})},T.prototype.entries=function(){var E=this.items.entries(),a=!1,y,t,r,p,h;return this.Container===Set?new i(function o(){if(!a){if(t=E.next(),t.done)return{done:!0};a=!0,r=t.value[0],y=t.value[1].values()}return t=y.next(),t.done?(a=!1,o()):{done:!1,value:[r,t.value]}}):new i(function o(){if(!a){if(t=E.next(),t.done)return{done:!0};a=!0,r=t.value[0],y=t.value[1],p=0,h=y.length}return p>=h?(a=!1,o()):{done:!1,value:[r,y[p++]]}})},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,a){var y=new T(a);return x(E,function(t,r){y.set(r,t)}),y},e.exports=T}),XF=Le((g,e)=>{var i=BM(),x=Ji(),T=function(a){return a};function E(a,y){if(this.items=new i(y),this.clear(),Array.isArray(a)?(this.writeHashFunction=a[0],this.readHashFunction=a[1]):(this.writeHashFunction=a,this.readHashFunction=a),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(a){var y=this.writeHashFunction(a);return this.items.set(y,a),this.size=this.items.size,this.dimension=this.items.dimension,this},E.prototype.set=function(a,y){return a=this.writeHashFunction(a),this.items.set(a,y),this.size=this.items.size,this.dimension=this.items.dimension,this},E.prototype.get=function(a){return a=this.readHashFunction(a),this.items.get(a)},E.prototype.has=function(a){return a=this.readHashFunction(a),this.items.has(a)},E.prototype.forEach=function(a,y){y=arguments.length>1?y:this,this.items.forEach(function(t){a.call(y,t,t)})},E.prototype.values=function(){return this.items.values()},typeof Symbol<"u"&&(E.prototype[Symbol.iterator]=E.prototype.values),E.prototype.inspect=function(){var a=Array.from(this);return Object.defineProperty(a,"constructor",{value:E,enumerable:!1}),a},typeof Symbol<"u"&&(E.prototype[Symbol.for("nodejs.util.inspect.custom")]=E.prototype.inspect),E.from=function(a,y,t,r){arguments.length===3&&typeof t=="boolean"&&(r=t,t=Array);var p=new E(y,t);return x(a,function(h,o){r?p.set(o,h):p.add(h)}),p},e.exports=E}),YF=Le((g,e)=>{var i=1024;function x(E){return(E&E-1)===0}function T(E,a){if(arguments.length<1)throw new Error("mnemonist/hashed-array-tree: expecting at least a byte array constructor.");var y=a||0,t=i,r=0;if(typeof a=="object"&&(y=a.initialCapacity||0,r=a.initialLength||0,t=a.blockSize||i),!t||!x(t))throw new Error("mnemonist/hashed-array-tree: block size should be a power of two.");var p=Math.max(r,y),h=Math.ceil(p/t);this.ArrayClass=E,this.length=r,this.capacity=h*t,this.blockSize=t,this.offsetMask=t-1,this.blockMask=Math.log2(t),this.blocks=new Array(h);for(var o=0;o>this.blockMask,t=E&this.offsetMask;return this.blocks[y][t]=a,this},T.prototype.get=function(E){if(!(this.length>this.blockMask,y=E&this.offsetMask;return this.blocks[a][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,t=a&this.offsetMask;return this.blocks[y][t]=E,++this.length},T.prototype.pop=function(){if(this.length!==0){var E=this.blocks[this.blocks.length-1],a=--this.length&this.offsetMask;return E[a]}},T.prototype.inspect=function(){for(var E=new this.ArrayClass(this.length),a,y=0,t=this.length;y>this.blockMask,E[y]=this.blocks[a][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),e.exports=T}),UM=Le((g,e)=>{var i=Qn(),x=ls();function T(E,a){if(arguments.length<2)throw new Error("mnemonist/fixed-stack: expecting an Array class and a capacity.");if(typeof a!="number"||a<=0)throw new Error("mnemonist/fixed-stack: `capacity` should be a positive number.");this.capacity=a,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,a){a=arguments.length>1?a:this;for(var y=0,t=this.items.length;y=a)return{done:!0};var t=E[a-y-1];return y++,{value:t,done:!1}})},T.prototype.entries=function(){var E=this.items,a=this.size,y=0;return new i(function(){if(y>=a)return{done:!0};var t=E[a-y-1];return{value:[y++,t],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,a,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 t=new T(a,y);if(x.isArrayLike(E)){var r,p;for(r=0,p=E.length;r{var i=ls(),x=zr(),T=UM();function E(y,t,r,p,h,o,l,n){var u=l+(n-l)/2|0,f=~-u,s=-~u,c=r[u];p[o]=c+1;var d=t?t(y[c]):y[c][1],v=o*2+1,m=o*2+2,S=-1/0,M=-1/0;l<=f&&(S=E(y,t,r,p,h,v,l,f)),s<=n&&(M=E(y,t,r,p,h,m,s,n));var A=Math.max(d,S,M),C=c;return A===S?C=h[p[v]-1]:A===M&&(C=h[p[m]-1]),h[c]=C,A}function a(y,t){this.size=y.length,this.intervals=y;var r=null,p=null;Array.isArray(t)&&(r=t[0],p=t[1]);var h=y.length,o=x.getPointerArray(h+1),l=new o(h),n;for(n=1;nv?1:0});var u=Math.ceil(Math.log2(h+1)),f=Math.pow(2,u)-1,s=new o(f),c=new o(h);E(y,p,l,s,c,0,0,h-1),l=null,this.height=u,this.tree=s,this.augmentations=c,this.startGetter=r,this.endGetter=p,this.stack=new T(o,this.height)}a.prototype.intervalsContainingPoint=function(y){var t=[],r=this.stack;r.clear(),r.push(0);for(var p=this.tree.length,h,o,l,n,u,f,s,c,d;r.size;)h=r.pop(),o=this.tree[h]-1,l=this.intervals[o],n=this.intervals[this.augmentations[o]],s=this.endGetter?this.endGetter(n):n[1],!(y>s)&&(c=h*2+1,c=u&&y<=f&&t.push(l),!(yd)&&(v=l*2+1,v=s&&t<=c&&p.push(u),!(r{g.search=function(e,i,x,T){var E=0;x=typeof x<"u"?x:0,T=typeof T<"u"?T:e.length,T--;for(var a;x<=T;)if(E=x+T>>>1,a=e[E],a>i)T=~-E;else if(a>>1,y=e(i[T],x),y>0)a=~-T;else if(y<0)E=-~T;else return T;return-1},g.lowerBound=function(e,i,x,T){var E=0;for(x=typeof x<"u"?x:0,T=typeof T<"u"?T:e.length;x>>1,i<=e[E]?T=E:x=-~E;return x},g.lowerBoundWithComparator=function(e,i,x){for(var T=0,E=0,a=i.length;E>>1,e(x,i[T])<=0?a=T:E=-~T;return E},g.lowerBoundIndices=function(e,i,x,T,E){var a=0;for(T=typeof T<"u"?T:0,E=typeof E<"u"?E:e.length;T>>1,x<=e[i[a]]?E=a:T=-~a;return T},g.upperBound=function(e,i,x,T){var E=0;for(x=typeof x<"u"?x:0,T=typeof T<"u"?T:e.length;x>>1,i>=e[E]?x=-~E:T=E;return x},g.upperBoundWithComparator=function(e,i,x){for(var T=0,E=0,a=i.length;E>>1,e(x,i[T])>=0?E=-~T:a=T;return E}}),KF=Le(g=>{var e=zr(),i=ls().isArrayLike,x=zM(),T=Bx();function E(r,p){if(r.length===0)return p.slice();if(p.length===0)return r.slice();var h;r[0]>p[0]&&(h=r,r=p,p=h);var o=r[r.length-1],l=p[0];if(o<=l)return e.isTypedArray(r)?e.concat(r,p):r.concat(p);var n=new r.constructor(r.length+p.length),u,f,s;for(u=0,f=r.length;up[0]&&(h=r,r=p,p=h);var o=r[r.length-1],l=p[0];if(op[0]&&(h=r,r=p,p=h);var o=r[r.length-1],l=p[0];if(ov?s=x.lowerBound(p,d,s+1):(n.push(d),u++,s++);return n};function y(r){var p=0,h=-1/0,o,l,n,u=[];for(l=0,n=r.length;lh&&(h=o));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(p),s=e.getPointerArray(h),c=new s(r.length),d=new T(function(S,M){return S=r[S][c[S]],M=r[M][c[M]],SM?1:0});for(l=0;lp&&(p=h));if(n.length===0)return new r[0].constructor(0);if(n.length===1)return n[0].slice();if(n.length===2)return a(n[0],n[1]);r=n;var u=new r[0].constructor,f=e.getPointerArray(p),s=new f(r.length),c=new T(function(m,S){return m=r[m][s[m]],S=r[S][s[S]],mS?1:0});for(o=0;op&&(p=o),lh)return[];if(p===h)return[p];var s,c,d=r[0],v,m,S,M,A,C,w=p;for(u=1;uC?m=x.lowerBound(c,A,m+1):(d.push(A),v++,m++);if(d.length===0)return d;w=d[0]}return d},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 a(arguments[0],arguments[1])}else if(i(arguments[0]))return t(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}}),jF=Le((g,e)=>{var i=Qn(),x=Ji(),T=KF();function E(y){return y}function a(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.")}a.prototype.clear=function(){this.items=[],this.mapping=new Map,this.size=0,this.dimension=0},a.prototype.add=function(y){this.size++;var t=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 p=new Set,h,o,l=0,n=r.length;l"u"||r.length===0)return[];if(t.length>1)for(h=1,o=t.length;h"u"||p.length===0)return[];r=T.intersectionUniqueArrays(r,p)}var l=new Array(r.length);for(h=0,o=l.length;h1?t:this;for(var r=0,p=this.documents.length;r=t)return{done:!0};var p=y[r++];return{value:p,done:!1}})},a.prototype.tokens=function(){return this.mapping.keys()},typeof Symbol<"u"&&(a.prototype[Symbol.iterator]=a.prototype.documents),a.prototype.inspect=function(){var y=this.items.slice();return Object.defineProperty(y,"constructor",{value:a,enumerable:!1}),y},typeof Symbol<"u"&&(a.prototype[Symbol.for("nodejs.util.inspect.custom")]=a.prototype.inspect),a.from=function(y,t){var r=new a(t);return x(y,function(p){r.add(p)}),r},e.exports=a}),GM=Le(g=>{var e=new Float64Array(64),i=new Float64Array(64);function x(E,a,y){var t,r,p,h,o;for(e[0]=a,i[0]=y,r=0;r>=0;)if(p=e[r],h=i[r]-1,p=t&&pi[r-1]-e[r-1]&&(o=e[r],e[r]=e[r-1],e[r-1]=o,o=i[r],i[r]=i[r-1],i[r-1]=o)}else r--;return E}g.inplaceQuickSort=x;function T(E,a,y,t){var r,p,h,o,l,n;for(e[0]=y,i[0]=t,p=0;p>=0;)if(h=e[p],o=i[p]-1,h=r&&hi[p-1]-e[p-1]&&(n=e[p],e[p]=e[p-1],e[p-1]=n,n=i[p],i[p]=i[p-1],i[p-1]=n)}else p--;return a}g.inplaceQuickSortIndices=T}),ZF=Le((g,e)=>{var i=ls(),x=zr(),T=Wm().createTupleComparator,E=zx(),a=GM().inplaceQuickSortIndices;function y(l,n,u,f){var s,c=0,d;for(s=0;s>>1),P=u[w],d[D]=P,A>-1&&(C===0?v[A]=D+1:m[A]=D+1),I=(I+1)%l,w!==L&&w!==O-1&&S.push([I,w+1,O,D,1]),w!==L&&S.push([I,L,w,D,0]),D++;return{axes:n,labels:f,pivots:d,lefts:v,rights:m}}function p(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}p.prototype.nearestNeighbor=function(l){var n=1/0,u=null,f=this.dimensions,s=this.axes,c=this.pivots,d=this.lefts,v=this.rights,m=0;function S(M,A){m++;var C=d[A],w=v[A],P=c[A],L=y(f,s,P,l);if(!(L0?C!==0&&S(M,C-1):w!==0&&S(M,w-1),O*O0?w!==0&&S(M,w-1):C!==0&&S(M,C-1))}}return S(0,0),this.visited=m,this.labels[u]};var h=T(3),o=T(2);p.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,s=this.axes,c=this.pivots,d=this.lefts,v=this.rights,m=0;function S(C,w){var P=d[w],L=v[w],O=c[w],I=y(f,s,O,n);u.push([I,m++,O]);var D=n[C],B=s[C][O],G=D-B;C=(C+1)%f,D{var i=Qn(),x=Ji();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 a={item:E,next:null};return this.head?(this.tail.next=a,this.tail=a):(this.head=a,this.tail=a),this.size++,this.size},T.prototype.unshift=function(E){var a={item:E,next:null};return this.head?(this.head.next||(this.tail=this.head),a.next=this.head,this.head=a):(this.head=a,this.tail=a),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,a){if(this.size){a=arguments.length>1?a:this;for(var y=this.head,t=0;y;)E.call(a,y.item,t,this),y=y.next,t++}},T.prototype.toArray=function(){if(!this.size)return[];for(var E=new Array(this.size),a=0,y=this.size,t=this.head;a{var i=Qn(),x=Ji(),T=zr(),E=ls();function a(y,t,r){if(arguments.length<2&&(r=y,y=null,t=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 p=T.getPointerArray(r);this.forward=new p(r),this.backward=new p(r),this.K=typeof y=="function"?new y(r):new Array(r),this.V=typeof t=="function"?new t(r):new Array(r),this.size=0,this.head=0,this.tail=0,this.items={}}a.prototype.clear=function(){this.size=0,this.head=0,this.tail=0,this.items={}},a.prototype.splayOnTop=function(y){var t=this.head;if(this.head===y)return this;var r=this.backward[y],p=this.forward[y];return this.tail===y?this.tail=r:this.backward[p]=r,this.forward[r]=p,this.backward[t]=y,this.head=y,this.forward[y]=t,this},a.prototype.set=function(y,t){var r=this.items[y];if(typeof r<"u"){this.splayOnTop(r),this.V[r]=t;return}this.size1?t:this;for(var r=0,p=this.size,h=this.head,o=this.K,l=this.V,n=this.forward;r=t)return{done:!0};var o=p[r];return y++,y=t)return{done:!0};var o=p[r];return y++,y=t)return{done:!0};var l=p[r],n=h[r];return y++,y{var i=Gx(),x=Ji(),T=zr(),E=ls();function a(t,r,p){arguments.length<2?i.call(this,t):i.call(this,t,r,p);var h=T.getPointerArray(this.capacity);this.deleted=new h(this.capacity),this.deletedSize=0}for(y in i.prototype)a.prototype[y]=i.prototype[y];var y;typeof Symbol<"u"&&(a.prototype[Symbol.iterator]=i.prototype[Symbol.iterator]),a.prototype.clear=function(){i.prototype.clear.call(this),this.deletedSize=0},a.prototype.set=function(t,r){var p=this.items[t];if(typeof p<"u"){this.splayOnTop(p),this.V[p]=r;return}this.size0?p=this.deleted[--this.deletedSize]:p=this.size,this.size++):(p=this.tail,this.tail=this.backward[p],delete this.items[this.K[p]]),this.items[t]=p,this.K[p]=t,this.V[p]=r,this.forward[p]=this.head,this.backward[this.head]=p,this.head=p},a.prototype.setpop=function(t,r){var p=null,h=null,o=this.items[t];return typeof o<"u"?(this.splayOnTop(o),p=this.V[o],this.V[o]=r,{evicted:!1,key:t,value:p}):(this.size0?o=this.deleted[--this.deletedSize]:o=this.size,this.size++):(o=this.tail,this.tail=this.backward[o],p=this.V[o],h=this.K[o],delete this.items[h]),this.items[t]=o,this.K[o]=t,this.V[o]=r,this.forward[o]=this.head,this.backward[this.head]=o,this.head=o,h?{evicted:!0,key:h,value:p}:null)},a.prototype.delete=function(t){var r=this.items[t];if(typeof r>"u")return!1;if(delete this.items[t],this.size===1)return this.size=0,this.head=0,this.tail=0,this.deletedSize=0,!0;var p=this.backward[r],h=this.forward[r];return this.head===r&&(this.head=h),this.tail===r&&(this.tail=p),this.forward[p]=h,this.backward[h]=p,this.size--,this.deleted[this.deletedSize++]=r,!0},a.prototype.remove=function(t,r=void 0){var p=this.items[t];if(typeof p>"u")return r;var h=this.V[p];if(delete this.items[t],this.size===1)return this.size=0,this.head=0,this.tail=0,this.deletedSize=0,h;var o=this.backward[p],l=this.forward[p];return this.head===p&&(this.head=l),this.tail===p&&(this.tail=o),this.forward[o]=l,this.backward[l]=o,this.size--,this.deleted[this.deletedSize++]=p,h},a.from=function(t,r,p,h){if(arguments.length<2){if(h=E.guessLength(t),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,p=null);var o=new a(r,p,h);return x(t,function(l,n){o.set(n,l)}),o},e.exports=a}),VM=Le((g,e)=>{var i=Gx(),x=Ji(),T=zr(),E=ls();function a(y,t,r){if(arguments.length<2&&(r=y,y=null,t=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 p=T.getPointerArray(r);this.forward=new p(r),this.backward=new p(r),this.K=typeof y=="function"?new y(r):new Array(r),this.V=typeof t=="function"?new t(r):new Array(r),this.size=0,this.head=0,this.tail=0,this.items=new Map}a.prototype.clear=function(){this.size=0,this.head=0,this.tail=0,this.items.clear()},a.prototype.set=function(y,t){var r=this.items.get(y);if(typeof r<"u"){this.splayOnTop(r),this.V[r]=t;return}this.size{var i=VM(),x=Ji(),T=zr(),E=ls();function a(t,r,p){arguments.length<2?i.call(this,t):i.call(this,t,r,p);var h=T.getPointerArray(this.capacity);this.deleted=new h(this.capacity),this.deletedSize=0}for(y in i.prototype)a.prototype[y]=i.prototype[y];var y;typeof Symbol<"u"&&(a.prototype[Symbol.iterator]=i.prototype[Symbol.iterator]),a.prototype.clear=function(){i.prototype.clear.call(this),this.deletedSize=0},a.prototype.set=function(t,r){var p=this.items.get(t);if(typeof p<"u"){this.splayOnTop(p),this.V[p]=r;return}this.size0?p=this.deleted[--this.deletedSize]:p=this.size,this.size++):(p=this.tail,this.tail=this.backward[p],this.items.delete(this.K[p])),this.items.set(t,p),this.K[p]=t,this.V[p]=r,this.forward[p]=this.head,this.backward[this.head]=p,this.head=p},a.prototype.setpop=function(t,r){var p=null,h=null,o=this.items.get(t);return typeof o<"u"?(this.splayOnTop(o),p=this.V[o],this.V[o]=r,{evicted:!1,key:t,value:p}):(this.size0?o=this.deleted[--this.deletedSize]:o=this.size,this.size++):(o=this.tail,this.tail=this.backward[o],p=this.V[o],h=this.K[o],this.items.delete(h)),this.items.set(t,o),this.K[o]=t,this.V[o]=r,this.forward[o]=this.head,this.backward[this.head]=o,this.head=o,h?{evicted:!0,key:h,value:p}:null)},a.prototype.delete=function(t){var r=this.items.get(t);if(typeof r>"u")return!1;if(this.items.delete(t),this.size===1)return this.size=0,this.head=0,this.tail=0,this.deletedSize=0,!0;var p=this.backward[r],h=this.forward[r];return this.head===r&&(this.head=h),this.tail===r&&(this.tail=p),this.forward[p]=h,this.backward[h]=p,this.size--,this.deleted[this.deletedSize++]=r,!0},a.prototype.remove=function(t,r=void 0){var p=this.items.get(t);if(typeof p>"u")return r;var h=this.V[p];if(this.items.delete(t),this.size===1)return this.size=0,this.head=0,this.tail=0,this.deletedSize=0,h;var o=this.backward[p],l=this.forward[p];return this.head===p&&(this.head=l),this.tail===p&&(this.tail=o),this.forward[o]=l,this.backward[l]=o,this.size--,this.deleted[this.deletedSize++]=p,h},a.from=function(t,r,p,h){if(arguments.length<2){if(h=E.guessLength(t),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,p=null);var o=new a(r,p,h);return x(t,function(l,n){o.set(n,l)}),o},e.exports=a}),_F=Le((g,e)=>{var i=Qn(),x=Ji(),T=zx(),E=function(y,t){return y[1]>t[1]?-1:y[1]"u"?0:t},a.prototype.get=a.prototype.multiplicity,a.prototype.count=a.prototype.multiplicity,a.prototype.frequency=function(y){if(this.size===0)return 0;var t=this.multiplicity(y);return t/this.size},a.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 t=new T(Array,E,y),r=this.items.entries(),p;p=r.next(),!p.done;)t.push(p.value);return t.consume()},a.prototype.forEach=function(y,t){t=arguments.length>1?t:this;var r;this.items.forEach(function(p,h){for(r=0;r1?t:this,this.items.forEach(y,t)},a.prototype.keys=function(){return this.items.keys()},a.prototype.values=function(){var y=this.items.entries(),t=!1,r,p,h,o;return new i(function l(){if(!t){if(r=y.next(),r.done)return{done:!0};t=!0,p=r.value[0],h=r.value[1],o=0}return o>=h?(t=!1,l()):(o++,{done:!1,value:p})})},a.prototype.multiplicities=function(){return this.items.entries()},typeof Symbol<"u"&&(a.prototype[Symbol.iterator]=a.prototype.values),a.prototype.inspect=function(){return this.items},typeof Symbol<"u"&&(a.prototype[Symbol.for("nodejs.util.inspect.custom")]=a.prototype.inspect),a.prototype.toJSON=function(){return this.items},a.from=function(y){var t=new a;return x(y,function(r){t.add(r)}),t},a.isSubset=function(y,t){var r=y.multiplicities(),p,h,o;if(y===t)return!0;if(y.dimension>t.dimension)return!1;for(;p=r.next(),!p.done;)if(h=p.value[0],o=p.value[1],t.multiplicity(h){var i=Qn(),x=Ji();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,s=n+1;fn.length?-1:l.lengthn?1:0}function y(l,n){var u=l+1,f=n/u|0,s=f+1,c,d,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()}o.prototype.clear=function(){this.size=0,this.strings=[],this.invertedIndices={}},o.prototype.add=function(l){var n=l.length,u=this.size;this.strings.push(l),this.size++;var f=t(this.k,l),s=this.invertedIndices[n];typeof s>"u"&&(s={},this.invertedIndices[n]=s);var c,d,v,m,S;for(m=0,S=f.length;m"u"?(d=[u],s[v]=d):d.push(u);return this},o.prototype.search=function(l){var n=l.length,u=this.k,f=new Set,s,c,d,v,m,S,M,A,C,w,P,L,O,I,D;for(A=Math.max(0,n-u),C=n+u+1;A1?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"&&(o.prototype[Symbol.iterator]=o.prototype.values),o.prototype.inspect=function(){var l=this.strings.slice();return Object.defineProperty(l,"constructor",{value:o,enumerable:!1}),l},typeof Symbol<"u"&&(o.prototype[Symbol.for("nodejs.util.inspect.custom")]=o.prototype.inspect),o.from=function(l,n,u){var f=new o(n,u);return x(l,function(s){f.add(s)}),f},o.countKeys=E,o.comparator=a,o.partition=y,o.segments=t,o.segmentPos=r,o.multiMatchAwareInterval=p,o.multiMatchAwareSubstrings=h,e.exports=o}),t4=Le((g,e)=>{var i=Qn(),x=Ji();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,a){a=arguments.length>1?a:this;for(var y=this.offset,t=0,r=this.items.length;y=E.length)return{done:!0};var y=E[a];return a++,{value:y,done:!1}})},T.prototype.entries=function(){var E=this.items,a=this.offset,y=0;return new i(function(){if(a>=E.length)return{done:!0};var t=E[a];return a++,{value:[y++,t],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 a=new T;return x(E,function(y){a.enqueue(y)}),a},T.of=function(){return T.from(arguments)},e.exports=T}),e4=Le((g,e)=>{var i=Qn(),x=Ji();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,a){a=arguments.length>1?a:this;for(var y=0,t=this.items.length;y=a)return{done:!0};var t=E[a-y-1];return y++,{value:t,done:!1}})},T.prototype.entries=function(){var E=this.items,a=E.length,y=0;return new i(function(){if(y>=a)return{done:!0};var t=E[a-y-1];return{value:[y++,t],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 a=new T;return x(E,function(y){a.push(y)}),a},T.of=function(){return T.from(arguments)},e.exports=T}),i4=Le(g=>{g.intersection=function(){if(arguments.length<2)throw new Error("mnemonist/Set.intersection: needs at least two arguments.");var e=new Set,i=1/0,x=null,T,E,a=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(e,i){return g.isSubset(i,e)},g.add=function(e,i){for(var x=i.values(),T;T=x.next(),!T.done;)e.add(T.value)},g.subtract=function(e,i){for(var x=i.values(),T;T=x.next(),!T.done;)e.delete(T.value)},g.intersect=function(e,i){for(var x=e.values(),T;T=x.next(),!T.done;)i.has(T.value)||e.delete(T.value)},g.disjunct=function(e,i){for(var x=e.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;)e.has(T.value)||e.add(T.value);for(var a=0,y=E.length;ai.size&&(x=e,e=i,i=x),e.size===0)return 0;if(e===i)return e.size;for(var T=e.values(),E,a=0;E=T.next(),!E.done;)i.has(E.value)&&a++;return a},g.unionSize=function(e,i){var x=g.intersectionSize(e,i);return e.size+i.size-x},g.jaccard=function(e,i){var x=g.intersectionSize(e,i);if(x===0)return 0;var T=e.size+i.size-x;return x/T},g.overlap=function(e,i){var x=g.intersectionSize(e,i);return x===0?0:x/Math.min(e.size,i.size)}}),n4=Le((g,e)=>{var i=Qn(),x=zr().getPointerArray;function T(E){var a=x(E);this.start=0,this.size=0,this.capacity=E,this.dense=new a(E),this.sparse=new a(E)}T.prototype.clear=function(){this.start=0,this.size=0},T.prototype.has=function(E){if(this.size===0)return!1;var a=this.sparse[E],y=a=this.start&&a=this.start&&a1?a:this;for(var y=this.capacity,t=this.size,r=this.start,p=0;p=y)return{done:!0};var p=E[t];return t++,r++,t===a&&(t=0),{value:p,done:!1}})},typeof Symbol<"u"&&(T.prototype[Symbol.iterator]=T.prototype.values),T.prototype.inspect=function(){var E=[];return this.forEach(function(a){E.push(a)}),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),e.exports=T}),r4=Le((g,e)=>{var i=Qn(),x=zr().getPointerArray;function T(E,a){arguments.length<2&&(a=E,E=Array);var y=x(a);this.size=0,this.length=a,this.dense=new y(a),this.sparse=new y(a),this.vals=new E(a)}T.prototype.clear=function(){this.size=0},T.prototype.has=function(E){var a=this.sparse[E];return a=this.size||this.dense[a]!==E?!1:(a=this.dense[this.size-1],this.dense[this.sparse[E]]=a,this.sparse[a]=this.sparse[E],this.size--,!0)},T.prototype.forEach=function(E,a){a=arguments.length>1?a:this;for(var y=0;y{var i=Qn(),x=zr().getPointerArray;function T(E){var a=x(E);this.size=0,this.length=E,this.dense=new a(E),this.sparse=new a(E)}T.prototype.clear=function(){this.size=0},T.prototype.has=function(E){var a=this.sparse[E];return a=this.size||this.dense[a]!==E?!1:(a=this.dense[this.size-1],this.dense[this.sparse[E]]=a,this.sparse[a]=this.sparse[E],this.size--,!0)},T.prototype.forEach=function(E,a){a=arguments.length>1?a:this;for(var y,t=0;t{var i=Ji(),x=2,T=2,E=new Set([0,1,2]),a={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 t(n,u,f){return{term:n||"",distance:u||0,count:f||0}}function r(n,u,f,s){s=s||new Set,u++;var c,d=n.length,v;if(d>1)for(v=0;v0&&n[v].length-d.length>s.length-d.length&&(f.suggestions=new Set,f.count=0),(u===2||!f.suggestions.size||n[v].length-d.length>=s.length-d.length)&&f.suggestions.add(c)}function h(n,u){var f=n.length,s=u.length,c=[[]],d=f+s,v=new Map,m,S,M;for(c[0][0]=d,m=0;m<=f;m++)c[m+1]||(c[m+1]=[]),c[m+1][1]=m,c[m+1][0]=d;for(M=0;M<=s;M++)c[1][M+1]=M,c[0][M+1]=d;var A=n+u,C;for(m=0,S=A.length;mc)return[];for(var m=[d],S=new Set,M=new Set,A=[],C,w;m.length>0&&(C=m.shift(),!(f<2&&A.length>0&&v-C.length>A[0].distance));){if(w=n[C],w!==void 0){if(typeof w=="number"&&(w=y(w)),w.count>0&&!M.has(C)){M.add(C);var P=t(C,v-C.length,w.count);if(A.push(P),f<2&&v-C.length===0)break}w.suggestions.forEach(D=>{var B=u[D];if(!M.has(B)){M.add(B);var G=0;if(d!==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,W=0,k=B.length;z0||W>0?G=h(B.substr(z,k-z-W),d.substr(z,v-z-W)):G=h(B,d)}if(f<2&&A.length>0&&A[0].distance>G&&(A=[]),!(f<2&&A.length>0&&G>A[0].distance)&&G<=s){var J=n[B];J!==void 0&&A.push(t(B,G,J.count))}}})}if(v-C.length0&&v-C.length>=A[0].distance)continue;for(var L=0,O=C.length;Lthis.maxLength&&(this.maxLength=n.length)),u.count===1){var f=this.words.length;this.words.push(n);var s=r(n,0,this.maxDistance);s.forEach(c=>{var d=this.dictionary[c];d!==void 0?(typeof d=="number"&&(d=y(d),this.dictionary[c]=d),d.suggestions.has(f)||p(this.words,this.verbosity,d,n,f,c)):this.dictionary[c]=f})}return this.size++,this},l.prototype.search=function(n){return o(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=a[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(s){f.add(s)}),f},e.exports=l}),HM=Le((g,e)=>{var i=Ji(),x=Qn(),T="\0";function E(a){this.mode=a===Array?"array":"string",this.clear()}E.prototype.clear=function(){this.root={},this.size=0},E.prototype.set=function(a,y){for(var t=this.root,r,p=0,h=a.length;p"u")return;if(T in y)return y[T]},E.prototype.delete=function(a){var y=this.root,t=null,r=null,p,h,o,l;for(o=0,l=a.length;o"u")return!1;t!==null?Object.keys(y).length>1&&(t=null,r=null):Object.keys(y).length<2&&(t=p,r=h)}return T in y?(this.size--,t?delete t[r]:delete y[T],!0):!1},E.prototype.has=function(a){for(var y=this.root,t,r=0,p=a.length;r"u")return!1;return T in y},E.prototype.find=function(a){var y=typeof a=="string",t=this.root,r=[],p,h,o;for(h=0,o=a.length;h"u")return r;for(var l=[t],n=[a],u;l.length;){a=n.pop(),t=l.pop();for(u in t){if(u===T){r.push([a,t[T]]);continue}l.push(t[u]),n.push(y?a+u:a.concat(u))}}return r},E.prototype.values=function(a){var y=this.root,t=[],r,p,h;if(a){for(p=0,h=a.length;p"u")return x.empty()}return t.push(y),new x(function(){for(var o,l=!1,n;t.length;){o=t.pop();for(n in o){if(n===T){l=!0;continue}t.push(o[n])}if(l)return{done:!1,value:o[T]}}return{done:!0}})},E.prototype.prefixes=function(a){var y=this.root,t=[],r=[],p,h,o,l=this.mode==="string";if(a){for(h=0,o=a.length;h"u")return x.empty()}else a=l?"":[];return t.push(y),r.push(a),new x(function(){for(var n,u,f=!1,s;t.length;){n=t.pop(),u=r.pop();for(s in n){if(s===T){f=!0;continue}t.push(n[s]),r.push(l?u+s:u.concat(s))}if(f)return{done:!1,value:u}}return{done:!0}})},E.prototype.keys=E.prototype.prefixes,E.prototype.entries=function(a){var y=this.root,t=[],r=[],p,h,o,l=this.mode==="string";if(a){for(h=0,o=a.length;h"u")return x.empty()}else a=l?"":[];return t.push(y),r.push(a),new x(function(){for(var n,u,f=!1,s;t.length;){n=t.pop(),u=r.pop();for(s in n){if(s===T){f=!0;continue}t.push(n[s]),r.push(l?u+s:u.concat(s))}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 a=new Array(this.size),y=this.entries(),t,r=0;t=y.next(),!t.done;)a[r++]=t.value;return Object.defineProperty(a,"constructor",{value:E,enumerable:!1}),a},typeof Symbol<"u"&&(E.prototype[Symbol.for("nodejs.util.inspect.custom")]=E.prototype.inspect),E.prototype.toJSON=function(){return this.root},E.from=function(a){var y=new E;return i(a,function(t,r){y.set(r,t)}),y},E.SENTINEL=T,e.exports=E}),o4=Le((g,e)=>{var i=Ji(),x=HM(),T="\0";function E(y){this.mode=y===Array?"array":"string",this.clear()}for(a in x.prototype)E.prototype[a]=x.prototype[a];var a;delete E.prototype.set,delete E.prototype.get,delete E.prototype.values,delete E.prototype.entries,E.prototype.add=function(y){for(var t=this.root,r,p=0,h=y.length;p"u")return p;for(var n=[r],u=[y],f;n.length;){y=u.pop(),r=n.pop();for(f in r){if(f===T){p.push(y);continue}n.push(r[f]),u.push(t?y+f:y.concat(f))}}return p},typeof Symbol<"u"&&(E.prototype[Symbol.iterator]=E.prototype.keys),E.prototype.inspect=function(){for(var y=new Set,t=this.keys(),r;r=t.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 t=new E;return i(y,function(r){t.add(r)}),t},E.SENTINEL=T,e.exports=E}),l4=Le((g,e)=>{var i=Qn(),x=Ji(),T=ls(),E=zr(),a=function(p){return Math.max(1,Math.ceil(p*1.5))},y=function(p){var h=E.getPointerArray(p);return new h(p)};function t(p,h){if(arguments.length<1)throw new Error("mnemonist/vector: expecting at least a byte array constructor.");var o=h||0,l=a,n=0,u=!1;typeof h=="object"&&(o=h.initialCapacity||0,n=h.initialLength||0,l=h.policy||l,u=h.factory===!0),this.factory=u?p:null,this.ArrayClass=p,this.length=n,this.capacity=Math.max(n,o),this.policy=l,this.array=new p(this.capacity)}t.prototype.set=function(p,h){if(this.lengththis.capacity)if(this.factory===null?this.array=new this.ArrayClass(p):this.array=this.factory(p),E.isTypedArray(this.array))this.array.set(h,0);else for(var o=0,l=this.length;o=p)return this;for(h=this.capacity;h=h)return{done:!0};var l=p[o];return o++,{value:l,done:!1}})},t.prototype.entries=function(){var p=this.array,h=this.length,o=0;return new i(function(){if(o>=h)return{done:!0};var l=p[o];return{value:[o++,l],done:!1}})},typeof Symbol<"u"&&(t.prototype[Symbol.iterator]=t.prototype.values),t.prototype.inspect=function(){var p=this.array.slice(0,this.length);return p.type=this.array.constructor.name,p.items=this.length,p.capacity=this.capacity,Object.defineProperty(p,"constructor",{value:t,enumerable:!1}),p},typeof Symbol<"u"&&(t.prototype[Symbol.for("nodejs.util.inspect.custom")]=t.prototype.inspect),t.from=function(p,h,o){if(arguments.length<3&&(o=T.guessLength(p),typeof o!="number"))throw new Error("mnemonist/vector.from: could not guess iterable length. Please provide desired capacity as last argument.");var l=new t(h,o);return x(p,function(n){l.push(n)}),l};function r(p){var h=function(l){t.call(this,p,l)};for(var o in t.prototype)t.prototype.hasOwnProperty(o)&&(h.prototype[o]=t.prototype[o]);return h.from=function(l,n){return t.from(l,p,n)},typeof Symbol<"u"&&(h.prototype[Symbol.iterator]=h.prototype.values),h}t.Int8Vector=r(Int8Array),t.Uint8Vector=r(Uint8Array),t.Uint8ClampedVector=r(Uint8ClampedArray),t.Int16Vector=r(Int16Array),t.Uint16Vector=r(Uint16Array),t.Int32Vector=r(Int32Array),t.Uint32Vector=r(Uint32Array),t.Float32Vector=r(Float32Array),t.Float64Vector=r(Float64Array),t.PointerVector=r(y),e.exports=t}),h4=Le((g,e)=>{var i=ls(),x=zr(),T=GM().inplaceQuickSortIndices,E=zM().lowerBoundIndices,a=Ux(),y=x.getPointerArray;function t(h,o){return h.distanceo.distance?-1:0}function r(h,o,l){for(var n=l.length,u=y(n),f=0,s=new u(n),c=new u(n),d=new u(n),v=new Float64Array(n),m=[0,0,n],S=new Float64Array(n),M,A,C,w,P,L,O,I,D;m.length;)if(P=m.pop(),w=m.pop(),M=m.pop(),A=l[P-1],P--,D=P-w,s[M]=A,D!==0){if(D===1){O=h(o[A],o[l[w]]),v[M]=O,f++,d[M]=f,s[f]=l[w];continue}for(I=w;I0&&(f++,d[M]=f,m.push(f,L,P)),L-w>0&&(f++,c[M]=f,m.push(f,w,L))}return{nodes:s,lefts:c,rights:d,mus:v}}function p(h,o){if(typeof h!="function")throw new Error("mnemonist/VPTree.constructor: given `distance` must be a function.");if(!o)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 a(t),this.D=0;var l=i.toArrayWithIndices(o);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}p.prototype.nearestNeighbors=function(h,o){var l=this.heap,n=[0],u=1/0,f,s,c,d,v,m,S;for(this.D=0;n.length;)f=n.pop(),s=this.nodes[f],c=this.items[s],S=this.distance(c,o),this.D++,Sh&&l.pop(),l.size>=h&&(u=l.peek().distance)),d=this.lefts[f],v=this.rights[f],!(!d&&!v)&&(m=this.mus[f],S=m-u&&n.push(v)):(v&&S>=m-u&&n.push(v),d&&S=0;A--)M[A]=l.pop();return M},p.prototype.neighbors=function(h,o){var l=[],n=[0],u,f,s,c,d,v,m;for(this.D=0;n.length;)u=n.pop(),f=this.nodes[u],s=this.items[f],m=this.distance(s,o),this.D++,m<=h&&l.push({distance:m,item:s}),c=this.lefts[u],d=this.rights[u],!(!c&&!d)&&(v=this.mus[u],m=v-h&&n.push(d)):(d&&m>=v-h&&n.push(d),c&&m{var i=Ux(),x=Bx(),T=FF();e.exports={BiMap:OF(),BitSet:DF(),BitVector:IF(),BloomFilter:BF(),BKTree:UF(),CircularBuffer:zF(),DefaultMap:GF(),DefaultWeakMap:VF(),FixedDeque:NM(),StaticDisjointSet:HF(),FibonacciHeap:x,MinFibonacciHeap:x.MinFibonacciHeap,MaxFibonacciHeap:x.MaxFibonacciHeap,FixedReverseHeap:zx(),FuzzyMap:WF(),FuzzyMultiMap:XF(),HashedArrayTree:YF(),Heap:i,MinHeap:i.MinHeap,MaxHeap:i.MaxHeap,StaticIntervalTree:kF(),InvertedIndex:jF(),KDTree:ZF(),LinkedList:JF(),LRUCache:Gx(),LRUCacheWithDelete:$F(),LRUMap:VM(),LRUMapWithDelete:QF(),MultiMap:BM(),MultiSet:_F(),PassjoinIndex:qF(),Queue:t4(),FixedStack:UM(),Stack:e4(),SuffixArray:T,GeneralizedSuffixArray:T.GeneralizedSuffixArray,Set:i4(),SparseQueueSet:n4(),SparseMap:r4(),SparseSet:s4(),SymSpell:a4(),Trie:o4(),TrieMap:HM(),Vector:l4(),VPTree:h4()}}),Ot=class Tn{static get ZERO(){return new Tn(0,0)}static get ONE(){return new Tn(1,1)}static get UP(){return new Tn(0,-1)}static get DOWN(){return new Tn(0,1)}static get LEFT(){return new Tn(-1,0)}static get RIGHT(){return new Tn(1,0)}static get UP_LEFT(){return new Tn(-1,-1)}static get UP_RIGHT(){return new Tn(1,-1)}static get DOWN_RIGHT(){return new Tn(1,1)}static get DOWN_LEFT(){return new Tn(-1,1)}constructor(e,i){typeof e=="number"?(this.x=e,this.y=i||0):(this.x=e.x,this.y=e.y)}clone(){return new Tn(this.x,this.y)}add(e){return new Tn(this.x+e.x,this.y+e.y)}multiply(e){return new Tn(this.x*e.x,this.y*e.y)}divide(e){return new Tn(this.x/e.x,this.y/e.y)}subtract(e){return new Tn(this.x-e.x,this.y-e.y)}equals(e){return this.x===e.x&&this.y===e.y}abs(){return new Tn(Math.abs(this.x),Math.abs(this.y))}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}modulo(e){return new Tn(this.x%e.x,this.y%e.y)}scalarModulo(e){return new Tn(this.x%e,this.y%e)}scalarMult(e){return new Tn(this.x*e,this.y*e)}toPosition(){return{x:this.x,y:this.y}}toString(){return`${this.x}#${this.y}`}},Qe=class{static equal(g,e){return g.position.x===e.position.x&&g.position.y===e.position.y&&g.layer===e.layer}static copyOver(g,e){e.position.x=g.position.x,e.position.y=g.position.y,e.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 Ot(g.position.x,g.position.y),layer:g.charLayer}}static fromInternal(g){return{position:g.position.toPosition(),charLayer:g.layer}}},f4=(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))(f4||{}),c4={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"},d4={up:Ot.UP,down:Ot.DOWN,left:Ot.LEFT,right:Ot.RIGHT,none:Ot.ZERO,"up-left":Ot.UP_LEFT,"up-right":Ot.UP_RIGHT,"down-right":Ot.DOWN_RIGHT,"down-left":Ot.DOWN_LEFT},rm={up:0,"up-right":1,right:2,"down-right":3,down:4,"down-left":5,left:6,"up-left":7,none:NaN},WM=["up","up-right","right","down-right","down","down-left","left","up-left"],p4=["down-left","down-right","up-right","up-left"];function Vx(){return["up","down","left","right","none","up-left","up-right","down-right","down-left"]}function Uc(g){return p4.includes(g)}function v4(g,e=1){return g==="none"?"none":WM[(rm[g]+8-Math.abs(e)%8)%8]}function XM(g,e=1){return g==="none"?"none":WM[(rm[g]+e)%8]}function wh(g){return d4[g]}function m4(g){return c4[g]}function Rs(g,e){if(g.x===e.x){if(g.y>e.y)return"up";if(g.ye.x)return"left";if(g.xe.x){if(g.ye.y)return"up-left"}else if(g.xe.y)return"up-right"}return"none"}var g4=(g=>(g[g.FOUR=4]="FOUR",g[g.EIGHT=8]="EIGHT",g))(g4||{});function $u(g){return typeof g=="string"&&Vx().includes(g)}var yy=function(g,e){return yy=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])},yy(g,e)};function Sd(g,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");yy(g,e);function i(){this.constructor=g}g.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)}function y4(g,e,i,x){function T(E){return E instanceof i?E:new i(function(a){a(E)})}return new(i||(i=Promise))(function(E,a){function y(p){try{r(x.next(p))}catch(h){a(h)}}function t(p){try{r(x.throw(p))}catch(h){a(h)}}function r(p){p.done?E(p.value):T(p.value).then(y,t)}r((x=x.apply(g,e||[])).next())})}function YM(g,e){var i={label:0,sent:function(){if(E[0]&1)throw E[1];return E[1]},trys:[],ops:[]},x,T,E,a;return a={next:y(0),throw:y(1),return:y(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function y(r){return function(p){return t([r,p])}}function t(r){if(x)throw new TypeError("Generator is already executing.");for(;a&&(a=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(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Kc(g,e){var i=typeof Symbol=="function"&&g[Symbol.iterator];if(!i)return g;var x=i.call(g),T,E=[],a;try{for(;(e===void 0||e-- >0)&&!(T=x.next()).done;)E.push(T.value)}catch(y){a={error:y}}finally{try{T&&!T.done&&(i=x.return)&&i.call(x)}finally{if(a)throw a.error}}return E}function jc(g,e,i){if(i||arguments.length===2)for(var x=0,T=e.length,E;x1||y(o,l)})})}function y(o,l){try{t(x[o](l))}catch(n){h(E[0][3],n)}}function t(o){o.value instanceof sf?Promise.resolve(o.value.v).then(r,p):h(E[0][2],o)}function r(o){y("next",o)}function p(o){y("throw",o)}function h(o,l){o(l),E.shift(),E.length&&y(E[0][0],E[0][1])}}function S4(g){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=g[Symbol.asyncIterator],i;return e?e.call(g):(g=typeof hf=="function"?hf(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(a){return new Promise(function(y,t){a=g[E](a),T(y,t,a.done,a.value)})}}function T(E,a,y,t){Promise.resolve(t).then(function(r){E({value:r,done:y})},a)}}function bn(g){return typeof g=="function"}function kM(g){var e=function(x){Error.call(x),x.stack=new Error().stack},i=g(e);return i.prototype=Object.create(Error.prototype),i.prototype.constructor=i,i}var c0=kM(function(g){return function(e){g(this),this.message=e?e.length+` errors occurred during unsubscription: +`+e.map(function(i,x){return x+1+") "+i.toString()}).join(` + `):"",this.name="UnsubscriptionError",this.errors=e}});function xy(g,e){if(g){var i=g.indexOf(e);0<=i&&g.splice(i,1)}}var Xm=function(){function g(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return g.prototype.unsubscribe=function(){var e,i,x,T,E;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var y=hf(a),t=y.next();!t.done;t=y.next()){var r=t.value;r.remove(this)}}catch(u){e={error:u}}finally{try{t&&!t.done&&(i=y.return)&&i.call(y)}finally{if(e)throw e.error}}else a.remove(this);var p=this.initialTeardown;if(bn(p))try{p()}catch(u){E=u instanceof c0?u.errors:[u]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var o=hf(h),l=o.next();!l.done;l=o.next()){var n=l.value;try{KS(n)}catch(u){E=E??[],u instanceof c0?E=jc(jc([],Kc(E)),Kc(u.errors)):E.push(u)}}}catch(u){x={error:u}}finally{try{l&&!l.done&&(T=o.return)&&T.call(o)}finally{if(x)throw x.error}}}if(E)throw new c0(E)}},g.prototype.add=function(e){var i;if(e&&e!==this)if(this.closed)KS(e);else{if(e instanceof g){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(i=this._finalizers)!==null&&i!==void 0?i:[]).push(e)}},g.prototype._hasParent=function(e){var i=this._parentage;return i===e||Array.isArray(i)&&i.includes(e)},g.prototype._addParent=function(e){var i=this._parentage;this._parentage=Array.isArray(i)?(i.push(e),i):i?[i,e]:e},g.prototype._removeParent=function(e){var i=this._parentage;i===e?this._parentage=null:Array.isArray(i)&&xy(i,e)},g.prototype.remove=function(e){var i=this._finalizers;i&&xy(i,e),e instanceof g&&e._removeParent(this)},g.EMPTY=function(){var e=new g;return e.closed=!0,e}(),g}(),KM=Xm.EMPTY;function jM(g){return g instanceof Xm||g&&"closed"in g&&bn(g.remove)&&bn(g.add)&&bn(g.unsubscribe)}function KS(g){bn(g)?g():g.unsubscribe()}var ZM={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},T4={setTimeout:function(g,e){for(var i=[],x=2;x0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(i){return this._throwIfClosed(),g.prototype._trySubscribe.call(this,i)},e.prototype._subscribe=function(i){return this._throwIfClosed(),this._checkFinalizedStatuses(i),this._innerSubscribe(i)},e.prototype._innerSubscribe=function(i){var x=this,T=this,E=T.hasError,a=T.isStopped,y=T.observers;return E||a?KM:(this.currentObservers=null,y.push(i),new Xm(function(){x.currentObservers=null,xy(y,i)}))},e.prototype._checkFinalizedStatuses=function(i){var x=this,T=x.hasError,E=x.thrownError,a=x.isStopped;T?i.error(E):a&&i.complete()},e.prototype.asObservable=function(){var i=new bs;return i.source=this,i},e.create=function(i,x){return new ZS(i,x)},e}(bs),ZS=function(g){Sd(e,g);function e(i,x){var T=g.call(this)||this;return T.destination=i,T.source=x,T}return e.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)},e.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)},e.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)},e.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:KM},e}(ki),_M=new bs(function(g){return g.complete()});function O4(g){return g&&bn(g.schedule)}function qM(g){return g[g.length-1]}function t2(g){return O4(qM(g))?g.pop():void 0}function e2(g,e){return typeof qM(g)=="number"?g.pop():e}var i2=function(g){return g&&typeof g.length=="number"&&typeof g!="function"};function n2(g){return bn(g?.then)}function r2(g){return bn(g[Wx])}function s2(g){return Symbol.asyncIterator&&bn(g?.[Symbol.asyncIterator])}function a2(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 D4(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var o2=D4();function l2(g){return bn(g?.[o2])}function h2(g){return x4(this,arguments,function(){var e,i,x,T;return YM(this,function(E){switch(E.label){case 0:e=g.getReader(),E.label=1;case 1:E.trys.push([1,,9,10]),E.label=2;case 2:return[4,sf(e.read())];case 3:return i=E.sent(),x=i.value,T=i.done,T?[4,sf(void 0)]:[3,5];case 4:return[2,E.sent()];case 5:return[4,sf(x)];case 6:return[4,E.sent()];case 7:return E.sent(),[3,2];case 8:return[3,10];case 9:return e.releaseLock(),[7];case 10:return[2]}})})}function u2(g){return bn(g?.getReader)}function Oh(g){if(g instanceof bs)return g;if(g!=null){if(r2(g))return I4(g);if(i2(g))return N4(g);if(n2(g))return B4(g);if(s2(g))return f2(g);if(l2(g))return U4(g);if(u2(g))return z4(g)}throw a2(g)}function I4(g){return new bs(function(e){var i=g[Wx]();if(bn(i.subscribe))return i.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function N4(g){return new bs(function(e){for(var i=0;i{let T=this.tilePosInDirection(new Ot(i,x),g);return this.tilemap.hasBlockingTile(T,e,m4(g),this.ignoreMissingTiles)})}isCharBlocking(g,e){return this.someCharTile((i,x)=>{let T=this.tilePosInDirection(new Ot(i,x),g);return this.tilemap.hasBlockingChar(T,e,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(wh(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 e of g)this.labels.add(e)}getLabels(){return[...this.labels.values()]}hasLabel(g){return this.labels.has(g)}clearLabels(){this.labels.clear()}removeLabels(g){for(let e of g)this.labels.delete(e)}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 e=Math.max(0,Math.min(lh,g));this.movementProgress=e}hasWalkedHalfATile(){return this.movementProgress>lh/2}willCrossTileBorderThisUpdate(g){return this.movementProgress+this.maxProgressForDelta(g)>=lh}updateCharacterPosition(g){let e=this.willCrossTileBorderThisUpdate(g),i=1-(e?lh-this.movementProgress:this.maxProgressForDelta(g))/this.maxProgressForDelta(g);this.movementProgress=Math.min(this.movementProgress+this.maxProgressForDelta(g),lh),e&&(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 e=g/1e3;return Math.floor(e*this.speed*lh)}get tilePos(){return Qe.clone(this._tilePos)}set tilePos(g){Qe.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,e){return g.add(wh(this.tilemap.toMapDirection(e)))}shouldContinueMoving(){return this.lastMovementImpulse!=="none"&&!this.isBlockingDirection(this.lastMovementImpulse)}stopMoving(){if(this.movementDirection==="none")return;let g=this.tilePos,e=this.getNextTilePos(),i=this.movementDirection;this.tilePos=this.getNextTilePos(),this.movementDirection="none",this.movementStopped$.next(i),this.fire(this.positionChangeFinished$,g,e)}fire(g,{position:e,layer:i},{position:x,layer:T}){g.next({exitTile:e,enterTile:x,exitLayer:i,enterLayer:T})}someCharTile(g){let e=this.getNextTilePos().position;for(let i=e.x;ithis.isLayerAlwaysOnTop(T));this.tilemap.layers.filter(T=>!this.isLayerAlwaysOnTop(T)).forEach(T=>{this.hasLayerProp(T,hh.HEIGHT_SHIFT_PROP_NAME)?(this.createHeightShiftLayers(T,i),e.push(T.tilemapLayer)):this.setDepth(T,++i)}),this.charLayerDepths.set(void 0,i),x.forEach((T,E)=>{T.tilemapLayer.setDepth(E+1+i)}),e.forEach(T=>T.destroy())}setDepth(e,i){e.tilemapLayer.setDepth(i),this.isCharLayer(e)&&this.charLayerDepths.set(this.getLayerProp(e,hh.CHAR_LAYER_PROP_NAME),i)}createHeightShiftLayers(e,i){let x=this.getLayerProp(e,hh.HEIGHT_SHIFT_PROP_NAME);isNaN(x)&&(x=0);let T=1;for(let E=0;ET.name==i);return x?.value}hasLayerProp(e,i){return this.getLayerProp(e,i)!=null}copyLayer(e,i){let x=`${e.name}#${i}`,T=this.tilemap.createBlankLayer(x,e.tilemapLayer.tileset);if(T){if(T.name=x,this.isIsometric())for(let E=i;E>=0;E--){let a=i-E;T.putTileAt(e.data[E][a],a,E)}else for(let E=0;Ey===this.charData.id)).subscribe(({direction:y})=>{var t;(t=this.animation)==null||t.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 e;this.container=g,this.cachedContainerHeight=(e=g?.getBounds().height)!=null?e: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 e;this.geHeadless.isMoving(this.charData.id)||g!="none"&&(this.geHeadless.turnTowards(this.charData.id,g),(e=this.animation)==null||e.setStandingFrame(g))}getAnimation(){return this.animation}setAnimation(g){this.animation=g}update(g){this.updateGridChar()}getEngineOffset(){var g,e,i,x;if(!this.sprite)return Ot.ZERO;let T=this.tilemap.getTileWidth()/2-Math.floor(((e=(g=this.sprite)==null?void 0:g.displayWidth)!=null?e:0)/2),E=-((x=(i=this.sprite)==null?void 0:i.displayHeight)!=null?x:0)+this.tilemap.getTileHeight();return new Ot(T,E)}updatePixelPos(){let g=new Ot(this.geHeadless.getPosition(this.charData.id)),e=this.geHeadless.getMovementProgress(this.charData.id)/1e3,i=this.tilemap.tilePosToPixelPos(g).add(this.getEngineOffset()).add(this.customOffset).add(wh(this.geHeadless.getFacingDirection(this.charData.id)).multiply(this.tilemap.getTileDistance(this.geHeadless.getFacingDirection(this.charData.id)).scalarMult(e))),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 e=this.geHeadless.getMovementProgress(this.charData.id)>lh/2;(g=this.getAnimation())==null||g.updateCharacterFrame(this.geHeadless.getFacingDirection(this.charData.id),e,Number(this.sprite.frame.name))}this.updateDepth()}resetAnimation(g){let e=new JS(this.walkingAnimationMapping,g.texture.source[0].width/g.width/JS.FRAMES_CHAR_ROW);this.setAnimation(e),e.frameChange().pipe(ws(this.newSpriteSet$)).subscribe(i=>{g?.setFrame(i)}),e.setIsEnabled(this.walkingAnimationMapping!==void 0),e.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 Ot(this.geHeadless.getPosition(this.charData.id)),e=this.geHeadless.getCharLayer(this.charData.id);this.container?this.setContainerDepth(this.container,{position:g,layer:e}):this.sprite&&this.setSpriteDepth(this.sprite,{position:g,layer:e});let i=this.getLayerOverlaySprite();if(i){let x=new Ot(al(Gi({},g),{y:g.y-1}));this.setSpriteDepth(i,{position:x,layer:e})}}setSpriteDepth(g,e){g.setDepth(this.tilemap.getDepthOfCharLayer(this.getTransitionLayer(e))+this.getPaddedPixelDepthSprite(g))}setContainerDepth(g,e){g.setDepth(this.tilemap.getDepthOfCharLayer(this.getTransitionLayer(e))+this.getPaddedPixelDepthContainer(g))}getPaddedPixelDepthContainer(g){return My.shiftPad(g.y+this.cachedContainerHeight,Ay.Z_INDEX_PADDING)}getPaddedPixelDepthSprite(g){return My.shiftPad(g.y+g.displayHeight,Ay.Z_INDEX_PADDING)}getTransitionLayer(g){if(g.layer)return this.geHeadless.getTransition(g.position,g.layer)||g.layer}},tO=(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))(tO||{}),y2=(g=>(g.STOP="STOP",g.CLOSEST_REACHABLE="CLOSEST_REACHABLE",g.RETRY="RETRY",g.ALTERNATIVE_TARGETS="ALTERNATIVE_TARGETS",g))(y2||{}),eO=class{distance(g,e){return Js.manhattanDistance(g,e)}direction(g,e){if(Js.equal(g,e))return"none";let i=g.clone().subtract(e);return Math.abs(i.x)>Math.abs(i.y)?i.x>0?"left":"right":i.y>0?"up":"down"}neighbors(g){return[new Ot(g.x,g.y+1),new Ot(g.x+1,g.y),new Ot(g.x-1,g.y),new Ot(g.x,g.y-1)]}getDirections(){return["up","right","down","left"]}},iO=class{distance(g,e){return Js.chebyshevDistance(g,e)}neighbors(g){let e=[new Ot(g.x,g.y+1),new Ot(g.x+1,g.y),new Ot(g.x-1,g.y),new Ot(g.x,g.y-1)],i=[new Ot(g.x+1,g.y+1),new Ot(g.x+1,g.y-1),new Ot(g.x-1,g.y+1),new Ot(g.x-1,g.y-1)];return[...e,...i]}direction(g,e){return e.x>g.x?e.y>g.y?"down-right":e.yg.y?"down-left":e.yg.y?"down":"none"}getDirections(){return["up","right","down","left","down-left","down-right","up-right","up-left"]}},Zc=class{static create(g){switch(g){case 4:return new eO;case 8:return new iO}}},$S=class{constructor(g,e,i){this.backoffMs=g,this.maxRetries=e,this.onFinished=i,this.retries=0,this.elapsed=0}retry(g,e){this.shouldRetry()?(this.elapsed+=g,this.elapsed>=this.backoffMs&&(this.elapsed=0,this.retries++,e())):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))(x2||{}),Ym=class{constructor(g,{shortestPathAlgorithm:e="BFS",pathWidth:i=1,pathHeight:x=1,numberOfDirections:T=4,isPositionAllowed:E=(u,f)=>!0,collisionGroups:a=[],ignoredChars:y=[],ignoreTiles:t=!1,ignoreMapBounds:r=!1,ignoreBlockedTarget:p=!1,maxPathLength:h=1/0,ignoreLayers:o=!1,considerCosts:l=!1,calculateClosestToTarget:n=!0}={}){this.gridTilemap=g,this.options={shortestPathAlgorithm:e,pathWidth:i,pathHeight:x,numberOfDirections:T,isPositionAllowed:E,collisionGroups:a,ignoredChars:y,ignoreTiles:t,ignoreMapBounds:r,ignoreBlockedTarget:p,maxPathLength:h,ignoreLayers:o,considerCosts:l,calculateClosestToTarget:n},this.ignoredCharsSet=new Set(y)}findShortestPath(g,e){this.options.ignoreLayers&&(this.gridTilemap.fixCacheLayer(g.layer),e.layer=g.layer);let i=this.findShortestPathImpl(g,e);return this.gridTilemap.unfixCacheLayers(),i}getNeighbors(g,e){var i;return Zc.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&&Qe.equal(x,e))}getTransition(g,e){if(!this.options.ignoreLayers)return this.gridTilemap.getTransition(g,e)}getCosts(g,e){if(!this.options.considerCosts)return 1;let i=Rs(e.position,g);return this.gridTilemap.getTileCosts(e,i)}isBlocking(g,e){return!(this.options.ignoreMapBounds||this.gridTilemap.isInRange(e.position))||!this.options.isPositionAllowed(e.position,e.layer)||!this.options.ignoreTiles&&this.hasBlockingTileFrom(g,e,this.options.pathWidth,this.options.pathHeight,this.options.ignoreMapBounds,this.gridTilemap)?!0:this.hasBlockingCharFrom(g,e,this.options.pathWidth,this.options.pathHeight,this.options.collisionGroups,this.ignoredCharsSet,this.gridTilemap)}distance(g,e){return(this.options.numberOfDirections===4?Js.manhattanDistance:Js.chebyshevDistance)(g,e)}getTilePosInDir(g,e){return this.options.ignoreLayers?{position:g.position.add(wh(this.gridTilemap.toMapDirection(e))),layer:g.layer}:this.gridTilemap.getTilePosInDirection(g,e)}getReverseNeighbors(g,e){var i;let x=Zc.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(a=>({position:E,layer:a||g.layer})):[{position:E,layer:g.layer}]).flat().filter(E=>!this.isBlocking(E,g)||this.options.ignoreBlockedTarget&&Qe.equal(g,e))}hasBlockingCharFrom(g,e,i,x,T,E,a){if(i===1&&x===1)return a.hasBlockingChar(e.position,e.layer,T,E);let y=r=>a.hasBlockingChar(r,e.layer,T,E),t=Rs(g.position,e.position);return this.isBlockingMultiTile(g,t,i,x,y)}hasBlockingTileFrom(g,e,i,x,T,E){if(i===1&&x===1)return E.hasBlockingTile(e.position,e.layer,Rs(e.position,g.position),T);let a=Rs(g.position,e.position),y=t=>E.hasBlockingTile(t,e.layer,a,T);return this.isBlockingMultiTile(g,a,i,x,y)}isBlockingMultiTile(g,e,i,x,T){let E={src:new Ot(g.position.x+i,g.position.y),dest:new Ot(g.position.x+i,g.position.y+x-1)},a={src:new Ot(g.position.x-1,g.position.y),dest:new Ot(g.position.x-1,g.position.y+x-1)},y={src:new Ot(g.position.x,g.position.y-1),dest:new Ot(g.position.x+i-1,g.position.y-1)},t={src:new Ot(g.position.x,g.position.y+x),dest:new Ot(g.position.x+i-1,g.position.y+x)};switch(e){case"right":return this.checkLine(E,T);case"left":return this.checkLine(a,T);case"up":return this.checkLine(y,T);case"down":return this.checkLine(t,T);case"up-left":return this.checkLine({src:y.src,dest:new Ot(y.dest.x-1,y.dest.y)},T)||this.checkLine({src:new Ot(a.src.x,a.src.y-1),dest:new Ot(a.dest.x,a.dest.y-1)},T);case"up-right":return this.checkLine({src:new Ot(y.src.x+1,y.src.y),dest:y.dest},T)||this.checkLine({src:new Ot(E.src.x,E.src.y-1),dest:new Ot(E.dest.x,E.dest.y-1)},T);case"down-left":return this.checkLine({src:new Ot(a.src.x,a.src.y+1),dest:new Ot(a.dest.x,a.dest.y+1)},T)||this.checkLine({src:t.src,dest:new Ot(t.dest.x-1,t.dest.y)},T);case"down-right":return this.checkLine({src:new Ot(t.src.x+1,t.src.y),dest:t.dest},T)||this.checkLine({src:new Ot(E.src.x,E.src.y+1),dest:new Ot(E.dest.x,E.dest.y+1)},T)}return!1}checkLine(g,e){for(let i=g.src.x;i<=g.dest.x;i++)for(let x=g.src.y;x<=g.dest.y;x++)if(e(new Ot(i,x)))return!0;return!1}},nO=DM(Bx(),1),rO=class extends Ym{findShortestPathImpl(g,e){let i=this.shortestPathBfs(g,e);return{path:this.returnPath(i.previous,g,e),closestToTarget:i.closestToTarget,steps:i.steps,maxPathLengthReached:i.maxPathLengthReached,algorithmUsed:"A_STAR"}}shortestPathBfs(g,e){let i=new Map,x=new Map,T=new Map,E=new nO.MinFibonacciHeap((r,p)=>mc(T,r)-mc(T,p)),a=g,y=this.distance(g.position,e.position),t=0;for(E.push(g),x.set(Qe.toString(g),0),T.set(Qe.toString(g),this.distance(g.position,e.position));E.size>0;){let r=E.pop();if(!r)break;t++;let p=this.distance(r.position,e.position);if(pthis.options.maxPathLength)return{previous:new Map,closestToTarget:a,steps:t,maxPathLengthReached:!0};for(let h of this.getNeighbors(r,e)){let o=mc(x,r)+this.getCosts(r.position,h),l=Qe.toString(h);(!x.has(l)||o0;){let t=T.dequeue();if(y++,!t)break;let{node:r,dist:p}=t;if(p>this.options.maxPathLength)return{previous:new Map,closestToTarget:E,steps:y,maxPathLengthReached:!0};let h=this.distance(r.position,e.position);if(hthis.lastDist)}step(g,e,i){var x;this.lastDist=i;for(let T of g){let E=Qe.toString(T);if(!this.visited.has(E)){this.previous.set(E,e),this.queue.enqueue({node:T,dist:i+1}),this.visited.set(E,i+1);let a=(x=this.otherBfs)==null?void 0:x.visited.get(E);a!==void 0&&a0,T.queue.size()>0);){let t=x.queue.dequeue();if(!t)break;let{node:r,dist:p}=t;if(p+1+(((i=T.queue.peek())==null?void 0:i.dist)||0)>this.options.maxPathLength)return{previous:x.previous,previous2:T.previous,closestToTarget:this.maybeClosestToTarget(a),steps:E,maxPathLengthReached:!0};let h=this.distance(r.position,e.position);if(hgc(this.f,T)-gc(this.f,E)),this.openSet.push(g);let x=Qe.toString(g);for(this.g.set(x,0),this.f.set(x,this.distance(g.position,e.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++,Qe.equal(T,e))return{previous:i,closestToTarget:e,steps:this.steps,maxPathLengthReached:!1};if(gc(this.g,T)+1>this.options.maxPathLength)return{previous:new Map,closestToTarget:this.closestToTarget,steps:this.steps,maxPathLengthReached:!0};this.updateClosestToTarget(T,e);for(let E of this.getNeighborsInternal(T,i.get(Qe.toString(T)),e)){let a=Qe.toString(E.p),y=gc(this.g,T)+E.dist;(!this.g.has(a)||y({p:E,dist:1}));let x=this.prune(e,g).filter(E=>!this.isBlockingIgnoreTarget(g,E,i)).map(E=>{let a=this.getTransition(E.position,g.layer);return{position:E.position,layer:a||g.layer}}),T=[];for(let E of x)if(this.isHorizontal(g.position,E.position))T.push({p:E,dist:1});else{let a=this.jump(g,E,i,1,Rs(g.position,E.position));a&&T.push(a)}return T}isBlockingIgnoreTarget(g,e,i){return this.isBlocking(g,e)&&!(this.options.ignoreBlockedTarget&&Qe.equal(e,i))}jump(g,e,i,x,T){if(!this.isBlockingIgnoreTarget(g,e,i))return Qe.equal(e,i)?{p:e,dist:x}:x>=this.maxJumpSize?{p:e,dist:x}:this.getTransition(e.position,g.layer)!==void 0?{p:e,dist:x}:this.hasForced(g,e)?{p:e,dist:x}:(this.updateClosestToTarget(e,i),this.jump(e,this.getTilePosInDir(e,T),i,x+1,T))}isHorizontal(g,e){return g.y===e.y}getForced(g,e,i,x,T,E){let a=[],y=g;return(this.blockOrTrans(y,i)||this.blockOrTrans(i,x))&&this.addIfNotBlocked(a,e,x),(this.blockOrTrans(y,T)||this.blockOrTrans(T,E))&&this.addIfNotBlocked(a,e,E),a}hasForced(g,e){let{topLeft:i,downLeft:x,top:T,bottom:E}=this.normalizedPositions(g,e);return!!((this.blockOrTrans(g,x)||this.blockOrTrans(x,E))&&!this.blockOrTrans(e,E)||(this.blockOrTrans(g,i)||this.blockOrTrans(i,T))&&!this.blockOrTrans(e,T))}prune(g,e){let{right:i,top:x,bottom:T,downLeft:E,topLeft:a}=this.normalizedPositions(g,e);return this.isHorizontal(g.position,e.position)?[i,x,T]:[i,...this.getForced(g,e,E,T,a,x)]}normalizedPositions(g,e){return g.position.xe.position.x?{topLeft:{position:new Ot(e.position.x+1,e.position.y+1),layer:e.layer},downLeft:{position:new Ot(e.position.x+1,e.position.y-1),layer:e.layer},top:{position:new Ot(e.position.x,e.position.y+1),layer:e.layer},bottom:{position:new Ot(e.position.x,e.position.y-1),layer:e.layer},right:{position:new Ot(e.position.x-1,e.position.y),layer:e.layer}}:g.position.y1?this.fillPath(T,E,x):x.push(E),T=E}return x.reverse()}fillPath(g,e,i){let x=g;do{let T=Rs(x.position,e.position);x=this.getTilePosInDir(x,T),i.push(x)}while(!Js.equal(x.position,e.position))}};function gc(g,e){var i;return(i=g.get(Qe.toString(e)))!=null?i:Number.MAX_VALUE}var aO=class{constructor(g,e,i,x={}){this.character=g,this.gridTilemap=e,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=Gi(Gi({},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(ws(this.character.autoMovementSet().pipe(ol(E=>E!==this),mf(1)))).subscribe(({enterTile:E,enterLayer:a})=>{this.updateTarget(E,a)})}update(g){var e;(e=this.targetMovement)==null||e.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=rm[this.options.facingDirection]+rm[this.charToFollow.getFacingDirection()],e=XM("up",g),i={x:this.charToFollow.getTilePos().position.x,y:this.charToFollow.getTilePos().position.y};return e==="right"?i.x+=this.charToFollow.getTileWidth()-1:e==="down"?i.y+=this.charToFollow.getTileWidth()-1:e==="down-left"?i.y+=this.charToFollow.getTileWidth()-1:e==="down-right"?(i.y+=this.charToFollow.getTileWidth()-1,i.x+=this.charToFollow.getTileWidth()-1):e==="up-right"&&(i.x+=this.charToFollow.getTileWidth()-1),this.gridTilemap.getTilePosInDirection({position:new Ot(i),layer:this.charToFollow.getTilePos().layer},e).position}updateTarget(g,e){let i=this.options.facingDirection!=="none"&&this.options.distance===0;i&&(g=this.getFacingPos()),this.targetMovement=new w2(this.character,this.gridTilemap,{position:new Ot(g),layer:e},{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()]}})}},eT=class{static getRandomInt(g){return Math.floor(Math.random()*Math.floor(g))}},oO=class{constructor(g,e=0,i=-1){this.character=g,this.delay=e,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(ws(this.character.autoMovementSet().pipe(ol(x=>x!==this),mf(1)))).subscribe(()=>{this.stepsWalked++}),this.distanceUtils=Zc.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 e=this.getFreeRandomDirection();this.stepsWalked=0,this.character.move(e),this.currentMovementDirection=e,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(wh(g)),new Ot(this.initialCol,this.initialRow))}getFreeRandomDirection(){let g=this.getFreeDirections();return g.length==0?"none":g[eT.getRandomInt(g.length)]}randomizeStepSize(){this.stepSize=eT.getRandomInt(this.radius)+1}};function lO(g,e){return g.filter(i=>{var x,T,E,a,y,t;return(x=e.labels)!=null&&x.withAllLabels?(T=e.labels)==null?void 0:T.withAllLabels.every(r=>i.hasLabel(r)):(E=e.labels)!=null&&E.withOneOfLabels?(a=e.labels)==null?void 0:a.withOneOfLabels.some(r=>i.hasLabel(r)):(y=e.labels)!=null&&y.withNoneLabels?!((t=e.labels)!=null&&t.withNoneLabels.some(r=>i.hasLabel(r))):!0})}var E2="2.44.6",hO=class{constructor(g,e){this.collistionStrategy=g,this.collisionGroupRelation=e,this.tilePosToCharacters=new uO,this.charRemoved$=new ki}isCharBlockingAt(g,e,i,x=new Set,T=new Set){if(i.length===0)return!1;let E=this.tilePosToCharacters.get(g,e);return!!(E&&E.size>0&&[...E].filter(a=>!x.has(a.getId())).filter(a=>!this.doIntersect(a.getCollisionGroups(),T)).some(a=>i.some(y=>a.getCollisionGroups().some(t=>this.collidesWith(y,t)))))}doIntersect(g,e){for(let i of g)if(e.has(i))return!0;return!1}collidesWith(g,e){return this.collisionGroupRelation?(this.collisionGroupRelation.get(g)||new Set).has(e):g===e}getCharactersAt(g,e){return this.tilePosToCharacters.get(g,e)||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 e=g.getId();this.charRemoved$.next(e),this.deleteTilePositions(g.getTilePos(),g),this.deleteTilePositions(g.getNextTilePos(),g)}add(g,e,i){let x=this.tilePosToCharacters.get(g,e);x||this.tilePosToCharacters.set(g,e,new Set([i])),x?.add(i)}addTilePosSetSub(g){g.tilePositionSet().pipe(ws(this.charRemoved(g.getId()))).subscribe(e=>{this.deleteTilePositions(g.getNextTilePos(),g),this.addTilePositions(e,g)})}charRemoved(g){var e;return(e=this.charRemoved$)==null?void 0:e.pipe(mf(1),ol(i=>i==g))}addPositionChangeSub(g){g.positionChangeStarted().pipe(ws(this.charRemoved(g.getId())),this.posChangeToLayerPos()).subscribe(e=>{this.collistionStrategy==="BLOCK_ONE_TILE_AHEAD"&&this.deleteTilePositions(e.exit,g),this.addTilePositions(e.enter,g)})}addPositionChangeFinishedSub(g){g.positionChangeFinished().pipe(ws(this.charRemoved(g.getId())),this.posChangeToLayerPos()).subscribe(e=>{this.deleteTilePositions(e.exit,g),this.addTilePositions(e.enter,g)})}addTilePositions(g,e){this.forEachCharTile(g,e,(i,x)=>{this.add(new Ot(i,x),g.layer,e)})}deleteTilePositions(g,e){this.forEachCharTile(g,e,(i,x)=>{var T;(T=this.tilePosToCharacters.get(new Ot(i,x),g.layer))==null||T.delete(e)})}forEachCharTile(g,e,i){let x=g.position;for(let T=x.x;T({enter:{position:new Ot(g.enterTile),layer:g.enterLayer},exit:{position:new Ot(g.exitTile),layer:g.exitLayer}})))}posToString(g,e){return`${g.x}#${g.y}#${e}`}},uO=class{constructor(){this.memo=new Map}set(g,e,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(e,i)}get(g,e){let i=this.memo.get(g.x);if(!i)return;let x=i.get(g.y);if(x)return x.get(e)}},Xx=class{constructor(g,e,i,x){this.x=g,this.y=e,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[...e,void 0]){let x=this.tileCollisionCache.get(i?.getName());if(x===void 0){x=new Array(this.tilemap.getWidth());for(let T=0;T>e&1)==1}var nT="ge_cost",M2=class C2{constructor(e,i,x,T=void 0,E=!1){this.tilemap=e,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 hO(x,T);for(let a of Vx())this.collidesPropNames.set(a,C2.ONE_WAY_COLLIDE_PROP_PREFIX+a),this.tileCostPropNames.set(a,`${nT}_${a}`);this.useTileCollisionCache&&(this.tileCollisionCache=new cO(e,this),this.tileCollisionCache.rebuild())}fixCacheLayer(e){var i;(i=this.tileCollisionCache)==null||i.fixLayer(e)}unfixCacheLayers(){var e;(e=this.tileCollisionCache)==null||e.unfixLayers()}addCharacter(e){this.characters.set(e.getId(),e);let i=e.getNextTilePos().layer;i===void 0?e.setTilePosition(al(Gi({},e.getNextTilePos()),{layer:this.getLowestCharLayer()})):this.getCharLayerNames().includes(i)||console.warn(`Char layer '${i}' of character '${e.getId()}' is unknown.`),this.charBlockCache.addCharacter(e)}removeCharacter(e){let i=this.characters.get(e);i&&(this.charBlockCache.removeCharacter(i),this.characters.delete(e))}getCharacters(){return[...this.characters.values()]}getCharactersAt(e,i){return this.charBlockCache.getCharactersAt(e,i)}rebuildTileCollisionCache(e){var i;(i=this.tileCollisionCache)==null||i.rebuild(e)}hasBlockingTileUncached(e,i,x,T){if(!T&&this.hasNoTileUncached(e,i))return!0;let E=this.getCollisionRelevantLayers(i);for(let a of E)if(this.isLayerBlockingAt(a.getName(),e,x))return!0;return!1}hasBlockingTile(e,i,x,T){var E;let a=(E=this.tileCollisionCache)==null?void 0:E.isBlockingFrom(e.x,e.y,i,x,T);return a!==void 0?a:this.hasBlockingTileUncached(e,i,x,T)}getTransition(e,i){let x=this.transitions.get(e.toString());if(x)return x.get(i)}getReverseTransitions(e,i){let x=this.reverseTransitions.get(e.toString());if(x)return x.get(i)}setTransition(e,i,x){var T,E,a,y,t;this.transitions.has(e.toString())||this.transitions.set(e.toString(),new Map),this.reverseTransitions.has(e.toString())||this.reverseTransitions.set(e.toString(),new Map),(T=this.transitions.get(e.toString()))==null||T.set(i,x),(E=this.reverseTransitions.get(e.toString()))!=null&&E.has(x)||(a=this.reverseTransitions.get(e.toString()))==null||a.set(x,new Set),(t=(y=this.reverseTransitions.get(e.toString()))==null?void 0:y.get(x))==null||t.add(i)}getTransitions(){return new Map([...this.transitions].map(([e,i])=>[e,new Map(i)]))}getTileCosts(e,i){let x=this.getCollisionRelevantLayers(e.layer),T=1;for(let E of x)T=Math.max(T,this.getTileCostsForLayer(al(Gi({},e),{layer:E.getName()}),i));return T}getTileCostsForLayer(e,i){let x=this.tilemap.getTileAt(e.position.x,e.position.y,e.layer);return i&&x?.getProperty(this.tileCostPropNames.get(i)||"")||x?.getProperty(nT)||1}hasNoTileUncached(e,i){return!this.getCollisionRelevantLayers(i).some(x=>this.tilemap.hasTileAt(e.x,e.y,x.getName()))}hasNoTile(e,i){var x;let T=(x=this.tileCollisionCache)==null?void 0:x.hasTileAt(e.x,e.y,i);return T!==void 0?T:this.hasNoTileUncached(e,i)}hasBlockingChar(e,i,x,T=new Set,E=new Set){return this.charBlockCache.isCharBlockingAt(e,i,x,T,E)}isInRange(e){return new Xx(0,0,this.tilemap.getWidth(),this.tilemap.getHeight()).isInRange(e)}toMapDirection(e){return this.isIsometric()?v4(e):e}fromMapDirection(e){return this.isIsometric()?XM(e):e}isIsometric(){return this.tilemap.getOrientation()==="isometric"}getTilePosInDirection(e,i){let x=e.position.add(wh(this.toMapDirection(i))),T=this.getTransition(x,e.layer)||e.layer;return{position:x,layer:T}}invalidateFrameCache(){this.collisionRelevantLayersFrameCache.clear()}isLayerBlockingAt(e,i,x){let T=this.tilemap.getTileAt(i.x,i.y,e);return T?!!(T.getProperty(this.collisionTilePropertyName)||x&&T.getProperty(this.collidesPropNames.get(x)||"")):!1}getCharLayerIndexes(){return this.tilemap.getLayers().map((e,i)=>({layer:e,index:i})).filter(({layer:e})=>e.isCharLayer()).map(({index:e})=>e)}findPrevAndCharLayer(e){let i=this.getCharLayerIndexes(),x=this.tilemap.getLayers(),T=i.findIndex(E=>x[E].getProperty(Wv)==e);return T==0?{prevIndex:-1,charLayerIndex:i[T]}:{prevIndex:i[T-1],charLayerIndex:i[T]}}getCollisionRelevantLayers(e){if(!e)return this.tilemap.getLayers();let i=this.collisionRelevantLayersFrameCache.get(e);if(i)return i;let{prevIndex:x,charLayerIndex:T}=this.findPrevAndCharLayer(e),E=this.tilemap.getLayers().slice(x+1,T+1);return this.collisionRelevantLayersFrameCache.set(e,E),E}getLowestCharLayer(){for(let e of this.tilemap.getLayers())if(e.isCharLayer())return e.getProperty(Wv)}getCharLayerNames(){return this.tilemap.getLayers().filter(e=>e.isCharLayer()).map(e=>e.getProperty(Wv)).filter(pO)}};M2.ONE_WAY_COLLIDE_PROP_PREFIX="ge_collide_";var dO=M2;function pO(g){return g!=null}var vO=(g=>(g.REMOVED="REMOVED",g.ADDED="ADDED",g))(vO||{}),mO=(g=>(g.WAIT="WAIT",g.SKIP="SKIP",g.STOP="STOP",g))(mO||{}),gO=class{constructor(g,e){this.character=g,this.tilemap=e,this.queue=new sm,this.finished$=new ki,this.pathBlockedWaitElapsed=0,this.distanceUtils=Zc.create(g.getNumberOfDirections()),this.character.autoMovementSet().pipe(ol(i=>i!==this),mf(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,e={}){var i,x,T;let E={pathBlockedStrategy:(i=e.pathBlockedStrategy)!=null?i:"STOP",pathBlockedWaitTimeoutMs:e?.pathBlockedWaitTimeoutMs||-1,ignoreInvalidPositions:(x=e.ignoreInvalidPositions)!=null?x:!1,skipInvalidPositions:(T=e.skipInvalidPositions)!=null?T:!1};for(let a of g){let y={command:a,config:E};if($u(a)){this.queue.enqueue(y);continue}let t=this.queue.peekEnd(),r=t?.command;if(r||(r=this.character.getNextTilePos()),$u(r)){this.queue.enqueue(y);continue}let p=this.distanceUtils.distance(r.position,a.position)===1;(!e.ignoreInvalidPositions||p)&&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 e=this.queue.peek();if(!e)return;let i=e.command,x=e.config;if($u(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(Rs(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 e=(g=this.queue.peek())==null?void 0:g.command;if($u(e)&&(e=this.tilemap.getTilePosInDirection(this.character.getNextTilePos(),e)),e&&this.isNeighborPos(e))return e;this.queue.dequeue()}}isLastMovement(){return this.queue.size()===0}isNeighborPos(g){let e=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 e&&i===g.layer;let x=i!==void 0&&i!==g.layer;return e&&!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,e){this.finish("PATH_BLOCKED_WAIT_TIMEOUT",`Position ${this.posToStr(g)} is blocked and the wait timeout of ${e} ms has been exceeded.`)}finish(g,e="",i=this.character.getNextTilePos()){this.queue=new sm,this.finished$.next({position:i.position,result:g,description:e,layer:i.layer})}getDir(g,e){return this.tilemap.fromMapDirection(Rs(g,e))}posToStr(g){return`(${g.position.x}, ${g.position.y}, ${g.layer})`}},yO=class{constructor(g=!0){this.isCreatedInternal=!1,g&&console.log(`Using GridEngine v${E2}`)}getCharLayer(g){var e;this.initGuard();let i=(e=this.gridCharacters)==null?void 0:e.get(g);if(!i)throw this.createCharUnknownErr(g);return i.getTilePos().layer}getTransition(g,e){var i;return this.initGuard(),(i=this.gridTilemap)==null?void 0:i.getTransition(new Ot(g),e)}setTransition(g,e,i){var x;return this.initGuard(),(x=this.gridTilemap)==null?void 0:x.setTransition(new Ot(g),e,i)}create(g,e){this.isCreatedInternal=!0,this.gridCharacters=new Map;let i=this.setConfigDefaults(e);this.config=i,this.movementStopped$=new ki,this.movementStarted$=new ki,this.directionChanged$=new ki,this.positionChangeStarted$=new ki,this.positionChangeFinished$=new ki,this.queueMovementFinished$=new ki,this.charRemoved$=new ki,this.charAdded$=new ki,this.gridTilemap=new dO(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(([e,i])=>[e,new Set(i)])):void 0}getPosition(g){var e;this.initGuard();let i=(e=this.gridCharacters)==null?void 0:e.get(g);if(!i)throw this.createCharUnknownErr(g);return i.getTilePos().position}move(g,e){this.moveChar(g,e)}moveRandomly(g,e=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 oO(T,e,i);T.setMovement(E)}getMovement(g){var e;this.initGuard();let i=(e=this.gridCharacters)==null?void 0:e.get(g);if(!i)throw this.createCharUnknownErr(g);let x=i.getMovement();return x?x.getInfo():{type:"None"}}moveTo(g,e,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 a=new w2(E,this.gridTilemap,{position:new Ot(e),layer:i?.targetLayer||E.getNextTilePos().layer},{distance:0,config:T});return E.setMovement(a),a.finishedObs().pipe(zc(y=>({charId:g,position:y.position,result:y.result,description:y.description,layer:y.layer})))}stopMovement(g){var e;this.initGuard();let i=(e=this.gridCharacters)==null?void 0:e.get(g);if(!i)throw this.createCharUnknownErr(g);i.setMovement(void 0)}setSpeed(g,e){var i;this.initGuard();let x=(i=this.gridCharacters)==null?void 0:i.get(g);if(!x)throw this.createCharUnknownErr(g);x.setSpeed(e)}getSpeed(g){var e;this.initGuard();let i=(e=this.gridCharacters)==null?void 0:e.get(g);if(!i)throw this.createCharUnknownErr(g);return i.getSpeed()}collidesWithTiles(g){var e;this.initGuard();let i=(e=this.gridCharacters)==null?void 0:e.get(g);if(!i)throw this.createCharUnknownErr(g);return i.collidesWithTiles()}update(g,e){var i;if(this.isCreatedInternal&&this.gridCharacters)for(let[x,T]of this.gridCharacters)T.update(e);(i=this.gridTilemap)==null||i.invalidateFrameCache()}addCharacter(g){var e,i,x,T,E;if(!this.gridTilemap)throw this.createUninitializedErr();if(!this.config)throw this.createUninitializedErr();let a={speed:g.speed||4,tilemap:this.gridTilemap,collidesWithTiles:!0,collisionGroups:["geDefault"],ignoreCollisionGroups:[],charLayer:g.charLayer,facingDirection:g.facingDirection,labels:g.labels,numberOfDirections:(e=g.numberOfDirections)!=null?e:this.config.numberOfDirections,tileWidth:g.tileWidth,tileHeight:g.tileHeight};typeof g.collides=="boolean"?g.collides===!1&&(a.collidesWithTiles=!1,a.collisionGroups=[]):g.collides!==void 0&&(g.collides.collidesWithTiles===!1&&(a.collidesWithTiles=!1),g.collides.collisionGroups&&(a.collisionGroups=g.collides.collisionGroups),g.collides.ignoreCollisionGroups&&(a.ignoreCollisionGroups=g.collides.ignoreCollisionGroups),a.ignoreMissingTiles=(x=(i=g.collides)==null?void 0:i.ignoreMissingTiles)!=null?x:!1);let y=new _4(g.id,a);g.startPosition&&y.setTilePosition({position:new Ot(g.startPosition),layer:y.getTilePos().layer}),(T=this.gridCharacters)==null||T.set(g.id,y),this.gridTilemap.addCharacter(y);let t=y.getId();y.movementStopped().pipe(ws(this.charRemoved(t))).subscribe(r=>{var p;(p=this.movementStopped$)==null||p.next({charId:t,direction:r})}),y.movementStarted().pipe(ws(this.charRemoved(t))).subscribe(r=>{var p;(p=this.movementStarted$)==null||p.next({charId:t,direction:r})}),y.directionChanged().pipe(ws(this.charRemoved(t))).subscribe(r=>{var p;(p=this.directionChanged$)==null||p.next({charId:t,direction:r})}),y.positionChangeStarted().pipe(ws(this.charRemoved(t))).subscribe(r=>{var p;(p=this.positionChangeStarted$)==null||p.next(Gi({charId:t},r))}),y.positionChangeFinished().pipe(ws(this.charRemoved(t))).subscribe(r=>{var p;(p=this.positionChangeFinished$)==null||p.next(Gi({charId:t},r))}),(E=this.charAdded$)==null||E.next(t)}hasCharacter(g){var e;return this.initGuard(),!!((e=this.gridCharacters)!=null&&e.has(g))}removeCharacter(g){var e,i,x,T;if(this.initGuard(),!((e=this.gridCharacters)!=null&&e.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 e=[...this.gridCharacters.values()];return(g?lO(e,g):e).map(i=>i.getId())}getLabels(g){var e;this.initGuard();let i=(e=this.gridCharacters)==null?void 0:e.get(g);if(!i)throw this.createCharUnknownErr(g);return i.getLabels()}addLabels(g,e){var i;this.initGuard();let x=(i=this.gridCharacters)==null?void 0:i.get(g);if(!x)throw this.createCharUnknownErr(g);x.addLabels(e)}removeLabels(g,e){var i;this.initGuard();let x=(i=this.gridCharacters)==null?void 0:i.get(g);if(!x)throw this.createCharUnknownErr(g);x.removeLabels(e)}clearLabels(g){var e;this.initGuard();let i=(e=this.gridCharacters)==null?void 0:e.get(g);if(!i)throw this.createCharUnknownErr(g);i.clearLabels()}follow(g,e,i,x){var T,E,a,y,t,r;let p;i===void 0?p={distance:0,closestPointIfBlocked:!1}:typeof i=="number"?(p={distance:i,closestPointIfBlocked:!1},x&&(p.closestPointIfBlocked=!0)):p=i,this.initGuard();let h=(T=this.gridCharacters)==null?void 0:T.get(g),o=(E=this.gridCharacters)==null?void 0:E.get(e);if(!h)throw this.createCharUnknownErr(g);if(!o)throw this.createCharUnknownErr(e);if(!this.gridTilemap)throw this.createUninitializedErr();let l=new aO(h,this.gridTilemap,o,{distance:(a=p.distance)!=null?a:0,noPathFoundStrategy:p.closestPointIfBlocked?"CLOSEST_REACHABLE":"STOP",maxPathLength:(y=p.maxPathLength)!=null?y:1/0,shortestPathAlgorithm:(t=p.algorithm)!=null?t:"BIDIRECTIONAL_SEARCH",ignoreLayers:!!p.ignoreLayers,facingDirection:(r=p.facingDirection)!=null?r:"none"});h.setMovement(l)}isMoving(g){var e;this.initGuard();let i=(e=this.gridCharacters)==null?void 0:e.get(g);if(!i)throw this.createCharUnknownErr(g);return i.isMoving()}getFacingDirection(g){var e;this.initGuard();let i=(e=this.gridCharacters)==null?void 0:e.get(g);if(!i)throw this.createCharUnknownErr(g);return i.getFacingDirection()}getFacingPosition(g){var e;this.initGuard();let i=(e=this.gridCharacters)==null?void 0:e.get(g);if(!i)throw this.createCharUnknownErr(g);let x=i.getFacingPosition();return{x:x.x,y:x.y}}turnTowards(g,e){var i;this.initGuard();let x=(i=this.gridCharacters)==null?void 0:i.get(g);if(!x)throw this.createCharUnknownErr(g);return x.turnTowards(e)}getCharactersAt(g,e){if(this.initGuard(),!this.gridTilemap)return[];let i=this.gridTilemap.getCharactersAt(new Ot(g),e);return Array.from(i).map(x=>x.getId())}setPosition(g,e,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 Ot(e),layer:T.getTilePos().layer}),T.setTilePosition({position:new Ot(e),layer:i})}isBlocked(g,e,i=["geDefault"]){var x,T;this.initGuard();let E=new Ot(g);return!!((x=this.gridTilemap)!=null&&x.hasBlockingTile(E,e)||(T=this.gridTilemap)!=null&&T.hasBlockingChar(E,e,i))}isTileBlocked(g,e){var i;return this.initGuard(),!!((i=this.gridTilemap)!=null&&i.hasBlockingTile(new Ot(g),e))}getCollisionGroups(g){var e;this.initGuard();let i=(e=this.gridCharacters)==null?void 0:e.get(g);if(!i)throw this.createCharUnknownErr(g);return i.getCollisionGroups()||[]}setCollisionGroups(g,e){var i;this.initGuard();let x=(i=this.gridCharacters)==null?void 0:i.get(g);if(!x)throw this.createCharUnknownErr(g);x.setCollisionGroups(e)}getIgnoreCollisionGroups(g){var e;this.initGuard();let i=(e=this.gridCharacters)==null?void 0:e.get(g);if(!i)throw this.createCharUnknownErr(g);return i.getIgnoreCollisionGroups()||[]}setIgnoreCollisionGroups(g,e){var i;this.initGuard();let x=(i=this.gridCharacters)==null?void 0:i.get(g);if(!x)throw this.createCharUnknownErr(g);x.setIgnoreCollisionGroups(e)}getTilePosInDirection(g,e,i){if(!this.gridTilemap)throw this.createUninitializedErr();let x=this.gridTilemap.getTilePosInDirection({position:new Ot(g),layer:e},i);return{position:x.position.toPosition(),charLayer:x.layer}}findShortestPath(g,e,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 a=new A2(this.gridTilemap).findShortestPath(Qe.toInternal(g),Qe.toInternal(e),al(Gi({},i),{shortestPathAlgorithm:x}));return{path:a.path.map(Qe.fromInternal),closestToTarget:a.closestToTarget?Qe.fromInternal(a.closestToTarget):void 0,reachedMaxPathLength:!1,steps:a.steps}}steppedOn(g,e,i){return this.positionChangeFinished().pipe(ol(x=>g.includes(x.charId)&&e.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(zc(g=>({charId:g,action:"ADDED"})),Q4(this.charRemoved$.pipe(zc(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 e;this.initGuard();let i=(e=this.gridCharacters)==null?void 0:e.get(g);if(!i)throw this.createCharUnknownErr(g);return i.getMovementProgress()}rebuildTileCollisionCache(g,e,i,x){var T;(T=this.gridTilemap)==null||T.rebuildTileCollisionCache(new Xx(g,e,i,x))}addQueueMovements(g,e,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 a;((T=E?.getMovement())==null?void 0:T.getInfo().type)==="Queue"?a=E.getMovement():(a=new gO(E,this.gridTilemap),E.setMovement(a),a.finished().pipe(ws(j4(this.charRemoved(g),E.autoMovementSet()))).subscribe(y=>{var t;(t=this.queueMovementFinished$)==null||t.next(Gi({charId:g},y))})),a.enqueue(e.map(y=>$u(y)?y:{position:new Ot(y.position),layer:y.charLayer}),i)}queueMovementFinished(){if(!this.queueMovementFinished$)throw this.createUninitializedErr();return this.queueMovementFinished$}getEnqueuedMovements(g){var e,i;this.initGuard();let x=(e=this.gridCharacters)==null?void 0:e.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:$u(T.command)?T.command:Qe.fromInternal(T.command),config:T.config})):[]}clearEnqueuedMovements(g){var e,i;this.initGuard();let x=(e=this.gridCharacters)==null?void 0:e.get(g);if(!x)throw this.createCharUnknownErr(g);((i=x.getMovement())==null?void 0:i.getInfo().type)==="Queue"&&x.getMovement().clear()}getTileCost(g,e,i){var x,T;return this.initGuard(),(T=(x=this.gridTilemap)==null?void 0:x.getTileCosts({position:new Ot(g),layer:e},i))!=null?T:1}getState(){let g=[];if(this.gridCharacters)for(let[e,i]of this.gridCharacters.entries())g.push({id:e,position:Qe.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 e of g.characters){let i=this.gridCharacters.get(e.id);if(i){let x=i.getTilePos();Qe.equal(x,Qe.toInternal(e.position))||i.setTilePosition(Qe.toInternal(e.position)),i.setSpeed(e.speed),i.turnTowards(e.facingDirection),e.collisionConfig.collisionGroups&&i.setCollisionGroups(e.collisionConfig.collisionGroups),e.collisionConfig.collidesWithTiles!==void 0&&i.setCollidesWithTiles(e.collisionConfig.collidesWithTiles),e.collisionConfig.ignoreMissingTiles!==void 0&&i.setIgnoreMissingTiles(e.collisionConfig.ignoreMissingTiles),i.setMovementProgress(e.movementProgress),i.clearLabels(),i.addLabels(e.labels)}}}charRemoved(g){var e;if(!this.charRemoved$)throw this.createUninitializedErr();return(e=this.charRemoved$)==null?void 0:e.pipe(mf(1),ol(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(e=>this.addCharacter(e))}moveChar(g,e){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())&&Uc(e)){console.warn(`GridEngine: Character '${g}' can't be moved '${e}' in 4 direction mode.`);return}else if((T=this.gridTilemap)!=null&&T.isIsometric()&&!Uc(e)){console.warn(`GridEngine: Character '${g}' can't be moved '${e}' in 4 direction isometric mode.`);return}}E.move(e)}createCharUnknownErr(g){return new Error(`Character unknown: ${g}`)}assembleMoveToConfig(g={}){let e=al(Gi({},g),{noPathFoundStrategy:"STOP",pathBlockedStrategy:"WAIT"});return g!=null&&g.noPathFoundStrategy&&(Object.values(y2).includes(g.noPathFoundStrategy)?e.noPathFoundStrategy=g.noPathFoundStrategy:console.warn(`GridEngine: Unknown NoPathFoundStrategy '${g.noPathFoundStrategy}'. Falling back to 'STOP'`)),g!=null&&g.pathBlockedStrategy&&(Object.values(x2).includes(g.pathBlockedStrategy)?e.pathBlockedStrategy=g.pathBlockedStrategy:console.warn(`GridEngine: Unknown PathBlockedStrategy '${g.pathBlockedStrategy}'. Falling back to 'WAIT'`)),e}setConfigDefaults(g){return Gi({collisionTilePropertyName:"ge_collide",numberOfDirections:4,characterCollisionStrategy:"BLOCK_TWO_TILES",cacheTileCollisions:!1},g)}},xO=class extends T2{constructor(g,e={}){super(g,e),this.jumpCache=new rT}findShortestPathImpl(g,e){return this.jumpCache=new rT,super.findShortestPathImpl(g,e)}getNeighborsInternal(g,e,i){if(!e||g.layer!==e.layer)return this.getNeighbors(g,i).map(E=>({p:E,dist:1}));let x=this.prune(e,g).map(E=>{let a=this.getTransition(E.position,g.layer);return{position:E.position,layer:a||g.layer}}),T=[];for(let E of x){let a=this.jump(g,E,i,1,Rs(g.position,E.position));a&&(a.dist=this.distance(g.position,a.p.position),T.push(a))}return T}getForced(g,e){let i=[],{topLeft:x,downLeft:T,top:E,bottom:a,topRight:y,downRight:t}=this.normalizedPositions(g,e),r=Rs(g.position,e.position);return Uc(r)?(this.blockOrTrans(g,x)&&(this.addIfNotBlocked(i,e,E),this.addIfNotBlocked(i,e,y),this.blockOrTrans(T,x)&&this.addIfNotBlocked(i,e,x)),this.blockOrTrans(g,T)&&(this.addIfNotBlocked(i,e,a),this.addIfNotBlocked(i,e,t),this.blockOrTrans(x,T)&&this.addIfNotBlocked(i,e,T)),this.blockOrTrans(x,E)&&this.addIfNotBlocked(i,e,E),this.blockOrTrans(T,a)&&this.addIfNotBlocked(i,e,a),this.blockOrTrans(x,y)&&this.addIfNotBlocked(i,e,y),this.blockOrTrans(T,t)&&this.addIfNotBlocked(i,e,t)):((this.blockOrTrans(g,E)||this.blockOrTrans(E,y))&&this.addIfNotBlocked(i,e,y),(this.blockOrTrans(g,a)||this.blockOrTrans(a,t))&&this.addIfNotBlocked(i,e,t),this.blockOrTrans(g,x)&&this.blockOrTrans(g,E)&&(this.addIfNotBlocked(i,e,E),this.addIfNotBlocked(i,e,x)),this.blockOrTrans(g,T)&&this.blockOrTrans(g,a)&&(this.addIfNotBlocked(i,e,a),this.addIfNotBlocked(i,e,T)),this.blockOrTrans(x,E)&&this.blockOrTrans(g,E)&&this.addIfNotBlocked(i,e,E),this.blockOrTrans(T,a)&&this.blockOrTrans(g,a)&&this.addIfNotBlocked(i,e,a)),i}hasForced(g,e){let{topLeft:i,downLeft:x,top:T,bottom:E,topRight:a,downRight:y}=this.normalizedPositions(g,e),t=Rs(g.position,e.position);if(Uc(t)){if(this.blockOrTrans(g,i)&&(!this.blockOrTrans(e,T)||!this.blockOrTrans(e,a)||this.blockOrTrans(x,i)&&!this.blockOrTrans(e,i))||this.blockOrTrans(g,x)&&(!this.blockOrTrans(e,E)||!this.blockOrTrans(e,y)||this.blockOrTrans(i,x)&&!this.blockOrTrans(e,x))||this.blockOrTrans(i,T)&&!this.blockOrTrans(e,T)||this.blockOrTrans(x,E)&&!this.blockOrTrans(e,E)||this.blockOrTrans(i,a)&&!this.blockOrTrans(e,a)||this.blockOrTrans(x,y)&&!this.blockOrTrans(e,y))return!0}else if((this.blockOrTrans(g,T)||this.blockOrTrans(T,a))&&!this.blockOrTrans(e,a)||(this.blockOrTrans(g,E)||this.blockOrTrans(E,y))&&!this.blockOrTrans(e,y)||this.blockOrTrans(g,i)&&this.blockOrTrans(g,T)&&(!this.blockOrTrans(e,T)||!this.blockOrTrans(e,i))||this.blockOrTrans(g,x)&&this.blockOrTrans(g,E)&&(!this.blockOrTrans(e,E)||!this.blockOrTrans(e,x))||this.blockOrTrans(i,T)&&this.blockOrTrans(g,T)&&!this.blockOrTrans(e,T)||this.blockOrTrans(x,E)&&this.blockOrTrans(g,E)&&!this.blockOrTrans(e,E))return!0;return!1}prune(g,e){let{top:i,right:x,topRight:T,downRight:E,bottom:a}=this.normalizedPositions(g,e),y=this.getForced(g,e),t=Rs(g.position,e.position);return Uc(t)?[i,x,T,E,a,...y]:[x,...y]}jump(g,e,i,x,T){let E=this.jumpCache.get(g,e);if(E!==null)return E;if(this.isBlocking(g,e)&&!(Qe.equal(e,i)&&this.options.ignoreBlockedTarget)){this.jumpCache.set(g,e,void 0);return}if(Qe.equal(e,i))return this.jumpCache.set(g,e,{p:e,dist:0}),{p:e,dist:0};if(x>=this.maxJumpSize)return this.jumpCache.set(g,e,{p:e,dist:0}),{p:e,dist:0};if(this.getTransition(e.position,g.layer)!==void 0)return this.jumpCache.set(g,e,{p:e,dist:0}),{p:e,dist:0};if(this.hasForced(g,e))return this.jumpCache.set(g,e,{p:e,dist:0}),{p:e,dist:0};if(this.updateClosestToTarget(e,i),T==="up-left"){if(this.jump(e,this.getTilePosInDir(e,"up"),i,x+1,"up")!==void 0)return this.jumpCache.set(g,e,{p:e,dist:0}),{p:e,dist:0};if(this.jump(e,this.getTilePosInDir(e,"left"),i,x+1,"left")!==void 0)return this.jumpCache.set(g,e,{p:e,dist:0}),{p:e,dist:0}}else if(T==="down-left"){if(this.jump(e,this.getTilePosInDir(e,"down"),i,x+1,"down")!==void 0)return this.jumpCache.set(g,e,{p:e,dist:0}),{p:e,dist:0};if(this.jump(e,this.getTilePosInDir(e,"left"),i,x+1,"left")!==void 0)return this.jumpCache.set(g,e,{p:e,dist:0}),{p:e,dist:0}}else if(T==="up-right"){if(this.jump(e,this.getTilePosInDir(e,"up"),i,x+1,"up")!==void 0)return this.jumpCache.set(g,e,{p:e,dist:0}),{p:e,dist:0};if(this.jump(e,this.getTilePosInDir(e,"right"),i,x+1,"right")!==void 0)return this.jumpCache.set(g,e,{p:e,dist:0}),{p:e,dist:0}}else if(T==="down-right"){if(this.jump(e,this.getTilePosInDir(e,"down"),i,x+1,"down")!==void 0)return this.jumpCache.set(g,e,{p:e,dist:0}),{p:e,dist:0};if(this.jump(e,this.getTilePosInDir(e,"right"),i,x+1,"right")!==void 0)return this.jumpCache.set(g,e,{p:e,dist:0}),{p:e,dist:0}}let a=this.jump(e,this.getTilePosInDir(e,T),i,x+1,T);return this.jumpCache.set(g,e,a),a}normalizedPositions(g,e){return g.position.xe.position.x&&g.position.y===e.position.y?{topLeft:{position:new Ot(e.position.x+1,e.position.y+1),layer:e.layer},downLeft:{position:new Ot(e.position.x+1,e.position.y-1),layer:e.layer},top:{position:new Ot(e.position.x,e.position.y+1),layer:e.layer},bottom:{position:new Ot(e.position.x,e.position.y-1),layer:e.layer},right:{position:new Ot(e.position.x-1,e.position.y),layer:e.layer},topRight:{position:new Ot(e.position.x-1,e.position.y+1),layer:e.layer},downRight:{position:new Ot(e.position.x-1,e.position.y-1),layer:e.layer}}:g.position.ye.position.y&&g.position.x===e.position.x?{topLeft:{position:new Ot(e.position.x-1,e.position.y+1),layer:e.layer},downLeft:{position:new Ot(e.position.x+1,e.position.y+1),layer:e.layer},top:{position:new Ot(e.position.x-1,e.position.y),layer:e.layer},bottom:{position:new Ot(e.position.x+1,e.position.y),layer:e.layer},right:{position:new Ot(e.position.x,e.position.y-1),layer:e.layer},topRight:{position:new Ot(e.position.x-1,e.position.y-1),layer:e.layer},downRight:{position:new Ot(e.position.x+1,e.position.y-1),layer:e.layer}}:g.position.ye.position.x?{topLeft:{position:new Ot(e.position.x+1,e.position.y),layer:e.layer},downLeft:{position:new Ot(e.position.x,e.position.y-1),layer:e.layer},top:{position:new Ot(e.position.x+1,e.position.y+1),layer:e.layer},bottom:{position:new Ot(e.position.x-1,e.position.y-1),layer:e.layer},right:{position:new Ot(e.position.x-1,e.position.y+1),layer:e.layer},topRight:{position:new Ot(e.position.x,e.position.y+1),layer:e.layer},downRight:{position:new Ot(e.position.x-1,e.position.y),layer:e.layer}}:g.position.y>e.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))(TO||{}),w2=class{constructor(g,e,i,{config:x,ignoreBlockedTarget:T=!1,distance:E=0}={}){this.character=g,this.tilemap=e,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=(t,r)=>t?new S2(this.tilemap,this.getPathfindingOptions()).isBlocking(this.character.getTilePos(),{position:t,layer:r}):!0;var a,y;this.shortestPathAlgorithm=(a=x?.algorithm)!=null?a:this.shortestPathAlgorithm,this.ignoreBlockedTarget=T,this.distance=E,this.noPathFoundStrategy=x?.noPathFoundStrategy||"STOP",this.pathBlockedStrategy=x?.pathBlockedStrategy||"WAIT",this.noPathFoundRetryable=new $S(x?.noPathFoundRetryBackoffMs||200,x?.noPathFoundMaxRetries||-1,()=>{this.stop("NO_PATH_FOUND_MAX_RETRIES_EXCEEDED")}),this.pathBlockedRetryable=new $S(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=Zc.create(g.getNumberOfDirections()),this.pathBlockedWaitTimeoutMs=x?.pathBlockedWaitTimeoutMs||-1,this.ignoredChars=(y=x?.ignoredChars)!=null?y:[],this.finished$=new ki,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(ol(e=>e!==this),mf(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 e,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((e=this.nextTileOnPath())==null?void 0:e.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=>Qe.fromInternal(g))},config:{algorithm:this.shortestPathAlgorithm,ignoreBlockedTarget:this.ignoreBlockedTarget,distance:this.distance,targetPos:Qe.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 e=this.getShortestPath();e.path.length>0&&this.calcShortestPath(e)}):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 e=this.getDir(this.character.getNextTilePos().position,g.position);this.character.move(e)}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],e=this.getDir(this.character.getNextTilePos().position,g.position);this.character.turnTowards(e)}existsDistToTarget(){return this.posOnPath=this.shortestPath.length-1}updatePosOnPath(){let g=this.shortestPath[this.posOnPath];for(;this.posOnPath0)return{path:E,distOffset:a}}return this.noPathFoundStrategy=this.noPathFoundAlternativeTargetsFallbackStrategy||"STOP",this.getShortestPath()}}return{path:i,distOffset:0}}pathToAlternativeTarget(g,e){let i=e.findShortestPath(this.character.getNextTilePos(),g,this.getPathfindingOptions()).path,x=this.distanceUtils.distance(g.position,this.targetPos.position);return{path:i,distOffset:x}}getDir(g,e){return this.tilemap.fromMapDirection(this.distanceUtils.direction(g,e))}},EO=Object.create,P2=Object.defineProperty,MO=Object.getOwnPropertyDescriptor,CO=Object.getOwnPropertyNames,AO=Object.getPrototypeOf,wO=Object.prototype.hasOwnProperty,PO=(g,e)=>()=>(e||g((e={exports:{}}).exports,e),e.exports),RO=(g,e,i,x)=>{if(e&&typeof e=="object"||typeof e=="function")for(let T of CO(e))!wO.call(g,T)&&T!==i&&P2(g,T,{get:()=>e[T],enumerable:!(x=MO(e,T))||x.enumerable});return g},Yx=(g,e,i)=>(i=g!=null?EO(AO(g)):{},RO(e||!g||!g.__esModule?P2(i,"default",{value:g,enumerable:!0}):i,g)),kx=PO((g,e)=>{(function(){var i,x="4.17.21",T=200,E="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",y="Invalid `variable` option passed into `_.template`",t="__lodash_hash_undefined__",r=500,p="__lodash_placeholder__",h=1,o=2,l=4,n=1,u=2,f=1,s=2,c=4,d=8,v=16,m=32,S=64,M=128,A=256,C=512,w=30,P="...",L=800,O=16,I=1,D=2,B=3,G=1/0,z=9007199254740991,W=17976931348623157e292,k=NaN,J=4294967295,Q=J-1,Y=J>>>1,K=[["ary",M],["bind",f],["bindKey",s],["curry",d],["curryRight",v],["flip",C],["partial",m],["partialRight",S],["rearg",A]],U="[object Arguments]",V="[object Array]",j="[object AsyncFunction]",$="[object Boolean]",q="[object Date]",it="[object DOMException]",nt="[object Error]",et="[object Function]",ht="[object GeneratorFunction]",ut="[object Map]",dt="[object Number]",mt="[object Null]",gt="[object Object]",At="[object Promise]",ot="[object Proxy]",st="[object RegExp]",yt="[object Set]",Tt="[object String]",wt="[object Symbol]",Et="[object Undefined]",Gt="[object WeakMap]",Wt="[object WeakSet]",Jt="[object ArrayBuffer]",$t="[object DataView]",te="[object Float32Array]",Nt="[object Float64Array]",Te="[object Int8Array]",le="[object Int16Array]",ce="[object Int32Array]",se="[object Uint8Array]",ee="[object Uint8ClampedArray]",Ce="[object Uint16Array]",Xe="[object Uint32Array]",si=/\b__p \+= '';/g,Be=/\b(__p \+=) '' \+/g,ri=/(__e\(.*?\)|\b__t\)) \+\n'';/g,xt=/&(?:amp|lt|gt|quot|#39);/g,_t=/[&<>"']/g,qt=RegExp(xt.source),ve=RegExp(_t.source),Me=/<%-([\s\S]+?)%>/g,fi=/<%([\s\S]+?)%>/g,pi=/<%=([\s\S]+?)%>/g,$i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,jn=/^\w*$/,mi=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,rn=/[\\^$.*+?()[\]{}|]/g,Pr=RegExp(rn.source),Pa=/^\s+/,vl=/\s/,uo=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ta=/\{\n\/\* \[wrapped with (.+)\] \*/,fo=/,? & /,zh=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Gh=/[()=,{}\[\]\/\s]/,Cf=/\\(\\)?/g,Af=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Vh=/\w*$/,ct=/^[-+]0x[0-9a-f]+$/i,bt=/^0b[01]+$/i,Bt=/^\[object .+?Constructor\]$/,zt=/^0o[0-7]+$/i,Dt=/^(?:0|[1-9]\d*)$/,he=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,me=/($^)/,Re=/['\n\r\u2028\u2029\\]/g,Ae="\\ud800-\\udfff",ze="\\u0300-\\u036f",Ue="\\ufe20-\\ufe2f",Ge="\\u20d0-\\u20ff",bi=ze+Ue+Ge,dn="\\u2700-\\u27bf",Ci="a-z\\xdf-\\xf6\\xf8-\\xff",pn="\\xac\\xb1\\xd7\\xf7",be="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",de="\\u2000-\\u206f",Rr=" \\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",Ke="A-Z\\xc0-\\xd6\\xd8-\\xde",Ii="\\ufe0e\\ufe0f",Vr=pn+be+de+Rr,qn="['’]",vn="["+Ae+"]",Bi="["+Vr+"]",ur="["+bi+"]",Ra="\\d+",Cn="["+dn+"]",La="["+Ci+"]",tr="[^"+Ae+Vr+Ra+dn+Ci+Ke+"]",co="\\ud83c[\\udffb-\\udfff]",Cg="(?:"+ur+"|"+co+")",Nd="[^"+Ae+"]",po="(?:\\ud83c[\\udde6-\\uddff]){2}",vo="[\\ud800-\\udbff][\\udc00-\\udfff]",hs="["+Ke+"]",ml="\\u200d",Bd="(?:"+La+"|"+tr+")",Ag="(?:"+hs+"|"+tr+")",Hh="(?:"+qn+"(?:d|ll|m|re|s|t|ve))?",Wh="(?:"+qn+"(?:D|LL|M|RE|S|T|VE))?",mo=Cg+"?",Ud="["+Ii+"]?",wf="(?:"+ml+"(?:"+[Nd,po,vo].join("|")+")"+Ud+mo+")*",hi="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",zd="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Xh=Ud+mo+wf,Gd="(?:"+[Cn,po,vo].join("|")+")"+Xh,wg="(?:"+[Nd+ur+"?",ur,po,vo,vn].join("|")+")",Pg=RegExp(qn,"g"),mn=RegExp(ur,"g"),gl=RegExp(co+"(?="+co+")|"+wg+Xh,"g"),Rg=RegExp([hs+"?"+La+"+"+Hh+"(?="+[Bi,hs,"$"].join("|")+")",Ag+"+"+Wh+"(?="+[Bi,hs+Bd,"$"].join("|")+")",hs+"?"+Bd+"+"+Hh,hs+"+"+Wh,zd,hi,Ra,Gd].join("|"),"g"),Pf=RegExp("["+ml+Ae+bi+Ii+"]"),Lg=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Yh=["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"],us=-1,wi={};wi[te]=wi[Nt]=wi[Te]=wi[le]=wi[ce]=wi[se]=wi[ee]=wi[Ce]=wi[Xe]=!0,wi[U]=wi[V]=wi[Jt]=wi[$]=wi[$t]=wi[q]=wi[nt]=wi[et]=wi[ut]=wi[dt]=wi[gt]=wi[st]=wi[yt]=wi[Tt]=wi[Gt]=!1;var Ai={};Ai[U]=Ai[V]=Ai[Jt]=Ai[$t]=Ai[$]=Ai[q]=Ai[te]=Ai[Nt]=Ai[Te]=Ai[le]=Ai[ce]=Ai[ut]=Ai[dt]=Ai[gt]=Ai[st]=Ai[yt]=Ai[Tt]=Ai[wt]=Ai[se]=Ai[ee]=Ai[Ce]=Ai[Xe]=!0,Ai[nt]=Ai[et]=Ai[Gt]=!1;var fs={À:"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"},Os={"&":"&","<":"<",">":">",'"':""","'":"'"},kh={"&":"&","<":"<",">":">",""":'"',"'":"'"},Rf={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Vd=parseFloat,bg=parseInt,Hr=typeof global=="object"&&global&&global.Object===Object&&global,Fg=typeof self=="object"&&self&&self.Object===Object&&self,Vi=Hr||Fg||Function("return this")(),Lf=typeof g=="object"&&g&&!g.nodeType&&g,An=Lf&&typeof e=="object"&&e&&!e.nodeType&&e,yl=An&&An.exports===Lf,go=yl&&Hr.process,wn=function(){try{var Ct=An&&An.require&&An.require("util").types;return Ct||go&&go.binding&&go.binding("util")}catch{}}(),Kh=wn&&wn.isArrayBuffer,jh=wn&&wn.isDate,bf=wn&&wn.isMap,Zh=wn&&wn.isRegExp,Jh=wn&&wn.isSet,ba=wn&&wn.isTypedArray;function Fi(Ct,Ht,It){switch(It.length){case 0:return Ct.call(Ht);case 1:return Ct.call(Ht,It[0]);case 2:return Ct.call(Ht,It[0],It[1]);case 3:return Ct.call(Ht,It[0],It[1],It[2])}return Ct.apply(Ht,It)}function cs(Ct,Ht,It,ue){for(var Ne=-1,Ye=Ct==null?0:Ct.length;++Ne-1}function yo(Ct,Ht,It){for(var ue=-1,Ne=Ct==null?0:Ct.length;++ue-1;);return It}function To(Ct,Ht){for(var It=Ct.length;It--&&Yr(Ht,Ct[It],0)>-1;);return It}function Kr(Ct,Ht){for(var It=Ct.length,ue=0;It--;)Ct[It]===Ht&&++ue;return ue}var kd=ir(fs),Kd=ir(Os);function If(Ct){return"\\"+Rf[Ct]}function Nf(Ct,Ht){return Ct==null?i:Ct[Ht]}function Fa(Ct){return Pf.test(Ct)}function El(Ct){return Lg.test(Ct)}function Eo(Ct){for(var Ht,It=[];!(Ht=Ct.next()).done;)It.push(Ht.value);return It}function Ml(Ct){var Ht=-1,It=Array(Ct.size);return Ct.forEach(function(ue,Ne){It[++Ht]=[Ne,ue]}),It}function Mo(Ct,Ht){return function(It){return Ct(Ht(It))}}function jr(Ct,Ht){for(var It=-1,ue=Ct.length,Ne=0,Ye=[];++It-1}function nu(R,N){var X=this.__data__,tt=aa(X,R);return tt<0?(++this.size,X.push([R,N])):X[tt][1]=N,this}Zr.prototype.clear=cp,Zr.prototype.delete=Yf,Zr.prototype.get=dp,Zr.prototype.has=pp,Zr.prototype.set=nu;function Lr(R){var N=-1,X=R==null?0:R.length;for(this.clear();++N=N?R:N)),R}function dr(R,N,X,tt,at,ft){var St,Mt=N&h,Lt=N&o,Xt=N&l;if(X&&(St=at?X(R,tt,at,ft):X(R)),St!==i)return St;if(!Yi(R))return R;var Yt=ke(R);if(Yt){if(St=jw(R),!Mt)return Vn(R,St)}else{var Zt=nr(R),ae=Zt==et||Zt==ht;if(Xo(R))return uc(R,Mt);if(Zt==gt||Zt==U||ae&&!at){if(St=Lt||ae?{}:X1(R),!Mt)return Lt?bp(R,Sp(St,R)):Hg(R,$f(St,R))}else{if(!Ai[Zt])return at?R:{};St=Zw(R,Zt,Mt)}}ft||(ft=new ln);var Se=ft.get(R);if(Se)return Se;ft.set(R,St),yS(R)?R.forEach(function(Ie){St.add(dr(Ie,N,X,Ie,R,ft))}):mS(R)&&R.forEach(function(Ie,ai){St.set(ai,dr(Ie,N,X,ai,R,ft))});var De=Xt?Lt?oi:qi:Lt?Ir:Wn,ii=Yt?i:De(R);return sn(ii||R,function(Ie,ai){ii&&(ai=Ie,Ie=R[ai]),Jr(St,ai,dr(Ie,N,X,ai,R,ft))}),St}function Qf(R){var N=Wn(R);return function(X){return ou(X,R,N)}}function ou(R,N,X){var tt=X.length;if(R==null)return!tt;for(R=Oe(R);tt--;){var at=X[tt],ft=N[at],St=R[at];if(St===i&&!(at in R)||!ft(St))return!1}return!0}function _f(R,N,X){if(typeof R!="function")throw new $n(a);return pc(function(){R.apply(i,X)},N)}function Ua(R,N,X,tt){var at=-1,ft=Wr,St=!0,Mt=R.length,Lt=[],Xt=N.length;if(!Mt)return Lt;X&&(N=Pi(N,Zn(X))),tt?(ft=yo,St=!1):N.length>=T&&(ft=Pn,St=!1,N=new sa(N));t:for(;++atat?0:at+X),tt=tt===i||tt>at?at:qe(tt),tt<0&&(tt+=at),tt=X>tt?0:SS(tt);X0&&X(Mt)?N>1?xn(Mt,N-1,X,tt,at):Xr(at,Mt):tt||(at[at.length]=Mt)}return at}var Io=xu(),zl=xu(!0);function pr(R,N){return R&&Io(R,N,Wn)}function No(R,N){return R&&zl(R,N,Wn)}function za(R,N){return Dn(N,function(X){return Xa(R[X])})}function Qr(R,N){N=ca(N,R);for(var X=0,tt=N.length;R!=null&&XN}function Mp(R,N){return R!=null&&ci.call(R,N)}function tc(R,N){return R!=null&&N in Oe(R)}function Gg(R,N,X){return R>=In(N,X)&&R=120&&Yt.length>=120)?new sa(St&&Yt):i}Yt=R[0];var Zt=-1,ae=Mt[0];t:for(;++Zt-1;)Mt!==R&&na.call(Mt,Lt,1),na.call(R,Lt,1);return R}function Un(R,N){for(var X=R?N.length:0,tt=X-1;X--;){var at=N[X];if(X==tt||at!==ft){var ft=at;Wa(at)?na.call(R,at,1):oc(R,at)}}return R}function Ss(R,N){return R+Fl(Wf()*(N-R+1))}function br(R,N,X,tt){for(var at=-1,ft=on(bl((N-R)/(X||1)),0),St=It(ft);ft--;)St[tt?ft:++at]=R,R+=X;return St}function Wo(R,N){var X="";if(!R||N<1||N>z)return X;do N%2&&(X+=R),N=Fl(N/2),N&&(R+=R);while(N);return X}function we(R,N){return Zg(K1(R,N,Nr),R+"")}function Cp(R){return Bl(Mu(R))}function rc(R,N){var X=Mu(R);return Dp(X,oa(N,0,X.length))}function Va(R,N,X,tt){if(!Yi(R))return R;N=ca(N,R);for(var at=-1,ft=N.length,St=ft-1,Mt=R;Mt!=null&&++atat?0:at+N),X=X>at?at:X,X<0&&(X+=at),at=N>X?0:X-N>>>0,N>>>=0;for(var ft=It(at);++tt>>1,St=R[ft];St!==null&&!qr(St)&&(X?St<=N:St=T){var Xt=N?null:Hn(R);if(Xt)return Cl(Xt);St=!1,at=Pn,Lt=new sa}else Lt=N?[]:Mt;t:for(;++tt=tt?R:mr(R,N,X)}var Rp=Ll||function(R){return Vi.clearTimeout(R)};function uc(R,N){if(N)return R.slice();var X=R.length,tt=zf?zf(X):new R.constructor(X);return R.copy(tt),tt}function gu(R){var N=new R.constructor(R.byteLength);return new Pl(N).set(new Pl(R)),N}function Vg(R,N){var X=N?gu(R.buffer):R.buffer;return new R.constructor(X,R.byteOffset,R.byteLength)}function Fr(R){var N=new R.constructor(R.source,Vh.exec(R));return N.lastIndex=R.lastIndex,N}function fc(R){return Bs?Oe(Bs.call(R)):{}}function Lp(R,N){var X=N?gu(R.buffer):R.buffer;return new R.constructor(X,R.byteOffset,R.length)}function Gs(R,N){if(R!==N){var X=R!==i,tt=R===null,at=R===R,ft=qr(R),St=N!==i,Mt=N===null,Lt=N===N,Xt=qr(N);if(!Mt&&!Xt&&!ft&&R>N||ft&&St&&Lt&&!Mt&&!Xt||tt&&St&&Lt||!X&&Lt||!at)return 1;if(!tt&&!ft&&!Xt&&R=Mt)return Lt;var Xt=X[tt];return Lt*(Xt=="desc"?-1:1)}}return R.index-N.index}function pa(R,N,X,tt){for(var at=-1,ft=R.length,St=X.length,Mt=-1,Lt=N.length,Xt=on(ft-St,0),Yt=It(Lt+Xt),Zt=!tt;++Mt1?X[at-1]:i,St=at>2?X[2]:i;for(ft=R.length>3&&typeof ft=="function"?(at--,ft):i,St&&yr(X[0],X[1],St)&&(ft=at<3?i:ft,at=1),N=Oe(N);++tt-1?at[ft?N[St]:St]:i}}function _(R){return Je(function(N){var X=N.length,tt=X,at=Nn.prototype.thru;for(R&&N.reverse();tt--;){var ft=N[tt];if(typeof ft!="function")throw new $n(a);if(at&&!St&&Su(ft)=="wrapper")var St=new Nn([],!0)}for(tt=St?tt:X;++tt1&&li.reverse(),Yt&&LtMt))return!1;var Xt=ft.get(R),Yt=ft.get(N);if(Xt&&Yt)return Xt==N&&Yt==R;var Zt=-1,ae=!0,Se=X&u?new sa:i;for(ft.set(R,N),ft.set(N,R);++Zt1?"& ":"")+N[tt],N=N.join(X>2?", ":" "),R.replace(uo,`{ +/* [wrapped with `+N+`] */ +`)}function $w(R){return ke(R)||Jl(R)||!!(Vf&&R&&R[Vf])}function Wa(R,N){var X=typeof R;return N=N??z,!!N&&(X=="number"||X!="symbol"&&Dt.test(R))&&R>-1&&R%1==0&&R0){if(++N>=L)return arguments[0]}else N=0;return R.apply(i,arguments)}}function Dp(R,N){var X=-1,tt=R.length,at=tt-1;for(N=N===i?tt:N;++X1?R[N-1]:i;return X=typeof X=="function"?(R.pop(),X):i,rS(R,X)});function sS(R){var N=lt(R);return N.__chain__=!0,N}function o3(R,N){return N(R),R}function Ip(R,N){return N(R)}var l3=Je(function(R){var N=R.length,X=N?R[0]:0,tt=this.__wrapped__,at=function(ft){return au(ft,R)};return N>1||this.__actions__.length||!(tt instanceof Pe)||!Wa(X)?this.thru(at):(tt=tt.slice(X,+X+(N?1:0)),tt.__actions__.push({func:Ip,args:[at],thisArg:i}),new Nn(tt,this.__chain__).thru(function(ft){return N&&!ft.length&&ft.push(i),ft}))});function h3(){return sS(this)}function u3(){return new Nn(this.value(),this.__chain__)}function f3(){this.__values__===i&&(this.__values__=xS(this.value()));var R=this.__index__>=this.__values__.length,N=R?i:this.__values__[this.__index__++];return{done:R,value:N}}function c3(){return this}function d3(R){for(var N,X=this;X instanceof Nl;){var tt=_1(X);tt.__index__=0,tt.__values__=i,N?at.__wrapped__=tt:N=tt;var at=tt;X=X.__wrapped__}return at.__wrapped__=R,N}function p3(){var R=this.__wrapped__;if(R instanceof Pe){var N=R;return this.__actions__.length&&(N=new Pe(this)),N=N.reverse(),N.__actions__.push({func:Ip,args:[Jg],thisArg:i}),new Nn(N,this.__chain__)}return this.thru(Jg)}function v3(){return ua(this.__wrapped__,this.__actions__)}var m3=Kl(function(R,N,X){ci.call(R,X)?++R[X]:xs(R,X,1)});function g3(R,N,X){var tt=ke(R)?Of:zg;return X&&yr(R,N,X)&&(N=i),tt(R,Fe(N,3))}function y3(R,N){var X=ke(R)?Dn:qf;return X(R,Fe(N,3))}var x3=Z(q1),S3=Z(tS);function T3(R,N){return xn(Np(R,N),1)}function E3(R,N){return xn(Np(R,N),G)}function M3(R,N,X){return X=X===i?1:qe(X),xn(Np(R,N),X)}function aS(R,N){var X=ke(R)?sn:$r;return X(R,Fe(N,3))}function oS(R,N){var X=ke(R)?Ff:Tp;return X(R,Fe(N,3))}var C3=Kl(function(R,N,X){ci.call(R,X)?R[X].push(N):xs(R,X,[N])});function A3(R,N,X,tt){R=Dr(R)?R:Mu(R),X=X&&!tt?qe(X):0;var at=R.length;return X<0&&(X=on(at+X,0)),Vp(R)?X<=at&&R.indexOf(N,X)>-1:!!at&&Yr(R,N,X)>-1}var w3=we(function(R,N,X){var tt=-1,at=typeof N=="function",ft=Dr(R)?It(R.length):[];return $r(R,function(St){ft[++tt]=at?Fi(N,St,X):Li(St,N,X)}),ft}),P3=Kl(function(R,N,X){xs(R,X,N)});function Np(R,N){var X=ke(R)?Pi:Ga;return X(R,Fe(N,3))}function R3(R,N,X,tt){return R==null?[]:(ke(N)||(N=N==null?[]:[N]),X=tt?i:X,ke(X)||(X=X==null?[]:[X]),Wl(R,N,X))}var L3=Kl(function(R,N,X){R[X?0:1].push(N)},function(){return[[],[]]});function b3(R,N,X){var tt=ke(R)?$h:ea,at=arguments.length<3;return tt(R,Fe(N,4),X,at,$r)}function F3(R,N,X){var tt=ke(R)?Hd:ea,at=arguments.length<3;return tt(R,Fe(N,4),X,at,Tp)}function O3(R,N){var X=ke(R)?Dn:qf;return X(R,zp(Fe(N,3)))}function D3(R){var N=ke(R)?Bl:Cp;return N(R)}function I3(R,N,X){(X?yr(R,N,X):N===i)?N=1:N=qe(N);var tt=ke(R)?jf:rc;return tt(R,N)}function N3(R){var N=ke(R)?xp:wp;return N(R)}function B3(R){if(R==null)return 0;if(Dr(R))return Vp(R)?ds(R):R.length;var N=nr(R);return N==ut||N==yt?R.size:Bn(R).length}function U3(R,N,X){var tt=ke(R)?xl:sc;return X&&yr(R,N,X)&&(N=i),tt(R,Fe(N,3))}var z3=we(function(R,N){if(R==null)return[];var X=N.length;return X>1&&yr(R,N[0],N[1])?N=[]:X>2&&yr(N[0],N[1],N[2])&&(N=[N[0]]),Wl(R,xn(N,1),[])}),Bp=$d||function(){return Vi.Date.now()};function G3(R,N){if(typeof N!="function")throw new $n(a);return R=qe(R),function(){if(--R<1)return N.apply(this,arguments)}}function lS(R,N,X){return N=X?i:N,N=R&&N==null?R.length:N,Ft(R,M,i,i,i,i,N)}function hS(R,N){var X;if(typeof N!="function")throw new $n(a);return R=qe(R),function(){return--R>0&&(X=N.apply(this,arguments)),R<=1&&(N=i),X}}var Qg=we(function(R,N,X){var tt=f;if(X.length){var at=jr(X,Tu(Qg));tt|=m}return Ft(R,tt,N,X,at)}),uS=we(function(R,N,X){var tt=f|s;if(X.length){var at=jr(X,Tu(uS));tt|=m}return Ft(N,tt,R,X,at)});function fS(R,N,X){N=X?i:N;var tt=Ft(R,d,i,i,i,i,i,N);return tt.placeholder=fS.placeholder,tt}function cS(R,N,X){N=X?i:N;var tt=Ft(R,v,i,i,i,i,i,N);return tt.placeholder=cS.placeholder,tt}function dS(R,N,X){var tt,at,ft,St,Mt,Lt,Xt=0,Yt=!1,Zt=!1,ae=!0;if(typeof R!="function")throw new $n(a);N=Cs(N)||0,Yi(X)&&(Yt=!!X.leading,Zt="maxWait"in X,ft=Zt?on(Cs(X.maxWait)||0,N):ft,ae="trailing"in X?!!X.trailing:ae);function Se(un){var Hs=tt,ka=at;return tt=at=i,Xt=un,St=R.apply(ka,Hs),St}function De(un){return Xt=un,Mt=pc(ai,N),Yt?Se(un):St}function ii(un){var Hs=un-Lt,ka=un-Xt,OS=N-Hs;return Zt?In(OS,ft-ka):OS}function Ie(un){var Hs=un-Lt,ka=un-Xt;return Lt===i||Hs>=N||Hs<0||Zt&&ka>=ft}function ai(){var un=Bp();if(Ie(un))return li(un);Mt=pc(ai,ii(un))}function li(un){return Mt=i,ae&&tt?Se(un):(tt=at=i,St)}function ts(){Mt!==i&&Rp(Mt),Xt=0,tt=Lt=at=Mt=i}function xr(){return Mt===i?St:li(Bp())}function es(){var un=Bp(),Hs=Ie(un);if(tt=arguments,at=this,Lt=un,Hs){if(Mt===i)return De(Lt);if(Zt)return Rp(Mt),Mt=pc(ai,N),Se(Lt)}return Mt===i&&(Mt=pc(ai,N)),St}return es.cancel=ts,es.flush=xr,es}var V3=we(function(R,N){return _f(R,1,N)}),H3=we(function(R,N,X){return _f(R,Cs(N)||0,X)});function W3(R){return Ft(R,C)}function Up(R,N){if(typeof R!="function"||N!=null&&typeof N!="function")throw new $n(a);var X=function(){var tt=arguments,at=N?N.apply(this,tt):tt[0],ft=X.cache;if(ft.has(at))return ft.get(at);var St=R.apply(this,tt);return X.cache=ft.set(at,St)||ft,St};return X.cache=new(Up.Cache||Lr),X}Up.Cache=Lr;function zp(R){if(typeof R!="function")throw new $n(a);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 X3(R){return hS(2,R)}var Y3=Pp(function(R,N){N=N.length==1&&ke(N[0])?Pi(N[0],Zn(Fe())):Pi(xn(N,1),Zn(Fe()));var X=N.length;return we(function(tt){for(var at=-1,ft=In(tt.length,X);++at=N}),Jl=je(function(){return arguments}())?je:function(R){return tn(R)&&ci.call(R,"callee")&&!eu.call(R,"callee")},ke=It.isArray,sR=Kh?Zn(Kh):Qi;function Dr(R){return R!=null&&Gp(R.length)&&!Xa(R)}function hn(R){return tn(R)&&Dr(R)}function aR(R){return R===!0||R===!1||tn(R)&&Rn(R)==$}var Xo=_d||h0,oR=jh?Zn(jh):_i;function lR(R){return tn(R)&&R.nodeType===1&&!vc(R)}function hR(R){if(R==null)return!0;if(Dr(R)&&(ke(R)||typeof R=="string"||typeof R.splice=="function"||Xo(R)||Eu(R)||Jl(R)))return!R.length;var N=nr(R);if(N==ut||N==yt)return!R.size;if(dc(R))return!Bn(R).length;for(var X in R)if(ci.call(R,X))return!1;return!0}function uR(R,N){return Wi(R,N)}function fR(R,N,X){X=typeof X=="function"?X:i;var tt=X?X(R,N):i;return tt===i?Wi(R,N,i,X):!!tt}function qg(R){if(!tn(R))return!1;var N=Rn(R);return N==nt||N==it||typeof R.message=="string"&&typeof R.name=="string"&&!vc(R)}function cR(R){return typeof R=="number"&&Hf(R)}function Xa(R){if(!Yi(R))return!1;var N=Rn(R);return N==et||N==ht||N==j||N==ot}function vS(R){return typeof R=="number"&&R==qe(R)}function Gp(R){return typeof R=="number"&&R>-1&&R%1==0&&R<=z}function Yi(R){var N=typeof R;return R!=null&&(N=="object"||N=="function")}function tn(R){return R!=null&&typeof R=="object"}var mS=bf?Zn(bf):Uo;function dR(R,N){return R===N||Xi(R,N,Xg(N))}function pR(R,N,X){return X=typeof X=="function"?X:i,Xi(R,N,Xg(N),X)}function vR(R){return gS(R)&&R!=+R}function mR(R){if(qw(R))throw new Ne(E);return zo(R)}function gR(R){return R===null}function yR(R){return R==null}function gS(R){return typeof R=="number"||tn(R)&&Rn(R)==dt}function vc(R){if(!tn(R)||Rn(R)!=gt)return!1;var N=Rl(R);if(N===null)return!0;var X=ci.call(N,"constructor")&&N.constructor;return typeof X=="function"&&X instanceof X&&Lo.call(X)==Oa}var t0=Zh?Zn(Zh):Go;function xR(R){return vS(R)&&R>=-z&&R<=z}var yS=Jh?Zn(Jh):hu;function Vp(R){return typeof R=="string"||!ke(R)&&tn(R)&&Rn(R)==Tt}function qr(R){return typeof R=="symbol"||tn(R)&&Rn(R)==wt}var Eu=ba?Zn(ba):ic;function SR(R){return R===i}function TR(R){return tn(R)&&nr(R)==Gt}function ER(R){return tn(R)&&Rn(R)==Wt}var MR=Ee(Vl),CR=Ee(function(R,N){return R<=N});function xS(R){if(!R)return[];if(Dr(R))return Vp(R)?Ui(R):Vn(R);if(ra&&R[ra])return Eo(R[ra]());var N=nr(R),X=N==ut?Ml:N==yt?Cl:Mu;return X(R)}function Ya(R){if(!R)return R===0?R:0;if(R=Cs(R),R===G||R===-G){var N=R<0?-1:1;return N*W}return R===R?R:0}function qe(R){var N=Ya(R),X=N%1;return N===N?X?N-X:N:0}function SS(R){return R?oa(qe(R),0,J):0}function Cs(R){if(typeof R=="number")return R;if(qr(R))return k;if(Yi(R)){var N=typeof R.valueOf=="function"?R.valueOf():R;R=Yi(N)?N+"":N}if(typeof R!="string")return R===0?R:+R;R=_h(R);var X=bt.test(R);return X||zt.test(R)?bg(R.slice(2),X?2:8):ct.test(R)?k:+R}function TS(R){return Or(R,Ir(R))}function AR(R){return R?oa(qe(R),-z,z):R===0?R:0}function yi(R){return R==null?"":zn(R)}var wR=Ha(function(R,N){if(dc(N)||Dr(N)){Or(N,Wn(N),R);return}for(var X in N)ci.call(N,X)&&Jr(R,X,N[X])}),ES=Ha(function(R,N){Or(N,Ir(N),R)}),Hp=Ha(function(R,N,X,tt){Or(N,Ir(N),R,tt)}),PR=Ha(function(R,N,X,tt){Or(N,Wn(N),R,tt)}),RR=Je(au);function LR(R,N){var X=Us(R);return N==null?X:$f(X,N)}var bR=we(function(R,N){R=Oe(R);var X=-1,tt=N.length,at=tt>2?N[2]:i;for(at&&yr(N[0],N[1],at)&&(tt=1);++X1),ft}),Or(R,oi(R),X),tt&&(X=dr(X,h|o|l,oe));for(var at=N.length;at--;)oc(X,N[at]);return X});function ZR(R,N){return CS(R,zp(Fe(N)))}var JR=Je(function(R,N){return R==null?{}:Xl(R,N)});function CS(R,N){if(R==null)return{};var X=Pi(oi(R),function(tt){return[tt]});return N=Fe(N),cu(R,X,function(tt,at){return N(tt,at[0])})}function $R(R,N,X){N=ca(N,R);var tt=-1,at=N.length;for(at||(at=1,R=i);++ttN){var tt=R;R=N,N=tt}if(X||R%1||N%1){var at=Wf();return In(R+at*(N-R+Vd("1e-"+((at+"").length-1))),N)}return Ss(R,N)}var oL=b(function(R,N,X){return N=N.toLowerCase(),R+(X?PS(N):N)});function PS(R){return n0(yi(R).toLowerCase())}function RS(R){return R=yi(R),R&&R.replace(he,kd).replace(mn,"")}function lL(R,N,X){R=yi(R),N=zn(N);var tt=R.length;X=X===i?tt:oa(qe(X),0,tt);var at=X;return X-=N.length,X>=0&&R.slice(X,at)==N}function hL(R){return R=yi(R),R&&ve.test(R)?R.replace(_t,Kd):R}function uL(R){return R=yi(R),R&&Pr.test(R)?R.replace(rn,"\\$&"):R}var fL=b(function(R,N,X){return R+(X?"-":"")+N.toLowerCase()}),cL=b(function(R,N,X){return R+(X?" ":"")+N.toLowerCase()}),dL=Fp("toLowerCase");function pL(R,N,X){R=yi(R),N=qe(N);var tt=N?ds(R):0;if(!N||tt>=N)return R;var at=(N-tt)/2;return Qt(Fl(at),X)+R+Qt(bl(at),X)}function vL(R,N,X){R=yi(R),N=qe(N);var tt=N?ds(R):0;return N&&tt>>0,X?(R=yi(R),R&&(typeof N=="string"||N!=null&&!t0(N))&&(N=zn(N),!N&&Fa(R))?da(Ui(R),0,X):R.split(N,X)):[]}var EL=b(function(R,N,X){return R+(X?" ":"")+n0(N)});function ML(R,N,X){return R=yi(R),X=X==null?0:oa(qe(X),0,R.length),N=zn(N),R.slice(X,X+N.length)==N}function CL(R,N,X){var tt=lt.templateSettings;X&&yr(R,N,X)&&(N=i),R=yi(R),N=Hp({},N,tt,Rt);var at=Hp({},N.imports,tt.imports,Rt),ft=Wn(at),St=Jn(at,ft),Mt,Lt,Xt=0,Yt=N.interpolate||me,Zt="__p += '",ae=gn((N.escape||me).source+"|"+Yt.source+"|"+(Yt===pi?Af:me).source+"|"+(N.evaluate||me).source+"|$","g"),Se="//# sourceURL="+(ci.call(N,"sourceURL")?(N.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++us+"]")+` +`;R.replace(ae,function(Ie,ai,li,ts,xr,es){return li||(li=ts),Zt+=R.slice(Xt,es).replace(Re,If),ai&&(Mt=!0,Zt+=`' + +__e(`+ai+`) + +'`),xr&&(Lt=!0,Zt+=`'; +`+xr+`; +__p += '`),li&&(Zt+=`' + +((__t = (`+li+`)) == null ? '' : __t) + +'`),Xt=es+Ie.length,Ie}),Zt+=`'; +`;var De=ci.call(N,"variable")&&N.variable;if(!De)Zt=`with (obj) { +`+Zt+` +} +`;else if(Gh.test(De))throw new Ne(y);Zt=(Lt?Zt.replace(si,""):Zt).replace(Be,"$1").replace(ri,"$1;"),Zt="function("+(De||"obj")+`) { +`+(De?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(Mt?", __e = _.escape":"")+(Lt?`, __j = Array.prototype.join; +function print() { __p += __j.call(arguments, '') } +`:`; +`)+Zt+`return __p +}`;var ii=bS(function(){return Ye(ft,Se+"return "+Zt).apply(i,St)});if(ii.source=Zt,qg(ii))throw ii;return ii}function AL(R){return yi(R).toLowerCase()}function wL(R){return yi(R).toUpperCase()}function PL(R,N,X){if(R=yi(R),R&&(X||N===i))return _h(R);if(!R||!(N=zn(N)))return R;var tt=Ui(R),at=Ui(N),ft=Ri(tt,at),St=To(tt,at)+1;return da(tt,ft,St).join("")}function RL(R,N,X){if(R=yi(R),R&&(X||N===i))return R.slice(0,Ao(R)+1);if(!R||!(N=zn(N)))return R;var tt=Ui(R),at=To(tt,Ui(N))+1;return da(tt,0,at).join("")}function LL(R,N,X){if(R=yi(R),R&&(X||N===i))return R.replace(Pa,"");if(!R||!(N=zn(N)))return R;var tt=Ui(R),at=Ri(tt,Ui(N));return da(tt,at).join("")}function bL(R,N){var X=w,tt=P;if(Yi(N)){var at="separator"in N?N.separator:at;X="length"in N?qe(N.length):X,tt="omission"in N?zn(N.omission):tt}R=yi(R);var ft=R.length;if(Fa(R)){var St=Ui(R);ft=St.length}if(X>=ft)return R;var Mt=X-ds(tt);if(Mt<1)return tt;var Lt=St?da(St,0,Mt).join(""):R.slice(0,Mt);if(at===i)return Lt+tt;if(St&&(Mt+=Lt.length-Mt),t0(at)){if(R.slice(Mt).search(at)){var Xt,Yt=Lt;for(at.global||(at=gn(at.source,yi(Vh.exec(at))+"g")),at.lastIndex=0;Xt=at.exec(Yt);)var Zt=Xt.index;Lt=Lt.slice(0,Zt===i?Mt:Zt)}}else if(R.indexOf(zn(at),Mt)!=Mt){var ae=Lt.lastIndexOf(at);ae>-1&&(Lt=Lt.slice(0,ae))}return Lt+tt}function FL(R){return R=yi(R),R&&qt.test(R)?R.replace(xt,wo):R}var OL=b(function(R,N,X){return R+(X?" ":"")+N.toUpperCase()}),n0=Fp("toUpperCase");function LS(R,N,X){return R=yi(R),N=X?i:N,N===i?El(R)?Po(R):Xd(R):R.match(N)||[]}var bS=we(function(R,N){try{return Fi(R,i,N)}catch(X){return qg(X)?X:new Ne(X)}}),DL=Je(function(R,N){return sn(N,function(X){X=va(X),xs(R,X,Qg(R[X],R))}),R});function IL(R){var N=R==null?0:R.length,X=Fe();return R=N?Pi(R,function(tt){if(typeof tt[1]!="function")throw new $n(a);return[X(tt[0]),tt[1]]}):[],we(function(tt){for(var at=-1;++atz)return[];var X=J,tt=In(R,J);N=Fe(N),R-=J;for(var at=Is(tt,N);++X0||N<0)?new Pe(X):(R<0?X=X.takeRight(-R):R&&(X=X.drop(R)),N!==i&&(N=qe(N),X=N<0?X.dropRight(-N):X.take(N-R)),X)},Pe.prototype.takeRightWhile=function(R){return this.reverse().takeWhile(R).reverse()},Pe.prototype.toArray=function(){return this.take(J)},pr(Pe.prototype,function(R,N){var X=/^(?:filter|find|map|reject)|While$/.test(N),tt=/^(?:head|last)$/.test(N),at=lt[tt?"take"+(N=="last"?"Right":""):N],ft=tt||/^find/.test(N);at&&(lt.prototype[N]=function(){var St=this.__wrapped__,Mt=tt?[1]:arguments,Lt=St instanceof Pe,Xt=Mt[0],Yt=Lt||ke(St),Zt=function(ai){var li=at.apply(lt,Xr([ai],Mt));return tt&&ae?li[0]:li};Yt&&X&&typeof Xt=="function"&&Xt.length!=1&&(Lt=Yt=!1);var ae=this.__chain__,Se=!!this.__actions__.length,De=ft&&!ae,ii=Lt&&!Se;if(!ft&&Yt){St=ii?St:new Pe(this);var Ie=R.apply(St,Mt);return Ie.__actions__.push({func:Ip,args:[Zt],thisArg:i}),new Nn(Ie,ae)}return De&&ii?R.apply(this,Mt):(Ie=this.thru(Zt),De?tt?Ie.value()[0]:Ie.value():Ie)})}),sn(["pop","push","shift","sort","splice","unshift"],function(R){var N=ia[R],X=/^(?:push|sort|unshift)$/.test(R)?"tap":"thru",tt=/^(?:pop|shift)$/.test(R);lt.prototype[R]=function(){var at=arguments;if(tt&&!this.__chain__){var ft=this.value();return N.apply(ke(ft)?ft:[],at)}return this[X](function(St){return N.apply(ke(St)?St:[],at)})}}),pr(Pe.prototype,function(R,N){var X=lt[N];if(X){var tt=X.name+"";ci.call(Na,tt)||(Na[tt]=[]),Na[tt].push({name:N,func:X})}}),Na[rt(i,s).name]=[{name:"wrapper",func:i}],Pe.prototype.clone=Dg,Pe.prototype.reverse=Ig,Pe.prototype.value=cr,lt.prototype.at=l3,lt.prototype.chain=h3,lt.prototype.commit=u3,lt.prototype.next=f3,lt.prototype.plant=d3,lt.prototype.reverse=p3,lt.prototype.toJSON=lt.prototype.valueOf=lt.prototype.value=v3,lt.prototype.first=lt.prototype.head,ra&&(lt.prototype[ra]=c3),lt},vs=Jd();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Vi._=vs,define(function(){return vs})):An?((An.exports=vs)._=vs,Lf._=vs):Vi._=vs}).call(g)}),R2=class extends Set{constructor(g,e=!1){super(g),this.valuesAsFlags=e}};function Gc(g){if(g instanceof Map)return Object.fromEntries([...g.entries()].map(([e,i])=>[e,Gc(i)]));if(g instanceof Set)return Array.from(g.values()).map(Gc);if(g instanceof R2)return{values:[...g.values()],valuesAsFlags:g.valuesAsFlags};if(typeof g=="object"){let e={};return Object.entries(g).forEach(([i,x])=>{e[i]=Gc(x)}),e}else return g}Yx(kx(),1);var LO=Yx(kx(),1);function uh(g,e){if(typeof g!="object")throw new Error(`Cannot merge into non-object objectToMergeWith. Received: ${JSON.stringify(g)}`);if(typeof e!="object")throw new Error(`Cannot merge using non-object objectToMergeWith. Received: ${JSON.stringify(e)}`);let i=(0,LO.cloneDeep)(g);for(let[x,T]of Object.entries(e))typeof T!="object"||T instanceof Set||i[x]===void 0?i[x]=T:i[x]=uh(i[x],T);return i}function L2(g,e){if(!(g===void 0||typeof g!="object"))for(let i of Object.keys(g)){if(i===e)return g[i];let x=g[i];if(typeof x=="object"){let T=L2(x,e);if(T!==void 0)return T}}}var m0="@composite:",bO="@inherit:",FO=class{constructor(g,e,i){this.tiledClassToMembersMap=g,this.enumNameToValuesMap=e,this.parserOptions=i,this.memoiser=new Map}flattenMembers(g,e){return this.memoiser.has(g)?{[g]:this.memoiser.get(g)}:(this.memoiser.set(g,e.reduce((i,x)=>Gi(Gi({},i),this.flattenMemberProperty(x)),{})),{[g]:this.memoiser.get(g)})}flattenMemberProperty(g){var e;let i=(e=g.propertyType)!=null?e:g.propertytype;if(g.type==="class"){if(!this.memoiser.has(i)){let E=this.tiledClassToMembersMap.get(i).reduce((a,y)=>uh(this.flattenMemberProperty(y),a),{});this.memoiser.set(i,E)}let x=this.memoiser.get(i),T=uh(x,this.flattenValue(g.value,x));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(x=>x!==""))}:{[g.name]:g.value}:{[g.name]:g.value}}get memoisedFlattenedProperties(){return this.memoiser}flattenValue(g,e){return Object.entries(g).reduce((i,[x,T])=>{if(typeof T!="object")return L2(e,x)instanceof Set?uh({[x]:new Set(T.split(",").filter(E=>E!==""))},i):uh({[x]:T},i);if(this.checkIfShouldFlatten(x))return uh(this.flattenValue(T,e),i);{let E=x.replace(m0,"");return uh({[E]:this.flattenValue(T,e)},i)}},{})}checkIfShouldFlatten(g){var e;return((e=this.parserOptions)==null?void 0:e.defaultComposite)===!0?g.startsWith(bO):!g.startsWith(m0)}},sT=Yx(kx(),1),OO=class{constructor(g){this.flattener=g}flattenPropertiesOnObject(g){var e,i,x,T;return al(Gi(Gi({},this.flattener.memoisedFlattenedProperties.get((e=g.class)!=null?e:g.type)),(i=g.properties)==null?void 0:i.reduce((E,a)=>Gi(Gi({},E),this.flattener.flattenMemberProperty(a)),{})),{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 e,i,x,T;return al(Gi(Gi({},this.flattener.memoisedFlattenedProperties.get((e=g.class)!=null?e:g.type)),(i=g.properties)==null?void 0:i.reduce((E,a)=>Gi(Gi({},E),this.flattener.flattenMemberProperty(a)),{})),{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,e])=>[g,(0,sT.cloneDeep)(e)]))}getEnumsMap(){return new Map([...this.flattener.enumNameToValuesMap.entries()].map(([g,e])=>[g,(0,sT.cloneDeep)(e)]))}toJSON(){return JSON.stringify({customTypes:Gc(this.getCustomTypesMap()),enums:Gc(this.getEnumsMap())},null,4)}};function DO(g,e){let i=new Map(g.propertyTypes.filter(E=>E.type==="enum").map(E=>[E.name,new R2(E.values,E.valuesAsFlags)])),x=new Map(g.propertyTypes.filter(E=>E.type==="class").map(E=>[E.name,E.members])),T=new FO(x,i,e);return x.forEach((E,a)=>{T.flattenMembers(a,E)}),new OO(T)}var IO={parse:DO},b2=class{constructor(g,e){this.phaserTile=g,this.tiledProject=e}getProperty(g){var e,i;let x={};if(this.tiledProject){let T=IO.parse(this.tiledProject),E=this.getType();if(E){let a=(e=T.getCustomTypesMap())==null?void 0:e.get(E);if(a)for(let[y,t]of Object.entries(a))x[y]=t}}return(i=this.phaserTile.properties[g])!=null?i:x[g]}hasProperty(g){return this.getProperty(g)!=null}getType(){var g,e;return(e=(g=this.phaserTile.tileset)==null?void 0:g.tileData[this.phaserTile.index-1])==null?void 0:e.type}},NO=class{constructor(g,e){this.phaserTilemapLayer=g,this.tiledProject=e}getName(){return this.phaserTilemapLayer.layer.name}getProperty(g){let e=this.phaserTilemapLayer.layer.properties,i=e?.find(x=>x.name==g);return i?.value}hasProperty(g){return this.getProperty(g)!=null}isCharLayer(){return this.hasProperty(Wv)}getData(){return this.phaserTilemapLayer.layer.data.map(g=>g.map(e=>new b2(e,this.tiledProject)))}},BO=class{constructor(g,e){this.phaserTilemap=g,this.tiledProject=e;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 NO(g.tilemapLayer,this.tiledProject))}hasTileAt(g,e,i){return!!this.phaserTilemap.hasTileAt(g,e,i)}getTileAt(g,e,i){let x=this.phaserTilemap.getTileAt(g,e,!1,i);if(x)return new b2(x,this.tiledProject)}},F2=class wy{constructor(e){this.scene=e,this.geHeadless=new yO(!1),this.isCreatedInternal=!1,wy.welcomeMessagePrinted||(console.log(`Using GridEngine Phaser Plugin v${E2}`),wy.welcomeMessagePrinted=!0),this.scene.sys.events.once("boot",this.boot,this)}boot(){this.scene.sys.events.on("update",this.update,this)}getCharLayer(e){return this.geHeadless.getCharLayer(e)}getTransition(e,i){return this.geHeadless.getTransition(e,i)}setTransition(e,i,x){this.geHeadless.setTransition(e,i,x)}create(e,i){this.geHeadless.create(new BO(e,i.tiledProject),i),this.isCreatedInternal=!0,this.gridCharacters=new Map;let x=this.setConfigDefaults(i);this.config=x,this.gridTilemap=new Ay(e),this.addCharacters()}getPosition(e){return this.geHeadless.getPosition(e)}move(e,i){this.geHeadless.move(e,i)}moveRandomly(e,i=0,x=-1){this.geHeadless.moveRandomly(e,i,x)}getMovement(e){return this.geHeadless.getMovement(e)}moveTo(e,i,x){return this.geHeadless.moveTo(e,i,x)}stopMovement(e){this.geHeadless.stopMovement(e)}setSpeed(e,i){this.geHeadless.setSpeed(e,i)}getSpeed(e){return this.geHeadless.getSpeed(e)}setContainer(e,i){var x;this.initGuard();let T=(x=this.gridCharacters)==null?void 0:x.get(e);if(!T)throw this.createCharUnknownErr(e);T.setContainer(i)}getContainer(e){var i;this.initGuard();let x=(i=this.gridCharacters)==null?void 0:i.get(e);if(!x)throw this.createCharUnknownErr(e);return x.getContainer()}getOffsetX(e){var i;this.initGuard();let x=(i=this.gridCharacters)==null?void 0:i.get(e);if(!x)throw this.createCharUnknownErr(e);return x.getOffsetX()}setOffsetX(e,i){var x;this.initGuard();let T=(x=this.gridCharacters)==null?void 0:x.get(e);if(!T)throw this.createCharUnknownErr(e);T.setOffsetX(i)}getOffsetY(e){var i;this.initGuard();let x=(i=this.gridCharacters)==null?void 0:i.get(e);if(!x)throw this.createCharUnknownErr(e);return x.getOffsetY()}setOffsetY(e,i){var x;this.initGuard();let T=(x=this.gridCharacters)==null?void 0:x.get(e);if(!T)throw this.createCharUnknownErr(e);T.setOffsetY(i)}collidesWithTiles(e){return this.geHeadless.collidesWithTiles(e)}getWalkingAnimationMapping(e){var i;this.initGuard();let x=(i=this.gridCharacters)==null?void 0:i.get(e);if(!x)throw this.createCharUnknownErr(e);let T=x.getAnimation();return T?.getWalkingAnimationMapping()}hasLayerOverlay(){var e;return this.initGuard(),!!((e=this.config)!=null&&e.layerOverlay)}setWalkingAnimationMapping(e,i){var x;this.initGuard();let T=(x=this.gridCharacters)==null?void 0:x.get(e);if(!T)throw this.createCharUnknownErr(e);let E=T.getAnimation();E?.setWalkingAnimationMapping(i)}update(e,i){if(this.isCreatedInternal&&this.gridCharacters)for(let[x,T]of this.gridCharacters)T.update(i);this.geHeadless.update(e,i)}addCharacter(e){this.geHeadless.addCharacter(e),this.addCharacterInternal(e)}hasCharacter(e){return this.geHeadless.hasCharacter(e)}removeCharacter(e){var i,x;this.initGuard();let T=(i=this.gridCharacters)==null?void 0:i.get(e);if(!T)throw this.createCharUnknownErr(e);T.destroy(),(x=this.gridCharacters)==null||x.delete(e),this.geHeadless.removeCharacter(e)}removeAllCharacters(){if(this.initGuard(),!!this.gridCharacters){for(let e of this.gridCharacters.keys())this.removeCharacter(e);this.geHeadless.removeAllCharacters()}}getAllCharacters(e){return this.geHeadless.getAllCharacters(e)}getLabels(e){return this.geHeadless.getLabels(e)}addLabels(e,i){this.geHeadless.addLabels(e,i)}removeLabels(e,i){this.geHeadless.removeLabels(e,i)}clearLabels(e){this.geHeadless.clearLabels(e)}follow(e,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(e,i,E)}isMoving(e){return this.geHeadless.isMoving(e)}getFacingDirection(e){return this.geHeadless.getFacingDirection(e)}getFacingPosition(e){return this.geHeadless.getFacingPosition(e)}turnTowards(e,i){var x;this.initGuard();let T=(x=this.gridCharacters)==null?void 0:x.get(e);if(!T)throw this.createCharUnknownErr(e);T.turnTowards(i),this.geHeadless.turnTowards(e,i)}getCharactersAt(e,i){return this.geHeadless.getCharactersAt(e,i)}setPosition(e,i,x){this.geHeadless.setPosition(e,i,x)}getSprite(e){var i;this.initGuard();let x=(i=this.gridCharacters)==null?void 0:i.get(e);if(!x)throw this.createCharUnknownErr(e);return x.getSprite()}setSprite(e,i){var x;this.initGuard();let T=(x=this.gridCharacters)==null?void 0:x.get(e);if(!T)throw this.createCharUnknownErr(e);i.setOrigin(0,0),T.setSprite(i)}isBlocked(e,i,x=["geDefault"]){return this.geHeadless.isBlocked(e,i,x)}isTileBlocked(e,i){return this.geHeadless.isTileBlocked(e,i)}getCollisionGroups(e){return this.geHeadless.getCollisionGroups(e)}setCollisionGroups(e,i){this.geHeadless.setCollisionGroups(e,i)}getIgnoreCollisionGroups(e){return this.geHeadless.getIgnoreCollisionGroups(e)}setIgnoreCollisionGroups(e,i){this.geHeadless.setIgnoreCollisionGroups(e,i)}getTilePosInDirection(e,i,x){return this.geHeadless.getTilePosInDirection(e,i,x)}findShortestPath(e,i,x={}){return this.geHeadless.findShortestPath(e,i,x)}steppedOn(e,i,x){return this.geHeadless.steppedOn(e,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(e){return this.geHeadless.getMovementProgress(e)}rebuildTileCollisionCache(e,i,x,T){this.geHeadless.rebuildTileCollisionCache(e,i,x,T)}addQueueMovements(e,i,x){this.geHeadless.addQueueMovements(e,i,x)}getEnqueuedMovements(e){return this.geHeadless.getEnqueuedMovements(e)}queueMovementFinished(){return this.geHeadless.queueMovementFinished()}clearEnqueuedMovements(e){return this.geHeadless.clearEnqueuedMovements(e)}getState(){return{characters:this.geHeadless.getState().characters.map(e=>al(Gi({},e),{offsetX:this.getOffsetX(e.id),offsetY:this.getOffsetY(e.id)}))}}setState(e){if(this.geHeadless.setState(e),this.gridCharacters)for(let i of e.characters){let x=this.gridCharacters.get(i.id);x&&(x.setOffsetX(i.offsetX),x.setOffsetY(i.offsetY))}}getTileCost(e,i,x){return this.initGuard(),this.geHeadless.getTileCost(e,i,x)}setConfigDefaults(e){return Gi({collisionTilePropertyName:"ge_collide",numberOfDirections:4,characterCollisionStrategy:"BLOCK_TWO_TILES",layerOverlay:!1,cacheTileCollisions:!1},e)}initGuard(){if(!this.isCreatedInternal)throw this.createUninitializedErr()}createUninitializedErr(){throw new Error("GridEngine not initialized. You need to call create() first.")}addCharacters(){var e;(e=this.config)==null||e.characters.forEach(i=>this.addCharacterInternal(i))}createCharUnknownErr(e){return new Error(`Character unknown: ${e}`)}addCharacterInternal(e){var i;if(this.initGuard(),!this.gridTilemap)throw this.createUninitializedErr();if(!this.config)throw this.createUninitializedErr();let x=new q4(e,this.scene,this.gridTilemap,this.config.layerOverlay,this.geHeadless);(i=this.gridCharacters)==null||i.set(e.id,x)}};F2.welcomeMessagePrinted=!1;var UO=F2,zO=UO;/*! Bundled license information: + +tiled-property-flattener/dist/tiled_property_flattener.min.js: + (*! Bundled license information: + + lodash/lodash.js: + (** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + *) + *) +*/function aT(g){return g.type==="ROLL_DICE"}class vh{constructor(e,i=4){this.bounds=e,this.capacity=i,this.points=[],this.divided=!1,this.cache=new Map}subdivide(){const{xMin:e,yMin:i,xMax:x,yMax:T}=this.bounds,E=(x-e)/2,a=(T-i)/2,y=e,t=i;this.northeast=new vh({xMin:y+E,xMax:y+2*E,yMin:i,yMax:t+a},this.capacity),this.northwest=new vh({xMin:e,xMax:y+E,yMin:i,yMax:t+a},this.capacity),this.southeast=new vh({xMin:y+E,xMax:y+2*E,yMin:t+a,yMax:t+2*a},this.capacity),this.southwest=new vh({xMin:e,xMax:y+E,yMin:t+a,yMax:t+2*a},this.capacity),this.divided=!0}insert(e){return this.contains(e.bounds)?this.points.length=i&&e.xMax<=T&&e.yMin>=x&&e.yMax<=E}generateCacheKey(e){const{xMin:i,xMax:x,yMin:T,yMax:E}=e;return`${i},${x},${T},${E}`}queryRange(e,i=[]){if(!this.intersects(e))return i;for(const x of this.points)this.isWithinBounds(x.bounds,e)&&i.push(x);return this.divided&&(this.northwest?.queryRange(e,i),this.northeast?.queryRange(e,i),this.southwest?.queryRange(e,i),this.southeast?.queryRange(e,i)),i}query(e,i=[]){const x=`${e.x},${e.y}`,T=this.cache.get(x);if(T)return T;if(!this.intersects({xMin:e.x,xMax:e.x,yMin:e.y,yMax:e.y}))return i;for(const E of this.points)this.isWithinRange(e,E.bounds)&&i.push(E);return this.divided&&(this.northwest?.query(e,i),this.northeast?.query(e,i),this.southwest?.query(e,i),this.southeast?.query(e,i)),this.cache.set(x,i),i}intersects(e){const{xMin:i,yMin:x,xMax:T,yMax:E}=this.bounds;return!(e.xMin>T||e.xMaxE||e.yMax=i.xMin&&e.xMin<=i.xMax&&e.yMax>=i.yMin&&e.yMin<=i.yMax}isWithinRange(e,i){return e.x>=i.xMin&&e.x<=i.xMax&&e.y>=i.yMin&&e.y<=i.yMax}}class GO{constructor(){this.events={},this.lastEmitted=new Map}on(e,i){this.events[e]||(this.events[e]=[]),this.events[e]?.push(i)}off(e,i){this.events[e]&&(this.events[e]=this.events[e]?.filter(x=>x!==i))}emit(e,i,x=0){const T=Date.now(),E=this.lastEmitted.get(e)||0;if(T-E>=x){if(!this.events[e])return;this.events[e]?.forEach(a=>a(i)),this.lastEmitted.set(e,T)}}}const _e=new GO;function VO(g,e,i){let x=new Set([...e,void 0]);return g.listen((T,E)=>{x.has(E)&&i(T,E)})}function O2(g,e){return function(){return g.apply(e,arguments)}}const{toString:HO}=Object.prototype,{getPrototypeOf:Kx}=Object,km=(g=>e=>{const i=HO.call(e);return g[i]||(g[i]=i.slice(8,-1).toLowerCase())})(Object.create(null)),Aa=g=>(g=g.toLowerCase(),e=>km(e)===g),Km=g=>e=>typeof e===g,{isArray:gf}=Array,Jc=Km("undefined");function WO(g){return g!==null&&!Jc(g)&&g.constructor!==null&&!Jc(g.constructor)&&Ls(g.constructor.isBuffer)&&g.constructor.isBuffer(g)}const D2=Aa("ArrayBuffer");function XO(g){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(g):e=g&&g.buffer&&D2(g.buffer),e}const YO=Km("string"),Ls=Km("function"),I2=Km("number"),jm=g=>g!==null&&typeof g=="object",kO=g=>g===!0||g===!1,Xv=g=>{if(km(g)!=="object")return!1;const e=Kx(g);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in g)&&!(Symbol.iterator in g)},KO=Aa("Date"),jO=Aa("File"),ZO=Aa("Blob"),JO=Aa("FileList"),$O=g=>jm(g)&&Ls(g.pipe),QO=g=>{let e;return g&&(typeof FormData=="function"&&g instanceof FormData||Ls(g.append)&&((e=km(g))==="formdata"||e==="object"&&Ls(g.toString)&&g.toString()==="[object FormData]"))},_O=Aa("URLSearchParams"),qO=g=>g.trim?g.trim():g.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Td(g,e,{allOwnKeys:i=!1}={}){if(g===null||typeof g>"u")return;let x,T;if(typeof g!="object"&&(g=[g]),gf(g))for(x=0,T=g.length;x0;)if(T=i[x],e===T.toLowerCase())return T;return null}const B2=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,U2=g=>!Jc(g)&&g!==B2;function Py(){const{caseless:g}=U2(this)&&this||{},e={},i=(x,T)=>{const E=g&&N2(e,T)||T;Xv(e[E])&&Xv(x)?e[E]=Py(e[E],x):Xv(x)?e[E]=Py({},x):gf(x)?e[E]=x.slice():e[E]=x};for(let x=0,T=arguments.length;x(Td(e,(T,E)=>{i&&Ls(T)?g[E]=O2(T,i):g[E]=T},{allOwnKeys:x}),g),eD=g=>(g.charCodeAt(0)===65279&&(g=g.slice(1)),g),iD=(g,e,i,x)=>{g.prototype=Object.create(e.prototype,x),g.prototype.constructor=g,Object.defineProperty(g,"super",{value:e.prototype}),i&&Object.assign(g.prototype,i)},nD=(g,e,i,x)=>{let T,E,a;const y={};if(e=e||{},g==null)return e;do{for(T=Object.getOwnPropertyNames(g),E=T.length;E-- >0;)a=T[E],(!x||x(a,g,e))&&!y[a]&&(e[a]=g[a],y[a]=!0);g=i!==!1&&Kx(g)}while(g&&(!i||i(g,e))&&g!==Object.prototype);return e},rD=(g,e,i)=>{g=String(g),(i===void 0||i>g.length)&&(i=g.length),i-=e.length;const x=g.indexOf(e,i);return x!==-1&&x===i},sD=g=>{if(!g)return null;if(gf(g))return g;let e=g.length;if(!I2(e))return null;const i=new Array(e);for(;e-- >0;)i[e]=g[e];return i},aD=(g=>e=>g&&e instanceof g)(typeof Uint8Array<"u"&&Kx(Uint8Array)),oD=(g,e)=>{const x=(g&&g[Symbol.iterator]).call(g);let T;for(;(T=x.next())&&!T.done;){const E=T.value;e.call(g,E[0],E[1])}},lD=(g,e)=>{let i;const x=[];for(;(i=g.exec(e))!==null;)x.push(i);return x},hD=Aa("HTMLFormElement"),uD=g=>g.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(i,x,T){return x.toUpperCase()+T}),oT=(({hasOwnProperty:g})=>(e,i)=>g.call(e,i))(Object.prototype),fD=Aa("RegExp"),z2=(g,e)=>{const i=Object.getOwnPropertyDescriptors(g),x={};Td(i,(T,E)=>{let a;(a=e(T,E,g))!==!1&&(x[E]=a||T)}),Object.defineProperties(g,x)},cD=g=>{z2(g,(e,i)=>{if(Ls(g)&&["arguments","caller","callee"].indexOf(i)!==-1)return!1;const x=g[i];if(Ls(x)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+i+"'")})}})},dD=(g,e)=>{const i={},x=T=>{T.forEach(E=>{i[E]=!0})};return gf(g)?x(g):x(String(g).split(e)),i},pD=()=>{},vD=(g,e)=>(g=+g,Number.isFinite(g)?g:e),g0="abcdefghijklmnopqrstuvwxyz",lT="0123456789",G2={DIGIT:lT,ALPHA:g0,ALPHA_DIGIT:g0+g0.toUpperCase()+lT},mD=(g=16,e=G2.ALPHA_DIGIT)=>{let i="";const{length:x}=e;for(;g--;)i+=e[Math.random()*x|0];return i};function gD(g){return!!(g&&Ls(g.append)&&g[Symbol.toStringTag]==="FormData"&&g[Symbol.iterator])}const yD=g=>{const e=new Array(10),i=(x,T)=>{if(jm(x)){if(e.indexOf(x)>=0)return;if(!("toJSON"in x)){e[T]=x;const E=gf(x)?[]:{};return Td(x,(a,y)=>{const t=i(a,T+1);!Jc(t)&&(E[y]=t)}),e[T]=void 0,E}}return x};return i(g,0)},xD=Aa("AsyncFunction"),SD=g=>g&&(jm(g)||Ls(g))&&Ls(g.then)&&Ls(g.catch),Kt={isArray:gf,isArrayBuffer:D2,isBuffer:WO,isFormData:QO,isArrayBufferView:XO,isString:YO,isNumber:I2,isBoolean:kO,isObject:jm,isPlainObject:Xv,isUndefined:Jc,isDate:KO,isFile:jO,isBlob:ZO,isRegExp:fD,isFunction:Ls,isStream:$O,isURLSearchParams:_O,isTypedArray:aD,isFileList:JO,forEach:Td,merge:Py,extend:tD,trim:qO,stripBOM:eD,inherits:iD,toFlatObject:nD,kindOf:km,kindOfTest:Aa,endsWith:rD,toArray:sD,forEachEntry:oD,matchAll:lD,isHTMLForm:hD,hasOwnProperty:oT,hasOwnProp:oT,reduceDescriptors:z2,freezeMethods:cD,toObjectSet:dD,toCamelCase:uD,noop:pD,toFiniteNumber:vD,findKey:N2,global:B2,isContextDefined:U2,ALPHABET:G2,generateString:mD,isSpecCompliantForm:gD,toJSONObject:yD,isAsyncFn:xD,isThenable:SD};function ui(g,e,i,x,T){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=g,this.name="AxiosError",e&&(this.code=e),i&&(this.config=i),x&&(this.request=x),T&&(this.response=T)}Kt.inherits(ui,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:Kt.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const V2=ui.prototype,H2={};["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=>{H2[g]={value:g}});Object.defineProperties(ui,H2);Object.defineProperty(V2,"isAxiosError",{value:!0});ui.from=(g,e,i,x,T,E)=>{const a=Object.create(V2);return Kt.toFlatObject(g,a,function(t){return t!==Error.prototype},y=>y!=="isAxiosError"),ui.call(a,g.message,e,i,x,T),a.cause=g,a.name=g.name,E&&Object.assign(a,E),a};const TD=null;function Ry(g){return Kt.isPlainObject(g)||Kt.isArray(g)}function W2(g){return Kt.endsWith(g,"[]")?g.slice(0,-2):g}function hT(g,e,i){return g?g.concat(e).map(function(T,E){return T=W2(T),!i&&E?"["+T+"]":T}).join(i?".":""):e}function ED(g){return Kt.isArray(g)&&!g.some(Ry)}const MD=Kt.toFlatObject(Kt,{},null,function(e){return/^is[A-Z]/.test(e)});function Zm(g,e,i){if(!Kt.isObject(g))throw new TypeError("target must be an object");e=e||new FormData,i=Kt.toFlatObject(i,{metaTokens:!0,dots:!1,indexes:!1},!1,function(u,f){return!Kt.isUndefined(f[u])});const x=i.metaTokens,T=i.visitor||p,E=i.dots,a=i.indexes,t=(i.Blob||typeof Blob<"u"&&Blob)&&Kt.isSpecCompliantForm(e);if(!Kt.isFunction(T))throw new TypeError("visitor must be a function");function r(n){if(n===null)return"";if(Kt.isDate(n))return n.toISOString();if(!t&&Kt.isBlob(n))throw new ui("Blob is not supported. Use a Buffer instead.");return Kt.isArrayBuffer(n)||Kt.isTypedArray(n)?t&&typeof Blob=="function"?new Blob([n]):Buffer.from(n):n}function p(n,u,f){let s=n;if(n&&!f&&typeof n=="object"){if(Kt.endsWith(u,"{}"))u=x?u:u.slice(0,-2),n=JSON.stringify(n);else if(Kt.isArray(n)&&ED(n)||(Kt.isFileList(n)||Kt.endsWith(u,"[]"))&&(s=Kt.toArray(n)))return u=W2(u),s.forEach(function(d,v){!(Kt.isUndefined(d)||d===null)&&e.append(a===!0?hT([u],v,E):a===null?u:u+"[]",r(d))}),!1}return Ry(n)?!0:(e.append(hT(f,u,E),r(n)),!1)}const h=[],o=Object.assign(MD,{defaultVisitor:p,convertValue:r,isVisitable:Ry});function l(n,u){if(!Kt.isUndefined(n)){if(h.indexOf(n)!==-1)throw Error("Circular reference detected in "+u.join("."));h.push(n),Kt.forEach(n,function(s,c){(!(Kt.isUndefined(s)||s===null)&&T.call(e,s,Kt.isString(c)?c.trim():c,u,o))===!0&&l(s,u?u.concat(c):[c])}),h.pop()}}if(!Kt.isObject(g))throw new TypeError("data must be an object");return l(g),e}function uT(g){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(g).replace(/[!'()~]|%20|%00/g,function(x){return e[x]})}function jx(g,e){this._pairs=[],g&&Zm(g,this,e)}const X2=jx.prototype;X2.append=function(e,i){this._pairs.push([e,i])};X2.toString=function(e){const i=e?function(x){return e.call(this,x,uT)}:uT;return this._pairs.map(function(T){return i(T[0])+"="+i(T[1])},"").join("&")};function CD(g){return encodeURIComponent(g).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Y2(g,e,i){if(!e)return g;const x=i&&i.encode||CD,T=i&&i.serialize;let E;if(T?E=T(e,i):E=Kt.isURLSearchParams(e)?e.toString():new jx(e,i).toString(x),E){const a=g.indexOf("#");a!==-1&&(g=g.slice(0,a)),g+=(g.indexOf("?")===-1?"?":"&")+E}return g}class fT{constructor(){this.handlers=[]}use(e,i,x){return this.handlers.push({fulfilled:e,rejected:i,synchronous:x?x.synchronous:!1,runWhen:x?x.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Kt.forEach(this.handlers,function(x){x!==null&&e(x)})}}const k2={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},AD=typeof URLSearchParams<"u"?URLSearchParams:jx,wD=typeof FormData<"u"?FormData:null,PD=typeof Blob<"u"?Blob:null,RD={isBrowser:!0,classes:{URLSearchParams:AD,FormData:wD,Blob:PD},protocols:["http","https","file","blob","url","data"]},K2=typeof window<"u"&&typeof document<"u",LD=(g=>K2&&["ReactNative","NativeScript","NS"].indexOf(g)<0)(typeof navigator<"u"&&navigator.product),bD=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",FD=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:K2,hasStandardBrowserEnv:LD,hasStandardBrowserWebWorkerEnv:bD},Symbol.toStringTag,{value:"Module"})),ya={...FD,...RD};function OD(g,e){return Zm(g,new ya.classes.URLSearchParams,Object.assign({visitor:function(i,x,T,E){return ya.isNode&&Kt.isBuffer(i)?(this.append(x,i.toString("base64")),!1):E.defaultVisitor.apply(this,arguments)}},e))}function DD(g){return Kt.matchAll(/\w+|\[(\w*)]/g,g).map(e=>e[0]==="[]"?"":e[1]||e[0])}function ID(g){const e={},i=Object.keys(g);let x;const T=i.length;let E;for(x=0;x=i.length;return a=!a&&Kt.isArray(T)?T.length:a,t?(Kt.hasOwnProp(T,a)?T[a]=[T[a],x]:T[a]=x,!y):((!T[a]||!Kt.isObject(T[a]))&&(T[a]=[]),e(i,x,T[a],E)&&Kt.isArray(T[a])&&(T[a]=ID(T[a])),!y)}if(Kt.isFormData(g)&&Kt.isFunction(g.entries)){const i={};return Kt.forEachEntry(g,(x,T)=>{e(DD(x),T,i,0)}),i}return null}function ND(g,e,i){if(Kt.isString(g))try{return(e||JSON.parse)(g),Kt.trim(g)}catch(x){if(x.name!=="SyntaxError")throw x}return(i||JSON.stringify)(g)}const Zx={transitional:k2,adapter:["xhr","http"],transformRequest:[function(e,i){const x=i.getContentType()||"",T=x.indexOf("application/json")>-1,E=Kt.isObject(e);if(E&&Kt.isHTMLForm(e)&&(e=new FormData(e)),Kt.isFormData(e))return T?JSON.stringify(j2(e)):e;if(Kt.isArrayBuffer(e)||Kt.isBuffer(e)||Kt.isStream(e)||Kt.isFile(e)||Kt.isBlob(e))return e;if(Kt.isArrayBufferView(e))return e.buffer;if(Kt.isURLSearchParams(e))return i.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let y;if(E){if(x.indexOf("application/x-www-form-urlencoded")>-1)return OD(e,this.formSerializer).toString();if((y=Kt.isFileList(e))||x.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Zm(y?{"files[]":e}:e,t&&new t,this.formSerializer)}}return E||T?(i.setContentType("application/json",!1),ND(e)):e}],transformResponse:[function(e){const i=this.transitional||Zx.transitional,x=i&&i.forcedJSONParsing,T=this.responseType==="json";if(e&&Kt.isString(e)&&(x&&!this.responseType||T)){const a=!(i&&i.silentJSONParsing)&&T;try{return JSON.parse(e)}catch(y){if(a)throw y.name==="SyntaxError"?ui.from(y,ui.ERR_BAD_RESPONSE,this,null,this.response):y}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ya.classes.FormData,Blob:ya.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Kt.forEach(["delete","get","head","post","put","patch"],g=>{Zx.headers[g]={}});const Jx=Zx,BD=Kt.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"]),UD=g=>{const e={};let i,x,T;return g&&g.split(` +`).forEach(function(a){T=a.indexOf(":"),i=a.substring(0,T).trim().toLowerCase(),x=a.substring(T+1).trim(),!(!i||e[i]&&BD[i])&&(i==="set-cookie"?e[i]?e[i].push(x):e[i]=[x]:e[i]=e[i]?e[i]+", "+x:x)}),e},cT=Symbol("internals");function yc(g){return g&&String(g).trim().toLowerCase()}function Yv(g){return g===!1||g==null?g:Kt.isArray(g)?g.map(Yv):String(g)}function zD(g){const e=Object.create(null),i=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let x;for(;x=i.exec(g);)e[x[1]]=x[2];return e}const GD=g=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(g.trim());function y0(g,e,i,x,T){if(Kt.isFunction(x))return x.call(this,e,i);if(T&&(e=i),!!Kt.isString(e)){if(Kt.isString(x))return e.indexOf(x)!==-1;if(Kt.isRegExp(x))return x.test(e)}}function VD(g){return g.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,i,x)=>i.toUpperCase()+x)}function HD(g,e){const i=Kt.toCamelCase(" "+e);["get","set","has"].forEach(x=>{Object.defineProperty(g,x+i,{value:function(T,E,a){return this[x].call(this,e,T,E,a)},configurable:!0})})}class Jm{constructor(e){e&&this.set(e)}set(e,i,x){const T=this;function E(y,t,r){const p=yc(t);if(!p)throw new Error("header name must be a non-empty string");const h=Kt.findKey(T,p);(!h||T[h]===void 0||r===!0||r===void 0&&T[h]!==!1)&&(T[h||t]=Yv(y))}const a=(y,t)=>Kt.forEach(y,(r,p)=>E(r,p,t));return Kt.isPlainObject(e)||e instanceof this.constructor?a(e,i):Kt.isString(e)&&(e=e.trim())&&!GD(e)?a(UD(e),i):e!=null&&E(i,e,x),this}get(e,i){if(e=yc(e),e){const x=Kt.findKey(this,e);if(x){const T=this[x];if(!i)return T;if(i===!0)return zD(T);if(Kt.isFunction(i))return i.call(this,T,x);if(Kt.isRegExp(i))return i.exec(T);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,i){if(e=yc(e),e){const x=Kt.findKey(this,e);return!!(x&&this[x]!==void 0&&(!i||y0(this,this[x],x,i)))}return!1}delete(e,i){const x=this;let T=!1;function E(a){if(a=yc(a),a){const y=Kt.findKey(x,a);y&&(!i||y0(x,x[y],y,i))&&(delete x[y],T=!0)}}return Kt.isArray(e)?e.forEach(E):E(e),T}clear(e){const i=Object.keys(this);let x=i.length,T=!1;for(;x--;){const E=i[x];(!e||y0(this,this[E],E,e,!0))&&(delete this[E],T=!0)}return T}normalize(e){const i=this,x={};return Kt.forEach(this,(T,E)=>{const a=Kt.findKey(x,E);if(a){i[a]=Yv(T),delete i[E];return}const y=e?VD(E):String(E).trim();y!==E&&delete i[E],i[y]=Yv(T),x[y]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const i=Object.create(null);return Kt.forEach(this,(x,T)=>{x!=null&&x!==!1&&(i[T]=e&&Kt.isArray(x)?x.join(", "):x)}),i}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,i])=>e+": "+i).join(` +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...i){const x=new this(e);return i.forEach(T=>x.set(T)),x}static accessor(e){const x=(this[cT]=this[cT]={accessors:{}}).accessors,T=this.prototype;function E(a){const y=yc(a);x[y]||(HD(T,a),x[y]=!0)}return Kt.isArray(e)?e.forEach(E):E(e),this}}Jm.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Kt.reduceDescriptors(Jm.prototype,({value:g},e)=>{let i=e[0].toUpperCase()+e.slice(1);return{get:()=>g,set(x){this[i]=x}}});Kt.freezeMethods(Jm);const ro=Jm;function x0(g,e){const i=this||Jx,x=e||i,T=ro.from(x.headers);let E=x.data;return Kt.forEach(g,function(y){E=y.call(i,E,T.normalize(),e?e.status:void 0)}),T.normalize(),E}function Z2(g){return!!(g&&g.__CANCEL__)}function Ed(g,e,i){ui.call(this,g??"canceled",ui.ERR_CANCELED,e,i),this.name="CanceledError"}Kt.inherits(Ed,ui,{__CANCEL__:!0});function WD(g,e,i){const x=i.config.validateStatus;!i.status||!x||x(i.status)?g(i):e(new ui("Request failed with status code "+i.status,[ui.ERR_BAD_REQUEST,ui.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i))}const XD=ya.hasStandardBrowserEnv?{write(g,e,i,x,T,E){const a=[g+"="+encodeURIComponent(e)];Kt.isNumber(i)&&a.push("expires="+new Date(i).toGMTString()),Kt.isString(x)&&a.push("path="+x),Kt.isString(T)&&a.push("domain="+T),E===!0&&a.push("secure"),document.cookie=a.join("; ")},read(g){const e=document.cookie.match(new RegExp("(^|;\\s*)("+g+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(g){this.write(g,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function YD(g){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(g)}function kD(g,e){return e?g.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):g}function J2(g,e){return g&&!YD(e)?kD(g,e):e}const KD=ya.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),i=document.createElement("a");let x;function T(E){let a=E;return e&&(i.setAttribute("href",a),a=i.href),i.setAttribute("href",a),{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(a){const y=Kt.isString(a)?T(a):a;return y.protocol===x.protocol&&y.host===x.host}}():function(){return function(){return!0}}();function jD(g){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(g);return e&&e[1]||""}function ZD(g,e){g=g||10;const i=new Array(g),x=new Array(g);let T=0,E=0,a;return e=e!==void 0?e:1e3,function(t){const r=Date.now(),p=x[E];a||(a=r),i[T]=t,x[T]=r;let h=E,o=0;for(;h!==T;)o+=i[h++],h=h%g;if(T=(T+1)%g,T===E&&(E=(E+1)%g),r-a{const E=T.loaded,a=T.lengthComputable?T.total:void 0,y=E-i,t=x(y),r=E<=a;i=E;const p={loaded:E,total:a,progress:a?E/a:void 0,bytes:y,rate:t||void 0,estimated:t&&a&&r?(a-E)/t:void 0,event:T};p[e?"download":"upload"]=!0,g(p)}}const JD=typeof XMLHttpRequest<"u",$D=JD&&function(g){return new Promise(function(i,x){let T=g.data;const E=ro.from(g.headers).normalize();let{responseType:a,withXSRFToken:y}=g,t;function r(){g.cancelToken&&g.cancelToken.unsubscribe(t),g.signal&&g.signal.removeEventListener("abort",t)}let p;if(Kt.isFormData(T)){if(ya.hasStandardBrowserEnv||ya.hasStandardBrowserWebWorkerEnv)E.setContentType(!1);else if((p=E.getContentType())!==!1){const[u,...f]=p?p.split(";").map(s=>s.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 o=J2(g.baseURL,g.url);h.open(g.method.toUpperCase(),Y2(o,g.params,g.paramsSerializer),!0),h.timeout=g.timeout;function l(){if(!h)return;const u=ro.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),s={data:!a||a==="text"||a==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:u,config:g,request:h};WD(function(d){i(d),r()},function(d){x(d),r()},s),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 ui("Request aborted",ui.ECONNABORTED,g,h)),h=null)},h.onerror=function(){x(new ui("Network Error",ui.ERR_NETWORK,g,h)),h=null},h.ontimeout=function(){let f=g.timeout?"timeout of "+g.timeout+"ms exceeded":"timeout exceeded";const s=g.transitional||k2;g.timeoutErrorMessage&&(f=g.timeoutErrorMessage),x(new ui(f,s.clarifyTimeoutError?ui.ETIMEDOUT:ui.ECONNABORTED,g,h)),h=null},ya.hasStandardBrowserEnv&&(y&&Kt.isFunction(y)&&(y=y(g)),y||y!==!1&&KD(o))){const u=g.xsrfHeaderName&&g.xsrfCookieName&&XD.read(g.xsrfCookieName);u&&E.set(g.xsrfHeaderName,u)}T===void 0&&E.setContentType(null),"setRequestHeader"in h&&Kt.forEach(E.toJSON(),function(f,s){h.setRequestHeader(s,f)}),Kt.isUndefined(g.withCredentials)||(h.withCredentials=!!g.withCredentials),a&&a!=="json"&&(h.responseType=g.responseType),typeof g.onDownloadProgress=="function"&&h.addEventListener("progress",dT(g.onDownloadProgress,!0)),typeof g.onUploadProgress=="function"&&h.upload&&h.upload.addEventListener("progress",dT(g.onUploadProgress)),(g.cancelToken||g.signal)&&(t=u=>{h&&(x(!u||u.type?new Ed(null,g,h):u),h.abort(),h=null)},g.cancelToken&&g.cancelToken.subscribe(t),g.signal&&(g.signal.aborted?t():g.signal.addEventListener("abort",t)));const n=jD(o);if(n&&ya.protocols.indexOf(n)===-1){x(new ui("Unsupported protocol "+n+":",ui.ERR_BAD_REQUEST,g));return}h.send(T||null)})},Ly={http:TD,xhr:$D};Kt.forEach(Ly,(g,e)=>{if(g){try{Object.defineProperty(g,"name",{value:e})}catch{}Object.defineProperty(g,"adapterName",{value:e})}});const pT=g=>`- ${g}`,QD=g=>Kt.isFunction(g)||g===null||g===!1,$2={getAdapter:g=>{g=Kt.isArray(g)?g:[g];const{length:e}=g;let i,x;const T={};for(let E=0;E`adapter ${y} `+(t===!1?"is not supported by the environment":"is not available in the build"));let a=e?E.length>1?`since : +`+E.map(pT).join(` +`):" "+pT(E[0]):"as no adapter specified";throw new ui("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return x},adapters:Ly};function S0(g){if(g.cancelToken&&g.cancelToken.throwIfRequested(),g.signal&&g.signal.aborted)throw new Ed(null,g)}function vT(g){return S0(g),g.headers=ro.from(g.headers),g.data=x0.call(g,g.transformRequest),["post","put","patch"].indexOf(g.method)!==-1&&g.headers.setContentType("application/x-www-form-urlencoded",!1),$2.getAdapter(g.adapter||Jx.adapter)(g).then(function(x){return S0(g),x.data=x0.call(g,g.transformResponse,x),x.headers=ro.from(x.headers),x},function(x){return Z2(x)||(S0(g),x&&x.response&&(x.response.data=x0.call(g,g.transformResponse,x.response),x.response.headers=ro.from(x.response.headers))),Promise.reject(x)})}const mT=g=>g instanceof ro?g.toJSON():g;function uf(g,e){e=e||{};const i={};function x(r,p,h){return Kt.isPlainObject(r)&&Kt.isPlainObject(p)?Kt.merge.call({caseless:h},r,p):Kt.isPlainObject(p)?Kt.merge({},p):Kt.isArray(p)?p.slice():p}function T(r,p,h){if(Kt.isUndefined(p)){if(!Kt.isUndefined(r))return x(void 0,r,h)}else return x(r,p,h)}function E(r,p){if(!Kt.isUndefined(p))return x(void 0,p)}function a(r,p){if(Kt.isUndefined(p)){if(!Kt.isUndefined(r))return x(void 0,r)}else return x(void 0,p)}function y(r,p,h){if(h in e)return x(r,p);if(h in g)return x(void 0,r)}const t={url:E,method:E,data:E,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:y,headers:(r,p)=>T(mT(r),mT(p),!0)};return Kt.forEach(Object.keys(Object.assign({},g,e)),function(p){const h=t[p]||T,o=h(g[p],e[p],p);Kt.isUndefined(o)&&h!==y||(i[p]=o)}),i}const Q2="1.6.7",$x={};["object","boolean","number","function","string","symbol"].forEach((g,e)=>{$x[g]=function(x){return typeof x===g||"a"+(e<1?"n ":" ")+g}});const gT={};$x.transitional=function(e,i,x){function T(E,a){return"[Axios v"+Q2+"] Transitional option '"+E+"'"+a+(x?". "+x:"")}return(E,a,y)=>{if(e===!1)throw new ui(T(a," has been removed"+(i?" in "+i:"")),ui.ERR_DEPRECATED);return i&&!gT[a]&&(gT[a]=!0,console.warn(T(a," has been deprecated since v"+i+" and will be removed in the near future"))),e?e(E,a,y):!0}};function _D(g,e,i){if(typeof g!="object")throw new ui("options must be an object",ui.ERR_BAD_OPTION_VALUE);const x=Object.keys(g);let T=x.length;for(;T-- >0;){const E=x[T],a=e[E];if(a){const y=g[E],t=y===void 0||a(y,E,g);if(t!==!0)throw new ui("option "+E+" must be "+t,ui.ERR_BAD_OPTION_VALUE);continue}if(i!==!0)throw new ui("Unknown option "+E,ui.ERR_BAD_OPTION)}}const by={assertOptions:_D,validators:$x},Yo=by.validators;class am{constructor(e){this.defaults=e,this.interceptors={request:new fT,response:new fT}}async request(e,i){try{return await this._request(e,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(e,i){typeof e=="string"?(i=i||{},i.url=e):i=e||{},i=uf(this.defaults,i);const{transitional:x,paramsSerializer:T,headers:E}=i;x!==void 0&&by.assertOptions(x,{silentJSONParsing:Yo.transitional(Yo.boolean),forcedJSONParsing:Yo.transitional(Yo.boolean),clarifyTimeoutError:Yo.transitional(Yo.boolean)},!1),T!=null&&(Kt.isFunction(T)?i.paramsSerializer={serialize:T}:by.assertOptions(T,{encode:Yo.function,serialize:Yo.function},!0)),i.method=(i.method||this.defaults.method||"get").toLowerCase();let a=E&&Kt.merge(E.common,E[i.method]);E&&Kt.forEach(["delete","get","head","post","put","patch","common"],n=>{delete E[n]}),i.headers=ro.concat(a,E);const y=[];let t=!0;this.interceptors.request.forEach(function(u){typeof u.runWhen=="function"&&u.runWhen(i)===!1||(t=t&&u.synchronous,y.unshift(u.fulfilled,u.rejected))});const r=[];this.interceptors.response.forEach(function(u){r.push(u.fulfilled,u.rejected)});let p,h=0,o;if(!t){const n=[vT.bind(this),void 0];for(n.unshift.apply(n,y),n.push.apply(n,r),o=n.length,p=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 a=new Promise(y=>{x.subscribe(y),E=y}).then(T);return a.cancel=function(){x.unsubscribe(E)},a},e(function(E,a,y){x.reason||(x.reason=new Ed(E,a,y),i(x.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const i=this._listeners.indexOf(e);i!==-1&&this._listeners.splice(i,1)}static source(){let e;return{token:new Qx(function(T){e=T}),cancel:e}}}const qD=Qx;function tI(g){return function(i){return g.apply(null,i)}}function eI(g){return Kt.isObject(g)&&g.isAxiosError===!0}const Fy={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(Fy).forEach(([g,e])=>{Fy[e]=g});const iI=Fy;function _2(g){const e=new kv(g),i=O2(kv.prototype.request,e);return Kt.extend(i,kv.prototype,e,{allOwnKeys:!0}),Kt.extend(i,e,null,{allOwnKeys:!0}),i.create=function(T){return _2(uf(g,T))},i}const Mn=_2(Jx);Mn.Axios=kv;Mn.CanceledError=Ed;Mn.CancelToken=qD;Mn.isCancel=Z2;Mn.VERSION=Q2;Mn.toFormData=Zm;Mn.AxiosError=ui;Mn.Cancel=Mn.CanceledError;Mn.all=function(e){return Promise.all(e)};Mn.spread=tI;Mn.isAxiosError=eI;Mn.mergeConfig=uf;Mn.AxiosHeaders=ro;Mn.formToJSON=g=>j2(Kt.isHTMLForm(g)?new FormData(g):g);Mn.getAdapter=$2.getAdapter;Mn.HttpStatusCode=iI;Mn.default=Mn;const Qu="0123456789ABCDEFGHJKMNPQRSTVWXYZ";function nI(g,e,i){for(;g.length=0;x--){const T=g%Qu.length;i=Qu.charAt(T)+i,g=Math.floor(g/Qu.length)}return nI(i,e,Qu[0])}function _x(){const g=Date.now(),e=aI(g,10),i=sI(16);return e+i}const oI={id:"",title:"",description:"",journals:[],isComplete:!1,reward:""},lI={backpack:[],equipment:{head:null,body:null,legs:null,feet:null,hands:null,weapon:null,shield:null,accessory:null}},q2={},hI={inCombat:!1,isDead:!1,isResting:!1,activeBoosts:{}},uI={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"},fI={stats:uI,inventory:lI,state:hI},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},dI={gamemode:"Idle",action:{type:"ROLL_DICE",diceValues:[],isRolling:!1},textures:{side1:"",side2:"",side3:"",side4:"",side5:"",side6:""}},pI=g=>{kn(async()=>{or.set({...or.get(),[g.id]:g})})},vI=g=>{kn(async()=>{const e=or.get(),{[g]:i,...x}=e;or.set(x)})};function Dh(g,e){return xb(g,e,{encode(i){return JSON.stringify(i)},decode(i){try{return JSON.parse(i)}catch{return e}}})}const Ni=Dh("playerData",fI),mI=Dh("quest",oI),or=Dh("items",q2),$l=Dh("notifications",[]),tC=Dh("itemDB",q2),om=Dh("settings",cI),$c=Dh("minigameState",dI),Ql=g=>om.get()[g],xc=(g,e)=>{kn(async()=>{const i=om.get();om.set({...i,[g]:e})})},gI=()=>{kn(async()=>{try{const e=(await Mn.get("https://kbve.com/api/itemdb.json")).data,i={};Object.keys(e.key).forEach(x=>{const T=e.key[x];i[T.id]=T,i[T.name]=T}),tC.set(i)}catch(g){console.error("Failed to reload item database:",g)}})},yI=g=>tC.get()[g],xI=g=>{kn(async()=>{const e=Ni.get();e.inventory.backpack.push(g),Ni.set({...e})})},eo=g=>{const i=or.get()[g];if(i)return i;console.warn(`Item with ID ${g} not found.`)},SI=g=>{kn(async()=>{const e=_x(),i={...g,id:e};pI(i),xI(i.id),_e.emit("notification",{title:"Success",message:`You got a ${i.name}, verified by E Corp ID ${i.id}`,notificationType:Rh.success})})},TI=(g,e)=>{kn(async()=>{const i=Ni.get(),x=or.get()[e];if(x){const T=i.inventory.equipment[g];if(T){const E=or.get()[T];E.equipped=!1,or.set({...or.get(),[E.id]:E})}x.equipped=!0,or.set({...or.get(),[x.id]:x}),i.inventory.equipment[g]=e,Ni.set({...i})}})},EI=g=>{kn(async()=>{const e=Ni.get(),i=e.inventory.equipment[g];if(i){const x=or.get()[i];x&&(x.equipped=!1,or.set({...or.get(),[x.id]:x}),e.inventory.equipment[g]=null,Ni.set({...e}))}})},yT=g=>{kn(async()=>{const e=Ni.get(),i=or.get()[g];i&&!i.equipped?(e.inventory.backpack=e.inventory.backpack.filter(x=>x!==g),Ni.set({...e}),vI(g)):_e.emit("notification",{title:"Warning",message:"Cannot remove item that is currently equipped.",notificationType:Rh.warning})})},eC=g=>{kn(async()=>{const e=Ni.get(),i=parseInt(e.stats.health,10),x=Math.max(i-g,0);e.stats={...e.stats,health:x.toString()},Ni.set({...e})})},MI=g=>{kn(async()=>{const e=Ni.get(),i=parseInt(e.stats.health,10),x=parseInt(e.stats.maxHealth,10),T=Math.min(i+g,x);e.stats={...e.stats,health:T.toString()},Ni.set({...e})})},CI=g=>{kn(async()=>{const e=Ni.get(),i=parseInt(e.stats.mana,10),x=Math.max(i-g,0);e.stats={...e.stats,mana:x.toString()},Ni.set({...e})})},AI=g=>{kn(async()=>{const e=Ni.get(),i=parseInt(e.stats.mana,10),x=parseInt(e.stats.maxMana,10),T=Math.min(i+g,x);e.stats={...e.stats,mana:T.toString()},Ni.set({...e})})},wI=g=>{kn(async()=>{const e=Ni.get(),i=parseInt(e.stats.energy,10),x=Math.max(i-g,0);e.stats={...e.stats,energy:x.toString()},Ni.set({...e})})},PI=g=>{kn(async()=>{const e=Ni.get(),i=parseInt(e.stats.energy,10),x=parseInt(e.stats.maxEnergy,10),T=Math.min(i+g,x);e.stats={...e.stats,energy:T.toString()},Ni.set({...e})})},RI=g=>{if(g.health!==void 0){const e=parseInt(g.health,10);e>0?MI(e):eC(Math.abs(e))}if(g.mana!==void 0){const e=parseInt(g.mana,10);e>0?AI(e):CI(Math.abs(e))}if(g.energy!==void 0){const e=parseInt(g.energy,10);e>0?PI(e):wI(Math.abs(e))}},LI=async g=>{const e=_x();kn(async()=>{const i=Ni.get();i.state.activeBoosts[e]={...g,expiry:Date.now()+g.duration*1e3},Ni.set({...i})})},bI=g=>{kn(async()=>{const e=Ni.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};RI(x),g.boost&&LI(g.boost),g.action&&console.log(`Action: ${g.action}`),Ni.set({...e})})},FI=g=>{const e=eo(g);if(!e)return[];const i=["view","discard"];return e.consumable&&i.push("consume"),e.equipped?i.push("unequip"):e.consumable||i.push("equip"),i},Rh={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 Md(g){try{kn(async()=>{const e=$c.get();$c.set({...e,...g})})}catch(e){console.error("Error updating minigame state:",e)}}function OI(g){Md({gamemode:g})}function DI(g){Md({action:g})}function II(g){Md({textures:g})}function iC(g){const e=$c.get();e.gamemode==="Dice"&&e.action.type==="ROLL_DICE"&&Md({action:{...e.action,diceValues:g}})}function xT(g){const e=$c.get();e.gamemode==="Dice"&&e.action.type==="ROLL_DICE"&&Md({action:{...e.action,isRolling:g}})}const NI=({styleClass:g,size:e=32,color:i="#000",onClick:x,...T})=>kt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",width:e,height:e,className:g,onClick:x,...T,children:kt.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"})}),BI=({styleClass:g,size:e=24,color:i="#000",onClick:x,...T})=>kt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",width:e,height:e,className:g,onClick:x,...T,children:kt.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"})});/** + * @license + * Copyright 2010-2023 Three.js Authors + * SPDX-License-Identifier: MIT + */const $m="161",UI={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},zI={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},nC=0,Oy=1,rC=2,GI=3,sC=0,Qm=1,Vc=2,ks=3,ao=0,Cr=1,ga=2,so=0,Sh=1,Dy=2,Iy=3,Ny=4,aC=5,tl=100,oC=101,lC=102,By=103,Uy=104,hC=200,uC=201,fC=202,cC=203,lm=204,hm=205,dC=206,pC=207,vC=208,mC=209,gC=210,yC=211,xC=212,SC=213,TC=214,EC=0,MC=1,CC=2,Qc=3,AC=4,wC=5,PC=6,RC=7,Cd=0,LC=1,bC=2,Ta=0,FC=1,OC=2,DC=3,qx=4,IC=5,NC=6,zy="attached",BC="detached",_m=300,oo=301,ll=302,_c=303,qc=304,yf=306,td=1e3,lr=1001,ed=1002,cn=1003,um=1004,VI=1004,dh=1005,HI=1005,Ki=1006,Hc=1007,WI=1007,xa=1008,XI=1008,Ea=1009,UC=1010,zC=1011,qm=1012,t1=1013,io=1014,Ps=1015,ff=1016,e1=1017,i1=1018,nl=1020,GC=1021,Er=1023,VC=1024,HC=1025,rl=1026,Lh=1027,WC=1028,n1=1029,XC=1030,r1=1031,s1=1033,Kv=33776,jv=33777,Zv=33778,Jv=33779,Gy=35840,Vy=35841,Hy=35842,Wy=35843,a1=36196,Xy=37492,Yy=37496,ky=37808,Ky=37809,jy=37810,Zy=37811,Jy=37812,$y=37813,Qy=37814,_y=37815,qy=37816,tx=37817,ex=37818,ix=37819,nx=37820,rx=37821,$v=36492,sx=36494,ax=36495,YC=36283,ox=36284,lx=36285,hx=36286,kC=2200,KC=2201,jC=2202,id=2300,nd=2301,Qv=2302,mh=2400,gh=2401,rd=2402,tg=2500,o1=2501,YI=0,kI=1,KI=2,l1=3e3,sl=3001,ZC=3200,JC=3201,fl=0,$C=1,rs="",Ln="srgb",Ca="srgb-linear",eg="display-p3",Ad="display-p3-linear",sd="linear",Di="srgb",ad="rec709",od="p3",jI=0,fh=7680,ZI=7681,JI=7682,$I=7683,QI=34055,_I=34056,qI=5386,t5=512,e5=513,i5=514,n5=515,r5=516,s5=517,a5=518,ux=519,QC=512,_C=513,qC=514,h1=515,tA=516,eA=517,iA=518,nA=519,ld=35044,o5=35048,l5=35040,h5=35045,u5=35049,f5=35041,c5=35046,d5=35050,p5=35042,v5="100",fx="300 es",fm=1035,Sa=2e3,hd=2001;class ho{addEventListener(e,i){this._listeners===void 0&&(this._listeners={});const x=this._listeners;x[e]===void 0&&(x[e]=[]),x[e].indexOf(i)===-1&&x[e].push(i)}hasEventListener(e,i){if(this._listeners===void 0)return!1;const x=this._listeners;return x[e]!==void 0&&x[e].indexOf(i)!==-1}removeEventListener(e,i){if(this._listeners===void 0)return;const T=this._listeners[e];if(T!==void 0){const E=T.indexOf(i);E!==-1&&T.splice(E,1)}}dispatchEvent(e){if(this._listeners===void 0)return;const x=this._listeners[e.type];if(x!==void 0){e.target=this;const T=x.slice(0);for(let E=0,a=T.length;E>8&255]+rr[g>>16&255]+rr[g>>24&255]+"-"+rr[e&255]+rr[e>>8&255]+"-"+rr[e>>16&15|64]+rr[e>>24&255]+"-"+rr[i&63|128]+rr[i>>8&255]+"-"+rr[i>>16&255]+rr[i>>24&255]+rr[x&255]+rr[x>>8&255]+rr[x>>16&255]+rr[x>>24&255]).toLowerCase()}function nn(g,e,i){return Math.max(e,Math.min(i,g))}function u1(g,e){return(g%e+e)%e}function m5(g,e,i,x,T){return x+(g-e)*(T-x)/(i-e)}function g5(g,e,i){return g!==e?(i-g)/(e-g):0}function Wc(g,e,i){return(1-i)*g+i*e}function y5(g,e,i,x){return Wc(g,e,1-Math.exp(-i*x))}function x5(g,e=1){return e-Math.abs(u1(g,e*2)-e)}function S5(g,e,i){return g<=e?0:g>=i?1:(g=(g-e)/(i-e),g*g*(3-2*g))}function T5(g,e,i){return g<=e?0:g>=i?1:(g=(g-e)/(i-e),g*g*g*(g*(g*6-15)+10))}function E5(g,e){return g+Math.floor(Math.random()*(e-g+1))}function M5(g,e){return g+Math.random()*(e-g)}function C5(g){return g*(.5-Math.random())}function A5(g){g!==void 0&&(ST=g);let e=ST+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function w5(g){return g*Th}function P5(g){return g*cf}function cx(g){return(g&g-1)===0&&g!==0}function R5(g){return Math.pow(2,Math.ceil(Math.log(g)/Math.LN2))}function cm(g){return Math.pow(2,Math.floor(Math.log(g)/Math.LN2))}function L5(g,e,i,x,T){const E=Math.cos,a=Math.sin,y=E(i/2),t=a(i/2),r=E((e+x)/2),p=a((e+x)/2),h=E((e-x)/2),o=a((e-x)/2),l=E((x-e)/2),n=a((x-e)/2);switch(T){case"XYX":g.set(y*p,t*h,t*o,y*r);break;case"YZY":g.set(t*o,y*p,t*h,y*r);break;case"ZXZ":g.set(t*h,t*o,y*p,y*r);break;case"XZX":g.set(y*p,t*n,t*l,y*r);break;case"YXY":g.set(t*l,y*p,t*n,y*r);break;case"ZYZ":g.set(t*n,t*l,y*p,y*r);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+T)}}function Mr(g,e){switch(e.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 $e(g,e){switch(e.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 _v={DEG2RAD:Th,RAD2DEG:cf,generateUUID:as,clamp:nn,euclideanModulo:u1,mapLinear:m5,inverseLerp:g5,lerp:Wc,damp:y5,pingpong:x5,smoothstep:S5,smootherstep:T5,randInt:E5,randFloat:M5,randFloatSpread:C5,seededRandom:A5,degToRad:w5,radToDeg:P5,isPowerOfTwo:cx,ceilPowerOfTwo:R5,floorPowerOfTwo:cm,setQuaternionFromProperEuler:L5,normalize:$e,denormalize:Mr};class jt{constructor(e=0,i=0){jt.prototype.isVector2=!0,this.x=e,this.y=i}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,i){return this.x=e,this.y=i,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,i){switch(e){case 0:this.x=i;break;case 1:this.y=i;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,i){return this.x=e.x+i.x,this.y=e.y+i.y,this}addScaledVector(e,i){return this.x+=e.x*i,this.y+=e.y*i,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,i){return this.x=e.x-i.x,this.y=e.y-i.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const i=this.x,x=this.y,T=e.elements;return this.x=T[0]*i+T[3]*x+T[6],this.y=T[1]*i+T[4]*x+T[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,i){return this.x=Math.max(e.x,Math.min(i.x,this.x)),this.y=Math.max(e.y,Math.min(i.y,this.y)),this}clampScalar(e,i){return this.x=Math.max(e,Math.min(i,this.x)),this.y=Math.max(e,Math.min(i,this.y)),this}clampLength(e,i){const x=this.length();return this.divideScalar(x||1).multiplyScalar(Math.max(e,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(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.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(e){const i=Math.sqrt(this.lengthSq()*e.lengthSq());if(i===0)return Math.PI/2;const x=this.dot(e)/i;return Math.acos(nn(x,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const i=this.x-e.x,x=this.y-e.y;return i*i+x*x}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,i){return this.x+=(e.x-this.x)*i,this.y+=(e.y-this.y)*i,this}lerpVectors(e,i,x){return this.x=e.x+(i.x-e.x)*x,this.y=e.y+(i.y-e.y)*x,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,i=0){return this.x=e[i],this.y=e[i+1],this}toArray(e=[],i=0){return e[i]=this.x,e[i+1]=this.y,e}fromBufferAttribute(e,i){return this.x=e.getX(i),this.y=e.getY(i),this}rotateAround(e,i){const x=Math.cos(i),T=Math.sin(i),E=this.x-e.x,a=this.y-e.y;return this.x=E*x-a*T+e.x,this.y=E*T+a*x+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class ni{constructor(e,i,x,T,E,a,y,t,r){ni.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,i,x,T,E,a,y,t,r)}set(e,i,x,T,E,a,y,t,r){const p=this.elements;return p[0]=e,p[1]=T,p[2]=y,p[3]=i,p[4]=E,p[5]=t,p[6]=x,p[7]=a,p[8]=r,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const i=this.elements,x=e.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(e,i,x){return e.setFromMatrix3Column(this,0),i.setFromMatrix3Column(this,1),x.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const i=e.elements;return this.set(i[0],i[4],i[8],i[1],i[5],i[9],i[2],i[6],i[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,i){const x=e.elements,T=i.elements,E=this.elements,a=x[0],y=x[3],t=x[6],r=x[1],p=x[4],h=x[7],o=x[2],l=x[5],n=x[8],u=T[0],f=T[3],s=T[6],c=T[1],d=T[4],v=T[7],m=T[2],S=T[5],M=T[8];return E[0]=a*u+y*c+t*m,E[3]=a*f+y*d+t*S,E[6]=a*s+y*v+t*M,E[1]=r*u+p*c+h*m,E[4]=r*f+p*d+h*S,E[7]=r*s+p*v+h*M,E[2]=o*u+l*c+n*m,E[5]=o*f+l*d+n*S,E[8]=o*s+l*v+n*M,this}multiplyScalar(e){const i=this.elements;return i[0]*=e,i[3]*=e,i[6]*=e,i[1]*=e,i[4]*=e,i[7]*=e,i[2]*=e,i[5]*=e,i[8]*=e,this}determinant(){const e=this.elements,i=e[0],x=e[1],T=e[2],E=e[3],a=e[4],y=e[5],t=e[6],r=e[7],p=e[8];return i*a*p-i*y*r-x*E*p+x*y*t+T*E*r-T*a*t}invert(){const e=this.elements,i=e[0],x=e[1],T=e[2],E=e[3],a=e[4],y=e[5],t=e[6],r=e[7],p=e[8],h=p*a-y*r,o=y*t-p*E,l=r*E-a*t,n=i*h+x*o+T*l;if(n===0)return this.set(0,0,0,0,0,0,0,0,0);const u=1/n;return e[0]=h*u,e[1]=(T*r-p*x)*u,e[2]=(y*x-T*a)*u,e[3]=o*u,e[4]=(p*i-T*t)*u,e[5]=(T*E-y*i)*u,e[6]=l*u,e[7]=(x*t-r*i)*u,e[8]=(a*i-x*E)*u,this}transpose(){let e;const i=this.elements;return e=i[1],i[1]=i[3],i[3]=e,e=i[2],i[2]=i[6],i[6]=e,e=i[5],i[5]=i[7],i[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const i=this.elements;return e[0]=i[0],e[1]=i[3],e[2]=i[6],e[3]=i[1],e[4]=i[4],e[5]=i[7],e[6]=i[2],e[7]=i[5],e[8]=i[8],this}setUvTransform(e,i,x,T,E,a,y){const t=Math.cos(E),r=Math.sin(E);return this.set(x*t,x*r,-x*(t*a+r*y)+a+e,-T*r,T*t,-T*(-r*a+t*y)+y+i,0,0,1),this}scale(e,i){return this.premultiply(T0.makeScale(e,i)),this}rotate(e){return this.premultiply(T0.makeRotation(-e)),this}translate(e,i){return this.premultiply(T0.makeTranslation(e,i)),this}makeTranslation(e,i){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,i,0,0,1),this}makeRotation(e){const i=Math.cos(e),x=Math.sin(e);return this.set(i,-x,0,x,i,0,0,0,1),this}makeScale(e,i){return this.set(e,0,0,0,i,0,0,0,1),this}equals(e){const i=this.elements,x=e.elements;for(let T=0;T<9;T++)if(i[T]!==x[T])return!1;return!0}fromArray(e,i=0){for(let x=0;x<9;x++)this.elements[x]=e[x+i];return this}toArray(e=[],i=0){const x=this.elements;return e[i]=x[0],e[i+1]=x[1],e[i+2]=x[2],e[i+3]=x[3],e[i+4]=x[4],e[i+5]=x[5],e[i+6]=x[6],e[i+7]=x[7],e[i+8]=x[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const T0=new ni;function rA(g){for(let e=g.length-1;e>=0;--e)if(g[e]>=65535)return!0;return!1}const b5={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function _u(g,e){return new b5[g](e)}function ud(g){return document.createElementNS("http://www.w3.org/1999/xhtml",g)}function sA(){const g=ud("canvas");return g.style.display="block",g}const TT={};function Eh(g){g in TT||(TT[g]=!0,console.warn(g))}const ET=new ni().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),MT=new ni().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),Kp={[Ca]:{transfer:sd,primaries:ad,toReference:g=>g,fromReference:g=>g},[Ln]:{transfer:Di,primaries:ad,toReference:g=>g.convertSRGBToLinear(),fromReference:g=>g.convertLinearToSRGB()},[Ad]:{transfer:sd,primaries:od,toReference:g=>g.applyMatrix3(MT),fromReference:g=>g.applyMatrix3(ET)},[eg]:{transfer:Di,primaries:od,toReference:g=>g.convertSRGBToLinear().applyMatrix3(MT),fromReference:g=>g.applyMatrix3(ET).convertLinearToSRGB()}},F5=new Set([Ca,Ad]),xi={enabled:!0,_workingColorSpace:Ca,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(g){if(!F5.has(g))throw new Error(`Unsupported working color space, "${g}".`);this._workingColorSpace=g},convert:function(g,e,i){if(this.enabled===!1||e===i||!e||!i)return g;const x=Kp[e].toReference,T=Kp[i].fromReference;return T(x(g))},fromWorkingColorSpace:function(g,e){return this.convert(g,this._workingColorSpace,e)},toWorkingColorSpace:function(g,e){return this.convert(g,e,this._workingColorSpace)},getPrimaries:function(g){return Kp[g].primaries},getTransfer:function(g){return g===rs?sd:Kp[g].transfer}};function af(g){return g<.04045?g*.0773993808:Math.pow(g*.9478672986+.0521327014,2.4)}function E0(g){return g<.0031308?g*12.92:1.055*Math.pow(g,.41666)-.055}let Cu;class f1{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let i;if(e instanceof HTMLCanvasElement)i=e;else{Cu===void 0&&(Cu=ud("canvas")),Cu.width=e.width,Cu.height=e.height;const x=Cu.getContext("2d");e instanceof ImageData?x.putImageData(e,0,0):x.drawImage(e,0,0,e.width,e.height),i=Cu}return i.width>2048||i.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),i.toDataURL("image/jpeg",.6)):i.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const i=ud("canvas");i.width=e.width,i.height=e.height;const x=i.getContext("2d");x.drawImage(e,0,0,e.width,e.height);const T=x.getImageData(0,0,e.width,e.height),E=T.data;for(let a=0;a0&&(x.userData=this.userData),i||(e.textures[this.uuid]=x),x}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==_m)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case td:e.x=e.x-Math.floor(e.x);break;case lr:e.x=e.x<0?0:1;break;case ed:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case td:e.y=e.y-Math.floor(e.y);break;case lr:e.y=e.y<0?0:1;break;case ed:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}get encoding(){return Eh("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===Ln?sl:l1}set encoding(e){Eh("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=e===sl?Ln:rs}}Zi.DEFAULT_IMAGE=null;Zi.DEFAULT_MAPPING=_m;Zi.DEFAULT_ANISOTROPY=1;class Si{constructor(e=0,i=0,x=0,T=1){Si.prototype.isVector4=!0,this.x=e,this.y=i,this.z=x,this.w=T}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,i,x,T){return this.x=e,this.y=i,this.z=x,this.w=T,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,i){switch(e){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: "+e)}return this}getComponent(e){switch(e){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: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,i){return this.x=e.x+i.x,this.y=e.y+i.y,this.z=e.z+i.z,this.w=e.w+i.w,this}addScaledVector(e,i){return this.x+=e.x*i,this.y+=e.y*i,this.z+=e.z*i,this.w+=e.w*i,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,i){return this.x=e.x-i.x,this.y=e.y-i.y,this.z=e.z-i.z,this.w=e.w-i.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const i=this.x,x=this.y,T=this.z,E=this.w,a=e.elements;return this.x=a[0]*i+a[4]*x+a[8]*T+a[12]*E,this.y=a[1]*i+a[5]*x+a[9]*T+a[13]*E,this.z=a[2]*i+a[6]*x+a[10]*T+a[14]*E,this.w=a[3]*i+a[7]*x+a[11]*T+a[15]*E,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const i=Math.sqrt(1-e.w*e.w);return i<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/i,this.y=e.y/i,this.z=e.z/i),this}setAxisAngleFromRotationMatrix(e){let i,x,T,E;const t=e.elements,r=t[0],p=t[4],h=t[8],o=t[1],l=t[5],n=t[9],u=t[2],f=t[6],s=t[10];if(Math.abs(p-o)<.01&&Math.abs(h-u)<.01&&Math.abs(n-f)<.01){if(Math.abs(p+o)<.1&&Math.abs(h+u)<.1&&Math.abs(n+f)<.1&&Math.abs(r+l+s-3)<.1)return this.set(1,0,0,0),this;i=Math.PI;const d=(r+1)/2,v=(l+1)/2,m=(s+1)/2,S=(p+o)/4,M=(h+u)/4,A=(n+f)/4;return d>v&&d>m?d<.01?(x=0,T=.707106781,E=.707106781):(x=Math.sqrt(d),T=S/x,E=M/x):v>m?v<.01?(x=.707106781,T=0,E=.707106781):(T=Math.sqrt(v),x=S/T,E=A/T):m<.01?(x=.707106781,T=.707106781,E=0):(E=Math.sqrt(m),x=M/E,T=A/E),this.set(x,T,E,i),this}let c=Math.sqrt((f-n)*(f-n)+(h-u)*(h-u)+(o-p)*(o-p));return Math.abs(c)<.001&&(c=1),this.x=(f-n)/c,this.y=(h-u)/c,this.z=(o-p)/c,this.w=Math.acos((r+l+s-1)/2),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,i){return this.x=Math.max(e.x,Math.min(i.x,this.x)),this.y=Math.max(e.y,Math.min(i.y,this.y)),this.z=Math.max(e.z,Math.min(i.z,this.z)),this.w=Math.max(e.w,Math.min(i.w,this.w)),this}clampScalar(e,i){return this.x=Math.max(e,Math.min(i,this.x)),this.y=Math.max(e,Math.min(i,this.y)),this.z=Math.max(e,Math.min(i,this.z)),this.w=Math.max(e,Math.min(i,this.w)),this}clampLength(e,i){const x=this.length();return this.divideScalar(x||1).multiplyScalar(Math.max(e,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(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.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(e){return this.normalize().multiplyScalar(e)}lerp(e,i){return this.x+=(e.x-this.x)*i,this.y+=(e.y-this.y)*i,this.z+=(e.z-this.z)*i,this.w+=(e.w-this.w)*i,this}lerpVectors(e,i,x){return this.x=e.x+(i.x-e.x)*x,this.y=e.y+(i.y-e.y)*x,this.z=e.z+(i.z-e.z)*x,this.w=e.w+(i.w-e.w)*x,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,i=0){return this.x=e[i],this.y=e[i+1],this.z=e[i+2],this.w=e[i+3],this}toArray(e=[],i=0){return e[i]=this.x,e[i+1]=this.y,e[i+2]=this.z,e[i+3]=this.w,e}fromBufferAttribute(e,i){return this.x=e.getX(i),this.y=e.getY(i),this.z=e.getZ(i),this.w=e.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 aA extends ho{constructor(e=1,i=1,x={}){super(),this.isRenderTarget=!0,this.width=e,this.height=i,this.depth=1,this.scissor=new Si(0,0,e,i),this.scissorTest=!1,this.viewport=new Si(0,0,e,i);const T={width:e,height:i,depth:1};x.encoding!==void 0&&(Eh("THREE.WebGLRenderTarget: option.encoding has been replaced by option.colorSpace."),x.colorSpace=x.encoding===sl?Ln:rs),x=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:Ki,depthBuffer:!0,stencilBuffer:!1,depthTexture:null,samples:0},x),this.texture=new Zi(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(e,i,x=1){(this.width!==e||this.height!==i||this.depth!==x)&&(this.width=e,this.height=i,this.depth=x,this.texture.image.width=e,this.texture.image.height=i,this.texture.image.depth=x,this.dispose()),this.viewport.set(0,0,e,i),this.scissor.set(0,0,e,i)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.texture.isRenderTargetTexture=!0;const i=Object.assign({},e.texture.image);return this.texture.source=new yh(i),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class $s extends aA{constructor(e=1,i=1,x={}){super(e,i,x),this.isWebGLRenderTarget=!0}}class ig extends Zi{constructor(e=null,i=1,x=1,T=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:i,height:x,depth:T},this.magFilter=cn,this.minFilter=cn,this.wrapR=lr,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class I5 extends $s{constructor(e=1,i=1,x=1,T={}){super(e,i,T),this.isWebGLArrayRenderTarget=!0,this.depth=x,this.texture=new ig(null,e,i,x),this.texture.isRenderTargetTexture=!0}}class c1 extends Zi{constructor(e=null,i=1,x=1,T=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:i,height:x,depth:T},this.magFilter=cn,this.minFilter=cn,this.wrapR=lr,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class N5 extends $s{constructor(e=1,i=1,x=1,T={}){super(e,i,T),this.isWebGL3DRenderTarget=!0,this.depth=x,this.texture=new c1(null,e,i,x),this.texture.isRenderTargetTexture=!0}}class B5 extends $s{constructor(e=1,i=1,x=1,T={}){super(e,i,T),this.isWebGLMultipleRenderTargets=!0;const E=this.texture;this.texture=[];for(let a=0;a=0?1:-1,d=1-s*s;if(d>Number.EPSILON){const m=Math.sqrt(d),S=Math.atan2(m,s*c);f=Math.sin(f*S)/m,y=Math.sin(y*S)/m}const v=y*c;if(t=t*f+o*v,r=r*f+l*v,p=p*f+n*v,h=h*f+u*v,f===1-y){const m=1/Math.sqrt(t*t+r*r+p*p+h*h);t*=m,r*=m,p*=m,h*=m}}e[i]=t,e[i+1]=r,e[i+2]=p,e[i+3]=h}static multiplyQuaternionsFlat(e,i,x,T,E,a){const y=x[T],t=x[T+1],r=x[T+2],p=x[T+3],h=E[a],o=E[a+1],l=E[a+2],n=E[a+3];return e[i]=y*n+p*h+t*l-r*o,e[i+1]=t*n+p*o+r*h-y*l,e[i+2]=r*n+p*l+y*o-t*h,e[i+3]=p*n-y*h-t*o-r*l,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,i,x,T){return this._x=e,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(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,i=!0){const x=e._x,T=e._y,E=e._z,a=e._order,y=Math.cos,t=Math.sin,r=y(x/2),p=y(T/2),h=y(E/2),o=t(x/2),l=t(T/2),n=t(E/2);switch(a){case"XYZ":this._x=o*p*h+r*l*n,this._y=r*l*h-o*p*n,this._z=r*p*n+o*l*h,this._w=r*p*h-o*l*n;break;case"YXZ":this._x=o*p*h+r*l*n,this._y=r*l*h-o*p*n,this._z=r*p*n-o*l*h,this._w=r*p*h+o*l*n;break;case"ZXY":this._x=o*p*h-r*l*n,this._y=r*l*h+o*p*n,this._z=r*p*n+o*l*h,this._w=r*p*h-o*l*n;break;case"ZYX":this._x=o*p*h-r*l*n,this._y=r*l*h+o*p*n,this._z=r*p*n-o*l*h,this._w=r*p*h+o*l*n;break;case"YZX":this._x=o*p*h+r*l*n,this._y=r*l*h+o*p*n,this._z=r*p*n-o*l*h,this._w=r*p*h-o*l*n;break;case"XZY":this._x=o*p*h-r*l*n,this._y=r*l*h-o*p*n,this._z=r*p*n+o*l*h,this._w=r*p*h+o*l*n;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+a)}return i===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,i){const x=i/2,T=Math.sin(x);return this._x=e.x*T,this._y=e.y*T,this._z=e.z*T,this._w=Math.cos(x),this._onChangeCallback(),this}setFromRotationMatrix(e){const i=e.elements,x=i[0],T=i[4],E=i[8],a=i[1],y=i[5],t=i[9],r=i[2],p=i[6],h=i[10],o=x+y+h;if(o>0){const l=.5/Math.sqrt(o+1);this._w=.25/l,this._x=(p-t)*l,this._y=(E-r)*l,this._z=(a-T)*l}else if(x>y&&x>h){const l=2*Math.sqrt(1+x-y-h);this._w=(p-t)/l,this._x=.25*l,this._y=(T+a)/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+a)/l,this._y=.25*l,this._z=(t+p)/l}else{const l=2*Math.sqrt(1+h-x-y);this._w=(a-T)/l,this._x=(E+r)/l,this._y=(t+p)/l,this._z=.25*l}return this._onChangeCallback(),this}setFromUnitVectors(e,i){let x=e.dot(i)+1;return xMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=x):(this._x=0,this._y=-e.z,this._z=e.y,this._w=x)):(this._x=e.y*i.z-e.z*i.y,this._y=e.z*i.x-e.x*i.z,this._z=e.x*i.y-e.y*i.x,this._w=x),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(nn(this.dot(e),-1,1)))}rotateTowards(e,i){const x=this.angleTo(e);if(x===0)return this;const T=Math.min(1,i/x);return this.slerp(e,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(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._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 e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,i){const x=e._x,T=e._y,E=e._z,a=e._w,y=i._x,t=i._y,r=i._z,p=i._w;return this._x=x*p+a*y+T*r-E*t,this._y=T*p+a*t+E*y-x*r,this._z=E*p+a*r+x*t-T*y,this._w=a*p-x*y-T*t-E*r,this._onChangeCallback(),this}slerp(e,i){if(i===0)return this;if(i===1)return this.copy(e);const x=this._x,T=this._y,E=this._z,a=this._w;let y=a*e._w+x*e._x+T*e._y+E*e._z;if(y<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,y=-y):this.copy(e),y>=1)return this._w=a,this._x=x,this._y=T,this._z=E,this;const t=1-y*y;if(t<=Number.EPSILON){const l=1-i;return this._w=l*a+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(t),p=Math.atan2(r,y),h=Math.sin((1-i)*p)/r,o=Math.sin(i*p)/r;return this._w=a*h+this._w*o,this._x=x*h+this._x*o,this._y=T*h+this._y*o,this._z=E*h+this._z*o,this._onChangeCallback(),this}slerpQuaternions(e,i,x){return this.copy(e).slerp(i,x)}random(){const e=Math.random(),i=Math.sqrt(1-e),x=Math.sqrt(e),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(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,i=0){return this._x=e[i],this._y=e[i+1],this._z=e[i+2],this._w=e[i+3],this._onChangeCallback(),this}toArray(e=[],i=0){return e[i]=this._x,e[i+1]=this._y,e[i+2]=this._z,e[i+3]=this._w,e}fromBufferAttribute(e,i){return this._x=e.getX(i),this._y=e.getY(i),this._z=e.getZ(i),this._w=e.getW(i),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class pt{constructor(e=0,i=0,x=0){pt.prototype.isVector3=!0,this.x=e,this.y=i,this.z=x}set(e,i,x){return x===void 0&&(x=this.z),this.x=e,this.y=i,this.z=x,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,i){switch(e){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: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,i){return this.x=e.x+i.x,this.y=e.y+i.y,this.z=e.z+i.z,this}addScaledVector(e,i){return this.x+=e.x*i,this.y+=e.y*i,this.z+=e.z*i,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,i){return this.x=e.x-i.x,this.y=e.y-i.y,this.z=e.z-i.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,i){return this.x=e.x*i.x,this.y=e.y*i.y,this.z=e.z*i.z,this}applyEuler(e){return this.applyQuaternion(CT.setFromEuler(e))}applyAxisAngle(e,i){return this.applyQuaternion(CT.setFromAxisAngle(e,i))}applyMatrix3(e){const i=this.x,x=this.y,T=this.z,E=e.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(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const i=this.x,x=this.y,T=this.z,E=e.elements,a=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])*a,this.y=(E[1]*i+E[5]*x+E[9]*T+E[13])*a,this.z=(E[2]*i+E[6]*x+E[10]*T+E[14])*a,this}applyQuaternion(e){const i=this.x,x=this.y,T=this.z,E=e.x,a=e.y,y=e.z,t=e.w,r=2*(a*T-y*x),p=2*(y*i-E*T),h=2*(E*x-a*i);return this.x=i+t*r+a*h-y*p,this.y=x+t*p+y*r-E*h,this.z=T+t*h+E*p-a*r,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const i=this.x,x=this.y,T=this.z,E=e.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(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,i){return this.x=Math.max(e.x,Math.min(i.x,this.x)),this.y=Math.max(e.y,Math.min(i.y,this.y)),this.z=Math.max(e.z,Math.min(i.z,this.z)),this}clampScalar(e,i){return this.x=Math.max(e,Math.min(i,this.x)),this.y=Math.max(e,Math.min(i,this.y)),this.z=Math.max(e,Math.min(i,this.z)),this}clampLength(e,i){const x=this.length();return this.divideScalar(x||1).multiplyScalar(Math.max(e,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(e){return this.x*e.x+this.y*e.y+this.z*e.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(e){return this.normalize().multiplyScalar(e)}lerp(e,i){return this.x+=(e.x-this.x)*i,this.y+=(e.y-this.y)*i,this.z+=(e.z-this.z)*i,this}lerpVectors(e,i,x){return this.x=e.x+(i.x-e.x)*x,this.y=e.y+(i.y-e.y)*x,this.z=e.z+(i.z-e.z)*x,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,i){const x=e.x,T=e.y,E=e.z,a=i.x,y=i.y,t=i.z;return this.x=T*t-E*y,this.y=E*a-x*t,this.z=x*y-T*a,this}projectOnVector(e){const i=e.lengthSq();if(i===0)return this.set(0,0,0);const x=e.dot(this)/i;return this.copy(e).multiplyScalar(x)}projectOnPlane(e){return C0.copy(this).projectOnVector(e),this.sub(C0)}reflect(e){return this.sub(C0.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const i=Math.sqrt(this.lengthSq()*e.lengthSq());if(i===0)return Math.PI/2;const x=this.dot(e)/i;return Math.acos(nn(x,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const i=this.x-e.x,x=this.y-e.y,T=this.z-e.z;return i*i+x*x+T*T}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,i,x){const T=Math.sin(i)*e;return this.x=T*Math.sin(x),this.y=Math.cos(i)*e,this.z=T*Math.cos(x),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,i,x){return this.x=e*Math.sin(i),this.y=x,this.z=e*Math.cos(i),this}setFromMatrixPosition(e){const i=e.elements;return this.x=i[12],this.y=i[13],this.z=i[14],this}setFromMatrixScale(e){const i=this.setFromMatrixColumn(e,0).length(),x=this.setFromMatrixColumn(e,1).length(),T=this.setFromMatrixColumn(e,2).length();return this.x=i,this.y=x,this.z=T,this}setFromMatrixColumn(e,i){return this.fromArray(e.elements,i*4)}setFromMatrix3Column(e,i){return this.fromArray(e.elements,i*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,i=0){return this.x=e[i],this.y=e[i+1],this.z=e[i+2],this}toArray(e=[],i=0){return e[i]=this.x,e[i+1]=this.y,e[i+2]=this.z,e}fromBufferAttribute(e,i){return this.x=e.getX(i),this.y=e.getY(i),this.z=e.getZ(i),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=(Math.random()-.5)*2,i=Math.random()*Math.PI*2,x=Math.sqrt(1-e**2);return this.x=x*Math.cos(i),this.y=x*Math.sin(i),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const C0=new pt,CT=new Ur;class Ar{constructor(e=new pt(1/0,1/0,1/0),i=new pt(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=i}set(e,i){return this.min.copy(e),this.max.copy(i),this}setFromArray(e){this.makeEmpty();for(let i=0,x=e.length;ithis.max.x||e.ythis.max.y||e.zthis.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,i){return i.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)}intersectsSphere(e){return this.clampPoint(e.center,Ws),Ws.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let i,x;return e.normal.x>0?(i=e.normal.x*this.min.x,x=e.normal.x*this.max.x):(i=e.normal.x*this.max.x,x=e.normal.x*this.min.x),e.normal.y>0?(i+=e.normal.y*this.min.y,x+=e.normal.y*this.max.y):(i+=e.normal.y*this.max.y,x+=e.normal.y*this.min.y),e.normal.z>0?(i+=e.normal.z*this.min.z,x+=e.normal.z*this.max.z):(i+=e.normal.z*this.max.z,x+=e.normal.z*this.min.z),i<=-e.constant&&x>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Sc),Zp.subVectors(this.max,Sc),Au.subVectors(e.a,Sc),wu.subVectors(e.b,Sc),Pu.subVectors(e.c,Sc),ko.subVectors(wu,Au),Ko.subVectors(Pu,wu),_l.subVectors(Au,Pu);let i=[0,-ko.z,ko.y,0,-Ko.z,Ko.y,0,-_l.z,_l.y,ko.z,0,-ko.x,Ko.z,0,-Ko.x,_l.z,0,-_l.x,-ko.y,ko.x,0,-Ko.y,Ko.x,0,-_l.y,_l.x,0];return!A0(i,Au,wu,Pu,Zp)||(i=[1,0,0,0,1,0,0,0,1],!A0(i,Au,wu,Pu,Zp))?!1:(Jp.crossVectors(ko,Ko),i=[Jp.x,Jp.y,Jp.z],A0(i,Au,wu,Pu,Zp))}clampPoint(e,i){return i.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Ws).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Ws).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(Ka[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Ka[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Ka[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Ka[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Ka[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Ka[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Ka[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Ka[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Ka),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const Ka=[new pt,new pt,new pt,new pt,new pt,new pt,new pt,new pt],Ws=new pt,jp=new Ar,Au=new pt,wu=new pt,Pu=new pt,ko=new pt,Ko=new pt,_l=new pt,Sc=new pt,Zp=new pt,Jp=new pt,ql=new pt;function A0(g,e,i,x,T){for(let E=0,a=g.length-3;E<=a;E+=3){ql.fromArray(g,E);const y=T.x*Math.abs(ql.x)+T.y*Math.abs(ql.y)+T.z*Math.abs(ql.z),t=e.dot(ql),r=i.dot(ql),p=x.dot(ql);if(Math.max(-Math.max(t,r,p),Math.min(t,r,p))>y)return!1}return!0}const U5=new Ar,Tc=new pt,w0=new pt;class hr{constructor(e=new pt,i=-1){this.isSphere=!0,this.center=e,this.radius=i}set(e,i){return this.center.copy(e),this.radius=i,this}setFromPoints(e,i){const x=this.center;i!==void 0?x.copy(i):U5.setFromPoints(e).getCenter(x);let T=0;for(let E=0,a=e.length;Ethis.radius*this.radius&&(i.sub(this.center).normalize(),i.multiplyScalar(this.radius).add(this.center)),i}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;Tc.subVectors(e,this.center);const i=Tc.lengthSq();if(i>this.radius*this.radius){const x=Math.sqrt(i),T=(x-this.radius)*.5;this.center.addScaledVector(Tc,T/x),this.radius+=T}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(w0.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Tc.copy(e.center).add(w0)),this.expandByPoint(Tc.copy(e.center).sub(w0))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const ja=new pt,P0=new pt,$p=new pt,jo=new pt,R0=new pt,Qp=new pt,L0=new pt;class xf{constructor(e=new pt,i=new pt(0,0,-1)){this.origin=e,this.direction=i}set(e,i){return this.origin.copy(e),this.direction.copy(i),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,i){return i.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,ja)),this}closestPointToPoint(e,i){i.subVectors(e,this.origin);const x=i.dot(this.direction);return x<0?i.copy(this.origin):i.copy(this.origin).addScaledVector(this.direction,x)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const i=ja.subVectors(e,this.origin).dot(this.direction);return i<0?this.origin.distanceToSquared(e):(ja.copy(this.origin).addScaledVector(this.direction,i),ja.distanceToSquared(e))}distanceSqToSegment(e,i,x,T){P0.copy(e).add(i).multiplyScalar(.5),$p.copy(i).sub(e).normalize(),jo.copy(this.origin).sub(P0);const E=e.distanceTo(i)*.5,a=-this.direction.dot($p),y=jo.dot(this.direction),t=-jo.dot($p),r=jo.lengthSq(),p=Math.abs(1-a*a);let h,o,l,n;if(p>0)if(h=a*t-y,o=a*y-t,n=E*p,h>=0)if(o>=-n)if(o<=n){const u=1/p;h*=u,o*=u,l=h*(h+a*o+2*y)+o*(a*h+o+2*t)+r}else o=E,h=Math.max(0,-(a*o+y)),l=-h*h+o*(o+2*t)+r;else o=-E,h=Math.max(0,-(a*o+y)),l=-h*h+o*(o+2*t)+r;else o<=-n?(h=Math.max(0,-(-a*E+y)),o=h>0?-E:Math.min(Math.max(-E,-t),E),l=-h*h+o*(o+2*t)+r):o<=n?(h=0,o=Math.min(Math.max(-E,-t),E),l=o*(o+2*t)+r):(h=Math.max(0,-(a*E+y)),o=h>0?E:Math.min(Math.max(-E,-t),E),l=-h*h+o*(o+2*t)+r);else o=a>0?-E:E,h=Math.max(0,-(a*o+y)),l=-h*h+o*(o+2*t)+r;return x&&x.copy(this.origin).addScaledVector(this.direction,h),T&&T.copy(P0).addScaledVector($p,o),l}intersectSphere(e,i){ja.subVectors(e.center,this.origin);const x=ja.dot(this.direction),T=ja.dot(ja)-x*x,E=e.radius*e.radius;if(T>E)return null;const a=Math.sqrt(E-T),y=x-a,t=x+a;return t<0?null:y<0?this.at(t,i):this.at(y,i)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const i=e.normal.dot(this.direction);if(i===0)return e.distanceToPoint(this.origin)===0?0:null;const x=-(this.origin.dot(e.normal)+e.constant)/i;return x>=0?x:null}intersectPlane(e,i){const x=this.distanceToPlane(e);return x===null?null:this.at(x,i)}intersectsPlane(e){const i=e.distanceToPoint(this.origin);return i===0||e.normal.dot(this.direction)*i<0}intersectBox(e,i){let x,T,E,a,y,t;const r=1/this.direction.x,p=1/this.direction.y,h=1/this.direction.z,o=this.origin;return r>=0?(x=(e.min.x-o.x)*r,T=(e.max.x-o.x)*r):(x=(e.max.x-o.x)*r,T=(e.min.x-o.x)*r),p>=0?(E=(e.min.y-o.y)*p,a=(e.max.y-o.y)*p):(E=(e.max.y-o.y)*p,a=(e.min.y-o.y)*p),x>a||E>T||((E>x||isNaN(x))&&(x=E),(a=0?(y=(e.min.z-o.z)*h,t=(e.max.z-o.z)*h):(y=(e.max.z-o.z)*h,t=(e.min.z-o.z)*h),x>t||y>T)||((y>x||x!==x)&&(x=y),(t=0?x:T,i)}intersectsBox(e){return this.intersectBox(e,ja)!==null}intersectTriangle(e,i,x,T,E){R0.subVectors(i,e),Qp.subVectors(x,e),L0.crossVectors(R0,Qp);let a=this.direction.dot(L0),y;if(a>0){if(T)return null;y=1}else if(a<0)y=-1,a=-a;else return null;jo.subVectors(this.origin,e);const t=y*this.direction.dot(Qp.crossVectors(jo,Qp));if(t<0)return null;const r=y*this.direction.dot(R0.cross(jo));if(r<0||t+r>a)return null;const p=-y*jo.dot(L0);return p<0?null:this.at(p/a,E)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class Ve{constructor(e,i,x,T,E,a,y,t,r,p,h,o,l,n,u,f){Ve.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,i,x,T,E,a,y,t,r,p,h,o,l,n,u,f)}set(e,i,x,T,E,a,y,t,r,p,h,o,l,n,u,f){const s=this.elements;return s[0]=e,s[4]=i,s[8]=x,s[12]=T,s[1]=E,s[5]=a,s[9]=y,s[13]=t,s[2]=r,s[6]=p,s[10]=h,s[14]=o,s[3]=l,s[7]=n,s[11]=u,s[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 Ve().fromArray(this.elements)}copy(e){const i=this.elements,x=e.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(e){const i=this.elements,x=e.elements;return i[12]=x[12],i[13]=x[13],i[14]=x[14],this}setFromMatrix3(e){const i=e.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(e,i,x){return e.setFromMatrixColumn(this,0),i.setFromMatrixColumn(this,1),x.setFromMatrixColumn(this,2),this}makeBasis(e,i,x){return this.set(e.x,i.x,x.x,0,e.y,i.y,x.y,0,e.z,i.z,x.z,0,0,0,0,1),this}extractRotation(e){const i=this.elements,x=e.elements,T=1/Ru.setFromMatrixColumn(e,0).length(),E=1/Ru.setFromMatrixColumn(e,1).length(),a=1/Ru.setFromMatrixColumn(e,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]*a,i[9]=x[9]*a,i[10]=x[10]*a,i[11]=0,i[12]=0,i[13]=0,i[14]=0,i[15]=1,this}makeRotationFromEuler(e){const i=this.elements,x=e.x,T=e.y,E=e.z,a=Math.cos(x),y=Math.sin(x),t=Math.cos(T),r=Math.sin(T),p=Math.cos(E),h=Math.sin(E);if(e.order==="XYZ"){const o=a*p,l=a*h,n=y*p,u=y*h;i[0]=t*p,i[4]=-t*h,i[8]=r,i[1]=l+n*r,i[5]=o-u*r,i[9]=-y*t,i[2]=u-o*r,i[6]=n+l*r,i[10]=a*t}else if(e.order==="YXZ"){const o=t*p,l=t*h,n=r*p,u=r*h;i[0]=o+u*y,i[4]=n*y-l,i[8]=a*r,i[1]=a*h,i[5]=a*p,i[9]=-y,i[2]=l*y-n,i[6]=u+o*y,i[10]=a*t}else if(e.order==="ZXY"){const o=t*p,l=t*h,n=r*p,u=r*h;i[0]=o-u*y,i[4]=-a*h,i[8]=n+l*y,i[1]=l+n*y,i[5]=a*p,i[9]=u-o*y,i[2]=-a*r,i[6]=y,i[10]=a*t}else if(e.order==="ZYX"){const o=a*p,l=a*h,n=y*p,u=y*h;i[0]=t*p,i[4]=n*r-l,i[8]=o*r+u,i[1]=t*h,i[5]=u*r+o,i[9]=l*r-n,i[2]=-r,i[6]=y*t,i[10]=a*t}else if(e.order==="YZX"){const o=a*t,l=a*r,n=y*t,u=y*r;i[0]=t*p,i[4]=u-o*h,i[8]=n*h+l,i[1]=h,i[5]=a*p,i[9]=-y*p,i[2]=-r*p,i[6]=l*h+n,i[10]=o-u*h}else if(e.order==="XZY"){const o=a*t,l=a*r,n=y*t,u=y*r;i[0]=t*p,i[4]=-h,i[8]=r*p,i[1]=o*h+u,i[5]=a*p,i[9]=l*h-n,i[2]=n*h-l,i[6]=y*p,i[10]=u*h+o}return i[3]=0,i[7]=0,i[11]=0,i[12]=0,i[13]=0,i[14]=0,i[15]=1,this}makeRotationFromQuaternion(e){return this.compose(z5,e,G5)}lookAt(e,i,x){const T=this.elements;return is.subVectors(e,i),is.lengthSq()===0&&(is.z=1),is.normalize(),Zo.crossVectors(x,is),Zo.lengthSq()===0&&(Math.abs(x.z)===1?is.x+=1e-4:is.z+=1e-4,is.normalize(),Zo.crossVectors(x,is)),Zo.normalize(),_p.crossVectors(is,Zo),T[0]=Zo.x,T[4]=_p.x,T[8]=is.x,T[1]=Zo.y,T[5]=_p.y,T[9]=is.y,T[2]=Zo.z,T[6]=_p.z,T[10]=is.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,i){const x=e.elements,T=i.elements,E=this.elements,a=x[0],y=x[4],t=x[8],r=x[12],p=x[1],h=x[5],o=x[9],l=x[13],n=x[2],u=x[6],f=x[10],s=x[14],c=x[3],d=x[7],v=x[11],m=x[15],S=T[0],M=T[4],A=T[8],C=T[12],w=T[1],P=T[5],L=T[9],O=T[13],I=T[2],D=T[6],B=T[10],G=T[14],z=T[3],W=T[7],k=T[11],J=T[15];return E[0]=a*S+y*w+t*I+r*z,E[4]=a*M+y*P+t*D+r*W,E[8]=a*A+y*L+t*B+r*k,E[12]=a*C+y*O+t*G+r*J,E[1]=p*S+h*w+o*I+l*z,E[5]=p*M+h*P+o*D+l*W,E[9]=p*A+h*L+o*B+l*k,E[13]=p*C+h*O+o*G+l*J,E[2]=n*S+u*w+f*I+s*z,E[6]=n*M+u*P+f*D+s*W,E[10]=n*A+u*L+f*B+s*k,E[14]=n*C+u*O+f*G+s*J,E[3]=c*S+d*w+v*I+m*z,E[7]=c*M+d*P+v*D+m*W,E[11]=c*A+d*L+v*B+m*k,E[15]=c*C+d*O+v*G+m*J,this}multiplyScalar(e){const i=this.elements;return i[0]*=e,i[4]*=e,i[8]*=e,i[12]*=e,i[1]*=e,i[5]*=e,i[9]*=e,i[13]*=e,i[2]*=e,i[6]*=e,i[10]*=e,i[14]*=e,i[3]*=e,i[7]*=e,i[11]*=e,i[15]*=e,this}determinant(){const e=this.elements,i=e[0],x=e[4],T=e[8],E=e[12],a=e[1],y=e[5],t=e[9],r=e[13],p=e[2],h=e[6],o=e[10],l=e[14],n=e[3],u=e[7],f=e[11],s=e[15];return n*(+E*t*h-T*r*h-E*y*o+x*r*o+T*y*l-x*t*l)+u*(+i*t*l-i*r*o+E*a*o-T*a*l+T*r*p-E*t*p)+f*(+i*r*h-i*y*l-E*a*h+x*a*l+E*y*p-x*r*p)+s*(-T*y*p-i*t*h+i*y*o+T*a*h-x*a*o+x*t*p)}transpose(){const e=this.elements;let i;return i=e[1],e[1]=e[4],e[4]=i,i=e[2],e[2]=e[8],e[8]=i,i=e[6],e[6]=e[9],e[9]=i,i=e[3],e[3]=e[12],e[12]=i,i=e[7],e[7]=e[13],e[13]=i,i=e[11],e[11]=e[14],e[14]=i,this}setPosition(e,i,x){const T=this.elements;return e.isVector3?(T[12]=e.x,T[13]=e.y,T[14]=e.z):(T[12]=e,T[13]=i,T[14]=x),this}invert(){const e=this.elements,i=e[0],x=e[1],T=e[2],E=e[3],a=e[4],y=e[5],t=e[6],r=e[7],p=e[8],h=e[9],o=e[10],l=e[11],n=e[12],u=e[13],f=e[14],s=e[15],c=h*f*r-u*o*r+u*t*l-y*f*l-h*t*s+y*o*s,d=n*o*r-p*f*r-n*t*l+a*f*l+p*t*s-a*o*s,v=p*u*r-n*h*r+n*y*l-a*u*l-p*y*s+a*h*s,m=n*h*t-p*u*t-n*y*o+a*u*o+p*y*f-a*h*f,S=i*c+x*d+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 e[0]=c*M,e[1]=(u*o*E-h*f*E-u*T*l+x*f*l+h*T*s-x*o*s)*M,e[2]=(y*f*E-u*t*E+u*T*r-x*f*r-y*T*s+x*t*s)*M,e[3]=(h*t*E-y*o*E-h*T*r+x*o*r+y*T*l-x*t*l)*M,e[4]=d*M,e[5]=(p*f*E-n*o*E+n*T*l-i*f*l-p*T*s+i*o*s)*M,e[6]=(n*t*E-a*f*E-n*T*r+i*f*r+a*T*s-i*t*s)*M,e[7]=(a*o*E-p*t*E+p*T*r-i*o*r-a*T*l+i*t*l)*M,e[8]=v*M,e[9]=(n*h*E-p*u*E-n*x*l+i*u*l+p*x*s-i*h*s)*M,e[10]=(a*u*E-n*y*E+n*x*r-i*u*r-a*x*s+i*y*s)*M,e[11]=(p*y*E-a*h*E-p*x*r+i*h*r+a*x*l-i*y*l)*M,e[12]=m*M,e[13]=(p*u*T-n*h*T+n*x*o-i*u*o-p*x*f+i*h*f)*M,e[14]=(n*y*T-a*u*T-n*x*t+i*u*t+a*x*f-i*y*f)*M,e[15]=(a*h*T-p*y*T+p*x*t-i*h*t-a*x*o+i*y*o)*M,this}scale(e){const i=this.elements,x=e.x,T=e.y,E=e.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 e=this.elements,i=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],x=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],T=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(i,x,T))}makeTranslation(e,i,x){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,i,0,0,1,x,0,0,0,1),this}makeRotationX(e){const i=Math.cos(e),x=Math.sin(e);return this.set(1,0,0,0,0,i,-x,0,0,x,i,0,0,0,0,1),this}makeRotationY(e){const i=Math.cos(e),x=Math.sin(e);return this.set(i,0,x,0,0,1,0,0,-x,0,i,0,0,0,0,1),this}makeRotationZ(e){const i=Math.cos(e),x=Math.sin(e);return this.set(i,-x,0,0,x,i,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,i){const x=Math.cos(i),T=Math.sin(i),E=1-x,a=e.x,y=e.y,t=e.z,r=E*a,p=E*y;return this.set(r*a+x,r*y-T*t,r*t+T*y,0,r*y+T*t,p*y+x,p*t-T*a,0,r*t-T*y,p*t+T*a,E*t*t+x,0,0,0,0,1),this}makeScale(e,i,x){return this.set(e,0,0,0,0,i,0,0,0,0,x,0,0,0,0,1),this}makeShear(e,i,x,T,E,a){return this.set(1,x,E,0,e,1,a,0,i,T,1,0,0,0,0,1),this}compose(e,i,x){const T=this.elements,E=i._x,a=i._y,y=i._z,t=i._w,r=E+E,p=a+a,h=y+y,o=E*r,l=E*p,n=E*h,u=a*p,f=a*h,s=y*h,c=t*r,d=t*p,v=t*h,m=x.x,S=x.y,M=x.z;return T[0]=(1-(u+s))*m,T[1]=(l+v)*m,T[2]=(n-d)*m,T[3]=0,T[4]=(l-v)*S,T[5]=(1-(o+s))*S,T[6]=(f+c)*S,T[7]=0,T[8]=(n+d)*M,T[9]=(f-c)*M,T[10]=(1-(o+u))*M,T[11]=0,T[12]=e.x,T[13]=e.y,T[14]=e.z,T[15]=1,this}decompose(e,i,x){const T=this.elements;let E=Ru.set(T[0],T[1],T[2]).length();const a=Ru.set(T[4],T[5],T[6]).length(),y=Ru.set(T[8],T[9],T[10]).length();this.determinant()<0&&(E=-E),e.x=T[12],e.y=T[13],e.z=T[14],Xs.copy(this);const r=1/E,p=1/a,h=1/y;return Xs.elements[0]*=r,Xs.elements[1]*=r,Xs.elements[2]*=r,Xs.elements[4]*=p,Xs.elements[5]*=p,Xs.elements[6]*=p,Xs.elements[8]*=h,Xs.elements[9]*=h,Xs.elements[10]*=h,i.setFromRotationMatrix(Xs),x.x=E,x.y=a,x.z=y,this}makePerspective(e,i,x,T,E,a,y=Sa){const t=this.elements,r=2*E/(i-e),p=2*E/(x-T),h=(i+e)/(i-e),o=(x+T)/(x-T);let l,n;if(y===Sa)l=-(a+E)/(a-E),n=-2*a*E/(a-E);else if(y===hd)l=-a/(a-E),n=-a*E/(a-E);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+y);return t[0]=r,t[4]=0,t[8]=h,t[12]=0,t[1]=0,t[5]=p,t[9]=o,t[13]=0,t[2]=0,t[6]=0,t[10]=l,t[14]=n,t[3]=0,t[7]=0,t[11]=-1,t[15]=0,this}makeOrthographic(e,i,x,T,E,a,y=Sa){const t=this.elements,r=1/(i-e),p=1/(x-T),h=1/(a-E),o=(i+e)*r,l=(x+T)*p;let n,u;if(y===Sa)n=(a+E)*h,u=-2*h;else if(y===hd)n=E*h,u=-1*h;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+y);return t[0]=2*r,t[4]=0,t[8]=0,t[12]=-o,t[1]=0,t[5]=2*p,t[9]=0,t[13]=-l,t[2]=0,t[6]=0,t[10]=u,t[14]=-n,t[3]=0,t[7]=0,t[11]=0,t[15]=1,this}equals(e){const i=this.elements,x=e.elements;for(let T=0;T<16;T++)if(i[T]!==x[T])return!1;return!0}fromArray(e,i=0){for(let x=0;x<16;x++)this.elements[x]=e[x+i];return this}toArray(e=[],i=0){const x=this.elements;return e[i]=x[0],e[i+1]=x[1],e[i+2]=x[2],e[i+3]=x[3],e[i+4]=x[4],e[i+5]=x[5],e[i+6]=x[6],e[i+7]=x[7],e[i+8]=x[8],e[i+9]=x[9],e[i+10]=x[10],e[i+11]=x[11],e[i+12]=x[12],e[i+13]=x[13],e[i+14]=x[14],e[i+15]=x[15],e}}const Ru=new pt,Xs=new Ve,z5=new pt(0,0,0),G5=new pt(1,1,1),Zo=new pt,_p=new pt,is=new pt,AT=new Ve,wT=new Ur;class Ks{constructor(e=0,i=0,x=0,T=Ks.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=i,this._z=x,this._order=T}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,i,x,T=this._order){return this._x=e,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(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,i=this._order,x=!0){const T=e.elements,E=T[0],a=T[4],y=T[8],t=T[1],r=T[5],p=T[9],h=T[2],o=T[6],l=T[10];switch(i){case"XYZ":this._y=Math.asin(nn(y,-1,1)),Math.abs(y)<.9999999?(this._x=Math.atan2(-p,l),this._z=Math.atan2(-a,E)):(this._x=Math.atan2(o,r),this._z=0);break;case"YXZ":this._x=Math.asin(-nn(p,-1,1)),Math.abs(p)<.9999999?(this._y=Math.atan2(y,l),this._z=Math.atan2(t,r)):(this._y=Math.atan2(-h,E),this._z=0);break;case"ZXY":this._x=Math.asin(nn(o,-1,1)),Math.abs(o)<.9999999?(this._y=Math.atan2(-h,l),this._z=Math.atan2(-a,r)):(this._y=0,this._z=Math.atan2(t,E));break;case"ZYX":this._y=Math.asin(-nn(h,-1,1)),Math.abs(h)<.9999999?(this._x=Math.atan2(o,l),this._z=Math.atan2(t,E)):(this._x=0,this._z=Math.atan2(-a,r));break;case"YZX":this._z=Math.asin(nn(t,-1,1)),Math.abs(t)<.9999999?(this._x=Math.atan2(-p,r),this._y=Math.atan2(-h,E)):(this._x=0,this._y=Math.atan2(y,l));break;case"XZY":this._z=Math.asin(-nn(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(o,r),this._y=Math.atan2(y,E)):(this._x=Math.atan2(-p,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(e,i,x){return AT.makeRotationFromQuaternion(e),this.setFromRotationMatrix(AT,i,x)}setFromVector3(e,i=this._order){return this.set(e.x,e.y,e.z,i)}reorder(e){return wT.setFromEuler(this),this.setFromQuaternion(wT,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],i=0){return e[i]=this._x,e[i+1]=this._y,e[i+2]=this._z,e[i+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}Ks.DEFAULT_ORDER="XYZ";class Mh{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){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(e),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,t){return y[t.uuid]===void 0&&(y[t.uuid]=t.toJSON(e)),t.uuid}if(this.isScene)this.background&&(this.background.isColor?T.background=this.background.toJSON():this.background.isTexture&&(T.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(T.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){T.geometry=E(e.geometries,this.geometry);const y=this.geometry.parameters;if(y!==void 0&&y.shapes!==void 0){const t=y.shapes;if(Array.isArray(t))for(let r=0,p=t.length;r0){T.children=[];for(let y=0;y0){T.animations=[];for(let y=0;y0&&(x.geometries=y),t.length>0&&(x.materials=t),r.length>0&&(x.textures=r),p.length>0&&(x.images=p),h.length>0&&(x.shapes=h),o.length>0&&(x.skeletons=o),l.length>0&&(x.animations=l),n.length>0&&(x.nodes=n)}return x.object=T,x;function a(y){const t=[];for(const r in y){const p=y[r];delete p.metadata,t.push(p)}return t}}clone(e){return new this.constructor().copy(this,e)}copy(e,i=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),i===!0)for(let x=0;x0?T.multiplyScalar(1/Math.sqrt(E)):T.set(0,0,0)}static getBarycoord(e,i,x,T,E){Ys.subVectors(T,i),Ja.subVectors(x,i),b0.subVectors(e,i);const a=Ys.dot(Ys),y=Ys.dot(Ja),t=Ys.dot(b0),r=Ja.dot(Ja),p=Ja.dot(b0),h=a*r-y*y;if(h===0)return E.set(0,0,0),null;const o=1/h,l=(r*t-y*p)*o,n=(a*p-y*t)*o;return E.set(1-l-n,n,l)}static containsPoint(e,i,x,T){return this.getBarycoord(e,i,x,T,$a)===null?!1:$a.x>=0&&$a.y>=0&&$a.x+$a.y<=1}static getInterpolation(e,i,x,T,E,a,y,t){return this.getBarycoord(e,i,x,T,$a)===null?(t.x=0,t.y=0,"z"in t&&(t.z=0),"w"in t&&(t.w=0),null):(t.setScalar(0),t.addScaledVector(E,$a.x),t.addScaledVector(a,$a.y),t.addScaledVector(y,$a.z),t)}static isFrontFacing(e,i,x,T){return Ys.subVectors(x,i),Ja.subVectors(e,i),Ys.cross(Ja).dot(T)<0}set(e,i,x){return this.a.copy(e),this.b.copy(i),this.c.copy(x),this}setFromPointsAndIndices(e,i,x,T){return this.a.copy(e[i]),this.b.copy(e[x]),this.c.copy(e[T]),this}setFromAttributeAndIndices(e,i,x,T){return this.a.fromBufferAttribute(e,i),this.b.fromBufferAttribute(e,x),this.c.fromBufferAttribute(e,T),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return Ys.subVectors(this.c,this.b),Ja.subVectors(this.a,this.b),Ys.cross(Ja).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return ss.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,i){return ss.getBarycoord(e,this.a,this.b,this.c,i)}getInterpolation(e,i,x,T,E){return ss.getInterpolation(e,this.a,this.b,this.c,i,x,T,E)}containsPoint(e){return ss.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return ss.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,i){const x=this.a,T=this.b,E=this.c;let a,y;bu.subVectors(T,x),Fu.subVectors(E,x),F0.subVectors(e,x);const t=bu.dot(F0),r=Fu.dot(F0);if(t<=0&&r<=0)return i.copy(x);O0.subVectors(e,T);const p=bu.dot(O0),h=Fu.dot(O0);if(p>=0&&h<=p)return i.copy(T);const o=t*h-p*r;if(o<=0&&t>=0&&p<=0)return a=t/(t-p),i.copy(x).addScaledVector(bu,a);D0.subVectors(e,E);const l=bu.dot(D0),n=Fu.dot(D0);if(n>=0&&l<=n)return i.copy(E);const u=l*r-t*n;if(u<=0&&r>=0&&n<=0)return y=r/(r-n),i.copy(x).addScaledVector(Fu,y);const f=p*n-l*h;if(f<=0&&h-p>=0&&l-n>=0)return FT.subVectors(E,T),y=(h-p)/(h-p+(l-n)),i.copy(T).addScaledVector(FT,y);const s=1/(f+u+o);return a=u*s,y=o*s,i.copy(x).addScaledVector(bu,a).addScaledVector(Fu,y)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const oA={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},Jo={h:0,s:0,l:0},tv={h:0,s:0,l:0};function I0(g,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?g+(e-g)*6*i:i<1/2?e:i<2/3?g+(e-g)*6*(2/3-i):g}class fe{constructor(e,i,x){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,i,x)}set(e,i,x){if(i===void 0&&x===void 0){const T=e;T&&T.isColor?this.copy(T):typeof T=="number"?this.setHex(T):typeof T=="string"&&this.setStyle(T)}else this.setRGB(e,i,x);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,i=Ln){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,xi.toWorkingColorSpace(this,i),this}setRGB(e,i,x,T=xi.workingColorSpace){return this.r=e,this.g=i,this.b=x,xi.toWorkingColorSpace(this,T),this}setHSL(e,i,x,T=xi.workingColorSpace){if(e=u1(e,1),i=nn(i,0,1),x=nn(x,0,1),i===0)this.r=this.g=this.b=x;else{const E=x<=.5?x*(1+i):x+i-x*i,a=2*x-E;this.r=I0(a,E,e+1/3),this.g=I0(a,E,e),this.b=I0(a,E,e-1/3)}return xi.toWorkingColorSpace(this,T),this}setStyle(e,i=Ln){function x(E){E!==void 0&&parseFloat(E)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let T;if(T=/^(\w+)\(([^\)]*)\)/.exec(e)){let E;const a=T[1],y=T[2];switch(a){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 "+e)}}else if(T=/^\#([A-Fa-f\d]+)$/.exec(e)){const E=T[1],a=E.length;if(a===3)return this.setRGB(parseInt(E.charAt(0),16)/15,parseInt(E.charAt(1),16)/15,parseInt(E.charAt(2),16)/15,i);if(a===6)return this.setHex(parseInt(E,16),i);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,i);return this}setColorName(e,i=Ln){const x=oA[e.toLowerCase()];return x!==void 0?this.setHex(x,i):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=af(e.r),this.g=af(e.g),this.b=af(e.b),this}copyLinearToSRGB(e){return this.r=E0(e.r),this.g=E0(e.g),this.b=E0(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Ln){return xi.fromWorkingColorSpace(sr.copy(this),e),Math.round(nn(sr.r*255,0,255))*65536+Math.round(nn(sr.g*255,0,255))*256+Math.round(nn(sr.b*255,0,255))}getHexString(e=Ln){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,i=xi.workingColorSpace){xi.fromWorkingColorSpace(sr.copy(this),i);const x=sr.r,T=sr.g,E=sr.b,a=Math.max(x,T,E),y=Math.min(x,T,E);let t,r;const p=(y+a)/2;if(y===a)t=0,r=0;else{const h=a-y;switch(r=p<=.5?h/(a+y):h/(2-a-y),a){case x:t=(T-E)/h+(T0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const i in e){const x=e[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(e){const i=e===void 0||typeof e=="string";i&&(e={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(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(x.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(x.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).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(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(x.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).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(e).uuid),this.map&&this.map.isTexture&&(x.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(x.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(x.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(x.lightMap=this.lightMap.toJSON(e).uuid,x.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(x.aoMap=this.aoMap.toJSON(e).uuid,x.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(x.bumpMap=this.bumpMap.toJSON(e).uuid,x.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(x.normalMap=this.normalMap.toJSON(e).uuid,x.normalMapType=this.normalMapType,x.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(x.displacementMap=this.displacementMap.toJSON(e).uuid,x.displacementScale=this.displacementScale,x.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(x.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(x.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(x.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(x.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(x.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(x.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(x.envMap=this.envMap.toJSON(e).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(e).uuid),this.transmission!==void 0&&(x.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(x.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(x.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(x.thicknessMap=this.thicknessMap.toJSON(e).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!==Sh&&(x.blending=this.blending),this.side!==ao&&(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!==lm&&(x.blendSrc=this.blendSrc),this.blendDst!==hm&&(x.blendDst=this.blendDst),this.blendEquation!==tl&&(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!==Qc&&(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!==ux&&(x.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(x.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(x.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==fh&&(x.stencilFail=this.stencilFail),this.stencilZFail!==fh&&(x.stencilZFail=this.stencilZFail),this.stencilZPass!==fh&&(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 a=[];for(const y in E){const t=E[y];delete t.metadata,a.push(t)}return a}if(i){const E=T(e.textures),a=T(e.images);E.length>0&&(x.textures=E),a.length>0&&(x.images=a)}return x}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const i=e.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=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}}class cl extends _n{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new fe(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=Cd,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}const qa=K5();function K5(){const g=new ArrayBuffer(4),e=new Float32Array(g),i=new Uint32Array(g),x=new Uint32Array(512),T=new Uint32Array(512);for(let t=0;t<256;++t){const r=t-127;r<-27?(x[t]=0,x[t|256]=32768,T[t]=24,T[t|256]=24):r<-14?(x[t]=1024>>-r-14,x[t|256]=1024>>-r-14|32768,T[t]=-r-1,T[t|256]=-r-1):r<=15?(x[t]=r+15<<10,x[t|256]=r+15<<10|32768,T[t]=13,T[t|256]=13):r<128?(x[t]=31744,x[t|256]=64512,T[t]=24,T[t|256]=24):(x[t]=31744,x[t|256]=64512,T[t]=13,T[t|256]=13)}const E=new Uint32Array(2048),a=new Uint32Array(64),y=new Uint32Array(64);for(let t=1;t<1024;++t){let r=t<<13,p=0;for(;!(r&8388608);)r<<=1,p-=8388608;r&=-8388609,p+=947912704,E[t]=r|p}for(let t=1024;t<2048;++t)E[t]=939524096+(t-1024<<13);for(let t=1;t<31;++t)a[t]=t<<23;a[31]=1199570944,a[32]=2147483648;for(let t=33;t<63;++t)a[t]=2147483648+(t-32<<23);a[63]=3347054592;for(let t=1;t<64;++t)t!==32&&(y[t]=1024);return{floatView:e,uint32View:i,baseTable:x,shiftTable:T,mantissaTable:E,exponentTable:a,offsetTable:y}}function Br(g){Math.abs(g)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),g=nn(g,-65504,65504),qa.floatView[0]=g;const e=qa.uint32View[0],i=e>>23&511;return qa.baseTable[i]+((e&8388607)>>qa.shiftTable[i])}function Ic(g){const e=g>>10;return qa.uint32View[0]=qa.mantissaTable[qa.offsetTable[e]+(g&1023)]+qa.exponentTable[e],qa.floatView[0]}const j5={toHalfFloat:Br,fromHalfFloat:Ic},Sn=new pt,ev=new jt;class Ti{constructor(e,i,x=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=i,this.count=e!==void 0?e.length/i:0,this.normalized=x,this.usage=ld,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=Ps,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return Eh("THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,i){this.updateRanges.push({start:e,count:i})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,i,x){e*=this.itemSize,x*=i.itemSize;for(let T=0,E=this.itemSize;T0&&(e.userData=this.userData),this.parameters!==void 0){const t=this.parameters;for(const r in t)t[r]!==void 0&&(e[r]=t[r]);return e}e.data={attributes:{}};const i=this.index;i!==null&&(e.data.index={type:i.array.constructor.name,array:Array.prototype.slice.call(i.array)});const x=this.attributes;for(const t in x){const r=x[t];e.data.attributes[t]=r.toJSON(e.data)}const T={};let E=!1;for(const t in this.morphAttributes){const r=this.morphAttributes[t],p=[];for(let h=0,o=r.length;h0&&(T[t]=p,E=!0)}E&&(e.data.morphAttributes=T,e.data.morphTargetsRelative=this.morphTargetsRelative);const a=this.groups;a.length>0&&(e.data.groups=JSON.parse(JSON.stringify(a)));const y=this.boundingSphere;return y!==null&&(e.data.boundingSphere={center:y.center.toArray(),radius:y.radius}),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const i={};this.name=e.name;const x=e.index;x!==null&&this.setIndex(x.clone(i));const T=e.attributes;for(const r in T){const p=T[r];this.setAttribute(r,p.clone(i))}const E=e.morphAttributes;for(const r in E){const p=[],h=E[r];for(let o=0,l=h.length;o0){const T=i[x[0]];if(T!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let E=0,a=T.length;E(e.far-e.near)**2))&&(OT.copy(E).invert(),th.copy(e.ray).applyMatrix4(OT),!(x.boundingBox!==null&&th.intersectsBox(x.boundingBox)===!1)&&this._computeIntersections(e,i,th)))}_computeIntersections(e,i,x){let T;const E=this.geometry,a=this.material,y=E.index,t=E.attributes.position,r=E.attributes.uv,p=E.attributes.uv1,h=E.attributes.normal,o=E.groups,l=E.drawRange;if(y!==null)if(Array.isArray(a))for(let n=0,u=o.length;ni.far?null:{distance:r,point:lv.clone(),object:g}}function hv(g,e,i,x,T,E,a,y,t,r){g.getVertexPosition(y,Du),g.getVertexPosition(t,Iu),g.getVertexPosition(r,Nu);const p=i9(g,e,i,x,Du,Iu,Nu,ov);if(p){T&&(rv.fromBufferAttribute(T,y),sv.fromBufferAttribute(T,t),av.fromBufferAttribute(T,r),p.uv=ss.getInterpolation(ov,Du,Iu,Nu,rv,sv,av,new jt)),E&&(rv.fromBufferAttribute(E,y),sv.fromBufferAttribute(E,t),av.fromBufferAttribute(E,r),p.uv1=ss.getInterpolation(ov,Du,Iu,Nu,rv,sv,av,new jt),p.uv2=p.uv1),a&&(IT.fromBufferAttribute(a,y),NT.fromBufferAttribute(a,t),BT.fromBufferAttribute(a,r),p.normal=ss.getInterpolation(ov,Du,Iu,Nu,IT,NT,BT,new pt),p.normal.dot(x.direction)>0&&p.normal.multiplyScalar(-1));const h={a:y,b:t,c:r,normal:new pt,materialIndex:0};ss.getNormal(Du,Iu,Nu,h.normal),p.face=h}return p}class Ih extends ei{constructor(e=1,i=1,x=1,T=1,E=1,a=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:i,depth:x,widthSegments:T,heightSegments:E,depthSegments:a};const y=this;T=Math.floor(T),E=Math.floor(E),a=Math.floor(a);const t=[],r=[],p=[],h=[];let o=0,l=0;n("z","y","x",-1,-1,x,i,e,a,E,0),n("z","y","x",1,-1,x,i,-e,a,E,1),n("x","z","y",1,1,e,x,i,T,a,2),n("x","z","y",1,-1,e,x,-i,T,a,3),n("x","y","z",1,-1,e,i,x,T,E,4),n("x","y","z",-1,-1,e,i,-x,T,E,5),this.setIndex(t),this.setAttribute("position",new xe(r,3)),this.setAttribute("normal",new xe(p,3)),this.setAttribute("uv",new xe(h,2));function n(u,f,s,c,d,v,m,S,M,A,C){const w=v/M,P=m/A,L=v/2,O=m/2,I=S/2,D=M+1,B=A+1;let G=0,z=0;const W=new pt;for(let k=0;k0?1:-1,p.push(W.x,W.y,W.z),h.push(Q/M),h.push(1-k/A),G+=1}}for(let k=0;k0&&(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 wd extends vi{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Ve,this.projectionMatrix=new Ve,this.projectionMatrixInverse=new Ve,this.coordinateSystem=Sa}copy(e,i){return super.copy(e,i),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,i){super.updateWorldMatrix(e,i),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}const $o=new pt,UT=new jt,zT=new jt;class Yn extends wd{constructor(e=50,i=1,x=.1,T=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,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(e,i){return super.copy(e,i),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const i=.5*this.getFilmHeight()/e;this.fov=cf*2*Math.atan(i),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(Th*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return cf*2*Math.atan(Math.tan(Th*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(e,i,x){$o.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),i.set($o.x,$o.y).multiplyScalar(-e/$o.z),$o.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),x.set($o.x,$o.y).multiplyScalar(-e/$o.z)}getViewSize(e,i){return this.getViewBounds(e,UT,zT),i.subVectors(zT,UT)}setViewOffset(e,i,x,T,E,a){this.aspect=e/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=e,this.view.fullHeight=i,this.view.offsetX=x,this.view.offsetY=T,this.view.width=E,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let i=e*Math.tan(Th*.5*this.fov)/this.zoom,x=2*i,T=this.aspect*x,E=-.5*T;const a=this.view;if(this.view!==null&&this.view.enabled){const t=a.fullWidth,r=a.fullHeight;E+=a.offsetX*T/t,i-=a.offsetY*x/r,T*=a.width/t,x*=a.height/r}const y=this.filmOffset;y!==0&&(E+=e*y/this.getFilmWidth()),this.projectionMatrix.makePerspective(E,E+T,i,i-x,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const i=super.toJSON(e);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 Bu=-90,Uu=1;class uA extends vi{constructor(e,i,x){super(),this.type="CubeCamera",this.renderTarget=x,this.coordinateSystem=null,this.activeMipmapLevel=0;const T=new Yn(Bu,Uu,e,i);T.layers=this.layers,this.add(T);const E=new Yn(Bu,Uu,e,i);E.layers=this.layers,this.add(E);const a=new Yn(Bu,Uu,e,i);a.layers=this.layers,this.add(a);const y=new Yn(Bu,Uu,e,i);y.layers=this.layers,this.add(y);const t=new Yn(Bu,Uu,e,i);t.layers=this.layers,this.add(t);const r=new Yn(Bu,Uu,e,i);r.layers=this.layers,this.add(r)}updateCoordinateSystem(){const e=this.coordinateSystem,i=this.children.concat(),[x,T,E,a,y,t]=i;for(const r of i)this.remove(r);if(e===Sa)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),a.up.set(0,0,1),a.lookAt(0,-1,0),y.up.set(0,1,0),y.lookAt(0,0,1),t.up.set(0,1,0),t.lookAt(0,0,-1);else if(e===hd)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),a.up.set(0,0,-1),a.lookAt(0,-1,0),y.up.set(0,-1,0),y.lookAt(0,0,1),t.up.set(0,-1,0),t.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(const r of i)this.add(r),r.updateMatrixWorld()}update(e,i){this.parent===null&&this.updateMatrixWorld();const{renderTarget:x,activeMipmapLevel:T}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[E,a,y,t,r,p]=this.children,h=e.getRenderTarget(),o=e.getActiveCubeFace(),l=e.getActiveMipmapLevel(),n=e.xr.enabled;e.xr.enabled=!1;const u=x.texture.generateMipmaps;x.texture.generateMipmaps=!1,e.setRenderTarget(x,0,T),e.render(i,E),e.setRenderTarget(x,1,T),e.render(i,a),e.setRenderTarget(x,2,T),e.render(i,y),e.setRenderTarget(x,3,T),e.render(i,t),e.setRenderTarget(x,4,T),e.render(i,r),x.texture.generateMipmaps=u,e.setRenderTarget(x,5,T),e.render(i,p),e.setRenderTarget(h,o,l),e.xr.enabled=n,x.texture.needsPMREMUpdate=!0}}class Pd extends Zi{constructor(e,i,x,T,E,a,y,t,r,p){e=e!==void 0?e:[],i=i!==void 0?i:oo,super(e,i,x,T,E,a,y,t,r,p),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class fA extends $s{constructor(e=1,i={}){super(e,e,i),this.isWebGLCubeRenderTarget=!0;const x={width:e,height:e,depth:1},T=[x,x,x,x,x,x];i.encoding!==void 0&&(Eh("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),i.colorSpace=i.encoding===sl?Ln:rs),this.texture=new Pd(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:Ki}fromEquirectangularTexture(e,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:` + + varying vec3 vWorldDirection; + + vec3 transformDirection( in vec3 dir, in mat4 matrix ) { + + return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); + + } + + void main() { + + vWorldDirection = transformDirection( position, modelMatrix ); + + #include + #include + + } + `,fragmentShader:` + + uniform sampler2D tEquirect; + + varying vec3 vWorldDirection; + + #include + + void main() { + + vec3 direction = normalize( vWorldDirection ); + + vec2 sampleUV = equirectUv( direction ); + + gl_FragColor = texture2D( tEquirect, sampleUV ); + + } + `},T=new Ih(5,5,5),E=new Qs({name:"CubemapFromEquirect",uniforms:df(x.uniforms),vertexShader:x.vertexShader,fragmentShader:x.fragmentShader,side:Cr,blending:so});E.uniforms.tEquirect.value=i;const a=new En(T,E),y=i.minFilter;return i.minFilter===xa&&(i.minFilter=Ki),new uA(1,10,this).update(e,a),i.minFilter=y,a.geometry.dispose(),a.material.dispose(),this}clear(e,i,x,T){const E=e.getRenderTarget();for(let a=0;a<6;a++)e.setRenderTarget(this,a),e.clear(i,x,T);e.setRenderTarget(E)}}const U0=new pt,a9=new pt,o9=new ni;class qo{constructor(e=new pt(1,0,0),i=0){this.isPlane=!0,this.normal=e,this.constant=i}set(e,i){return this.normal.copy(e),this.constant=i,this}setComponents(e,i,x,T){return this.normal.set(e,i,x),this.constant=T,this}setFromNormalAndCoplanarPoint(e,i){return this.normal.copy(e),this.constant=-i.dot(this.normal),this}setFromCoplanarPoints(e,i,x){const T=U0.subVectors(x,i).cross(a9.subVectors(e,i)).normalize();return this.setFromNormalAndCoplanarPoint(T,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,i){return i.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,i){const x=e.delta(U0),T=this.normal.dot(x);if(T===0)return this.distanceToPoint(e.start)===0?i.copy(e.start):null;const E=-(e.start.dot(this.normal)+this.constant)/T;return E<0||E>1?null:i.copy(e.start).addScaledVector(x,E)}intersectsLine(e){const i=this.distanceToPoint(e.start),x=this.distanceToPoint(e.end);return i<0&&x>0||x<0&&i>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,i){const x=i||o9.getNormalMatrix(e),T=this.coplanarPoint(U0).applyMatrix4(e),E=this.normal.applyMatrix3(x).normalize();return this.constant=-T.dot(E),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}}const eh=new hr,uv=new pt;class Rd{constructor(e=new qo,i=new qo,x=new qo,T=new qo,E=new qo,a=new qo){this.planes=[e,i,x,T,E,a]}set(e,i,x,T,E,a){const y=this.planes;return y[0].copy(e),y[1].copy(i),y[2].copy(x),y[3].copy(T),y[4].copy(E),y[5].copy(a),this}copy(e){const i=this.planes;for(let x=0;x<6;x++)i[x].copy(e.planes[x]);return this}setFromProjectionMatrix(e,i=Sa){const x=this.planes,T=e.elements,E=T[0],a=T[1],y=T[2],t=T[3],r=T[4],p=T[5],h=T[6],o=T[7],l=T[8],n=T[9],u=T[10],f=T[11],s=T[12],c=T[13],d=T[14],v=T[15];if(x[0].setComponents(t-E,o-r,f-l,v-s).normalize(),x[1].setComponents(t+E,o+r,f+l,v+s).normalize(),x[2].setComponents(t+a,o+p,f+n,v+c).normalize(),x[3].setComponents(t-a,o-p,f-n,v-c).normalize(),x[4].setComponents(t-y,o-h,f-u,v-d).normalize(),i===Sa)x[5].setComponents(t+y,o+h,f+u,v+d).normalize();else if(i===hd)x[5].setComponents(y,h,u,d).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+i);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),eh.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const i=e.geometry;i.boundingSphere===null&&i.computeBoundingSphere(),eh.copy(i.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(eh)}intersectsSprite(e){return eh.center.set(0,0,0),eh.radius=.7071067811865476,eh.applyMatrix4(e.matrixWorld),this.intersectsSphere(eh)}intersectsSphere(e){const i=this.planes,x=e.center,T=-e.radius;for(let E=0;E<6;E++)if(i[E].distanceToPoint(x)0?e.max.x:e.min.x,uv.y=T.normal.y>0?e.max.y:e.min.y,uv.z=T.normal.z>0?e.max.z:e.min.z,T.distanceToPoint(uv)<0)return!1}return!0}containsPoint(e){const i=this.planes;for(let x=0;x<6;x++)if(i[x].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function cA(){let g=null,e=!1,i=null,x=null;function T(E,a){i(E,a),x=g.requestAnimationFrame(T)}return{start:function(){e!==!0&&i!==null&&(x=g.requestAnimationFrame(T),e=!0)},stop:function(){g.cancelAnimationFrame(x),e=!1},setAnimationLoop:function(E){i=E},setContext:function(E){g=E}}}function l9(g,e){const i=e.isWebGL2,x=new WeakMap;function T(r,p){const h=r.array,o=r.usage,l=h.byteLength,n=g.createBuffer();g.bindBuffer(p,n),g.bufferData(p,h,o),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,p,h){const o=p.array,l=p._updateRange,n=p.updateRanges;if(g.bindBuffer(h,r),l.count===-1&&n.length===0&&g.bufferSubData(h,0,o),n.length!==0){for(let u=0,f=n.length;u 0 + vec4 plane; + #ifdef ALPHA_TO_COVERAGE + float distanceToPlane, distanceGradient; + float clipOpacity = 1.0; + #pragma unroll_loop_start + for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { + plane = clippingPlanes[ i ]; + distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w; + distanceGradient = fwidth( distanceToPlane ) / 2.0; + clipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane ); + if ( clipOpacity == 0.0 ) discard; + } + #pragma unroll_loop_end + #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES + float unionClipOpacity = 1.0; + #pragma unroll_loop_start + for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { + plane = clippingPlanes[ i ]; + distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w; + distanceGradient = fwidth( distanceToPlane ) / 2.0; + unionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane ); + } + #pragma unroll_loop_end + clipOpacity *= 1.0 - unionClipOpacity; + #endif + diffuseColor.a *= clipOpacity; + if ( diffuseColor.a == 0.0 ) discard; + #else + #pragma unroll_loop_start + for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { + plane = clippingPlanes[ i ]; + if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard; + } + #pragma unroll_loop_end + #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES + bool clipped = true; + #pragma unroll_loop_start + for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { + plane = clippingPlanes[ i ]; + clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped; + } + #pragma unroll_loop_end + if ( clipped ) discard; + #endif + #endif +#endif`,A9=`#if NUM_CLIPPING_PLANES > 0 + varying vec3 vClipPosition; + uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; +#endif`,w9=`#if NUM_CLIPPING_PLANES > 0 + varying vec3 vClipPosition; +#endif`,P9=`#if NUM_CLIPPING_PLANES > 0 + vClipPosition = - mvPosition.xyz; +#endif`,R9=`#if defined( USE_COLOR_ALPHA ) + diffuseColor *= vColor; +#elif defined( USE_COLOR ) + diffuseColor.rgb *= vColor; +#endif`,L9=`#if defined( USE_COLOR_ALPHA ) + varying vec4 vColor; +#elif defined( USE_COLOR ) + varying vec3 vColor; +#endif`,b9=`#if defined( USE_COLOR_ALPHA ) + varying vec4 vColor; +#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) + varying vec3 vColor; +#endif`,F9=`#if defined( USE_COLOR_ALPHA ) + vColor = vec4( 1.0 ); +#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) + vColor = vec3( 1.0 ); +#endif +#ifdef USE_COLOR + vColor *= color; +#endif +#ifdef USE_INSTANCING_COLOR + vColor.xyz *= instanceColor.xyz; +#endif`,O9=`#define PI 3.141592653589793 +#define PI2 6.283185307179586 +#define PI_HALF 1.5707963267948966 +#define RECIPROCAL_PI 0.3183098861837907 +#define RECIPROCAL_PI2 0.15915494309189535 +#define EPSILON 1e-6 +#ifndef saturate +#define saturate( a ) clamp( a, 0.0, 1.0 ) +#endif +#define whiteComplement( a ) ( 1.0 - saturate( a ) ) +float pow2( const in float x ) { return x*x; } +vec3 pow2( const in vec3 x ) { return x*x; } +float pow3( const in float x ) { return x*x*x; } +float pow4( const in float x ) { float x2 = x*x; return x2*x2; } +float max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); } +float average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); } +highp float rand( const in vec2 uv ) { + const highp float a = 12.9898, b = 78.233, c = 43758.5453; + highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI ); + return fract( sin( sn ) * c ); +} +#ifdef HIGH_PRECISION + float precisionSafeLength( vec3 v ) { return length( v ); } +#else + float precisionSafeLength( vec3 v ) { + float maxComponent = max3( abs( v ) ); + return length( v / maxComponent ) * maxComponent; + } +#endif +struct IncidentLight { + vec3 color; + vec3 direction; + bool visible; +}; +struct ReflectedLight { + vec3 directDiffuse; + vec3 directSpecular; + vec3 indirectDiffuse; + vec3 indirectSpecular; +}; +#ifdef USE_ALPHAHASH + varying vec3 vPosition; +#endif +vec3 transformDirection( in vec3 dir, in mat4 matrix ) { + return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); +} +vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) { + return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz ); +} +mat3 transposeMat3( const in mat3 m ) { + mat3 tmp; + tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x ); + tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y ); + tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z ); + return tmp; +} +float luminance( const in vec3 rgb ) { + const vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 ); + return dot( weights, rgb ); +} +bool isPerspectiveMatrix( mat4 m ) { + return m[ 2 ][ 3 ] == - 1.0; +} +vec2 equirectUv( in vec3 dir ) { + float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5; + float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5; + return vec2( u, v ); +} +vec3 BRDF_Lambert( const in vec3 diffuseColor ) { + return RECIPROCAL_PI * diffuseColor; +} +vec3 F_Schlick( const in vec3 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 ); +} +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`,D9=`#ifdef ENVMAP_TYPE_CUBE_UV + #define cubeUV_minMipLevel 4.0 + #define cubeUV_minTileSize 16.0 + float getFace( vec3 direction ) { + vec3 absDirection = abs( direction ); + float face = - 1.0; + if ( absDirection.x > absDirection.z ) { + if ( absDirection.x > absDirection.y ) + face = direction.x > 0.0 ? 0.0 : 3.0; + else + face = direction.y > 0.0 ? 1.0 : 4.0; + } else { + if ( absDirection.z > absDirection.y ) + face = direction.z > 0.0 ? 2.0 : 5.0; + else + face = direction.y > 0.0 ? 1.0 : 4.0; + } + return face; + } + vec2 getUV( vec3 direction, float face ) { + vec2 uv; + if ( face == 0.0 ) { + uv = vec2( direction.z, direction.y ) / abs( direction.x ); + } else if ( face == 1.0 ) { + uv = vec2( - direction.x, - direction.z ) / abs( direction.y ); + } else if ( face == 2.0 ) { + uv = vec2( - direction.x, direction.y ) / abs( direction.z ); + } else if ( face == 3.0 ) { + uv = vec2( - direction.z, direction.y ) / abs( direction.x ); + } else if ( face == 4.0 ) { + uv = vec2( - direction.x, direction.z ) / abs( direction.y ); + } else { + uv = vec2( direction.x, direction.y ) / abs( direction.z ); + } + return 0.5 * ( uv + 1.0 ); + } + vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) { + float face = getFace( direction ); + float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 ); + mipInt = max( mipInt, cubeUV_minMipLevel ); + float faceSize = exp2( mipInt ); + highp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0; + if ( face > 2.0 ) { + uv.y += faceSize; + face -= 3.0; + } + uv.x += face * faceSize; + uv.x += filterInt * 3.0 * cubeUV_minTileSize; + uv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize ); + uv.x *= CUBEUV_TEXEL_WIDTH; + uv.y *= CUBEUV_TEXEL_HEIGHT; + #ifdef texture2DGradEXT + return texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb; + #else + return texture2D( envMap, uv ).rgb; + #endif + } + #define cubeUV_r0 1.0 + #define cubeUV_m0 - 2.0 + #define cubeUV_r1 0.8 + #define cubeUV_m1 - 1.0 + #define cubeUV_r4 0.4 + #define cubeUV_m4 2.0 + #define cubeUV_r5 0.305 + #define cubeUV_m5 3.0 + #define cubeUV_r6 0.21 + #define cubeUV_m6 4.0 + float roughnessToMip( float roughness ) { + float mip = 0.0; + if ( roughness >= cubeUV_r1 ) { + mip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0; + } else if ( roughness >= cubeUV_r4 ) { + mip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1; + } else if ( roughness >= cubeUV_r5 ) { + mip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4; + } else if ( roughness >= cubeUV_r6 ) { + mip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5; + } else { + mip = - 2.0 * log2( 1.16 * roughness ); } + return mip; + } + vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) { + float mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP ); + float mipF = fract( mip ); + float mipInt = floor( mip ); + vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt ); + if ( mipF == 0.0 ) { + return vec4( color0, 1.0 ); + } else { + vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 ); + return vec4( mix( color0, color1, mipF ), 1.0 ); + } + } +#endif`,I9=`vec3 transformedNormal = objectNormal; +#ifdef USE_TANGENT + vec3 transformedTangent = objectTangent; +#endif +#ifdef USE_BATCHING + mat3 bm = mat3( batchingMatrix ); + transformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) ); + transformedNormal = bm * transformedNormal; + #ifdef USE_TANGENT + transformedTangent = bm * transformedTangent; + #endif +#endif +#ifdef USE_INSTANCING + mat3 im = mat3( instanceMatrix ); + transformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) ); + transformedNormal = im * transformedNormal; + #ifdef USE_TANGENT + transformedTangent = im * transformedTangent; + #endif +#endif +transformedNormal = normalMatrix * transformedNormal; +#ifdef FLIP_SIDED + transformedNormal = - transformedNormal; +#endif +#ifdef USE_TANGENT + transformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz; + #ifdef FLIP_SIDED + transformedTangent = - transformedTangent; + #endif +#endif`,N9=`#ifdef USE_DISPLACEMENTMAP + uniform sampler2D displacementMap; + uniform float displacementScale; + uniform float displacementBias; +#endif`,B9=`#ifdef USE_DISPLACEMENTMAP + transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias ); +#endif`,U9=`#ifdef USE_EMISSIVEMAP + vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv ); + totalEmissiveRadiance *= emissiveColor.rgb; +#endif`,z9=`#ifdef USE_EMISSIVEMAP + uniform sampler2D emissiveMap; +#endif`,G9="gl_FragColor = linearToOutputTexel( gl_FragColor );",V9=` +const mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3( + vec3( 0.8224621, 0.177538, 0.0 ), + vec3( 0.0331941, 0.9668058, 0.0 ), + vec3( 0.0170827, 0.0723974, 0.9105199 ) +); +const mat3 LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = mat3( + vec3( 1.2249401, - 0.2249404, 0.0 ), + vec3( - 0.0420569, 1.0420571, 0.0 ), + vec3( - 0.0196376, - 0.0786361, 1.0982735 ) +); +vec4 LinearSRGBToLinearDisplayP3( in vec4 value ) { + return vec4( value.rgb * LINEAR_SRGB_TO_LINEAR_DISPLAY_P3, value.a ); +} +vec4 LinearDisplayP3ToLinearSRGB( in vec4 value ) { + return vec4( value.rgb * LINEAR_DISPLAY_P3_TO_LINEAR_SRGB, value.a ); +} +vec4 LinearTransferOETF( in vec4 value ) { + return value; +} +vec4 sRGBTransferOETF( in vec4 value ) { + return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a ); +} +vec4 LinearToLinear( in vec4 value ) { + return value; +} +vec4 LinearTosRGB( in vec4 value ) { + return sRGBTransferOETF( value ); +}`,H9=`#ifdef USE_ENVMAP + #ifdef ENV_WORLDPOS + vec3 cameraToFrag; + if ( isOrthographic ) { + cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); + } else { + cameraToFrag = normalize( vWorldPosition - cameraPosition ); + } + vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); + #ifdef ENVMAP_MODE_REFLECTION + vec3 reflectVec = reflect( cameraToFrag, worldNormal ); + #else + vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio ); + #endif + #else + vec3 reflectVec = vReflect; + #endif + #ifdef ENVMAP_TYPE_CUBE + vec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) ); + #else + vec4 envColor = vec4( 0.0 ); + #endif + #ifdef ENVMAP_BLENDING_MULTIPLY + outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity ); + #elif defined( ENVMAP_BLENDING_MIX ) + outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity ); + #elif defined( ENVMAP_BLENDING_ADD ) + outgoingLight += envColor.xyz * specularStrength * reflectivity; + #endif +#endif`,W9=`#ifdef USE_ENVMAP + uniform float envMapIntensity; + uniform float flipEnvMap; + #ifdef ENVMAP_TYPE_CUBE + uniform samplerCube envMap; + #else + uniform sampler2D envMap; + #endif + +#endif`,X9=`#ifdef USE_ENVMAP + uniform float reflectivity; + #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) + #define ENV_WORLDPOS + #endif + #ifdef ENV_WORLDPOS + varying vec3 vWorldPosition; + uniform float refractionRatio; + #else + varying vec3 vReflect; + #endif +#endif`,Y9=`#ifdef USE_ENVMAP + #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) + #define ENV_WORLDPOS + #endif + #ifdef ENV_WORLDPOS + + varying vec3 vWorldPosition; + #else + varying vec3 vReflect; + uniform float refractionRatio; + #endif +#endif`,k9=`#ifdef USE_ENVMAP + #ifdef ENV_WORLDPOS + vWorldPosition = worldPosition.xyz; + #else + vec3 cameraToVertex; + if ( isOrthographic ) { + cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); + } else { + cameraToVertex = normalize( worldPosition.xyz - cameraPosition ); + } + vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); + #ifdef ENVMAP_MODE_REFLECTION + vReflect = reflect( cameraToVertex, worldNormal ); + #else + vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); + #endif + #endif +#endif`,K9=`#ifdef USE_FOG + vFogDepth = - mvPosition.z; +#endif`,j9=`#ifdef USE_FOG + varying float vFogDepth; +#endif`,Z9=`#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`,J9=`#ifdef USE_FOG + uniform vec3 fogColor; + varying float vFogDepth; + #ifdef FOG_EXP2 + uniform float fogDensity; + #else + uniform float fogNear; + uniform float fogFar; + #endif +#endif`,$9=`#ifdef USE_GRADIENTMAP + uniform sampler2D gradientMap; +#endif +vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { + float dotNL = dot( normal, lightDirection ); + vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 ); + #ifdef USE_GRADIENTMAP + return vec3( texture2D( gradientMap, coord ).r ); + #else + 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 +}`,Q9=`#ifdef USE_LIGHTMAP + vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); + vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; + reflectedLight.indirectDiffuse += lightMapIrradiance; +#endif`,_9=`#ifdef USE_LIGHTMAP + uniform sampler2D lightMap; + uniform float lightMapIntensity; +#endif`,q9=`LambertMaterial material; +material.diffuseColor = diffuseColor.rgb; +material.specularStrength = specularStrength;`,tN=`varying vec3 vViewPosition; +struct LambertMaterial { + vec3 diffuseColor; + float specularStrength; +}; +void RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) { + float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); + vec3 irradiance = dotNL * directLight.color; + reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +void RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) { + reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +#define RE_Direct RE_Direct_Lambert +#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,eN=`uniform bool receiveShadow; +uniform vec3 ambientLightColor; +#if defined( USE_LIGHT_PROBES ) + uniform vec3 lightProbe[ 9 ]; +#endif +vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) { + float x = normal.x, y = normal.y, z = normal.z; + vec3 result = shCoefficients[ 0 ] * 0.886227; + result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y; + result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z; + result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x; + result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y; + result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z; + result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 ); + result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z; + result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y ); + return result; +} +vec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) { + vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); + vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe ); + return irradiance; +} +vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) { + vec3 irradiance = ambientLightColor; + return irradiance; +} +float getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) { + #if defined ( LEGACY_LIGHTS ) + if ( cutoffDistance > 0.0 && decayExponent > 0.0 ) { + return pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent ); + } + return 1.0; + #else + float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 ); + if ( cutoffDistance > 0.0 ) { + distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) ); + } + return distanceFalloff; + #endif +} +float getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) { + return smoothstep( coneCosine, penumbraCosine, angleCosine ); +} +#if NUM_DIR_LIGHTS > 0 + struct DirectionalLight { + vec3 direction; + vec3 color; + }; + uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ]; + void getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) { + light.color = directionalLight.color; + light.direction = directionalLight.direction; + light.visible = true; + } +#endif +#if NUM_POINT_LIGHTS > 0 + struct PointLight { + vec3 position; + vec3 color; + float distance; + float decay; + }; + uniform PointLight pointLights[ NUM_POINT_LIGHTS ]; + void getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) { + vec3 lVector = pointLight.position - geometryPosition; + light.direction = normalize( lVector ); + float lightDistance = length( lVector ); + light.color = pointLight.color; + light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay ); + light.visible = ( light.color != vec3( 0.0 ) ); + } +#endif +#if NUM_SPOT_LIGHTS > 0 + struct SpotLight { + vec3 position; + vec3 direction; + vec3 color; + float distance; + float decay; + float coneCos; + float penumbraCos; + }; + uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ]; + void getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) { + vec3 lVector = spotLight.position - geometryPosition; + light.direction = normalize( lVector ); + float angleCos = dot( light.direction, spotLight.direction ); + float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos ); + if ( spotAttenuation > 0.0 ) { + float lightDistance = length( lVector ); + light.color = spotLight.color * spotAttenuation; + light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay ); + light.visible = ( light.color != vec3( 0.0 ) ); + } else { + light.color = vec3( 0.0 ); + light.visible = false; + } + } +#endif +#if NUM_RECT_AREA_LIGHTS > 0 + struct RectAreaLight { + vec3 color; + vec3 position; + vec3 halfWidth; + vec3 halfHeight; + }; + uniform sampler2D ltc_1; uniform sampler2D ltc_2; + uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ]; +#endif +#if NUM_HEMI_LIGHTS > 0 + struct HemisphereLight { + vec3 direction; + vec3 skyColor; + vec3 groundColor; + }; + uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ]; + vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) { + float dotNL = dot( normal, hemiLight.direction ); + float hemiDiffuseWeight = 0.5 * dotNL + 0.5; + vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); + return irradiance; + } +#endif`,iN=`#ifdef USE_ENVMAP + vec3 getIBLIrradiance( const in vec3 normal ) { + #ifdef ENVMAP_TYPE_CUBE_UV + vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); + vec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 ); + return PI * envMapColor.rgb * envMapIntensity; + #else + return vec3( 0.0 ); + #endif + } + vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) { + #ifdef ENVMAP_TYPE_CUBE_UV + vec3 reflectVec = reflect( - viewDir, normal ); + reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) ); + reflectVec = inverseTransformDirection( reflectVec, viewMatrix ); + vec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness ); + return envMapColor.rgb * envMapIntensity; + #else + return vec3( 0.0 ); + #endif + } + #ifdef USE_ANISOTROPY + vec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) { + #ifdef ENVMAP_TYPE_CUBE_UV + vec3 bentNormal = cross( bitangent, viewDir ); + bentNormal = normalize( cross( bentNormal, bitangent ) ); + bentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) ); + return getIBLRadiance( viewDir, bentNormal, roughness ); + #else + return vec3( 0.0 ); + #endif + } + #endif +#endif`,nN=`ToonMaterial material; +material.diffuseColor = diffuseColor.rgb;`,rN=`varying vec3 vViewPosition; +struct ToonMaterial { + vec3 diffuseColor; +}; +void RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { + vec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color; + reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { + reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +#define RE_Direct RE_Direct_Toon +#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,sN=`BlinnPhongMaterial material; +material.diffuseColor = diffuseColor.rgb; +material.specularColor = specular; +material.specularShininess = shininess; +material.specularStrength = specularStrength;`,aN=`varying vec3 vViewPosition; +struct BlinnPhongMaterial { + vec3 diffuseColor; + vec3 specularColor; + float specularShininess; + float specularStrength; +}; +void RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { + float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); + vec3 irradiance = dotNL * directLight.color; + reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); + reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength; +} +void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { + reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +#define RE_Direct RE_Direct_BlinnPhong +#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,oN=`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 ); +material.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness; +material.roughness = min( material.roughness, 1.0 ); +#ifdef IOR + material.ior = ior; + #ifdef USE_SPECULAR + float specularIntensityFactor = specularIntensity; + vec3 specularColorFactor = specularColor; + #ifdef USE_SPECULAR_COLORMAP + specularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb; + #endif + #ifdef USE_SPECULAR_INTENSITYMAP + specularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a; + #endif + material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor ); + #else + float specularIntensityFactor = 1.0; + vec3 specularColorFactor = vec3( 1.0 ); + material.specularF90 = 1.0; + #endif + material.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor ); +#else + material.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor ); + material.specularF90 = 1.0; +#endif +#ifdef USE_CLEARCOAT + material.clearcoat = clearcoat; + material.clearcoatRoughness = clearcoatRoughness; + material.clearcoatF0 = vec3( 0.04 ); + material.clearcoatF90 = 1.0; + #ifdef USE_CLEARCOATMAP + material.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x; + #endif + #ifdef USE_CLEARCOAT_ROUGHNESSMAP + material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y; + #endif + material.clearcoat = saturate( material.clearcoat ); material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 ); + material.clearcoatRoughness += geometryRoughness; + material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 ); +#endif +#ifdef USE_IRIDESCENCE + material.iridescence = iridescence; + material.iridescenceIOR = iridescenceIOR; + #ifdef USE_IRIDESCENCEMAP + material.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r; + #endif + #ifdef USE_IRIDESCENCE_THICKNESSMAP + material.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum; + #else + material.iridescenceThickness = iridescenceThicknessMaximum; + #endif +#endif +#ifdef USE_SHEEN + material.sheenColor = sheenColor; + #ifdef USE_SHEEN_COLORMAP + material.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb; + #endif + material.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 ); + #ifdef USE_SHEEN_ROUGHNESSMAP + material.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a; + #endif +#endif +#ifdef USE_ANISOTROPY + #ifdef USE_ANISOTROPYMAP + mat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x ); + vec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb; + vec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b; + #else + vec2 anisotropyV = anisotropyVector; + #endif + material.anisotropy = length( anisotropyV ); + if( material.anisotropy == 0.0 ) { + anisotropyV = vec2( 1.0, 0.0 ); + } else { + anisotropyV /= material.anisotropy; + material.anisotropy = saturate( material.anisotropy ); + } + 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`,lN=`struct PhysicalMaterial { + vec3 diffuseColor; + float roughness; + vec3 specularColor; + float specularF90; + #ifdef USE_CLEARCOAT + float clearcoat; + float clearcoatRoughness; + vec3 clearcoatF0; + float clearcoatF90; + #endif + #ifdef USE_IRIDESCENCE + float iridescence; + float iridescenceIOR; + float iridescenceThickness; + vec3 iridescenceFresnel; + vec3 iridescenceF0; + #endif + #ifdef USE_SHEEN + vec3 sheenColor; + float sheenRoughness; + #endif + #ifdef IOR + float ior; + #endif + #ifdef USE_TRANSMISSION + float transmission; + float transmissionAlpha; + float thickness; + float attenuationDistance; + vec3 attenuationColor; + #endif + #ifdef USE_ANISOTROPY + float anisotropy; + float alphaT; + vec3 anisotropyT; + vec3 anisotropyB; + #endif +}; +vec3 clearcoatSpecularDirect = vec3( 0.0 ); +vec3 clearcoatSpecularIndirect = vec3( 0.0 ); +vec3 sheenSpecularDirect = vec3( 0.0 ); +vec3 sheenSpecularIndirect = vec3(0.0 ); +vec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) { + float x = clamp( 1.0 - dotVH, 0.0, 1.0 ); + float x2 = x * x; + float x5 = clamp( x * x2 * x2, 0.0, 0.9999 ); + return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 ); +} +float V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) { + float a2 = pow2( alpha ); + float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) ); + float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) ); + return 0.5 / max( gv + gl, EPSILON ); +} +float D_GGX( const in float alpha, const in float dotNH ) { + float a2 = pow2( alpha ); + float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0; + return RECIPROCAL_PI * a2 / pow2( denom ); +} +#ifdef USE_ANISOTROPY + float V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) { + float gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) ); + float gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) ); + float v = 0.5 / ( gv + gl ); + return saturate(v); + } + float D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) { + float a2 = alphaT * alphaB; + highp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH ); + highp float v2 = dot( v, v ); + float w2 = a2 / v2; + return RECIPROCAL_PI * a2 * pow2 ( w2 ); + } +#endif +#ifdef USE_CLEARCOAT + vec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) { + vec3 f0 = material.clearcoatF0; + float f90 = material.clearcoatF90; + float roughness = material.clearcoatRoughness; + float alpha = pow2( roughness ); + vec3 halfDir = normalize( lightDir + viewDir ); + float dotNL = saturate( dot( normal, lightDir ) ); + float dotNV = saturate( dot( normal, viewDir ) ); + float dotNH = saturate( dot( normal, halfDir ) ); + float dotVH = saturate( dot( viewDir, halfDir ) ); + vec3 F = F_Schlick( f0, f90, dotVH ); + float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); + float D = D_GGX( alpha, dotNH ); + return F * ( V * D ); + } +#endif +vec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) { + vec3 f0 = material.specularColor; + float f90 = material.specularF90; + float roughness = material.roughness; + float alpha = pow2( roughness ); + vec3 halfDir = normalize( lightDir + viewDir ); + float dotNL = saturate( dot( normal, lightDir ) ); + float dotNV = saturate( dot( normal, viewDir ) ); + float dotNH = saturate( dot( normal, halfDir ) ); + float dotVH = saturate( dot( viewDir, halfDir ) ); + vec3 F = F_Schlick( f0, f90, dotVH ); + #ifdef USE_IRIDESCENCE + F = mix( F, material.iridescenceFresnel, material.iridescence ); + #endif + #ifdef USE_ANISOTROPY + float dotTL = dot( material.anisotropyT, lightDir ); + float dotTV = dot( material.anisotropyT, viewDir ); + float dotTH = dot( material.anisotropyT, halfDir ); + float dotBL = dot( material.anisotropyB, lightDir ); + float dotBV = dot( material.anisotropyB, viewDir ); + float dotBH = dot( material.anisotropyB, halfDir ); + float V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL ); + float D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH ); + #else + float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); + float D = D_GGX( alpha, dotNH ); + #endif + return F * ( V * D ); +} +vec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) { + const float LUT_SIZE = 64.0; + const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE; + const float LUT_BIAS = 0.5 / LUT_SIZE; + float dotNV = saturate( dot( N, V ) ); + vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) ); + uv = uv * LUT_SCALE + LUT_BIAS; + return uv; +} +float LTC_ClippedSphereFormFactor( const in vec3 f ) { + float l = length( f ); + return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 ); +} +vec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) { + float x = dot( v1, v2 ); + float y = abs( x ); + float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y; + float b = 3.4175940 + ( 4.1616724 + y ) * y; + float v = a / b; + float theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v; + return cross( v1, v2 ) * theta_sintheta; +} +vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) { + vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ]; + vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ]; + vec3 lightNormal = cross( v1, v2 ); + if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 ); + vec3 T1, T2; + T1 = normalize( V - N * dot( V, N ) ); + T2 = - cross( N, T1 ); + mat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) ); + vec3 coords[ 4 ]; + coords[ 0 ] = mat * ( rectCoords[ 0 ] - P ); + coords[ 1 ] = mat * ( rectCoords[ 1 ] - P ); + coords[ 2 ] = mat * ( rectCoords[ 2 ] - P ); + coords[ 3 ] = mat * ( rectCoords[ 3 ] - P ); + coords[ 0 ] = normalize( coords[ 0 ] ); + coords[ 1 ] = normalize( coords[ 1 ] ); + coords[ 2 ] = normalize( coords[ 2 ] ); + coords[ 3 ] = normalize( coords[ 3 ] ); + vec3 vectorFormFactor = vec3( 0.0 ); + vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] ); + vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] ); + vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] ); + vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] ); + float result = LTC_ClippedSphereFormFactor( vectorFormFactor ); + return vec3( result ); +} +#if defined( USE_SHEEN ) +float D_Charlie( float roughness, float dotNH ) { + float alpha = pow2( roughness ); + float invAlpha = 1.0 / alpha; + float cos2h = dotNH * dotNH; + float sin2h = max( 1.0 - cos2h, 0.0078125 ); + return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI ); +} +float V_Neubelt( float dotNV, float dotNL ) { + return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) ); +} +vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) { + vec3 halfDir = normalize( lightDir + viewDir ); + float dotNL = saturate( dot( normal, lightDir ) ); + float dotNV = saturate( dot( normal, viewDir ) ); + float dotNH = saturate( dot( normal, halfDir ) ); + float D = D_Charlie( sheenRoughness, dotNH ); + float V = V_Neubelt( dotNV, dotNL ); + return sheenColor * ( D * V ); +} +#endif +float IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { + float dotNV = saturate( dot( normal, viewDir ) ); + float r2 = roughness * roughness; + float a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95; + float b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72; + float DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) ); + return saturate( DG * RECIPROCAL_PI ); +} +vec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { + float dotNV = saturate( dot( normal, viewDir ) ); + const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 ); + const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 ); + vec4 r = roughness * c0 + c1; + float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y; + vec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw; + return fab; +} +vec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) { + vec2 fab = DFGApprox( normal, viewDir, roughness ); + return specularColor * fab.x + specularF90 * fab.y; +} +#ifdef USE_IRIDESCENCE +void computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) { +#else +void computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) { +#endif + vec2 fab = DFGApprox( normal, viewDir, roughness ); + #ifdef USE_IRIDESCENCE + vec3 Fr = mix( specularColor, iridescenceF0, iridescence ); + #else + vec3 Fr = specularColor; + #endif + vec3 FssEss = Fr * fab.x + specularF90 * fab.y; + float Ess = fab.x + fab.y; + float Ems = 1.0 - Ess; + vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619; vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg ); + singleScatter += FssEss; + multiScatter += Fms * Ems; +} +#if NUM_RECT_AREA_LIGHTS > 0 + void RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { + vec3 normal = geometryNormal; + vec3 viewDir = geometryViewDir; + vec3 position = geometryPosition; + vec3 lightPos = rectAreaLight.position; + vec3 halfWidth = rectAreaLight.halfWidth; + vec3 halfHeight = rectAreaLight.halfHeight; + vec3 lightColor = rectAreaLight.color; + float roughness = material.roughness; + vec3 rectCoords[ 4 ]; + rectCoords[ 0 ] = lightPos + halfWidth - halfHeight; rectCoords[ 1 ] = lightPos - halfWidth - halfHeight; + rectCoords[ 2 ] = lightPos - halfWidth + halfHeight; + rectCoords[ 3 ] = lightPos + halfWidth + halfHeight; + vec2 uv = LTC_Uv( normal, viewDir, roughness ); + vec4 t1 = texture2D( ltc_1, uv ); + vec4 t2 = texture2D( ltc_2, uv ); + mat3 mInv = mat3( + vec3( t1.x, 0, t1.y ), + vec3( 0, 1, 0 ), + vec3( t1.z, 0, t1.w ) + ); + vec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y ); + reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords ); + reflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords ); + } +#endif +void RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { + float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); + vec3 irradiance = dotNL * directLight.color; + #ifdef USE_CLEARCOAT + float dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) ); + vec3 ccIrradiance = dotNLcc * directLight.color; + clearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material ); + #endif + #ifdef USE_SHEEN + sheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness ); + #endif + reflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material ); + reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +void RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { + reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) { + #ifdef USE_CLEARCOAT + clearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness ); + #endif + #ifdef USE_SHEEN + sheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ); + #endif + vec3 singleScattering = vec3( 0.0 ); + vec3 multiScattering = vec3( 0.0 ); + vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI; + #ifdef USE_IRIDESCENCE + computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering ); + #else + computeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering ); + #endif + vec3 totalScattering = singleScattering + multiScattering; + vec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) ); + reflectedLight.indirectSpecular += radiance * singleScattering; + reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance; + reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance; +} +#define RE_Direct RE_Direct_Physical +#define RE_Direct_RectArea RE_Direct_RectArea_Physical +#define RE_IndirectDiffuse RE_IndirectDiffuse_Physical +#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 ); +}`,hN=` +vec3 geometryPosition = - vViewPosition; +vec3 geometryNormal = normal; +vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); +vec3 geometryClearcoatNormal = vec3( 0.0 ); +#ifdef USE_CLEARCOAT + geometryClearcoatNormal = clearcoatNormal; +#endif +#ifdef USE_IRIDESCENCE + float dotNVi = saturate( dot( normal, geometryViewDir ) ); + if ( material.iridescenceThickness == 0.0 ) { + material.iridescence = 0.0; + } else { + material.iridescence = saturate( material.iridescence ); + } + if ( material.iridescence > 0.0 ) { + material.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor ); + material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi ); + } +#endif +IncidentLight directLight; +#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct ) + PointLight pointLight; + #if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0 + PointLightShadow pointLightShadow; + #endif + #pragma unroll_loop_start + for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) { + pointLight = pointLights[ i ]; + getPointLightInfo( pointLight, geometryPosition, directLight ); + #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS ) + pointLightShadow = pointLightShadows[ i ]; + directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0; + #endif + RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); + } + #pragma unroll_loop_end +#endif +#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct ) + SpotLight spotLight; + vec4 spotColor; + vec3 spotLightCoord; + bool inSpotLightMap; + #if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0 + SpotLightShadow spotLightShadow; + #endif + #pragma unroll_loop_start + for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) { + spotLight = spotLights[ i ]; + getSpotLightInfo( spotLight, geometryPosition, directLight ); + #if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) + #define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX + #elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) + #define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS + #else + #define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) + #endif + #if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS ) + spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w; + inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) ); + spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy ); + directLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color; + #endif + #undef SPOT_LIGHT_MAP_INDEX + #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) + spotLightShadow = spotLightShadows[ i ]; + directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; + #endif + RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); + } + #pragma unroll_loop_end +#endif +#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct ) + DirectionalLight directionalLight; + #if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0 + DirectionalLightShadow directionalLightShadow; + #endif + #pragma unroll_loop_start + for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) { + directionalLight = directionalLights[ i ]; + getDirectionalLightInfo( directionalLight, directLight ); + #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS ) + directionalLightShadow = directionalLightShadows[ i ]; + directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; + #endif + RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); + } + #pragma unroll_loop_end +#endif +#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea ) + RectAreaLight rectAreaLight; + #pragma unroll_loop_start + for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) { + rectAreaLight = rectAreaLights[ i ]; + RE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); + } + #pragma unroll_loop_end +#endif +#if defined( RE_IndirectDiffuse ) + vec3 iblIrradiance = vec3( 0.0 ); + vec3 irradiance = getAmbientLightIrradiance( ambientLightColor ); + #if defined( USE_LIGHT_PROBES ) + irradiance += getLightProbeIrradiance( lightProbe, geometryNormal ); + #endif + #if ( NUM_HEMI_LIGHTS > 0 ) + #pragma unroll_loop_start + for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) { + irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal ); + } + #pragma unroll_loop_end + #endif +#endif +#if defined( RE_IndirectSpecular ) + vec3 radiance = vec3( 0.0 ); + vec3 clearcoatRadiance = vec3( 0.0 ); +#endif`,uN=`#if defined( RE_IndirectDiffuse ) + #ifdef USE_LIGHTMAP + vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); + vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; + irradiance += lightMapIrradiance; + #endif + #if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV ) + iblIrradiance += getIBLIrradiance( geometryNormal ); + #endif +#endif +#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular ) + #ifdef USE_ANISOTROPY + radiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy ); + #else + radiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness ); + #endif + #ifdef USE_CLEARCOAT + clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness ); + #endif +#endif`,fN=`#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`,cN=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) + gl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; +#endif`,dN=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) + uniform float logDepthBufFC; + varying float vFragDepth; + varying float vIsPerspective; +#endif`,pN=`#ifdef USE_LOGDEPTHBUF + #ifdef USE_LOGDEPTHBUF_EXT + varying float vFragDepth; + varying float vIsPerspective; + #else + uniform float logDepthBufFC; + #endif +#endif`,vN=`#ifdef USE_LOGDEPTHBUF + #ifdef USE_LOGDEPTHBUF_EXT + vFragDepth = 1.0 + gl_Position.w; + vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); + #else + if ( isPerspectiveMatrix( projectionMatrix ) ) { + gl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0; + gl_Position.z *= gl_Position.w; + } + #endif +#endif`,mN=`#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`,gN=`#ifdef USE_MAP + uniform sampler2D map; +#endif`,yN=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) + #if defined( USE_POINTS_UV ) + vec2 uv = vUv; + #else + vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy; + #endif +#endif +#ifdef USE_MAP + diffuseColor *= texture2D( map, uv ); +#endif +#ifdef USE_ALPHAMAP + diffuseColor.a *= texture2D( alphaMap, uv ).g; +#endif`,xN=`#if defined( USE_POINTS_UV ) + varying vec2 vUv; +#else + #if defined( USE_MAP ) || defined( USE_ALPHAMAP ) + uniform mat3 uvTransform; + #endif +#endif +#ifdef USE_MAP + uniform sampler2D map; +#endif +#ifdef USE_ALPHAMAP + uniform sampler2D alphaMap; +#endif`,SN=`float metalnessFactor = metalness; +#ifdef USE_METALNESSMAP + vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv ); + metalnessFactor *= texelMetalness.b; +#endif`,TN=`#ifdef USE_METALNESSMAP + uniform sampler2D metalnessMap; +#endif`,EN=`#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE ) + vColor *= morphTargetBaseInfluence; + for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { + #if defined( USE_COLOR_ALPHA ) + if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ]; + #elif defined( USE_COLOR ) + if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ]; + #endif + } +#endif`,MN=`#ifdef USE_MORPHNORMALS + objectNormal *= morphTargetBaseInfluence; + #ifdef MORPHTARGETS_TEXTURE + for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { + if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ]; + } + #else + objectNormal += morphNormal0 * morphTargetInfluences[ 0 ]; + objectNormal += morphNormal1 * morphTargetInfluences[ 1 ]; + objectNormal += morphNormal2 * morphTargetInfluences[ 2 ]; + objectNormal += morphNormal3 * morphTargetInfluences[ 3 ]; + #endif +#endif`,CN=`#ifdef USE_MORPHTARGETS + uniform float morphTargetBaseInfluence; + #ifdef MORPHTARGETS_TEXTURE + uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ]; + uniform sampler2DArray morphTargetsTexture; + uniform ivec2 morphTargetsTextureSize; + vec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) { + int texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset; + int y = texelIndex / morphTargetsTextureSize.x; + int x = texelIndex - y * morphTargetsTextureSize.x; + ivec3 morphUV = ivec3( x, y, morphTargetIndex ); + return texelFetch( morphTargetsTexture, morphUV, 0 ); + } + #else + #ifndef USE_MORPHNORMALS + uniform float morphTargetInfluences[ 8 ]; + #else + uniform float morphTargetInfluences[ 4 ]; + #endif + #endif +#endif`,AN=`#ifdef USE_MORPHTARGETS + transformed *= morphTargetBaseInfluence; + #ifdef MORPHTARGETS_TEXTURE + for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { + if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ]; + } + #else + transformed += morphTarget0 * morphTargetInfluences[ 0 ]; + transformed += morphTarget1 * morphTargetInfluences[ 1 ]; + transformed += morphTarget2 * morphTargetInfluences[ 2 ]; + transformed += morphTarget3 * morphTargetInfluences[ 3 ]; + #ifndef USE_MORPHNORMALS + transformed += morphTarget4 * morphTargetInfluences[ 4 ]; + transformed += morphTarget5 * morphTargetInfluences[ 5 ]; + transformed += morphTarget6 * morphTargetInfluences[ 6 ]; + transformed += morphTarget7 * morphTargetInfluences[ 7 ]; + #endif + #endif +#endif`,wN=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; +#ifdef FLAT_SHADED + vec3 fdx = dFdx( vViewPosition ); + vec3 fdy = dFdy( vViewPosition ); + vec3 normal = normalize( cross( fdx, fdy ) ); +#else + vec3 normal = normalize( vNormal ); + #ifdef DOUBLE_SIDED + normal *= faceDirection; + #endif +#endif +#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) + #ifdef USE_TANGENT + mat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); + #else + mat3 tbn = getTangentFrame( - vViewPosition, normal, + #if defined( USE_NORMALMAP ) + vNormalMapUv + #elif defined( USE_CLEARCOAT_NORMALMAP ) + vClearcoatNormalMapUv + #else + vUv + #endif + ); + #endif + #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED ) + tbn[0] *= faceDirection; + tbn[1] *= faceDirection; + #endif +#endif +#ifdef USE_CLEARCOAT_NORMALMAP + #ifdef USE_TANGENT + mat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); + #else + mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv ); + #endif + #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED ) + tbn2[0] *= faceDirection; + tbn2[1] *= faceDirection; + #endif +#endif +vec3 nonPerturbedNormal = normal;`,PN=`#ifdef USE_NORMALMAP_OBJECTSPACE + normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; + #ifdef FLIP_SIDED + normal = - normal; + #endif + #ifdef DOUBLE_SIDED + normal = normal * faceDirection; + #endif + normal = normalize( normalMatrix * normal ); +#elif defined( USE_NORMALMAP_TANGENTSPACE ) + vec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; + mapN.xy *= normalScale; + normal = normalize( tbn * mapN ); +#elif defined( USE_BUMPMAP ) + normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); +#endif`,RN=`#ifndef FLAT_SHADED + varying vec3 vNormal; + #ifdef USE_TANGENT + varying vec3 vTangent; + varying vec3 vBitangent; + #endif +#endif`,LN=`#ifndef FLAT_SHADED + varying vec3 vNormal; + #ifdef USE_TANGENT + varying vec3 vTangent; + varying vec3 vBitangent; + #endif +#endif`,bN=`#ifndef FLAT_SHADED + vNormal = normalize( transformedNormal ); + #ifdef USE_TANGENT + vTangent = normalize( transformedTangent ); + vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); + #endif +#endif`,FN=`#ifdef USE_NORMALMAP + uniform sampler2D normalMap; + uniform vec2 normalScale; +#endif +#ifdef USE_NORMALMAP_OBJECTSPACE + uniform mat3 normalMatrix; +#endif +#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) ) + mat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) { + vec3 q0 = dFdx( eye_pos.xyz ); + vec3 q1 = dFdy( eye_pos.xyz ); + vec2 st0 = dFdx( uv.st ); + vec2 st1 = dFdy( uv.st ); + vec3 N = surf_norm; + vec3 q1perp = cross( q1, N ); + vec3 q0perp = cross( N, q0 ); + vec3 T = q1perp * st0.x + q0perp * st1.x; + vec3 B = q1perp * st0.y + q0perp * st1.y; + float det = max( dot( T, T ), dot( B, B ) ); + float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det ); + return mat3( T * scale, B * scale, N ); + } +#endif`,ON=`#ifdef USE_CLEARCOAT + vec3 clearcoatNormal = nonPerturbedNormal; +#endif`,DN=`#ifdef USE_CLEARCOAT_NORMALMAP + vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0; + clearcoatMapN.xy *= clearcoatNormalScale; + clearcoatNormal = normalize( tbn2 * clearcoatMapN ); +#endif`,IN=`#ifdef USE_CLEARCOATMAP + uniform sampler2D clearcoatMap; +#endif +#ifdef USE_CLEARCOAT_NORMALMAP + uniform sampler2D clearcoatNormalMap; + uniform vec2 clearcoatNormalScale; +#endif +#ifdef USE_CLEARCOAT_ROUGHNESSMAP + uniform sampler2D clearcoatRoughnessMap; +#endif`,NN=`#ifdef USE_IRIDESCENCEMAP + uniform sampler2D iridescenceMap; +#endif +#ifdef USE_IRIDESCENCE_THICKNESSMAP + uniform sampler2D iridescenceThicknessMap; +#endif`,BN=`#ifdef OPAQUE +diffuseColor.a = 1.0; +#endif +#ifdef USE_TRANSMISSION +diffuseColor.a *= material.transmissionAlpha; +#endif +gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,UN=`vec3 packNormalToRGB( const in vec3 normal ) { + return normalize( normal ) * 0.5 + 0.5; +} +vec3 unpackRGBToNormal( const in vec3 rgb ) { + return 2.0 * rgb.xyz - 1.0; +} +const float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.; +const vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. ); +const vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. ); +const float ShiftRight8 = 1. / 256.; +vec4 packDepthToRGBA( const in float v ) { + vec4 r = vec4( fract( v * PackFactors ), v ); + r.yzw -= r.xyz * ShiftRight8; return r * PackUpscale; +} +float unpackRGBAToDepth( const in vec4 v ) { + return dot( v, UnpackFactors ); +} +vec2 packDepthToRG( in highp float v ) { + return packDepthToRGBA( v ).yx; +} +float unpackRGToDepth( const in highp vec2 v ) { + return unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) ); +} +vec4 pack2HalfToRGBA( vec2 v ) { + vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) ); + return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w ); +} +vec2 unpackRGBATo2Half( vec4 v ) { + return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) ); +} +float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) { + return ( viewZ + near ) / ( near - far ); +} +float orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) { + return depth * ( near - far ) - near; +} +float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) { + return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ ); +} +float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) { + return ( near * far ) / ( ( far - near ) * depth - far ); +}`,zN=`#ifdef PREMULTIPLIED_ALPHA + gl_FragColor.rgb *= gl_FragColor.a; +#endif`,GN=`vec4 mvPosition = vec4( transformed, 1.0 ); +#ifdef USE_BATCHING + mvPosition = batchingMatrix * mvPosition; +#endif +#ifdef USE_INSTANCING + mvPosition = instanceMatrix * mvPosition; +#endif +mvPosition = modelViewMatrix * mvPosition; +gl_Position = projectionMatrix * mvPosition;`,VN=`#ifdef DITHERING + gl_FragColor.rgb = dithering( gl_FragColor.rgb ); +#endif`,HN=`#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`,WN=`float roughnessFactor = roughness; +#ifdef USE_ROUGHNESSMAP + vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv ); + roughnessFactor *= texelRoughness.g; +#endif`,XN=`#ifdef USE_ROUGHNESSMAP + uniform sampler2D roughnessMap; +#endif`,YN=`#if NUM_SPOT_LIGHT_COORDS > 0 + varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; +#endif +#if NUM_SPOT_LIGHT_MAPS > 0 + uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ]; +#endif +#ifdef USE_SHADOWMAP + #if NUM_DIR_LIGHT_SHADOWS > 0 + uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ]; + varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; + struct DirectionalLightShadow { + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + }; + uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; + #endif + #if NUM_SPOT_LIGHT_SHADOWS > 0 + uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ]; + struct SpotLightShadow { + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + }; + uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; + #endif + #if NUM_POINT_LIGHT_SHADOWS > 0 + uniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ]; + varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; + struct PointLightShadow { + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + float shadowCameraNear; + float shadowCameraFar; + }; + uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; + #endif + float texture2DCompare( sampler2D depths, vec2 uv, float compare ) { + return step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) ); + } + vec2 texture2DDistribution( sampler2D shadow, vec2 uv ) { + return unpackRGBATo2Half( texture2D( shadow, uv ) ); + } + float VSMShadow (sampler2D shadow, vec2 uv, float compare ){ + float occlusion = 1.0; + vec2 distribution = texture2DDistribution( shadow, uv ); + float hard_shadow = step( compare , distribution.x ); + if (hard_shadow != 1.0 ) { + float distance = compare - distribution.x ; + float variance = max( 0.00000, distribution.y * distribution.y ); + float softness_probability = variance / (variance + distance * distance ); softness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 ); occlusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 ); + } + return occlusion; + } + float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) { + float shadow = 1.0; + shadowCoord.xyz /= shadowCoord.w; + shadowCoord.z += shadowBias; + bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0; + bool frustumTest = inFrustum && shadowCoord.z <= 1.0; + if ( frustumTest ) { + #if defined( SHADOWMAP_TYPE_PCF ) + vec2 texelSize = vec2( 1.0 ) / shadowMapSize; + float dx0 = - texelSize.x * shadowRadius; + float dy0 = - texelSize.y * shadowRadius; + float dx1 = + texelSize.x * shadowRadius; + float dy1 = + texelSize.y * shadowRadius; + float dx2 = dx0 / 2.0; + float dy2 = dy0 / 2.0; + float dx3 = dx1 / 2.0; + float dy3 = dy1 / 2.0; + shadow = ( + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z ) + ) * ( 1.0 / 17.0 ); + #elif defined( SHADOWMAP_TYPE_PCF_SOFT ) + vec2 texelSize = vec2( 1.0 ) / shadowMapSize; + float dx = texelSize.x; + float dy = texelSize.y; + vec2 uv = shadowCoord.xy; + vec2 f = fract( uv * shadowMapSize + 0.5 ); + uv -= f * texelSize; + shadow = ( + texture2DCompare( shadowMap, uv, shadowCoord.z ) + + texture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) + + texture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) + + mix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ), + f.x ) + + mix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ), + f.x ) + + mix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ), + f.y ) + + mix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ), + f.y ) + + mix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ), + f.x ), + mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ), + f.x ), + f.y ) + ) * ( 1.0 / 9.0 ); + #elif defined( SHADOWMAP_TYPE_VSM ) + shadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z ); + #else + shadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ); + #endif + } + return shadow; + } + vec2 cubeToUV( vec3 v, float texelSizeY ) { + vec3 absV = abs( v ); + float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) ); + absV *= scaleToCube; + v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY ); + vec2 planar = v.xy; + float almostATexel = 1.5 * texelSizeY; + float almostOne = 1.0 - almostATexel; + if ( absV.z >= almostOne ) { + if ( v.z > 0.0 ) + planar.x = 4.0 - v.x; + } else if ( absV.x >= almostOne ) { + float signX = sign( v.x ); + planar.x = v.z * signX + 2.0 * signX; + } else if ( absV.y >= almostOne ) { + float signY = sign( v.y ); + planar.x = v.x + 2.0 * signY + 2.0; + planar.y = v.z * signY - 2.0; + } + return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 ); + } + float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) { + vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) ); + vec3 lightToPosition = shadowCoord.xyz; + float dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear ); dp += shadowBias; + vec3 bd3D = normalize( lightToPosition ); + #if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM ) + vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y; + return ( + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp ) + ) * ( 1.0 / 9.0 ); + #else + return texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ); + #endif + } +#endif`,kN=`#if NUM_SPOT_LIGHT_COORDS > 0 + uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ]; + varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; +#endif +#ifdef USE_SHADOWMAP + #if NUM_DIR_LIGHT_SHADOWS > 0 + uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ]; + varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; + struct DirectionalLightShadow { + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + }; + uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; + #endif + #if NUM_SPOT_LIGHT_SHADOWS > 0 + struct SpotLightShadow { + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + }; + uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; + #endif + #if NUM_POINT_LIGHT_SHADOWS > 0 + uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ]; + varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; + struct PointLightShadow { + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + float shadowCameraNear; + float shadowCameraFar; + }; + uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; + #endif +#endif`,KN=`#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 +#if defined( USE_SHADOWMAP ) + #if NUM_DIR_LIGHT_SHADOWS > 0 + #pragma unroll_loop_start + for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { + shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 ); + vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition; + } + #pragma unroll_loop_end + #endif + #if NUM_POINT_LIGHT_SHADOWS > 0 + #pragma unroll_loop_start + for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { + shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 ); + vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition; + } + #pragma unroll_loop_end + #endif +#endif +#if NUM_SPOT_LIGHT_COORDS > 0 + #pragma unroll_loop_start + for ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) { + shadowWorldPosition = worldPosition; + #if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) + shadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias; + #endif + vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition; + } + #pragma unroll_loop_end +#endif`,jN=`float getShadowMask() { + float shadow = 1.0; + #ifdef USE_SHADOWMAP + #if NUM_DIR_LIGHT_SHADOWS > 0 + DirectionalLightShadow directionalLight; + #pragma unroll_loop_start + for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { + directionalLight = directionalLightShadows[ i ]; + shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; + } + #pragma unroll_loop_end + #endif + #if NUM_SPOT_LIGHT_SHADOWS > 0 + SpotLightShadow spotLight; + #pragma unroll_loop_start + for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) { + spotLight = spotLightShadows[ i ]; + shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; + } + #pragma unroll_loop_end + #endif + #if NUM_POINT_LIGHT_SHADOWS > 0 + PointLightShadow pointLight; + #pragma unroll_loop_start + for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { + pointLight = pointLightShadows[ i ]; + shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0; + } + #pragma unroll_loop_end + #endif + #endif + return shadow; +}`,ZN=`#ifdef USE_SKINNING + mat4 boneMatX = getBoneMatrix( skinIndex.x ); + mat4 boneMatY = getBoneMatrix( skinIndex.y ); + mat4 boneMatZ = getBoneMatrix( skinIndex.z ); + mat4 boneMatW = getBoneMatrix( skinIndex.w ); +#endif`,JN=`#ifdef USE_SKINNING + uniform mat4 bindMatrix; + uniform mat4 bindMatrixInverse; + uniform highp sampler2D boneTexture; + mat4 getBoneMatrix( const in float i ) { + int size = textureSize( boneTexture, 0 ).x; + int j = int( i ) * 4; + int x = j % size; + int y = j / size; + vec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 ); + vec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 ); + vec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 ); + vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 ); + return mat4( v1, v2, v3, v4 ); + } +#endif`,$N=`#ifdef USE_SKINNING + vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); + vec4 skinned = vec4( 0.0 ); + skinned += boneMatX * skinVertex * skinWeight.x; + skinned += boneMatY * skinVertex * skinWeight.y; + skinned += boneMatZ * skinVertex * skinWeight.z; + skinned += boneMatW * skinVertex * skinWeight.w; + transformed = ( bindMatrixInverse * skinned ).xyz; +#endif`,QN=`#ifdef USE_SKINNING + mat4 skinMatrix = mat4( 0.0 ); + skinMatrix += skinWeight.x * boneMatX; + skinMatrix += skinWeight.y * boneMatY; + skinMatrix += skinWeight.z * boneMatZ; + skinMatrix += skinWeight.w * boneMatW; + skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix; + objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz; + #ifdef USE_TANGENT + objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; + #endif +#endif`,_N=`float specularStrength; +#ifdef USE_SPECULARMAP + vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv ); + specularStrength = texelSpecular.r; +#else + specularStrength = 1.0; +#endif`,qN=`#ifdef USE_SPECULARMAP + uniform sampler2D specularMap; +#endif`,tB=`#if defined( TONE_MAPPING ) + gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); +#endif`,eB=`#ifndef saturate +#define saturate( a ) clamp( a, 0.0, 1.0 ) +#endif +uniform float toneMappingExposure; +vec3 LinearToneMapping( vec3 color ) { + return saturate( toneMappingExposure * color ); +} +vec3 ReinhardToneMapping( vec3 color ) { + color *= toneMappingExposure; + return saturate( color / ( vec3( 1.0 ) + color ) ); +} +vec3 OptimizedCineonToneMapping( vec3 color ) { + color *= toneMappingExposure; + color = max( vec3( 0.0 ), color - 0.004 ); + return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) ); +} +vec3 RRTAndODTFit( vec3 v ) { + vec3 a = v * ( v + 0.0245786 ) - 0.000090537; + vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081; + return a / b; +} +vec3 ACESFilmicToneMapping( vec3 color ) { + const mat3 ACESInputMat = mat3( + vec3( 0.59719, 0.07600, 0.02840 ), vec3( 0.35458, 0.90834, 0.13383 ), + vec3( 0.04823, 0.01566, 0.83777 ) + ); + const mat3 ACESOutputMat = mat3( + vec3( 1.60475, -0.10208, -0.00327 ), vec3( -0.53108, 1.10813, -0.07276 ), + vec3( -0.07367, -0.00605, 1.07602 ) + ); + color *= toneMappingExposure / 0.6; + color = ACESInputMat * color; + color = RRTAndODTFit( color ); + color = ACESOutputMat * color; + return saturate( color ); +} +const mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3( + vec3( 1.6605, - 0.1246, - 0.0182 ), + vec3( - 0.5876, 1.1329, - 0.1006 ), + vec3( - 0.0728, - 0.0083, 1.1187 ) +); +const mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3( + vec3( 0.6274, 0.0691, 0.0164 ), + vec3( 0.3293, 0.9195, 0.0880 ), + vec3( 0.0433, 0.0113, 0.8956 ) +); +vec3 agxDefaultContrastApprox( vec3 x ) { + vec3 x2 = x * x; + vec3 x4 = x2 * x2; + return + 15.5 * x4 * x2 + - 40.14 * x4 * x + + 31.96 * x4 + - 6.868 * x2 * x + + 0.4298 * x2 + + 0.1191 * x + - 0.00232; +} +vec3 AgXToneMapping( vec3 color ) { + const mat3 AgXInsetMatrix = mat3( + vec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ), + vec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ), + vec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 ) + ); + const mat3 AgXOutsetMatrix = mat3( + vec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ), + vec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ), + vec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 ) + ); + const float AgxMinEv = - 12.47393; const float AgxMaxEv = 4.026069; + color *= toneMappingExposure; + color = LINEAR_SRGB_TO_LINEAR_REC2020 * color; + color = AgXInsetMatrix * color; + color = max( color, 1e-10 ); color = log2( color ); + color = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv ); + color = clamp( color, 0.0, 1.0 ); + color = agxDefaultContrastApprox( color ); + color = AgXOutsetMatrix * color; + color = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) ); + color = LINEAR_REC2020_TO_LINEAR_SRGB * color; + color = clamp( color, 0.0, 1.0 ); + return color; +} +vec3 CustomToneMapping( vec3 color ) { return color; }`,iB=`#ifdef USE_TRANSMISSION + material.transmission = transmission; + material.transmissionAlpha = 1.0; + material.thickness = thickness; + material.attenuationDistance = attenuationDistance; + material.attenuationColor = attenuationColor; + #ifdef USE_TRANSMISSIONMAP + material.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r; + #endif + #ifdef USE_THICKNESSMAP + material.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g; + #endif + vec3 pos = vWorldPosition; + vec3 v = normalize( cameraPosition - pos ); + vec3 n = inverseTransformDirection( normal, viewMatrix ); + vec4 transmitted = getIBLVolumeRefraction( + n, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90, + pos, modelMatrix, viewMatrix, projectionMatrix, material.ior, material.thickness, + material.attenuationColor, material.attenuationDistance ); + material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission ); + totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission ); +#endif`,nB=`#ifdef USE_TRANSMISSION + uniform float transmission; + uniform float thickness; + uniform float attenuationDistance; + uniform vec3 attenuationColor; + #ifdef USE_TRANSMISSIONMAP + uniform sampler2D transmissionMap; + #endif + #ifdef USE_THICKNESSMAP + uniform sampler2D thicknessMap; + #endif + uniform vec2 transmissionSamplerSize; + uniform sampler2D transmissionSamplerMap; + uniform mat4 modelMatrix; + uniform mat4 projectionMatrix; + varying vec3 vWorldPosition; + float w0( float a ) { + return ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 ); + } + float w1( float a ) { + return ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 ); + } + float w2( float a ){ + return ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 ); + } + float w3( float a ) { + return ( 1.0 / 6.0 ) * ( a * a * a ); + } + float g0( float a ) { + return w0( a ) + w1( a ); + } + float g1( float a ) { + return w2( a ) + w3( a ); + } + float h0( float a ) { + return - 1.0 + w1( a ) / ( w0( a ) + w1( a ) ); + } + float h1( float a ) { + return 1.0 + w3( a ) / ( w2( a ) + w3( a ) ); + } + vec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) { + uv = uv * texelSize.zw + 0.5; + vec2 iuv = floor( uv ); + vec2 fuv = fract( uv ); + float g0x = g0( fuv.x ); + float g1x = g1( fuv.x ); + float h0x = h0( fuv.x ); + float h1x = h1( fuv.x ); + float h0y = h0( fuv.y ); + float h1y = h1( fuv.y ); + vec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; + vec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; + vec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; + vec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; + return g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) + + g1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) ); + } + vec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) { + vec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) ); + vec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) ); + vec2 fLodSizeInv = 1.0 / fLodSize; + vec2 cLodSizeInv = 1.0 / cLodSize; + vec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) ); + vec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) ); + return mix( fSample, cSample, fract( lod ) ); + } + vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) { + vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior ); + vec3 modelScale; + modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) ); + modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) ); + modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) ); + return normalize( refractionVector ) * thickness * modelScale; + } + float applyIorToRoughness( const in float roughness, const in float ior ) { + return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 ); + } + vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) { + float lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior ); + return textureBicubic( transmissionSamplerMap, fragCoord.xy, lod ); + } + vec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) { + if ( isinf( attenuationDistance ) ) { + return vec3( 1.0 ); + } else { + vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance; + vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance ); return transmittance; + } + } + vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor, + const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix, + const in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness, + const in vec3 attenuationColor, const in float attenuationDistance ) { + vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix ); + vec3 refractedRayExit = position + transmissionRay; + vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 ); + vec2 refractionCoords = ndcPos.xy / ndcPos.w; + refractionCoords += 1.0; + refractionCoords /= 2.0; + vec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior ); + vec3 transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance ); + vec3 attenuatedColor = transmittance * transmittedLight.rgb; + vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness ); + float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0; + return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor ); + } +#endif`,rB=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) + varying vec2 vUv; +#endif +#ifdef USE_MAP + varying vec2 vMapUv; +#endif +#ifdef USE_ALPHAMAP + varying vec2 vAlphaMapUv; +#endif +#ifdef USE_LIGHTMAP + varying vec2 vLightMapUv; +#endif +#ifdef USE_AOMAP + varying vec2 vAoMapUv; +#endif +#ifdef USE_BUMPMAP + varying vec2 vBumpMapUv; +#endif +#ifdef USE_NORMALMAP + varying vec2 vNormalMapUv; +#endif +#ifdef USE_EMISSIVEMAP + varying vec2 vEmissiveMapUv; +#endif +#ifdef USE_METALNESSMAP + varying vec2 vMetalnessMapUv; +#endif +#ifdef USE_ROUGHNESSMAP + varying vec2 vRoughnessMapUv; +#endif +#ifdef USE_ANISOTROPYMAP + varying vec2 vAnisotropyMapUv; +#endif +#ifdef USE_CLEARCOATMAP + varying vec2 vClearcoatMapUv; +#endif +#ifdef USE_CLEARCOAT_NORMALMAP + varying vec2 vClearcoatNormalMapUv; +#endif +#ifdef USE_CLEARCOAT_ROUGHNESSMAP + varying vec2 vClearcoatRoughnessMapUv; +#endif +#ifdef USE_IRIDESCENCEMAP + varying vec2 vIridescenceMapUv; +#endif +#ifdef USE_IRIDESCENCE_THICKNESSMAP + varying vec2 vIridescenceThicknessMapUv; +#endif +#ifdef USE_SHEEN_COLORMAP + varying vec2 vSheenColorMapUv; +#endif +#ifdef USE_SHEEN_ROUGHNESSMAP + varying vec2 vSheenRoughnessMapUv; +#endif +#ifdef USE_SPECULARMAP + varying vec2 vSpecularMapUv; +#endif +#ifdef USE_SPECULAR_COLORMAP + varying vec2 vSpecularColorMapUv; +#endif +#ifdef USE_SPECULAR_INTENSITYMAP + varying vec2 vSpecularIntensityMapUv; +#endif +#ifdef USE_TRANSMISSIONMAP + uniform mat3 transmissionMapTransform; + varying vec2 vTransmissionMapUv; +#endif +#ifdef USE_THICKNESSMAP + uniform mat3 thicknessMapTransform; + varying vec2 vThicknessMapUv; +#endif`,sB=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) + varying vec2 vUv; +#endif +#ifdef USE_MAP + uniform mat3 mapTransform; + varying vec2 vMapUv; +#endif +#ifdef USE_ALPHAMAP + uniform mat3 alphaMapTransform; + varying vec2 vAlphaMapUv; +#endif +#ifdef USE_LIGHTMAP + uniform mat3 lightMapTransform; + varying vec2 vLightMapUv; +#endif +#ifdef USE_AOMAP + uniform mat3 aoMapTransform; + varying vec2 vAoMapUv; +#endif +#ifdef USE_BUMPMAP + uniform mat3 bumpMapTransform; + varying vec2 vBumpMapUv; +#endif +#ifdef USE_NORMALMAP + uniform mat3 normalMapTransform; + varying vec2 vNormalMapUv; +#endif +#ifdef USE_DISPLACEMENTMAP + uniform mat3 displacementMapTransform; + varying vec2 vDisplacementMapUv; +#endif +#ifdef USE_EMISSIVEMAP + uniform mat3 emissiveMapTransform; + varying vec2 vEmissiveMapUv; +#endif +#ifdef USE_METALNESSMAP + uniform mat3 metalnessMapTransform; + varying vec2 vMetalnessMapUv; +#endif +#ifdef USE_ROUGHNESSMAP + uniform mat3 roughnessMapTransform; + varying vec2 vRoughnessMapUv; +#endif +#ifdef USE_ANISOTROPYMAP + uniform mat3 anisotropyMapTransform; + varying vec2 vAnisotropyMapUv; +#endif +#ifdef USE_CLEARCOATMAP + uniform mat3 clearcoatMapTransform; + varying vec2 vClearcoatMapUv; +#endif +#ifdef USE_CLEARCOAT_NORMALMAP + uniform mat3 clearcoatNormalMapTransform; + varying vec2 vClearcoatNormalMapUv; +#endif +#ifdef USE_CLEARCOAT_ROUGHNESSMAP + uniform mat3 clearcoatRoughnessMapTransform; + varying vec2 vClearcoatRoughnessMapUv; +#endif +#ifdef USE_SHEEN_COLORMAP + uniform mat3 sheenColorMapTransform; + varying vec2 vSheenColorMapUv; +#endif +#ifdef USE_SHEEN_ROUGHNESSMAP + uniform mat3 sheenRoughnessMapTransform; + varying vec2 vSheenRoughnessMapUv; +#endif +#ifdef USE_IRIDESCENCEMAP + uniform mat3 iridescenceMapTransform; + varying vec2 vIridescenceMapUv; +#endif +#ifdef USE_IRIDESCENCE_THICKNESSMAP + uniform mat3 iridescenceThicknessMapTransform; + varying vec2 vIridescenceThicknessMapUv; +#endif +#ifdef USE_SPECULARMAP + uniform mat3 specularMapTransform; + varying vec2 vSpecularMapUv; +#endif +#ifdef USE_SPECULAR_COLORMAP + uniform mat3 specularColorMapTransform; + varying vec2 vSpecularColorMapUv; +#endif +#ifdef USE_SPECULAR_INTENSITYMAP + uniform mat3 specularIntensityMapTransform; + varying vec2 vSpecularIntensityMapUv; +#endif +#ifdef USE_TRANSMISSIONMAP + uniform mat3 transmissionMapTransform; + varying vec2 vTransmissionMapUv; +#endif +#ifdef USE_THICKNESSMAP + uniform mat3 thicknessMapTransform; + varying vec2 vThicknessMapUv; +#endif`,aB=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) + vUv = vec3( uv, 1 ).xy; +#endif +#ifdef USE_MAP + vMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy; +#endif +#ifdef USE_ALPHAMAP + vAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_LIGHTMAP + vLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_AOMAP + vAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_BUMPMAP + vBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_NORMALMAP + vNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_DISPLACEMENTMAP + vDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_EMISSIVEMAP + vEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_METALNESSMAP + vMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_ROUGHNESSMAP + vRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_ANISOTROPYMAP + vAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_CLEARCOATMAP + vClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_CLEARCOAT_NORMALMAP + vClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_CLEARCOAT_ROUGHNESSMAP + vClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_IRIDESCENCEMAP + vIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_IRIDESCENCE_THICKNESSMAP + vIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_SHEEN_COLORMAP + vSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_SHEEN_ROUGHNESSMAP + vSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_SPECULARMAP + vSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_SPECULAR_COLORMAP + vSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_SPECULAR_INTENSITYMAP + vSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_TRANSMISSIONMAP + vTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_THICKNESSMAP + vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy; +#endif`,oB=`#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; + #endif + #ifdef USE_INSTANCING + worldPosition = instanceMatrix * worldPosition; + #endif + worldPosition = modelMatrix * worldPosition; +#endif`;const lB=`varying vec2 vUv; +uniform mat3 uvTransform; +void main() { + vUv = ( uvTransform * vec3( uv, 1 ) ).xy; + gl_Position = vec4( position.xy, 1.0, 1.0 ); +}`,hB=`uniform sampler2D t2D; +uniform float backgroundIntensity; +varying vec2 vUv; +void main() { + vec4 texColor = texture2D( t2D, vUv ); + #ifdef DECODE_VIDEO_TEXTURE + texColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w ); + #endif + texColor.rgb *= backgroundIntensity; + gl_FragColor = texColor; + #include + #include +}`,uB=`varying vec3 vWorldDirection; +#include +void main() { + vWorldDirection = transformDirection( position, modelMatrix ); + #include + #include + gl_Position.z = gl_Position.w; +}`,fB=`#ifdef ENVMAP_TYPE_CUBE + uniform samplerCube envMap; +#elif defined( ENVMAP_TYPE_CUBE_UV ) + uniform sampler2D envMap; +#endif +uniform float flipEnvMap; +uniform float backgroundBlurriness; +uniform float backgroundIntensity; +varying vec3 vWorldDirection; +#include +void main() { + #ifdef ENVMAP_TYPE_CUBE + vec4 texColor = textureCube( envMap, vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) ); + #elif defined( ENVMAP_TYPE_CUBE_UV ) + vec4 texColor = textureCubeUV( envMap, vWorldDirection, backgroundBlurriness ); + #else + vec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 ); + #endif + texColor.rgb *= backgroundIntensity; + gl_FragColor = texColor; + #include + #include +}`,cB=`varying vec3 vWorldDirection; +#include +void main() { + vWorldDirection = transformDirection( position, modelMatrix ); + #include + #include + gl_Position.z = gl_Position.w; +}`,dB=`uniform samplerCube tCube; +uniform float tFlip; +uniform float opacity; +varying vec3 vWorldDirection; +void main() { + vec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) ); + gl_FragColor = texColor; + gl_FragColor.a *= opacity; + #include + #include +}`,pB=`#include +#include +#include +#include +#include +#include +#include +#include +varying vec2 vHighPrecisionZW; +void main() { + #include + #include + #include + #ifdef USE_DISPLACEMENTMAP + #include + #include + #include + #endif + #include + #include + #include + #include + #include + #include + #include + vHighPrecisionZW = gl_Position.zw; +}`,vB=`#if DEPTH_PACKING == 3200 + uniform float opacity; +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +varying vec2 vHighPrecisionZW; +void main() { + vec4 diffuseColor = vec4( 1.0 ); + #include + #if DEPTH_PACKING == 3200 + diffuseColor.a = opacity; + #endif + #include + #include + #include + #include + #include + float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5; + #if DEPTH_PACKING == 3200 + gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity ); + #elif DEPTH_PACKING == 3201 + gl_FragColor = packDepthToRGBA( fragCoordZ ); + #endif +}`,mB=`#define DISTANCE +varying vec3 vWorldPosition; +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #ifdef USE_DISPLACEMENTMAP + #include + #include + #include + #endif + #include + #include + #include + #include + #include + #include + #include + vWorldPosition = worldPosition.xyz; +}`,gB=`#define DISTANCE +uniform vec3 referencePosition; +uniform float nearDistance; +uniform float farDistance; +varying vec3 vWorldPosition; +#include +#include +#include +#include +#include +#include +#include +#include +void main () { + vec4 diffuseColor = vec4( 1.0 ); + #include + #include + #include + #include + #include + float dist = length( vWorldPosition - referencePosition ); + dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); + dist = saturate( dist ); + gl_FragColor = packDepthToRGBA( dist ); +}`,yB=`varying vec3 vWorldDirection; +#include +void main() { + vWorldDirection = transformDirection( position, modelMatrix ); + #include + #include +}`,xB=`uniform sampler2D tEquirect; +varying vec3 vWorldDirection; +#include +void main() { + vec3 direction = normalize( vWorldDirection ); + vec2 sampleUV = equirectUv( direction ); + gl_FragColor = texture2D( tEquirect, sampleUV ); + #include + #include +}`,SB=`uniform float scale; +attribute float lineDistance; +varying float vLineDistance; +#include +#include +#include +#include +#include +#include +#include +void main() { + vLineDistance = scale * lineDistance; + #include + #include + #include + #include + #include + #include + #include + #include + #include +}`,TB=`uniform vec3 diffuse; +uniform float opacity; +uniform float dashSize; +uniform float totalSize; +varying float vLineDistance; +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + if ( mod( vLineDistance, totalSize ) > dashSize ) { + discard; + } + vec3 outgoingLight = vec3( 0.0 ); + #include + #include + #include + outgoingLight = diffuseColor.rgb; + #include + #include + #include + #include + #include +}`,EB=`#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #if defined ( USE_ENVMAP ) || defined ( USE_SKINNING ) + #include + #include + #include + #include + #include + #endif + #include + #include + #include + #include + #include + #include + #include + #include + #include +}`,MB=`uniform vec3 diffuse; +uniform float opacity; +#ifndef FLAT_SHADED + varying vec3 vNormal; +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + #include + #include + #include + #include + #include + #include + #include + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + #ifdef USE_LIGHTMAP + vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); + reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI; + #else + reflectedLight.indirectDiffuse += vec3( 1.0 ); + #endif + #include + reflectedLight.indirectDiffuse *= diffuseColor.rgb; + vec3 outgoingLight = reflectedLight.indirectDiffuse; + #include + #include + #include + #include + #include + #include + #include +}`,CB=`#define LAMBERT +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vViewPosition = - mvPosition.xyz; + #include + #include + #include + #include +}`,AB=`#define LAMBERT +uniform vec3 diffuse; +uniform vec3 emissive; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + vec3 totalEmissiveRadiance = emissive; + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; + #include + #include + #include + #include + #include + #include + #include +}`,wB=`#define MATCAP +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vViewPosition = - mvPosition.xyz; +}`,PB=`#define MATCAP +uniform vec3 diffuse; +uniform float opacity; +uniform sampler2D matcap; +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + #include + #include + #include + #include + #include + #include + #include + #include + vec3 viewDir = normalize( vViewPosition ); + vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) ); + vec3 y = cross( viewDir, x ); + vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5; + #ifdef USE_MATCAP + vec4 matcapColor = texture2D( matcap, uv ); + #else + vec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 ); + #endif + vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb; + #include + #include + #include + #include + #include + #include +}`,RB=`#define NORMAL +#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) + varying vec3 vViewPosition; +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include +#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) + vViewPosition = - mvPosition.xyz; +#endif +}`,LB=`#define NORMAL +uniform float opacity; +#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) + varying vec3 vViewPosition; +#endif +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity ); + #include + #include + #include + #include + gl_FragColor = vec4( packNormalToRGB( normal ), diffuseColor.a ); + #ifdef OPAQUE + gl_FragColor.a = 1.0; + #endif +}`,bB=`#define PHONG +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vViewPosition = - mvPosition.xyz; + #include + #include + #include + #include +}`,FB=`#define PHONG +uniform vec3 diffuse; +uniform vec3 emissive; +uniform vec3 specular; +uniform float shininess; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + vec3 totalEmissiveRadiance = emissive; + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance; + #include + #include + #include + #include + #include + #include + #include +}`,OB=`#define STANDARD +varying vec3 vViewPosition; +#ifdef USE_TRANSMISSION + varying vec3 vWorldPosition; +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vViewPosition = - mvPosition.xyz; + #include + #include + #include +#ifdef USE_TRANSMISSION + vWorldPosition = worldPosition.xyz; +#endif +}`,DB=`#define STANDARD +#ifdef PHYSICAL + #define IOR + #define USE_SPECULAR +#endif +uniform vec3 diffuse; +uniform vec3 emissive; +uniform float roughness; +uniform float metalness; +uniform float opacity; +#ifdef IOR + uniform float ior; +#endif +#ifdef USE_SPECULAR + uniform float specularIntensity; + uniform vec3 specularColor; + #ifdef USE_SPECULAR_COLORMAP + uniform sampler2D specularColorMap; + #endif + #ifdef USE_SPECULAR_INTENSITYMAP + uniform sampler2D specularIntensityMap; + #endif +#endif +#ifdef USE_CLEARCOAT + uniform float clearcoat; + uniform float clearcoatRoughness; +#endif +#ifdef USE_IRIDESCENCE + uniform float iridescence; + uniform float iridescenceIOR; + uniform float iridescenceThicknessMinimum; + uniform float iridescenceThicknessMaximum; +#endif +#ifdef USE_SHEEN + uniform vec3 sheenColor; + uniform float sheenRoughness; + #ifdef USE_SHEEN_COLORMAP + uniform sampler2D sheenColorMap; + #endif + #ifdef USE_SHEEN_ROUGHNESSMAP + uniform sampler2D sheenRoughnessMap; + #endif +#endif +#ifdef USE_ANISOTROPY + uniform vec2 anisotropyVector; + #ifdef USE_ANISOTROPYMAP + uniform sampler2D anisotropyMap; + #endif +#endif +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + vec3 totalEmissiveRadiance = emissive; + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse; + vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular; + #include + vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance; + #ifdef USE_SHEEN + float sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor ); + outgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect; + #endif + #ifdef USE_CLEARCOAT + float dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) ); + vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc ); + outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat; + #endif + #include + #include + #include + #include + #include + #include +}`,IB=`#define TOON +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vViewPosition = - mvPosition.xyz; + #include + #include + #include +}`,NB=`#define TOON +uniform vec3 diffuse; +uniform vec3 emissive; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + vec3 totalEmissiveRadiance = emissive; + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; + #include + #include + #include + #include + #include + #include +}`,BB=`uniform float size; +uniform float scale; +#include +#include +#include +#include +#include +#include +#ifdef USE_POINTS_UV + varying vec2 vUv; + uniform mat3 uvTransform; +#endif +void main() { + #ifdef USE_POINTS_UV + vUv = ( uvTransform * vec3( uv, 1 ) ).xy; + #endif + #include + #include + #include + #include + #include + gl_PointSize = size; + #ifdef USE_SIZEATTENUATION + bool isPerspective = isPerspectiveMatrix( projectionMatrix ); + if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z ); + #endif + #include + #include + #include + #include +}`,UB=`uniform vec3 diffuse; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + vec3 outgoingLight = vec3( 0.0 ); + #include + #include + #include + #include + #include + outgoingLight = diffuseColor.rgb; + #include + #include + #include + #include + #include +}`,zB=`#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include +}`,GB=`uniform vec3 color; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) ); + #include + #include + #include +}`,VB=`uniform float rotation; +uniform vec2 center; +#include +#include +#include +#include +#include +void main() { + #include + vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 ); + vec2 scale; + scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) ); + scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) ); + #ifndef USE_SIZEATTENUATION + bool isPerspective = isPerspectiveMatrix( projectionMatrix ); + if ( isPerspective ) scale *= - mvPosition.z; + #endif + vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale; + vec2 rotatedPosition; + rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y; + rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y; + mvPosition.xy += rotatedPosition; + gl_Position = projectionMatrix * mvPosition; + #include + #include + #include +}`,HB=`uniform vec3 diffuse; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + vec3 outgoingLight = vec3( 0.0 ); + #include + #include + #include + #include + #include + outgoingLight = diffuseColor.rgb; + #include + #include + #include + #include +}`,ti={alphahash_fragment:h9,alphahash_pars_fragment:u9,alphamap_fragment:f9,alphamap_pars_fragment:c9,alphatest_fragment:d9,alphatest_pars_fragment:p9,aomap_fragment:v9,aomap_pars_fragment:m9,batching_pars_vertex:g9,batching_vertex:y9,begin_vertex:x9,beginnormal_vertex:S9,bsdfs:T9,iridescence_fragment:E9,bumpmap_pars_fragment:M9,clipping_planes_fragment:C9,clipping_planes_pars_fragment:A9,clipping_planes_pars_vertex:w9,clipping_planes_vertex:P9,color_fragment:R9,color_pars_fragment:L9,color_pars_vertex:b9,color_vertex:F9,common:O9,cube_uv_reflection_fragment:D9,defaultnormal_vertex:I9,displacementmap_pars_vertex:N9,displacementmap_vertex:B9,emissivemap_fragment:U9,emissivemap_pars_fragment:z9,colorspace_fragment:G9,colorspace_pars_fragment:V9,envmap_fragment:H9,envmap_common_pars_fragment:W9,envmap_pars_fragment:X9,envmap_pars_vertex:Y9,envmap_physical_pars_fragment:iN,envmap_vertex:k9,fog_vertex:K9,fog_pars_vertex:j9,fog_fragment:Z9,fog_pars_fragment:J9,gradientmap_pars_fragment:$9,lightmap_fragment:Q9,lightmap_pars_fragment:_9,lights_lambert_fragment:q9,lights_lambert_pars_fragment:tN,lights_pars_begin:eN,lights_toon_fragment:nN,lights_toon_pars_fragment:rN,lights_phong_fragment:sN,lights_phong_pars_fragment:aN,lights_physical_fragment:oN,lights_physical_pars_fragment:lN,lights_fragment_begin:hN,lights_fragment_maps:uN,lights_fragment_end:fN,logdepthbuf_fragment:cN,logdepthbuf_pars_fragment:dN,logdepthbuf_pars_vertex:pN,logdepthbuf_vertex:vN,map_fragment:mN,map_pars_fragment:gN,map_particle_fragment:yN,map_particle_pars_fragment:xN,metalnessmap_fragment:SN,metalnessmap_pars_fragment:TN,morphcolor_vertex:EN,morphnormal_vertex:MN,morphtarget_pars_vertex:CN,morphtarget_vertex:AN,normal_fragment_begin:wN,normal_fragment_maps:PN,normal_pars_fragment:RN,normal_pars_vertex:LN,normal_vertex:bN,normalmap_pars_fragment:FN,clearcoat_normal_fragment_begin:ON,clearcoat_normal_fragment_maps:DN,clearcoat_pars_fragment:IN,iridescence_pars_fragment:NN,opaque_fragment:BN,packing:UN,premultiplied_alpha_fragment:zN,project_vertex:GN,dithering_fragment:VN,dithering_pars_fragment:HN,roughnessmap_fragment:WN,roughnessmap_pars_fragment:XN,shadowmap_pars_fragment:YN,shadowmap_pars_vertex:kN,shadowmap_vertex:KN,shadowmask_pars_fragment:jN,skinbase_vertex:ZN,skinning_pars_vertex:JN,skinning_vertex:$N,skinnormal_vertex:QN,specularmap_fragment:_N,specularmap_pars_fragment:qN,tonemapping_fragment:tB,tonemapping_pars_fragment:eB,transmission_fragment:iB,transmission_pars_fragment:nB,uv_pars_fragment:rB,uv_pars_vertex:sB,uv_vertex:aB,worldpos_vertex:oB,background_vert:lB,background_frag:hB,backgroundCube_vert:uB,backgroundCube_frag:fB,cube_vert:cB,cube_frag:dB,depth_vert:pB,depth_frag:vB,distanceRGBA_vert:mB,distanceRGBA_frag:gB,equirect_vert:yB,equirect_frag:xB,linedashed_vert:SB,linedashed_frag:TB,meshbasic_vert:EB,meshbasic_frag:MB,meshlambert_vert:CB,meshlambert_frag:AB,meshmatcap_vert:wB,meshmatcap_frag:PB,meshnormal_vert:RB,meshnormal_frag:LB,meshphong_vert:bB,meshphong_frag:FB,meshphysical_vert:OB,meshphysical_frag:DB,meshtoon_vert:IB,meshtoon_frag:NB,points_vert:BB,points_frag:UB,shadow_vert:zB,shadow_frag:GB,sprite_vert:VB,sprite_frag:HB},ne={common:{diffuse:{value:new fe(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new ni},alphaMap:{value:null},alphaMapTransform:{value:new ni},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new ni}},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 ni}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new ni}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new ni},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new ni},normalScale:{value:new jt(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new ni},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new ni}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new ni}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new ni}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new fe(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 fe(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new ni},alphaTest:{value:0},uvTransform:{value:new ni}},sprite:{diffuse:{value:new fe(16777215)},opacity:{value:1},center:{value:new jt(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new ni},alphaMap:{value:null},alphaMapTransform:{value:new ni},alphaTest:{value:0}}},js={basic:{uniforms:Tr([ne.common,ne.specularmap,ne.envmap,ne.aomap,ne.lightmap,ne.fog]),vertexShader:ti.meshbasic_vert,fragmentShader:ti.meshbasic_frag},lambert:{uniforms:Tr([ne.common,ne.specularmap,ne.envmap,ne.aomap,ne.lightmap,ne.emissivemap,ne.bumpmap,ne.normalmap,ne.displacementmap,ne.fog,ne.lights,{emissive:{value:new fe(0)}}]),vertexShader:ti.meshlambert_vert,fragmentShader:ti.meshlambert_frag},phong:{uniforms:Tr([ne.common,ne.specularmap,ne.envmap,ne.aomap,ne.lightmap,ne.emissivemap,ne.bumpmap,ne.normalmap,ne.displacementmap,ne.fog,ne.lights,{emissive:{value:new fe(0)},specular:{value:new fe(1118481)},shininess:{value:30}}]),vertexShader:ti.meshphong_vert,fragmentShader:ti.meshphong_frag},standard:{uniforms:Tr([ne.common,ne.envmap,ne.aomap,ne.lightmap,ne.emissivemap,ne.bumpmap,ne.normalmap,ne.displacementmap,ne.roughnessmap,ne.metalnessmap,ne.fog,ne.lights,{emissive:{value:new fe(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:ti.meshphysical_vert,fragmentShader:ti.meshphysical_frag},toon:{uniforms:Tr([ne.common,ne.aomap,ne.lightmap,ne.emissivemap,ne.bumpmap,ne.normalmap,ne.displacementmap,ne.gradientmap,ne.fog,ne.lights,{emissive:{value:new fe(0)}}]),vertexShader:ti.meshtoon_vert,fragmentShader:ti.meshtoon_frag},matcap:{uniforms:Tr([ne.common,ne.bumpmap,ne.normalmap,ne.displacementmap,ne.fog,{matcap:{value:null}}]),vertexShader:ti.meshmatcap_vert,fragmentShader:ti.meshmatcap_frag},points:{uniforms:Tr([ne.points,ne.fog]),vertexShader:ti.points_vert,fragmentShader:ti.points_frag},dashed:{uniforms:Tr([ne.common,ne.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:ti.linedashed_vert,fragmentShader:ti.linedashed_frag},depth:{uniforms:Tr([ne.common,ne.displacementmap]),vertexShader:ti.depth_vert,fragmentShader:ti.depth_frag},normal:{uniforms:Tr([ne.common,ne.bumpmap,ne.normalmap,ne.displacementmap,{opacity:{value:1}}]),vertexShader:ti.meshnormal_vert,fragmentShader:ti.meshnormal_frag},sprite:{uniforms:Tr([ne.sprite,ne.fog]),vertexShader:ti.sprite_vert,fragmentShader:ti.sprite_frag},background:{uniforms:{uvTransform:{value:new ni},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:ti.background_vert,fragmentShader:ti.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:ti.backgroundCube_vert,fragmentShader:ti.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:ti.cube_vert,fragmentShader:ti.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:ti.equirect_vert,fragmentShader:ti.equirect_frag},distanceRGBA:{uniforms:Tr([ne.common,ne.displacementmap,{referencePosition:{value:new pt},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:ti.distanceRGBA_vert,fragmentShader:ti.distanceRGBA_frag},shadow:{uniforms:Tr([ne.lights,ne.fog,{color:{value:new fe(0)},opacity:{value:1}}]),vertexShader:ti.shadow_vert,fragmentShader:ti.shadow_frag}};js.physical={uniforms:Tr([js.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new ni},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new ni},clearcoatNormalScale:{value:new jt(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new ni},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new ni},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new ni},sheen:{value:0},sheenColor:{value:new fe(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new ni},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new ni},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new ni},transmissionSamplerSize:{value:new jt},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new ni},attenuationDistance:{value:0},attenuationColor:{value:new fe(0)},specularColor:{value:new fe(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new ni},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new ni},anisotropyVector:{value:new jt},anisotropyMap:{value:null},anisotropyMapTransform:{value:new ni}}]),vertexShader:ti.meshphysical_vert,fragmentShader:ti.meshphysical_frag};const fv={r:0,b:0,g:0};function WB(g,e,i,x,T,E,a){const y=new fe(0);let t=E===!0?0:1,r,p,h=null,o=0,l=null;function n(f,s){let c=!1,d=s.isScene===!0?s.background:null;d&&d.isTexture&&(d=(s.backgroundBlurriness>0?i:e).get(d)),d===null?u(y,t):d&&d.isColor&&(u(d,1),c=!0);const v=g.xr.getEnvironmentBlendMode();v==="additive"?x.buffers.color.setClear(0,0,0,1,a):v==="alpha-blend"&&x.buffers.color.setClear(0,0,0,0,a),(g.autoClear||c)&&g.clear(g.autoClearColor,g.autoClearDepth,g.autoClearStencil),d&&(d.isCubeTexture||d.mapping===yf)?(p===void 0&&(p=new En(new Ih(1,1,1),new Qs({name:"BackgroundCubeMaterial",uniforms:df(js.backgroundCube.uniforms),vertexShader:js.backgroundCube.vertexShader,fragmentShader:js.backgroundCube.fragmentShader,side:Cr,depthTest:!1,depthWrite:!1,fog:!1})),p.geometry.deleteAttribute("normal"),p.geometry.deleteAttribute("uv"),p.onBeforeRender=function(m,S,M){this.matrixWorld.copyPosition(M.matrixWorld)},Object.defineProperty(p.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),T.update(p)),p.material.uniforms.envMap.value=d,p.material.uniforms.flipEnvMap.value=d.isCubeTexture&&d.isRenderTargetTexture===!1?-1:1,p.material.uniforms.backgroundBlurriness.value=s.backgroundBlurriness,p.material.uniforms.backgroundIntensity.value=s.backgroundIntensity,p.material.toneMapped=xi.getTransfer(d.colorSpace)!==Di,(h!==d||o!==d.version||l!==g.toneMapping)&&(p.material.needsUpdate=!0,h=d,o=d.version,l=g.toneMapping),p.layers.enableAll(),f.unshift(p,p.geometry,p.material,0,0,null)):d&&d.isTexture&&(r===void 0&&(r=new En(new Sf(2,2),new Qs({name:"BackgroundMaterial",uniforms:df(js.background.uniforms),vertexShader:js.background.vertexShader,fragmentShader:js.background.fragmentShader,side:ao,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=d,r.material.uniforms.backgroundIntensity.value=s.backgroundIntensity,r.material.toneMapped=xi.getTransfer(d.colorSpace)!==Di,d.matrixAutoUpdate===!0&&d.updateMatrix(),r.material.uniforms.uvTransform.value.copy(d.matrix),(h!==d||o!==d.version||l!==g.toneMapping)&&(r.material.needsUpdate=!0,h=d,o=d.version,l=g.toneMapping),r.layers.enableAll(),f.unshift(r,r.geometry,r.material,0,0,null))}function u(f,s){f.getRGB(fv,lA(g)),x.buffers.color.setClear(fv.r,fv.g,fv.b,s,a)}return{getClearColor:function(){return y},setClearColor:function(f,s=1){y.set(f),t=s,u(y,t)},getClearAlpha:function(){return t},setClearAlpha:function(f){t=f,u(y,t)},render:n}}function XB(g,e,i,x){const T=g.getParameter(g.MAX_VERTEX_ATTRIBS),E=x.isWebGL2?null:e.get("OES_vertex_array_object"),a=x.isWebGL2||E!==null,y={},t=f(null);let r=t,p=!1;function h(I,D,B,G,z){let W=!1;if(a){const k=u(G,B,D);r!==k&&(r=k,l(r.object)),W=s(I,G,B,z),W&&c(I,G,B,z)}else{const k=D.wireframe===!0;(r.geometry!==G.id||r.program!==B.id||r.wireframe!==k)&&(r.geometry=G.id,r.program=B.id,r.wireframe=k,W=!0)}z!==null&&i.update(z,g.ELEMENT_ARRAY_BUFFER),(W||p)&&(p=!1,A(I,D,B,G),z!==null&&g.bindBuffer(g.ELEMENT_ARRAY_BUFFER,i.get(z).buffer))}function o(){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 W=z[D.id];W===void 0&&(W={},z[D.id]=W);let k=W[G];return k===void 0&&(k=f(o()),W[G]=k),k}function f(I){const D=[],B=[],G=[];for(let z=0;z=0){const K=z[Q];let U=W[Q];if(U===void 0&&(Q==="instanceMatrix"&&I.instanceMatrix&&(U=I.instanceMatrix),Q==="instanceColor"&&I.instanceColor&&(U=I.instanceColor)),K===void 0||K.attribute!==U||U&&K.data!==U.data)return!0;k++}return r.attributesNum!==k||r.index!==G}function c(I,D,B,G){const z={},W=D.attributes;let k=0;const J=B.getAttributes();for(const Q in J)if(J[Q].location>=0){let K=W[Q];K===void 0&&(Q==="instanceMatrix"&&I.instanceMatrix&&(K=I.instanceMatrix),Q==="instanceColor"&&I.instanceColor&&(K=I.instanceColor));const U={};U.attribute=K,K&&K.data&&(U.data=K.data),z[Q]=U,k++}r.attributes=z,r.attributesNum=k,r.index=G}function d(){const I=r.newAttributes;for(let D=0,B=I.length;D=0){let Y=z[J];if(Y===void 0&&(J==="instanceMatrix"&&I.instanceMatrix&&(Y=I.instanceMatrix),J==="instanceColor"&&I.instanceColor&&(Y=I.instanceColor)),Y!==void 0){const K=Y.normalized,U=Y.itemSize,V=i.get(Y);if(V===void 0)continue;const j=V.buffer,$=V.type,q=V.bytesPerElement,it=x.isWebGL2===!0&&($===g.INT||$===g.UNSIGNED_INT||Y.gpuType===t1);if(Y.isInterleavedBufferAttribute){const nt=Y.data,et=nt.stride,ht=Y.offset;if(nt.isInstancedInterleavedBuffer){for(let ut=0;ut0&&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 a=typeof WebGL2RenderingContext<"u"&&g.constructor.name==="WebGL2RenderingContext";let y=i.precision!==void 0?i.precision:"highp";const t=E(y);t!==y&&(console.warn("THREE.WebGLRenderer:",y,"not supported, using",t,"instead."),y=t);const r=a||e.has("WEBGL_draw_buffers"),p=i.logarithmicDepthBuffer===!0,h=g.getParameter(g.MAX_TEXTURE_IMAGE_UNITS),o=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),s=g.getParameter(g.MAX_VARYING_VECTORS),c=g.getParameter(g.MAX_FRAGMENT_UNIFORM_VECTORS),d=o>0,v=a||e.has("OES_texture_float"),m=d&&v,S=a?g.getParameter(g.MAX_SAMPLES):0;return{isWebGL2:a,drawBuffers:r,getMaxAnisotropy:T,getMaxPrecision:E,precision:y,logarithmicDepthBuffer:p,maxTextures:h,maxVertexTextures:o,maxTextureSize:l,maxCubemapSize:n,maxAttributes:u,maxVertexUniforms:f,maxVaryings:s,maxFragmentUniforms:c,vertexTextures:d,floatFragmentTextures:v,floatVertexTextures:m,maxSamples:S}}function KB(g){const e=this;let i=null,x=0,T=!1,E=!1;const a=new qo,y=new ni,t={value:null,needsUpdate:!1};this.uniform=t,this.numPlanes=0,this.numIntersection=0,this.init=function(h,o){const l=h.length!==0||o||x!==0||T;return T=o,x=h.length,l},this.beginShadows=function(){E=!0,p(null)},this.endShadows=function(){E=!1},this.setGlobalState=function(h,o){i=p(h,o,0)},this.setState=function(h,o,l){const n=h.clippingPlanes,u=h.clipIntersection,f=h.clipShadows,s=g.get(h);if(!T||n===null||n.length===0||E&&!f)E?p(null):r();else{const c=E?0:x,d=c*4;let v=s.clippingState||null;t.value=v,v=p(n,o,d,l);for(let m=0;m!==d;++m)v[m]=i[m];s.clippingState=v,this.numIntersection=u?this.numPlanes:0,this.numPlanes+=c}};function r(){t.value!==i&&(t.value=i,t.needsUpdate=x>0),e.numPlanes=x,e.numIntersection=0}function p(h,o,l,n){const u=h!==null?h.length:0;let f=null;if(u!==0){if(f=t.value,n!==!0||f===null){const s=l+u*4,c=o.matrixWorldInverse;y.getNormalMatrix(c),(f===null||f.length0){const r=new fA(t.height);return r.fromEquirectangularTexture(g,a),e.set(a,r),a.addEventListener("dispose",T),i(r.texture,a.mapping)}else return null}}return a}function T(a){const y=a.target;y.removeEventListener("dispose",T);const t=e.get(y);t!==void 0&&(e.delete(y),t.dispose())}function E(){e=new WeakMap}return{get:x,dispose:E}}class Ld extends wd{constructor(e=-1,i=1,x=1,T=-1,E=.1,a=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=i,this.top=x,this.bottom=T,this.near=E,this.far=a,this.updateProjectionMatrix()}copy(e,i){return super.copy(e,i),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,i,x,T,E,a){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=e,this.view.fullHeight=i,this.view.offsetX=x,this.view.offsetY=T,this.view.width=E,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(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-e,a=x+e,y=T+i,t=T-i;if(this.view!==null&&this.view.enabled){const r=(this.right-this.left)/this.view.fullWidth/this.zoom,p=(this.top-this.bottom)/this.view.fullHeight/this.zoom;E+=r*this.view.offsetX,a=E+r*this.view.width,y-=p*this.view.offsetY,t=y-p*this.view.height}this.projectionMatrix.makeOrthographic(E,a,y,t,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const i=super.toJSON(e);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 qu=4,GT=[.125,.215,.35,.446,.526,.582],ph=20,z0=new Ld,VT=new fe;let G0=null,V0=0,H0=0;const ch=(1+Math.sqrt(5))/2,zu=1/ch,HT=[new pt(1,1,1),new pt(-1,1,1),new pt(1,1,-1),new pt(-1,1,-1),new pt(0,ch,zu),new pt(0,ch,-zu),new pt(zu,0,ch),new pt(-zu,0,ch),new pt(ch,zu,0),new pt(-ch,zu,0)];class dx{constructor(e){this._renderer=e,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(e,i=0,x=.1,T=100){G0=this._renderer.getRenderTarget(),V0=this._renderer.getActiveCubeFace(),H0=this._renderer.getActiveMipmapLevel(),this._setSize(256);const E=this._allocateTargets();return E.depthBuffer=!0,this._sceneToCubeUV(e,x,T,E),i>0&&this._blur(E,0,0,i),this._applyPMREM(E),this._cleanup(E),E}fromEquirectangular(e,i=null){return this._fromTexture(e,i)}fromCubemap(e,i=null){return this._fromTexture(e,i)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=YT(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=XT(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e2?d:0,d,d),p.setRenderTarget(T),u&&p.render(n,y),p.render(e,y)}n.geometry.dispose(),n.material.dispose(),p.toneMapping=o,p.autoClear=h,e.background=f}_textureToCubeUV(e,i){const x=this._renderer,T=e.mapping===oo||e.mapping===ll;T?(this._cubemapMaterial===null&&(this._cubemapMaterial=YT()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=XT());const E=T?this._cubemapMaterial:this._equirectMaterial,a=new En(this._lodPlanes[0],E),y=E.uniforms;y.envMap.value=e;const t=this._cubeSize;cv(i,0,0,3*t,2*t),x.setRenderTarget(i),x.render(a,z0)}_applyPMREM(e){const i=this._renderer,x=i.autoClear;i.autoClear=!1;for(let T=1;Tph&&console.warn(`sigmaRadians, ${E}, is too large and will clip, as it requested ${f} samples when the maximum is set to ${ph}`);const s=[];let c=0;for(let M=0;Md-qu?T-d+qu:0),S=4*(this._cubeSize-v);cv(i,m,S,3*v,2*v),t.setRenderTarget(i),t.render(h,z0)}}function ZB(g){const e=[],i=[],x=[];let T=g;const E=g-qu+1+GT.length;for(let a=0;ag-qu?t=GT[a-g+qu-1]:a===0&&(t=0),x.push(t);const r=1/(y-2),p=-r,h=1+r,o=[p,p,h,p,h,h,p,p,h,h,p,h],l=6,n=6,u=3,f=2,s=1,c=new Float32Array(u*n*l),d=new Float32Array(f*n*l),v=new Float32Array(s*n*l);for(let S=0;S2?0:-1,C=[M,A,0,M+2/3,A,0,M+2/3,A+1,0,M,A,0,M+2/3,A+1,0,M,A+1,0];c.set(C,u*n*S),d.set(o,f*n*S);const w=[S,S,S,S,S,S];v.set(w,s*n*S)}const m=new ei;m.setAttribute("position",new Ti(c,u)),m.setAttribute("uv",new Ti(d,f)),m.setAttribute("faceIndex",new Ti(v,s)),e.push(m),T>qu&&T--}return{lodPlanes:e,sizeLods:i,sigmas:x}}function WT(g,e,i){const x=new $s(g,e,i);return x.texture.mapping=yf,x.texture.name="PMREM.cubeUv",x.scissorTest=!0,x}function cv(g,e,i,x,T){g.viewport.set(e,i,x,T),g.scissor.set(e,i,x,T)}function JB(g,e,i){const x=new Float32Array(ph),T=new pt(0,1,0);return new Qs({name:"SphericalGaussianBlur",defines:{n:ph,CUBEUV_TEXEL_WIDTH:1/e,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:v1(),fragmentShader:` + + precision mediump float; + precision mediump int; + + varying vec3 vOutputDirection; + + uniform sampler2D envMap; + uniform int samples; + uniform float weights[ n ]; + uniform bool latitudinal; + uniform float dTheta; + uniform float mipInt; + uniform vec3 poleAxis; + + #define ENVMAP_TYPE_CUBE_UV + #include + + vec3 getSample( float theta, vec3 axis ) { + + float cosTheta = cos( theta ); + // Rodrigues' axis-angle rotation + vec3 sampleDirection = vOutputDirection * cosTheta + + cross( axis, vOutputDirection ) * sin( theta ) + + axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta ); + + return bilinearCubeUV( envMap, sampleDirection, mipInt ); + + } + + void main() { + + vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection ); + + if ( all( equal( axis, vec3( 0.0 ) ) ) ) { + + axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x ); + + } + + axis = normalize( axis ); + + gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 ); + gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis ); + + for ( int i = 1; i < n; i++ ) { + + if ( i >= samples ) { + + break; + + } + + float theta = dTheta * float( i ); + gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis ); + gl_FragColor.rgb += weights[ i ] * getSample( theta, axis ); + + } + + } + `,blending:so,depthTest:!1,depthWrite:!1})}function XT(){return new Qs({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:v1(),fragmentShader:` + + precision mediump float; + precision mediump int; + + varying vec3 vOutputDirection; + + uniform sampler2D envMap; + + #include + + void main() { + + vec3 outputDirection = normalize( vOutputDirection ); + vec2 uv = equirectUv( outputDirection ); + + gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 ); + + } + `,blending:so,depthTest:!1,depthWrite:!1})}function YT(){return new Qs({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:v1(),fragmentShader:` + + precision mediump float; + precision mediump int; + + uniform float flipEnvMap; + + varying vec3 vOutputDirection; + + uniform samplerCube envMap; + + void main() { + + gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); + + } + `,blending:so,depthTest:!1,depthWrite:!1})}function v1(){return` + + precision mediump float; + precision mediump int; + + attribute float faceIndex; + + varying vec3 vOutputDirection; + + // RH coordinate system; PMREM face-indexing convention + vec3 getDirection( vec2 uv, float face ) { + + uv = 2.0 * uv - 1.0; + + vec3 direction = vec3( uv, 1.0 ); + + if ( face == 0.0 ) { + + direction = direction.zyx; // ( 1, v, u ) pos x + + } else if ( face == 1.0 ) { + + direction = direction.xzy; + direction.xz *= -1.0; // ( -u, 1, -v ) pos y + + } else if ( face == 2.0 ) { + + direction.x *= -1.0; // ( -u, v, 1 ) pos z + + } else if ( face == 3.0 ) { + + direction = direction.zyx; + direction.xz *= -1.0; // ( -1, v, -u ) neg x + + } else if ( face == 4.0 ) { + + direction = direction.xzy; + direction.xy *= -1.0; // ( -u, -1, v ) neg y + + } else if ( face == 5.0 ) { + + direction.z *= -1.0; // ( u, v, -1 ) neg z + + } + + return direction; + + } + + void main() { + + vOutputDirection = getDirection( uv, faceIndex ); + gl_Position = vec4( position, 1.0 ); + + } + `}function $B(g){let e=new WeakMap,i=null;function x(y){if(y&&y.isTexture){const t=y.mapping,r=t===_c||t===qc,p=t===oo||t===ll;if(r||p)if(y.isRenderTargetTexture&&y.needsPMREMUpdate===!0){y.needsPMREMUpdate=!1;let h=e.get(y);return i===null&&(i=new dx(g)),h=r?i.fromEquirectangular(y,h):i.fromCubemap(y,h),e.set(y,h),h.texture}else{if(e.has(y))return e.get(y).texture;{const h=y.image;if(r&&h&&h.height>0||p&&h&&T(h)){i===null&&(i=new dx(g));const o=r?i.fromEquirectangular(y):i.fromCubemap(y);return e.set(y,o),y.addEventListener("dispose",E),o.texture}else return null}}}return y}function T(y){let t=0;const r=6;for(let p=0;pe.maxTextureSize&&(w=Math.ceil(C/e.maxTextureSize),C=e.maxTextureSize);const P=new Float32Array(C*w*4*n),L=new ig(P,C,w,n);L.type=Ps,L.needsUpdate=!0;const O=A*4;for(let D=0;D0)return g;const T=e*i;let E=kT[T];if(E===void 0&&(E=new Float32Array(T),kT[T]=E),e!==0){x.toArray(E,0);for(let a=1,y=0;a!==e;++a)y+=i,g[a].toArray(E,y)}return E}function Fn(g,e){if(g.length!==e.length)return!1;for(let i=0,x=g.length;i":" "} ${y}: ${i[a]}`)}return x.join(` +`)}function _8(g){const e=xi.getPrimaries(xi.workingColorSpace),i=xi.getPrimaries(g);let x;switch(e===i?x="":e===od&&i===ad?x="LinearDisplayP3ToLinearSRGB":e===ad&&i===od&&(x="LinearSRGBToLinearDisplayP3"),g){case Ca:case Ad:return[x,"LinearTransferOETF"];case Ln:case eg:return[x,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",g),[x,"LinearTransferOETF"]}}function _T(g,e,i){const x=g.getShaderParameter(e,g.COMPILE_STATUS),T=g.getShaderInfoLog(e).trim();if(x&&T==="")return"";const E=/ERROR: 0:(\d+)/.exec(T);if(E){const a=parseInt(E[1]);return i.toUpperCase()+` + +`+T+` + +`+Q8(g.getShaderSource(e),a)}else return T}function q8(g,e){const i=_8(e);return`vec4 ${g}( vec4 value ) { return ${i[0]}( ${i[1]}( value ) ); }`}function t6(g,e){let i;switch(e){case FC:i="Linear";break;case OC:i="Reinhard";break;case DC:i="OptimizedCineon";break;case qx:i="ACESFilmic";break;case NC:i="AgX";break;case IC:i="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),i="Linear"}return"vec3 "+g+"( vec3 color ) { return "+i+"ToneMapping( color ); }"}function e6(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(tf).join(` +`)}function i6(g){return[g.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",g.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(tf).join(` +`)}function n6(g){const e=[];for(const i in g){const x=g[i];x!==!1&&e.push("#define "+i+" "+x)}return e.join(` +`)}function r6(g,e){const i={},x=g.getProgramParameter(e,g.ACTIVE_ATTRIBUTES);for(let T=0;T/gm;function px(g){return g.replace(s6,o6)}const a6=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function o6(g,e){let i=ti[e];if(i===void 0){const x=a6.get(e);if(x!==void 0)i=ti[x],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,x);else throw new Error("Can not resolve #include <"+e+">")}return px(i)}const l6=/#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 eE(g){return g.replace(l6,h6)}function h6(g,e,i,x){let T="";for(let E=parseInt(e);E0&&(s+=` +`),c=[l,"#define SHADER_TYPE "+i.shaderType,"#define SHADER_NAME "+i.shaderName,u].filter(tf).join(` +`),c.length>0&&(c+=` +`)):(s=[iE(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 "+p:"",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 "+t:"",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(tf).join(` +`),c=[l,iE(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 "+p:"",i.envMap?"#define "+h:"",o?"#define CUBEUV_TEXEL_WIDTH "+o.texelWidth:"",o?"#define CUBEUV_TEXEL_HEIGHT "+o.texelHeight:"",o?"#define CUBEUV_MAX_MIP "+o.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 "+t:"",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!==Ta?"#define TONE_MAPPING":"",i.toneMapping!==Ta?ti.tonemapping_pars_fragment:"",i.toneMapping!==Ta?t6("toneMapping",i.toneMapping):"",i.dithering?"#define DITHERING":"",i.opaque?"#define OPAQUE":"",ti.colorspace_pars_fragment,q8("linearToOutputTexel",i.outputColorSpace),i.useDepthPacking?"#define DEPTH_PACKING "+i.depthPacking:"",` +`].filter(tf).join(` +`)),a=px(a),a=qT(a,i),a=tE(a,i),y=px(y),y=qT(y,i),y=tE(y,i),a=eE(a),y=eE(y),i.isWebGL2&&i.isRawShaderMaterial!==!0&&(d=`#version 300 es +`,s=[n,"precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join(` +`)+` +`+s,c=["precision mediump sampler2DArray;","#define varying in",i.glslVersion===fx?"":"layout(location = 0) out highp vec4 pc_fragColor;",i.glslVersion===fx?"":"#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=d+s+a,m=d+c+y,S=QT(T,T.VERTEX_SHADER,v),M=QT(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 A(L){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=_T(T,S,"vertex"),W=_T(T,M,"fragment");console.error("THREE.WebGLProgram: Shader Error "+T.getError()+" - VALIDATE_STATUS "+T.getProgramParameter(f,T.VALIDATE_STATUS)+` + +Material Name: `+L.name+` +Material Type: `+L.type+` + +Program Info Log: `+O+` +`+z+` +`+W)}else O!==""?console.warn("THREE.WebGLProgram: Program Info Log:",O):(I===""||D==="")&&(G=!1);G&&(L.diagnostics={runnable:B,programLog:O,vertexShader:{log:I,prefix:s},fragmentShader:{log:D,prefix:c}})}T.deleteShader(S),T.deleteShader(M),C=new qv(T,f),w=r6(T,f)}let C;this.getUniforms=function(){return C===void 0&&A(this),C};let w;this.getAttributes=function(){return w===void 0&&A(this),w};let P=i.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return P===!1&&(P=T.getProgramParameter(f,J8)),P},this.destroy=function(){x.releaseStatesOfProgram(this),T.deleteProgram(f),this.program=void 0},this.type=i.shaderType,this.name=i.shaderName,this.id=$8++,this.cacheKey=e,this.usedTimes=1,this.program=f,this.vertexShader=S,this.fragmentShader=M,this}let m6=0;class g6{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const i=e.vertexShader,x=e.fragmentShader,T=this._getShaderStage(i),E=this._getShaderStage(x),a=this._getShaderCacheForMaterial(e);return a.has(T)===!1&&(a.add(T),T.usedTimes++),a.has(E)===!1&&(a.add(E),E.usedTimes++),this}remove(e){const i=this.materialCache.get(e);for(const x of i)x.usedTimes--,x.usedTimes===0&&this.shaderCache.delete(x.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const i=this.materialCache;let x=i.get(e);return x===void 0&&(x=new Set,i.set(e,x)),x}_getShaderStage(e){const i=this.shaderCache;let x=i.get(e);return x===void 0&&(x=new y6(e),i.set(e,x)),x}}class y6{constructor(e){this.id=m6++,this.code=e,this.usedTimes=0}}function x6(g,e,i,x,T,E,a){const y=new Mh,t=new g6,r=new Set,p=[],h=T.isWebGL2,o=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(w){return r.add(w),w===0?"uv":`uv${w}`}function s(w,P,L,O,I){const D=O.fog,B=I.geometry,G=w.isMeshStandardMaterial?O.environment:null,z=(w.isMeshStandardMaterial?i:e).get(w.envMap||G),W=z&&z.mapping===yf?z.image.height:null,k=u[w.type];w.precision!==null&&(n=T.getMaxPrecision(w.precision),n!==w.precision&&console.warn("THREE.WebGLProgram.getParameters:",w.precision,"not supported, using",n,"instead."));const J=B.morphAttributes.position||B.morphAttributes.normal||B.morphAttributes.color,Q=J!==void 0?J.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 K,U,V,j;if(k){const pi=js[k];K=pi.vertexShader,U=pi.fragmentShader}else K=w.vertexShader,U=w.fragmentShader,t.update(w),V=t.getVertexShaderID(w),j=t.getFragmentShaderID(w);const $=g.getRenderTarget(),q=I.isInstancedMesh===!0,it=I.isBatchedMesh===!0,nt=!!w.map,et=!!w.matcap,ht=!!z,ut=!!w.aoMap,dt=!!w.lightMap,mt=!!w.bumpMap,gt=!!w.normalMap,At=!!w.displacementMap,ot=!!w.emissiveMap,st=!!w.metalnessMap,yt=!!w.roughnessMap,Tt=w.anisotropy>0,wt=w.clearcoat>0,Et=w.iridescence>0,Gt=w.sheen>0,Wt=w.transmission>0,Jt=Tt&&!!w.anisotropyMap,$t=wt&&!!w.clearcoatMap,te=wt&&!!w.clearcoatNormalMap,Nt=wt&&!!w.clearcoatRoughnessMap,Te=Et&&!!w.iridescenceMap,le=Et&&!!w.iridescenceThicknessMap,ce=Gt&&!!w.sheenColorMap,se=Gt&&!!w.sheenRoughnessMap,ee=!!w.specularMap,Ce=!!w.specularColorMap,Xe=!!w.specularIntensityMap,si=Wt&&!!w.transmissionMap,Be=Wt&&!!w.thicknessMap,ri=!!w.gradientMap,xt=!!w.alphaMap,_t=w.alphaTest>0,qt=!!w.alphaHash,ve=!!w.extensions;let Me=Ta;w.toneMapped&&($===null||$.isXRRenderTarget===!0)&&(Me=g.toneMapping);const fi={isWebGL2:h,shaderID:k,shaderType:w.type,shaderName:w.name,vertexShader:K,fragmentShader:U,defines:w.defines,customVertexShaderID:V,customFragmentShaderID:j,isRawShaderMaterial:w.isRawShaderMaterial===!0,glslVersion:w.glslVersion,precision:n,batching:it,instancing:q,instancingColor:q&&I.instanceColor!==null,supportsVertexTextures:l,outputColorSpace:$===null?g.outputColorSpace:$.isXRRenderTarget===!0?$.texture.colorSpace:Ca,alphaToCoverage:!!w.alphaToCoverage,map:nt,matcap:et,envMap:ht,envMapMode:ht&&z.mapping,envMapCubeUVHeight:W,aoMap:ut,lightMap:dt,bumpMap:mt,normalMap:gt,displacementMap:l&&At,emissiveMap:ot,normalMapObjectSpace:gt&&w.normalMapType===$C,normalMapTangentSpace:gt&&w.normalMapType===fl,metalnessMap:st,roughnessMap:yt,anisotropy:Tt,anisotropyMap:Jt,clearcoat:wt,clearcoatMap:$t,clearcoatNormalMap:te,clearcoatRoughnessMap:Nt,iridescence:Et,iridescenceMap:Te,iridescenceThicknessMap:le,sheen:Gt,sheenColorMap:ce,sheenRoughnessMap:se,specularMap:ee,specularColorMap:Ce,specularIntensityMap:Xe,transmission:Wt,transmissionMap:si,thicknessMap:Be,gradientMap:ri,opaque:w.transparent===!1&&w.blending===Sh&&w.alphaToCoverage===!1,alphaMap:xt,alphaTest:_t,alphaHash:qt,combine:w.combine,mapUv:nt&&f(w.map.channel),aoMapUv:ut&&f(w.aoMap.channel),lightMapUv:dt&&f(w.lightMap.channel),bumpMapUv:mt&&f(w.bumpMap.channel),normalMapUv:gt&&f(w.normalMap.channel),displacementMapUv:At&&f(w.displacementMap.channel),emissiveMapUv:ot&&f(w.emissiveMap.channel),metalnessMapUv:st&&f(w.metalnessMap.channel),roughnessMapUv:yt&&f(w.roughnessMap.channel),anisotropyMapUv:Jt&&f(w.anisotropyMap.channel),clearcoatMapUv:$t&&f(w.clearcoatMap.channel),clearcoatNormalMapUv:te&&f(w.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Nt&&f(w.clearcoatRoughnessMap.channel),iridescenceMapUv:Te&&f(w.iridescenceMap.channel),iridescenceThicknessMapUv:le&&f(w.iridescenceThicknessMap.channel),sheenColorMapUv:ce&&f(w.sheenColorMap.channel),sheenRoughnessMapUv:se&&f(w.sheenRoughnessMap.channel),specularMapUv:ee&&f(w.specularMap.channel),specularColorMapUv:Ce&&f(w.specularColorMap.channel),specularIntensityMapUv:Xe&&f(w.specularIntensityMap.channel),transmissionMapUv:si&&f(w.transmissionMap.channel),thicknessMapUv:Be&&f(w.thicknessMap.channel),alphaMapUv:xt&&f(w.alphaMap.channel),vertexTangents:!!B.attributes.tangent&&(gt||Tt),vertexColors:w.vertexColors,vertexAlphas:w.vertexColors===!0&&!!B.attributes.color&&B.attributes.color.itemSize===4,pointsUvs:I.isPoints===!0&&!!B.attributes.uv&&(nt||xt),fog:!!D,useFog:w.fog===!0,fogExp2:!!D&&D.isFogExp2,flatShading:w.flatShading===!0,sizeAttenuation:w.sizeAttenuation===!0,logarithmicDepthBuffer:o,skinning:I.isSkinnedMesh===!0,morphTargets:B.morphAttributes.position!==void 0,morphNormals:B.morphAttributes.normal!==void 0,morphColors:B.morphAttributes.color!==void 0,morphTargetsCount:Q,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:a.numPlanes,numClipIntersection:a.numIntersection,dithering:w.dithering,shadowMapEnabled:g.shadowMap.enabled&&L.length>0,shadowMapType:g.shadowMap.type,toneMapping:Me,useLegacyLights:g._useLegacyLights,decodeVideoTexture:nt&&w.map.isVideoTexture===!0&&xi.getTransfer(w.map.colorSpace)===Di,premultipliedAlpha:w.premultipliedAlpha,doubleSided:w.side===ga,flipSided:w.side===Cr,useDepthPacking:w.depthPacking>=0,depthPacking:w.depthPacking||0,index0AttributeName:w.index0AttributeName,extensionDerivatives:ve&&w.extensions.derivatives===!0,extensionFragDepth:ve&&w.extensions.fragDepth===!0,extensionDrawBuffers:ve&&w.extensions.drawBuffers===!0,extensionShaderTextureLOD:ve&&w.extensions.shaderTextureLOD===!0,extensionClipCullDistance:ve&&w.extensions.clipCullDistance===!0&&x.has("WEBGL_clip_cull_distance"),extensionMultiDraw:ve&&w.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:w.customProgramCacheKey()};return fi.vertexUv1s=r.has(1),fi.vertexUv2s=r.has(2),fi.vertexUv3s=r.has(3),r.clear(),fi}function c(w){const P=[];if(w.shaderID?P.push(w.shaderID):(P.push(w.customVertexShaderID),P.push(w.customFragmentShaderID)),w.defines!==void 0)for(const L in w.defines)P.push(L),P.push(w.defines[L]);return w.isRawShaderMaterial===!1&&(d(P,w),v(P,w),P.push(g.outputColorSpace)),P.push(w.customProgramCacheKey),P.join()}function d(w,P){w.push(P.precision),w.push(P.outputColorSpace),w.push(P.envMapMode),w.push(P.envMapCubeUVHeight),w.push(P.mapUv),w.push(P.alphaMapUv),w.push(P.lightMapUv),w.push(P.aoMapUv),w.push(P.bumpMapUv),w.push(P.normalMapUv),w.push(P.displacementMapUv),w.push(P.emissiveMapUv),w.push(P.metalnessMapUv),w.push(P.roughnessMapUv),w.push(P.anisotropyMapUv),w.push(P.clearcoatMapUv),w.push(P.clearcoatNormalMapUv),w.push(P.clearcoatRoughnessMapUv),w.push(P.iridescenceMapUv),w.push(P.iridescenceThicknessMapUv),w.push(P.sheenColorMapUv),w.push(P.sheenRoughnessMapUv),w.push(P.specularMapUv),w.push(P.specularColorMapUv),w.push(P.specularIntensityMapUv),w.push(P.transmissionMapUv),w.push(P.thicknessMapUv),w.push(P.combine),w.push(P.fogExp2),w.push(P.sizeAttenuation),w.push(P.morphTargetsCount),w.push(P.morphAttributeCount),w.push(P.numDirLights),w.push(P.numPointLights),w.push(P.numSpotLights),w.push(P.numSpotLightMaps),w.push(P.numHemiLights),w.push(P.numRectAreaLights),w.push(P.numDirLightShadows),w.push(P.numPointLightShadows),w.push(P.numSpotLightShadows),w.push(P.numSpotLightShadowsWithMaps),w.push(P.numLightProbes),w.push(P.shadowMapType),w.push(P.toneMapping),w.push(P.numClippingPlanes),w.push(P.numClipIntersection),w.push(P.depthPacking)}function v(w,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),w.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),w.push(y.mask)}function m(w){const P=u[w.type];let L;if(P){const O=js[P];L=hA.clone(O.uniforms)}else L=w.uniforms;return L}function S(w,P){let L;for(let O=0,I=p.length;O0?x.push(s):l.transparent===!0?T.push(s):i.push(s)}function t(h,o,l,n,u,f){const s=a(h,o,l,n,u,f);l.transmission>0?x.unshift(s):l.transparent===!0?T.unshift(s):i.unshift(s)}function r(h,o){i.length>1&&i.sort(h||T6),x.length>1&&x.sort(o||nE),T.length>1&&T.sort(o||nE)}function p(){for(let h=e,o=g.length;h=E.length?(a=new rE,E.push(a)):a=E[T],a}function i(){g=new WeakMap}return{get:e,dispose:i}}function M6(){const g={};return{get:function(e){if(g[e.id]!==void 0)return g[e.id];let i;switch(e.type){case"DirectionalLight":i={direction:new pt,color:new fe};break;case"SpotLight":i={position:new pt,direction:new pt,color:new fe,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":i={position:new pt,color:new fe,distance:0,decay:0};break;case"HemisphereLight":i={direction:new pt,skyColor:new fe,groundColor:new fe};break;case"RectAreaLight":i={color:new fe,position:new pt,halfWidth:new pt,halfHeight:new pt};break}return g[e.id]=i,i}}}function C6(){const g={};return{get:function(e){if(g[e.id]!==void 0)return g[e.id];let i;switch(e.type){case"DirectionalLight":i={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new jt};break;case"SpotLight":i={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new jt};break;case"PointLight":i={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new jt,shadowCameraNear:1,shadowCameraFar:1e3};break}return g[e.id]=i,i}}}let A6=0;function w6(g,e){return(e.castShadow?2:0)-(g.castShadow?2:0)+(e.map?1:0)-(g.map?1:0)}function P6(g,e){const i=new M6,x=C6(),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 p=0;p<9;p++)T.probe.push(new pt);const E=new pt,a=new Ve,y=new Ve;function t(p,h){let o=0,l=0,n=0;for(let L=0;L<9;L++)T.probe[L].set(0,0,0);let u=0,f=0,s=0,c=0,d=0,v=0,m=0,S=0,M=0,A=0,C=0;p.sort(w6);const w=h===!0?Math.PI:1;for(let L=0,O=p.length;L0&&(e.isWebGL2?g.has("OES_texture_float_linear")===!0?(T.rectAreaLTC1=ne.LTC_FLOAT_1,T.rectAreaLTC2=ne.LTC_FLOAT_2):(T.rectAreaLTC1=ne.LTC_HALF_1,T.rectAreaLTC2=ne.LTC_HALF_2):g.has("OES_texture_float_linear")===!0?(T.rectAreaLTC1=ne.LTC_FLOAT_1,T.rectAreaLTC2=ne.LTC_FLOAT_2):g.has("OES_texture_half_float_linear")===!0?(T.rectAreaLTC1=ne.LTC_HALF_1,T.rectAreaLTC2=ne.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),T.ambient[0]=o,T.ambient[1]=l,T.ambient[2]=n;const P=T.hash;(P.directionalLength!==u||P.pointLength!==f||P.spotLength!==s||P.rectAreaLength!==c||P.hemiLength!==d||P.numDirectionalShadows!==v||P.numPointShadows!==m||P.numSpotShadows!==S||P.numSpotMaps!==M||P.numLightProbes!==C)&&(T.directional.length=u,T.spot.length=s,T.rectArea.length=c,T.point.length=f,T.hemi.length=d,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-A,T.spotLightMap.length=M,T.numSpotLightShadowsWithMaps=A,T.numLightProbes=C,P.directionalLength=u,P.pointLength=f,P.spotLength=s,P.rectAreaLength=c,P.hemiLength=d,P.numDirectionalShadows=v,P.numPointShadows=m,P.numSpotShadows=S,P.numSpotMaps=M,P.numLightProbes=C,T.version=A6++)}function r(p,h){let o=0,l=0,n=0,u=0,f=0;const s=h.matrixWorldInverse;for(let c=0,d=p.length;c=y.length?(t=new sE(g,e),y.push(t)):t=y[a],t}function T(){i=new WeakMap}return{get:x,dispose:T}}class g1 extends _n{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=ZC,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class y1 extends _n{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}const L6=`void main() { + gl_Position = vec4( position, 1.0 ); +}`,b6=`uniform sampler2D shadow_pass; +uniform vec2 resolution; +uniform float radius; +#include +void main() { + const float samples = float( VSM_SAMPLES ); + float mean = 0.0; + float squared_mean = 0.0; + float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 ); + float uvStart = samples <= 1.0 ? 0.0 : - 1.0; + for ( float i = 0.0; i < samples; i ++ ) { + float uvOffset = uvStart + i * uvStride; + #ifdef HORIZONTAL_PASS + vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) ); + mean += distribution.x; + squared_mean += distribution.y * distribution.y + distribution.x * distribution.x; + #else + float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) ); + mean += depth; + squared_mean += depth * depth; + #endif + } + mean = mean / samples; + squared_mean = squared_mean / samples; + float std_dev = sqrt( squared_mean - mean * mean ); + gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); +}`;function F6(g,e,i){let x=new Rd;const T=new jt,E=new jt,a=new Si,y=new g1({depthPacking:JC}),t=new y1,r={},p=i.maxTextureSize,h={[ao]:Cr,[Cr]:ao,[ga]:ga},o=new Qs({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new jt},radius:{value:4}},vertexShader:L6,fragmentShader:b6}),l=o.clone();l.defines.HORIZONTAL_PASS=1;const n=new ei;n.setAttribute("position",new Ti(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const u=new En(n,o),f=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=Qm;let s=this.type;this.render=function(S,M,A){if(f.enabled===!1||f.autoUpdate===!1&&f.needsUpdate===!1||S.length===0)return;const C=g.getRenderTarget(),w=g.getActiveCubeFace(),P=g.getActiveMipmapLevel(),L=g.state;L.setBlending(so),L.buffers.color.setClear(1,1,1,1),L.buffers.depth.setTest(!0),L.setScissorTest(!1);const O=s!==ks&&this.type===ks,I=s===ks&&this.type!==ks;for(let D=0,B=S.length;Dp||T.y>p)&&(T.x>p&&(E.x=Math.floor(p/W.x),T.x=E.x*W.x,z.mapSize.x=E.x),T.y>p&&(E.y=Math.floor(p/W.y),T.y=E.y*W.y,z.mapSize.y=E.y)),z.map===null||O===!0||I===!0){const J=this.type!==ks?{minFilter:cn,magFilter:cn}:{};z.map!==null&&z.map.dispose(),z.map=new $s(T.x,T.y,J),z.map.texture.name=G.name+".shadowMap",z.camera.updateProjectionMatrix()}g.setRenderTarget(z.map),g.clear();const k=z.getViewportCount();for(let J=0;J0||M.map&&M.alphaTest>0){const L=w.uuid,O=M.uuid;let I=r[L];I===void 0&&(I={},r[L]=I);let D=I[O];D===void 0&&(D=w.clone(),I[O]=D,M.addEventListener("dispose",m)),w=D}if(w.visible=M.visible,w.wireframe=M.wireframe,C===ks?w.side=M.shadowSide!==null?M.shadowSide:M.side:w.side=M.shadowSide!==null?M.shadowSide:h[M.side],w.alphaMap=M.alphaMap,w.alphaTest=M.alphaTest,w.map=M.map,w.clipShadows=M.clipShadows,w.clippingPlanes=M.clippingPlanes,w.clipIntersection=M.clipIntersection,w.displacementMap=M.displacementMap,w.displacementScale=M.displacementScale,w.displacementBias=M.displacementBias,w.wireframeLinewidth=M.wireframeLinewidth,w.linewidth=M.linewidth,A.isPointLight===!0&&w.isMeshDistanceMaterial===!0){const L=g.properties.get(w);L.light=A}return w}function v(S,M,A,C,w){if(S.visible===!1)return;if(S.layers.test(M.layers)&&(S.isMesh||S.isLine||S.isPoints)&&(S.castShadow||S.receiveShadow&&w===ks)&&(!S.frustumCulled||x.intersectsObject(S))){S.modelViewMatrix.multiplyMatrices(A.matrixWorldInverse,S.matrixWorld);const O=e.update(S),I=S.material;if(Array.isArray(I)){const D=O.groups;for(let B=0,G=D.length;B=1):k.indexOf("OpenGL ES")!==-1&&(W=parseFloat(/^OpenGL ES (\d)/.exec(k)[1]),z=W>=2);let J=null,Q={};const Y=g.getParameter(g.SCISSOR_BOX),K=g.getParameter(g.VIEWPORT),U=new Si().fromArray(Y),V=new Si().fromArray(K);function j(xt,_t,qt,ve){const Me=new Uint8Array(4),fi=g.createTexture();g.bindTexture(xt,fi),g.texParameteri(xt,g.TEXTURE_MIN_FILTER,g.NEAREST),g.texParameteri(xt,g.TEXTURE_MAG_FILTER,g.NEAREST);for(let pi=0;pi"u"?!1:/OculusBrowser/g.test(navigator.userAgent),p=new WeakMap;let h;const o=new WeakMap;let l=!1;try{l=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function n(ot,st){return l?new OffscreenCanvas(ot,st):ud("canvas")}function u(ot,st,yt,Tt){let wt=1;if((ot.width>Tt||ot.height>Tt)&&(wt=Tt/Math.max(ot.width,ot.height)),wt<1||st===!0)if(typeof HTMLImageElement<"u"&&ot instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&ot instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&ot instanceof ImageBitmap){const Et=st?cm:Math.floor,Gt=Et(wt*ot.width),Wt=Et(wt*ot.height);h===void 0&&(h=n(Gt,Wt));const Jt=yt?n(Gt,Wt):h;return Jt.width=Gt,Jt.height=Wt,Jt.getContext("2d").drawImage(ot,0,0,Gt,Wt),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+ot.width+"x"+ot.height+") to ("+Gt+"x"+Wt+")."),Jt}else return"data"in ot&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+ot.width+"x"+ot.height+")."),ot;return ot}function f(ot){return cx(ot.width)&&cx(ot.height)}function s(ot){return y?!1:ot.wrapS!==lr||ot.wrapT!==lr||ot.minFilter!==cn&&ot.minFilter!==Ki}function c(ot,st){return ot.generateMipmaps&&st&&ot.minFilter!==cn&&ot.minFilter!==Ki}function d(ot){g.generateMipmap(ot)}function v(ot,st,yt,Tt,wt=!1){if(y===!1)return st;if(ot!==null){if(g[ot]!==void 0)return g[ot];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+ot+"'")}let Et=st;if(st===g.RED&&(yt===g.FLOAT&&(Et=g.R32F),yt===g.HALF_FLOAT&&(Et=g.R16F),yt===g.UNSIGNED_BYTE&&(Et=g.R8)),st===g.RED_INTEGER&&(yt===g.UNSIGNED_BYTE&&(Et=g.R8UI),yt===g.UNSIGNED_SHORT&&(Et=g.R16UI),yt===g.UNSIGNED_INT&&(Et=g.R32UI),yt===g.BYTE&&(Et=g.R8I),yt===g.SHORT&&(Et=g.R16I),yt===g.INT&&(Et=g.R32I)),st===g.RG&&(yt===g.FLOAT&&(Et=g.RG32F),yt===g.HALF_FLOAT&&(Et=g.RG16F),yt===g.UNSIGNED_BYTE&&(Et=g.RG8)),st===g.RGBA){const Gt=wt?sd:xi.getTransfer(Tt);yt===g.FLOAT&&(Et=g.RGBA32F),yt===g.HALF_FLOAT&&(Et=g.RGBA16F),yt===g.UNSIGNED_BYTE&&(Et=Gt===Di?g.SRGB8_ALPHA8:g.RGBA8),yt===g.UNSIGNED_SHORT_4_4_4_4&&(Et=g.RGBA4),yt===g.UNSIGNED_SHORT_5_5_5_1&&(Et=g.RGB5_A1)}return(Et===g.R16F||Et===g.R32F||Et===g.RG16F||Et===g.RG32F||Et===g.RGBA16F||Et===g.RGBA32F)&&e.get("EXT_color_buffer_float"),Et}function m(ot,st,yt){return c(ot,yt)===!0||ot.isFramebufferTexture&&ot.minFilter!==cn&&ot.minFilter!==Ki?Math.log2(Math.max(st.width,st.height))+1:ot.mipmaps!==void 0&&ot.mipmaps.length>0?ot.mipmaps.length:ot.isCompressedTexture&&Array.isArray(ot.image)?st.mipmaps.length:1}function S(ot){return ot===cn||ot===um||ot===dh?g.NEAREST:g.LINEAR}function M(ot){const st=ot.target;st.removeEventListener("dispose",M),C(st),st.isVideoTexture&&p.delete(st)}function A(ot){const st=ot.target;st.removeEventListener("dispose",A),P(st)}function C(ot){const st=x.get(ot);if(st.__webglInit===void 0)return;const yt=ot.source,Tt=o.get(yt);if(Tt){const wt=Tt[st.__cacheKey];wt.usedTimes--,wt.usedTimes===0&&w(ot),Object.keys(Tt).length===0&&o.delete(yt)}x.remove(ot)}function w(ot){const st=x.get(ot);g.deleteTexture(st.__webglTexture);const yt=ot.source,Tt=o.get(yt);delete Tt[st.__cacheKey],a.memory.textures--}function P(ot){const st=ot.texture,yt=x.get(ot),Tt=x.get(st);if(Tt.__webglTexture!==void 0&&(g.deleteTexture(Tt.__webglTexture),a.memory.textures--),ot.depthTexture&&ot.depthTexture.dispose(),ot.isWebGLCubeRenderTarget)for(let wt=0;wt<6;wt++){if(Array.isArray(yt.__webglFramebuffer[wt]))for(let Et=0;Et=T.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+ot+" texture units while this GPU supports only "+T.maxTextures),L+=1,ot}function D(ot){const st=[];return st.push(ot.wrapS),st.push(ot.wrapT),st.push(ot.wrapR||0),st.push(ot.magFilter),st.push(ot.minFilter),st.push(ot.anisotropy),st.push(ot.internalFormat),st.push(ot.format),st.push(ot.type),st.push(ot.generateMipmaps),st.push(ot.premultiplyAlpha),st.push(ot.flipY),st.push(ot.unpackAlignment),st.push(ot.colorSpace),st.join()}function B(ot,st){const yt=x.get(ot);if(ot.isVideoTexture&>(ot),ot.isRenderTargetTexture===!1&&ot.version>0&&yt.__version!==ot.version){const Tt=ot.image;if(Tt===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(Tt.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{U(yt,ot,st);return}}i.bindTexture(g.TEXTURE_2D,yt.__webglTexture,g.TEXTURE0+st)}function G(ot,st){const yt=x.get(ot);if(ot.version>0&&yt.__version!==ot.version){U(yt,ot,st);return}i.bindTexture(g.TEXTURE_2D_ARRAY,yt.__webglTexture,g.TEXTURE0+st)}function z(ot,st){const yt=x.get(ot);if(ot.version>0&&yt.__version!==ot.version){U(yt,ot,st);return}i.bindTexture(g.TEXTURE_3D,yt.__webglTexture,g.TEXTURE0+st)}function W(ot,st){const yt=x.get(ot);if(ot.version>0&&yt.__version!==ot.version){V(yt,ot,st);return}i.bindTexture(g.TEXTURE_CUBE_MAP,yt.__webglTexture,g.TEXTURE0+st)}const k={[td]:g.REPEAT,[lr]:g.CLAMP_TO_EDGE,[ed]:g.MIRRORED_REPEAT},J={[cn]:g.NEAREST,[um]:g.NEAREST_MIPMAP_NEAREST,[dh]:g.NEAREST_MIPMAP_LINEAR,[Ki]:g.LINEAR,[Hc]:g.LINEAR_MIPMAP_NEAREST,[xa]:g.LINEAR_MIPMAP_LINEAR},Q={[QC]:g.NEVER,[nA]:g.ALWAYS,[_C]:g.LESS,[h1]:g.LEQUAL,[qC]:g.EQUAL,[iA]:g.GEQUAL,[tA]:g.GREATER,[eA]:g.NOTEQUAL};function Y(ot,st,yt){if(st.type===Ps&&e.has("OES_texture_float_linear")===!1&&(st.magFilter===Ki||st.magFilter===Hc||st.magFilter===dh||st.magFilter===xa||st.minFilter===Ki||st.minFilter===Hc||st.minFilter===dh||st.minFilter===xa)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),yt?(g.texParameteri(ot,g.TEXTURE_WRAP_S,k[st.wrapS]),g.texParameteri(ot,g.TEXTURE_WRAP_T,k[st.wrapT]),(ot===g.TEXTURE_3D||ot===g.TEXTURE_2D_ARRAY)&&g.texParameteri(ot,g.TEXTURE_WRAP_R,k[st.wrapR]),g.texParameteri(ot,g.TEXTURE_MAG_FILTER,J[st.magFilter]),g.texParameteri(ot,g.TEXTURE_MIN_FILTER,J[st.minFilter])):(g.texParameteri(ot,g.TEXTURE_WRAP_S,g.CLAMP_TO_EDGE),g.texParameteri(ot,g.TEXTURE_WRAP_T,g.CLAMP_TO_EDGE),(ot===g.TEXTURE_3D||ot===g.TEXTURE_2D_ARRAY)&&g.texParameteri(ot,g.TEXTURE_WRAP_R,g.CLAMP_TO_EDGE),(st.wrapS!==lr||st.wrapT!==lr)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),g.texParameteri(ot,g.TEXTURE_MAG_FILTER,S(st.magFilter)),g.texParameteri(ot,g.TEXTURE_MIN_FILTER,S(st.minFilter)),st.minFilter!==cn&&st.minFilter!==Ki&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),st.compareFunction&&(g.texParameteri(ot,g.TEXTURE_COMPARE_MODE,g.COMPARE_REF_TO_TEXTURE),g.texParameteri(ot,g.TEXTURE_COMPARE_FUNC,Q[st.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){const Tt=e.get("EXT_texture_filter_anisotropic");if(st.magFilter===cn||st.minFilter!==dh&&st.minFilter!==xa||st.type===Ps&&e.has("OES_texture_float_linear")===!1||y===!1&&st.type===ff&&e.has("OES_texture_half_float_linear")===!1)return;(st.anisotropy>1||x.get(st).__currentAnisotropy)&&(g.texParameterf(ot,Tt.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(st.anisotropy,T.getMaxAnisotropy())),x.get(st).__currentAnisotropy=st.anisotropy)}}function K(ot,st){let yt=!1;ot.__webglInit===void 0&&(ot.__webglInit=!0,st.addEventListener("dispose",M));const Tt=st.source;let wt=o.get(Tt);wt===void 0&&(wt={},o.set(Tt,wt));const Et=D(st);if(Et!==ot.__cacheKey){wt[Et]===void 0&&(wt[Et]={texture:g.createTexture(),usedTimes:0},a.memory.textures++,yt=!0),wt[Et].usedTimes++;const Gt=wt[ot.__cacheKey];Gt!==void 0&&(wt[ot.__cacheKey].usedTimes--,Gt.usedTimes===0&&w(st)),ot.__cacheKey=Et,ot.__webglTexture=wt[Et].texture}return yt}function U(ot,st,yt){let Tt=g.TEXTURE_2D;(st.isDataArrayTexture||st.isCompressedArrayTexture)&&(Tt=g.TEXTURE_2D_ARRAY),st.isData3DTexture&&(Tt=g.TEXTURE_3D);const wt=K(ot,st),Et=st.source;i.bindTexture(Tt,ot.__webglTexture,g.TEXTURE0+yt);const Gt=x.get(Et);if(Et.version!==Gt.__version||wt===!0){i.activeTexture(g.TEXTURE0+yt);const Wt=xi.getPrimaries(xi.workingColorSpace),Jt=st.colorSpace===rs?null:xi.getPrimaries(st.colorSpace),$t=st.colorSpace===rs||Wt===Jt?g.NONE:g.BROWSER_DEFAULT_WEBGL;g.pixelStorei(g.UNPACK_FLIP_Y_WEBGL,st.flipY),g.pixelStorei(g.UNPACK_PREMULTIPLY_ALPHA_WEBGL,st.premultiplyAlpha),g.pixelStorei(g.UNPACK_ALIGNMENT,st.unpackAlignment),g.pixelStorei(g.UNPACK_COLORSPACE_CONVERSION_WEBGL,$t);const te=s(st)&&f(st.image)===!1;let Nt=u(st.image,te,!1,T.maxTextureSize);Nt=At(st,Nt);const Te=f(Nt)||y,le=E.convert(st.format,st.colorSpace);let ce=E.convert(st.type),se=v(st.internalFormat,le,ce,st.colorSpace,st.isVideoTexture);Y(Tt,st,Te);let ee;const Ce=st.mipmaps,Xe=y&&st.isVideoTexture!==!0&&se!==a1,si=Gt.__version===void 0||wt===!0,Be=Et.dataReady,ri=m(st,Nt,Te);if(st.isDepthTexture)se=g.DEPTH_COMPONENT,y?st.type===Ps?se=g.DEPTH_COMPONENT32F:st.type===io?se=g.DEPTH_COMPONENT24:st.type===nl?se=g.DEPTH24_STENCIL8:se=g.DEPTH_COMPONENT16:st.type===Ps&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),st.format===rl&&se===g.DEPTH_COMPONENT&&st.type!==qm&&st.type!==io&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),st.type=io,ce=E.convert(st.type)),st.format===Lh&&se===g.DEPTH_COMPONENT&&(se=g.DEPTH_STENCIL,st.type!==nl&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),st.type=nl,ce=E.convert(st.type))),si&&(Xe?i.texStorage2D(g.TEXTURE_2D,1,se,Nt.width,Nt.height):i.texImage2D(g.TEXTURE_2D,0,se,Nt.width,Nt.height,0,le,ce,null));else if(st.isDataTexture)if(Ce.length>0&&Te){Xe&&si&&i.texStorage2D(g.TEXTURE_2D,ri,se,Ce[0].width,Ce[0].height);for(let xt=0,_t=Ce.length;xt<_t;xt++)ee=Ce[xt],Xe?Be&&i.texSubImage2D(g.TEXTURE_2D,xt,0,0,ee.width,ee.height,le,ce,ee.data):i.texImage2D(g.TEXTURE_2D,xt,se,ee.width,ee.height,0,le,ce,ee.data);st.generateMipmaps=!1}else Xe?(si&&i.texStorage2D(g.TEXTURE_2D,ri,se,Nt.width,Nt.height),Be&&i.texSubImage2D(g.TEXTURE_2D,0,0,0,Nt.width,Nt.height,le,ce,Nt.data)):i.texImage2D(g.TEXTURE_2D,0,se,Nt.width,Nt.height,0,le,ce,Nt.data);else if(st.isCompressedTexture)if(st.isCompressedArrayTexture){Xe&&si&&i.texStorage3D(g.TEXTURE_2D_ARRAY,ri,se,Ce[0].width,Ce[0].height,Nt.depth);for(let xt=0,_t=Ce.length;xt<_t;xt++)ee=Ce[xt],st.format!==Er?le!==null?Xe?Be&&i.compressedTexSubImage3D(g.TEXTURE_2D_ARRAY,xt,0,0,0,ee.width,ee.height,Nt.depth,le,ee.data,0,0):i.compressedTexImage3D(g.TEXTURE_2D_ARRAY,xt,se,ee.width,ee.height,Nt.depth,0,ee.data,0,0):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):Xe?Be&&i.texSubImage3D(g.TEXTURE_2D_ARRAY,xt,0,0,0,ee.width,ee.height,Nt.depth,le,ce,ee.data):i.texImage3D(g.TEXTURE_2D_ARRAY,xt,se,ee.width,ee.height,Nt.depth,0,le,ce,ee.data)}else{Xe&&si&&i.texStorage2D(g.TEXTURE_2D,ri,se,Ce[0].width,Ce[0].height);for(let xt=0,_t=Ce.length;xt<_t;xt++)ee=Ce[xt],st.format!==Er?le!==null?Xe?Be&&i.compressedTexSubImage2D(g.TEXTURE_2D,xt,0,0,ee.width,ee.height,le,ee.data):i.compressedTexImage2D(g.TEXTURE_2D,xt,se,ee.width,ee.height,0,ee.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):Xe?Be&&i.texSubImage2D(g.TEXTURE_2D,xt,0,0,ee.width,ee.height,le,ce,ee.data):i.texImage2D(g.TEXTURE_2D,xt,se,ee.width,ee.height,0,le,ce,ee.data)}else if(st.isDataArrayTexture)Xe?(si&&i.texStorage3D(g.TEXTURE_2D_ARRAY,ri,se,Nt.width,Nt.height,Nt.depth),Be&&i.texSubImage3D(g.TEXTURE_2D_ARRAY,0,0,0,0,Nt.width,Nt.height,Nt.depth,le,ce,Nt.data)):i.texImage3D(g.TEXTURE_2D_ARRAY,0,se,Nt.width,Nt.height,Nt.depth,0,le,ce,Nt.data);else if(st.isData3DTexture)Xe?(si&&i.texStorage3D(g.TEXTURE_3D,ri,se,Nt.width,Nt.height,Nt.depth),Be&&i.texSubImage3D(g.TEXTURE_3D,0,0,0,0,Nt.width,Nt.height,Nt.depth,le,ce,Nt.data)):i.texImage3D(g.TEXTURE_3D,0,se,Nt.width,Nt.height,Nt.depth,0,le,ce,Nt.data);else if(st.isFramebufferTexture){if(si)if(Xe)i.texStorage2D(g.TEXTURE_2D,ri,se,Nt.width,Nt.height);else{let xt=Nt.width,_t=Nt.height;for(let qt=0;qt>=1,_t>>=1}}else if(Ce.length>0&&Te){Xe&&si&&i.texStorage2D(g.TEXTURE_2D,ri,se,Ce[0].width,Ce[0].height);for(let xt=0,_t=Ce.length;xt<_t;xt++)ee=Ce[xt],Xe?Be&&i.texSubImage2D(g.TEXTURE_2D,xt,0,0,le,ce,ee):i.texImage2D(g.TEXTURE_2D,xt,se,le,ce,ee);st.generateMipmaps=!1}else Xe?(si&&i.texStorage2D(g.TEXTURE_2D,ri,se,Nt.width,Nt.height),Be&&i.texSubImage2D(g.TEXTURE_2D,0,0,0,le,ce,Nt)):i.texImage2D(g.TEXTURE_2D,0,se,le,ce,Nt);c(st,Te)&&d(Tt),Gt.__version=Et.version,st.onUpdate&&st.onUpdate(st)}ot.__version=st.version}function V(ot,st,yt){if(st.image.length!==6)return;const Tt=K(ot,st),wt=st.source;i.bindTexture(g.TEXTURE_CUBE_MAP,ot.__webglTexture,g.TEXTURE0+yt);const Et=x.get(wt);if(wt.version!==Et.__version||Tt===!0){i.activeTexture(g.TEXTURE0+yt);const Gt=xi.getPrimaries(xi.workingColorSpace),Wt=st.colorSpace===rs?null:xi.getPrimaries(st.colorSpace),Jt=st.colorSpace===rs||Gt===Wt?g.NONE:g.BROWSER_DEFAULT_WEBGL;g.pixelStorei(g.UNPACK_FLIP_Y_WEBGL,st.flipY),g.pixelStorei(g.UNPACK_PREMULTIPLY_ALPHA_WEBGL,st.premultiplyAlpha),g.pixelStorei(g.UNPACK_ALIGNMENT,st.unpackAlignment),g.pixelStorei(g.UNPACK_COLORSPACE_CONVERSION_WEBGL,Jt);const $t=st.isCompressedTexture||st.image[0].isCompressedTexture,te=st.image[0]&&st.image[0].isDataTexture,Nt=[];for(let xt=0;xt<6;xt++)!$t&&!te?Nt[xt]=u(st.image[xt],!1,!0,T.maxCubemapSize):Nt[xt]=te?st.image[xt].image:st.image[xt],Nt[xt]=At(st,Nt[xt]);const Te=Nt[0],le=f(Te)||y,ce=E.convert(st.format,st.colorSpace),se=E.convert(st.type),ee=v(st.internalFormat,ce,se,st.colorSpace),Ce=y&&st.isVideoTexture!==!0,Xe=Et.__version===void 0||Tt===!0,si=wt.dataReady;let Be=m(st,Te,le);Y(g.TEXTURE_CUBE_MAP,st,le);let ri;if($t){Ce&&Xe&&i.texStorage2D(g.TEXTURE_CUBE_MAP,Be,ee,Te.width,Te.height);for(let xt=0;xt<6;xt++){ri=Nt[xt].mipmaps;for(let _t=0;_t0&&Be++,i.texStorage2D(g.TEXTURE_CUBE_MAP,Be,ee,Nt[0].width,Nt[0].height));for(let xt=0;xt<6;xt++)if(te){Ce?si&&i.texSubImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X+xt,0,0,0,Nt[xt].width,Nt[xt].height,ce,se,Nt[xt].data):i.texImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X+xt,0,ee,Nt[xt].width,Nt[xt].height,0,ce,se,Nt[xt].data);for(let _t=0;_t>Et),Nt=Math.max(1,st.height>>Et);wt===g.TEXTURE_3D||wt===g.TEXTURE_2D_ARRAY?i.texImage3D(wt,Et,Jt,te,Nt,st.depth,0,Gt,Wt,null):i.texImage2D(wt,Et,Jt,te,Nt,0,Gt,Wt,null)}i.bindFramebuffer(g.FRAMEBUFFER,ot),mt(st)?t.framebufferTexture2DMultisampleEXT(g.FRAMEBUFFER,Tt,wt,x.get(yt).__webglTexture,0,dt(st)):(wt===g.TEXTURE_2D||wt>=g.TEXTURE_CUBE_MAP_POSITIVE_X&&wt<=g.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&g.framebufferTexture2D(g.FRAMEBUFFER,Tt,wt,x.get(yt).__webglTexture,Et),i.bindFramebuffer(g.FRAMEBUFFER,null)}function $(ot,st,yt){if(g.bindRenderbuffer(g.RENDERBUFFER,ot),st.depthBuffer&&!st.stencilBuffer){let Tt=y===!0?g.DEPTH_COMPONENT24:g.DEPTH_COMPONENT16;if(yt||mt(st)){const wt=st.depthTexture;wt&&wt.isDepthTexture&&(wt.type===Ps?Tt=g.DEPTH_COMPONENT32F:wt.type===io&&(Tt=g.DEPTH_COMPONENT24));const Et=dt(st);mt(st)?t.renderbufferStorageMultisampleEXT(g.RENDERBUFFER,Et,Tt,st.width,st.height):g.renderbufferStorageMultisample(g.RENDERBUFFER,Et,Tt,st.width,st.height)}else g.renderbufferStorage(g.RENDERBUFFER,Tt,st.width,st.height);g.framebufferRenderbuffer(g.FRAMEBUFFER,g.DEPTH_ATTACHMENT,g.RENDERBUFFER,ot)}else if(st.depthBuffer&&st.stencilBuffer){const Tt=dt(st);yt&&mt(st)===!1?g.renderbufferStorageMultisample(g.RENDERBUFFER,Tt,g.DEPTH24_STENCIL8,st.width,st.height):mt(st)?t.renderbufferStorageMultisampleEXT(g.RENDERBUFFER,Tt,g.DEPTH24_STENCIL8,st.width,st.height):g.renderbufferStorage(g.RENDERBUFFER,g.DEPTH_STENCIL,st.width,st.height),g.framebufferRenderbuffer(g.FRAMEBUFFER,g.DEPTH_STENCIL_ATTACHMENT,g.RENDERBUFFER,ot)}else{const Tt=st.isWebGLMultipleRenderTargets===!0?st.texture:[st.texture];for(let wt=0;wt0){yt.__webglFramebuffer[Wt]=[];for(let Jt=0;Jt0){yt.__webglFramebuffer=[];for(let Wt=0;Wt0&&mt(ot)===!1){const Wt=Et?st:[st];yt.__webglMultisampledFramebuffer=g.createFramebuffer(),yt.__webglColorRenderbuffer=[],i.bindFramebuffer(g.FRAMEBUFFER,yt.__webglMultisampledFramebuffer);for(let Jt=0;Jt0)for(let Jt=0;Jt0)for(let Jt=0;Jt0&&mt(ot)===!1){const st=ot.isWebGLMultipleRenderTargets?ot.texture:[ot.texture],yt=ot.width,Tt=ot.height;let wt=g.COLOR_BUFFER_BIT;const Et=[],Gt=ot.stencilBuffer?g.DEPTH_STENCIL_ATTACHMENT:g.DEPTH_ATTACHMENT,Wt=x.get(ot),Jt=ot.isWebGLMultipleRenderTargets===!0;if(Jt)for(let $t=0;$t0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&st.__useRenderToTexture!==!1}function gt(ot){const st=a.render.frame;p.get(ot)!==st&&(p.set(ot,st),ot.update())}function At(ot,st){const yt=ot.colorSpace,Tt=ot.format,wt=ot.type;return ot.isCompressedTexture===!0||ot.isVideoTexture===!0||ot.format===fm||yt!==Ca&&yt!==rs&&(xi.getTransfer(yt)===Di?y===!1?e.has("EXT_sRGB")===!0&&Tt===Er?(ot.format=fm,ot.minFilter=Ki,ot.generateMipmaps=!1):st=f1.sRGBToLinear(st):(Tt!==Er||wt!==Ea)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",yt)),st}this.allocateTextureUnit=I,this.resetTextureUnits=O,this.setTexture2D=B,this.setTexture2DArray=G,this.setTexture3D=z,this.setTextureCube=W,this.rebindTextures=nt,this.setupRenderTarget=et,this.updateRenderTargetMipmap=ht,this.updateMultisampleRenderTarget=ut,this.setupDepthRenderbuffer=it,this.setupFrameBufferTexture=j,this.useMultisampledRTT=mt}function yA(g,e,i){const x=i.isWebGL2;function T(E,a=rs){let y;const t=xi.getTransfer(a);if(E===Ea)return g.UNSIGNED_BYTE;if(E===e1)return g.UNSIGNED_SHORT_4_4_4_4;if(E===i1)return g.UNSIGNED_SHORT_5_5_5_1;if(E===UC)return g.BYTE;if(E===zC)return g.SHORT;if(E===qm)return g.UNSIGNED_SHORT;if(E===t1)return g.INT;if(E===io)return g.UNSIGNED_INT;if(E===Ps)return g.FLOAT;if(E===ff)return x?g.HALF_FLOAT:(y=e.get("OES_texture_half_float"),y!==null?y.HALF_FLOAT_OES:null);if(E===GC)return g.ALPHA;if(E===Er)return g.RGBA;if(E===VC)return g.LUMINANCE;if(E===HC)return g.LUMINANCE_ALPHA;if(E===rl)return g.DEPTH_COMPONENT;if(E===Lh)return g.DEPTH_STENCIL;if(E===fm)return y=e.get("EXT_sRGB"),y!==null?y.SRGB_ALPHA_EXT:null;if(E===WC)return g.RED;if(E===n1)return g.RED_INTEGER;if(E===XC)return g.RG;if(E===r1)return g.RG_INTEGER;if(E===s1)return g.RGBA_INTEGER;if(E===Kv||E===jv||E===Zv||E===Jv)if(t===Di)if(y=e.get("WEBGL_compressed_texture_s3tc_srgb"),y!==null){if(E===Kv)return y.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(E===jv)return y.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(E===Zv)return y.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(E===Jv)return y.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(y=e.get("WEBGL_compressed_texture_s3tc"),y!==null){if(E===Kv)return y.COMPRESSED_RGB_S3TC_DXT1_EXT;if(E===jv)return y.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(E===Zv)return y.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(E===Jv)return y.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(E===Gy||E===Vy||E===Hy||E===Wy)if(y=e.get("WEBGL_compressed_texture_pvrtc"),y!==null){if(E===Gy)return y.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(E===Vy)return y.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(E===Hy)return y.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(E===Wy)return y.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(E===a1)return y=e.get("WEBGL_compressed_texture_etc1"),y!==null?y.COMPRESSED_RGB_ETC1_WEBGL:null;if(E===Xy||E===Yy)if(y=e.get("WEBGL_compressed_texture_etc"),y!==null){if(E===Xy)return t===Di?y.COMPRESSED_SRGB8_ETC2:y.COMPRESSED_RGB8_ETC2;if(E===Yy)return t===Di?y.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:y.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(E===ky||E===Ky||E===jy||E===Zy||E===Jy||E===$y||E===Qy||E===_y||E===qy||E===tx||E===ex||E===ix||E===nx||E===rx)if(y=e.get("WEBGL_compressed_texture_astc"),y!==null){if(E===ky)return t===Di?y.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:y.COMPRESSED_RGBA_ASTC_4x4_KHR;if(E===Ky)return t===Di?y.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:y.COMPRESSED_RGBA_ASTC_5x4_KHR;if(E===jy)return t===Di?y.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:y.COMPRESSED_RGBA_ASTC_5x5_KHR;if(E===Zy)return t===Di?y.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:y.COMPRESSED_RGBA_ASTC_6x5_KHR;if(E===Jy)return t===Di?y.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:y.COMPRESSED_RGBA_ASTC_6x6_KHR;if(E===$y)return t===Di?y.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:y.COMPRESSED_RGBA_ASTC_8x5_KHR;if(E===Qy)return t===Di?y.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:y.COMPRESSED_RGBA_ASTC_8x6_KHR;if(E===_y)return t===Di?y.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:y.COMPRESSED_RGBA_ASTC_8x8_KHR;if(E===qy)return t===Di?y.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:y.COMPRESSED_RGBA_ASTC_10x5_KHR;if(E===tx)return t===Di?y.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:y.COMPRESSED_RGBA_ASTC_10x6_KHR;if(E===ex)return t===Di?y.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:y.COMPRESSED_RGBA_ASTC_10x8_KHR;if(E===ix)return t===Di?y.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:y.COMPRESSED_RGBA_ASTC_10x10_KHR;if(E===nx)return t===Di?y.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:y.COMPRESSED_RGBA_ASTC_12x10_KHR;if(E===rx)return t===Di?y.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:y.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(E===$v||E===sx||E===ax)if(y=e.get("EXT_texture_compression_bptc"),y!==null){if(E===$v)return t===Di?y.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:y.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(E===sx)return y.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(E===ax)return y.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(E===YC||E===ox||E===lx||E===hx)if(y=e.get("EXT_texture_compression_rgtc"),y!==null){if(E===$v)return y.COMPRESSED_RED_RGTC1_EXT;if(E===ox)return y.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(E===lx)return y.COMPRESSED_RED_GREEN_RGTC2_EXT;if(E===hx)return y.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return E===nl?x?g.UNSIGNED_INT_24_8:(y=e.get("WEBGL_depth_texture"),y!==null?y.UNSIGNED_INT_24_8_WEBGL:null):g[E]!==void 0?g[E]:null}return{convert:T}}class xA extends Yn{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}class ef extends vi{constructor(){super(),this.isGroup=!0,this.type="Group"}}const I6={type:"move"};class X0{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new ef,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 ef,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new pt,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new pt),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new ef,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new pt,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new pt),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const i=this._hand;if(i)for(const x of e.hand.values())this._getHandJoint(i,x)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,i,x){let T=null,E=null,a=null;const y=this._targetRay,t=this._grip,r=this._hand;if(e&&i.session.visibilityState!=="visible-blurred"){if(r&&e.hand){a=!0;for(const u of e.hand.values()){const f=i.getJointPose(u,x),s=this._getHandJoint(r,u);f!==null&&(s.matrix.fromArray(f.transform.matrix),s.matrix.decompose(s.position,s.rotation,s.scale),s.matrixWorldNeedsUpdate=!0,s.jointRadius=f.radius),s.visible=f!==null}const p=r.joints["index-finger-tip"],h=r.joints["thumb-tip"],o=p.position.distanceTo(h.position),l=.02,n=.005;r.inputState.pinching&&o>l+n?(r.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!r.inputState.pinching&&o<=l-n&&(r.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else t!==null&&e.gripSpace&&(E=i.getPose(e.gripSpace,x),E!==null&&(t.matrix.fromArray(E.transform.matrix),t.matrix.decompose(t.position,t.rotation,t.scale),t.matrixWorldNeedsUpdate=!0,E.linearVelocity?(t.hasLinearVelocity=!0,t.linearVelocity.copy(E.linearVelocity)):t.hasLinearVelocity=!1,E.angularVelocity?(t.hasAngularVelocity=!0,t.angularVelocity.copy(E.angularVelocity)):t.hasAngularVelocity=!1));y!==null&&(T=i.getPose(e.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(I6)))}return y!==null&&(y.visible=T!==null),t!==null&&(t.visible=E!==null),r!==null&&(r.visible=a!==null),this}_getHandJoint(e,i){if(e.joints[i.jointName]===void 0){const x=new ef;x.matrixAutoUpdate=!1,x.visible=!1,e.joints[i.jointName]=x,e.add(x)}return e.joints[i.jointName]}}const N6=` +void main() { + + gl_Position = vec4( position, 1.0 ); + +}`,B6=` +uniform sampler2DArray depthColor; +uniform float depthWidth; +uniform float depthHeight; + +void main() { + + vec2 coord = vec2( gl_FragCoord.x / depthWidth, gl_FragCoord.y / depthHeight ); + + if ( coord.x >= 1.0 ) { + + gl_FragDepthEXT = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r; + + } else { + + gl_FragDepthEXT = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r; + + } + +}`;class U6{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,i,x){if(this.texture===null){const T=new Zi,E=e.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(e,i){if(this.texture!==null){if(this.mesh===null){const x=i.cameras[0].viewport,T=new Qs({extensions:{fragDepth:!0},vertexShader:N6,fragmentShader:B6,uniforms:{depthColor:{value:this.texture},depthWidth:{value:x.z},depthHeight:{value:x.w}}});this.mesh=new En(new Sf(20,20),T)}e.render(this.mesh,i)}}reset(){this.texture=null,this.mesh=null}}class z6 extends ho{constructor(e,i){super();const x=this;let T=null,E=1,a=null,y="local-floor",t=1,r=null,p=null,h=null,o=null,l=null,n=null;const u=new U6,f=i.getContextAttributes();let s=null,c=null;const d=[],v=[],m=new jt;let S=null;const M=new Yn;M.layers.enable(1),M.viewport=new Si;const A=new Yn;A.layers.enable(2),A.viewport=new Si;const C=[M,A],w=new xA;w.layers.enable(1),w.layers.enable(2);let P=null,L=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(K){let U=d[K];return U===void 0&&(U=new X0,d[K]=U),U.getTargetRaySpace()},this.getControllerGrip=function(K){let U=d[K];return U===void 0&&(U=new X0,d[K]=U),U.getGripSpace()},this.getHand=function(K){let U=d[K];return U===void 0&&(U=new X0,d[K]=U),U.getHandSpace()};function O(K){const U=v.indexOf(K.inputSource);if(U===-1)return;const V=d[U];V!==void 0&&(V.update(K.inputSource,K.frame,r||a),V.dispatchEvent({type:K.type,data:K.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 K=0;K=0&&(v[j]=null,d[j].disconnect(V))}for(let U=0;U=v.length){v.push(V),j=q;break}else if(v[q]===null){v[q]=V,j=q;break}if(j===-1)break}const $=d[j];$&&$.connect(V)}}const B=new pt,G=new pt;function z(K,U,V){B.setFromMatrixPosition(U.matrixWorld),G.setFromMatrixPosition(V.matrixWorld);const j=B.distanceTo(G),$=U.projectionMatrix.elements,q=V.projectionMatrix.elements,it=$[14]/($[10]-1),nt=$[14]/($[10]+1),et=($[9]+1)/$[5],ht=($[9]-1)/$[5],ut=($[8]-1)/$[0],dt=(q[8]+1)/q[0],mt=it*ut,gt=it*dt,At=j/(-ut+dt),ot=At*-ut;U.matrixWorld.decompose(K.position,K.quaternion,K.scale),K.translateX(ot),K.translateZ(At),K.matrixWorld.compose(K.position,K.quaternion,K.scale),K.matrixWorldInverse.copy(K.matrixWorld).invert();const st=it+At,yt=nt+At,Tt=mt-ot,wt=gt+(j-ot),Et=et*nt/yt*st,Gt=ht*nt/yt*st;K.projectionMatrix.makePerspective(Tt,wt,Et,Gt,st,yt),K.projectionMatrixInverse.copy(K.projectionMatrix).invert()}function W(K,U){U===null?K.matrixWorld.copy(K.matrix):K.matrixWorld.multiplyMatrices(U.matrixWorld,K.matrix),K.matrixWorldInverse.copy(K.matrixWorld).invert()}this.updateCamera=function(K){if(T===null)return;u.texture!==null&&(K.near=u.depthNear,K.far=u.depthFar),w.near=A.near=M.near=K.near,w.far=A.far=M.far=K.far,(P!==w.near||L!==w.far)&&(T.updateRenderState({depthNear:w.near,depthFar:w.far}),P=w.near,L=w.far,M.near=P,M.far=L,A.near=P,A.far=L,M.updateProjectionMatrix(),A.updateProjectionMatrix(),K.updateProjectionMatrix());const U=K.parent,V=w.cameras;W(w,U);for(let j=0;j0&&(f.alphaTest.value=s.alphaTest);const c=e.get(s).envMap;if(c&&(f.envMap.value=c,f.flipEnvMap.value=c.isCubeTexture&&c.isRenderTargetTexture===!1?-1:1,f.reflectivity.value=s.reflectivity,f.ior.value=s.ior,f.refractionRatio.value=s.refractionRatio),s.lightMap){f.lightMap.value=s.lightMap;const d=g._useLegacyLights===!0?Math.PI:1;f.lightMapIntensity.value=s.lightMapIntensity*d,i(s.lightMap,f.lightMapTransform)}s.aoMap&&(f.aoMap.value=s.aoMap,f.aoMapIntensity.value=s.aoMapIntensity,i(s.aoMap,f.aoMapTransform))}function a(f,s){f.diffuse.value.copy(s.color),f.opacity.value=s.opacity,s.map&&(f.map.value=s.map,i(s.map,f.mapTransform))}function y(f,s){f.dashSize.value=s.dashSize,f.totalSize.value=s.dashSize+s.gapSize,f.scale.value=s.scale}function t(f,s,c,d){f.diffuse.value.copy(s.color),f.opacity.value=s.opacity,f.size.value=s.size*c,f.scale.value=d*.5,s.map&&(f.map.value=s.map,i(s.map,f.uvTransform)),s.alphaMap&&(f.alphaMap.value=s.alphaMap,i(s.alphaMap,f.alphaMapTransform)),s.alphaTest>0&&(f.alphaTest.value=s.alphaTest)}function r(f,s){f.diffuse.value.copy(s.color),f.opacity.value=s.opacity,f.rotation.value=s.rotation,s.map&&(f.map.value=s.map,i(s.map,f.mapTransform)),s.alphaMap&&(f.alphaMap.value=s.alphaMap,i(s.alphaMap,f.alphaMapTransform)),s.alphaTest>0&&(f.alphaTest.value=s.alphaTest)}function p(f,s){f.specular.value.copy(s.specular),f.shininess.value=Math.max(s.shininess,1e-4)}function h(f,s){s.gradientMap&&(f.gradientMap.value=s.gradientMap)}function o(f,s){f.metalness.value=s.metalness,s.metalnessMap&&(f.metalnessMap.value=s.metalnessMap,i(s.metalnessMap,f.metalnessMapTransform)),f.roughness.value=s.roughness,s.roughnessMap&&(f.roughnessMap.value=s.roughnessMap,i(s.roughnessMap,f.roughnessMapTransform)),e.get(s).envMap&&(f.envMapIntensity.value=s.envMapIntensity)}function l(f,s,c){f.ior.value=s.ior,s.sheen>0&&(f.sheenColor.value.copy(s.sheenColor).multiplyScalar(s.sheen),f.sheenRoughness.value=s.sheenRoughness,s.sheenColorMap&&(f.sheenColorMap.value=s.sheenColorMap,i(s.sheenColorMap,f.sheenColorMapTransform)),s.sheenRoughnessMap&&(f.sheenRoughnessMap.value=s.sheenRoughnessMap,i(s.sheenRoughnessMap,f.sheenRoughnessMapTransform))),s.clearcoat>0&&(f.clearcoat.value=s.clearcoat,f.clearcoatRoughness.value=s.clearcoatRoughness,s.clearcoatMap&&(f.clearcoatMap.value=s.clearcoatMap,i(s.clearcoatMap,f.clearcoatMapTransform)),s.clearcoatRoughnessMap&&(f.clearcoatRoughnessMap.value=s.clearcoatRoughnessMap,i(s.clearcoatRoughnessMap,f.clearcoatRoughnessMapTransform)),s.clearcoatNormalMap&&(f.clearcoatNormalMap.value=s.clearcoatNormalMap,i(s.clearcoatNormalMap,f.clearcoatNormalMapTransform),f.clearcoatNormalScale.value.copy(s.clearcoatNormalScale),s.side===Cr&&f.clearcoatNormalScale.value.negate())),s.iridescence>0&&(f.iridescence.value=s.iridescence,f.iridescenceIOR.value=s.iridescenceIOR,f.iridescenceThicknessMinimum.value=s.iridescenceThicknessRange[0],f.iridescenceThicknessMaximum.value=s.iridescenceThicknessRange[1],s.iridescenceMap&&(f.iridescenceMap.value=s.iridescenceMap,i(s.iridescenceMap,f.iridescenceMapTransform)),s.iridescenceThicknessMap&&(f.iridescenceThicknessMap.value=s.iridescenceThicknessMap,i(s.iridescenceThicknessMap,f.iridescenceThicknessMapTransform))),s.transmission>0&&(f.transmission.value=s.transmission,f.transmissionSamplerMap.value=c.texture,f.transmissionSamplerSize.value.set(c.width,c.height),s.transmissionMap&&(f.transmissionMap.value=s.transmissionMap,i(s.transmissionMap,f.transmissionMapTransform)),f.thickness.value=s.thickness,s.thicknessMap&&(f.thicknessMap.value=s.thicknessMap,i(s.thicknessMap,f.thicknessMapTransform)),f.attenuationDistance.value=s.attenuationDistance,f.attenuationColor.value.copy(s.attenuationColor)),s.anisotropy>0&&(f.anisotropyVector.value.set(s.anisotropy*Math.cos(s.anisotropyRotation),s.anisotropy*Math.sin(s.anisotropyRotation)),s.anisotropyMap&&(f.anisotropyMap.value=s.anisotropyMap,i(s.anisotropyMap,f.anisotropyMapTransform))),f.specularIntensity.value=s.specularIntensity,f.specularColor.value.copy(s.specularColor),s.specularColorMap&&(f.specularColorMap.value=s.specularColorMap,i(s.specularColorMap,f.specularColorMapTransform)),s.specularIntensityMap&&(f.specularIntensityMap.value=s.specularIntensityMap,i(s.specularIntensityMap,f.specularIntensityMapTransform))}function n(f,s){s.matcap&&(f.matcap.value=s.matcap)}function u(f,s){const c=e.get(s).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 V6(g,e,i,x){let T={},E={},a=[];const y=i.isWebGL2?g.getParameter(g.MAX_UNIFORM_BUFFER_BINDINGS):0;function t(c,d){const v=d.program;x.uniformBlockBinding(c,v)}function r(c,d){let v=T[c.id];v===void 0&&(n(c),v=p(c),T[c.id]=v,c.addEventListener("dispose",f));const m=d.program;x.updateUBOMapping(c,m);const S=e.render.frame;E[c.id]!==S&&(o(c),E[c.id]=S)}function p(c){const d=h();c.__bindingPointIndex=d;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,d,v),v}function h(){for(let c=0;c0&&(v+=m-S),c.__size=v,c.__cache={},this}function u(c){const d={boundary:0,storage:0};return typeof c=="number"||typeof c=="boolean"?(d.boundary=4,d.storage=4):c.isVector2?(d.boundary=8,d.storage=8):c.isVector3||c.isColor?(d.boundary=16,d.storage=12):c.isVector4?(d.boundary=16,d.storage=16):c.isMatrix3?(d.boundary=48,d.storage=48):c.isMatrix4?(d.boundary=64,d.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),d}function f(c){const d=c.target;d.removeEventListener("dispose",f);const v=a.indexOf(d.__bindingPointIndex);a.splice(v,1),g.deleteBuffer(T[d.id]),delete T[d.id],delete E[d.id]}function s(){for(const c in T)g.deleteBuffer(T[c]);a=[],T={},E={}}return{bind:t,update:r,dispose:s}}class x1{constructor(e={}){const{canvas:i=sA(),context:x=null,depth:T=!0,stencil:E=!0,alpha:a=!1,antialias:y=!1,premultipliedAlpha:t=!0,preserveDrawingBuffer:r=!1,powerPreference:p="default",failIfMajorPerformanceCaveat:h=!1}=e;this.isWebGLRenderer=!0;let o;x!==null?o=x.getContextAttributes().alpha:o=a;const l=new Uint32Array(4),n=new Int32Array(4);let u=null,f=null;const s=[],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=Ln,this._useLegacyLights=!1,this.toneMapping=Ta,this.toneMappingExposure=1;const d=this;let v=!1,m=0,S=0,M=null,A=-1,C=null;const w=new Si,P=new Si;let L=null;const O=new fe(0);let I=0,D=i.width,B=i.height,G=1,z=null,W=null;const k=new Si(0,0,D,B),J=new Si(0,0,D,B);let Q=!1;const Y=new Rd;let K=!1,U=!1,V=null;const j=new Ve,$=new jt,q=new pt,it={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function nt(){return M===null?G:1}let et=x;function ht(ct,bt){for(let Bt=0;Bt{function he(){if(zt.forEach(function(me){At.get(me).currentProgram.isReady()&&zt.delete(me)}),zt.size===0){Dt(ct);return}setTimeout(he,10)}ut.get("KHR_parallel_shader_compile")!==null?he():setTimeout(he,10)})};let pi=null;function $i(ct){pi&&pi(ct)}function jn(){rn.stop()}function mi(){rn.start()}const rn=new cA;rn.setAnimationLoop($i),typeof self<"u"&&rn.setContext(self),this.setAnimationLoop=function(ct){pi=ct,Be.setAnimationLoop(ct),ct===null?rn.stop():rn.start()},Be.addEventListener("sessionstart",jn),Be.addEventListener("sessionend",mi),this.render=function(ct,bt){if(bt!==void 0&&bt.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(v===!0)return;ct.matrixWorldAutoUpdate===!0&&ct.updateMatrixWorld(),bt.parent===null&&bt.matrixWorldAutoUpdate===!0&&bt.updateMatrixWorld(),Be.enabled===!0&&Be.isPresenting===!0&&(Be.cameraAutoUpdate===!0&&Be.updateCamera(bt),bt=Be.getCamera()),ct.isScene===!0&&ct.onBeforeRender(d,ct,bt,M),f=$t.get(ct,c.length),f.init(),c.push(f),j.multiplyMatrices(bt.projectionMatrix,bt.matrixWorldInverse),Y.setFromProjectionMatrix(j),U=this.localClippingEnabled,K=te.init(this.clippingPlanes,U),u=Jt.get(ct,s.length),u.init(),s.push(u),Pr(ct,bt,0,d.sortObjects),u.finish(),d.sortObjects===!0&&u.sort(z,W),this.info.render.frame++,K===!0&&te.beginShadows();const Bt=f.state.shadowsArray;if(Nt.render(Bt,ct,bt),K===!0&&te.endShadows(),this.info.autoReset===!0&&this.info.reset(),(Be.enabled===!1||Be.isPresenting===!1||Be.hasDepthSensing()===!1)&&Te.render(u,ct),f.setupLights(d._useLegacyLights),bt.isArrayCamera){const zt=bt.cameras;for(let Dt=0,he=zt.length;Dt0?f=c[c.length-1]:f=null,s.pop(),s.length>0?u=s[s.length-1]:u=null};function Pr(ct,bt,Bt,zt){if(ct.visible===!1)return;if(ct.layers.test(bt.layers)){if(ct.isGroup)Bt=ct.renderOrder;else if(ct.isLOD)ct.autoUpdate===!0&&ct.update(bt);else if(ct.isLight)f.pushLight(ct),ct.castShadow&&f.pushShadow(ct);else if(ct.isSprite){if(!ct.frustumCulled||Y.intersectsSprite(ct)){zt&&q.setFromMatrixPosition(ct.matrixWorld).applyMatrix4(j);const me=Et.update(ct),Re=ct.material;Re.visible&&u.push(ct,me,Re,Bt,q.z,null)}}else if((ct.isMesh||ct.isLine||ct.isPoints)&&(!ct.frustumCulled||Y.intersectsObject(ct))){const me=Et.update(ct),Re=ct.material;if(zt&&(ct.boundingSphere!==void 0?(ct.boundingSphere===null&&ct.computeBoundingSphere(),q.copy(ct.boundingSphere.center)):(me.boundingSphere===null&&me.computeBoundingSphere(),q.copy(me.boundingSphere.center)),q.applyMatrix4(ct.matrixWorld).applyMatrix4(j)),Array.isArray(Re)){const Ae=me.groups;for(let ze=0,Ue=Ae.length;ze0&&vl(Dt,he,bt,Bt),zt&&mt.viewport(w.copy(zt)),Dt.length>0&&uo(Dt,bt,Bt),he.length>0&&uo(he,bt,Bt),me.length>0&&uo(me,bt,Bt),mt.buffers.depth.setTest(!0),mt.buffers.depth.setMask(!0),mt.buffers.color.setMask(!0),mt.setPolygonOffset(!1)}function vl(ct,bt,Bt,zt){if((Bt.isScene===!0?Bt.overrideMaterial:null)!==null)return;const he=dt.isWebGL2;V===null&&(V=new $s(1,1,{generateMipmaps:!0,type:ut.has("EXT_color_buffer_half_float")?ff:Ea,minFilter:xa,samples:he?4:0})),d.getDrawingBufferSize($),he?V.setSize($.x,$.y):V.setSize(cm($.x),cm($.y));const me=d.getRenderTarget();d.setRenderTarget(V),d.getClearColor(O),I=d.getClearAlpha(),I<1&&d.setClearColor(16777215,.5),d.clear();const Re=d.toneMapping;d.toneMapping=Ta,uo(ct,Bt,zt),ot.updateMultisampleRenderTarget(V),ot.updateRenderTargetMipmap(V);let Ae=!1;for(let ze=0,Ue=bt.length;ze0),Ge=!!Bt.morphAttributes.position,bi=!!Bt.morphAttributes.normal,dn=!!Bt.morphAttributes.color;let Ci=Ta;zt.toneMapped&&(M===null||M.isXRRenderTarget===!0)&&(Ci=d.toneMapping);const pn=Bt.morphAttributes.position||Bt.morphAttributes.normal||Bt.morphAttributes.color,be=pn!==void 0?pn.length:0,de=At.get(zt),Rr=f.state.lights;if(K===!0&&(U===!0||ct!==C)){const Cn=ct===C&&zt.id===A;te.setState(zt,ct,Cn)}let Ke=!1;zt.version===de.__version?(de.needsLights&&de.lightsStateVersion!==Rr.state.version||de.outputColorSpace!==Re||Dt.isBatchedMesh&&de.batching===!1||!Dt.isBatchedMesh&&de.batching===!0||Dt.isInstancedMesh&&de.instancing===!1||!Dt.isInstancedMesh&&de.instancing===!0||Dt.isSkinnedMesh&&de.skinning===!1||!Dt.isSkinnedMesh&&de.skinning===!0||Dt.isInstancedMesh&&de.instancingColor===!0&&Dt.instanceColor===null||Dt.isInstancedMesh&&de.instancingColor===!1&&Dt.instanceColor!==null||de.envMap!==Ae||zt.fog===!0&&de.fog!==he||de.numClippingPlanes!==void 0&&(de.numClippingPlanes!==te.numPlanes||de.numIntersection!==te.numIntersection)||de.vertexAlphas!==ze||de.vertexTangents!==Ue||de.morphTargets!==Ge||de.morphNormals!==bi||de.morphColors!==dn||de.toneMapping!==Ci||dt.isWebGL2===!0&&de.morphTargetsCount!==be)&&(Ke=!0):(Ke=!0,de.__version=zt.version);let Ii=de.currentProgram;Ke===!0&&(Ii=fo(zt,bt,Dt));let Vr=!1,qn=!1,vn=!1;const Bi=Ii.getUniforms(),ur=de.uniforms;if(mt.useProgram(Ii.program)&&(Vr=!0,qn=!0,vn=!0),zt.id!==A&&(A=zt.id,qn=!0),Vr||C!==ct){Bi.setValue(et,"projectionMatrix",ct.projectionMatrix),Bi.setValue(et,"viewMatrix",ct.matrixWorldInverse);const Cn=Bi.map.cameraPosition;Cn!==void 0&&Cn.setValue(et,q.setFromMatrixPosition(ct.matrixWorld)),dt.logarithmicDepthBuffer&&Bi.setValue(et,"logDepthBufFC",2/(Math.log(ct.far+1)/Math.LN2)),(zt.isMeshPhongMaterial||zt.isMeshToonMaterial||zt.isMeshLambertMaterial||zt.isMeshBasicMaterial||zt.isMeshStandardMaterial||zt.isShaderMaterial)&&Bi.setValue(et,"isOrthographic",ct.isOrthographicCamera===!0),C!==ct&&(C=ct,qn=!0,vn=!0)}if(Dt.isSkinnedMesh){Bi.setOptional(et,Dt,"bindMatrix"),Bi.setOptional(et,Dt,"bindMatrixInverse");const Cn=Dt.skeleton;Cn&&(dt.floatVertexTextures?(Cn.boneTexture===null&&Cn.computeBoneTexture(),Bi.setValue(et,"boneTexture",Cn.boneTexture,ot)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}Dt.isBatchedMesh&&(Bi.setOptional(et,Dt,"batchingTexture"),Bi.setValue(et,"batchingTexture",Dt._matricesTexture,ot));const Ra=Bt.morphAttributes;if((Ra.position!==void 0||Ra.normal!==void 0||Ra.color!==void 0&&dt.isWebGL2===!0)&&le.update(Dt,Bt,Ii),(qn||de.receiveShadow!==Dt.receiveShadow)&&(de.receiveShadow=Dt.receiveShadow,Bi.setValue(et,"receiveShadow",Dt.receiveShadow)),zt.isMeshGouraudMaterial&&zt.envMap!==null&&(ur.envMap.value=Ae,ur.flipEnvMap.value=Ae.isCubeTexture&&Ae.isRenderTargetTexture===!1?-1:1),qn&&(Bi.setValue(et,"toneMappingExposure",d.toneMappingExposure),de.needsLights&&Af(ur,vn),he&&zt.fog===!0&&Wt.refreshFogUniforms(ur,he),Wt.refreshMaterialUniforms(ur,zt,G,B,V),qv.upload(et,zh(de),ur,ot)),zt.isShaderMaterial&&zt.uniformsNeedUpdate===!0&&(qv.upload(et,zh(de),ur,ot),zt.uniformsNeedUpdate=!1),zt.isSpriteMaterial&&Bi.setValue(et,"center",Dt.center),Bi.setValue(et,"modelViewMatrix",Dt.modelViewMatrix),Bi.setValue(et,"normalMatrix",Dt.normalMatrix),Bi.setValue(et,"modelMatrix",Dt.matrixWorld),zt.isShaderMaterial||zt.isRawShaderMaterial){const Cn=zt.uniformsGroups;for(let La=0,tr=Cn.length;La0&&ot.useMultisampledRTT(ct)===!1?Dt=At.get(ct).__webglMultisampledFramebuffer:Array.isArray(Ue)?Dt=Ue[Bt]:Dt=Ue,w.copy(ct.viewport),P.copy(ct.scissor),L=ct.scissorTest}else w.copy(k).multiplyScalar(G).floor(),P.copy(J).multiplyScalar(G).floor(),L=Q;if(mt.bindFramebuffer(et.FRAMEBUFFER,Dt)&&dt.drawBuffers&&zt&&mt.drawBuffers(ct,Dt),mt.viewport(w),mt.scissor(P),mt.setScissorTest(L),he){const Ae=At.get(ct.texture);et.framebufferTexture2D(et.FRAMEBUFFER,et.COLOR_ATTACHMENT0,et.TEXTURE_CUBE_MAP_POSITIVE_X+bt,Ae.__webglTexture,Bt)}else if(me){const Ae=At.get(ct.texture),ze=bt||0;et.framebufferTextureLayer(et.FRAMEBUFFER,et.COLOR_ATTACHMENT0,Ae.__webglTexture,Bt||0,ze)}A=-1},this.readRenderTargetPixels=function(ct,bt,Bt,zt,Dt,he,me){if(!(ct&&ct.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let Re=At.get(ct).__webglFramebuffer;if(ct.isWebGLCubeRenderTarget&&me!==void 0&&(Re=Re[me]),Re){mt.bindFramebuffer(et.FRAMEBUFFER,Re);try{const Ae=ct.texture,ze=Ae.format,Ue=Ae.type;if(ze!==Er&&ee.convert(ze)!==et.getParameter(et.IMPLEMENTATION_COLOR_READ_FORMAT)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}const Ge=Ue===ff&&(ut.has("EXT_color_buffer_half_float")||dt.isWebGL2&&ut.has("EXT_color_buffer_float"));if(Ue!==Ea&&ee.convert(Ue)!==et.getParameter(et.IMPLEMENTATION_COLOR_READ_TYPE)&&!(Ue===Ps&&(dt.isWebGL2||ut.has("OES_texture_float")||ut.has("WEBGL_color_buffer_float")))&&!Ge){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}bt>=0&&bt<=ct.width-zt&&Bt>=0&&Bt<=ct.height-Dt&&et.readPixels(bt,Bt,zt,Dt,ee.convert(ze),ee.convert(Ue),he)}finally{const Ae=M!==null?At.get(M).__webglFramebuffer:null;mt.bindFramebuffer(et.FRAMEBUFFER,Ae)}}},this.copyFramebufferToTexture=function(ct,bt,Bt=0){const zt=Math.pow(2,-Bt),Dt=Math.floor(bt.image.width*zt),he=Math.floor(bt.image.height*zt);ot.setTexture2D(bt,0),et.copyTexSubImage2D(et.TEXTURE_2D,Bt,0,0,ct.x,ct.y,Dt,he),mt.unbindTexture()},this.copyTextureToTexture=function(ct,bt,Bt,zt=0){const Dt=bt.image.width,he=bt.image.height,me=ee.convert(Bt.format),Re=ee.convert(Bt.type);ot.setTexture2D(Bt,0),et.pixelStorei(et.UNPACK_FLIP_Y_WEBGL,Bt.flipY),et.pixelStorei(et.UNPACK_PREMULTIPLY_ALPHA_WEBGL,Bt.premultiplyAlpha),et.pixelStorei(et.UNPACK_ALIGNMENT,Bt.unpackAlignment),bt.isDataTexture?et.texSubImage2D(et.TEXTURE_2D,zt,ct.x,ct.y,Dt,he,me,Re,bt.image.data):bt.isCompressedTexture?et.compressedTexSubImage2D(et.TEXTURE_2D,zt,ct.x,ct.y,bt.mipmaps[0].width,bt.mipmaps[0].height,me,bt.mipmaps[0].data):et.texSubImage2D(et.TEXTURE_2D,zt,ct.x,ct.y,me,Re,bt.image),zt===0&&Bt.generateMipmaps&&et.generateMipmap(et.TEXTURE_2D),mt.unbindTexture()},this.copyTextureToTexture3D=function(ct,bt,Bt,zt,Dt=0){if(d.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}const he=ct.max.x-ct.min.x+1,me=ct.max.y-ct.min.y+1,Re=ct.max.z-ct.min.z+1,Ae=ee.convert(zt.format),ze=ee.convert(zt.type);let Ue;if(zt.isData3DTexture)ot.setTexture3D(zt,0),Ue=et.TEXTURE_3D;else if(zt.isDataArrayTexture||zt.isCompressedArrayTexture)ot.setTexture2DArray(zt,0),Ue=et.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}et.pixelStorei(et.UNPACK_FLIP_Y_WEBGL,zt.flipY),et.pixelStorei(et.UNPACK_PREMULTIPLY_ALPHA_WEBGL,zt.premultiplyAlpha),et.pixelStorei(et.UNPACK_ALIGNMENT,zt.unpackAlignment);const Ge=et.getParameter(et.UNPACK_ROW_LENGTH),bi=et.getParameter(et.UNPACK_IMAGE_HEIGHT),dn=et.getParameter(et.UNPACK_SKIP_PIXELS),Ci=et.getParameter(et.UNPACK_SKIP_ROWS),pn=et.getParameter(et.UNPACK_SKIP_IMAGES),be=Bt.isCompressedTexture?Bt.mipmaps[Dt]:Bt.image;et.pixelStorei(et.UNPACK_ROW_LENGTH,be.width),et.pixelStorei(et.UNPACK_IMAGE_HEIGHT,be.height),et.pixelStorei(et.UNPACK_SKIP_PIXELS,ct.min.x),et.pixelStorei(et.UNPACK_SKIP_ROWS,ct.min.y),et.pixelStorei(et.UNPACK_SKIP_IMAGES,ct.min.z),Bt.isDataTexture||Bt.isData3DTexture?et.texSubImage3D(Ue,Dt,bt.x,bt.y,bt.z,he,me,Re,Ae,ze,be.data):Bt.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),et.compressedTexSubImage3D(Ue,Dt,bt.x,bt.y,bt.z,he,me,Re,Ae,be.data)):et.texSubImage3D(Ue,Dt,bt.x,bt.y,bt.z,he,me,Re,Ae,ze,be),et.pixelStorei(et.UNPACK_ROW_LENGTH,Ge),et.pixelStorei(et.UNPACK_IMAGE_HEIGHT,bi),et.pixelStorei(et.UNPACK_SKIP_PIXELS,dn),et.pixelStorei(et.UNPACK_SKIP_ROWS,Ci),et.pixelStorei(et.UNPACK_SKIP_IMAGES,pn),Dt===0&&zt.generateMipmaps&&et.generateMipmap(Ue),mt.unbindTexture()},this.initTexture=function(ct){ct.isCubeTexture?ot.setTextureCube(ct,0):ct.isData3DTexture?ot.setTexture3D(ct,0):ct.isDataArrayTexture||ct.isCompressedArrayTexture?ot.setTexture2DArray(ct,0):ot.setTexture2D(ct,0),mt.unbindTexture()},this.resetState=function(){m=0,S=0,M=null,mt.reset(),Ce.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Sa}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const i=this.getContext();i.drawingBufferColorSpace=e===eg?"display-p3":"srgb",i.unpackColorSpace=xi.workingColorSpace===Ad?"display-p3":"srgb"}get outputEncoding(){return console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace===Ln?sl:l1}set outputEncoding(e){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=e===sl?Ln:Ca}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(e){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=e}}class SA extends x1{}SA.prototype.isWebGL1Renderer=!0;class rg{constructor(e,i=25e-5){this.isFogExp2=!0,this.name="",this.color=new fe(e),this.density=i}clone(){return new rg(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class sg{constructor(e,i=1,x=1e3){this.isFog=!0,this.name="",this.color=new fe(e),this.near=i,this.far=x}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 dm extends vi{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(e,i){return super.copy(e,i),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const i=super.toJSON(e);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 ag{constructor(e,i){this.isInterleavedBuffer=!0,this.array=e,this.stride=i,this.count=e!==void 0?e.length/i:0,this.usage=ld,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.version=0,this.uuid=as()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return Eh("THREE.InterleavedBuffer: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,i){this.updateRanges.push({start:e,count:i})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,i,x){e*=this.stride,x*=i.stride;for(let T=0,E=this.stride;Te.far||i.push({distance:t,point:Cc.clone(),uv:ss.getInterpolation(Cc,dv,wc,pv,aE,Y0,oE,new jt),face:null,object:this})}copy(e,i){return super.copy(e,i),e.center!==void 0&&this.center.copy(e.center),this.material=e.material,this}}function vv(g,e,i,x,T,E){Wu.subVectors(g,i).addScalar(.5).multiply(x),T!==void 0?(Ac.x=E*Wu.x-T*Wu.y,Ac.y=T*Wu.x+E*Wu.y):Ac.copy(Wu),g.copy(e),g.x+=Ac.x,g.y+=Ac.y,g.applyMatrix4(TA)}const mv=new pt,lE=new pt;class MA extends vi{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const i=e.levels;for(let x=0,T=i.length;x0){let x,T;for(x=1,T=i.length;x0){mv.setFromMatrixPosition(this.matrixWorld);const T=e.ray.origin.distanceTo(mv);this.getObjectForDistance(T).raycast(e,i)}}update(e){const i=this.levels;if(i.length>1){mv.setFromMatrixPosition(e.matrixWorld),lE.setFromMatrixPosition(this.matrixWorld);const x=mv.distanceTo(lE)/e.zoom;i[0].object.visible=!0;let T,E;for(T=1,E=i.length;T=a)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=e.start,E.count=e.count,E.z=i}reset(){this.list.length=0,this.index=0}}const Yu="batchId",Qo=new Ve,gE=new Ve,j6=new Ve,yE=new Ve,j0=new Rd,xv=new Ar,ih=new hr,Lc=new pt,Z0=new K6,ar=new En,Sv=[];function Z6(g,e,i=0){const x=e.itemSize;if(g.isInterleavedBufferAttribute||g.array.constructor!==e.array.constructor){const T=g.count;for(let E=0;E65536?new Uint32Array(E):new Uint16Array(E);i.setIndex(new Ti(y,1))}const a=T>65536?new Uint32Array(x):new Uint16Array(x);i.setAttribute(Yu,new Ti(a,1)),this._geometryInitialized=!0}}_validateGeometry(e){if(e.getAttribute(Yu))throw new Error(`BatchedMesh: Geometry cannot use attribute "${Yu}"`);const i=this.geometry;if(!!e.getIndex()!=!!i.getIndex())throw new Error('BatchedMesh: All geometries must consistently have "index".');for(const x in i.attributes){if(x===Yu)continue;if(!e.hasAttribute(x))throw new Error(`BatchedMesh: Added geometry missing "${x}". All geometries must have consistent attributes.`);const T=e.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(e){return this.customSort=e,this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Ar);const e=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 a=this._reservedRanges,y=this._drawRanges,t=this._bounds;this._geometryCount!==0&&(E=a[a.length-1]),i===-1?T.vertexCount=e.getAttribute("position").count:T.vertexCount=i,E===null?T.vertexStart=0:T.vertexStart=E.vertexStart+E.vertexCount;const r=e.getIndex(),p=r!==null;if(p&&(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,o=this._active,l=this._matricesTexture,n=this._matricesTexture.image.data;h.push(!0),o.push(!0);const u=this._geometryCount;this._geometryCount++,j6.toArray(n,u*16),l.needsUpdate=!0,a.push(T),y.push({start:p?T.indexStart:T.vertexStart,count:-1}),t.push({boxInitialized:!1,box:new Ar,sphereInitialized:!1,sphere:new hr});const f=this.geometry.getAttribute(Yu);for(let s=0;s=this._geometryCount)throw new Error("BatchedMesh: Maximum geometry count reached.");this._validateGeometry(i);const x=this.geometry,T=x.getIndex()!==null,E=x.getIndex(),a=i.getIndex(),y=this._reservedRanges[e];if(T&&a.count>y.indexCount||i.attributes.position.count>y.vertexCount)throw new Error("BatchedMesh: Reserved space not large enough for provided geometry.");const t=y.vertexStart,r=y.vertexCount;for(const l in x.attributes){if(l===Yu)continue;const n=i.getAttribute(l),u=x.getAttribute(l);Z6(n,u,t);const f=n.itemSize;for(let s=n.count,c=r;s=i.length||i[e]===!1?this:(i[e]=!1,this._visibilityChanged=!0,this)}getBoundingBoxAt(e,i){if(this._active[e]===!1)return null;const T=this._bounds[e],E=T.box,a=this.geometry;if(T.boxInitialized===!1){E.makeEmpty();const y=a.index,t=a.attributes.position,r=this._drawRanges[e];for(let p=r.start,h=r.start+r.count;p=a||x[e]===!1?this:(i.toArray(E,e*16),T.needsUpdate=!0,this)}getMatrixAt(e,i){const x=this._active,T=this._matricesTexture.image.data,E=this._geometryCount;return e>=E||x[e]===!1?null:i.fromArray(T,e*16)}setVisibleAt(e,i){const x=this._visibility,T=this._active,E=this._geometryCount;return e>=E||T[e]===!1||x[e]===i?this:(x[e]=i,this._visibilityChanged=!0,this)}getVisibleAt(e){const i=this._visibility,x=this._active,T=this._geometryCount;return e>=T||x[e]===!1?!1:i[e]}raycast(e,i){const x=this._visibility,T=this._active,E=this._drawRanges,a=this._geometryCount,y=this.matrixWorld,t=this.geometry;ar.material=this.material,ar.geometry.index=t.index,ar.geometry.attributes=t.attributes,ar.geometry.boundingBox===null&&(ar.geometry.boundingBox=new Ar),ar.geometry.boundingSphere===null&&(ar.geometry.boundingSphere=new hr);for(let r=0;r({...i})),this._reservedRanges=e._reservedRanges.map(i=>({...i})),this._visibility=e._visibility.slice(),this._active=e._active.slice(),this._bounds=e._bounds.map(i=>({boxInitialized:i.boxInitialized,box:i.box.clone(),sphereInitialized:i.sphereInitialized,sphere:i.sphere.clone()})),this._maxGeometryCount=e._maxGeometryCount,this._maxVertexCount=e._maxVertexCount,this._maxIndexCount=e._maxIndexCount,this._geometryInitialized=e._geometryInitialized,this._geometryCount=e._geometryCount,this._multiDrawCounts=e._multiDrawCounts.slice(),this._multiDrawStarts=e._multiDrawStarts.slice(),this._matricesTexture=e._matricesTexture.clone(),this._matricesTexture.image.data=this._matricesTexture.image.slice(),this}dispose(){return this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this}onBeforeRender(e,i,x,T,E){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;const a=T.getIndex(),y=a===null?1:a.array.BYTES_PER_ELEMENT,t=this._active,r=this._visibility,p=this._multiDrawStarts,h=this._multiDrawCounts,o=this._drawRanges,l=this.perObjectFrustumCulled;l&&(yE.multiplyMatrices(x.projectionMatrix,x.matrixWorldInverse).multiply(this.matrixWorld),j0.setFromProjectionMatrix(yE,e.coordinateSystem));let n=0;if(this.sortObjects){gE.copy(this.matrixWorld).invert(),Lc.setFromMatrixPosition(x.matrixWorld).applyMatrix4(gE);for(let s=0,c=r.length;st)continue;o.applyMatrix4(this.matrixWorld);const A=e.ray.origin.distanceTo(o);Ae.far||i.push({distance:A,point:h.clone().applyMatrix4(this.matrixWorld),index:d,face:null,faceIndex:null,object:this})}}else{const s=Math.max(0,a.start),c=Math.min(f.count,a.start+a.count);for(let d=s,v=c-1;dt)continue;o.applyMatrix4(this.matrixWorld);const S=e.ray.origin.distanceTo(o);Se.far||i.push({distance:S,point:h.clone().applyMatrix4(this.matrixWorld),index:d,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,a=T.length;E0){const T=i[x[0]];if(T!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let E=0,a=T.length;ET.far)return;E.push({distance:r,distanceToRay:Math.sqrt(y),point:t,index:e,face:null,object:a})}}class J6 extends Zi{constructor(e,i,x,T,E,a,y,t,r){super(e,i,x,T,E,a,y,t,r),this.isVideoTexture=!0,this.minFilter=a!==void 0?a:Ki,this.magFilter=E!==void 0?E:Ki,this.generateMipmaps=!1;const p=this;function h(){p.needsUpdate=!0,e.requestVideoFrameCallback(h)}"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback(h)}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;"requestVideoFrameCallback"in e===!1&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}class $6 extends Zi{constructor(e,i){super({width:e,height:i}),this.isFramebufferTexture=!0,this.magFilter=cn,this.minFilter=cn,this.generateMipmaps=!1,this.needsUpdate=!0}}class lg extends Zi{constructor(e,i,x,T,E,a,y,t,r,p,h,o){super(null,a,y,t,r,p,T,E,h,o),this.isCompressedTexture=!0,this.image={width:i,height:x},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class Q6 extends lg{constructor(e,i,x,T,E,a){super(e,i,x,E,a),this.isCompressedArrayTexture=!0,this.image.depth=T,this.wrapR=lr}}class _6 extends lg{constructor(e,i,x){super(void 0,e[0].width,e[0].height,i,x,oo),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}}class q6 extends Zi{constructor(e,i,x,T,E,a,y,t,r){super(e,i,x,T,E,a,y,t,r),this.isCanvasTexture=!0,this.needsUpdate=!0}}class _s{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,i){const x=this.getUtoTmapping(e);return this.getPoint(x,i)}getPoints(e=5){const i=[];for(let x=0;x<=e;x++)i.push(this.getPoint(x/e));return i}getSpacedPoints(e=5){const i=[];for(let x=0;x<=e;x++)i.push(this.getPointAt(x/e));return i}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const i=[];let x,T=this.getPoint(0),E=0;i.push(0);for(let a=1;a<=e;a++)x=this.getPoint(a/e),E+=x.distanceTo(T),i.push(E),T=x;return this.cacheArcLengths=i,i}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,i){const x=this.getLengths();let T=0;const E=x.length;let a;i?a=i:a=e*x[E-1];let y=0,t=E-1,r;for(;y<=t;)if(T=Math.floor(y+(t-y)/2),r=x[T]-a,r<0)y=T+1;else if(r>0)t=T-1;else{t=T;break}if(T=t,x[T]===a)return T/(E-1);const p=x[T],o=x[T+1]-p,l=(a-p)/o;return(T+l)/(E-1)}getTangent(e,i){let T=e-1e-4,E=e+1e-4;T<0&&(T=0),E>1&&(E=1);const a=this.getPoint(T),y=this.getPoint(E),t=i||(a.isVector2?new jt:new pt);return t.copy(y).sub(a).normalize(),t}getTangentAt(e,i){const x=this.getUtoTmapping(e);return this.getTangent(x,i)}computeFrenetFrames(e,i){const x=new pt,T=[],E=[],a=[],y=new pt,t=new Ve;for(let l=0;l<=e;l++){const n=l/e;T[l]=this.getTangentAt(n,new pt)}E[0]=new pt,a[0]=new pt;let r=Number.MAX_VALUE;const p=Math.abs(T[0].x),h=Math.abs(T[0].y),o=Math.abs(T[0].z);p<=r&&(r=p,x.set(1,0,0)),h<=r&&(r=h,x.set(0,1,0)),o<=r&&x.set(0,0,1),y.crossVectors(T[0],x).normalize(),E[0].crossVectors(T[0],y),a[0].crossVectors(T[0],E[0]);for(let l=1;l<=e;l++){if(E[l]=E[l-1].clone(),a[l]=a[l-1].clone(),y.crossVectors(T[l-1],T[l]),y.length()>Number.EPSILON){y.normalize();const n=Math.acos(nn(T[l-1].dot(T[l]),-1,1));E[l].applyMatrix4(t.makeRotationAxis(y,n))}a[l].crossVectors(T[l],E[l])}if(i===!0){let l=Math.acos(nn(E[0].dot(E[e]),-1,1));l/=e,T[0].dot(y.crossVectors(E[0],E[e]))>0&&(l=-l);for(let n=1;n<=e;n++)E[n].applyMatrix4(t.makeRotationAxis(T[n],l*n)),a[n].crossVectors(T[n],E[n])}return{tangents:T,normals:E,binormals:a}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.6,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class hg extends _s{constructor(e=0,i=0,x=1,T=1,E=0,a=Math.PI*2,y=!1,t=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=i,this.xRadius=x,this.yRadius=T,this.aStartAngle=E,this.aEndAngle=a,this.aClockwise=y,this.aRotation=t}getPoint(e,i){const x=i||new jt,T=Math.PI*2;let E=this.aEndAngle-this.aStartAngle;const a=Math.abs(E)T;)E-=T;E0?0:(Math.floor(Math.abs(y)/E)+1)*E:t===0&&y===E-1&&(y=E-2,t=1);let r,p;this.closed||y>0?r=T[(y-1)%E]:(Cv.subVectors(T[0],T[1]).add(T[0]),r=Cv);const h=T[y%E],o=T[(y+1)%E];if(this.closed||y+2T.length-2?T.length-1:a+1],h=T[a>T.length-3?T.length-1:a+2];return x.set(wE(y,t.x,r.x,p.x,h.x),wE(y,t.y,r.y,p.y,h.y)),x}copy(e){super.copy(e),this.points=[];for(let i=0,x=e.points.length;i=x){const a=T[E]-x,y=this.curves[E],t=y.getLength(),r=t===0?0:1-a/t;return y.getPointAt(r,i)}E++}return null}getLength(){const e=this.getCurveLengths();return e[e.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 e=[];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(e){super.copy(e),this.curves=[];for(let i=0,x=e.curves.length;i0){const h=r.getPoint(0);h.equals(this.currentPoint)||this.lineTo(h.x,h.y)}this.curves.push(r);const p=r.getPoint(1);return this.currentPoint.copy(p),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class bd extends ei{constructor(e=[new jt(0,-.5),new jt(.5,0),new jt(0,.5)],i=12,x=0,T=Math.PI*2){super(),this.type="LatheGeometry",this.parameters={points:e,segments:i,phiStart:x,phiLength:T},i=Math.floor(i),T=nn(T,0,Math.PI*2);const E=[],a=[],y=[],t=[],r=[],p=1/i,h=new pt,o=new jt,l=new pt,n=new pt,u=new pt;let f=0,s=0;for(let c=0;c<=e.length-1;c++)switch(c){case 0:f=e[c+1].x-e[c].x,s=e[c+1].y-e[c].y,l.x=s*1,l.y=-f,l.z=s*0,u.copy(l),l.normalize(),t.push(l.x,l.y,l.z);break;case e.length-1:t.push(u.x,u.y,u.z);break;default:f=e[c+1].x-e[c].x,s=e[c+1].y-e[c].y,l.x=s*1,l.y=-f,l.z=s*0,n.copy(l),l.x+=u.x,l.y+=u.y,l.z+=u.z,l.normalize(),t.push(l.x,l.y,l.z),u.copy(n)}for(let c=0;c<=i;c++){const d=x+c*p*T,v=Math.sin(d),m=Math.cos(d);for(let S=0;S<=e.length-1;S++){h.x=e[S].x*v,h.y=e[S].y,h.z=e[S].x*m,a.push(h.x,h.y,h.z),o.x=c/i,o.y=S/(e.length-1),y.push(o.x,o.y);const M=t[3*S+0]*v,A=t[3*S+1],C=t[3*S+0]*m;r.push(M,A,C)}}for(let c=0;c0&&d(!0),i>0&&d(!1)),this.setIndex(p),this.setAttribute("position",new xe(h,3)),this.setAttribute("normal",new xe(o,3)),this.setAttribute("uv",new xe(l,2));function c(){const v=new pt,m=new pt;let S=0;const M=(i-e)/x;for(let A=0;A<=E;A++){const C=[],w=A/E,P=w*(i-e)+e;for(let L=0;L<=T;L++){const O=L/T,I=O*t+y,D=Math.sin(I),B=Math.cos(I);m.x=P*D,m.y=-w*x+f,m.z=P*B,h.push(m.x,m.y,m.z),v.set(D,M,B).normalize(),o.push(v.x,v.y,v.z),l.push(O,1-w),C.push(n++)}u.push(C)}for(let A=0;A.9&&M<.1&&(d<.2&&(a[c+0]+=1),v<.2&&(a[c+2]+=1),m<.2&&(a[c+4]+=1))}}function o(c){E.push(c.x,c.y,c.z)}function l(c,d){const v=c*3;d.x=e[v+0],d.y=e[v+1],d.z=e[v+2]}function n(){const c=new pt,d=new pt,v=new pt,m=new pt,S=new jt,M=new jt,A=new jt;for(let C=0,w=0;C80*i){y=r=g[0],t=p=g[1];for(let n=i;nr&&(r=h),o>p&&(p=o);l=Math.max(r-y,p-t),l=l!==0?32767/l:0}return cd(E,a,i,y,t,l,0),a}};function NA(g,e,i,x,T){let E,a;if(T===MU(g,e,i,x)>0)for(E=e;E=e;E-=x)a=PE(E,g[E],g[E+1],a);return a&&pg(a,a.next)&&(pd(a),a=a.next),a}function Fh(g,e){if(!g)return g;e||(e=g);let i=g,x;do if(x=!1,!i.steiner&&(pg(i,i.next)||ji(i.prev,i,i.next)===0)){if(pd(i),i=e=i.prev,i===i.next)break;x=!0}else i=i.next;while(x||i!==e);return e}function cd(g,e,i,x,T,E,a){if(!g)return;!a&&E&&gU(g,x,T,E);let y=g,t,r;for(;g.prev!==g.next;){if(t=g.prev,r=g.next,E?hU(g,x,T,E):lU(g)){e.push(t.i/i|0),e.push(g.i/i|0),e.push(r.i/i|0),pd(g),g=r.next,y=r.next;continue}if(g=r,g===y){a?a===1?(g=uU(Fh(g),e,i),cd(g,e,i,x,T,E,2)):a===2&&fU(g,e,i,x,T,E):cd(Fh(g),e,i,x,T,E,1);break}}}function lU(g){const e=g.prev,i=g,x=g.next;if(ji(e,i,x)>=0)return!1;const T=e.x,E=i.x,a=x.x,y=e.y,t=i.y,r=x.y,p=TE?T>a?T:a:E>a?E:a,l=y>t?y>r?y:r:t>r?t:r;let n=x.next;for(;n!==e;){if(n.x>=p&&n.x<=o&&n.y>=h&&n.y<=l&&nf(T,y,E,t,a,r,n.x,n.y)&&ji(n.prev,n,n.next)>=0)return!1;n=n.next}return!0}function hU(g,e,i,x){const T=g.prev,E=g,a=g.next;if(ji(T,E,a)>=0)return!1;const y=T.x,t=E.x,r=a.x,p=T.y,h=E.y,o=a.y,l=yt?y>r?y:r:t>r?t:r,f=p>h?p>o?p:o:h>o?h:o,s=mx(l,n,e,i,x),c=mx(u,f,e,i,x);let d=g.prevZ,v=g.nextZ;for(;d&&d.z>=s&&v&&v.z<=c;){if(d.x>=l&&d.x<=u&&d.y>=n&&d.y<=f&&d!==T&&d!==a&&nf(y,p,t,h,r,o,d.x,d.y)&&ji(d.prev,d,d.next)>=0||(d=d.prevZ,v.x>=l&&v.x<=u&&v.y>=n&&v.y<=f&&v!==T&&v!==a&&nf(y,p,t,h,r,o,v.x,v.y)&&ji(v.prev,v,v.next)>=0))return!1;v=v.nextZ}for(;d&&d.z>=s;){if(d.x>=l&&d.x<=u&&d.y>=n&&d.y<=f&&d!==T&&d!==a&&nf(y,p,t,h,r,o,d.x,d.y)&&ji(d.prev,d,d.next)>=0)return!1;d=d.prevZ}for(;v&&v.z<=c;){if(v.x>=l&&v.x<=u&&v.y>=n&&v.y<=f&&v!==T&&v!==a&&nf(y,p,t,h,r,o,v.x,v.y)&&ji(v.prev,v,v.next)>=0)return!1;v=v.nextZ}return!0}function uU(g,e,i){let x=g;do{const T=x.prev,E=x.next.next;!pg(T,E)&&BA(T,x,x.next,E)&&dd(T,E)&&dd(E,T)&&(e.push(T.i/i|0),e.push(x.i/i|0),e.push(E.i/i|0),pd(x),pd(x.next),x=g=E),x=x.next}while(x!==g);return Fh(x)}function fU(g,e,i,x,T,E){let a=g;do{let y=a.next.next;for(;y!==a.prev;){if(a.i!==y.i&&SU(a,y)){let t=UA(a,y);a=Fh(a,a.next),t=Fh(t,t.next),cd(a,e,i,x,T,E,0),cd(t,e,i,x,T,E,0);return}y=y.next}a=a.next}while(a!==g)}function cU(g,e,i,x){const T=[];let E,a,y,t,r;for(E=0,a=e.length;E=i.next.y&&i.next.y!==i.y){const o=i.x+(a-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(o<=E&&o>x&&(x=o,T=i.x=i.x&&i.x>=t&&E!==i.x&&nf(aT.x||i.x===T.x&&mU(T,i)))&&(T=i,p=h)),i=i.next;while(i!==y);return T}function mU(g,e){return ji(g.prev,g,e.prev)<0&&ji(e.next,g,g.next)<0}function gU(g,e,i,x){let T=g;do T.z===0&&(T.z=mx(T.x,T.y,e,i,x)),T.prevZ=T.prev,T.nextZ=T.next,T=T.next;while(T!==g);T.prevZ.nextZ=null,T.prevZ=null,yU(T)}function yU(g){let e,i,x,T,E,a,y,t,r=1;do{for(i=g,g=null,E=null,a=0;i;){for(a++,x=i,y=0,e=0;e0||t>0&&x;)y!==0&&(t===0||!x||i.z<=x.z)?(T=i,i=i.nextZ,y--):(T=x,x=x.nextZ,t--),E?E.nextZ=T:g=T,T.prevZ=E,E=T;i=x}E.nextZ=null,r*=2}while(a>1);return g}function mx(g,e,i,x,T){return g=(g-i)*T|0,e=(e-x)*T|0,g=(g|g<<8)&16711935,g=(g|g<<4)&252645135,g=(g|g<<2)&858993459,g=(g|g<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,g|e<<1}function xU(g){let e=g,i=g;do(e.x=(g-a)*(E-y)&&(g-a)*(x-y)>=(i-a)*(e-y)&&(i-a)*(E-y)>=(T-a)*(x-y)}function SU(g,e){return g.next.i!==e.i&&g.prev.i!==e.i&&!TU(g,e)&&(dd(g,e)&&dd(e,g)&&EU(g,e)&&(ji(g.prev,g,e.prev)||ji(g,e.prev,e))||pg(g,e)&&ji(g.prev,g,g.next)>0&&ji(e.prev,e,e.next)>0)}function ji(g,e,i){return(e.y-g.y)*(i.x-e.x)-(e.x-g.x)*(i.y-e.y)}function pg(g,e){return g.x===e.x&&g.y===e.y}function BA(g,e,i,x){const T=Lv(ji(g,e,i)),E=Lv(ji(g,e,x)),a=Lv(ji(i,x,g)),y=Lv(ji(i,x,e));return!!(T!==E&&a!==y||T===0&&Rv(g,i,e)||E===0&&Rv(g,x,e)||a===0&&Rv(i,g,x)||y===0&&Rv(i,e,x))}function Rv(g,e,i){return e.x<=Math.max(g.x,i.x)&&e.x>=Math.min(g.x,i.x)&&e.y<=Math.max(g.y,i.y)&&e.y>=Math.min(g.y,i.y)}function Lv(g){return g>0?1:g<0?-1:0}function TU(g,e){let i=g;do{if(i.i!==g.i&&i.next.i!==g.i&&i.i!==e.i&&i.next.i!==e.i&&BA(i,i.next,g,e))return!0;i=i.next}while(i!==g);return!1}function dd(g,e){return ji(g.prev,g,g.next)<0?ji(g,e,g.next)>=0&&ji(g,g.prev,e)>=0:ji(g,e,g.prev)<0||ji(g,g.next,e)<0}function EU(g,e){let i=g,x=!1;const T=(g.x+e.x)/2,E=(g.y+e.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 UA(g,e){const i=new gx(g.i,g.x,g.y),x=new gx(e.i,e.x,e.y),T=g.next,E=e.prev;return g.next=e,e.prev=g,i.next=T,T.prev=i,x.next=i,i.prev=x,E.next=x,x.prev=E,x}function PE(g,e,i,x){const T=new gx(g,e,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 pd(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 gx(g,e,i){this.i=g,this.x=e,this.y=i,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function MU(g,e,i,x){let T=0;for(let E=e,a=i-x;E2&&g[e-1].equals(g[0])&&g.pop()}function LE(g,e){for(let i=0;iNumber.EPSILON){const Et=Math.sqrt(Tt),Gt=Math.sqrt(st*st+yt*yt),Wt=ht.x-ot/Et,Jt=ht.y+At/Et,$t=ut.x-yt/Gt,te=ut.y+st/Gt,Nt=(($t-Wt)*yt-(te-Jt)*st)/(At*yt-ot*st);dt=Wt+At*Nt-et.x,mt=Jt+ot*Nt-et.y;const Te=dt*dt+mt*mt;if(Te<=2)return new jt(dt,mt);gt=Math.sqrt(Te/2)}else{let Et=!1;At>Number.EPSILON?st>Number.EPSILON&&(Et=!0):At<-Number.EPSILON?st<-Number.EPSILON&&(Et=!0):Math.sign(ot)===Math.sign(yt)&&(Et=!0),Et?(dt=-ot,mt=At,gt=Math.sqrt(Tt)):(dt=At,mt=ot,gt=Math.sqrt(Tt/2))}return new jt(dt/gt,mt/gt)}const W=[];for(let et=0,ht=I.length,ut=ht-1,dt=et+1;et=0;et--){const ht=et/f,ut=l*Math.cos(ht*Math.PI/2),dt=n*Math.sin(ht*Math.PI/2)+u;for(let mt=0,gt=I.length;mt=0;){const dt=ut;let mt=ut-1;mt<0&&(mt=et.length-1);for(let gt=0,At=p+f*2;gt0)&&l.push(d,v,S),(s!==x-1||t0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class WA extends _n{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new fe(16777215),this.specular=new fe(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new fe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=fl,this.normalScale=new jt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Cd,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(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class XA extends _n{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new fe(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new fe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=fl,this.normalScale=new jt(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(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}class YA extends _n{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=fl,this.normalScale=new jt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}}class kA extends _n{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new fe(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new fe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=fl,this.normalScale=new jt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Cd,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(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class KA extends _n{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new fe(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=fl,this.normalScale=new jt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.flatShading=e.flatShading,this.fog=e.fog,this}}class jA extends wr{constructor(e){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}}function xh(g,e,i){return!g||!i&&g.constructor===e?g:typeof e.BYTES_PER_ELEMENT=="number"?new e(g):Array.prototype.slice.call(g)}function ZA(g){return ArrayBuffer.isView(g)&&!(g instanceof DataView)}function JA(g){function e(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(e),x}function yx(g,e,i){const x=g.length,T=new g.constructor(x);for(let E=0,a=0;a!==x;++E){const y=i[E]*e;for(let t=0;t!==e;++t)T[a++]=g[y+t]}return T}function L1(g,e,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 a=E[x];if(a!==void 0)if(Array.isArray(a))do a=E[x],a!==void 0&&(e.push(E.time),i.push.apply(i,a)),E=g[T++];while(E!==void 0);else if(a.toArray!==void 0)do a=E[x],a!==void 0&&(e.push(E.time),a.toArray(i,i.length)),E=g[T++];while(E!==void 0);else do a=E[x],a!==void 0&&(e.push(E.time),i.push(a)),E=g[T++];while(E!==void 0)}function PU(g,e,i,x,T=30){const E=g.clone();E.name=e;const a=[];for(let t=0;t=x)){h.push(r.times[l]);for(let u=0;uE.tracks[t].times[0]&&(y=E.tracks[t].times[0]);for(let t=0;t=y.times[n]){const s=n*h+p,c=s+h-p;u=y.values.slice(s,c)}else{const s=y.createInterpolant(),c=p,d=h-p;s.evaluate(E),u=s.resultBuffer.slice(c,d)}t==="quaternion"&&new Ur().fromArray(u).normalize().conjugate().toArray(u);const f=r.times.length;for(let s=0;s=E)){const y=i[1];e=E)break e}a=x,x=0;break i}break t}for(;x>>1;ei;)--a;if(++a,E!==0||a!==T){E>=a&&(a=Math.max(a,1),E=a-1);const y=this.getValueSize();this.times=x.slice(E,a),this.values=this.values.slice(E*y,a*y)}return this}validate(){let e=!0;const i=this.getValueSize();i-Math.floor(i)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const x=this.times,T=this.values,E=x.length;E===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let a=null;for(let y=0;y!==E;y++){const t=x[y];if(typeof t=="number"&&isNaN(t)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,y,t),e=!1;break}if(a!==null&&a>t){console.error("THREE.KeyframeTrack: Out of order keys.",this,y,t,a),e=!1;break}a=t}if(T!==void 0&&ZA(T))for(let y=0,t=T.length;y!==t;++y){const r=T[y];if(isNaN(r)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,y,r),e=!1;break}}return e}optimize(){const e=this.times.slice(),i=this.values.slice(),x=this.getValueSize(),T=this.getInterpolation()===Qv,E=e.length-1;let a=1;for(let y=1;y0){e[a]=e[E];for(let y=E*x,t=a*x,r=0;r!==x;++r)i[t+r]=i[y+r];++a}return a!==e.length?(this.times=e.slice(0,a),this.values=i.slice(0,a*x)):(this.times=e,this.values=i),this}clone(){const e=this.times.slice(),i=this.values.slice(),x=this.constructor,T=new x(this.name,e,i);return T.createInterpolant=this.createInterpolant,T}}qs.prototype.TimeBufferType=Float32Array;qs.prototype.ValueBufferType=Float32Array;qs.prototype.DefaultInterpolation=nd;class Nh extends qs{}Nh.prototype.ValueTypeName="bool";Nh.prototype.ValueBufferType=Array;Nh.prototype.DefaultInterpolation=id;Nh.prototype.InterpolantFactoryMethodLinear=void 0;Nh.prototype.InterpolantFactoryMethodSmooth=void 0;class F1 extends qs{}F1.prototype.ValueTypeName="color";class vd extends qs{}vd.prototype.ValueTypeName="number";class _A extends Dd{constructor(e,i,x,T){super(e,i,x,T)}interpolate_(e,i,x,T){const E=this.resultBuffer,a=this.sampleValues,y=this.valueSize,t=(x-i)/(T-i);let r=e*y;for(let p=r+y;r!==p;r+=4)Ur.slerpFlat(E,0,a,r-y,a,r,t);return E}}class Mf extends qs{InterpolantFactoryMethodLinear(e){return new _A(this.times,this.values,this.getValueSize(),e)}}Mf.prototype.ValueTypeName="quaternion";Mf.prototype.DefaultInterpolation=nd;Mf.prototype.InterpolantFactoryMethodSmooth=void 0;class Bh extends qs{}Bh.prototype.ValueTypeName="string";Bh.prototype.ValueBufferType=Array;Bh.prototype.DefaultInterpolation=id;Bh.prototype.InterpolantFactoryMethodLinear=void 0;Bh.prototype.InterpolantFactoryMethodSmooth=void 0;class md extends qs{}md.prototype.ValueTypeName="vector";class gd{constructor(e,i=-1,x,T=tg){this.name=e,this.tracks=x,this.duration=i,this.blendMode=T,this.uuid=as(),this.duration<0&&this.resetDuration()}static parse(e){const i=[],x=e.tracks,T=1/(e.fps||1);for(let a=0,y=x.length;a!==y;++a)i.push(FU(x[a]).scale(T));const E=new this(e.name,e.duration,i,e.blendMode);return E.uuid=e.uuid,E}static toJSON(e){const i=[],x=e.tracks,T={name:e.name,duration:e.duration,tracks:i,uuid:e.uuid,blendMode:e.blendMode};for(let E=0,a=x.length;E!==a;++E)i.push(qs.toJSON(x[E]));return T}static CreateFromMorphTargetSequence(e,i,x,T){const E=i.length,a=[];for(let y=0;y1){const h=p[1];let o=T[h];o||(T[h]=o=[]),o.push(r)}}const a=[];for(const y in T)a.push(this.CreateFromMorphTargetSequence(y,T[y],i,x));return a}static parseAnimation(e,i){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const x=function(h,o,l,n,u){if(l.length!==0){const f=[],s=[];L1(l,f,s,n),f.length!==0&&u.push(new h(o,f,s))}},T=[],E=e.name||"default",a=e.fps||30,y=e.blendMode;let t=e.length||-1;const r=e.hierarchy||[];for(let h=0;h{i&&i(E),this.manager.itemEnd(e)},0),E;if(Qa[e]!==void 0){Qa[e].push({onLoad:i,onProgress:x,onError:T});return}Qa[e]=[],Qa[e].push({onLoad:i,onProgress:x,onError:T});const a=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),y=this.mimeType,t=this.responseType;fetch(a).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 p=Qa[e],h=r.body.getReader(),o=r.headers.get("Content-Length")||r.headers.get("X-File-Size"),l=o?parseInt(o):0,n=l!==0;let u=0;const f=new ReadableStream({start(s){c();function c(){h.read().then(({done:d,value:v})=>{if(d)s.close();else{u+=v.byteLength;const m=new ProgressEvent("progress",{lengthComputable:n,loaded:u,total:l});for(let S=0,M=p.length;S{switch(t){case"arraybuffer":return r.arrayBuffer();case"blob":return r.blob();case"document":return r.text().then(p=>new DOMParser().parseFromString(p,y));case"json":return r.json();default:if(y===void 0)return r.text();{const h=/charset="?([^;"\s]*)"?/i.exec(y),o=h&&h[1]?h[1].toLowerCase():void 0,l=new TextDecoder(o);return r.arrayBuffer().then(n=>l.decode(n))}}}).then(r=>{no.add(e,r);const p=Qa[e];delete Qa[e];for(let h=0,o=p.length;h{const p=Qa[e];if(p===void 0)throw this.manager.itemError(e),r;delete Qa[e];for(let h=0,o=p.length;h{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class DU extends Gr{constructor(e){super(e)}load(e,i,x,T){const E=this,a=new lo(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,function(y){try{i(E.parse(JSON.parse(y)))}catch(t){T?T(t):console.error(t),E.manager.itemError(e)}},x,T)}parse(e){const i=[];for(let x=0;x0:T.vertexColors=e.vertexColors),e.uniforms!==void 0)for(const E in e.uniforms){const a=e.uniforms[E];switch(T.uniforms[E]={},a.type){case"t":T.uniforms[E].value=x(a.value);break;case"c":T.uniforms[E].value=new fe().setHex(a.value);break;case"v2":T.uniforms[E].value=new jt().fromArray(a.value);break;case"v3":T.uniforms[E].value=new pt().fromArray(a.value);break;case"v4":T.uniforms[E].value=new Si().fromArray(a.value);break;case"m3":T.uniforms[E].value=new ni().fromArray(a.value);break;case"m4":T.uniforms[E].value=new Ve().fromArray(a.value);break;default:T.uniforms[E].value=a.value}}if(e.defines!==void 0&&(T.defines=e.defines),e.vertexShader!==void 0&&(T.vertexShader=e.vertexShader),e.fragmentShader!==void 0&&(T.fragmentShader=e.fragmentShader),e.glslVersion!==void 0&&(T.glslVersion=e.glslVersion),e.extensions!==void 0)for(const E in e.extensions)T.extensions[E]=e.extensions[E];if(e.lights!==void 0&&(T.lights=e.lights),e.clipping!==void 0&&(T.clipping=e.clipping),e.size!==void 0&&(T.size=e.size),e.sizeAttenuation!==void 0&&(T.sizeAttenuation=e.sizeAttenuation),e.map!==void 0&&(T.map=x(e.map)),e.matcap!==void 0&&(T.matcap=x(e.matcap)),e.alphaMap!==void 0&&(T.alphaMap=x(e.alphaMap)),e.bumpMap!==void 0&&(T.bumpMap=x(e.bumpMap)),e.bumpScale!==void 0&&(T.bumpScale=e.bumpScale),e.normalMap!==void 0&&(T.normalMap=x(e.normalMap)),e.normalMapType!==void 0&&(T.normalMapType=e.normalMapType),e.normalScale!==void 0){let E=e.normalScale;Array.isArray(E)===!1&&(E=[E,E]),T.normalScale=new jt().fromArray(E)}return e.displacementMap!==void 0&&(T.displacementMap=x(e.displacementMap)),e.displacementScale!==void 0&&(T.displacementScale=e.displacementScale),e.displacementBias!==void 0&&(T.displacementBias=e.displacementBias),e.roughnessMap!==void 0&&(T.roughnessMap=x(e.roughnessMap)),e.metalnessMap!==void 0&&(T.metalnessMap=x(e.metalnessMap)),e.emissiveMap!==void 0&&(T.emissiveMap=x(e.emissiveMap)),e.emissiveIntensity!==void 0&&(T.emissiveIntensity=e.emissiveIntensity),e.specularMap!==void 0&&(T.specularMap=x(e.specularMap)),e.specularIntensityMap!==void 0&&(T.specularIntensityMap=x(e.specularIntensityMap)),e.specularColorMap!==void 0&&(T.specularColorMap=x(e.specularColorMap)),e.envMap!==void 0&&(T.envMap=x(e.envMap)),e.envMapIntensity!==void 0&&(T.envMapIntensity=e.envMapIntensity),e.reflectivity!==void 0&&(T.reflectivity=e.reflectivity),e.refractionRatio!==void 0&&(T.refractionRatio=e.refractionRatio),e.lightMap!==void 0&&(T.lightMap=x(e.lightMap)),e.lightMapIntensity!==void 0&&(T.lightMapIntensity=e.lightMapIntensity),e.aoMap!==void 0&&(T.aoMap=x(e.aoMap)),e.aoMapIntensity!==void 0&&(T.aoMapIntensity=e.aoMapIntensity),e.gradientMap!==void 0&&(T.gradientMap=x(e.gradientMap)),e.clearcoatMap!==void 0&&(T.clearcoatMap=x(e.clearcoatMap)),e.clearcoatRoughnessMap!==void 0&&(T.clearcoatRoughnessMap=x(e.clearcoatRoughnessMap)),e.clearcoatNormalMap!==void 0&&(T.clearcoatNormalMap=x(e.clearcoatNormalMap)),e.clearcoatNormalScale!==void 0&&(T.clearcoatNormalScale=new jt().fromArray(e.clearcoatNormalScale)),e.iridescenceMap!==void 0&&(T.iridescenceMap=x(e.iridescenceMap)),e.iridescenceThicknessMap!==void 0&&(T.iridescenceThicknessMap=x(e.iridescenceThicknessMap)),e.transmissionMap!==void 0&&(T.transmissionMap=x(e.transmissionMap)),e.thicknessMap!==void 0&&(T.thicknessMap=x(e.thicknessMap)),e.anisotropyMap!==void 0&&(T.anisotropyMap=x(e.anisotropyMap)),e.sheenColorMap!==void 0&&(T.sheenColorMap=x(e.sheenColorMap)),e.sheenRoughnessMap!==void 0&&(T.sheenRoughnessMap=x(e.sheenRoughnessMap)),T}setTextures(e){return this.textures=e,this}static createMaterialFromType(e){const i={ShadowMaterial:GA,SpriteMaterial:S1,RawShaderMaterial:VA,ShaderMaterial:Qs,PointsMaterial:E1,MeshPhysicalMaterial:HA,MeshStandardMaterial:_a,MeshPhongMaterial:WA,MeshToonMaterial:XA,MeshNormalMaterial:YA,MeshLambertMaterial:kA,MeshDepthMaterial:g1,MeshDistanceMaterial:y1,MeshBasicMaterial:cl,MeshMatcapMaterial:KA,LineDashedMaterial:jA,LineBasicMaterial:wr,Material:_n};return new i[e]}}class xx{static decodeText(e){if(typeof TextDecoder<"u")return new TextDecoder().decode(e);let i="";for(let x=0,T=e.length;x0){const t=new O1(i);E=new yd(t),E.setCrossOrigin(this.crossOrigin);for(let r=0,p=e.length;r0){T=new yd(this.manager),T.setCrossOrigin(this.crossOrigin);for(let a=0,y=e.length;a{const f=new Ar;f.min.fromArray(u.boxMin),f.max.fromArray(u.boxMax);const s=new hr;return s.radius=u.sphereRadius,s.center.fromArray(u.sphereCenter),{boxInitialized:u.boxInitialized,box:f,sphereInitialized:u.sphereInitialized,sphere:s}}),a._maxGeometryCount=e.maxGeometryCount,a._maxVertexCount=e.maxVertexCount,a._maxIndexCount=e.maxIndexCount,a._geometryInitialized=e.geometryInitialized,a._geometryCount=e.geometryCount,a._matricesTexture=r(e.matricesTexture.uuid);break;case"LOD":a=new MA;break;case"Line":a=new hl(y(e.geometry),t(e.material));break;case"LineLoop":a=new PA(y(e.geometry),t(e.material));break;case"LineSegments":a=new wa(y(e.geometry),t(e.material));break;case"PointCloud":case"Points":a=new RA(y(e.geometry),t(e.material));break;case"Sprite":a=new EA(t(e.material));break;case"Group":a=new ef;break;case"Bone":a=new T1;break;default:a=new vi}if(a.uuid=e.uuid,e.name!==void 0&&(a.name=e.name),e.matrix!==void 0?(a.matrix.fromArray(e.matrix),e.matrixAutoUpdate!==void 0&&(a.matrixAutoUpdate=e.matrixAutoUpdate),a.matrixAutoUpdate&&a.matrix.decompose(a.position,a.quaternion,a.scale)):(e.position!==void 0&&a.position.fromArray(e.position),e.rotation!==void 0&&a.rotation.fromArray(e.rotation),e.quaternion!==void 0&&a.quaternion.fromArray(e.quaternion),e.scale!==void 0&&a.scale.fromArray(e.scale)),e.up!==void 0&&a.up.fromArray(e.up),e.castShadow!==void 0&&(a.castShadow=e.castShadow),e.receiveShadow!==void 0&&(a.receiveShadow=e.receiveShadow),e.shadow&&(e.shadow.bias!==void 0&&(a.shadow.bias=e.shadow.bias),e.shadow.normalBias!==void 0&&(a.shadow.normalBias=e.shadow.normalBias),e.shadow.radius!==void 0&&(a.shadow.radius=e.shadow.radius),e.shadow.mapSize!==void 0&&a.shadow.mapSize.fromArray(e.shadow.mapSize),e.shadow.camera!==void 0&&(a.shadow.camera=this.parseObject(e.shadow.camera))),e.visible!==void 0&&(a.visible=e.visible),e.frustumCulled!==void 0&&(a.frustumCulled=e.frustumCulled),e.renderOrder!==void 0&&(a.renderOrder=e.renderOrder),e.userData!==void 0&&(a.userData=e.userData),e.layers!==void 0&&(a.layers.mask=e.layers),e.children!==void 0){const o=e.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(e){return this.options=e,this}load(e,i,x,T){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const E=this,a=no.get(e);if(a!==void 0){if(E.manager.itemStart(e),a.then){a.then(r=>{i&&i(r),E.manager.itemEnd(e)}).catch(r=>{T&&T(r)});return}return setTimeout(function(){i&&i(a),E.manager.itemEnd(e)},0),a}const y={};y.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",y.headers=this.requestHeader;const t=fetch(e,y).then(function(r){return r.blob()}).then(function(r){return createImageBitmap(r,Object.assign(E.options,{colorSpaceConversion:"none"}))}).then(function(r){return no.add(e,r),i&&i(r),E.manager.itemEnd(e),r}).catch(function(r){T&&T(r),no.remove(e),E.manager.itemError(e),E.manager.itemEnd(e)});no.add(e,t),E.manager.itemStart(e)}}let bv,I1=class{static getContext(){return bv===void 0&&(bv=new(window.AudioContext||window.webkitAudioContext)),bv}static setContext(e){bv=e}};class XU extends Gr{constructor(e){super(e)}load(e,i,x,T){const E=this,a=new lo(this.manager);a.setResponseType("arraybuffer"),a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,function(t){try{const r=t.slice(0);I1.getContext().decodeAudioData(r,function(h){i(h)}).catch(y)}catch(r){y(r)}},x,T);function y(t){T?T(t):console.error(t),E.manager.itemError(e)}}}const UE=new Ve,zE=new Ve,nh=new Ve;class YU{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Yn,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Yn,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(e){const i=this._cache;if(i.focus!==e.focus||i.fov!==e.fov||i.aspect!==e.aspect*this.aspect||i.near!==e.near||i.far!==e.far||i.zoom!==e.zoom||i.eyeSep!==this.eyeSep){i.focus=e.focus,i.fov=e.fov,i.aspect=e.aspect*this.aspect,i.near=e.near,i.far=e.far,i.zoom=e.zoom,i.eyeSep=this.eyeSep,nh.copy(e.projectionMatrix);const T=i.eyeSep/2,E=T*i.near/i.focus,a=i.near*Math.tan(Th*i.fov*.5)/i.zoom;let y,t;zE.elements[12]=-T,UE.elements[12]=T,y=-a*i.aspect+E,t=a*i.aspect+E,nh.elements[0]=2*i.near/(t-y),nh.elements[8]=(t+y)/(t-y),this.cameraL.projectionMatrix.copy(nh),y=-a*i.aspect-E,t=a*i.aspect-E,nh.elements[0]=2*i.near/(t-y),nh.elements[8]=(t+y)/(t-y),this.cameraR.projectionMatrix.copy(nh)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(zE),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(UE)}}class N1{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=GE(),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 e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const i=GE();e=(i-this.oldTime)/1e3,this.oldTime=i,this.elapsedTime+=e}return e}}function GE(){return(typeof performance>"u"?Date:performance).now()}const rh=new pt,VE=new Ur,kU=new pt,sh=new pt;class KU extends vi{constructor(){super(),this.type="AudioListener",this.context=I1.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new N1}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(e){return this.filter!==null?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}updateMatrixWorld(e){super.updateMatrixWorld(e);const i=this.context.listener,x=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(rh,VE,kU),sh.set(0,0,-1).applyQuaternion(VE),i.positionX){const T=this.context.currentTime+this.timeDelta;i.positionX.linearRampToValueAtTime(rh.x,T),i.positionY.linearRampToValueAtTime(rh.y,T),i.positionZ.linearRampToValueAtTime(rh.z,T),i.forwardX.linearRampToValueAtTime(sh.x,T),i.forwardY.linearRampToValueAtTime(sh.y,T),i.forwardZ.linearRampToValueAtTime(sh.z,T),i.upX.linearRampToValueAtTime(x.x,T),i.upY.linearRampToValueAtTime(x.y,T),i.upZ.linearRampToValueAtTime(x.z,T)}else i.setPosition(rh.x,rh.y,rh.z),i.setOrientation(sh.x,sh.y,sh.z,x.x,x.y,x.z)}}let fw=class extends vi{constructor(e){super(),this.type="Audio",this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.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(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this}play(e=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+e;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 e=1,i=this.filters.length;e0){this.source.disconnect(this.filters[0]);for(let e=1,i=this.filters.length;e0&&this._mixBufferRegionAdditive(x,T,this._addIndex*i,1,i);for(let t=i,r=i+i;t!==r;++t)if(x[t]!==x[t+i]){y.setValue(x,T);break}}saveOriginalState(){const e=this.binding,i=this.buffer,x=this.valueSize,T=x*this._origIndex;e.getValue(i,T);for(let E=x,a=T;E!==a;++E)i[E]=i[T+E%x];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=this.valueSize*3;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,i=e+this.valueSize;for(let x=e;x=.5)for(let a=0;a!==E;++a)e[i+a]=e[x+a]}_slerp(e,i,x,T){Ur.slerpFlat(e,i,e,i,e,x,T)}_slerpAdditive(e,i,x,T,E){const a=this._workIndex*E;Ur.multiplyQuaternionsFlat(e,a,e,i,e,x),Ur.slerpFlat(e,i,e,i,e,a,T)}_lerp(e,i,x,T,E){const a=1-T;for(let y=0;y!==E;++y){const t=i+y;e[t]=e[t]*a+e[x+y]*T}}_lerpAdditive(e,i,x,T,E){for(let a=0;a!==E;++a){const y=i+a;e[y]=e[y]+e[x+a]*T}}}const B1="\\[\\]\\.:\\/",$U=new RegExp("["+B1+"]","g"),U1="[^"+B1+"]",QU="[^"+B1.replace("\\.","")+"]",_U=/((?:WC+[\/:])*)/.source.replace("WC",U1),qU=/(WCOD+)?/.source.replace("WCOD",QU),t7=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",U1),e7=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",U1),i7=new RegExp("^"+_U+qU+t7+e7+"$"),n7=["material","materials","bones","map"];class r7{constructor(e,i,x){const T=x||di.parseTrackName(i);this._targetGroup=e,this._bindings=e.subscribe_(i,T)}getValue(e,i){this.bind();const x=this._targetGroup.nCachedObjects_,T=this._bindings[x];T!==void 0&&T.getValue(e,i)}setValue(e,i){const x=this._bindings;for(let T=this._targetGroup.nCachedObjects_,E=x.length;T!==E;++T)x[T].setValue(e,i)}bind(){const e=this._bindings;for(let i=this._targetGroup.nCachedObjects_,x=e.length;i!==x;++i)e[i].bind()}unbind(){const e=this._bindings;for(let i=this._targetGroup.nCachedObjects_,x=e.length;i!==x;++i)e[i].unbind()}}class di{constructor(e,i,x){this.path=i,this.parsedPath=x||di.parseTrackName(i),this.node=di.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,i,x){return e&&e.isAnimationObjectGroup?new di.Composite(e,i,x):new di(e,i,x)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace($U,"")}static parseTrackName(e){const i=i7.exec(e);if(i===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);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);n7.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: "+e);return x}static findNode(e,i){if(i===void 0||i===""||i==="."||i===-1||i===e.name||i===e.uuid)return e;if(e.skeleton){const x=e.skeleton.getBoneByName(i);if(x!==void 0)return x}if(e.children){const x=function(E){for(let a=0;a=E){const h=E++,o=e[h];i[o.uuid]=p,e[p]=o,i[r]=h,e[h]=t;for(let l=0,n=T;l!==n;++l){const u=x[l],f=u[h],s=u[p];u[p]=f,u[h]=s}}}this.nCachedObjects_=E}uncache(){const e=this._objects,i=this._indicesByUUID,x=this._bindings,T=x.length;let E=this.nCachedObjects_,a=e.length;for(let y=0,t=arguments.length;y!==t;++y){const r=arguments[y],p=r.uuid,h=i[p];if(h!==void 0)if(delete i[p],h0&&(i[l.uuid]=h),e[h]=l,e.pop();for(let n=0,u=T;n!==u;++n){const f=x[n];f[h]=f[o],f.pop()}}}this.nCachedObjects_=E}subscribe_(e,i){const x=this._bindingsIndicesByPath;let T=x[e];const E=this._bindings;if(T!==void 0)return E[T];const a=this._paths,y=this._parsedPaths,t=this._objects,r=t.length,p=this.nCachedObjects_,h=new Array(r);T=E.length,x[e]=T,a.push(e),y.push(i),E.push(h);for(let o=p,l=t.length;o!==l;++o){const n=t[o];h[o]=new di(n,e,i)}return h}unsubscribe_(e){const i=this._bindingsIndicesByPath,x=i[e];if(x!==void 0){const T=this._paths,E=this._parsedPaths,a=this._bindings,y=a.length-1,t=a[y],r=e[y];i[r]=x,a[x]=t,a.pop(),E[x]=E[y],E.pop(),T[x]=T[y],T.pop()}}}class dw{constructor(e,i,x=null,T=i.blendMode){this._mixer=e,this._clip=i,this._localRoot=x,this.blendMode=T;const E=i.tracks,a=E.length,y=new Array(a),t={endingStart:mh,endingEnd:mh};for(let r=0;r!==a;++r){const p=E[r].createInterpolant(null);y[r]=p,p.settings=t}this._interpolantSettings=t,this._interpolants=y,this._propertyBindings=new Array(a),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=KC,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(e){return this._startTime=e,this}setLoop(e,i){return this.loop=e,this.repetitions=i,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,i,x){if(e.fadeOut(i),this.fadeIn(i),x){const T=this._clip.duration,E=e._clip.duration,a=E/T,y=T/E;e.warp(1,a,i),this.warp(y,1,i)}return this}crossFadeTo(e,i,x){return e.crossFadeFrom(this,i,x)}stopFading(){const e=this._weightInterpolant;return e!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,i,x){const T=this._mixer,E=T.time,a=this.timeScale;let y=this._timeScaleInterpolant;y===null&&(y=T._lendControlInterpolant(),this._timeScaleInterpolant=y);const t=y.parameterPositions,r=y.sampleValues;return t[0]=E,t[1]=E+x,r[0]=e/a,r[1]=i/a,this}stopWarping(){const e=this._timeScaleInterpolant;return e!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,i,x,T){if(!this.enabled){this._updateWeight(e);return}const E=this._startTime;if(E!==null){const t=(e-E)*x;t<0||x===0?i=0:(this._startTime=null,i=x*t)}i*=this._updateTimeScale(e);const a=this._updateTime(i),y=this._updateWeight(e);if(y>0){const t=this._interpolants,r=this._propertyBindings;switch(this.blendMode){case o1:for(let p=0,h=t.length;p!==h;++p)t[p].evaluate(a),r[p].accumulateAdditive(y);break;case tg:default:for(let p=0,h=t.length;p!==h;++p)t[p].evaluate(a),r[p].accumulate(T,y)}}}_updateWeight(e){let i=0;if(this.enabled){i=this.weight;const x=this._weightInterpolant;if(x!==null){const T=x.evaluate(e)[0];i*=T,e>x.parameterPositions[1]&&(this.stopFading(),T===0&&(this.enabled=!1))}}return this._effectiveWeight=i,i}_updateTimeScale(e){let i=0;if(!this.paused){i=this.timeScale;const x=this._timeScaleInterpolant;if(x!==null){const T=x.evaluate(e)[0];i*=T,e>x.parameterPositions[1]&&(this.stopWarping(),i===0?this.paused=!0:this.timeScale=i)}}return this._effectiveTimeScale=i,i}_updateTime(e){const i=this._clip.duration,x=this.loop;let T=this.time+e,E=this._loopCount;const a=x===jC;if(e===0)return E===-1?T:a&&(E&1)===1?i-T:T;if(x===kC){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:e<0?-1:1})}}else{if(E===-1&&(e>=0?(E=0,this._setEndings(!0,this.repetitions===0,a)):this._setEndings(this.repetitions===0,!0,a)),T>=i||T<0){const y=Math.floor(T/i);T-=i*y,E+=Math.abs(y);const t=this.repetitions-E;if(t<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,T=e>0?i:0,this.time=T,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(t===1){const r=e<0;this._setEndings(r,!r,a)}else this._setEndings(!1,!1,a);this._loopCount=E,this.time=T,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:y})}}else this.time=T;if(a&&(E&1)===1)return i-T}return T}_setEndings(e,i,x){const T=this._interpolantSettings;x?(T.endingStart=gh,T.endingEnd=gh):(e?T.endingStart=this.zeroSlopeAtStart?gh:mh:T.endingStart=rd,i?T.endingEnd=this.zeroSlopeAtEnd?gh:mh:T.endingEnd=rd)}_scheduleFading(e,i,x){const T=this._mixer,E=T.time;let a=this._weightInterpolant;a===null&&(a=T._lendControlInterpolant(),this._weightInterpolant=a);const y=a.parameterPositions,t=a.sampleValues;return y[0]=E,t[0]=i,y[1]=E+e,t[1]=x,this}}const a7=new Float32Array(1);class o7 extends ho{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,i){const x=e._localRoot||this._root,T=e._clip.tracks,E=T.length,a=e._propertyBindings,y=e._interpolants,t=x.uuid,r=this._bindingsByRootAndName;let p=r[t];p===void 0&&(p={},r[t]=p);for(let h=0;h!==E;++h){const o=T[h],l=o.name;let n=p[l];if(n!==void 0)++n.referenceCount,a[h]=n;else{if(n=a[h],n!==void 0){n._cacheIndex===null&&(++n.referenceCount,this._addInactiveBinding(n,t,l));continue}const u=i&&i._propertyBindings[h].binding.parsedPath;n=new cw(di.create(x,l,u),o.ValueTypeName,o.getValueSize()),++n.referenceCount,this._addInactiveBinding(n,t,l),a[h]=n}y[h].resultBuffer=n.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(e._cacheIndex===null){const x=(e._localRoot||this._root).uuid,T=e._clip.uuid,E=this._actionsByClip[T];this._bindAction(e,E&&E.knownActions[0]),this._addInactiveAction(e,T,x)}const i=e._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(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const i=e._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(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){const i=e._cacheIndex;return i!==null&&i=0;--x)e[x].stop();return this}update(e){e*=this.timeScale;const i=this._actions,x=this._nActiveActions,T=this.time+=e,E=Math.sign(e),a=this._accuIndex^=1;for(let r=0;r!==x;++r)i[r]._update(T,e,E,a);const y=this._bindings,t=this._nActiveBindings;for(let r=0;r!==t;++r)y[r].apply(a);return this}setTime(e){this.time=0;for(let i=0;ithis.max.x||e.ythis.max.y)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,i){return i.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y)}clampPoint(e,i){return i.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,XE).distanceTo(e)}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const YE=new pt,Fv=new pt;class v7{constructor(e=new pt,i=new pt){this.start=e,this.end=i}set(e,i){return this.start.copy(e),this.end.copy(i),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,i){return this.delta(i).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,i){YE.subVectors(e,this.start),Fv.subVectors(this.end,this.start);const x=Fv.dot(Fv);let E=Fv.dot(YE)/x;return i&&(E=nn(E,0,1)),E}closestPointToPoint(e,i,x){const T=this.closestPointToPointParameter(e,i);return this.delta(x).multiplyScalar(T).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}const kE=new pt;class m7 extends vi{constructor(e,i){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=i,this.type="SpotLightHelper";const x=new ei,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 a=0,y=1,t=32;a1)for(let h=0;h.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{$E.set(e.z,0,-e.x).normalize();const i=Math.acos(e.y);this.quaternion.setFromAxisAngle($E,i)}}setLength(e,i=e*.2,x=i*.2){this.line.scale.set(1,Math.max(1e-4,e-i),1),this.line.updateMatrix(),this.cone.scale.set(x,i,x),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}}class L7 extends wa{constructor(e=1){const i=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],x=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],T=new ei;T.setAttribute("position",new xe(i,3)),T.setAttribute("color",new xe(x,3));const E=new wr({vertexColors:!0,toneMapped:!1});super(T,E),this.type="AxesHelper"}setColors(e,i,x){const T=new fe,E=this.geometry.attributes.color.array;return T.set(e),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 b7{constructor(){this.type="ShapePath",this.color=new fe,this.subPaths=[],this.currentPath=null}moveTo(e,i){return this.currentPath=new fd,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,i),this}lineTo(e,i){return this.currentPath.lineTo(e,i),this}quadraticCurveTo(e,i,x,T){return this.currentPath.quadraticCurveTo(e,i,x,T),this}bezierCurveTo(e,i,x,T,E,a){return this.currentPath.bezierCurveTo(e,i,x,T,E,a),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){function i(s){const c=[];for(let d=0,v=s.length;dNumber.EPSILON){if(w<0&&(M=c[S],C=-C,A=c[m],w=-w),s.yA.y)continue;if(s.y===M.y){if(s.x===M.x)return!0}else{const P=w*(s.x-M.x)-C*(s.y-M.y);if(P===0)return!0;if(P<0)continue;v=!v}}else{if(s.y!==M.y)continue;if(A.x<=s.x&&s.x<=M.x||M.x<=s.x&&s.x<=A.x)return!0}}return v}const T=Ma.isClockWise,E=this.subPaths;if(E.length===0)return[];let a,y,t;const r=[];if(E.length===1)return y=E[0],t=new Ah,t.curves=y.curves,r.push(t),r;let p=!T(E[0].getPoints());p=e?!p:p;const h=[],o=[];let l=[],n=0,u;o[n]=void 0,l[n]=[];for(let s=0,c=E.length;s1){let s=!1,c=0;for(let d=0,v=o.length;d0&&s===!1&&(l=h)}let f;for(let s=0,c=o.length;s{const h=typeof r=="function"?r(e):r;if(h!==e){const o=e;e=p?h:Object.assign({},e,h),i.forEach(l=>l(e,o))}},T=()=>e,E=(r,p=T,h=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let o=p(e);function l(){const n=p(e);if(!h(o,n)){const u=o;r(o=n,u)}}return i.add(l),()=>i.delete(l)},t={setState:x,getState:T,subscribe:(r,p,h)=>p||h?E(r,p,h):(i.add(r),()=>i.delete(r)),destroy:()=>i.clear()};return e=g(x,T,t),t}const D7=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),QE=D7?ie.useEffect:ie.useLayoutEffect;function I7(g){const e=typeof g=="function"?O7(g):g,i=(x=e.getState,T=Object.is)=>{const[,E]=ie.useReducer(f=>f+1,0),a=e.getState(),y=ie.useRef(a),t=ie.useRef(x),r=ie.useRef(T),p=ie.useRef(!1),h=ie.useRef();h.current===void 0&&(h.current=x(a));let o,l=!1;(y.current!==a||t.current!==x||r.current!==T||p.current)&&(o=x(a),l=!T(h.current,o)),QE(()=>{l&&(h.current=o),y.current=a,t.current=x,r.current=T,p.current=!1});const n=ie.useRef(a);QE(()=>{const f=()=>{try{const c=e.getState(),d=t.current(c);r.current(h.current,d)||(y.current=c,h.current=d,E())}catch{p.current=!0,E()}},s=e.subscribe(f);return e.getState()!==n.current&&f(),s},[]);const u=l?o:h.current;return ie.useDebugValue(u),u};return Object.assign(i,e),i[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const x=[i,e];return{next(){const T=x.length<=0;return{value:x.shift(),done:T}}}},i}var gw={exports:{}},ry={exports:{}},sy={};/** + * @license React + * scheduler.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var _E;function N7(){return _E||(_E=1,function(g){function e(z,W){var k=z.length;z.push(W);t:for(;0>>1,Q=z[J];if(0>>1;JT(U,k))VT(j,U)?(z[J]=j,z[V]=k,J=V):(z[J]=U,z[K]=k,J=K);else if(VT(j,k))z[J]=j,z[V]=k,J=V;else break t}}return W}function T(z,W){var k=z.sortIndex-W.sortIndex;return k!==0?k:z.id-W.id}if(typeof performance=="object"&&typeof performance.now=="function"){var E=performance;g.unstable_now=function(){return E.now()}}else{var a=Date,y=a.now();g.unstable_now=function(){return a.now()-y}}var t=[],r=[],p=1,h=null,o=3,l=!1,n=!1,u=!1,f=typeof setTimeout=="function"?setTimeout:null,s=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 d(z){for(var W=i(r);W!==null;){if(W.callback===null)x(r);else if(W.startTime<=z)x(r),W.sortIndex=W.expirationTime,e(t,W);else break;W=i(r)}}function v(z){if(u=!1,d(z),!n)if(i(t)!==null)n=!0,B(m);else{var W=i(r);W!==null&&G(v,W.startTime-z)}}function m(z,W){n=!1,u&&(u=!1,s(A),A=-1),l=!0;var k=o;try{for(d(W),h=i(t);h!==null&&(!(h.expirationTime>W)||z&&!P());){var J=h.callback;if(typeof J=="function"){h.callback=null,o=h.priorityLevel;var Q=J(h.expirationTime<=W);W=g.unstable_now(),typeof Q=="function"?h.callback=Q:h===i(t)&&x(t),d(W)}else x(t);h=i(t)}if(h!==null)var Y=!0;else{var K=i(r);K!==null&&G(v,K.startTime-W),Y=!1}return Y}finally{h=null,o=k,l=!1}}var S=!1,M=null,A=-1,C=5,w=-1;function P(){return!(g.unstable_now()-wz||125J?(z.sortIndex=k,e(r,z),i(t)===null&&z===i(r)&&(u?(s(A),A=-1):u=!0,G(v,k-J))):(z.sortIndex=Q,e(t,z),n||l||(n=!0,B(m))),z},g.unstable_shouldYield=P,g.unstable_wrapCallback=function(z){var W=o;return function(){var k=o;o=W;try{return z.apply(this,arguments)}finally{o=k}}}}(sy)),sy}var qE;function B7(){return qE||(qE=1,ry.exports=N7()),ry.exports}/** + * @license React + * react-reconciler.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var U7=function(e){var i={},x=ie,T=B7(),E=Object.assign;function a(b){for(var F="https://reactjs.org/docs/error-decoder.html?invariant="+b,H=1;HPt||_[vt]!==rt[Pt]){var Vt=` +`+_[vt].replace(" at new "," at ");return b.displayName&&Vt.includes("")&&(Vt=Vt.replace("",b.displayName)),Vt}while(1<=vt&&0<=Pt);break}}}finally{Ue=!1,Error.prepareStackTrace=H}return(b=b?b.displayName||b.name:"")?ze(b):""}var bi=Object.prototype.hasOwnProperty,dn=[],Ci=-1;function pn(b){return{current:b}}function be(b){0>Ci||(b.current=dn[Ci],dn[Ci]=null,Ci--)}function de(b,F){Ci++,dn[Ci]=b.current,b.current=F}var Rr={},Ke=pn(Rr),Ii=pn(!1),Vr=Rr;function qn(b,F){var H=b.type.contextTypes;if(!H)return Rr;var Z=b.stateNode;if(Z&&Z.__reactInternalMemoizedUnmaskedChildContext===F)return Z.__reactInternalMemoizedMaskedChildContext;var _={},rt;for(rt in H)_[rt]=F[rt];return Z&&(b=b.stateNode,b.__reactInternalMemoizedUnmaskedChildContext=F,b.__reactInternalMemoizedMaskedChildContext=_),_}function vn(b){return b=b.childContextTypes,b!=null}function Bi(){be(Ii),be(Ke)}function ur(b,F,H){if(Ke.current!==Rr)throw Error(a(168));de(Ke,F),de(Ii,H)}function Ra(b,F,H){var Z=b.stateNode;if(F=F.childContextTypes,typeof Z.getChildContext!="function")return H;Z=Z.getChildContext();for(var _ in Z)if(!(_ in F))throw Error(a(108,A(b)||"Unknown",_));return E({},H,Z)}function Cn(b){return b=(b=b.stateNode)&&b.__reactInternalMemoizedMergedChildContext||Rr,Vr=Ke.current,de(Ke,b),de(Ii,Ii.current),!0}function La(b,F,H){var Z=b.stateNode;if(!Z)throw Error(a(169));H?(b=Ra(b,F,Vr),Z.__reactInternalMemoizedMergedChildContext=b,be(Ii),be(Ke),de(Ke,b)):be(Ii),de(Ii,H)}var tr=Math.clz32?Math.clz32:Nd,co=Math.log,Cg=Math.LN2;function Nd(b){return b>>>=0,b===0?32:31-(co(b)/Cg|0)|0}var po=64,vo=4194304;function hs(b){switch(b&-b){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 b&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return b&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return b}}function ml(b,F){var H=b.pendingLanes;if(H===0)return 0;var Z=0,_=b.suspendedLanes,rt=b.pingedLanes,vt=H&268435455;if(vt!==0){var Pt=vt&~_;Pt!==0?Z=hs(Pt):(rt&=vt,rt!==0&&(Z=hs(rt)))}else vt=H&~_,vt!==0?Z=hs(vt):rt!==0&&(Z=hs(rt));if(Z===0)return 0;if(F!==0&&F!==Z&&!(F&_)&&(_=Z&-Z,rt=F&-F,_>=rt||_===16&&(rt&4194240)!==0))return F;if(Z&4&&(Z|=H&16),F=b.entangledLanes,F!==0)for(b=b.entanglements,F&=Z;0H;H++)F.push(b);return F}function mo(b,F,H){b.pendingLanes|=F,F!==536870912&&(b.suspendedLanes=0,b.pingedLanes=0),b=b.eventTimes,F=31-tr(F),b[F]=H}function Ud(b,F){var H=b.pendingLanes&~F;b.pendingLanes=F,b.suspendedLanes=0,b.pingedLanes=0,b.expiredLanes&=F,b.mutableReadLanes&=F,b.entangledLanes&=F,F=b.entanglements;var Z=b.eventTimes;for(b=b.expirationTimes;0>=vt,_-=vt,Ds=1<<32-tr(F)+_|H<<_|Z,kr=rt+b}else Ds=1<Je?(qi=We,We=null):qi=We.sibling;var oi=Ee(Ft,We,Ut[Je],oe);if(oi===null){We===null&&(We=qi);break}b&&We&&oi.alternate===null&&F(Ft,We),Rt=rt(oi,Rt,Je),Ze===null?ye=oi:Ze.sibling=oi,Ze=oi,We=qi}if(Je===Ut.length)return H(Ft,We),Ri&&Is(Ft,Je),ye;if(We===null){for(;JeJe?(qi=We,We=null):qi=We.sibling;var Es=Ee(Ft,We,oi.value,oe);if(Es===null){We===null&&(We=qi);break}b&&We&&Es.alternate===null&&F(Ft,We),Rt=rt(Es,Rt,Je),Ze===null?ye=Es:Ze.sibling=Es,Ze=Es,We=qi}if(oi.done)return H(Ft,We),Ri&&Is(Ft,Je),ye;if(We===null){for(;!oi.done;Je++,oi=Ut.next())oi=He(Ft,oi.value,oe),oi!==null&&(Rt=rt(oi,Rt,Je),Ze===null?ye=oi:Ze.sibling=oi,Ze=oi);return Ri&&Is(Ft,Je),ye}for(We=Z(Ft,We);!oi.done;Je++,oi=Ut.next())oi=gi(We,Ft,Je,oi.value,oe),oi!==null&&(b&&oi.alternate!==null&&We.delete(oi.key===null?Je:oi.key),Rt=rt(oi,Rt,Je),Ze===null?ye=oi:Ze.sibling=oi,Ze=oi);return b&&We.forEach(function(Su){return F(Ft,Su)}),Ri&&Is(Ft,Je),ye}function gr(Ft,Rt,Ut,oe){if(typeof Ut=="object"&&Ut!==null&&Ut.type===p&&Ut.key===null&&(Ut=Ut.props.children),typeof Ut=="object"&&Ut!==null){switch(Ut.$$typeof){case t:t:{for(var ye=Ut.key,Ze=Rt;Ze!==null;){if(Ze.key===ye){if(ye=Ut.type,ye===p){if(Ze.tag===7){H(Ft,Ze.sibling),Rt=_(Ze,Ut.props.children),Rt.return=Ft,Ft=Rt;break t}}else if(Ze.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===d&&Cl(ye)===Ze.type){H(Ft,Ze.sibling),Rt=_(Ze,Ut.props),Rt.ref=Mo(Ft,Ze,Ut),Rt.return=Ft,Ft=Rt;break t}H(Ft,Ze);break}else F(Ft,Ze);Ze=Ze.sibling}Ut.type===p?(Rt=pa(Ut.props.children,Ft.mode,oe,Ut.key),Rt.return=Ft,Ft=Rt):(oe=yu(Ut.type,Ut.key,Ut.props,null,Ft.mode,oe),oe.ref=Mo(Ft,Rt,Ut),oe.return=Ft,Ft=oe)}return vt(Ft);case r:t:{for(Ze=Ut.key;Rt!==null;){if(Rt.key===Ze)if(Rt.tag===4&&Rt.stateNode.containerInfo===Ut.containerInfo&&Rt.stateNode.implementation===Ut.implementation){H(Ft,Rt.sibling),Rt=_(Rt,Ut.children||[]),Rt.return=Ft,Ft=Rt;break t}else{H(Ft,Rt);break}else F(Ft,Rt);Rt=Rt.sibling}Rt=Or(Ut,Ft.mode,oe),Rt.return=Ft,Ft=Rt}return vt(Ft);case d:return Ze=Ut._init,gr(Ft,Rt,Ze(Ut._payload),oe)}if(D(Ut))return ge(Ft,Rt,Ut,oe);if(S(Ut))return Hn(Ft,Rt,Ut,oe);jr(Ft,Ut)}return typeof Ut=="string"&&Ut!==""||typeof Ut=="number"?(Ut=""+Ut,Rt!==null&&Rt.tag===6?(H(Ft,Rt.sibling),Rt=_(Rt,Ut),Rt.return=Ft,Ft=Rt):(H(Ft,Rt),Rt=Vn(Ut,Ft.mode,oe),Rt.return=Ft,Ft=Rt),vt(Ft)):H(Ft,Rt)}return gr}var Co=jd(!0),Zd=jd(!1),ds={},Ui=pn(ds),Ao=pn(ds),wo=pn(ds);function ps(b){if(b===ds)throw Error(a(174));return b}function Bf(b,F){de(wo,F),de(Ao,b),de(Ui,ds),b=G(F),be(Ui),de(Ui,b)}function Po(){be(Ui),be(Ao),be(wo)}function Jd(b){var F=ps(wo.current),H=ps(Ui.current);F=z(H,b.type,F),H!==F&&(de(Ao,b),de(Ui,F))}function vs(b){Ao.current===b&&(be(Ui),be(Ao))}var Ct=pn(0);function Ht(b){for(var F=b;F!==null;){if(F.tag===13){var H=F.memoizedState;if(H!==null&&(H=H.dehydrated,H===null||Pa(H)||vl(H)))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===b)break;for(;F.sibling===null;){if(F.return===null||F.return===b)return null;F=F.return}F.sibling.return=F.return,F=F.sibling}return null}var It=[];function ue(){for(var b=0;bH?H:4,b(!0);var Z=Ye.transition;Ye.transition={};try{b(!1),F()}finally{hi=H,Ye.transition=Z}}function qd(){return fr().memoizedState}function on(b,F,H){var Z=Ss(b);H={lane:Z,action:H,hasEagerState:!1,eagerState:null,next:null},tp(b)?ep(F,H):(Wf(b,F,H),H=Un(),b=br(b,Z,H),b!==null&&ip(b,F,Z))}function In(b,F,H){var Z=Ss(b),_={lane:Z,action:H,hasEagerState:!1,eagerState:null,next:null};if(tp(b))ep(F,_);else{Wf(b,F,_);var rt=b.alternate;if(b.lanes===0&&(rt===null||rt.lanes===0)&&(rt=F.lastRenderedReducer,rt!==null))try{var vt=F.lastRenderedState,Pt=rt(vt,H);if(_.hasEagerState=!0,_.eagerState=Pt,fs(Pt,vt))return}catch{}finally{}H=Un(),b=br(b,Z,H),b!==null&&ip(b,F,Z)}}function tp(b){var F=b.alternate;return b===Oe||F!==null&&F===Oe}function ep(b,F){ia=$n=!0;var H=b.pending;H===null?F.next=F:(F.next=H.next,H.next=F),b.pending=F}function Wf(b,F,H){Qi!==null&&b.mode&1&&!(je&2)?(b=F.interleaved,b===null?(H.next=H,cs===null?cs=[F]:cs.push(F)):(H.next=b.next,b.next=H),F.interleaved=H):(b=F.pending,b===null?H.next=H:(H.next=b.next,b.next=H),F.pending=H)}function ip(b,F,H){if(H&4194240){var Z=F.lanes;Z&=b.pendingLanes,H|=Z,F.lanes=H,wf(b,H)}}var Fo={readContext:Fi,useCallback:an,useContext:an,useEffect:an,useImperativeHandle:an,useInsertionEffect:an,useLayoutEffect:an,useMemo:an,useReducer:an,useRef:an,useState:an,useDebugValue:an,useDeferredValue:an,useTransition:an,useMutableSource:an,useSyncExternalStore:an,useId:an,unstable_isNewReconciler:!1},Dl={readContext:Fi,useCallback:function(b,F){return ms().memoizedState=[b,F===void 0?null:F],b},useContext:Fi,useEffect:bo,useImperativeHandle:function(b,F,H){return H=H!=null?H.concat([b]):null,ra(4194308,4,bl.bind(null,F,b),H)},useLayoutEffect:function(b,F){return ra(4194308,4,b,F)},useInsertionEffect:function(b,F){return ra(4,2,b,F)},useMemo:function(b,F){var H=ms();return F=F===void 0?null:F,b=b(),H.memoizedState=[b,F],b},useReducer:function(b,F,H){var Z=ms();return F=H!==void 0?H(F):F,Z.memoizedState=Z.baseState=F,b={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:b,lastRenderedState:F},Z.queue=b,b=b.dispatch=on.bind(null,Oe,b),[Z.memoizedState,b]},useRef:function(b){var F=ms();return b={current:b},F.memoizedState=b},useState:eu,useDebugValue:Ol,useDeferredValue:function(b){var F=eu(b),H=F[0],Z=F[1];return bo(function(){var _=Ye.transition;Ye.transition={};try{Z(b)}finally{Ye.transition=_}},[b]),H},useTransition:function(){var b=eu(!1),F=b[0];return b=Og.bind(null,b[1]),ms().memoizedState=b,[F,b]},useMutableSource:function(){},useSyncExternalStore:function(b,F,H){var Z=Oe,_=ms();if(Ri){if(H===void 0)throw Error(a(407));H=H()}else{if(H=F(),Qi===null)throw Error(a(349));Oi&30||Pl(Z,F,H)}_.memoizedState=H;var rt={value:H,getSnapshot:F};return _.queue=rt,bo(Rl.bind(null,Z,rt,b),[b]),Z.flags|=2048,na(9,zf.bind(null,Z,rt,H,F),void 0,null),H},useId:function(){var b=ms(),F=Qi.identifierPrefix;if(Ri){var H=kr,Z=Ds;H=(Z&~(1<<32-tr(Z)-1)).toString(32)+H,F=":"+F+"R"+H,H=Al++,0Vl&&(F.flags|=128,Z=!0,Nn(_,!1),F.lanes=4194304)}else{if(!Z)if(b=Ht(rt),b!==null){if(F.flags|=128,Z=!0,b=b.updateQueue,b!==null&&(F.updateQueue=b,F.flags|=4),Nn(_,!0),_.tail===null&&_.tailMode==="hidden"&&!rt.alternate&&!Ri)return Pe(F),null}else 2*mn()-_.renderingStartTime>Vl&&H!==1073741824&&(F.flags|=128,Z=!0,Nn(_,!1),F.lanes=4194304);_.isBackwards?(rt.sibling=F.child,F.child=rt):(b=_.last,b!==null?b.sibling=rt:F.child=rt,_.last=rt)}return _.tail!==null?(F=_.tail,_.rendering=F,_.tail=F.sibling,_.renderingStartTime=mn(),F.sibling=null,b=Ct.current,de(Ct,Z?b&1|2:b&1),F):(Pe(F),null);case 22:case 23:return sc(),Z=F.memoizedState!==null,b!==null&&b.memoizedState!==null!==Z&&(F.flags|=8192),Z&&F.mode&1?vr&1073741824&&(Pe(F),nt&&F.subtreeFlags&6&&(F.flags|=8192)):Pe(F),null;case 24:return null;case 25:return null}throw Error(a(156,F.tag))}var Ig=y.ReactCurrentOwner,cr=!1;function Hi(b,F,H,Z){F.child=b===null?Zd(F,null,H,Z):Co(F,b.child,H,Z)}function op(b,F,H,Z,_){H=H.render;var rt=F.ref;return ba(F,_),Z=ci(b,F,H,Z,rt,_),H=Uf(),b!==null&&!cr?(F.updateQueue=b.updateQueue,F.flags&=-2053,b.lanes&=~_,ln(b,F,_)):(Ri&&H&&_h(F),F.flags|=1,Hi(b,F,Z,_),F.child)}function lp(b,F,H,Z,_){if(b===null){var rt=H.type;return typeof rt=="function"&&!fc(rt)&&rt.defaultProps===void 0&&H.compare===null&&H.defaultProps===void 0?(F.tag=15,F.type=rt,hp(b,F,rt,Z,_)):(b=yu(H.type,null,Z,F,F.mode,_),b.ref=F.ref,b.return=F,F.child=b)}if(rt=b.child,!(b.lanes&_)){var vt=rt.memoizedProps;if(H=H.compare,H=H!==null?H:Vi,H(vt,Z)&&b.ref===F.ref)return ln(b,F,_)}return F.flags|=1,b=Gs(rt,Z),b.ref=F.ref,b.return=F,F.child=b}function hp(b,F,H,Z,_){if(b!==null&&Vi(b.memoizedProps,Z)&&b.ref===F.ref)if(cr=!1,(b.lanes&_)!==0)b.flags&131072&&(cr=!0);else return F.lanes=b.lanes,ln(b,F,_);return Zr(b,F,H,Z,_)}function up(b,F,H){var Z=F.pendingProps,_=Z.children,rt=b!==null?b.memoizedState:null;if(Z.mode==="hidden")if(!(F.mode&1))F.memoizedState={baseLanes:0,cachePool:null},de(Uo,vr),vr|=H;else if(H&1073741824)F.memoizedState={baseLanes:0,cachePool:null},Z=rt!==null?rt.baseLanes:H,de(Uo,vr),vr|=Z;else return b=rt!==null?rt.baseLanes|H:H,F.lanes=F.childLanes=1073741824,F.memoizedState={baseLanes:b,cachePool:null},F.updateQueue=null,de(Uo,vr),vr|=b,null;else rt!==null?(Z=rt.baseLanes|H,F.memoizedState=null):Z=H,de(Uo,vr),vr|=Z;return Hi(b,F,_,H),F.child}function fp(b,F){var H=F.ref;(b===null&&H!==null||b!==null&&b.ref!==H)&&(F.flags|=512,F.flags|=2097152)}function Zr(b,F,H,Z,_){var rt=vn(H)?Vr:Ke.current;return rt=qn(F,rt),ba(F,_),H=ci(b,F,H,Z,rt,_),Z=Uf(),b!==null&&!cr?(F.updateQueue=b.updateQueue,F.flags&=-2053,b.lanes&=~_,ln(b,F,_)):(Ri&&Z&&_h(F),F.flags|=1,Hi(b,F,H,_),F.child)}function cp(b,F,H,Z,_){if(vn(H)){var rt=!0;Cn(F)}else rt=!1;if(ba(F,_),F.stateNode===null)b!==null&&(b.alternate=null,F.alternate=null,F.flags|=2),Xd(F,H,Z),xo(F,H,Z,_),Z=!0;else if(b===null){var vt=F.stateNode,Pt=F.memoizedProps;vt.props=Pt;var Vt=vt.context,Qt=H.contextType;typeof Qt=="object"&&Qt!==null?Qt=Fi(Qt):(Qt=vn(H)?Vr:Ke.current,Qt=qn(F,Qt));var pe=H.getDerivedStateFromProps,He=typeof pe=="function"||typeof vt.getSnapshotBeforeUpdate=="function";He||typeof vt.UNSAFE_componentWillReceiveProps!="function"&&typeof vt.componentWillReceiveProps!="function"||(Pt!==Z||Vt!==Qt)&&Df(F,vt,Z,Qt),sn=!1;var Ee=F.memoizedState;vt.state=Ee,Xr(F,Z,vt,_),Vt=F.memoizedState,Pt!==Z||Ee!==Vt||Ii.current||sn?(typeof pe=="function"&&(xl(F,H,pe,Z),Vt=F.memoizedState),(Pt=sn||Wd(F,H,Pt,Z,Ee,Vt,Qt))?(He||typeof vt.UNSAFE_componentWillMount!="function"&&typeof vt.componentWillMount!="function"||(typeof vt.componentWillMount=="function"&&vt.componentWillMount(),typeof vt.UNSAFE_componentWillMount=="function"&&vt.UNSAFE_componentWillMount()),typeof vt.componentDidMount=="function"&&(F.flags|=4194308)):(typeof vt.componentDidMount=="function"&&(F.flags|=4194308),F.memoizedProps=Z,F.memoizedState=Vt),vt.props=Z,vt.state=Vt,vt.context=Qt,Z=Pt):(typeof vt.componentDidMount=="function"&&(F.flags|=4194308),Z=!1)}else{vt=F.stateNode,Of(b,F),Pt=F.memoizedProps,Qt=F.type===F.elementType?Pt:An(F.type,Pt),vt.props=Qt,He=F.pendingProps,Ee=vt.context,Vt=H.contextType,typeof Vt=="object"&&Vt!==null?Vt=Fi(Vt):(Vt=vn(H)?Vr:Ke.current,Vt=qn(F,Vt));var gi=H.getDerivedStateFromProps;(pe=typeof gi=="function"||typeof vt.getSnapshotBeforeUpdate=="function")||typeof vt.UNSAFE_componentWillReceiveProps!="function"&&typeof vt.componentWillReceiveProps!="function"||(Pt!==He||Ee!==Vt)&&Df(F,vt,Z,Vt),sn=!1,Ee=F.memoizedState,vt.state=Ee,Xr(F,Z,vt,_);var ge=F.memoizedState;Pt!==He||Ee!==ge||Ii.current||sn?(typeof gi=="function"&&(xl(F,H,gi,Z),ge=F.memoizedState),(Qt=sn||Wd(F,H,Qt,Z,Ee,ge,Vt)||!1)?(pe||typeof vt.UNSAFE_componentWillUpdate!="function"&&typeof vt.componentWillUpdate!="function"||(typeof vt.componentWillUpdate=="function"&&vt.componentWillUpdate(Z,ge,Vt),typeof vt.UNSAFE_componentWillUpdate=="function"&&vt.UNSAFE_componentWillUpdate(Z,ge,Vt)),typeof vt.componentDidUpdate=="function"&&(F.flags|=4),typeof vt.getSnapshotBeforeUpdate=="function"&&(F.flags|=1024)):(typeof vt.componentDidUpdate!="function"||Pt===b.memoizedProps&&Ee===b.memoizedState||(F.flags|=4),typeof vt.getSnapshotBeforeUpdate!="function"||Pt===b.memoizedProps&&Ee===b.memoizedState||(F.flags|=1024),F.memoizedProps=Z,F.memoizedState=ge),vt.props=Z,vt.state=ge,vt.context=Vt,Z=Qt):(typeof vt.componentDidUpdate!="function"||Pt===b.memoizedProps&&Ee===b.memoizedState||(F.flags|=4),typeof vt.getSnapshotBeforeUpdate!="function"||Pt===b.memoizedProps&&Ee===b.memoizedState||(F.flags|=1024),Z=!1)}return Yf(b,F,H,Z,rt,_)}function Yf(b,F,H,Z,_,rt){fp(b,F);var vt=(F.flags&128)!==0;if(!Z&&!vt)return _&&La(F,H,!1),ln(b,F,rt);Z=F.stateNode,Ig.current=F;var Pt=vt&&typeof H.getDerivedStateFromError!="function"?null:Z.render();return F.flags|=1,b!==null&&vt?(F.child=Co(F,b.child,null,rt),F.child=Co(F,null,Pt,rt)):Hi(b,F,Pt,rt),F.memoizedState=Z.state,_&&La(F,H,!0),F.child}function dp(b){var F=b.stateNode;F.pendingContext?ur(b,F.pendingContext,F.pendingContext!==F.context):F.context&&ur(b,F.context,!1),Bf(b,F.containerInfo)}function pp(b,F,H,Z,_){return Eo(),Ml(_),F.flags|=256,Hi(b,F,H,Z),F.child}var nu={dehydrated:null,treeContext:null,retryLane:0};function Lr(b){return{baseLanes:b,cachePool:null}}function vp(b,F,H){var Z=F.pendingProps,_=Ct.current,rt=!1,vt=(F.flags&128)!==0,Pt;if((Pt=vt)||(Pt=b!==null&&b.memoizedState===null?!1:(_&2)!==0),Pt?(rt=!0,F.flags&=-129):(b===null||b.memoizedState!==null)&&(_|=1),de(Ct,_&1),b===null)return Nf(F),b=F.memoizedState,b!==null&&(b=b.dehydrated,b!==null)?(F.mode&1?vl(b)?F.lanes=8:F.lanes=1073741824:F.lanes=1,null):(_=Z.children,b=Z.fallback,rt?(Z=F.mode,rt=F.child,_={mode:"hidden",children:_},!(Z&1)&&rt!==null?(rt.childLanes=0,rt.pendingProps=_):rt=kl(_,Z,0,null),b=pa(b,Z,H,null),rt.return=F,b.return=F,rt.sibling=b,F.child=rt,F.child.memoizedState=Lr(H),F.memoizedState=nu,b):kf(F,_));if(_=b.memoizedState,_!==null){if(Pt=_.dehydrated,Pt!==null){if(vt)return F.flags&256?(F.flags&=-257,ru(b,F,H,Error(a(422)))):F.memoizedState!==null?(F.child=b.child,F.flags|=128,null):(rt=Z.fallback,_=F.mode,Z=kl({mode:"visible",children:Z.children},_,0,null),rt=pa(rt,_,H,null),rt.flags|=2,Z.return=F,rt.return=F,Z.sibling=rt,F.child=Z,F.mode&1&&Co(F,b.child,null,H),F.child.memoizedState=Lr(H),F.memoizedState=nu,rt);if(!(F.mode&1))F=ru(b,F,H,null);else if(vl(Pt))F=ru(b,F,H,Error(a(419)));else if(Z=(H&b.childLanes)!==0,cr||Z){if(Z=Qi,Z!==null){switch(H&-H){case 4:rt=2;break;case 16:rt=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:rt=32;break;case 536870912:rt=268435456;break;default:rt=0}Z=rt&(Z.suspendedLanes|H)?0:rt,Z!==0&&Z!==_.retryLane&&(_.retryLane=Z,br(b,Z,-1))}vu(),F=ru(b,F,H,Error(a(421)))}else Pa(Pt)?(F.flags|=128,F.child=b.child,F=da.bind(null,b),uo(Pt,F),F=null):(H=_.treeContext,ht&&(Pn=Gh(Pt),Jn=F,Ri=!0,Kr=null,To=!1,H!==null&&(er[ir++]=Ds,er[ir++]=kr,er[ir++]=ea,Ds=H.id,kr=H.overflow,ea=F)),F=kf(F,F.pendingProps.children),F.flags|=4096);return F}return rt?(Z=gp(b,F,Z.children,Z.fallback,H),rt=F.child,_=b.child.memoizedState,rt.memoizedState=_===null?Lr(H):{baseLanes:_.baseLanes|H,cachePool:null},rt.childLanes=b.childLanes&~H,F.memoizedState=nu,Z):(H=mp(b,F,Z.children,H),F.memoizedState=null,H)}return rt?(Z=gp(b,F,Z.children,Z.fallback,H),rt=F.child,_=b.child.memoizedState,rt.memoizedState=_===null?Lr(H):{baseLanes:_.baseLanes|H,cachePool:null},rt.childLanes=b.childLanes&~H,F.memoizedState=nu,Z):(H=mp(b,F,Z.children,H),F.memoizedState=null,H)}function kf(b,F){return F=kl({mode:"visible",children:F},b.mode,0,null),F.return=b,b.child=F}function mp(b,F,H,Z){var _=b.child;return b=_.sibling,H=Gs(_,{mode:"visible",children:H}),!(F.mode&1)&&(H.lanes=Z),H.return=F,H.sibling=null,b!==null&&(Z=F.deletions,Z===null?(F.deletions=[b],F.flags|=16):Z.push(b)),F.child=H}function gp(b,F,H,Z,_){var rt=F.mode;b=b.child;var vt=b.sibling,Pt={mode:"hidden",children:H};return!(rt&1)&&F.child!==b?(H=F.child,H.childLanes=0,H.pendingProps=Pt,F.deletions=null):(H=Gs(b,Pt),H.subtreeFlags=b.subtreeFlags&14680064),vt!==null?Z=Gs(vt,Z):(Z=pa(Z,rt,_,null),Z.flags|=2),Z.return=F,H.return=F,H.sibling=Z,F.child=H,Z}function ru(b,F,H,Z){return Z!==null&&Ml(Z),Co(F,b.child,null,H),b=kf(F,F.pendingProps.children),b.flags|=2,F.memoizedState=null,b}function sa(b,F,H){b.lanes|=F;var Z=b.alternate;Z!==null&&(Z.lanes|=F),Jh(b.return,F,H)}function Kf(b,F,H,Z,_){var rt=b.memoizedState;rt===null?b.memoizedState={isBackwards:F,rendering:null,renderingStartTime:0,last:Z,tail:H,tailMode:_}:(rt.isBackwards=F,rt.rendering=null,rt.renderingStartTime=0,rt.last=Z,rt.tail=H,rt.tailMode=_)}function yp(b,F,H){var Z=F.pendingProps,_=Z.revealOrder,rt=Z.tail;if(Hi(b,F,Z.children,H),Z=Ct.current,Z&2)Z=Z&1|2,F.flags|=128;else{if(b!==null&&b.flags&128)t:for(b=F.child;b!==null;){if(b.tag===13)b.memoizedState!==null&&sa(b,H,F);else if(b.tag===19)sa(b,H,F);else if(b.child!==null){b.child.return=b,b=b.child;continue}if(b===F)break t;for(;b.sibling===null;){if(b.return===null||b.return===F)break t;b=b.return}b.sibling.return=b.return,b=b.sibling}Z&=1}if(de(Ct,Z),!(F.mode&1))F.memoizedState=null;else switch(_){case"forwards":for(H=F.child,_=null;H!==null;)b=H.alternate,b!==null&&Ht(b)===null&&(_=H),H=H.sibling;H=_,H===null?(_=F.child,F.child=null):(_=H.sibling,H.sibling=null),Kf(F,!1,_,H,rt);break;case"backwards":for(H=null,_=F.child,F.child=null;_!==null;){if(b=_.alternate,b!==null&&Ht(b)===null){F.child=_;break}b=_.sibling,_.sibling=H,H=_,_=b}Kf(F,!0,H,null,rt);break;case"together":Kf(F,!1,null,null,void 0);break;default:F.memoizedState=null}return F.child}function ln(b,F,H){if(b!==null&&(F.dependencies=b.dependencies),Go|=F.lanes,!(H&F.childLanes))return null;if(b!==null&&F.child!==b.child)throw Error(a(153));if(F.child!==null){for(b=F.child,H=Gs(b,b.pendingProps),F.child=H,H.return=F;b.sibling!==null;)b=b.sibling,H=H.sibling=Gs(b,b.pendingProps),H.return=F;H.sibling=null}return F.child}function Ng(b,F,H){switch(F.tag){case 3:dp(F),Eo();break;case 5:Jd(F);break;case 1:vn(F.type)&&Cn(F);break;case 4:Bf(F,F.stateNode.containerInfo);break;case 10:bf(F,F.type._context,F.memoizedProps.value);break;case 13:var Z=F.memoizedState;if(Z!==null)return Z.dehydrated!==null?(de(Ct,Ct.current&1),F.flags|=128,null):H&F.child.childLanes?vp(b,F,H):(de(Ct,Ct.current&1),b=ln(b,F,H),b!==null?b.sibling:null);de(Ct,Ct.current&1);break;case 19:if(Z=(H&F.childLanes)!==0,b.flags&128){if(Z)return yp(b,F,H);F.flags|=128}var _=F.memoizedState;if(_!==null&&(_.rendering=null,_.tail=null,_.lastEffect=null),de(Ct,Ct.current),Z)break;return null;case 22:case 23:return F.lanes=0,up(b,F,H)}return ln(b,F,H)}function Bg(b,F){switch(Zn(F),F.tag){case 1:return vn(F.type)&&Bi(),b=F.flags,b&65536?(F.flags=b&-65537|128,F):null;case 3:return Po(),be(Ii),be(Ke),ue(),b=F.flags,b&65536&&!(b&128)?(F.flags=b&-65537|128,F):null;case 5:return vs(F),null;case 13:if(be(Ct),b=F.memoizedState,b!==null&&b.dehydrated!==null){if(F.alternate===null)throw Error(a(340));Eo()}return b=F.flags,b&65536?(F.flags=b&-65537|128,F):null;case 19:return be(Ct),null;case 4:return Po(),null;case 10:return Zh(F.type._context),null;case 22:case 23:return sc(),null;case 24:return null;default:return null}}var su=!1,Ba=!1,Ug=typeof WeakSet=="function"?WeakSet:Set,re=null;function Bl(b,F){var H=b.ref;if(H!==null)if(typeof H=="function")try{H(null)}catch(Z){Gn(b,F,Z)}else H.current=null}function jf(b,F,H){try{H()}catch(Z){Gn(b,F,Z)}}var xp=!1;function Zf(b,F){for(W(b.containerInfo),re=F;re!==null;)if(b=re,F=b.child,(b.subtreeFlags&1028)!==0&&F!==null)F.return=b,re=F;else for(;re!==null;){b=re;try{var H=b.alternate;if(b.flags&1024)switch(b.tag){case 0:case 11:case 15:break;case 1:if(H!==null){var Z=H.memoizedProps,_=H.memoizedState,rt=b.stateNode,vt=rt.getSnapshotBeforeUpdate(b.elementType===b.type?Z:An(b.type,Z),_);rt.__reactInternalSnapshotBeforeUpdate=vt}break;case 3:nt&&_t(b.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(Pt){Gn(b,b.return,Pt)}if(F=b.sibling,F!==null){F.return=b.return,re=F;break}re=b.return}return H=xp,xp=!1,H}function Jr(b,F,H){var Z=F.updateQueue;if(Z=Z!==null?Z.lastEffect:null,Z!==null){var _=Z=Z.next;do{if((_.tag&b)===b){var rt=_.destroy;_.destroy=void 0,rt!==void 0&&jf(F,H,rt)}_=_.next}while(_!==Z)}}function aa(b,F){if(F=F.updateQueue,F=F!==null?F.lastEffect:null,F!==null){var H=F=F.next;do{if((H.tag&b)===b){var Z=H.create;H.destroy=Z()}H=H.next}while(H!==F)}}function Jf(b){var F=b.ref;if(F!==null){var H=b.stateNode;switch(b.tag){case 5:b=B(H);break;default:b=H}typeof F=="function"?F(b):F.current=b}}function $f(b,F,H){if(us&&typeof us.onCommitFiberUnmount=="function")try{us.onCommitFiberUnmount(Yh,F)}catch{}switch(F.tag){case 0:case 11:case 14:case 15:if(b=F.updateQueue,b!==null&&(b=b.lastEffect,b!==null)){var Z=b=b.next;do{var _=Z,rt=_.destroy;_=_.tag,rt!==void 0&&(_&2||_&4)&&jf(F,H,rt),Z=Z.next}while(Z!==b)}break;case 1:if(Bl(F,H),b=F.stateNode,typeof b.componentWillUnmount=="function")try{b.props=F.memoizedProps,b.state=F.memoizedState,b.componentWillUnmount()}catch(vt){Gn(F,H,vt)}break;case 5:Bl(F,H);break;case 4:nt?_f(b,F,H):et&&et&&(F=F.stateNode.containerInfo,H=ve(F),pi(F,H))}}function Sp(b,F,H){for(var Z=F;;)if($f(b,Z,H),Z.child===null||nt&&Z.tag===4){if(Z===F)break;for(;Z.sibling===null;){if(Z.return===null||Z.return===F)return;Z=Z.return}Z.sibling.return=Z.return,Z=Z.sibling}else Z.child.return=Z,Z=Z.child}function xs(b){var F=b.alternate;F!==null&&(b.alternate=null,xs(F)),b.child=null,b.deletions=null,b.sibling=null,b.tag===5&&(F=b.stateNode,F!==null&>(F)),b.stateNode=null,b.return=null,b.dependencies=null,b.memoizedProps=null,b.memoizedState=null,b.pendingProps=null,b.stateNode=null,b.updateQueue=null}function au(b){return b.tag===5||b.tag===3||b.tag===4}function oa(b){t:for(;;){for(;b.sibling===null;){if(b.return===null||au(b.return))return null;b=b.return}for(b.sibling.return=b.return,b=b.sibling;b.tag!==5&&b.tag!==6&&b.tag!==18;){if(b.flags&2||b.child===null||b.tag===4)continue t;b.child.return=b,b=b.child}if(!(b.flags&2))return b.stateNode}}function dr(b){if(nt){t:{for(var F=b.return;F!==null;){if(au(F))break t;F=F.return}throw Error(a(160))}var H=F;switch(H.tag){case 5:F=H.stateNode,H.flags&32&&(Xe(F),H.flags&=-33),H=oa(b),ou(b,H,F);break;case 3:case 4:F=H.stateNode.containerInfo,H=oa(b),Qf(b,H,F);break;default:throw Error(a(161))}}}function Qf(b,F,H){var Z=b.tag;if(Z===5||Z===6)b=b.stateNode,F?se(H,b,F):te(H,b);else if(Z!==4&&(b=b.child,b!==null))for(Qf(b,F,H),b=b.sibling;b!==null;)Qf(b,F,H),b=b.sibling}function ou(b,F,H){var Z=b.tag;if(Z===5||Z===6)b=b.stateNode,F?ce(H,b,F):$t(H,b);else if(Z!==4&&(b=b.child,b!==null))for(ou(b,F,H),b=b.sibling;b!==null;)ou(b,F,H),b=b.sibling}function _f(b,F,H){for(var Z=F,_=!1,rt,vt;;){if(!_){_=Z.return;t:for(;;){if(_===null)throw Error(a(160));switch(rt=_.stateNode,_.tag){case 5:vt=!1;break t;case 3:rt=rt.containerInfo,vt=!0;break t;case 4:rt=rt.containerInfo,vt=!0;break t}_=_.return}_=!0}if(Z.tag===5||Z.tag===6)Sp(b,Z,H),vt?Ce(rt,Z.stateNode):ee(rt,Z.stateNode);else if(Z.tag===18)vt?Dt(rt,Z.stateNode):zt(rt,Z.stateNode);else if(Z.tag===4){if(Z.child!==null){rt=Z.stateNode.containerInfo,vt=!0,Z.child.return=Z,Z=Z.child;continue}}else if($f(b,Z,H),Z.child!==null){Z.child.return=Z,Z=Z.child;continue}if(Z===F)break;for(;Z.sibling===null;){if(Z.return===null||Z.return===F)return;Z=Z.return,Z.tag===4&&(_=!1)}Z.sibling.return=Z.return,Z=Z.sibling}}function Ua(b,F){if(nt){switch(F.tag){case 0:case 11:case 14:case 15:Jr(3,F,F.return),aa(3,F),Jr(5,F,F.return);return;case 1:return;case 5:var H=F.stateNode;if(H!=null){var Z=F.memoizedProps;b=b!==null?b.memoizedProps:Z;var _=F.type,rt=F.updateQueue;F.updateQueue=null,rt!==null&&le(H,rt,_,b,Z,F)}return;case 6:if(F.stateNode===null)throw Error(a(162));H=F.memoizedProps,Nt(F.stateNode,b!==null?b.memoizedProps:H,H);return;case 3:ht&&b!==null&&b.memoizedState.isDehydrated&&bt(F.stateNode.containerInfo);return;case 12:return;case 13:$r(F);return;case 19:$r(F);return;case 17:return}throw Error(a(163))}switch(F.tag){case 0:case 11:case 14:case 15:Jr(3,F,F.return),aa(3,F),Jr(5,F,F.return);return;case 12:return;case 13:$r(F);return;case 19:$r(F);return;case 3:ht&&b!==null&&b.memoizedState.isDehydrated&&bt(F.stateNode.containerInfo);break;case 22:case 23:return}t:if(et){switch(F.tag){case 1:case 5:case 6:break t;case 3:case 4:F=F.stateNode,pi(F.containerInfo,F.pendingChildren);break t}throw Error(a(163))}}function $r(b){var F=b.updateQueue;if(F!==null){b.updateQueue=null;var H=b.stateNode;H===null&&(H=b.stateNode=new Ug),F.forEach(function(Z){var _=Rp.bind(null,b,Z);H.has(Z)||(H.add(Z),Z.then(_,_))})}}function Tp(b,F){for(re=F;re!==null;){F=re;var H=F.deletions;if(H!==null)for(var Z=0;Z";case zl:return":has("+(Gl(b)||"")+")";case pr:return'[role="'+b.value+'"]';case za:return'"'+b.value+'"';case No:return'[data-testname="'+b.value+'"]';default:throw Error(a(365))}}function Mp(b,F){var H=[];b=[b,0];for(var Z=0;Z_&&(_=vt),Z&=~rt}if(Z=_,Z=mn()-Z,Z=(120>Z?120:480>Z?480:1080>Z?1080:1920>Z?1920:3e3>Z?3e3:4320>Z?4320:1960*Gg(Z/1960))-Z,10b?16:b,zs===null)var Z=!1;else{if(b=zs,zs=null,Wl=0,je&6)throw Error(a(331));var _=je;for(je|=4,re=b.current;re!==null;){var rt=re,vt=rt.child;if(re.flags&16){var Pt=rt.deletions;if(Pt!==null){for(var Vt=0;Vtmn()-nc?Ts(b,0):ic|=H),we(b,F)}function Pp(b,F){F===0&&(b.mode&1?(F=vo,vo<<=1,!(vo&130023424)&&(vo=4194304)):F=1);var H=Un();b=Wo(b,F),b!==null&&(mo(b,F,H),we(b,H))}function da(b){var F=b.memoizedState,H=0;F!==null&&(H=F.retryLane),Pp(b,H)}function Rp(b,F){var H=0;switch(b.tag){case 13:var Z=b.stateNode,_=b.memoizedState;_!==null&&(H=_.retryLane);break;case 19:Z=b.stateNode;break;default:throw Error(a(314))}Z!==null&&Z.delete(F),Pp(b,H)}var uc;uc=function(b,F,H){if(b!==null)if(b.memoizedProps!==F.pendingProps||Ii.current)cr=!0;else{if(!(b.lanes&H)&&!(F.flags&128))return cr=!1,Ng(b,F,H);cr=!!(b.flags&131072)}else cr=!1,Ri&&F.flags&1048576&&Yd(F,Tl,F.index);switch(F.lanes=0,F.tag){case 2:var Z=F.type;b!==null&&(b.alternate=null,F.alternate=null,F.flags|=2),b=F.pendingProps;var _=qn(F,Ke.current);ba(F,H),_=ci(null,F,Z,b,_,H);var rt=Uf();return F.flags|=1,typeof _=="object"&&_!==null&&typeof _.render=="function"&&_.$$typeof===void 0?(F.tag=1,F.memoizedState=null,F.updateQueue=null,vn(Z)?(rt=!0,Cn(F)):rt=!1,F.memoizedState=_.state!==null&&_.state!==void 0?_.state:null,Ff(F),_.updater=Qh,F.stateNode=_,_._reactInternals=F,xo(F,Z,b,H),F=Yf(null,F,Z,!0,rt,H)):(F.tag=0,Ri&&rt&&_h(F),Hi(null,F,_,H),F=F.child),F;case 16:Z=F.elementType;t:{switch(b!==null&&(b.alternate=null,F.alternate=null,F.flags|=2),b=F.pendingProps,_=Z._init,Z=_(Z._payload),F.type=Z,_=F.tag=Lp(Z),b=An(Z,b),_){case 0:F=Zr(null,F,Z,b,H);break t;case 1:F=cp(null,F,Z,b,H);break t;case 11:F=op(null,F,Z,b,H);break t;case 14:F=lp(null,F,Z,An(Z.type,b),H);break t}throw Error(a(306,Z,""))}return F;case 0:return Z=F.type,_=F.pendingProps,_=F.elementType===Z?_:An(Z,_),Zr(b,F,Z,_,H);case 1:return Z=F.type,_=F.pendingProps,_=F.elementType===Z?_:An(Z,_),cp(b,F,Z,_,H);case 3:t:{if(dp(F),b===null)throw Error(a(387));Z=F.pendingProps,rt=F.memoizedState,_=rt.element,Of(b,F),Xr(F,Z,null,H);var vt=F.memoizedState;if(Z=vt.element,ht&&rt.isDehydrated)if(rt={element:Z,isDehydrated:!1,cache:vt.cache,transitions:vt.transitions},F.updateQueue.baseState=rt,F.memoizedState=rt,F.flags&256){_=Error(a(423)),F=pp(b,F,Z,H,_);break t}else if(Z!==_){_=Error(a(424)),F=pp(b,F,Z,H,_);break t}else for(ht&&(Pn=zh(F.stateNode.containerInfo),Jn=F,Ri=!0,Kr=null,To=!1),H=Zd(F,null,Z,H),F.child=H;H;)H.flags=H.flags&-3|4096,H=H.sibling;else{if(Eo(),Z===_){F=ln(b,F,H);break t}Hi(b,F,Z,H)}F=F.child}return F;case 5:return Jd(F),b===null&&Nf(F),Z=F.type,_=F.pendingProps,rt=b!==null?b.memoizedProps:null,vt=_.children,U(Z,_)?vt=null:rt!==null&&U(Z,rt)&&(F.flags|=32),fp(b,F),Hi(b,F,vt,H),F.child;case 6:return b===null&&Nf(F),null;case 13:return vp(b,F,H);case 4:return Bf(F,F.stateNode.containerInfo),Z=F.pendingProps,b===null?F.child=Co(F,null,Z,H):Hi(b,F,Z,H),F.child;case 11:return Z=F.type,_=F.pendingProps,_=F.elementType===Z?_:An(Z,_),op(b,F,Z,_,H);case 7:return Hi(b,F,F.pendingProps,H),F.child;case 8:return Hi(b,F,F.pendingProps.children,H),F.child;case 12:return Hi(b,F,F.pendingProps.children,H),F.child;case 10:t:{if(Z=F.type._context,_=F.pendingProps,rt=F.memoizedProps,vt=_.value,bf(F,Z,vt),rt!==null)if(fs(rt.value,vt)){if(rt.children===_.children&&!Ii.current){F=ln(b,F,H);break t}}else for(rt=F.child,rt!==null&&(rt.return=F);rt!==null;){var Pt=rt.dependencies;if(Pt!==null){vt=rt.child;for(var Vt=Pt.firstContext;Vt!==null;){if(Vt.context===Z){if(rt.tag===1){Vt=Dn(-1,H&-H),Vt.tag=2;var Qt=rt.updateQueue;if(Qt!==null){Qt=Qt.shared;var pe=Qt.pending;pe===null?Vt.next=Vt:(Vt.next=pe.next,pe.next=Vt),Qt.pending=Vt}}rt.lanes|=H,Vt=rt.alternate,Vt!==null&&(Vt.lanes|=H),Jh(rt.return,H,F),Pt.lanes|=H;break}Vt=Vt.next}}else if(rt.tag===10)vt=rt.type===F.type?null:rt.child;else if(rt.tag===18){if(vt=rt.return,vt===null)throw Error(a(341));vt.lanes|=H,Pt=vt.alternate,Pt!==null&&(Pt.lanes|=H),Jh(vt,H,F),vt=rt.sibling}else vt=rt.child;if(vt!==null)vt.return=rt;else for(vt=rt;vt!==null;){if(vt===F){vt=null;break}if(rt=vt.sibling,rt!==null){rt.return=vt.return,vt=rt;break}vt=vt.return}rt=vt}Hi(b,F,_.children,H),F=F.child}return F;case 9:return _=F.type,Z=F.pendingProps.children,ba(F,H),_=Fi(_),Z=Z(_),F.flags|=1,Hi(b,F,Z,H),F.child;case 14:return Z=F.type,_=An(Z,F.pendingProps),_=An(Z.type,_),lp(b,F,Z,_,H);case 15:return hp(b,F,F.type,F.pendingProps,H);case 17:return Z=F.type,_=F.pendingProps,_=F.elementType===Z?_:An(Z,_),b!==null&&(b.alternate=null,F.alternate=null,F.flags|=2),F.tag=1,vn(Z)?(b=!0,Cn(F)):b=!1,ba(F,H),Xd(F,Z,_),xo(F,Z,_,H),Yf(null,F,Z,!0,b,H);case 19:return yp(b,F,H);case 22:return up(b,F,H)}throw Error(a(156,F.tag))};function gu(b,F){return Xh(b,F)}function Vg(b,F,H,Z){this.tag=b,this.key=H,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=Z,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Fr(b,F,H,Z){return new Vg(b,F,H,Z)}function fc(b){return b=b.prototype,!(!b||!b.isReactComponent)}function Lp(b){if(typeof b=="function")return fc(b)?1:0;if(b!=null){if(b=b.$$typeof,b===u)return 11;if(b===c)return 14}return 2}function Gs(b,F){var H=b.alternate;return H===null?(H=Fr(b.tag,F,b.key,b.mode),H.elementType=b.elementType,H.type=b.type,H.stateNode=b.stateNode,H.alternate=b,b.alternate=H):(H.pendingProps=F,H.type=b.type,H.flags=0,H.subtreeFlags=0,H.deletions=null),H.flags=b.flags&14680064,H.childLanes=b.childLanes,H.lanes=b.lanes,H.child=b.child,H.memoizedProps=b.memoizedProps,H.memoizedState=b.memoizedState,H.updateQueue=b.updateQueue,F=b.dependencies,H.dependencies=F===null?null:{lanes:F.lanes,firstContext:F.firstContext},H.sibling=b.sibling,H.index=b.index,H.ref=b.ref,H}function yu(b,F,H,Z,_,rt){var vt=2;if(Z=b,typeof b=="function")fc(b)&&(vt=1);else if(typeof b=="string")vt=5;else t:switch(b){case p:return pa(H.children,_,rt,F);case h:vt=8,_|=8;break;case o:return b=Fr(12,H,F,_|2),b.elementType=o,b.lanes=rt,b;case f:return b=Fr(13,H,F,_),b.elementType=f,b.lanes=rt,b;case s:return b=Fr(19,H,F,_),b.elementType=s,b.lanes=rt,b;case v:return kl(H,_,rt,F);default:if(typeof b=="object"&&b!==null)switch(b.$$typeof){case l:vt=10;break t;case n:vt=9;break t;case u:vt=11;break t;case c:vt=14;break t;case d:vt=16,Z=null;break t}throw Error(a(130,b==null?b:typeof b,""))}return F=Fr(vt,H,F,_),F.elementType=b,F.type=Z,F.lanes=rt,F}function pa(b,F,H,Z){return b=Fr(7,b,Z,F),b.lanes=H,b}function kl(b,F,H,Z){return b=Fr(22,b,Z,F),b.elementType=v,b.lanes=H,b.stateNode={},b}function Vn(b,F,H){return b=Fr(6,b,null,F),b.lanes=H,b}function Or(b,F,H){return F=Fr(4,b.children!==null?b.children:[],b.key,F),F.lanes=H,F.stateNode={containerInfo:b.containerInfo,pendingChildren:null,implementation:b.implementation},F}function Hg(b,F,H,Z,_){this.tag=F,this.containerInfo=b,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=q,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Wh(0),this.expirationTimes=Wh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Wh(0),this.identifierPrefix=Z,this.onRecoverableError=_,ht&&(this.mutableSourceEagerHydrationData=null)}function bp(b,F,H,Z,_,rt,vt,Pt,Vt){return b=new Hg(b,F,H,Pt,Vt),F===1?(F=1,rt===!0&&(F|=8)):F=0,rt=Fr(3,null,null,F),b.current=rt,rt.stateNode=b,rt.memoizedState={element:Z,isDehydrated:H,cache:null,transitions:null},Ff(rt),b}function Kl(b){if(!b)return Rr;b=b._reactInternals;t:{if(C(b)!==b||b.tag!==1)throw Error(a(170));var F=b;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(a(171))}if(b.tag===1){var H=b.type;if(vn(H))return Ra(b,H,F)}return F}function Ha(b){var F=b._reactInternals;if(F===void 0)throw typeof b.render=="function"?Error(a(188)):(b=Object.keys(b).join(","),Error(a(268,b)));return b=L(F),b===null?null:b.stateNode}function cc(b,F){if(b=b.memoizedState,b!==null&&b.dehydrated!==null){var H=b.retryLane;b.retryLane=H!==0&&H=Qt&&rt>=He&&_<=pe&&vt<=Ee){b.splice(F,1);break}else if(Z!==Qt||H.width!==Vt.width||Eevt){if(!(rt!==He||H.height!==Vt.height||pe_)){Qt>Z&&(Vt.width+=Qt-Z,Vt.x=Z),pe<_&&(Vt.width=_-Qt),b.splice(F,1);break}}else{He>rt&&(Vt.height+=He-rt,Vt.y=rt),EeH&&(H=vt)),vt ")+` + +No matching component was found for: + `)+b.join(" > ")}return null},i.getPublicRootInstance=function(b){if(b=b.current,!b.child)return null;switch(b.child.tag){case 5:return B(b.child.stateNode);default:return b.child.stateNode}},i.injectIntoDevTools=function(b){if(b={bundleType:b.bundleType,version:b.version,rendererPackageName:b.rendererPackageName,rendererConfig:b.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:y.ReactCurrentDispatcher,findHostInstanceByFiber:Wg,findFiberByHostInstance:b.findFiberByHostInstance||Fp,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.0.0-fc46dba67-20220329"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")b=!1;else{var F=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(F.isDisabled||!F.supportsFiber)b=!0;else{try{Yh=F.inject(b),us=F}catch{}b=!!F.checkDCE}}return b},i.isAlreadyRendering=function(){return!1},i.observeVisibleRects=function(b,F,H,Z){if(!st)throw Error(a(363));b=tc(b,F);var _=Jt(b,H,Z).disconnect;return{disconnect:function(){_()}}},i.registerMutableSourceForHydration=function(b,F){var H=F._getVersion;H=H(F._source),b.mutableSourceEagerHydrationData==null?b.mutableSourceEagerHydrationData=[F,H]:b.mutableSourceEagerHydrationData.push(F,H)},i.runWithPriority=function(b,F){var H=hi;try{return hi=b,F()}finally{hi=H}},i.shouldError=function(){return null},i.shouldSuspend=function(){return!1},i.updateContainer=function(b,F,H,Z){var _=F.current,rt=Un(),vt=Ss(_);return H=Kl(H),F.context===null?F.context=H:F.pendingContext=H,F=Dn(rt,vt),F.payload={element:b},Z=Z===void 0?null:Z,Z!==null&&(F.callback=Z),Wr(_,F),b=br(_,vt,rt),b!==null&&yo(b,_,vt),vt},i};gw.exports=U7;var z7=gw.exports;const G7=xm(z7);var yw={exports:{}},xw={};/** + * @license React + * scheduler.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * 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 e(z,W){var k=z.length;z.push(W);t:for(;0>>1,Q=z[J];if(0>>1;JT(U,k))VT(j,U)?(z[J]=j,z[V]=k,J=V):(z[J]=U,z[K]=k,J=K);else if(VT(j,k))z[J]=j,z[V]=k,J=V;else break t}}return W}function T(z,W){var k=z.sortIndex-W.sortIndex;return k!==0?k:z.id-W.id}if(typeof performance=="object"&&typeof performance.now=="function"){var E=performance;g.unstable_now=function(){return E.now()}}else{var a=Date,y=a.now();g.unstable_now=function(){return a.now()-y}}var t=[],r=[],p=1,h=null,o=3,l=!1,n=!1,u=!1,f=typeof setTimeout=="function"?setTimeout:null,s=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 d(z){for(var W=i(r);W!==null;){if(W.callback===null)x(r);else if(W.startTime<=z)x(r),W.sortIndex=W.expirationTime,e(t,W);else break;W=i(r)}}function v(z){if(u=!1,d(z),!n)if(i(t)!==null)n=!0,B(m);else{var W=i(r);W!==null&&G(v,W.startTime-z)}}function m(z,W){n=!1,u&&(u=!1,s(A),A=-1),l=!0;var k=o;try{for(d(W),h=i(t);h!==null&&(!(h.expirationTime>W)||z&&!P());){var J=h.callback;if(typeof J=="function"){h.callback=null,o=h.priorityLevel;var Q=J(h.expirationTime<=W);W=g.unstable_now(),typeof Q=="function"?h.callback=Q:h===i(t)&&x(t),d(W)}else x(t);h=i(t)}if(h!==null)var Y=!0;else{var K=i(r);K!==null&&G(v,K.startTime-W),Y=!1}return Y}finally{h=null,o=k,l=!1}}var S=!1,M=null,A=-1,C=5,w=-1;function P(){return!(g.unstable_now()-wz||125J?(z.sortIndex=k,e(r,z),i(t)===null&&z===i(r)&&(u?(s(A),A=-1):u=!0,G(v,k-J))):(z.sortIndex=Q,e(t,z),n||l||(n=!0,B(m))),z},g.unstable_shouldYield=P,g.unstable_wrapCallback=function(z){var W=o;return function(){var k=o;o=W;try{return z.apply(this,arguments)}finally{o=k}}}})(xw);yw.exports=xw;var tM=yw.exports;const G1={},V7=g=>void Object.assign(G1,g);function H7(g,e){function i(p,{args:h=[],attach:o,...l},n){let u=`${p[0].toUpperCase()}${p.slice(1)}`,f;if(p==="primitive"){if(l.object===void 0)throw new Error("R3F: Primitives without 'object' are invalid!");const s=l.object;f=ju(s,{type:p,root:n,attach:o,primitive:!0})}else{const s=G1[u];if(!s)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=ju(new s(...h),{type:p,root:n,attach:o,memoizedProps:{args:h}})}return f.__r3f.attach===void 0&&(f instanceof ei?f.__r3f.attach="geometry":f instanceof _n&&(f.__r3f.attach="material")),u!=="inject"&&ly(f,l),f}function x(p,h){let o=!1;if(h){var l,n;(l=h.__r3f)!=null&&l.attach?oy(p,h,h.__r3f.attach):h.isObject3D&&p.isObject3D&&(p.add(h),o=!0),o||(n=p.__r3f)==null||n.objects.push(h),h.__r3f||ju(h,{}),h.__r3f.parent=p,Ex(h),Zu(h)}}function T(p,h,o){let l=!1;if(h){var n,u;if((n=h.__r3f)!=null&&n.attach)oy(p,h,h.__r3f.attach);else if(h.isObject3D&&p.isObject3D){h.parent=p,h.dispatchEvent({type:"added"}),p.dispatchEvent({type:"childadded",child:h});const f=p.children.filter(c=>c!==h),s=f.indexOf(o);p.children=[...f.slice(0,s),h,...f.slice(s)],l=!0}l||(u=p.__r3f)==null||u.objects.push(h),h.__r3f||ju(h,{}),h.__r3f.parent=p,Ex(h),Zu(h)}}function E(p,h,o=!1){p&&[...p].forEach(l=>a(h,l,o))}function a(p,h,o){if(h){var l,n,u;if(h.__r3f&&(h.__r3f.parent=null),(l=p.__r3f)!=null&&l.objects&&(p.__r3f.objects=p.__r3f.objects.filter(v=>v!==h)),(n=h.__r3f)!=null&&n.attach)sM(p,h,h.__r3f.attach);else if(h.isObject3D&&p.isObject3D){var f;p.remove(h),(f=h.__r3f)!=null&&f.root&&J7(tm(h),h)}const c=(u=h.__r3f)==null?void 0:u.primitive,d=!c&&(o===void 0?h.dispose!==null:o);if(!c){var s;E((s=h.__r3f)==null?void 0:s.objects,h,d),E(h.children,h,d)}if(delete h.__r3f,d&&h.dispose&&h.type!=="Scene"){const v=()=>{try{h.dispose()}catch{}};typeof IS_REACT_ACT_ENVIRONMENT>"u"?tM.unstable_scheduleCallback(tM.unstable_IdlePriority,v):v()}Zu(p)}}function y(p,h,o,l){var n;const u=(n=p.__r3f)==null?void 0:n.parent;if(!u)return;const f=i(h,o,p.__r3f.root);if(p.children){for(const s of p.children)s.__r3f&&x(f,s);p.children=p.children.filter(s=>!s.__r3f)}p.__r3f.objects.forEach(s=>x(f,s)),p.__r3f.objects=[],p.__r3f.autoRemovedBeforeAppend||a(u,p),f.parent&&(f.__r3f.autoRemovedBeforeAppend=!0),x(u,f),f.raycast&&f.__r3f.eventCount&&tm(f).getState().internal.interaction.push(f),[l,l.alternate].forEach(s=>{s!==null&&(s.stateNode=f,s.ref&&(typeof s.ref=="function"?s.ref(f):s.ref.current=f))})}const t=()=>console.warn("Text is not allowed in the R3F tree! This could be stray whitespace or characters.");return{reconciler:G7({createInstance:i,removeChild:a,appendChild:x,appendInitialChild:x,insertBefore:T,supportsMutation:!0,isPrimaryRenderer:!1,supportsPersistence:!1,supportsHydration:!1,noTimeout:-1,appendChildToContainer:(p,h)=>{if(!h)return;const o=p.getState().scene;o.__r3f&&(o.__r3f.root=p,x(o,h))},removeChildFromContainer:(p,h)=>{h&&a(p.getState().scene,h)},insertInContainerBefore:(p,h,o)=>{if(!h||!o)return;const l=p.getState().scene;l.__r3f&&T(l,h,o)},getRootHostContext:()=>null,getChildHostContext:p=>p,finalizeInitialChildren(p){var h;return!!((h=p?.__r3f)!=null?h:{}).handlers},prepareUpdate(p,h,o,l){var n;if(((n=p?.__r3f)!=null?n:{}).primitive&&l.object&&l.object!==p)return[!0];{const{args:f=[],children:s,...c}=l,{args:d=[],children:v,...m}=o;if(!Array.isArray(f))throw new Error("R3F: the args prop must be an array!");if(f.some((M,A)=>M!==d[A]))return[!0];const S=ww(p,c,m,!0);return S.changes.length?[!1,S]:null}},commitUpdate(p,[h,o],l,n,u,f){h?y(p,l,u,f):ly(p,o)},commitMount(p,h,o,l){var n;const u=(n=p.__r3f)!=null?n:{};p.raycast&&u.handlers&&u.eventCount&&tm(p).getState().internal.interaction.push(p)},getPublicInstance:p=>p,prepareForCommit:()=>null,preparePortalMount:p=>ju(p.getState().scene),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance(p){var h;const{attach:o,parent:l}=(h=p.__r3f)!=null?h:{};o&&l&&sM(l,p,o),p.isObject3D&&(p.visible=!1),Zu(p)},unhideInstance(p,h){var o;const{attach:l,parent:n}=(o=p.__r3f)!=null?o:{};l&&n&&oy(n,p,l),(p.isObject3D&&h.visible==null||h.visible)&&(p.visible=!0),Zu(p)},createTextInstance:t,hideTextInstance:t,unhideTextInstance:t,getCurrentEventPriority:()=>e?e():rf.DefaultEventPriority,beforeActiveInstanceBlur:()=>{},afterActiveInstanceBlur:()=>{},detachDeletedInstance:()=>{},now:typeof performance<"u"&&zi.fun(performance.now)?performance.now:zi.fun(Date.now)?Date.now:()=>0,scheduleTimeout:zi.fun(setTimeout)?setTimeout:void 0,cancelTimeout:zi.fun(clearTimeout)?clearTimeout:void 0}),applyProps:ly}}var eM,iM;const ay=g=>"colorSpace"in g||"outputColorSpace"in g,Sw=()=>{var g;return(g=G1.ColorManagement)!=null?g:null},Tw=g=>g&&g.isOrthographicCamera,W7=g=>g&&g.hasOwnProperty("current"),Id=typeof window<"u"&&((eM=window.document)!=null&&eM.createElement||((iM=window.navigator)==null?void 0:iM.product)==="ReactNative")?ie.useLayoutEffect:ie.useEffect;function Ew(g){const e=ie.useRef(g);return Id(()=>void(e.current=g),[g]),e}function X7({set:g}){return Id(()=>(g(new Promise(()=>null)),()=>g(!1)),[g]),null}class Mw extends ie.Component{constructor(...e){super(...e),this.state={error:!1}}componentDidCatch(e){this.props.set(e)}render(){return this.state.error?null:this.props.children}}Mw.getDerivedStateFromError=()=>({error:!0});const Cw="__default",nM=new Map,Y7=g=>g&&!!g.memoized&&!!g.changes;function Aw(g){var e;const i=typeof window<"u"?(e=window.devicePixelRatio)!=null?e:2:1;return Array.isArray(g)?Math.min(Math.max(g[0],i),g[1]):g}const Fc=g=>{var e;return(e=g.__r3f)==null?void 0:e.root.getState()};function tm(g){let e=g.__r3f.root;for(;e.getState().previousRoot;)e=e.getState().previousRoot;return e}const zi={obj:g=>g===Object(g)&&!zi.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,e,{arrays:i="shallow",objects:x="reference",strict:T=!0}={}){if(typeof g!=typeof e||!!g!=!!e)return!1;if(zi.str(g)||zi.num(g))return g===e;const E=zi.obj(g);if(E&&x==="reference")return g===e;const a=zi.arr(g);if(a&&i==="reference")return g===e;if((a||E)&&g===e)return!0;let y;for(y in g)if(!(y in e))return!1;if(E&&i==="shallow"&&x==="shallow"){for(y in T?e:g)if(!zi.equ(g[y],e[y],{strict:T,objects:"reference"}))return!1}else for(y in T?e:g)if(g[y]!==e[y])return!1;if(zi.und(y)){if(a&&g.length===0&&e.length===0||E&&Object.keys(g).length===0&&Object.keys(e).length===0)return!0;if(g!==e)return!1}return!0}};function k7(g){g.dispose&&g.type!=="Scene"&&g.dispose();for(const e in g)e.dispose==null||e.dispose(),delete g[e]}function ju(g,e){const i=g;return i.__r3f={type:"",root:null,previousAttach:null,memoizedProps:{},eventCount:0,handlers:{},objects:[],parent:null,...e},g}function Tx(g,e){let i=g;if(e.includes("-")){const x=e.split("-"),T=x.pop();return i=x.reduce((E,a)=>E[a],g),{target:i,key:T}}else return{target:i,key:e}}const rM=/-\d+$/;function oy(g,e,i){if(zi.str(i)){if(rM.test(i)){const E=i.replace(rM,""),{target:a,key:y}=Tx(g,E);Array.isArray(a[y])||(a[y]=[])}const{target:x,key:T}=Tx(g,i);e.__r3f.previousAttach=x[T],x[T]=e}else e.__r3f.previousAttach=i(g,e)}function sM(g,e,i){var x,T;if(zi.str(i)){const{target:E,key:a}=Tx(g,i),y=e.__r3f.previousAttach;y===void 0?delete E[a]:E[a]=y}else(x=e.__r3f)==null||x.previousAttach==null||x.previousAttach(g,e);(T=e.__r3f)==null||delete T.previousAttach}function ww(g,{children:e,key:i,ref:x,...T},{children:E,key:a,ref:y,...t}={},r=!1){var p;const h=(p=g?.__r3f)!=null?p:{},o=Object.entries(T),l=[];if(r){const u=Object.keys(t);for(let f=0;f{var s;if((s=g.__r3f)!=null&&s.primitive&&u==="object"||zi.equ(f,t[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 d in T){const v=T[d];d.startsWith(`${u}-`)&&l.push([d,v,!1,d.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 K7=typeof process<"u"&&!1;function ly(g,e){var i,x,T;const E=(i=g.__r3f)!=null?i:{},a=E.root,y=(x=a==null||a.getState==null?void 0:a.getState())!=null?x:{},{memoized:t,changes:r}=Y7(e)?e:ww(g,e),p=E.eventCount;g.__r3f&&(g.__r3f.memoizedProps=t);for(let o=0;od[v],g),!(c&&c.set))){const[d,...v]=f.reverse();s=v.reverse().reduce((m,S)=>m[S],g),l=d}if(n===Cw+"remove")if(s.constructor){let d=nM.get(s.constructor);d||(d=new s.constructor,nM.set(s.constructor,d)),n=d[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 Mh)){if(Array.isArray(n))c.fromArray?c.fromArray(n):c.set(...n);else if(c.copy&&n&&n.constructor&&(K7?c.constructor.name===n.constructor.name:c.constructor===n.constructor))c.copy(n);else if(n!==void 0){const d=c instanceof fe;!d&&c.setScalar?c.setScalar(n):c instanceof Mh&&n instanceof Mh?c.mask=n.mask:c.set(n),!Sw()&&!y.linear&&d&&c.convertSRGBToLinear()}}else if(s[l]=n,s[l]instanceof Zi&&s[l].format===Er&&s[l].type===Ea){const d=s[l];ay(d)&&ay(y.gl)?d.colorSpace=y.gl.outputColorSpace:d.encoding=y.gl.outputEncoding}Zu(g)}if(E.parent&&g.raycast&&p!==E.eventCount){const o=tm(g).getState().internal,l=o.interaction.indexOf(g);l>-1&&o.interaction.splice(l,1),E.eventCount&&o.interaction.push(g)}return!(r.length===1&&r[0][0]==="onUpdate")&&r.length&&(T=g.__r3f)!=null&&T.parent&&Ex(g),g}function Zu(g){var e,i;const x=(e=g.__r3f)==null||(i=e.root)==null||i.getState==null?void 0:i.getState();x&&x.internal.frames===0&&x.invalidate()}function Ex(g){g.onUpdate==null||g.onUpdate(g)}function j7(g,e){g.manual||(Tw(g)?(g.left=e.width/-2,g.right=e.width/2,g.top=e.height/2,g.bottom=e.height/-2):g.aspect=e.width/e.height,g.updateProjectionMatrix(),g.updateMatrixWorld())}function Uv(g){return(g.eventObject||g.object).uuid+"/"+g.index+g.instanceId}function Z7(){var g;const e=typeof self<"u"&&self||typeof window<"u"&&window;if(!e)return rf.DefaultEventPriority;switch((g=e.event)==null?void 0:g.type){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return rf.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return rf.ContinuousEventPriority;default:return rf.DefaultEventPriority}}function Pw(g,e,i,x){const T=i.get(e);T&&(i.delete(e),i.size===0&&(g.delete(x),T.target.releasePointerCapture(x)))}function J7(g,e){const{internal:i}=g.getState();i.interaction=i.interaction.filter(x=>x!==e),i.initialHits=i.initialHits.filter(x=>x!==e),i.hovered.forEach((x,T)=>{(x.eventObject===e||x.object===e)&&i.hovered.delete(T)}),i.capturedMap.forEach((x,T)=>{Pw(i.capturedMap,e,x,T)})}function $7(g){function e(t){const{internal:r}=g.getState(),p=t.offsetX-r.initialClick[0],h=t.offsetY-r.initialClick[1];return Math.round(Math.sqrt(p*p+h*h))}function i(t){return t.filter(r=>["Move","Over","Enter","Out","Leave"].some(p=>{var h;return(h=r.__r3f)==null?void 0:h.handlers["onPointer"+p]}))}function x(t,r){const p=g.getState(),h=new Set,o=[],l=r?r(p.internal.interaction):p.internal.interaction;for(let s=0;s{const d=Fc(s.object),v=Fc(c.object);return!d||!v?s.distance-c.distance:v.events.priority-d.events.priority||s.distance-c.distance}).filter(s=>{const c=Uv(s);return h.has(c)?!1:(h.add(c),!0)});p.events.filter&&(u=p.events.filter(u,p));for(const s of u){let c=s.object;for(;c;){var f;(f=c.__r3f)!=null&&f.eventCount&&o.push({...s,eventObject:c}),c=c.parent}}if("pointerId"in t&&p.internal.capturedMap.has(t.pointerId))for(let s of p.internal.capturedMap.get(t.pointerId).values())h.has(Uv(s.intersection))||o.push(s.intersection);return o}function T(t,r,p,h){const o=g.getState();if(t.length){const l={stopped:!1};for(const n of t){const u=Fc(n.object)||o,{raycaster:f,pointer:s,camera:c,internal:d}=u,v=new pt(s.x,s.y,0).unproject(c),m=w=>{var P,L;return(P=(L=d.capturedMap.get(w))==null?void 0:L.has(n.eventObject))!=null?P:!1},S=w=>{const P={intersection:n,target:r.target};d.capturedMap.has(w)?d.capturedMap.get(w).set(n.eventObject,P):d.capturedMap.set(w,new Map([[n.eventObject,P]])),r.target.setPointerCapture(w)},M=w=>{const P=d.capturedMap.get(w);P&&Pw(d.capturedMap,n.eventObject,P,w)};let A={};for(let w in r){let P=r[w];typeof P!="function"&&(A[w]=P)}let C={...n,...A,pointer:s,intersections:t,stopped:l.stopped,delta:p,unprojectedPoint:v,ray:f.ray,camera:c,stopPropagation(){const w="pointerId"in r&&d.capturedMap.get(r.pointerId);if((!w||w.has(n.eventObject))&&(C.stopped=l.stopped=!0,d.hovered.size&&Array.from(d.hovered.values()).find(P=>P.eventObject===n.eventObject))){const P=t.slice(0,t.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 t}function E(t){const{internal:r}=g.getState();for(const p of r.hovered.values())if(!t.length||!t.find(h=>h.object===p.object&&h.index===p.index&&h.instanceId===p.instanceId)){const o=p.eventObject.__r3f,l=o?.handlers;if(r.hovered.delete(Uv(p)),o!=null&&o.eventCount){const n={...p,intersections:t};l.onPointerOut==null||l.onPointerOut(n),l.onPointerLeave==null||l.onPointerLeave(n)}}}function a(t,r){for(let p=0;pE([]);case"onLostPointerCapture":return r=>{const{internal:p}=g.getState();"pointerId"in r&&p.capturedMap.has(r.pointerId)&&requestAnimationFrame(()=>{p.capturedMap.has(r.pointerId)&&(p.capturedMap.delete(r.pointerId),E([]))})}}return function(p){const{onPointerMissed:h,internal:o}=g.getState();o.lastEvent.current=p;const l=t==="onPointerMove",n=t==="onClick"||t==="onContextMenu"||t==="onDoubleClick",f=x(p,l?i:void 0),s=n?e(p):0;t==="onPointerDown"&&(o.initialClick=[p.offsetX,p.offsetY],o.initialHits=f.map(d=>d.eventObject)),n&&!f.length&&s<=2&&(a(p,o.interaction),h&&h(p)),l&&E(f);function c(d){const v=d.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=Uv(d),A=o.hovered.get(M);A?A.stopped&&d.stopPropagation():(o.hovered.set(M,d),S.onPointerOver==null||S.onPointerOver(d),S.onPointerEnter==null||S.onPointerEnter(d))}S.onPointerMove==null||S.onPointerMove(d)}else{const M=S[t];M?(!n||o.initialHits.includes(v))&&(a(p,o.interaction.filter(A=>!o.initialHits.includes(A))),M(d)):n&&o.initialHits.includes(v)&&a(p,o.interaction.filter(A=>!o.initialHits.includes(A)))}}T(f,p,s,c)}}return{handlePointer:y}}const Rw=g=>!!(g!=null&&g.render),Lw=ie.createContext(null),Q7=(g,e)=>{const i=I7((y,t)=>{const r=new pt,p=new pt,h=new pt;function o(s=t().camera,c=p,d=t().size){const{width:v,height:m,top:S,left:M}=d,A=v/m;c instanceof pt?h.copy(c):h.set(...c);const C=s.getWorldPosition(r).distanceTo(h);if(Tw(s))return{width:v/s.zoom,height:m/s.zoom,top:S,left:M,factor:1,distance:C,aspect:A};{const w=s.fov*Math.PI/180,P=2*Math.tan(w/2)*C,L=P*(v/m);return{width:L,height:P,top:S,left:M,factor:v/L,distance:C,aspect:A}}}let l;const n=s=>y(c=>({performance:{...c.performance,current:s}})),u=new jt;return{set:y,get:t,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},xr:null,scene:null,invalidate:(s=1)=>g(t(),s),advance:(s,c)=>e(s,c,t()),legacy:!1,linear:!1,flat:!1,controls:null,clock:new N1,pointer:u,mouse:u,frameloop:"always",onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{const s=t();l&&clearTimeout(l),s.performance.current!==s.performance.min&&n(s.performance.min),l=setTimeout(()=>n(t().performance.max),s.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:o},setEvents:s=>y(c=>({...c,events:{...c.events,...s}})),setSize:(s,c,d,v,m)=>{const S=t().camera,M={width:s,height:c,top:v||0,left:m||0,updateStyle:d};y(A=>({size:M,viewport:{...A.viewport,...o(S,p,M)}}))},setDpr:s=>y(c=>{const d=Aw(s);return{viewport:{...c.viewport,dpr:d,initialDpr:c.viewport.initialDpr||d}}}),setFrameloop:(s="always")=>{const c=t().clock;c.stop(),c.elapsedTime=0,s!=="never"&&(c.start(),c.elapsedTime=0),y(()=>({frameloop:s}))},previousRoot:void 0,internal:{active:!1,priority:0,frames:0,lastEvent:ie.createRef(),interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,subscribe:(s,c,d)=>{const v=t().internal;return v.priority=v.priority+(c>0?1:0),v.subscribers.push({ref:s,priority:c,store:d}),v.subscribers=v.subscribers.sort((m,S)=>m.priority-S.priority),()=>{const m=t().internal;m!=null&&m.subscribers&&(m.priority=m.priority-(c>0?1:0),m.subscribers=m.subscribers.filter(S=>S.ref!==s))}}}}}),x=i.getState();let T=x.size,E=x.viewport.dpr,a=x.camera;return i.subscribe(()=>{const{camera:y,size:t,viewport:r,gl:p,set:h}=i.getState();if(t.width!==T.width||t.height!==T.height||r.dpr!==E){var o;T=t,E=r.dpr,j7(y,t),p.setPixelRatio(r.dpr);const l=(o=t.updateStyle)!=null?o:typeof HTMLCanvasElement<"u"&&p.domElement instanceof HTMLCanvasElement;p.setSize(t.width,t.height,l)}y!==a&&(a=y,h(l=>({viewport:{...l.viewport,...l.viewport.getCurrentViewport(y)}})))}),i.subscribe(y=>g(y)),i};let zv,_7=new Set,q7=new Set,tz=new Set;function hy(g,e){if(g.size)for(const{callback:i}of g.values())i(e)}function Oc(g,e){switch(g){case"before":return hy(_7,e);case"after":return hy(q7,e);case"tail":return hy(tz,e)}}let uy,fy;function cy(g,e,i){let x=e.clock.getDelta();for(e.frameloop==="never"&&typeof g=="number"&&(x=g-e.clock.elapsedTime,e.clock.oldTime=e.clock.elapsedTime,e.clock.elapsedTime=g),uy=e.internal.subscribers,zv=0;zv0)&&!((p=E.gl.xr)!=null&&p.isPresenting)&&(x+=cy(r,E))}if(i=!1,Oc("after",r),x===0)return Oc("tail",r),e=!1,cancelAnimationFrame(T)}function y(r,p=1){var h;if(!r)return g.forEach(o=>y(o.store.getState(),p));(h=r.gl.xr)!=null&&h.isPresenting||!r.internal.active||r.frameloop==="never"||(p>1?r.internal.frames=Math.min(60,r.internal.frames+p):i?r.internal.frames=2:r.internal.frames=1,e||(e=!0,requestAnimationFrame(a)))}function t(r,p=!0,h,o){if(p&&Oc("before",r),h)cy(r,h,o);else for(const l of g.values())cy(r,l.store.getState());p&&Oc("after",r)}return{loop:a,invalidate:y,advance:t}}function iz(){const g=ie.useContext(Lw);if(!g)throw new Error("R3F: Hooks can only be used within the Canvas component!");return g}function nz(g,e=0){const i=iz(),x=i.getState().internal.subscribe,T=Ew(g);return Id(()=>x(T,e,i),[e,x,i]),null}const vf=new Map,{invalidate:aM,advance:oM}=ez(vf),{reconciler:vm,applyProps:ku}=H7(vf,Z7),Ku={objects:"shallow",strict:!1},rz=(g,e)=>{const i=typeof g=="function"?g(e):g;return Rw(i)?i:new x1({powerPreference:"high-performance",canvas:e,antialias:!0,alpha:!0,...g})};function sz(g,e){const i=typeof HTMLCanvasElement<"u"&&g instanceof HTMLCanvasElement;if(e){const{width:x,height:T,top:E,left:a,updateStyle:y=i}=e;return{width:x,height:T,top:E,left:a,updateStyle:y}}else if(typeof HTMLCanvasElement<"u"&&g instanceof HTMLCanvasElement&&g.parentElement){const{width:x,height:T,top:E,left:a}=g.parentElement.getBoundingClientRect();return{width:x,height:T,top:E,left:a,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 az(g){const e=vf.get(g),i=e?.fiber,x=e?.store;e&&console.warn("R3F.createRoot should only be called once!");const T=typeof reportError=="function"?reportError:console.error,E=x||Q7(aM,oM),a=i||vm.createContainer(E,rf.ConcurrentRoot,null,!1,null,"",T,null);e||vf.set(g,{fiber:a,store:E});let y,t=!1,r;return{configure(p={}){let{gl:h,size:o,scene:l,events:n,onCreated:u,shadows:f=!1,linear:s=!1,flat:c=!1,legacy:d=!1,orthographic:v=!1,frameloop:m="always",dpr:S=[1,2],performance:M,raycaster:A,camera:C,onPointerMissed:w}=p,P=E.getState(),L=P.gl;P.gl||P.set({gl:L=rz(h,g)});let O=P.raycaster;O||P.set({raycaster:O=new pw});const{params:I,...D}=A||{};if(zi.equ(D,O,Ku)||ku(O,{...D}),zi.equ(I,O.params,Ku)||ku(O,{params:{...O.params,...I}}),!P.camera||P.camera===r&&!zi.equ(r,C,Ku)){r=C;const k=C instanceof wd,J=k?C:v?new Ld(0,0,0,0,.1,1e3):new Yn(75,0,.1,1e3);k||(J.position.z=5,C&&ku(J,C),!P.camera&&!(C!=null&&C.rotation)&&J.lookAt(0,0,0)),P.set({camera:J}),O.camera=J}if(!P.scene){let k;l instanceof dm?k=l:(k=new dm,l&&ku(k,l)),P.set({scene:ju(k)})}if(!P.xr){var B;const k=(Y,K)=>{const U=E.getState();U.frameloop!=="never"&&oM(Y,!0,U,K)},J=()=>{const Y=E.getState();Y.gl.xr.enabled=Y.gl.xr.isPresenting,Y.gl.xr.setAnimationLoop(Y.gl.xr.isPresenting?k:null),Y.gl.xr.isPresenting||aM(Y)},Q={connect(){const Y=E.getState().gl;Y.xr.addEventListener("sessionstart",J),Y.xr.addEventListener("sessionend",J)},disconnect(){const Y=E.getState().gl;Y.xr.removeEventListener("sessionstart",J),Y.xr.removeEventListener("sessionend",J)}};typeof((B=L.xr)==null?void 0:B.addEventListener)=="function"&&Q.connect(),P.set({xr:Q})}if(L.shadowMap){const k=L.shadowMap.enabled,J=L.shadowMap.type;if(L.shadowMap.enabled=!!f,zi.boo(f))L.shadowMap.type=Vc;else if(zi.str(f)){var G;const Q={basic:sC,percentage:Qm,soft:Vc,variance:ks};L.shadowMap.type=(G=Q[f])!=null?G:Vc}else zi.obj(f)&&Object.assign(L.shadowMap,f);(k!==L.shadowMap.enabled||J!==L.shadowMap.type)&&(L.shadowMap.needsUpdate=!0)}const z=Sw();z&&("enabled"in z?z.enabled=!d:"legacyMode"in z&&(z.legacyMode=d)),t||ku(L,{outputEncoding:s?3e3:3001,toneMapping:c?Ta:qx}),P.legacy!==d&&P.set(()=>({legacy:d})),P.linear!==s&&P.set(()=>({linear:s})),P.flat!==c&&P.set(()=>({flat:c})),h&&!zi.fun(h)&&!Rw(h)&&!zi.equ(h,L,Ku)&&ku(L,h),n&&!P.events.handlers&&P.set({events:n(E)});const W=sz(g,o);return zi.equ(W,P.size,Ku)||P.setSize(W.width,W.height,W.updateStyle,W.top,W.left),S&&P.viewport.dpr!==Aw(S)&&P.setDpr(S),P.frameloop!==m&&P.setFrameloop(m),P.onPointerMissed||P.set({onPointerMissed:w}),M&&!zi.equ(M,P.performance,Ku)&&P.set(k=>({performance:{...k.performance,...M}})),y=u,t=!0,this},render(p){return t||this.configure(),vm.updateContainer(ie.createElement(oz,{store:E,children:p,onCreated:y,rootElement:g}),a,null,()=>{}),E},unmount(){bw(g)}}}function oz({store:g,children:e,onCreated:i,rootElement:x}){return Id(()=>{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)},[]),ie.createElement(Lw.Provider,{value:g},e)}function bw(g,e){const i=vf.get(g),x=i?.fiber;if(x){const T=i?.store.getState();T&&(T.internal.active=!1),vm.updateContainer(null,x,null,()=>{T&&setTimeout(()=>{try{var E,a,y,t;T.events.disconnect==null||T.events.disconnect(),(E=T.gl)==null||(a=E.renderLists)==null||a.dispose==null||a.dispose(),(y=T.gl)==null||y.forceContextLoss==null||y.forceContextLoss(),(t=T.gl)!=null&&t.xr&&T.xr.disconnect(),k7(T),vf.delete(g),e&&e(g)}catch{}},500)})}}vm.injectIntoDevTools({bundleType:0,rendererPackageName:"@react-three/fiber",version:ie.version});function mm(){return mm=Object.assign?Object.assign.bind():function(g){for(var e=1;e=0?x=setTimeout(t,e-p):(x=null,i||(y=g.apply(E,T),E=T=null))}var r=function(){E=this,T=arguments,a=Date.now();var p=i&&!x;return x||(x=setTimeout(t,e)),p&&(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}Mx.debounce=Mx;var lz=Mx;const lM=xm(lz);function hz(g){let{debounce:e,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[a,y]=ie.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),t=ie.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:a}),r=e?typeof e=="number"?e:e.scroll:null,p=e?typeof e=="number"?e:e.resize:null,h=ie.useRef(!1);ie.useEffect(()=>(h.current=!0,()=>void(h.current=!1)));const[o,l,n]=ie.useMemo(()=>{const c=()=>{if(!t.current.element)return;const{left:d,top:v,width:m,height:S,bottom:M,right:A,x:C,y:w}=t.current.element.getBoundingClientRect(),P={left:d,top:v,width:m,height:S,bottom:M,right:A,x:C,y:w};t.current.element instanceof HTMLElement&&T&&(P.height=t.current.element.offsetHeight,P.width=t.current.element.offsetWidth),Object.freeze(P),h.current&&!dz(t.current.lastBounds,P)&&y(t.current.lastBounds=P)};return[c,p?lM(c,p):c,r?lM(c,r):c]},[y,T,r,p]);function u(){t.current.scrollContainers&&(t.current.scrollContainers.forEach(c=>c.removeEventListener("scroll",n,!0)),t.current.scrollContainers=null),t.current.resizeObserver&&(t.current.resizeObserver.disconnect(),t.current.resizeObserver=null)}function f(){t.current.element&&(t.current.resizeObserver=new E(n),t.current.resizeObserver.observe(t.current.element),i&&t.current.scrollContainers&&t.current.scrollContainers.forEach(c=>c.addEventListener("scroll",n,{capture:!0,passive:!0})))}const s=c=>{!c||c===t.current.element||(u(),t.current.element=c,t.current.scrollContainers=Fw(c),f())};return fz(n,!!i),uz(l),ie.useEffect(()=>{u(),f()},[i,n,l]),ie.useEffect(()=>u,[]),[s,a,o]}function uz(g){ie.useEffect(()=>{const e=g;return window.addEventListener("resize",e),()=>void window.removeEventListener("resize",e)},[g])}function fz(g,e){ie.useEffect(()=>{if(e){const i=g;return window.addEventListener("scroll",i,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",i,!0)}},[g,e])}function Fw(g){const e=[];if(!g||g===document.body)return e;const{overflow:i,overflowX:x,overflowY:T}=window.getComputedStyle(g);return[i,x,T].some(E=>E==="auto"||E==="scroll")&&e.push(g),[...e,...Fw(g.parentElement)]}const cz=["x","y","top","bottom","left","right","width","height"],dz=(g,e)=>cz.every(i=>g[i]===e[i]);var pz=Object.defineProperty,vz=Object.defineProperties,mz=Object.getOwnPropertyDescriptors,hM=Object.getOwnPropertySymbols,gz=Object.prototype.hasOwnProperty,yz=Object.prototype.propertyIsEnumerable,uM=(g,e,i)=>e in g?pz(g,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):g[e]=i,fM=(g,e)=>{for(var i in e||(e={}))gz.call(e,i)&&uM(g,i,e[i]);if(hM)for(var i of hM(e))yz.call(e,i)&&uM(g,i,e[i]);return g},xz=(g,e)=>vz(g,mz(e)),cM,dM;typeof window<"u"&&((cM=window.document)!=null&&cM.createElement||((dM=window.navigator)==null?void 0:dM.product)==="ReactNative")?ie.useLayoutEffect:ie.useEffect;function Ow(g,e,i){if(!g)return;if(i(g)===!0)return g;let x=e?g.return:g.child;for(;x;){const T=Ow(x,e,i);if(T)return T;x=e?null:x.sibling}}function Dw(g){try{return Object.defineProperties(g,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return g}}const pM=console.error;console.error=function(){const g=[...arguments].join("");if(g?.startsWith("Warning:")&&g.includes("useContext")){console.error=pM;return}return pM.apply(this,arguments)};const V1=Dw(ie.createContext(null));class Iw extends ie.Component{render(){return ie.createElement(V1.Provider,{value:this._reactInternals},this.props.children)}}function Sz(){const g=ie.useContext(V1);if(g===null)throw new Error("its-fine: useFiber must be called within a !");const e=ie.useId();return ie.useMemo(()=>{for(const x of[g,g?.alternate]){if(!x)continue;const T=Ow(x,!1,E=>{let a=E.memoizedState;for(;a;){if(a.memoizedState===e)return!0;a=a.next}});if(T)return T}},[g,e])}function Tz(){const g=Sz(),[e]=ie.useState(()=>new Map);e.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!==V1&&!e.has(T)&&e.set(T,ie.useContext(Dw(T)))}i=i.return}return e}function Ez(){const g=Tz();return ie.useMemo(()=>Array.from(g.keys()).reduce((e,i)=>x=>ie.createElement(e,null,ie.createElement(i.Provider,xz(fM({},x),{value:g.get(i)}))),e=>ie.createElement(Iw,fM({},e))),[g])}const dy={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 Mz(g){const{handlePointer:e}=$7(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(dy).reduce((i,x)=>({...i,[x]:e(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(a=>({events:{...a.events,connected:i}})),Object.entries((x=E.handlers)!=null?x:[]).forEach(([a,y])=>{const[t,r]=dy[a];i.addEventListener(t,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,a])=>{if(x&&x.connected instanceof HTMLElement){const[y]=dy[E];x.connected.removeEventListener(y,a)}}),i(E=>({events:{...E.events,connected:void 0}}))}}}}const Cz=ie.forwardRef(function({children:e,fallback:i,resize:x,style:T,gl:E,events:a=Mz,eventSource:y,eventPrefix:t,shadows:r,linear:p,flat:h,legacy:o,orthographic:l,frameloop:n,dpr:u,performance:f,raycaster:s,camera:c,scene:d,onPointerMissed:v,onCreated:m,...S},M){ie.useMemo(()=>V7(F7),[]);const A=Ez(),[C,w]=hz({scroll:!0,debounce:{scroll:50,resize:0},...x}),P=ie.useRef(null),L=ie.useRef(null);ie.useImperativeHandle(M,()=>P.current);const O=Ew(v),[I,D]=ie.useState(!1),[B,G]=ie.useState(!1);if(I)throw I;if(B)throw B;const z=ie.useRef(null);Id(()=>{const k=P.current;w.width>0&&w.height>0&&k&&(z.current||(z.current=az(k)),z.current.configure({gl:E,events:a,shadows:r,linear:p,flat:h,legacy:o,orthographic:l,frameloop:n,dpr:u,performance:f,raycaster:s,camera:c,scene:d,size:w,onPointerMissed:(...J)=>O.current==null?void 0:O.current(...J),onCreated:J=>{J.events.connect==null||J.events.connect(y?W7(y)?y.current:y:L.current),t&&J.setEvents({compute:(Q,Y)=>{const K=Q[t+"X"],U=Q[t+"Y"];Y.pointer.set(K/Y.size.width*2-1,-(U/Y.size.height)*2+1),Y.raycaster.setFromCamera(Y.pointer,Y.camera)}}),m?.(J)}}),z.current.render(ie.createElement(A,null,ie.createElement(Mw,{set:G},ie.createElement(ie.Suspense,{fallback:ie.createElement(X7,{set:D})},e)))))}),ie.useEffect(()=>{const k=P.current;if(k)return()=>bw(k)},[]);const W=y?"none":"auto";return ie.createElement("div",mm({ref:L,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:W,...T}},S),ie.createElement("div",{ref:C,style:{width:"100%",height:"100%"}},ie.createElement("canvas",{ref:P,style:{display:"block"}},i)))}),Az=ie.forwardRef(function(e,i){return ie.createElement(Iw,null,ie.createElement(Cz,mm({},e,{ref:i})))});function Zs(g,e={}){let i=ie.useCallback(T=>e.keys?VO(g,e.keys,T):g.listen(T),[e.keys,g]),x=g.get.bind(g);return ie.useSyncExternalStore(i,x,x)}const wz=[new Ks(-Math.PI/2,-Math.PI/2,-Math.PI/2),new Ks(0,Math.PI/2,0),new Ks(0,-Math.PI/2,-Math.PI/2),new Ks(Math.PI/2,Math.PI,Math.PI),new Ks(0,0,-Math.PI/2),new Ks(Math.PI,0,0)],Pz=({diceValues:g,isRolling:e,textures:i})=>{const x=ie.useRef([]),T=ie.useRef([]);return ie.useEffect(()=>{const E=new tw;T.current=[new _a({map:E.load(i.side1)}),new _a({map:E.load(i.side2)}),new _a({map:E.load(i.side3)}),new _a({map:E.load(i.side4)}),new _a({map:E.load(i.side5)}),new _a({map:E.load(i.side6)})],x.current.forEach(a=>{a&&(a.material=T.current)})},[i]),nz(()=>{x.current.forEach((E,a)=>{if(E)if(e)E.rotation.x+=.2,E.rotation.y+=.2;else{const y=wz[g[a]-1];E.rotation.x=_v.lerp(E.rotation.x,y.x,.1),E.rotation.y=_v.lerp(E.rotation.y,y.y,.1),E.rotation.z=_v.lerp(E.rotation.z,y.z,.1)}})}),kt.jsx(kt.Fragment,{children:g.map((E,a)=>kt.jsxs("mesh",{ref:y=>x.current[a]=y,position:[a*2-(g.length-1),0,0],children:[kt.jsx("boxGeometry",{args:[1,1,1]}),T.current.length===6&&T.current.map((y,t)=>kt.jsx("meshStandardMaterial",{attach:`material-${t}`,map:y.map},t))]},a))})},Rz=({styleClass:g,textures:e,diceCount:i})=>{const x=Zs($c);ie.useEffect(()=>{OI("Dice"),II(e),DI({type:"ROLL_DICE",diceValues:Array(i).fill(1),isRolling:!1})},[e,i]);const T=()=>{xT(!0),setTimeout(()=>{const E=Array.from({length:i},()=>Math.floor(Math.random()*6)+1);console.log("New dice values:",E),iC(E),xT(!1);const a={diceValues:E};_e.emit("diceRollResult",a)},2e3)};return kt.jsxs("div",{className:`flex flex-col items-center justify-center p-4 ${g}`,children:[kt.jsx("h1",{className:"text-2xl font-bold mb-4",children:"Pixelated Spinning Dice"}),kt.jsxs(Az,{className:"w-full h-full",camera:{position:[0,0,5]},children:[kt.jsx("ambientLight",{intensity:.5}),kt.jsx("pointLight",{position:[10,10,10]}),aT(x.action)&&kt.jsx(Pz,{diceValues:x.action.diceValues,isRolling:x.action.isRolling,textures:x.textures})]}),aT(x.action)&&kt.jsx("button",{onClick:T,className:`mt-4 p-2 border border-gray-300 rounded ${x.action.isRolling?"opacity-50":""}`,disabled:x.action.isRolling,children:"Roll Dice"})]})};class Nw{constructor(e,i,x){this.scene=e,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 e=this.scene.input.keyboard;e&&(this.wasdKeys={W:e.addKey(Phaser.Input.Keyboard.KeyCodes.W),A:e.addKey(Phaser.Input.Keyboard.KeyCodes.A),S:e.addKey(Phaser.Input.Keyboard.KeyCodes.S),D:e.addKey(Phaser.Input.Keyboard.KeyCodes.D)})}handleConsume(e){const i=eo(e);i&&i.consumable?(console.log(`Consuming item: ${i.name}`),bI(i),yT(i.id)):console.log(`Item ${e} is not consumable`)}handleEquip(e){const i=eo(e);i&&(console.log(`Equipping item: ${i.name}`),TI("weapon",i.id))}handleUnequip(e){const i=eo(e);i&&(console.log(`Unequipping item: ${i.name}`),EI("weapon"))}handleDiscard(e){console.log(`Discarding item: ${e}`),yT(e)}handleView(e){const i=eo(e);if(i&&(console.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(){_e.on("itemAction",this.handleItemAction.bind(this));//! Broken +_e.on("playerMove",this.handlePlayerMove.bind(this)),_e.on("playerReward",this.handlePlayerReward.bind(this)),_e.on("playerDamage",this.handlePlayerCombatDamage.bind(this))}handleItemAction(e){if(e)switch(console.log(`Preparing Action: ${e.itemId} with ${e.action}`),e.action){case"consume":this.handleConsume(e.itemId);break;case"equip":this.handleEquip(e.itemId);break;case"unequip":this.handleUnequip(e.itemId);break;case"discard":this.handleDiscard(e.itemId);break;case"view":this.handleView(e.itemId);break;default:console.log(`Unknown action: ${e.action}`)}}handlePlayerReward(e){console.log("Rewarding the player"),e&&(_e.emit("notification",{title:"Success",message:e.message,notificationType:Rh.success}),SI(e.item))}handlePlayerCombatDamage(e){e&&(eC(parseInt(e.damage)),_e.emit("notification",{title:"Danger",message:`You taken ${e.damage} points of damage!`,notificationType:Rh.danger}))}handlePlayerMove(e){e&&this.gridEngine.moveTo("player",{x:e.x,y:e.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 e=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()}(e.left.isDown||i.A.isDown)&&(e.up.isDown||i.W.isDown)?this.gridEngine.move("player","up-left"):(e.left.isDown||i.A.isDown)&&(e.down.isDown||i.S.isDown)?this.gridEngine.move("player","down-left"):(e.right.isDown||i.D.isDown)&&(e.up.isDown||i.W.isDown)?this.gridEngine.move("player","up-right"):(e.right.isDown||i.D.isDown)&&(e.down.isDown||i.S.isDown)?this.gridEngine.move("player","down-right"):e.left.isDown||i.A.isDown?this.gridEngine.move("player","left"):e.right.isDown||i.D.isDown?this.gridEngine.move("player","right"):e.up.isDown||i.W.isDown?this.gridEngine.move("player","up"):(e.down.isDown||i.S.isDown)&&this.gridEngine.move("player","down"),this.checkForNearbyObjects()}}class Bw extends Phaser.GameObjects.Container{constructor(e,i,x,T){const E=i.x,a=i.y-i.height+10;super(e,E,a),this.sprite=i;const y=150,t=40+T.length*20;this.background=e.add.rectangle(0,0,y,t,0,.7),this.text=e.add.text(0,-t/2+10,x,{fontSize:"12px",color:"#ffffff"}).setOrigin(.5),this.buttons=T.map((r,p)=>{const h=e.add.text(0,-t/2+30+p*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(e,i,x,T){i.setInteractive(),i.on("pointerover",E=>{const a={npcId:i.name,npcName:x,actions:T.map(t=>t.label),coords:{x:E.x,y:E.y}};if(_e.emit("npcInteraction",a),!i.getData("tooltipMenu")){const t=new Bw(e,i,x,T);i.setData("tooltipMenu",t)}const y=i.getData("tooltipMenu");y.setVisible(!0),y.updatePosition()}),i.on("pointerout",()=>{const E=i.getData("tooltipMenu");E&&E.setVisible(!1)})}static updateAllTooltipPositions(e){e.children.list.forEach(i=>{if(i instanceof Phaser.GameObjects.Sprite){const x=i.getData("tooltipMenu");x&&x.updatePosition()}})}}let iG=class extends Phaser.GameObjects.Sprite{};function Lz(g,e,i,x){const y=g.add.graphics();y.fillStyle(16777215,1),y.fillRoundedRect(0,0,200,60,16),y.setDepth(99);const t=g.add.text(100,30,i,{fontFamily:"Arial",fontSize:16,color:"#000000"});t.setOrigin(.5),t.setWordWrapWidth(200-10*2),t.setDepth(100);const r=g.add.container(0,0,[y,t]);return r.setDepth(100),e.messageBubble=r,Fz(e),g.time.addEvent({delay:x,callback:()=>{r.destroy(),e.messageBubble===r&&(e.messageBubble=void 0)},callbackScope:g}),r}function bz(g,e,i){const a=g.add.graphics();a.fillStyle(16777215,1),a.fillRoundedRect(0,0,200,60,16),a.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 t=g.add.container(0,0,[a,y]);return t.setDepth(100),e.textBubble=t,Cx(e),t}function Cx(g){const e=g.textBubble;e&&(e.x=g.x,e.y=g.y-g.height-e.height/2)}function Fz(g){const e=g.messageBubble;e&&(e.x=g.x,e.y=g.y-g.height-e.height/2)}class Oz{constructor(){this.actionHandlers={Talk:this.talkToNPC.bind(this),Trade:this.tradeWithNPC.bind(this),"Move to":this.moveToNPC.bind(this),Steal:this.stealFromNPC.bind(this),Combat:this.startCombat.bind(this),"Check Fish":this.checkFish.bind(this)}}getActionHandler(e){return this.actionHandlers[e]}talkToNPC(e){console.log(`Talking to NPC with ID: ${e.npcId}`)}tradeWithNPC(e){console.log(`Trading with NPC with ID: ${e.npcId}`)}moveToNPC(e){const x=e.data?.coords||{x:10,y:15};_e.emit("playerMove",x)}stealFromNPC(e){console.log(`Attempting to steal from NPC with ID: ${e.npcId}`);const i={npcId:e.npcId,npcName:e.npcName,data:e.data};_e.emit("playerSteal",i)}startCombat(e){console.log(`Starting combat with NPC with ID: ${e.npcId}`)}checkFish(e){console.log(`Checking fish for NPC with ID: ${e.npcId}`)}attachNPCEvent(e,i,x,T){e.setInteractive(),e.on("pointerover",E=>{const a={npcId:e.name||"",npcName:i,actions:x.map(y=>y.label),data:T||{},coords:{x:E.x,y:E.y}};_e.emit("npcInteraction",a)}),e.on("pointerout",()=>{}),e.on("pointerdown",E=>{const a={npcId:e.name||"",npcName:i,actions:x.map(y=>y.label),data:T||{},coords:{x:E.x,y:E.y}};console.log(`Click Registered at X: ${a.coords.x} Y: ${a.coords.y}`),_e.emit("npcInteractionClick",a,1e3)})}}const Uw=new Oz;function zw(g){return+g[g.length-1]}function Gw(g){return g.startsWith("monster_bird_")&&!g.startsWith("monster_bird_shadow")}function Vw(g,e,i,x,T){const E=[];for(let a=0;a<10;a++){const y=g.add.sprite(0,0,"monster_bird");y.setCrop(e,i,x,T),y.scale=3,E.push(y)}return E}function Hw(g){return Vw(g,0,0,61,47)}function Ww(g){return Vw(g,22,47,16,10)}function Xw(g){g.anims.create({key:"bird",frames:g.anims.generateFrameNumbers("monster_bird",{start:0,end:2}),frameRate:10,repeat:-1,yoyo:!0})}class Dz extends Hm.Scene{mainMenuButtonImage;mainMenuButtonText;constructor(){super("Preloader")}preload(){this.load.image("mainBg","https://utfs.io/f/2c17f660-7f39-4edf-b83e-122a71014d99-6gflls.webp"),this.load.image("scroll","https://kbve.com/assets/img/fishchip/scroll.webp"),this.load.audio("music","https://kbve.com/assets/img/fishchip/bg.ogg"),this.load.image("creditsBg","https://utfs.io/f/2c17f660-7f39-4edf-b83e-122a71014d99-6gflls.webp"),this.load.audio("type","https://kbve.com/assets/img/fishchip/type.mp3"),this.load.spritesheet("fishing","https://kbve.com/assets/img/fishchip/animate.png",{frameWidth:800,frameHeight:600}),this.load.image("fish","https://kbve.com/assets/img/letter_logo.png"),this.load.image("background","https://kbve.com/assets/img/fishchip/scaled_fish_menu_minigame.webp"),this.load.image("tiles","https://kbve.com/assets/img/fishchip/desert_tileset_1.png"),this.load.image("cloud-city-tiles","/assets/map/cloud_tileset.png"),this.load.tilemapTiledJSON("cloud-city-map-large","/assets/map/cloud_city_large.json"),this.load.tilemapTiledJSON("cloud-city-map","https://kbve.com/assets/img/fishchip/cloud_city.json"),this.load.spritesheet("player","https://kbve.com/assets/img/fishchip/chip_charactersheet_warmer.png",{frameWidth:52,frameHeight:72}),this.load.spritesheet("knights","/assets/entity/knights.png",{frameWidth:52,frameHeight:72}),this.load.spritesheet("jacko","/assets/entity/jacko.png",{frameWidth:52,frameHeight:72}),this.load.spritesheet("monks","/assets/entity/monks.png",{frameWidth:52,frameHeight:72}),gI()}create(){this.sound.get("music")?.isPlaying||this.sound.add("music",{loop:!0,volume:.1}).play(),this.add.image(480,480,"mainBg").setScale(.1),this.mainMenuButtonImage=this.add.image(480,480,"scroll").setAlpha(.9).setScale(.7,.2).setInteractive({useHandCursor:!0}),this.mainMenuButtonText=this.add.text(480,480,"Start Game",{fontFamily:"Arial Black",fontSize:50,color:"#ffffff",stroke:"#000000",strokeThickness:6}).setOrigin(.5).setInteractive({useHandCursor:!0}),this.mainMenuButtonText.on("pointerdown",()=>{this.scene.start("SandCity")},this)}}let rG=class extends Bc.GameObjects.Sprite{textBubble;tooltip};class Iz extends Hm.Scene{npcSprite;fishNpcSprite;monsterBirdSprites=[];monsterBirdShadows=[];cursor;gridEngine;quadtree;playerController;constructor(){super({key:"SandCity"});const e={xMin:0,xMax:20,yMin:0,yMax:20};this.quadtree=new vh(e)}preload(){this.load.spritesheet("monster_bird","/assets/monster/bird_original.png",{frameWidth:61,frameHeight:57}),_e.emit("notification",{title:"Success",message:`You arrived safely to SandCity Passport: ${_x()}`,notificationType:Rh.success})}create(){const e=this.make.tilemap({key:"cloud-city-map"});e.addTilesetImage("Cloud City","tiles");for(let E=0;E({id:"monster_bird_"+a,sprite:E,startPosition:{x:7,y:7+a},speed:5,collides:!1})),...this.monsterBirdShadows.map((E,a)=>({id:"monster_bird_shadow_"+a,sprite:E,startPosition:{x:7,y:7+a},speed:5,collides:!1}))],numberOfDirections:8};this.gridEngine.create(e,x),this.loadRanges(),this.playerController=new Nw(this,this.gridEngine,this.quadtree),Lz(this,this.npcSprite,"Enter the sand pit to start fishing! Go near it and press F!",3e3),this.gridEngine.moveRandomly("npc",1500,3),this.gridEngine.moveRandomly("fishNpc",1500,3);for(let E=0;E<10;E++)this.gridEngine.moveRandomly("monster_bird_"+E,1e3,10);this.gridEngine.positionChangeStarted().subscribe(({charId:E,exitTile:a,enterTile:y})=>{Gw(E)&&this.gridEngine.moveTo("monster_bird_shadow_"+zw(E),{x:y.x,y:y.y})});const T=(E,a,y)=>{const t=this.gridEngine.getPosition(E.name);Uw.attachNPCEvent(E,a,y,{coords:t})};T(this.npcSprite,"FisherMan",[{label:"Talk"},{label:"Trade"},{label:"Move to"},{label:"Steal"},{label:"Combat"}]),T(this.fishNpcSprite,"Fish NPC Actions",[{label:"Check Fish"},{label:"Move to"}]),window.__GRID_ENGINE__=this.gridEngine}loadRanges(){const e=[{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."};_e.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"};_e.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"};_e.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"};_e.emit("charEvent",i)}}];for(const i of e)this.quadtree.insert(i)}update(){this.playerController?.handleMovement()}}class aG extends Bc.GameObjects.Sprite{textBubble}class Nz extends Hm.Scene{npcSprite;fishNpcSprite;monsterBirdSprites=[];monsterBirdShadows=[];cursor;gridEngine;quadtree;playerController;constructor(){super({key:"CloudCity"});const e={xMin:0,xMax:20,yMin:0,yMax:20};this.quadtree=new vh(e)}preload(){this.load.spritesheet("monster_bird","/assets/monster/bird_original.png",{frameWidth:61,frameHeight:57})}create(){const e=this.make.tilemap({key:"cloud-city-map-large"});e.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(e,x),this.loadRanges(),this.playerController=new Nw(this,this.gridEngine,this.quadtree),bz(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:a})=>{Gw(T)&&this.gridEngine.moveTo("monster_bird_shadow_"+zw(T),{x:a.x,y:a.y})}),window.__GRID_ENGINE__=this.gridEngine}loadRanges(){const e=[{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."};_e.emit("charEvent",i)}},{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"};_e.emit("charEvent",T)}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"};_e.emit("charEvent",x)}}},{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"};_e.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"};_e.emit("charEvent",i)}}];for(const i of e)this.quadtree.insert(i)}update(){this.playerController?.handleMovement(),this.npcSprite&&this.npcSprite.textBubble&&Cx(this.npcSprite),this.fishNpcSprite&&this.fishNpcSprite.textBubble&&Cx(this.fishNpcSprite)}}const Bz=nm.div` + // Your style here +`;function Uz(){const g=ie.useRef(null);return ie.useEffect(()=>{if(g.current){const e=g.current,x={...{title:"CryptoThrone",render:{antialias:!1},scale:{mode:Bc.Scale.RESIZE,min:{width:1024,height:768},max:{width:1600,height:1200},zoom:1},type:Bc.AUTO,transparent:!0,width:800,height:600,physics:{default:"arcade",arcade:{gravity:{x:0,y:0},debug:!1}},plugins:{scene:[{key:"gridEngine",plugin:zO,mapping:"gridEngine"}]},scene:[Dz,Iz,Nz],input:{mouse:{preventDefaultWheel:!1},touch:{capture:!1}}},parent:e},T=new Bc.Game(x);return()=>{T.destroy(!0)}}},[]),kt.jsx(Bz,{children:kt.jsx("div",{ref:g})})}const vM=Ax({message:""}),zz=()=>{const g=Zs(vM);ie.useEffect(()=>{const i=x=>{if(x){vM.set(x);const T=document.querySelector("#hs-stacked-overlays");T&&(T.classList.remove("hidden"),T.classList.add("open"))}};return _e.on("charEvent",i),()=>{_e.off("charEvent",i)}},[]);const e=()=>{const i=document.querySelector("#hs-stacked-overlays");i&&(i.classList.add("hidden"),i.classList.remove("open"))};return kt.jsx(kt.Fragment,{children:kt.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:kt.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:kt.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:[kt.jsxs("div",{className:"w-full lg:w-1/3 p-4 rounded-l-xl flex flex-col items-center justify-center",children:[kt.jsx("h3",{className:"font-bold text-yellow-400 bg-zinc-950/80 rounded-2xl text-center mb-4",children:`${g.character_name||"NPC"}`}),kt.jsx("img",{src:g.character_image||"/assets/npc/barkeep.webp",alt:"Character",className:"w-full h-auto rounded-md"})]}),kt.jsxs("div",{className:"w-full lg:w-2/3 p-4 bg-cover bg-center rounded-r-xl",children:[kt.jsxs("div",{className:"flex justify-between items-center pb-3 border-b",children:[kt.jsx("h3",{className:"font-bold text-yellow-400",children:""}),kt.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:e,children:[kt.jsx("span",{className:"sr-only",children:"Close"}),kt.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:[kt.jsx("path",{d:"M18 6 6 18"}),kt.jsx("path",{d:"m6 6 12 12"})]})]})]}),kt.jsx("div",{className:"p-4 overflow-y-auto",children:kt.jsx("p",{className:"mt-1 mb-2 text-yellow-400 bg-zinc-950/80 rounded-xl p-4",children:g.message||"No Message"})}),kt.jsx("div",{className:"flex justify-end items-center gap-x-2 py-3 px-4 border-t",children:kt.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:e,children:[kt.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"}),kt.jsx("span",{className:"relative",children:"Okay."})]})})]})]})})})})},Gz=(g,e)=>{const i=eo(g);return i?kt.jsxs("div",{style:{top:e.y,left:e.x},className:"absolute bg-gray-700 text-white p-2 rounded shadow-lg z-50",children:[kt.jsx("p",{className:"text-sm font-semibold",children:i.name}),kt.jsxs("p",{className:"text-xs",children:["Type: ",i.type]}),kt.jsxs("p",{className:"text-xs",children:["Bonuses: ",JSON.stringify(i.bonuses)]}),kt.jsxs("p",{className:"text-xs",children:["Durability: ",i.durability]}),kt.jsxs("p",{className:"text-xs",children:["Weight: ",i.weight]})]}):null},Vz=(g,e,i,x)=>kt.jsx("ul",{className:"grid grid-cols-8 gap-2",children:Object.keys(g).map(T=>{const E=g[T];return Hz(E,e,i,x)})}),Hz=(g,e,i,x)=>{if(!g)return kt.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=eo(g);return T?kt.jsxs("li",{className:"text-sm relative",onMouseEnter:E=>e(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},Wz=(g,e,i,x)=>kt.jsx("ul",{className:"grid grid-cols-8 gap-1",children:g.map((T,E)=>{const a=eo(T);return a?kt.jsx("li",{className:"text-sm relative hover:scale-[1.3] transition ease-in-out duration-100",onMouseEnter:y=>e(a.id,y),onMouseLeave:i,onClick:y=>x(a.id,y),children:kt.jsx("img",{src:a.img,alt:a.name,style:{width:"32px",height:"32px"},className:"inline-block border border-yellow-400/50"})},E):null})}),Xz=()=>{const g=Zs(Ni);Zs(om),Zs(mI),Zs(or),ie.useEffect(()=>{const r=p=>{};return _e.on("playerEvent",r),()=>{_e.off("playerEvent",r)}},[]);const e=(r,p)=>{xc("tooltipItem",{id:r,position:{x:p.clientX+10,y:p.clientY-150}})},i=()=>{xc("tooltipItem",{...Ql("tooltipItem"),id:null})},x=(r,p)=>{xc("submenuItem",{id:r,position:{x:p.clientX,y:p.clientY-150}})},T=()=>{xc("submenuItem",{...Ql("submenuItem"),id:null})},E=(r,p)=>{const h=eo(r);if(h){const o={itemId:h.id,action:p};_e.emit("itemAction",o),T()}};if(!g||!g.stats)return null;const a=Ql("submenuItem"),y=a.id?FI(a.id):[],t=Ql("tooltipItem");return kt.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:[kt.jsx("button",{onClick:()=>xc("isStatsMenuCollapsed",!Ql("isStatsMenuCollapsed")),className:"bg-yellow-500 text-white p-2 rounded",children:Ql("isStatsMenuCollapsed")?kt.jsx(BI,{styleClass:"w-8"}):kt.jsx(NI,{styleClass:"w-8"})}),kt.jsxs("div",{className:`transition transform duration-1000 ease-in-out ${Ql("isStatsMenuCollapsed")?"max-h-0 overflow-hidden":"max-h-screen"}`,children:[kt.jsxs("div",{className:"mb-4",children:[kt.jsx("h2",{className:"text-lg font-semibold mb-2",children:"Stats"}),kt.jsx("p",{className:"text-sm text-green-400",children:`HP: ${g.stats.health||"0"} / ${g.stats.maxHealth}`}),kt.jsx("p",{className:"text-sm text-blue-400",children:`MP: ${g.stats.mana||"0"} / ${g.stats.maxMana}`}),kt.jsx("p",{className:"text-sm text-yellow-400",children:`EP: ${g.stats.energy||"0"} / ${g.stats.maxEnergy}`})]}),kt.jsxs("div",{className:"mb-4",children:[kt.jsx("h2",{className:"text-lg font-semibold mb-2",children:"User Information"}),kt.jsx("p",{className:"text-sm",children:g.stats.username||"Guest"})]}),kt.jsxs("div",{className:"mb-4",children:[kt.jsx("h2",{className:"text-lg font-semibold mb-2",children:"General Information"}),kt.jsx("p",{className:"text-sm",children:""})]}),kt.jsxs("div",{className:"mb-4",children:[kt.jsx("h2",{className:"text-lg font-semibold mb-2",children:"Inventory"}),Wz(g.inventory.backpack,e,i,x)]}),kt.jsxs("div",{className:"mb-4",children:[kt.jsx("h2",{className:"text-lg font-semibold mb-2",children:"Equipment"}),Vz(g.inventory.equipment,e,i,x)]}),t.id&&Gz(t.id,t.position),a.id&&kt.jsxs("div",{style:{top:a.position.y,left:a.position.x},className:"absolute bg-gray-700 text-white p-2 rounded shadow-lg z-50",children:[kt.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"}),kt.jsx("p",{className:"text-sm strong",children:"Actions:"}),kt.jsxs("ul",{className:"text-xs",children:[y.map(r=>kt.jsx("li",{onClick:()=>a.id&&E(a.id,r),className:"cursor-pointer hover:bg-gray-600",children:r.charAt(0).toUpperCase()+r.slice(1)},r)),kt.jsx("li",{onClick:T,className:"cursor-pointer hover:bg-gray-600",children:"Close"})]})]})]})]})},gm=Ax(null),ym=Ax(null),Yz=()=>{const g=Zs(gm),e=t=>{if(g){const r=Uw.getActionHandler(t);r&&r(g)}},i=()=>{gm.set(null)};if(!g)return null;const{npcName:x,actions:T,coords:E}=g,{x:a,y}=E||{x:0,y:0};return kt.jsxs("div",{className:"absolute bg-zinc-900 border border-yellow-300 rounded-md p-2 z-50 transition transform ease-in-out duration-500 opacity-50 hover:opacity-100",style:{left:`${a+120}px`,top:`${y+120}px`,transform:"translate(-50%, -100%)"},children:[kt.jsxs("div",{className:"flex justify-between items-center mb-2",children:[kt.jsx("h3",{className:"font-bold text-sm",children:x}),kt.jsx("button",{onClick:i,className:"text-xs font-bold m-1 text-yellow-300 hover:text-yellow-500",children:"X"})]}),T.map((t,r)=>kt.jsx("button",{onClick:()=>e(t),className:"block w-full text-xs py-1 px-2 mb-1 bg-yellow-500 hover:bg-yellow-400 rounded",children:t},r)),kt.jsx("button",{onClick:i,className:"block w-full text-xs py-1 px-2 mt-2 bg-red-500 hover:bg-red-600 rounded text-white",children:"Close"})]})},kz=()=>{const g=Zs(ym);ie.useEffect(()=>{const x=T=>{T&&e(T.diceValues)};return _e.on("diceRollResult",x),()=>{_e.off("diceRollResult",x)}},[g]);const e=x=>{const T=x.reduce((t,r)=>t+r,0);if(!g)return;let E="",a="";switch(!0){case T==12:E="01J27QABD2GPFNRVK69S51HSGB",a=`You successfully stole a ${E}!`;break;case T==11:E="01J27QN2KZG1RDZW4CE9Q9Z3YQ",a=`You successfully stole a ${E}!`;break;case T==10:E="01J269PK47V1DWX2S1251DEASD",a=`You successfully stole a ${E}!`;break;case T==9:E="Blue Shark",a=`You successfully stole a ${E}!`;break;case T>=7:E="Salmon",a=`You successfully stole a ${E}!`;break;case T==2:_e.emit("notification",{title:"Danger",message:`You crit failed to steal from ${g.npcName}!`,notificationType:Rh.danger}),_e.emit("playerDamage",{damage:"5"});break;default:_e.emit("notification",{title:"Danger",message:`You failed to steal from ${g.npcName}!`,notificationType:Rh.danger}),_e.emit("playerDamage",{damage:"1"});return}const y=yI(E);y?_e.emit("playerReward",{message:a,item:y}):console.warn("Item not found in ItemDB")},i=()=>{iC([]),ym.set(null)};return g?kt.jsx("div",{className:"fixed inset-0 flex items-center justify-center z-50 bg-zinc-800 bg-opacity-50",children:kt.jsxs("div",{className:"bg-zinc-800 p-4 rounded-lg shadow-lg max-w-xs w-full",children:[kt.jsx("h2",{className:"text-lg font-bold mb-4",children:"Steal Attempt"}),kt.jsxs("p",{className:"mb-4",children:["Roll the dice to steal from ",g.npcName,". You need a total of 7 or higher to succeed."]}),kt.jsx(Rz,{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:2}),kt.jsx("button",{onClick:i,className:"block w-full py-2 bg-red-500 text-white rounded hover:bg-red-700 mt-2",children:"Close"})]})}):null},Kz=()=>{const g=Zs(gm),e=Zs(ym);return ie.useEffect(()=>{const i=T=>{T&&gm.set(T)},x=T=>{T&&ym.set(T)};return _e.on("npcInteractionClick",i),_e.on("playerSteal",x),()=>{_e.off("npcInteractionClick",i),_e.off("playerSteal",x)}},[]),kt.jsxs("div",{children:[g&&kt.jsx(Yz,{}),e&&kt.jsx(kz,{})]})},jz=()=>{const g=Zs($l);ie.useEffect(()=>{const i=x=>{if(x){const T=Date.now()+Math.random();$l.set([...$l.get(),{id:T,...x}]),setTimeout(()=>{$l.set($l.get().filter(E=>E.id!==T))},5e3)}};return _e.on("notification",i),()=>{_e.off("notification",i)}},[]);const e=i=>{$l.set($l.get().filter(x=>x.id!==i))};return kt.jsx("div",{className:"fixed inset-x-0 bottom-0 z-50 m-4 space-y-2",children:Array.isArray(g)&&g.map(i=>kt.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:kt.jsxs("div",{className:"flex p-4",children:[kt.jsx("img",{src:i.notificationType.imgUrl,alt:i.notificationType.type,className:"flex-shrink-0 size-4"}),kt.jsxs("div",{className:"ms-2",children:[kt.jsx("h3",{className:"text-sm font-bold",children:i.title}),kt.jsx("p",{className:"text-sm",children:i.message})]}),kt.jsx("div",{className:"ms-auto",children:kt.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:()=>e(i.id),children:[kt.jsx("span",{className:"sr-only",children:"Close"}),kt.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:[kt.jsx("path",{d:"M18 6 6 18"}),kt.jsx("path",{d:"m6 6 12 12"})]})]})})]})},i.id))})},Zz=nm.div` + // Your style here +`;function oG(){return kt.jsxs(Zz,{children:[kt.jsx(Xz,{}),kt.jsx("div",{className:"flex justify-center items-center h-screen",children:kt.jsxs("div",{className:"border-4 border-yellow-500 rounded-xl",children:[kt.jsx(Uz,{}),kt.jsx(jz,{})]})}),kt.jsx(Kz,{}),kt.jsx(zz,{})]})}export{oG as default}; diff --git a/docs/_astro/index.CZl-U0kD.css b/docs/_astro/index.CZl-U0kD.css new file mode 100644 index 0000000..0171842 --- /dev/null +++ b/docs/_astro/index.CZl-U0kD.css @@ -0,0 +1 @@ +*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.inset-6{inset:1.5rem}.inset-x-0{left:0;right:0}.-bottom-20{bottom:-5rem}.bottom-0{bottom:0}.bottom-full{bottom:100%}.end-full{inset-inline-end:100%}.left-0{left:0}.left-1\/2{left:50%}.left-3{left:.75rem}.right-0{right:0}.right-1{right:.25rem}.start-0{inset-inline-start:0px}.start-1\/2{inset-inline-start:50%}.top-0{top:0}.top-1{top:.25rem}.top-1\/2{top:50%}.top-24{top:6rem}.top-4{top:1rem}.top-full{top:100%}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\[1\]{z-index:1}.z-\[60\]{z-index:60}.row-span-1{grid-row:span 1 / span 1}.m-1{margin:.25rem}.m-2{margin:.5rem}.m-3{margin:.75rem}.m-4{margin:1rem}.\!mx-\[10px\]{margin-left:10px!important;margin-right:10px!important}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-4{margin-top:1rem;margin-bottom:1rem}.-mt-12{margin-top:-3rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-8{margin-bottom:2rem}.ml-auto{margin-left:auto}.ms-2{margin-inline-start:.5rem}.ms-5{margin-inline-start:1.25rem}.ms-auto{margin-inline-start:auto}.mt-0{margin-top:0}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.line-clamp-3{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-video{aspect-ratio:16 / 9}.size-3{width:.75rem;height:.75rem}.size-3\.5{width:.875rem;height:.875rem}.size-4{width:1rem;height:1rem}.size-5{width:1.25rem;height:1.25rem}.size-6{width:1.5rem;height:1.5rem}.size-7{width:1.75rem;height:1.75rem}.size-8{width:2rem;height:2rem}.size-full{width:100%;height:100%}.h-10{height:2.5rem}.h-12{height:3rem}.h-20{height:5rem}.h-32{height:8rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-96{height:24rem}.h-\[32px\]{height:32px}.h-auto{height:auto}.h-full{height:100%}.h-screen{height:100vh}.max-h-0{max-height:0px}.max-h-\[500px\]{max-height:500px}.max-h-screen{max-height:100vh}.min-h-\[6rem\]{min-height:6rem}.min-h-screen{min-height:100vh}.w-1\/3{width:33.333333%}.w-10{width:2.5rem}.w-24{width:6rem}.w-3\/4{width:75%}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-\[1900px\]{width:1900px}.w-\[350px\]{width:350px}.w-\[calc\(100\%-2rem\)\]{width:calc(100% - 2rem)}.w-full{width:100%}.max-w-3xl{max-width:48rem}.max-w-5xl{max-width:64rem}.max-w-6xl{max-width:72rem}.max-w-7xl{max-width:80rem}.max-w-\[85rem\]{max-width:85rem}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-none{max-width:none}.max-w-sm{max-width:24rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-none{flex:none}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.flex-grow,.grow{flex-grow:1}.basis-full{flex-basis:100%}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-8{--tw-translate-x: -2rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-10{--tw-translate-x: 2.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-12{--tw-translate-x: 3rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-6{--tw-translate-x: 1.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-10{--tw-translate-y: 2.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-8{--tw-translate-y: 2rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rotate-12{--tw-rotate: -12deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-12{--tw-rotate: 12deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-skew-x-12{--tw-skew-x: -12deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.skew-x-12{--tw-skew-x: 12deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-75{--tw-scale-x: .75;--tw-scale-y: .75;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.resize{resize:both}.list-inside{list-style-position:inside}.list-disc{list-style-type:disc}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.flex-nowrap{flex-wrap:nowrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-4{gap:1rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.gap-x-3\.5{-moz-column-gap:.875rem;column-gap:.875rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-12>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(3rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(3rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-3xl{border-radius:1.5rem}.rounded-\[36px\]{border-radius:36px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-l-xl{border-top-left-radius:.75rem;border-bottom-left-radius:.75rem}.rounded-r-xl{border-top-right-radius:.75rem;border-bottom-right-radius:.75rem}.border{border-width:1px}.border-4{border-width:4px}.border-\[3px\]{border-width:3px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-s{border-inline-start-width:1px}.border-t{border-top-width:1px}.border-none{border-style:none}.border-blue-300{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity))}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.border-current{border-color:currentColor}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-gray-500{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity))}.border-green-300{--tw-border-opacity: 1;border-color:rgb(134 239 172 / var(--tw-border-opacity))}.border-green-500{--tw-border-opacity: 1;border-color:rgb(34 197 94 / var(--tw-border-opacity))}.border-neutral-100{--tw-border-opacity: 1;border-color:rgb(245 245 245 / var(--tw-border-opacity))}.border-neutral-200{--tw-border-opacity: 1;border-color:rgb(229 229 229 / var(--tw-border-opacity))}.border-orange-300{--tw-border-opacity: 1;border-color:rgb(253 186 116 / var(--tw-border-opacity))}.border-orange-500{--tw-border-opacity: 1;border-color:rgb(249 115 22 / var(--tw-border-opacity))}.border-red-300{--tw-border-opacity: 1;border-color:rgb(252 165 165 / var(--tw-border-opacity))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.border-yellow-300{--tw-border-opacity: 1;border-color:rgb(253 224 71 / var(--tw-border-opacity))}.border-yellow-400\/50{border-color:#facc1580}.border-yellow-500{--tw-border-opacity: 1;border-color:rgb(234 179 8 / var(--tw-border-opacity))}.border-yellow-700{--tw-border-opacity: 1;border-color:rgb(161 98 7 / var(--tw-border-opacity))}.border-t-transparent{border-top-color:transparent}.bg-\[var\(--sl-color-black\)\]{background-color:var(--sl-color-black)}.bg-blue-200{--tw-bg-opacity: 1;background-color:rgb(191 219 254 / var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.bg-cyan-400\/10{background-color:#22d3ee1a}.bg-cyan-400\/60{background-color:#22d3ee99}.bg-cyan-400\/90{background-color:#22d3eee6}.bg-cyan-500{--tw-bg-opacity: 1;background-color:rgb(6 182 212 / var(--tw-bg-opacity))}.bg-cyan-600{--tw-bg-opacity: 1;background-color:rgb(8 145 178 / var(--tw-bg-opacity))}.bg-cyan-700{--tw-bg-opacity: 1;background-color:rgb(14 116 144 / var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-gray-700{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity))}.bg-green-200{--tw-bg-opacity: 1;background-color:rgb(187 247 208 / var(--tw-bg-opacity))}.bg-neutral-100{--tw-bg-opacity: 1;background-color:rgb(245 245 245 / var(--tw-bg-opacity))}.bg-neutral-200{--tw-bg-opacity: 1;background-color:rgb(229 229 229 / var(--tw-bg-opacity))}.bg-neutral-900{--tw-bg-opacity: 1;background-color:rgb(23 23 23 / var(--tw-bg-opacity))}.bg-orange-100{--tw-bg-opacity: 1;background-color:rgb(255 237 213 / var(--tw-bg-opacity))}.bg-orange-200{--tw-bg-opacity: 1;background-color:rgb(254 215 170 / var(--tw-bg-opacity))}.bg-orange-500{--tw-bg-opacity: 1;background-color:rgb(249 115 22 / var(--tw-bg-opacity))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity))}.bg-red-200{--tw-bg-opacity: 1;background-color:rgb(254 202 202 / var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-yellow-200{--tw-bg-opacity: 1;background-color:rgb(254 240 138 / var(--tw-bg-opacity))}.bg-yellow-400{--tw-bg-opacity: 1;background-color:rgb(250 204 21 / var(--tw-bg-opacity))}.bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity))}.bg-yellow-600{--tw-bg-opacity: 1;background-color:rgb(202 138 4 / var(--tw-bg-opacity))}.bg-yellow-700{--tw-bg-opacity: 1;background-color:rgb(161 98 7 / var(--tw-bg-opacity))}.bg-zinc-100{--tw-bg-opacity: 1;background-color:rgb(244 244 245 / var(--tw-bg-opacity))}.bg-zinc-800{--tw-bg-opacity: 1;background-color:rgb(39 39 42 / var(--tw-bg-opacity))}.bg-zinc-900{--tw-bg-opacity: 1;background-color:rgb(24 24 27 / var(--tw-bg-opacity))}.bg-zinc-950{--tw-bg-opacity: 1;background-color:rgb(9 9 11 / var(--tw-bg-opacity))}.bg-zinc-950\/80{background-color:#09090bcc}.bg-opacity-50{--tw-bg-opacity: .5}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-neutral-200{--tw-gradient-from: #e5e5e5 var(--tw-gradient-from-position);--tw-gradient-to: rgb(229 229 229 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-neutral-400{--tw-gradient-from: #a3a3a3 var(--tw-gradient-from-position);--tw-gradient-to: rgb(163 163 163 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-pink-500{--tw-gradient-from: #ec4899 var(--tw-gradient-from-position);--tw-gradient-to: rgb(236 72 153 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-white{--tw-gradient-from: #fff var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-neutral-100{--tw-gradient-to: #f5f5f5 var(--tw-gradient-to-position)}.to-neutral-200{--tw-gradient-to: #e5e5e5 var(--tw-gradient-to-position)}.to-violet-500{--tw-gradient-to: #8b5cf6 var(--tw-gradient-to-position)}.bg-cover{background-size:cover}.bg-center{background-position:center}.stroke-yellow-700\/50{stroke:#a1620780}.object-contain{-o-object-fit:contain;object-fit:contain}.object-scale-down{-o-object-fit:scale-down;object-fit:scale-down}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.pb-3{padding-bottom:.75rem}.pl-5{padding-left:1.25rem}.ps-5{padding-inline-start:1.25rem}.ps-px{padding-inline-start:1px}.text-left{text-align:left}.text-center{text-align:center}.font-sans{font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity))}.text-cyan-600{--tw-text-opacity: 1;color:rgb(8 145 178 / var(--tw-text-opacity))}.text-gray-100{--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity))}.text-gray-200{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity))}.text-green-700{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity))}.text-neutral-500{--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity))}.text-neutral-600{--tw-text-opacity: 1;color:rgb(82 82 82 / var(--tw-text-opacity))}.text-orange-600{--tw-text-opacity: 1;color:rgb(234 88 12 / var(--tw-text-opacity))}.text-orange-700{--tw-text-opacity: 1;color:rgb(194 65 12 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-yellow-300{--tw-text-opacity: 1;color:rgb(253 224 71 / var(--tw-text-opacity))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity))}.text-yellow-600{--tw-text-opacity: 1;color:rgb(202 138 4 / var(--tw-text-opacity))}.text-yellow-700{--tw-text-opacity: 1;color:rgb(161 98 7 / var(--tw-text-opacity))}.opacity-0{opacity:0}.opacity-10{opacity:.1}.opacity-100{opacity:1}.opacity-50{opacity:.5}.shadow-inner{--tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / .05);--tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-none{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-black\/10{--tw-shadow-color: rgb(0 0 0 / .1);--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-lg{--tw-drop-shadow: drop-shadow(0 10px 8px rgb(0 0 0 / .04)) drop-shadow(0 4px 3px rgb(0 0 0 / .1));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[opacity\,margin\]{transition-property:opacity,margin;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-100{transition-duration:.1s}.duration-1000{transition-duration:1s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.duration-\[0\.1ms\]{transition-duration:.1ms}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.\[--adaptive\:none\]{--adaptive: none}.\[--overlay-backdrop\:static\]{--overlay-backdrop: static}.\[--strategy\:static\]{--strategy: static}.before\:absolute:before{content:var(--tw-content);position:absolute}.before\:-end-5:before{content:var(--tw-content);inset-inline-end:-1.25rem}.before\:-top-5:before{content:var(--tw-content);top:-1.25rem}.before\:start-0:before{content:var(--tw-content);inset-inline-start:0px}.before\:top-0:before{content:var(--tw-content);top:0}.before\:h-5:before{content:var(--tw-content);height:1.25rem}.before\:h-full:before{content:var(--tw-content);height:100%}.before\:w-5:before{content:var(--tw-content);width:1.25rem}.before\:w-full:before{content:var(--tw-content);width:100%}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:inset-0:after{content:var(--tw-content);inset:0}.after\:inset-2:after{content:var(--tw-content);inset:.5rem}.after\:inset-2\.5:after{content:var(--tw-content);inset:.625rem}.after\:transform-gpu:after{content:var(--tw-content);transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.after\:rounded-full:after{content:var(--tw-content);border-radius:9999px}.after\:rounded-xl:after{content:var(--tw-content);border-radius:.75rem}.after\:bg-cyan-600:after{content:var(--tw-content);--tw-bg-opacity: 1;background-color:rgb(8 145 178 / var(--tw-bg-opacity))}.after\:bg-gradient-to-b:after{content:var(--tw-content);background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.after\:from-neutral-100:after{content:var(--tw-content);--tw-gradient-from: #f5f5f5 var(--tw-gradient-from-position);--tw-gradient-to: rgb(245 245 245 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.after\:to-neutral-50:after{content:var(--tw-content);--tw-gradient-to: #fafafa var(--tw-gradient-to-position)}.after\:opacity-0:after{content:var(--tw-content);opacity:0}.after\:mix-blend-color:after{content:var(--tw-content);mix-blend-mode:color}.hover\:scale-110:hover{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:scale-\[1\.3\]:hover{--tw-scale-x: 1.3;--tw-scale-y: 1.3;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity))}.hover\:bg-cyan-700:hover{--tw-bg-opacity: 1;background-color:rgb(14 116 144 / var(--tw-bg-opacity))}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.hover\:bg-gray-300:hover{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.hover\:bg-gray-600:hover{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.hover\:bg-red-600:hover{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity))}.hover\:bg-red-700:hover{--tw-bg-opacity: 1;background-color:rgb(185 28 28 / var(--tw-bg-opacity))}.hover\:bg-yellow-300:hover{--tw-bg-opacity: 1;background-color:rgb(253 224 71 / var(--tw-bg-opacity))}.hover\:bg-yellow-400:hover{--tw-bg-opacity: 1;background-color:rgb(250 204 21 / var(--tw-bg-opacity))}.hover\:bg-gradient-to-r:hover{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.hover\:from-cyan-500:hover{--tw-gradient-from: #06b6d4 var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:from-yellow-500:hover{--tw-gradient-from: #eab308 var(--tw-gradient-from-position);--tw-gradient-to: rgb(234 179 8 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:to-cyan-400:hover{--tw-gradient-to: #22d3ee var(--tw-gradient-to-position)}.hover\:to-yellow-400:hover{--tw-gradient-to: #facc15 var(--tw-gradient-to-position)}.hover\:text-black:hover{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.hover\:text-gray-400:hover{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.hover\:text-yellow-500:hover{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity))}.hover\:text-zinc-950:hover{--tw-text-opacity: 1;color:rgb(9 9 11 / var(--tw-text-opacity))}.hover\:opacity-100:hover{opacity:1}.hover\:shadow-xl:hover{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:ring-2:hover{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.hover\:ring-cyan-400:hover{--tw-ring-opacity: 1;--tw-ring-color: rgb(34 211 238 / var(--tw-ring-opacity))}.hover\:ring-yellow-400:hover{--tw-ring-opacity: 1;--tw-ring-color: rgb(250 204 21 / var(--tw-ring-opacity))}.hover\:ring-offset-2:hover{--tw-ring-offset-width: 2px}.focus\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.focus\:border-indigo-500:focus{--tw-border-opacity: 1;border-color:rgb(99 102 241 / var(--tw-border-opacity))}.focus\:bg-gray-100:focus{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.focus\:opacity-100:focus{opacity:1}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity))}.focus\:ring-indigo-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity))}.focus\:ring-yellow-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(234 179 8 / var(--tw-ring-opacity))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:opacity-50:disabled{opacity:.5}.group\/bento:hover .group-hover\/bento\:translate-x-2{--tw-translate-x: .5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:-translate-x-40{--tw-translate-x: -10rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:-translate-x-96{--tw-translate-x: -24rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:-skew-x-12{--tw-skew-x: -12deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:skew-x-12{--tw-skew-x: 12deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity))}.group:hover .group-hover\:bg-yellow-700{--tw-bg-opacity: 1;background-color:rgb(161 98 7 / var(--tw-bg-opacity))}.peer:checked~.peer-checked\:from-cyan-500{--tw-gradient-from: #06b6d4 var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.peer:checked~.peer-checked\:to-cyan-100{--tw-gradient-to: #cffafe var(--tw-gradient-to-position)}.peer:checked~.peer-checked\:drop-shadow-sm{--tw-drop-shadow: drop-shadow(0 1px 1px rgb(0 0 0 / .05));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.peer:checked~.peer-checked\:after\:inset-1:after{content:var(--tw-content);inset:.25rem}.peer:checked~.peer-checked\:after\:from-neutral-200:after{content:var(--tw-content);--tw-gradient-from: #e5e5e5 var(--tw-gradient-from-position);--tw-gradient-to: rgb(229 229 229 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.peer:checked~.peer-checked\:after\:to-neutral-100:after{content:var(--tw-content);--tw-gradient-to: #f5f5f5 var(--tw-gradient-to-position)}.peer:checked~.peer-checked\:after\:opacity-100:after{content:var(--tw-content);opacity:1}.hs-dropdown.open>.hs-dropdown-open\:opacity-100{opacity:1}.hs-dropdown.open .hs-dropdown-toggle .hs-dropdown-open\:opacity-100{opacity:1}.hs-dropdown.open>.hs-dropdown-menu>.hs-dropdown-open\:opacity-100{opacity:1}.hs-removing.hs-removing\:translate-x-5{--tw-translate-x: 1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hs-removing.hs-removing\:opacity-0{opacity:0}.hs-collapse.open .hs-collapse-open\:block{display:block}.hs-collapse.open .hs-collapse-open\:hidden{display:none}.hs-collapse.open.hs-collapse-open\:block{display:block}.hs-collapse.open.hs-collapse-open\:hidden{display:none}.hs-collapse-toggle.open .hs-collapse-open\:block{display:block}.hs-collapse-toggle.open .hs-collapse-open\:hidden{display:none}.hs-collapse-toggle.open.hs-collapse-open\:block{display:block}.hs-collapse-toggle.open.hs-collapse-open\:hidden{display:none}.open.hs-overlay-open\:mt-7{margin-top:1.75rem}.open.hs-overlay-open\:opacity-100{opacity:1}.open.hs-overlay-open\:duration-500{transition-duration:.5s}.open .hs-overlay-open\:mt-7{margin-top:1.75rem}.open .hs-overlay-open\:opacity-100{opacity:1}.open .hs-overlay-open\:duration-500{transition-duration:.5s}.hs-overlay-backdrop.hs-overlay-backdrop-open\:bg-gray-900\/50,.hs-overlay-backdrop .hs-overlay-backdrop-open\:bg-gray-900\/50{background-color:#11182780}.selected .hs-combo-box-selected\:block,.selected.hs-combo-box-selected\:block{display:block}@media (min-width: 640px){.sm\:mx-auto{margin-left:auto;margin-right:auto}.sm\:w-full{width:100%}.sm\:max-w-lg{max-width:32rem}.sm\:-rotate-90{--tw-rotate: -90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 768px){.md\:col-span-1{grid-column:span 1 / span 1}.md\:col-span-2{grid-column:span 2 / span 2}.md\:my-6{margin-top:1.5rem;margin-bottom:1.5rem}.md\:block{display:block}.md\:flex{display:flex}.md\:hidden{display:none}.md\:w-1\/2{width:50%}.md\:w-48{width:12rem}.md\:w-96{width:24rem}.md\:scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.md\:scale-110{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.md\:auto-rows-\[18rem\]{grid-auto-rows:18rem}.md\:auto-rows-\[20rem\]{grid-auto-rows:20rem}.md\:flex-row{flex-direction:row}.md\:flex-nowrap{flex-wrap:nowrap}.md\:items-center{align-items:center}.md\:justify-start{justify-content:flex-start}.md\:justify-end{justify-content:flex-end}.md\:justify-between{justify-content:space-between}.md\:border{border-width:1px}.md\:border-s{border-inline-start-width:1px}.md\:border-yellow-500{--tw-border-opacity: 1;border-color:rgb(234 179 8 / var(--tw-border-opacity))}.md\:p-4{padding:1rem}.md\:p-6{padding:1.5rem}.md\:px-3{padding-left:.75rem;padding-right:.75rem}.md\:px-6{padding-left:1.5rem;padding-right:1.5rem}.md\:py-0{padding-top:0;padding-bottom:0}.md\:ps-6{padding-inline-start:1.5rem}.md\:ps-7{padding-inline-start:1.75rem}.md\:text-xl{font-size:1.25rem;line-height:1.75rem}.md\:shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.md\:duration-\[150ms\]{transition-duration:.15s}.md\:\[--strategy\:absolute\]{--strategy: absolute}.md\:\[--strategy\:fixed\]{--strategy: fixed}.md\:\[--trigger\:hover\]{--trigger: hover}}@media (min-width: 1024px){.lg\:w-1\/3{width:33.333333%}.lg\:w-2\/3{width:66.666667%}.lg\:w-96{width:24rem}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:flex-row{flex-direction:row}.lg\:p-8{padding:2rem}.lg\:px-8{padding-left:2rem;padding-right:2rem}.lg\:pt-16{padding-top:4rem}.lg\:text-3xl{font-size:1.875rem;line-height:2.25rem}}@media (min-width: 1280px){.xl\:mx-auto{margin-left:auto;margin-right:auto}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.xl\:px-0{padding-left:0;padding-right:0}}@media (prefers-color-scheme: dark){.dark\:border-neutral-700{--tw-border-opacity: 1;border-color:rgb(64 64 64 / var(--tw-border-opacity))}.dark\:border-white\/\[0\.1\]{border-color:#ffffff1a}.dark\:border-white\/\[0\.2\]{border-color:#fff3}.dark\:bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.dark\:bg-green-900\/20{background-color:#14532d33}.dark\:bg-neutral-900{--tw-bg-opacity: 1;background-color:rgb(23 23 23 / var(--tw-bg-opacity))}.dark\:bg-orange-900\/20{background-color:#7c2d1233}.dark\:bg-red-900\/20{background-color:#7f1d1d33}.dark\:bg-zinc-900{--tw-bg-opacity: 1;background-color:rgb(24 24 27 / var(--tw-bg-opacity))}.dark\:bg-opacity-80{--tw-bg-opacity: .8}.dark\:from-neutral-900{--tw-gradient-from: #171717 var(--tw-gradient-from-position);--tw-gradient-to: rgb(23 23 23 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:to-neutral-800{--tw-gradient-to: #262626 var(--tw-gradient-to-position)}.dark\:text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.dark\:text-neutral-200{--tw-text-opacity: 1;color:rgb(229 229 229 / var(--tw-text-opacity))}.dark\:text-neutral-300{--tw-text-opacity: 1;color:rgb(212 212 212 / var(--tw-text-opacity))}.dark\:text-neutral-400{--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity))}.dark\:text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark\:shadow-none{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.dark\:hover\:bg-neutral-800:hover{--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}.dark\:focus\:bg-neutral-800:focus{--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}}:root{--accent: 136, 58, 234;--accent-light: 224, 204, 250;--accent-dark: 49, 10, 101;--accent-gradient: linear-gradient( 45deg, rgb(var(--accent)), rgb(var(--accent-light)) 30%, white 60% )}code{font-family:Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace}.hexgrid-background{background-image:url('data:image/svg+xml,');background-repeat:repeat;background-position:0 0;animation:scrollLeft 2s linear infinite}@keyframes scrollLeft{0%{background-position:0 0}to{background-position:-100px 0}}main[data-astro-cid-j7pv25f6]{margin:auto;padding:1rem;width:800px;max-width:calc(100% - 2rem);color:#fff;font-size:20px;line-height:1.6}.astro-a[data-astro-cid-j7pv25f6]{position:absolute;top:-32px;left:50%;transform:translate(-50%);width:220px;height:auto;z-index:-1}h1[data-astro-cid-j7pv25f6]{font-size:4rem;font-weight:700;line-height:1;text-align:center;margin-bottom:1em}.text-gradient[data-astro-cid-j7pv25f6]{background-image:var(--accent-gradient);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-size:400%;background-position:0%}.instructions[data-astro-cid-j7pv25f6]{margin-bottom:2rem;border:1px solid rgba(var(--accent-light),25%);background:linear-gradient(rgba(var(--accent-dark),66%),rgba(var(--accent-dark),33%));padding:1.5rem;border-radius:8px}.instructions[data-astro-cid-j7pv25f6] code[data-astro-cid-j7pv25f6]{font-size:.8em;font-weight:700;background:rgba(var(--accent-light),12%);color:rgb(var(--accent-light));border-radius:4px;padding:.3em .4em}.instructions[data-astro-cid-j7pv25f6] strong[data-astro-cid-j7pv25f6]{color:rgb(var(--accent-light))}.link-card-grid[data-astro-cid-j7pv25f6]{display:grid;grid-template-columns:repeat(auto-fit,minmax(24ch,1fr));gap:2rem;padding:0} diff --git a/docs/_astro/index.DZ1QbnZs.css b/docs/_astro/index.DZ1QbnZs.css deleted file mode 100644 index fd48e38..0000000 --- a/docs/_astro/index.DZ1QbnZs.css +++ /dev/null @@ -1 +0,0 @@ -*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.inset-6{inset:1.5rem}.inset-x-0{left:0;right:0}.-bottom-20{bottom:-5rem}.bottom-0{bottom:0}.bottom-full{bottom:100%}.end-full{inset-inline-end:100%}.left-0{left:0}.left-1\/2{left:50%}.left-3{left:.75rem}.right-0{right:0}.right-1{right:.25rem}.start-0{inset-inline-start:0px}.start-1\/2{inset-inline-start:50%}.top-0{top:0}.top-1{top:.25rem}.top-1\/2{top:50%}.top-12{top:3rem}.top-24{top:6rem}.top-4{top:1rem}.top-full{top:100%}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\[1\]{z-index:1}.z-\[60\]{z-index:60}.row-span-1{grid-row:span 1 / span 1}.m-1{margin:.25rem}.m-2{margin:.5rem}.m-3{margin:.75rem}.m-4{margin:1rem}.\!mx-\[10px\]{margin-left:10px!important;margin-right:10px!important}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-4{margin-top:1rem;margin-bottom:1rem}.-mt-12{margin-top:-3rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-8{margin-bottom:2rem}.ml-auto{margin-left:auto}.ms-2{margin-inline-start:.5rem}.ms-5{margin-inline-start:1.25rem}.ms-auto{margin-inline-start:auto}.mt-0{margin-top:0}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.line-clamp-3{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-video{aspect-ratio:16 / 9}.size-3{width:.75rem;height:.75rem}.size-3\.5{width:.875rem;height:.875rem}.size-4{width:1rem;height:1rem}.size-5{width:1.25rem;height:1.25rem}.size-6{width:1.5rem;height:1.5rem}.size-7{width:1.75rem;height:1.75rem}.size-8{width:2rem;height:2rem}.size-full{width:100%;height:100%}.h-0{height:0px}.h-10{height:2.5rem}.h-12{height:3rem}.h-20{height:5rem}.h-32{height:8rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-\[32px\]{height:32px}.h-auto{height:auto}.h-full{height:100%}.h-screen{height:100vh}.max-h-0{max-height:0px}.max-h-\[500px\]{max-height:500px}.max-h-screen{max-height:100vh}.min-h-\[6rem\]{min-height:6rem}.min-h-screen{min-height:100vh}.w-0{width:0px}.w-1\/3{width:33.333333%}.w-10{width:2.5rem}.w-24{width:6rem}.w-3\/4{width:75%}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-\[1900px\]{width:1900px}.w-\[350px\]{width:350px}.w-\[calc\(100\%-2rem\)\]{width:calc(100% - 2rem)}.w-full{width:100%}.max-w-3xl{max-width:48rem}.max-w-5xl{max-width:64rem}.max-w-6xl{max-width:72rem}.max-w-7xl{max-width:80rem}.max-w-\[85rem\]{max-width:85rem}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-none{max-width:none}.max-w-sm{max-width:24rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-none{flex:none}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.flex-grow,.grow{flex-grow:1}.basis-full{flex-basis:100%}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-10{--tw-translate-x: -2.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-8{--tw-translate-x: -2rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-10{--tw-translate-x: 2.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-12{--tw-translate-x: 3rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-6{--tw-translate-x: 1.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-10{--tw-translate-y: 2.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-12{--tw-translate-y: 3rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-8{--tw-translate-y: 2rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rotate-12{--tw-rotate: -12deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-12{--tw-rotate: 12deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-skew-x-12{--tw-skew-x: -12deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.skew-x-12{--tw-skew-x: 12deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-75{--tw-scale-x: .75;--tw-scale-y: .75;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.resize{resize:both}.list-inside{list-style-position:inside}.list-disc{list-style-type:disc}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.flex-nowrap{flex-wrap:nowrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-4{gap:1rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.gap-x-3\.5{-moz-column-gap:.875rem;column-gap:.875rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-12>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(3rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(3rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-3xl{border-radius:1.5rem}.rounded-\[36px\]{border-radius:36px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.rounded-l-xl{border-top-left-radius:.75rem;border-bottom-left-radius:.75rem}.rounded-r-xl{border-top-right-radius:.75rem;border-bottom-right-radius:.75rem}.border{border-width:1px}.border-4{border-width:4px}.border-\[3px\]{border-width:3px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-s{border-inline-start-width:1px}.border-t{border-top-width:1px}.border-t-2{border-top-width:2px}.border-none{border-style:none}.border-blue-300{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity))}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.border-current{border-color:currentColor}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-gray-500{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity))}.border-green-300{--tw-border-opacity: 1;border-color:rgb(134 239 172 / var(--tw-border-opacity))}.border-green-500{--tw-border-opacity: 1;border-color:rgb(34 197 94 / var(--tw-border-opacity))}.border-neutral-100{--tw-border-opacity: 1;border-color:rgb(245 245 245 / var(--tw-border-opacity))}.border-neutral-200{--tw-border-opacity: 1;border-color:rgb(229 229 229 / var(--tw-border-opacity))}.border-orange-300{--tw-border-opacity: 1;border-color:rgb(253 186 116 / var(--tw-border-opacity))}.border-orange-500{--tw-border-opacity: 1;border-color:rgb(249 115 22 / var(--tw-border-opacity))}.border-red-300{--tw-border-opacity: 1;border-color:rgb(252 165 165 / var(--tw-border-opacity))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.border-yellow-100{--tw-border-opacity: 1;border-color:rgb(254 249 195 / var(--tw-border-opacity))}.border-yellow-300{--tw-border-opacity: 1;border-color:rgb(253 224 71 / var(--tw-border-opacity))}.border-yellow-400\/50{border-color:#facc1580}.border-yellow-500{--tw-border-opacity: 1;border-color:rgb(234 179 8 / var(--tw-border-opacity))}.border-yellow-600{--tw-border-opacity: 1;border-color:rgb(202 138 4 / var(--tw-border-opacity))}.border-yellow-700{--tw-border-opacity: 1;border-color:rgb(161 98 7 / var(--tw-border-opacity))}.border-t-transparent{border-top-color:transparent}.bg-\[var\(--sl-color-black\)\]{background-color:var(--sl-color-black)}.bg-blue-200{--tw-bg-opacity: 1;background-color:rgb(191 219 254 / var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.bg-cyan-400\/10{background-color:#22d3ee1a}.bg-cyan-400\/60{background-color:#22d3ee99}.bg-cyan-400\/90{background-color:#22d3eee6}.bg-cyan-500{--tw-bg-opacity: 1;background-color:rgb(6 182 212 / var(--tw-bg-opacity))}.bg-cyan-600{--tw-bg-opacity: 1;background-color:rgb(8 145 178 / var(--tw-bg-opacity))}.bg-cyan-700{--tw-bg-opacity: 1;background-color:rgb(14 116 144 / var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-gray-700{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity))}.bg-green-200{--tw-bg-opacity: 1;background-color:rgb(187 247 208 / var(--tw-bg-opacity))}.bg-neutral-100{--tw-bg-opacity: 1;background-color:rgb(245 245 245 / var(--tw-bg-opacity))}.bg-neutral-200{--tw-bg-opacity: 1;background-color:rgb(229 229 229 / var(--tw-bg-opacity))}.bg-neutral-900{--tw-bg-opacity: 1;background-color:rgb(23 23 23 / var(--tw-bg-opacity))}.bg-orange-100{--tw-bg-opacity: 1;background-color:rgb(255 237 213 / var(--tw-bg-opacity))}.bg-orange-200{--tw-bg-opacity: 1;background-color:rgb(254 215 170 / var(--tw-bg-opacity))}.bg-orange-500{--tw-bg-opacity: 1;background-color:rgb(249 115 22 / var(--tw-bg-opacity))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity))}.bg-red-200{--tw-bg-opacity: 1;background-color:rgb(254 202 202 / var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity))}.bg-yellow-200{--tw-bg-opacity: 1;background-color:rgb(254 240 138 / var(--tw-bg-opacity))}.bg-yellow-400{--tw-bg-opacity: 1;background-color:rgb(250 204 21 / var(--tw-bg-opacity))}.bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity))}.bg-yellow-600{--tw-bg-opacity: 1;background-color:rgb(202 138 4 / var(--tw-bg-opacity))}.bg-yellow-700{--tw-bg-opacity: 1;background-color:rgb(161 98 7 / var(--tw-bg-opacity))}.bg-yellow-900{--tw-bg-opacity: 1;background-color:rgb(113 63 18 / var(--tw-bg-opacity))}.bg-zinc-100{--tw-bg-opacity: 1;background-color:rgb(244 244 245 / var(--tw-bg-opacity))}.bg-zinc-800{--tw-bg-opacity: 1;background-color:rgb(39 39 42 / var(--tw-bg-opacity))}.bg-zinc-900{--tw-bg-opacity: 1;background-color:rgb(24 24 27 / var(--tw-bg-opacity))}.bg-zinc-950{--tw-bg-opacity: 1;background-color:rgb(9 9 11 / var(--tw-bg-opacity))}.bg-zinc-950\/80{background-color:#09090bcc}.bg-opacity-50{--tw-bg-opacity: .5}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-neutral-200{--tw-gradient-from: #e5e5e5 var(--tw-gradient-from-position);--tw-gradient-to: rgb(229 229 229 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-neutral-400{--tw-gradient-from: #a3a3a3 var(--tw-gradient-from-position);--tw-gradient-to: rgb(163 163 163 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-pink-500{--tw-gradient-from: #ec4899 var(--tw-gradient-from-position);--tw-gradient-to: rgb(236 72 153 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-white{--tw-gradient-from: #fff var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-neutral-100{--tw-gradient-to: #f5f5f5 var(--tw-gradient-to-position)}.to-neutral-200{--tw-gradient-to: #e5e5e5 var(--tw-gradient-to-position)}.to-violet-500{--tw-gradient-to: #8b5cf6 var(--tw-gradient-to-position)}.bg-cover{background-size:cover}.bg-center{background-position:center}.stroke-yellow-700\/50{stroke:#a1620780}.object-contain{-o-object-fit:contain;object-fit:contain}.object-scale-down{-o-object-fit:scale-down;object-fit:scale-down}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.pb-3{padding-bottom:.75rem}.pl-5{padding-left:1.25rem}.ps-5{padding-inline-start:1.25rem}.ps-px{padding-inline-start:1px}.text-left{text-align:left}.text-center{text-align:center}.font-sans{font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity))}.text-cyan-600{--tw-text-opacity: 1;color:rgb(8 145 178 / var(--tw-text-opacity))}.text-gray-100{--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity))}.text-gray-200{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity))}.text-green-700{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity))}.text-neutral-500{--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity))}.text-neutral-600{--tw-text-opacity: 1;color:rgb(82 82 82 / var(--tw-text-opacity))}.text-orange-600{--tw-text-opacity: 1;color:rgb(234 88 12 / var(--tw-text-opacity))}.text-orange-700{--tw-text-opacity: 1;color:rgb(194 65 12 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-yellow-300{--tw-text-opacity: 1;color:rgb(253 224 71 / var(--tw-text-opacity))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity))}.text-yellow-600{--tw-text-opacity: 1;color:rgb(202 138 4 / var(--tw-text-opacity))}.text-yellow-700{--tw-text-opacity: 1;color:rgb(161 98 7 / var(--tw-text-opacity))}.opacity-0{opacity:0}.opacity-10{opacity:.1}.opacity-100{opacity:1}.opacity-50{opacity:.5}.shadow-inner{--tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / .05);--tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-none{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-black\/10{--tw-shadow-color: rgb(0 0 0 / .1);--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-lg{--tw-drop-shadow: drop-shadow(0 10px 8px rgb(0 0 0 / .04)) drop-shadow(0 4px 3px rgb(0 0 0 / .1));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[opacity\,margin\]{transition-property:opacity,margin;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.delay-200{transition-delay:.2s}.delay-300{transition-delay:.3s}.duration-100{transition-duration:.1s}.duration-1000{transition-duration:1s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.duration-\[0\.1ms\]{transition-duration:.1ms}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.\[--adaptive\:none\]{--adaptive: none}.\[--overlay-backdrop\:static\]{--overlay-backdrop: static}.\[--strategy\:static\]{--strategy: static}.before\:absolute:before{content:var(--tw-content);position:absolute}.before\:-end-5:before{content:var(--tw-content);inset-inline-end:-1.25rem}.before\:-top-5:before{content:var(--tw-content);top:-1.25rem}.before\:start-0:before{content:var(--tw-content);inset-inline-start:0px}.before\:top-0:before{content:var(--tw-content);top:0}.before\:h-5:before{content:var(--tw-content);height:1.25rem}.before\:h-full:before{content:var(--tw-content);height:100%}.before\:w-5:before{content:var(--tw-content);width:1.25rem}.before\:w-full:before{content:var(--tw-content);width:100%}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:inset-0:after{content:var(--tw-content);inset:0}.after\:inset-2:after{content:var(--tw-content);inset:.5rem}.after\:inset-2\.5:after{content:var(--tw-content);inset:.625rem}.after\:transform-gpu:after{content:var(--tw-content);transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.after\:rounded-full:after{content:var(--tw-content);border-radius:9999px}.after\:rounded-xl:after{content:var(--tw-content);border-radius:.75rem}.after\:bg-cyan-600:after{content:var(--tw-content);--tw-bg-opacity: 1;background-color:rgb(8 145 178 / var(--tw-bg-opacity))}.after\:bg-gradient-to-b:after{content:var(--tw-content);background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.after\:from-neutral-100:after{content:var(--tw-content);--tw-gradient-from: #f5f5f5 var(--tw-gradient-from-position);--tw-gradient-to: rgb(245 245 245 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.after\:to-neutral-50:after{content:var(--tw-content);--tw-gradient-to: #fafafa var(--tw-gradient-to-position)}.after\:opacity-0:after{content:var(--tw-content);opacity:0}.after\:mix-blend-color:after{content:var(--tw-content);mix-blend-mode:color}.hover\:scale-110:hover{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:scale-\[1\.3\]:hover{--tw-scale-x: 1.3;--tw-scale-y: 1.3;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity))}.hover\:bg-cyan-700:hover{--tw-bg-opacity: 1;background-color:rgb(14 116 144 / var(--tw-bg-opacity))}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.hover\:bg-gray-300:hover{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.hover\:bg-gray-600:hover{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.hover\:bg-yellow-300:hover{--tw-bg-opacity: 1;background-color:rgb(253 224 71 / var(--tw-bg-opacity))}.hover\:bg-gradient-to-r:hover{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.hover\:from-cyan-500:hover{--tw-gradient-from: #06b6d4 var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:from-yellow-500:hover{--tw-gradient-from: #eab308 var(--tw-gradient-from-position);--tw-gradient-to: rgb(234 179 8 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:to-cyan-400:hover{--tw-gradient-to: #22d3ee var(--tw-gradient-to-position)}.hover\:to-yellow-400:hover{--tw-gradient-to: #facc15 var(--tw-gradient-to-position)}.hover\:text-black:hover{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.hover\:text-gray-400:hover{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.hover\:text-yellow-500:hover{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity))}.hover\:text-zinc-950:hover{--tw-text-opacity: 1;color:rgb(9 9 11 / var(--tw-text-opacity))}.hover\:opacity-100:hover{opacity:1}.hover\:shadow-xl:hover{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:ring-2:hover{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.hover\:ring-cyan-400:hover{--tw-ring-opacity: 1;--tw-ring-color: rgb(34 211 238 / var(--tw-ring-opacity))}.hover\:ring-yellow-400:hover{--tw-ring-opacity: 1;--tw-ring-color: rgb(250 204 21 / var(--tw-ring-opacity))}.hover\:ring-offset-2:hover{--tw-ring-offset-width: 2px}.focus\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.focus\:border-indigo-500:focus{--tw-border-opacity: 1;border-color:rgb(99 102 241 / var(--tw-border-opacity))}.focus\:bg-gray-100:focus{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.focus\:opacity-100:focus{opacity:1}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity))}.focus\:ring-indigo-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity))}.focus\:ring-yellow-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(234 179 8 / var(--tw-ring-opacity))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:h-full{height:100%}.group:hover .group-hover\:w-full{width:100%}.group\/bento:hover .group-hover\/bento\:translate-x-2{--tw-translate-x: .5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:-translate-x-40{--tw-translate-x: -10rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:-translate-x-96{--tw-translate-x: -24rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:-skew-x-12{--tw-skew-x: -12deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:skew-x-12{--tw-skew-x: 12deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity))}.group:hover .group-hover\:bg-yellow-700{--tw-bg-opacity: 1;background-color:rgb(161 98 7 / var(--tw-bg-opacity))}.group:hover .group-hover\:text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.group:hover .group-hover\:opacity-100{opacity:1}.peer:checked~.peer-checked\:from-cyan-500{--tw-gradient-from: #06b6d4 var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.peer:checked~.peer-checked\:to-cyan-100{--tw-gradient-to: #cffafe var(--tw-gradient-to-position)}.peer:checked~.peer-checked\:drop-shadow-sm{--tw-drop-shadow: drop-shadow(0 1px 1px rgb(0 0 0 / .05));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.peer:checked~.peer-checked\:after\:inset-1:after{content:var(--tw-content);inset:.25rem}.peer:checked~.peer-checked\:after\:from-neutral-200:after{content:var(--tw-content);--tw-gradient-from: #e5e5e5 var(--tw-gradient-from-position);--tw-gradient-to: rgb(229 229 229 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.peer:checked~.peer-checked\:after\:to-neutral-100:after{content:var(--tw-content);--tw-gradient-to: #f5f5f5 var(--tw-gradient-to-position)}.peer:checked~.peer-checked\:after\:opacity-100:after{content:var(--tw-content);opacity:1}.hs-dropdown.open>.hs-dropdown-open\:opacity-100{opacity:1}.hs-dropdown.open .hs-dropdown-toggle .hs-dropdown-open\:opacity-100{opacity:1}.hs-dropdown.open>.hs-dropdown-menu>.hs-dropdown-open\:opacity-100{opacity:1}.hs-removing.hs-removing\:translate-x-5{--tw-translate-x: 1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hs-removing.hs-removing\:opacity-0{opacity:0}.hs-collapse.open .hs-collapse-open\:block{display:block}.hs-collapse.open .hs-collapse-open\:hidden{display:none}.hs-collapse.open.hs-collapse-open\:block{display:block}.hs-collapse.open.hs-collapse-open\:hidden{display:none}.hs-collapse-toggle.open .hs-collapse-open\:block{display:block}.hs-collapse-toggle.open .hs-collapse-open\:hidden{display:none}.hs-collapse-toggle.open.hs-collapse-open\:block{display:block}.hs-collapse-toggle.open.hs-collapse-open\:hidden{display:none}.open.hs-overlay-open\:mt-7{margin-top:1.75rem}.open.hs-overlay-open\:opacity-100{opacity:1}.open.hs-overlay-open\:duration-500{transition-duration:.5s}.open .hs-overlay-open\:mt-7{margin-top:1.75rem}.open .hs-overlay-open\:opacity-100{opacity:1}.open .hs-overlay-open\:duration-500{transition-duration:.5s}.hs-overlay-backdrop.hs-overlay-backdrop-open\:bg-gray-900\/50,.hs-overlay-backdrop .hs-overlay-backdrop-open\:bg-gray-900\/50{background-color:#11182780}.selected .hs-combo-box-selected\:block,.selected.hs-combo-box-selected\:block{display:block}@media (min-width: 640px){.sm\:mx-auto{margin-left:auto;margin-right:auto}.sm\:w-full{width:100%}.sm\:max-w-lg{max-width:32rem}.sm\:-rotate-90{--tw-rotate: -90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 768px){.md\:col-span-1{grid-column:span 1 / span 1}.md\:col-span-2{grid-column:span 2 / span 2}.md\:my-6{margin-top:1.5rem;margin-bottom:1.5rem}.md\:block{display:block}.md\:flex{display:flex}.md\:hidden{display:none}.md\:w-1\/2{width:50%}.md\:w-48{width:12rem}.md\:w-96{width:24rem}.md\:scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.md\:scale-110{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.md\:auto-rows-\[18rem\]{grid-auto-rows:18rem}.md\:auto-rows-\[20rem\]{grid-auto-rows:20rem}.md\:flex-row{flex-direction:row}.md\:flex-nowrap{flex-wrap:nowrap}.md\:items-center{align-items:center}.md\:justify-start{justify-content:flex-start}.md\:justify-end{justify-content:flex-end}.md\:justify-between{justify-content:space-between}.md\:border{border-width:1px}.md\:border-s{border-inline-start-width:1px}.md\:border-yellow-500{--tw-border-opacity: 1;border-color:rgb(234 179 8 / var(--tw-border-opacity))}.md\:p-4{padding:1rem}.md\:p-6{padding:1.5rem}.md\:px-3{padding-left:.75rem;padding-right:.75rem}.md\:px-6{padding-left:1.5rem;padding-right:1.5rem}.md\:py-0{padding-top:0;padding-bottom:0}.md\:ps-6{padding-inline-start:1.5rem}.md\:ps-7{padding-inline-start:1.75rem}.md\:text-xl{font-size:1.25rem;line-height:1.75rem}.md\:shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.md\:duration-\[150ms\]{transition-duration:.15s}.md\:\[--strategy\:absolute\]{--strategy: absolute}.md\:\[--strategy\:fixed\]{--strategy: fixed}.md\:\[--trigger\:hover\]{--trigger: hover}}@media (min-width: 1024px){.lg\:w-1\/3{width:33.333333%}.lg\:w-2\/3{width:66.666667%}.lg\:w-96{width:24rem}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:flex-row{flex-direction:row}.lg\:p-8{padding:2rem}.lg\:px-8{padding-left:2rem;padding-right:2rem}.lg\:pt-16{padding-top:4rem}.lg\:text-3xl{font-size:1.875rem;line-height:2.25rem}}@media (min-width: 1280px){.xl\:mx-auto{margin-left:auto;margin-right:auto}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.xl\:px-0{padding-left:0;padding-right:0}}@media (prefers-color-scheme: dark){.dark\:border-neutral-700{--tw-border-opacity: 1;border-color:rgb(64 64 64 / var(--tw-border-opacity))}.dark\:border-white\/\[0\.1\]{border-color:#ffffff1a}.dark\:border-white\/\[0\.2\]{border-color:#fff3}.dark\:bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.dark\:bg-green-900\/20{background-color:#14532d33}.dark\:bg-neutral-900{--tw-bg-opacity: 1;background-color:rgb(23 23 23 / var(--tw-bg-opacity))}.dark\:bg-orange-900\/20{background-color:#7c2d1233}.dark\:bg-red-900\/20{background-color:#7f1d1d33}.dark\:bg-zinc-900{--tw-bg-opacity: 1;background-color:rgb(24 24 27 / var(--tw-bg-opacity))}.dark\:bg-opacity-80{--tw-bg-opacity: .8}.dark\:from-neutral-900{--tw-gradient-from: #171717 var(--tw-gradient-from-position);--tw-gradient-to: rgb(23 23 23 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:to-neutral-800{--tw-gradient-to: #262626 var(--tw-gradient-to-position)}.dark\:text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.dark\:text-neutral-200{--tw-text-opacity: 1;color:rgb(229 229 229 / var(--tw-text-opacity))}.dark\:text-neutral-300{--tw-text-opacity: 1;color:rgb(212 212 212 / var(--tw-text-opacity))}.dark\:text-neutral-400{--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity))}.dark\:text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark\:shadow-none{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.dark\:hover\:bg-neutral-800:hover{--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}.dark\:focus\:bg-neutral-800:focus{--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}}:root{--accent: 136, 58, 234;--accent-light: 224, 204, 250;--accent-dark: 49, 10, 101;--accent-gradient: linear-gradient( 45deg, rgb(var(--accent)), rgb(var(--accent-light)) 30%, white 60% )}code{font-family:Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace}.hexgrid-background{background-image:url('data:image/svg+xml,');background-repeat:repeat;background-position:0 0;animation:scrollLeft 2s linear infinite}@keyframes scrollLeft{0%{background-position:0 0}to{background-position:-100px 0}}main[data-astro-cid-j7pv25f6]{margin:auto;padding:1rem;width:800px;max-width:calc(100% - 2rem);color:#fff;font-size:20px;line-height:1.6}.astro-a[data-astro-cid-j7pv25f6]{position:absolute;top:-32px;left:50%;transform:translate(-50%);width:220px;height:auto;z-index:-1}h1[data-astro-cid-j7pv25f6]{font-size:4rem;font-weight:700;line-height:1;text-align:center;margin-bottom:1em}.text-gradient[data-astro-cid-j7pv25f6]{background-image:var(--accent-gradient);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-size:400%;background-position:0%}.instructions[data-astro-cid-j7pv25f6]{margin-bottom:2rem;border:1px solid rgba(var(--accent-light),25%);background:linear-gradient(rgba(var(--accent-dark),66%),rgba(var(--accent-dark),33%));padding:1.5rem;border-radius:8px}.instructions[data-astro-cid-j7pv25f6] code[data-astro-cid-j7pv25f6]{font-size:.8em;font-weight:700;background:rgba(var(--accent-light),12%);color:rgb(var(--accent-light));border-radius:4px;padding:.3em .4em}.instructions[data-astro-cid-j7pv25f6] strong[data-astro-cid-j7pv25f6]{color:rgb(var(--accent-light))}.link-card-grid[data-astro-cid-j7pv25f6]{display:grid;grid-template-columns:repeat(auto-fit,minmax(24ch,1fr));gap:2rem;padding:0} diff --git a/docs/assets/items/set/dice/dice1.png b/docs/assets/items/set/dice/dice1.png new file mode 100644 index 0000000..597b067 Binary files /dev/null and b/docs/assets/items/set/dice/dice1.png differ diff --git a/docs/assets/items/set/dice/dice2.png b/docs/assets/items/set/dice/dice2.png new file mode 100644 index 0000000..b8d166d Binary files /dev/null and b/docs/assets/items/set/dice/dice2.png differ diff --git a/docs/assets/items/set/dice/dice3.png b/docs/assets/items/set/dice/dice3.png new file mode 100644 index 0000000..eef1ff4 Binary files /dev/null and b/docs/assets/items/set/dice/dice3.png differ diff --git a/docs/assets/items/set/dice/dice4.png b/docs/assets/items/set/dice/dice4.png new file mode 100644 index 0000000..b772af5 Binary files /dev/null and b/docs/assets/items/set/dice/dice4.png differ diff --git a/docs/assets/items/set/dice/dice5.png b/docs/assets/items/set/dice/dice5.png new file mode 100644 index 0000000..963a95b Binary files /dev/null and b/docs/assets/items/set/dice/dice5.png differ diff --git a/docs/assets/items/set/dice/dice6.png b/docs/assets/items/set/dice/dice6.png new file mode 100644 index 0000000..dfcce35 Binary files /dev/null and b/docs/assets/items/set/dice/dice6.png differ diff --git a/docs/index.html b/docs/index.html index f195a88..0a08894 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,4 +1,4 @@ - Welcome to CryptoThrone. + Welcome to CryptoThrone.