From 3aa911bd9b823454e01b0d93fc68d5d1ddebec17 Mon Sep 17 00:00:00 2001 From: h0lybyte <5599058+h0lybyte@users.noreply.github.com> Date: Fri, 15 Mar 2024 18:54:03 +0000 Subject: [PATCH] Merge pull request #977 from KBVE/beta Preparing Release Branch --- docs/application/index.html | 2 +- docs/application/pocketbase/index.html | 2 +- docs/arcade/fishchip/index.html | 274 +- docs/arcade/travelbox/index.html | 153 + docs/data/outpost/nx/report.mdx | 2 +- docs/embed/js/fishchip/favicon.ico | Bin 0 -> 15086 bytes docs/embed/js/fishchip/fish-chip.js | 6454 ++++++++++++++++++++++++ docs/embed/js/fishchip/index.html | 15 + docs/embed/js/travelbox/favicon.ico | Bin 0 -> 15086 bytes docs/embed/js/travelbox/index.html | 16 + docs/embed/js/travelbox/travelbox.js | 470 ++ docs/journal/03-14/index.html | 2 +- docs/journal/03-15/index.html | 44 +- docs/sitemap-0.xml | 2 +- 14 files changed, 7169 insertions(+), 267 deletions(-) create mode 100644 docs/arcade/travelbox/index.html create mode 100644 docs/embed/js/fishchip/favicon.ico create mode 100644 docs/embed/js/fishchip/fish-chip.js create mode 100644 docs/embed/js/fishchip/index.html create mode 100644 docs/embed/js/travelbox/favicon.ico create mode 100644 docs/embed/js/travelbox/index.html create mode 100644 docs/embed/js/travelbox/travelbox.js diff --git a/docs/application/index.html b/docs/application/index.html index 90ef5aec0d..f1d6b89ad2 100644 --- a/docs/application/index.html +++ b/docs/application/index.html @@ -148,6 +148,6 @@ mode="normal" src="/assets/lottie/menu.lottie" > - -->

+

-->

KBVE Copyright ©




\ No newline at end of file diff --git a/docs/application/pocketbase/index.html b/docs/application/pocketbase/index.html index 4dee6ce994..af756d010d 100644 --- a/docs/application/pocketbase/index.html +++ b/docs/application/pocketbase/index.html @@ -148,7 +148,7 @@ mode="normal" src="/assets/lottie/menu.lottie" > - -->
Application

Pocketbase

Pocketbase Database

KBVE Team

Feb 30th, 2024

Information

+
-->
Application

Pocketbase

Pocketbase Database

KBVE Team

Feb 30th, 2024

Information


Install

Do you want to get Pocketbase up and running?

Docker

There are two ways you can go about setting up Pocketbase via Docker! We recommand using a docker compose, like this one below from their github.

Compose


diff --git a/docs/arcade/fishchip/index.html b/docs/arcade/fishchip/index.html
index ba4b01a81f..11dffb10ad 100644
--- a/docs/arcade/fishchip/index.html
+++ b/docs/arcade/fishchip/index.html
@@ -61,39 +61,39 @@
 
 
 
+
+ 

+KBVE Copyright © +




\ No newline at end of file diff --git a/docs/data/outpost/nx/report.mdx b/docs/data/outpost/nx/report.mdx index 5eec0551c2..3216d360bb 100644 --- a/docs/data/outpost/nx/report.mdx +++ b/docs/data/outpost/nx/report.mdx @@ -44,5 +44,5 @@ Community plugins: ``` ``` -'Report Timestamp: 1710484281' +'Report Timestamp: 1710528804' ``` diff --git a/docs/embed/js/fishchip/favicon.ico b/docs/embed/js/fishchip/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..317ebcb2336e0833a22dddf0ab287849f26fda57 GIT binary patch literal 15086 zcmeI332;U^%p|z7g|#(P)qFEA@4f!_@qOK2 z_lJl}!lhL!VT_U|uN7%8B2iKH??xhDa;*`g{yjTFWHvXn;2s{4R7kH|pKGdy(7z!K zgftM+Ku7~24TLlh(!g)gz|foI94G^t2^IO$uvX$3(OR0<_5L2sB)lMAMy|+`xodJ{ z_Uh_1m)~h?a;2W{dmhM;u!YGo=)OdmId_B<%^V^{ovI@y`7^g1_V9G}*f# zNzAtvou}I!W1#{M^@ROc(BZ! z+F!!_aR&Px3_reO(EW+TwlW~tv*2zr?iP7(d~a~yA|@*a89IUke+c472NXM0wiX{- zl`UrZC^1XYyf%1u)-Y)jj9;MZ!SLfd2Hl?o|80Su%Z?To_=^g_Jt0oa#CT*tjx>BI z16wec&AOWNK<#i0Qd=1O$fymLRoUR*%;h@*@v7}wApDl^w*h}!sYq%kw+DKDY)@&A z@9$ULEB3qkR#85`lb8#WZw=@})#kQig9oqy^I$dj&k4jU&^2(M3q{n1AKeGUKPFbr z1^<)aH;VsG@J|B&l>UtU#Ejv3GIqERzYgL@UOAWtW<{p#zy`WyJgpCy8$c_e%wYJL zyGHRRx38)HyjU3y{-4z6)pzb>&Q1pR)B&u01F-|&Gx4EZWK$nkUkOI|(D4UHOXg_- zw{OBf!oWQUn)Pe(=f=nt=zkmdjpO^o8ZZ9o_|4tW1ni+Un9iCW47*-ut$KQOww!;u z`0q)$s6IZO!~9$e_P9X!hqLxu`fpcL|2f^I5d4*a@Dq28;@2271v_N+5HqYZ>x;&O z05*7JT)mUe&%S0@UD)@&8SmQrMtsDfZT;fkdA!r(S=}Oz>iP)w=W508=Rc#nNn7ym z1;42c|8($ALY8#a({%1#IXbWn9-Y|0eDY$_L&j{63?{?AH{);EzcqfydD$@-B`Y3<%IIj7S7rK_N}je^=dEk%JQ4c z!tBdTPE3Tse;oYF>cnrapWq*o)m47X1`~6@(!Y29#>-#8zm&LXrXa(3=7Z)ElaQqj z-#0JJy3Fi(C#Rx(`=VXtJ63E2_bZGCz+QRa{W0e2(m3sI?LOcUBx)~^YCqZ{XEPX)C>G>U4tfqeH8L(3|pQR*zbL1 zT9e~4Tb5p9_G}$y4t`i*4t_Mr9QYvL9C&Ah*}t`q*}S+VYh0M6GxTTSXI)hMpMpIq zD1ImYqJLzbj0}~EpE-aH#VCH_udYEW#`P2zYmi&xSPs_{n6tBj=MY|-XrA;SGA_>y zGtU$?HXm$gYj*!N)_nQ59%lQdXtQZS3*#PC-{iB_sm+ytD*7j`D*k(P&IH2GHT}Eh z5697eQECVIGQAUe#eU2I!yI&%0CP#>%6MWV z@zS!p@+Y1i1b^QuuEF*13CuB zu69dve5k7&Wgb+^s|UB08Dr3u`h@yM0NTj4h7MnHo-4@xmyr7(*4$rpPwsCDZ@2be zRz9V^GnV;;?^Lk%ynzq&K(Aix`mWmW`^152Hoy$CTYVehpD-S1-W^#k#{0^L`V6CN+E z!w+xte;2vu4AmVNEFUOBmrBL>6MK@!O2*N|2=d|Y;oN&A&qv=qKn73lDD zI(+oJAdgv>Yr}8(&@ZuAZE%XUXmX(U!N+Z_sjL<1vjy1R+1IeHt`79fnYdOL{$ci7 z%3f0A*;Zt@ED&Gjm|OFTYBDe%bbo*xXAQsFz+Q`fVBH!N2)kaxN8P$c>sp~QXnv>b zwq=W3&Mtmih7xkR$YA)1Yi?avHNR6C99!u6fh=cL|KQ&PwF!n@ud^n(HNIImHD!h87!i*t?G|p0o+eelJ?B@A64_9%SBhNaJ64EvKgD&%LjLCYnNfc; znj?%*p@*?dq#NqcQFmmX($wms@CSAr9#>hUR^=I+=0B)vvGX%T&#h$kmX*s=^M2E!@N9#m?LhMvz}YB+kd zG~mbP|D(;{s_#;hsKK9lbVK&Lo734x7SIFJ9V_}2$@q?zm^7?*XH94w5Qae{7zOMUF z^?%F%)c1Y)Q?Iy?I>knw*8gYW#ok|2gdS=YYZLiD=CW|Nj;n^x!=S#iJ#`~Ld79+xXpVmUK^B(xO_vO!btA9y7w3L3-0j-y4 z?M-V{%z;JI`bk7yFDcP}OcCd*{Q9S5$iGA7*E1@tfkyjAi!;wP^O71cZ^Ep)qrQ)N z#wqw0_HS;T7x3y|`P==i3hEwK%|>fZ)c&@kgKO1~5<5xBSk?iZV?KI6&i72H6S9A* z=U(*e)EqEs?Oc04)V-~K5AUmh|62H4*`UAtItO$O(q5?6jj+K^oD!04r=6#dsxp?~}{`?&sXn#q2 zGuY~7>O2=!u@@Kfu7q=W*4egu@qPMRM>(eyYyaIE<|j%d=iWNdGsx%c!902v#ngNg z@#U-O_4xN$s_9?(`{>{>7~-6FgWpBpqXb`Ydc3OFL#&I}Irse9F_8R@4zSS*Y*o*B zXL?6*Aw!AfkNCgcr#*yj&p3ZDe2y>v$>FUdKIy_2N~}6AbHc7gA3`6$g@1o|dE>vz z4pl(j9;kyMsjaw}lO?(?Xg%4k!5%^t#@5n=WVc&JRa+XT$~#@rldvN3S1rEpU$;XgxVny7mki3 z-Hh|jUCHrUXuLr!)`w>wgO0N%KTB-1di>cj(x3Bav`7v z3G7EIbU$z>`Nad7Rk_&OT-W{;qg)-GXV-aJT#(ozdmnA~Rq3GQ_3mby(>q6Ocb-RgTUhTN)))x>m&eD;$J5Bg zo&DhY36Yg=J=$Z>t}RJ>o|@hAcwWzN#r(WJ52^g$lh^!63@hh+dR$&_dEGu&^CR*< z!oFqSqO@>xZ*nC2oiOd0eS*F^IL~W-rsrO`J`ej{=ou_q^_(<$&-3f^J z&L^MSYWIe{&pYq&9eGaArA~*kAg in f?v4(f,g,{enumerable:!0,configurable:!0,writable:!0,value:y}):f[g]=y;var In=(f,g,y)=>(p4(f,typeof g!="symbol"?g+"":g,y),y);(function(){const g=document.createElement("link").relList;if(g&&g.supports&&g.supports("modulepreload"))return;for(const w of document.querySelectorAll('link[rel="modulepreload"]'))E(w);new MutationObserver(w=>{for(const R of w)if(R.type==="childList")for(const d of R.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&E(d)}).observe(document,{childList:!0,subtree:!0});function y(w){const R={};return w.integrity&&(R.integrity=w.integrity),w.referrerPolicy&&(R.referrerPolicy=w.referrerPolicy),w.crossOrigin==="use-credentials"?R.credentials="include":w.crossOrigin==="anonymous"?R.credentials="omit":R.credentials="same-origin",R}function E(w){if(w.ep)return;w.ep=!0;const R=y(w);fetch(w.href,R)}})();var g4=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ta(f){return f&&f.__esModule&&Object.prototype.hasOwnProperty.call(f,"default")?f.default:f}var ey={exports:{}},Rl={},iy={exports:{}},Kt={};/** + * @license React + * react.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 mo=Symbol.for("react.element"),m4=Symbol.for("react.portal"),y4=Symbol.for("react.fragment"),x4=Symbol.for("react.strict_mode"),T4=Symbol.for("react.profiler"),S4=Symbol.for("react.provider"),C4=Symbol.for("react.context"),E4=Symbol.for("react.forward_ref"),P4=Symbol.for("react.suspense"),A4=Symbol.for("react.memo"),w4=Symbol.for("react.lazy"),fg=Symbol.iterator;function M4(f){return f===null||typeof f!="object"?null:(f=fg&&f[fg]||f["@@iterator"],typeof f=="function"?f:null)}var ny={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ry=Object.assign,sy={};function ea(f,g,y){this.props=f,this.context=g,this.refs=sy,this.updater=y||ny}ea.prototype.isReactComponent={};ea.prototype.setState=function(f,g){if(typeof f!="object"&&typeof f!="function"&&f!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,f,g,"setState")};ea.prototype.forceUpdate=function(f){this.updater.enqueueForceUpdate(this,f,"forceUpdate")};function ay(){}ay.prototype=ea.prototype;function Tc(f,g,y){this.props=f,this.context=g,this.refs=sy,this.updater=y||ny}var Sc=Tc.prototype=new ay;Sc.constructor=Tc;ry(Sc,ea.prototype);Sc.isPureReactComponent=!0;var dg=Array.isArray,oy=Object.prototype.hasOwnProperty,Cc={current:null},hy={key:!0,ref:!0,__self:!0,__source:!0};function ly(f,g,y){var E,w={},R=null,d=null;if(g!=null)for(E in g.ref!==void 0&&(d=g.ref),g.key!==void 0&&(R=""+g.key),g)oy.call(g,E)&&!hy.hasOwnProperty(E)&&(w[E]=g[E]);var x=arguments.length-2;if(x===1)w.children=y;else if(1>>1,Z=z[K];if(0>>1;Kw(N,Y))Uw(X,N)?(z[K]=X,z[U]=Y,K=U):(z[K]=N,z[H]=Y,K=H);else if(Uw(X,Y))z[K]=X,z[U]=Y,K=U;else break t}}return W}function w(z,W){var Y=z.sortIndex-W.sortIndex;return Y!==0?Y:z.id-W.id}if(typeof performance=="object"&&typeof performance.now=="function"){var R=performance;f.unstable_now=function(){return R.now()}}else{var d=Date,x=d.now();f.unstable_now=function(){return d.now()-x}}var t=[],a=[],p=1,o=null,s=3,r=!1,e=!1,n=!1,l=typeof setTimeout=="function"?setTimeout:null,i=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function u(z){for(var W=y(a);W!==null;){if(W.callback===null)E(a);else if(W.startTime<=z)E(a),W.sortIndex=W.expirationTime,g(t,W);else break;W=y(a)}}function c(z){if(n=!1,u(z),!e)if(y(t)!==null)e=!0,B(v);else{var W=y(a);W!==null&&G(c,W.startTime-z)}}function v(z,W){e=!1,n&&(n=!1,i(C),C=-1),r=!0;var Y=s;try{for(u(W),o=y(t);o!==null&&(!(o.expirationTime>W)||z&&!A());){var K=o.callback;if(typeof K=="function"){o.callback=null,s=o.priorityLevel;var Z=K(o.expirationTime<=W);W=f.unstable_now(),typeof Z=="function"?o.callback=Z:o===y(t)&&E(t),u(W)}else E(t);o=y(t)}if(o!==null)var V=!0;else{var H=y(a);H!==null&&G(c,H.startTime-W),V=!1}return V}finally{o=null,s=Y,r=!1}}var m=!1,T=null,C=-1,S=5,P=-1;function A(){return!(f.unstable_now()-Pz||125K?(z.sortIndex=Y,g(a,z),y(t)===null&&z===y(a)&&(n?(i(C),C=-1):n=!0,G(c,Y-K))):(z.sortIndex=Z,g(t,z),e||r||(e=!0,B(v))),z},f.unstable_shouldYield=A,f.unstable_wrapCallback=function(z){var W=s;return function(){var Y=s;s=W;try{return z.apply(this,arguments)}finally{s=Y}}}})(cy);dy.exports=cy;var U4=dy.exports;/** + * @license React + * react-dom.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 vy=Ei,Pi=U4;function xt(f){for(var g="https://reactjs.org/docs/error-decoder.html?invariant="+f,y=1;y"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ld=Object.prototype.hasOwnProperty,b4=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,vg={},pg={};function V4(f){return ld.call(pg,f)?!0:ld.call(vg,f)?!1:b4.test(f)?pg[f]=!0:(vg[f]=!0,!1)}function W4(f,g,y,E){if(y!==null&&y.type===0)return!1;switch(typeof g){case"function":case"symbol":return!0;case"boolean":return E?!1:y!==null?!y.acceptsBooleans:(f=f.toLowerCase().slice(0,5),f!=="data-"&&f!=="aria-");default:return!1}}function X4(f,g,y,E){if(g===null||typeof g>"u"||W4(f,g,y,E))return!0;if(E)return!1;if(y!==null)switch(y.type){case 3:return!g;case 4:return g===!1;case 5:return isNaN(g);case 6:return isNaN(g)||1>g}return!1}function ni(f,g,y,E,w,R,d){this.acceptsBooleans=g===2||g===3||g===4,this.attributeName=E,this.attributeNamespace=w,this.mustUseProperty=y,this.propertyName=f,this.type=g,this.sanitizeURL=R,this.removeEmptyString=d}var Xe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(f){Xe[f]=new ni(f,0,!1,f,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(f){var g=f[0];Xe[g]=new ni(g,1,!1,f[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(f){Xe[f]=new ni(f,2,!1,f.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(f){Xe[f]=new ni(f,2,!1,f,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(f){Xe[f]=new ni(f,3,!1,f.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(f){Xe[f]=new ni(f,3,!0,f,null,!1,!1)});["capture","download"].forEach(function(f){Xe[f]=new ni(f,4,!1,f,null,!1,!1)});["cols","rows","size","span"].forEach(function(f){Xe[f]=new ni(f,6,!1,f,null,!1,!1)});["rowSpan","start"].forEach(function(f){Xe[f]=new ni(f,5,!1,f.toLowerCase(),null,!1,!1)});var Pc=/[\-:]([a-z])/g;function Ac(f){return f[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(f){var g=f.replace(Pc,Ac);Xe[g]=new ni(g,1,!1,f,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(f){var g=f.replace(Pc,Ac);Xe[g]=new ni(g,1,!1,f,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(f){var g=f.replace(Pc,Ac);Xe[g]=new ni(g,1,!1,f,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(f){Xe[f]=new ni(f,1,!1,f.toLowerCase(),null,!1,!1)});Xe.xlinkHref=new ni("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(f){Xe[f]=new ni(f,1,!1,f.toLowerCase(),null,!0,!0)});function wc(f,g,y,E){var w=Xe.hasOwnProperty(g)?Xe[g]:null;(w!==null?w.type!==0:E||!(2x||w[d]!==R[x]){var t=` +`+w[d].replace(" at new "," at ");return f.displayName&&t.includes("")&&(t=t.replace("",f.displayName)),t}while(1<=d&&0<=x);break}}}finally{Rf=!1,Error.prepareStackTrace=y}return(f=f?f.displayName||f.name:"")?Da(f):""}function Y4(f){switch(f.tag){case 5:return Da(f.type);case 16:return Da("Lazy");case 13:return Da("Suspense");case 19:return Da("SuspenseList");case 0:case 2:case 15:return f=Lf(f.type,!1),f;case 11:return f=Lf(f.type.render,!1),f;case 1:return f=Lf(f.type,!0),f;default:return""}}function cd(f){if(f==null)return null;if(typeof f=="function")return f.displayName||f.name||null;if(typeof f=="string")return f;switch(f){case Ts:return"Fragment";case xs:return"Portal";case ud:return"Profiler";case Mc:return"StrictMode";case fd:return"Suspense";case dd:return"SuspenseList"}if(typeof f=="object")switch(f.$$typeof){case my:return(f.displayName||"Context")+".Consumer";case gy:return(f._context.displayName||"Context")+".Provider";case Rc:var g=f.render;return f=f.displayName,f||(f=g.displayName||g.name||"",f=f!==""?"ForwardRef("+f+")":"ForwardRef"),f;case Lc:return g=f.displayName||null,g!==null?g:cd(f.type)||"Memo";case ir:g=f._payload,f=f._init;try{return cd(f(g))}catch{}}return null}function H4(f){var g=f.type;switch(f.tag){case 24:return"Cache";case 9:return(g.displayName||"Context")+".Consumer";case 10:return(g._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return f=g.render,f=f.displayName||f.name||"",g.displayName||(f!==""?"ForwardRef("+f+")":"ForwardRef");case 7:return"Fragment";case 5:return g;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return cd(g);case 8:return g===Mc?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof g=="function")return g.displayName||g.name||null;if(typeof g=="string")return g}return null}function xr(f){switch(typeof f){case"boolean":case"number":case"string":case"undefined":return f;case"object":return f;default:return""}}function xy(f){var g=f.type;return(f=f.nodeName)&&f.toLowerCase()==="input"&&(g==="checkbox"||g==="radio")}function $4(f){var g=xy(f)?"checked":"value",y=Object.getOwnPropertyDescriptor(f.constructor.prototype,g),E=""+f[g];if(!f.hasOwnProperty(g)&&typeof y<"u"&&typeof y.get=="function"&&typeof y.set=="function"){var w=y.get,R=y.set;return Object.defineProperty(f,g,{configurable:!0,get:function(){return w.call(this)},set:function(d){E=""+d,R.call(this,d)}}),Object.defineProperty(f,g,{enumerable:y.enumerable}),{getValue:function(){return E},setValue:function(d){E=""+d},stopTracking:function(){f._valueTracker=null,delete f[g]}}}}function vh(f){f._valueTracker||(f._valueTracker=$4(f))}function Ty(f){if(!f)return!1;var g=f._valueTracker;if(!g)return!0;var y=g.getValue(),E="";return f&&(E=xy(f)?f.checked?"true":"false":f.value),f=E,f!==y?(g.setValue(f),!0):!1}function tl(f){if(f=f||(typeof document<"u"?document:void 0),typeof f>"u")return null;try{return f.activeElement||f.body}catch{return f.body}}function vd(f,g){var y=g.checked;return me({},g,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:y??f._wrapperState.initialChecked})}function mg(f,g){var y=g.defaultValue==null?"":g.defaultValue,E=g.checked!=null?g.checked:g.defaultChecked;y=xr(g.value!=null?g.value:y),f._wrapperState={initialChecked:E,initialValue:y,controlled:g.type==="checkbox"||g.type==="radio"?g.checked!=null:g.value!=null}}function Sy(f,g){g=g.checked,g!=null&&wc(f,"checked",g,!1)}function pd(f,g){Sy(f,g);var y=xr(g.value),E=g.type;if(y!=null)E==="number"?(y===0&&f.value===""||f.value!=y)&&(f.value=""+y):f.value!==""+y&&(f.value=""+y);else if(E==="submit"||E==="reset"){f.removeAttribute("value");return}g.hasOwnProperty("value")?gd(f,g.type,y):g.hasOwnProperty("defaultValue")&&gd(f,g.type,xr(g.defaultValue)),g.checked==null&&g.defaultChecked!=null&&(f.defaultChecked=!!g.defaultChecked)}function yg(f,g,y){if(g.hasOwnProperty("value")||g.hasOwnProperty("defaultValue")){var E=g.type;if(!(E!=="submit"&&E!=="reset"||g.value!==void 0&&g.value!==null))return;g=""+f._wrapperState.initialValue,y||g===f.value||(f.value=g),f.defaultValue=g}y=f.name,y!==""&&(f.name=""),f.defaultChecked=!!f._wrapperState.initialChecked,y!==""&&(f.name=y)}function gd(f,g,y){(g!=="number"||tl(f.ownerDocument)!==f)&&(y==null?f.defaultValue=""+f._wrapperState.initialValue:f.defaultValue!==""+y&&(f.defaultValue=""+y))}var Ia=Array.isArray;function Is(f,g,y,E){if(f=f.options,g){g={};for(var w=0;w"+g.valueOf().toString()+"",g=ph.firstChild;f.firstChild;)f.removeChild(f.firstChild);for(;g.firstChild;)f.appendChild(g.firstChild)}});function Ja(f,g){if(g){var y=f.firstChild;if(y&&y===f.lastChild&&y.nodeType===3){y.nodeValue=g;return}}f.textContent=g}var za={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},K4=["Webkit","ms","Moz","O"];Object.keys(za).forEach(function(f){K4.forEach(function(g){g=g+f.charAt(0).toUpperCase()+f.substring(1),za[g]=za[f]})});function Ay(f,g,y){return g==null||typeof g=="boolean"||g===""?"":y||typeof g!="number"||g===0||za.hasOwnProperty(f)&&za[f]?(""+g).trim():g+"px"}function wy(f,g){f=f.style;for(var y in g)if(g.hasOwnProperty(y)){var E=y.indexOf("--")===0,w=Ay(y,g[y],E);y==="float"&&(y="cssFloat"),E?f.setProperty(y,w):f[y]=w}}var j4=me({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function xd(f,g){if(g){if(j4[f]&&(g.children!=null||g.dangerouslySetInnerHTML!=null))throw Error(xt(137,f));if(g.dangerouslySetInnerHTML!=null){if(g.children!=null)throw Error(xt(60));if(typeof g.dangerouslySetInnerHTML!="object"||!("__html"in g.dangerouslySetInnerHTML))throw Error(xt(61))}if(g.style!=null&&typeof g.style!="object")throw Error(xt(62))}}function Td(f,g){if(f.indexOf("-")===-1)return typeof g.is=="string";switch(f){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Sd=null;function Fc(f){return f=f.target||f.srcElement||window,f.correspondingUseElement&&(f=f.correspondingUseElement),f.nodeType===3?f.parentNode:f}var Cd=null,Bs=null,Ns=null;function Sg(f){if(f=To(f)){if(typeof Cd!="function")throw Error(xt(280));var g=f.stateNode;g&&(g=Il(g),Cd(f.stateNode,f.type,g))}}function My(f){Bs?Ns?Ns.push(f):Ns=[f]:Bs=f}function Ry(){if(Bs){var f=Bs,g=Ns;if(Ns=Bs=null,Sg(f),g)for(f=0;f>>=0,f===0?32:31-(rw(f)/sw|0)|0}var gh=64,mh=4194304;function Ba(f){switch(f&-f){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 f&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return f&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return f}}function rl(f,g){var y=f.pendingLanes;if(y===0)return 0;var E=0,w=f.suspendedLanes,R=f.pingedLanes,d=y&268435455;if(d!==0){var x=d&~w;x!==0?E=Ba(x):(R&=d,R!==0&&(E=Ba(R)))}else d=y&~w,d!==0?E=Ba(d):R!==0&&(E=Ba(R));if(E===0)return 0;if(g!==0&&g!==E&&!(g&w)&&(w=E&-E,R=g&-g,w>=R||w===16&&(R&4194240)!==0))return g;if(E&4&&(E|=y&16),g=f.entangledLanes,g!==0)for(f=f.entanglements,g&=E;0y;y++)g.push(f);return g}function yo(f,g,y){f.pendingLanes|=g,g!==536870912&&(f.suspendedLanes=0,f.pingedLanes=0),f=f.eventTimes,g=31-on(g),f[g]=y}function lw(f,g){var y=f.pendingLanes&~g;f.pendingLanes=g,f.suspendedLanes=0,f.pingedLanes=0,f.expiredLanes&=g,f.mutableReadLanes&=g,f.entangledLanes&=g,g=f.entanglements;var E=f.eventTimes;for(f=f.expirationTimes;0=ba),Fg=String.fromCharCode(32),Og=!1;function Zy(f,g){switch(f){case"keyup":return zw.indexOf(g.keyCode)!==-1;case"keydown":return g.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ky(f){return f=f.detail,typeof f=="object"&&"data"in f?f.data:null}var Ss=!1;function bw(f,g){switch(f){case"compositionend":return ky(g);case"keypress":return g.which!==32?null:(Og=!0,Fg);case"textInput":return f=g.data,f===Fg&&Og?null:f;default:return null}}function Vw(f,g){if(Ss)return f==="compositionend"||!Uc&&Zy(f,g)?(f=Ky(),bh=Nc=ar=null,Ss=!1,f):null;switch(f){case"paste":return null;case"keypress":if(!(g.ctrlKey||g.altKey||g.metaKey)||g.ctrlKey&&g.altKey){if(g.char&&1=g)return{node:y,offset:g-f};f=E}t:{for(;y;){if(y.nextSibling){y=y.nextSibling;break t}y=y.parentNode}y=void 0}y=Ng(y)}}function _y(f,g){return f&&g?f===g?!0:f&&f.nodeType===3?!1:g&&g.nodeType===3?_y(f,g.parentNode):"contains"in f?f.contains(g):f.compareDocumentPosition?!!(f.compareDocumentPosition(g)&16):!1:!1}function t1(){for(var f=window,g=tl();g instanceof f.HTMLIFrameElement;){try{var y=typeof g.contentWindow.location.href=="string"}catch{y=!1}if(y)f=g.contentWindow;else break;g=tl(f.document)}return g}function bc(f){var g=f&&f.nodeName&&f.nodeName.toLowerCase();return g&&(g==="input"&&(f.type==="text"||f.type==="search"||f.type==="tel"||f.type==="url"||f.type==="password")||g==="textarea"||f.contentEditable==="true")}function kw(f){var g=t1(),y=f.focusedElem,E=f.selectionRange;if(g!==y&&y&&y.ownerDocument&&_y(y.ownerDocument.documentElement,y)){if(E!==null&&bc(y)){if(g=E.start,f=E.end,f===void 0&&(f=g),"selectionStart"in y)y.selectionStart=g,y.selectionEnd=Math.min(f,y.value.length);else if(f=(g=y.ownerDocument||document)&&g.defaultView||window,f.getSelection){f=f.getSelection();var w=y.textContent.length,R=Math.min(E.start,w);E=E.end===void 0?R:Math.min(E.end,w),!f.extend&&R>E&&(w=E,E=R,R=w),w=Gg(y,R);var d=Gg(y,E);w&&d&&(f.rangeCount!==1||f.anchorNode!==w.node||f.anchorOffset!==w.offset||f.focusNode!==d.node||f.focusOffset!==d.offset)&&(g=g.createRange(),g.setStart(w.node,w.offset),f.removeAllRanges(),R>E?(f.addRange(g),f.extend(d.node,d.offset)):(g.setEnd(d.node,d.offset),f.addRange(g)))}}for(g=[],f=y;f=f.parentNode;)f.nodeType===1&&g.push({element:f,left:f.scrollLeft,top:f.scrollTop});for(typeof y.focus=="function"&&y.focus(),y=0;y=document.documentMode,Cs=null,Rd=null,Wa=null,Ld=!1;function zg(f,g,y){var E=y.window===y?y.document:y.nodeType===9?y:y.ownerDocument;Ld||Cs==null||Cs!==tl(E)||(E=Cs,"selectionStart"in E&&bc(E)?E={start:E.selectionStart,end:E.selectionEnd}:(E=(E.ownerDocument&&E.ownerDocument.defaultView||window).getSelection(),E={anchorNode:E.anchorNode,anchorOffset:E.anchorOffset,focusNode:E.focusNode,focusOffset:E.focusOffset}),Wa&&no(Wa,E)||(Wa=E,E=ol(Rd,"onSelect"),0As||(f.current=Nd[As],Nd[As]=null,As--)}function se(f,g){As++,Nd[As]=f.current,f.current=g}var Tr={},ke=Pr(Tr),ui=Pr(!1),Kr=Tr;function Hs(f,g){var y=f.type.contextTypes;if(!y)return Tr;var E=f.stateNode;if(E&&E.__reactInternalMemoizedUnmaskedChildContext===g)return E.__reactInternalMemoizedMaskedChildContext;var w={},R;for(R in y)w[R]=g[R];return E&&(f=f.stateNode,f.__reactInternalMemoizedUnmaskedChildContext=g,f.__reactInternalMemoizedMaskedChildContext=w),w}function fi(f){return f=f.childContextTypes,f!=null}function ll(){le(ui),le(ke)}function Hg(f,g,y){if(ke.current!==Tr)throw Error(xt(168));se(ke,g),se(ui,y)}function l1(f,g,y){var E=f.stateNode;if(g=g.childContextTypes,typeof E.getChildContext!="function")return y;E=E.getChildContext();for(var w in E)if(!(w in g))throw Error(xt(108,H4(f)||"Unknown",w));return me({},y,E)}function ul(f){return f=(f=f.stateNode)&&f.__reactInternalMemoizedMergedChildContext||Tr,Kr=ke.current,se(ke,f),se(ui,ui.current),!0}function $g(f,g,y){var E=f.stateNode;if(!E)throw Error(xt(169));y?(f=l1(f,g,Kr),E.__reactInternalMemoizedMergedChildContext=f,le(ui),le(ke),se(ke,f)):le(ui),se(ui,y)}var Nn=null,Bl=!1,Yf=!1;function u1(f){Nn===null?Nn=[f]:Nn.push(f)}function oM(f){Bl=!0,u1(f)}function Ar(){if(!Yf&&Nn!==null){Yf=!0;var f=0,g=te;try{var y=Nn;for(te=1;f>=d,w-=d,Gn=1<<32-on(g)+w|y<C?(S=T,T=null):S=T.sibling;var P=s(i,T,u[C],c);if(P===null){T===null&&(T=S);break}f&&T&&P.alternate===null&&g(i,T),h=R(P,h,C),m===null?v=P:m.sibling=P,m=P,T=S}if(C===u.length)return y(i,T),de&&Gr(i,C),v;if(T===null){for(;CC?(S=T,T=null):S=T.sibling;var A=s(i,T,P.value,c);if(A===null){T===null&&(T=S);break}f&&T&&A.alternate===null&&g(i,T),h=R(A,h,C),m===null?v=A:m.sibling=A,m=A,T=S}if(P.done)return y(i,T),de&&Gr(i,C),v;if(T===null){for(;!P.done;C++,P=u.next())P=o(i,P.value,c),P!==null&&(h=R(P,h,C),m===null?v=P:m.sibling=P,m=P);return de&&Gr(i,C),v}for(T=E(i,T);!P.done;C++,P=u.next())P=r(T,i,C,P.value,c),P!==null&&(f&&P.alternate!==null&&T.delete(P.key===null?C:P.key),h=R(P,h,C),m===null?v=P:m.sibling=P,m=P);return f&&T.forEach(function(L){return g(i,L)}),de&&Gr(i,C),v}function l(i,h,u,c){if(typeof u=="object"&&u!==null&&u.type===Ts&&u.key===null&&(u=u.props.children),typeof u=="object"&&u!==null){switch(u.$$typeof){case ch:t:{for(var v=u.key,m=h;m!==null;){if(m.key===v){if(v=u.type,v===Ts){if(m.tag===7){y(i,m.sibling),h=w(m,u.props.children),h.return=i,i=h;break t}}else if(m.elementType===v||typeof v=="object"&&v!==null&&v.$$typeof===ir&&qg(v)===m.type){y(i,m.sibling),h=w(m,u.props),h.ref=Aa(i,m,u),h.return=i,i=h;break t}y(i,m);break}else g(i,m);m=m.sibling}u.type===Ts?(h=$r(u.props.children,i.mode,c,u.key),h.return=i,i=h):(c=jh(u.type,u.key,u.props,null,i.mode,c),c.ref=Aa(i,h,u),c.return=i,i=c)}return d(i);case xs:t:{for(m=u.key;h!==null;){if(h.key===m)if(h.tag===4&&h.stateNode.containerInfo===u.containerInfo&&h.stateNode.implementation===u.implementation){y(i,h.sibling),h=w(h,u.children||[]),h.return=i,i=h;break t}else{y(i,h);break}else g(i,h);h=h.sibling}h=Jf(u,i.mode,c),h.return=i,i=h}return d(i);case ir:return m=u._init,l(i,h,m(u._payload),c)}if(Ia(u))return e(i,h,u,c);if(Ta(u))return n(i,h,u,c);Ph(i,u)}return typeof u=="string"&&u!==""||typeof u=="number"?(u=""+u,h!==null&&h.tag===6?(y(i,h.sibling),h=w(h,u),h.return=i,i=h):(y(i,h),h=Qf(u,i.mode,c),h.return=i,i=h),d(i)):y(i,h)}return l}var Ks=y1(!0),x1=y1(!1),So={},Tn=Pr(So),oo=Pr(So),ho=Pr(So);function Yr(f){if(f===So)throw Error(xt(174));return f}function Zc(f,g){switch(se(ho,g),se(oo,f),se(Tn,So),f=g.nodeType,f){case 9:case 11:g=(g=g.documentElement)?g.namespaceURI:yd(null,"");break;default:f=f===8?g.parentNode:g,g=f.namespaceURI||null,f=f.tagName,g=yd(g,f)}le(Tn),se(Tn,g)}function js(){le(Tn),le(oo),le(ho)}function T1(f){Yr(ho.current);var g=Yr(Tn.current),y=yd(g,f.type);g!==y&&(se(oo,f),se(Tn,y))}function kc(f){oo.current===f&&(le(Tn),le(oo))}var ve=Pr(0);function gl(f){for(var g=f;g!==null;){if(g.tag===13){var y=g.memoizedState;if(y!==null&&(y=y.dehydrated,y===null||y.data==="$?"||y.data==="$!"))return g}else if(g.tag===19&&g.memoizedProps.revealOrder!==void 0){if(g.flags&128)return g}else if(g.child!==null){g.child.return=g,g=g.child;continue}if(g===f)break;for(;g.sibling===null;){if(g.return===null||g.return===f)return null;g=g.return}g.sibling.return=g.return,g=g.sibling}return null}var Hf=[];function Qc(){for(var f=0;fy?y:4,f(!0);var E=$f.transition;$f.transition={};try{f(!1),g()}finally{te=y,$f.transition=E}}function G1(){return Ki().memoizedState}function fM(f,g,y){var E=pr(f);if(y={lane:E,action:y,hasEagerState:!1,eagerState:null,next:null},z1(f))U1(g,y);else if(y=v1(f,g,y,E),y!==null){var w=ei();hn(y,f,E,w),b1(y,g,E)}}function dM(f,g,y){var E=pr(f),w={lane:E,action:y,hasEagerState:!1,eagerState:null,next:null};if(z1(f))U1(g,w);else{var R=f.alternate;if(f.lanes===0&&(R===null||R.lanes===0)&&(R=g.lastRenderedReducer,R!==null))try{var d=g.lastRenderedState,x=R(d,y);if(w.hasEagerState=!0,w.eagerState=x,ln(x,d)){var t=g.interleaved;t===null?(w.next=w,Kc(g)):(w.next=t.next,t.next=w),g.interleaved=w;return}}catch{}finally{}y=v1(f,g,w,E),y!==null&&(w=ei(),hn(y,f,E,w),b1(y,g,E))}}function z1(f){var g=f.alternate;return f===ge||g!==null&&g===ge}function U1(f,g){Xa=ml=!0;var y=f.pending;y===null?g.next=g:(g.next=y.next,y.next=g),f.pending=g}function b1(f,g,y){if(y&4194240){var E=g.lanes;E&=f.pendingLanes,y|=E,g.lanes=y,Dc(f,y)}}var yl={readContext:$i,useCallback:Ke,useContext:Ke,useEffect:Ke,useImperativeHandle:Ke,useInsertionEffect:Ke,useLayoutEffect:Ke,useMemo:Ke,useReducer:Ke,useRef:Ke,useState:Ke,useDebugValue:Ke,useDeferredValue:Ke,useTransition:Ke,useMutableSource:Ke,useSyncExternalStore:Ke,useId:Ke,unstable_isNewReconciler:!1},cM={readContext:$i,useCallback:function(f,g){return pn().memoizedState=[f,g===void 0?null:g],f},useContext:$i,useEffect:tm,useImperativeHandle:function(f,g,y){return y=y!=null?y.concat([f]):null,Yh(4194308,4,O1.bind(null,g,f),y)},useLayoutEffect:function(f,g){return Yh(4194308,4,f,g)},useInsertionEffect:function(f,g){return Yh(4,2,f,g)},useMemo:function(f,g){var y=pn();return g=g===void 0?null:g,f=f(),y.memoizedState=[f,g],f},useReducer:function(f,g,y){var E=pn();return g=y!==void 0?y(g):g,E.memoizedState=E.baseState=g,f={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:f,lastRenderedState:g},E.queue=f,f=f.dispatch=fM.bind(null,ge,f),[E.memoizedState,f]},useRef:function(f){var g=pn();return f={current:f},g.memoizedState=f},useState:_g,useDebugValue:ev,useDeferredValue:function(f){return pn().memoizedState=f},useTransition:function(){var f=_g(!1),g=f[0];return f=uM.bind(null,f[1]),pn().memoizedState=f,[g,f]},useMutableSource:function(){},useSyncExternalStore:function(f,g,y){var E=ge,w=pn();if(de){if(y===void 0)throw Error(xt(407));y=y()}else{if(y=g(),Ge===null)throw Error(xt(349));Zr&30||E1(E,g,y)}w.memoizedState=y;var R={value:y,getSnapshot:g};return w.queue=R,tm(A1.bind(null,E,R,f),[f]),E.flags|=2048,fo(9,P1.bind(null,E,R,y,g),void 0,null),y},useId:function(){var f=pn(),g=Ge.identifierPrefix;if(de){var y=zn,E=Gn;y=(E&~(1<<32-on(E)-1)).toString(32)+y,g=":"+g+"R"+y,y=lo++,0<\/script>",f=f.removeChild(f.firstChild)):typeof E.is=="string"?f=d.createElement(y,{is:E.is}):(f=d.createElement(y),y==="select"&&(d=f,E.multiple?d.multiple=!0:E.size&&(d.size=E.size))):f=d.createElementNS(f,y),f[mn]=g,f[ao]=E,Z1(f,g,!1,!1),g.stateNode=f;t:{switch(d=Td(y,E),y){case"dialog":he("cancel",f),he("close",f),w=E;break;case"iframe":case"object":case"embed":he("load",f),w=E;break;case"video":case"audio":for(w=0;wks&&(g.flags|=128,E=!0,wa(R,!1),g.lanes=4194304)}else{if(!E)if(f=gl(d),f!==null){if(g.flags|=128,E=!0,y=f.updateQueue,y!==null&&(g.updateQueue=y,g.flags|=4),wa(R,!0),R.tail===null&&R.tailMode==="hidden"&&!d.alternate&&!de)return je(g),null}else 2*Ae()-R.renderingStartTime>ks&&y!==1073741824&&(g.flags|=128,E=!0,wa(R,!1),g.lanes=4194304);R.isBackwards?(d.sibling=g.child,g.child=d):(y=R.last,y!==null?y.sibling=d:g.child=d,R.last=d)}return R.tail!==null?(g=R.tail,R.rendering=g,R.tail=g.sibling,R.renderingStartTime=Ae(),g.sibling=null,y=ve.current,se(ve,E?y&1|2:y&1),g):(je(g),null);case 22:case 23:return ov(),E=g.memoizedState!==null,f!==null&&f.memoizedState!==null!==E&&(g.flags|=8192),E&&g.mode&1?Ti&1073741824&&(je(g),g.subtreeFlags&6&&(g.flags|=8192)):je(g),null;case 24:return null;case 25:return null}throw Error(xt(156,g.tag))}function SM(f,g){switch(Wc(g),g.tag){case 1:return fi(g.type)&&ll(),f=g.flags,f&65536?(g.flags=f&-65537|128,g):null;case 3:return js(),le(ui),le(ke),Qc(),f=g.flags,f&65536&&!(f&128)?(g.flags=f&-65537|128,g):null;case 5:return kc(g),null;case 13:if(le(ve),f=g.memoizedState,f!==null&&f.dehydrated!==null){if(g.alternate===null)throw Error(xt(340));$s()}return f=g.flags,f&65536?(g.flags=f&-65537|128,g):null;case 19:return le(ve),null;case 4:return js(),null;case 10:return $c(g.type._context),null;case 22:case 23:return ov(),null;case 24:return null;default:return null}}var wh=!1,Ze=!1,CM=typeof WeakSet=="function"?WeakSet:Set,Rt=null;function Ls(f,g){var y=f.ref;if(y!==null)if(typeof y=="function")try{y(null)}catch(E){Se(f,g,E)}else y.current=null}function jd(f,g,y){try{y()}catch(E){Se(f,g,E)}}var lm=!1;function EM(f,g){if(Fd=sl,f=t1(),bc(f)){if("selectionStart"in f)var y={start:f.selectionStart,end:f.selectionEnd};else t:{y=(y=f.ownerDocument)&&y.defaultView||window;var E=y.getSelection&&y.getSelection();if(E&&E.rangeCount!==0){y=E.anchorNode;var w=E.anchorOffset,R=E.focusNode;E=E.focusOffset;try{y.nodeType,R.nodeType}catch{y=null;break t}var d=0,x=-1,t=-1,a=0,p=0,o=f,s=null;e:for(;;){for(var r;o!==y||w!==0&&o.nodeType!==3||(x=d+w),o!==R||E!==0&&o.nodeType!==3||(t=d+E),o.nodeType===3&&(d+=o.nodeValue.length),(r=o.firstChild)!==null;)s=o,o=r;for(;;){if(o===f)break e;if(s===y&&++a===w&&(x=d),s===R&&++p===E&&(t=d),(r=o.nextSibling)!==null)break;o=s,s=o.parentNode}o=r}y=x===-1||t===-1?null:{start:x,end:t}}else y=null}y=y||{start:0,end:0}}else y=null;for(Od={focusedElem:f,selectionRange:y},sl=!1,Rt=g;Rt!==null;)if(g=Rt,f=g.child,(g.subtreeFlags&1028)!==0&&f!==null)f.return=g,Rt=f;else for(;Rt!==null;){g=Rt;try{var e=g.alternate;if(g.flags&1024)switch(g.tag){case 0:case 11:case 15:break;case 1:if(e!==null){var n=e.memoizedProps,l=e.memoizedState,i=g.stateNode,h=i.getSnapshotBeforeUpdate(g.elementType===g.type?n:nn(g.type,n),l);i.__reactInternalSnapshotBeforeUpdate=h}break;case 3:var u=g.stateNode.containerInfo;u.nodeType===1?u.textContent="":u.nodeType===9&&u.documentElement&&u.removeChild(u.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(xt(163))}}catch(c){Se(g,g.return,c)}if(f=g.sibling,f!==null){f.return=g.return,Rt=f;break}Rt=g.return}return e=lm,lm=!1,e}function Ya(f,g,y){var E=g.updateQueue;if(E=E!==null?E.lastEffect:null,E!==null){var w=E=E.next;do{if((w.tag&f)===f){var R=w.destroy;w.destroy=void 0,R!==void 0&&jd(g,y,R)}w=w.next}while(w!==E)}}function zl(f,g){if(g=g.updateQueue,g=g!==null?g.lastEffect:null,g!==null){var y=g=g.next;do{if((y.tag&f)===f){var E=y.create;y.destroy=E()}y=y.next}while(y!==g)}}function Zd(f){var g=f.ref;if(g!==null){var y=f.stateNode;switch(f.tag){case 5:f=y;break;default:f=y}typeof g=="function"?g(f):g.current=f}}function J1(f){var g=f.alternate;g!==null&&(f.alternate=null,J1(g)),f.child=null,f.deletions=null,f.sibling=null,f.tag===5&&(g=f.stateNode,g!==null&&(delete g[mn],delete g[ao],delete g[Bd],delete g[sM],delete g[aM])),f.stateNode=null,f.return=null,f.dependencies=null,f.memoizedProps=null,f.memoizedState=null,f.pendingProps=null,f.stateNode=null,f.updateQueue=null}function q1(f){return f.tag===5||f.tag===3||f.tag===4}function um(f){t:for(;;){for(;f.sibling===null;){if(f.return===null||q1(f.return))return null;f=f.return}for(f.sibling.return=f.return,f=f.sibling;f.tag!==5&&f.tag!==6&&f.tag!==18;){if(f.flags&2||f.child===null||f.tag===4)continue t;f.child.return=f,f=f.child}if(!(f.flags&2))return f.stateNode}}function kd(f,g,y){var E=f.tag;if(E===5||E===6)f=f.stateNode,g?y.nodeType===8?y.parentNode.insertBefore(f,g):y.insertBefore(f,g):(y.nodeType===8?(g=y.parentNode,g.insertBefore(f,y)):(g=y,g.appendChild(f)),y=y._reactRootContainer,y!=null||g.onclick!==null||(g.onclick=hl));else if(E!==4&&(f=f.child,f!==null))for(kd(f,g,y),f=f.sibling;f!==null;)kd(f,g,y),f=f.sibling}function Qd(f,g,y){var E=f.tag;if(E===5||E===6)f=f.stateNode,g?y.insertBefore(f,g):y.appendChild(f);else if(E!==4&&(f=f.child,f!==null))for(Qd(f,g,y),f=f.sibling;f!==null;)Qd(f,g,y),f=f.sibling}var Ve=null,rn=!1;function er(f,g,y){for(y=y.child;y!==null;)_1(f,g,y),y=y.sibling}function _1(f,g,y){if(xn&&typeof xn.onCommitFiberUnmount=="function")try{xn.onCommitFiberUnmount(Ll,y)}catch{}switch(y.tag){case 5:Ze||Ls(y,g);case 6:var E=Ve,w=rn;Ve=null,er(f,g,y),Ve=E,rn=w,Ve!==null&&(rn?(f=Ve,y=y.stateNode,f.nodeType===8?f.parentNode.removeChild(y):f.removeChild(y)):Ve.removeChild(y.stateNode));break;case 18:Ve!==null&&(rn?(f=Ve,y=y.stateNode,f.nodeType===8?Xf(f.parentNode,y):f.nodeType===1&&Xf(f,y),eo(f)):Xf(Ve,y.stateNode));break;case 4:E=Ve,w=rn,Ve=y.stateNode.containerInfo,rn=!0,er(f,g,y),Ve=E,rn=w;break;case 0:case 11:case 14:case 15:if(!Ze&&(E=y.updateQueue,E!==null&&(E=E.lastEffect,E!==null))){w=E=E.next;do{var R=w,d=R.destroy;R=R.tag,d!==void 0&&(R&2||R&4)&&jd(y,g,d),w=w.next}while(w!==E)}er(f,g,y);break;case 1:if(!Ze&&(Ls(y,g),E=y.stateNode,typeof E.componentWillUnmount=="function"))try{E.props=y.memoizedProps,E.state=y.memoizedState,E.componentWillUnmount()}catch(x){Se(y,g,x)}er(f,g,y);break;case 21:er(f,g,y);break;case 22:y.mode&1?(Ze=(E=Ze)||y.memoizedState!==null,er(f,g,y),Ze=E):er(f,g,y);break;default:er(f,g,y)}}function fm(f){var g=f.updateQueue;if(g!==null){f.updateQueue=null;var y=f.stateNode;y===null&&(y=f.stateNode=new CM),g.forEach(function(E){var w=DM.bind(null,f,E);y.has(E)||(y.add(E),E.then(w,w))})}}function en(f,g){var y=g.deletions;if(y!==null)for(var E=0;Ew&&(w=d),E&=~R}if(E=w,E=Ae()-E,E=(120>E?120:480>E?480:1080>E?1080:1920>E?1920:3e3>E?3e3:4320>E?4320:1960*AM(E/1960))-E,10f?16:f,or===null)var E=!1;else{if(f=or,or=null,Sl=0,kt&6)throw Error(xt(331));var w=kt;for(kt|=4,Rt=f.current;Rt!==null;){var R=Rt,d=R.child;if(Rt.flags&16){var x=R.deletions;if(x!==null){for(var t=0;tAe()-sv?Hr(f,0):rv|=y),di(f,g)}function ox(f,g){g===0&&(f.mode&1?(g=mh,mh<<=1,!(mh&130023424)&&(mh=4194304)):g=1);var y=ei();f=Xn(f,g),f!==null&&(yo(f,g,y),di(f,y))}function OM(f){var g=f.memoizedState,y=0;g!==null&&(y=g.retryLane),ox(f,y)}function DM(f,g){var y=0;switch(f.tag){case 13:var E=f.stateNode,w=f.memoizedState;w!==null&&(y=w.retryLane);break;case 19:E=f.stateNode;break;default:throw Error(xt(314))}E!==null&&E.delete(g),ox(f,y)}var hx;hx=function(f,g,y){if(f!==null)if(f.memoizedProps!==g.pendingProps||ui.current)li=!0;else{if(!(f.lanes&y)&&!(g.flags&128))return li=!1,xM(f,g,y);li=!!(f.flags&131072)}else li=!1,de&&g.flags&1048576&&f1(g,dl,g.index);switch(g.lanes=0,g.tag){case 2:var E=g.type;Hh(f,g),f=g.pendingProps;var w=Hs(g,ke.current);zs(g,y),w=qc(null,g,E,f,w,y);var R=_c();return g.flags|=1,typeof w=="object"&&w!==null&&typeof w.render=="function"&&w.$$typeof===void 0?(g.tag=1,g.memoizedState=null,g.updateQueue=null,fi(E)?(R=!0,ul(g)):R=!1,g.memoizedState=w.state!==null&&w.state!==void 0?w.state:null,jc(g),w.updater=Nl,g.stateNode=w,w._reactInternals=g,Vd(g,E,f,y),g=Yd(null,g,E,!0,R,y)):(g.tag=0,de&&R&&Vc(g),ti(null,g,w,y),g=g.child),g;case 16:E=g.elementType;t:{switch(Hh(f,g),f=g.pendingProps,w=E._init,E=w(E._payload),g.type=E,w=g.tag=BM(E),f=nn(E,f),w){case 0:g=Xd(null,g,E,f,y);break t;case 1:g=am(null,g,E,f,y);break t;case 11:g=rm(null,g,E,f,y);break t;case 14:g=sm(null,g,E,nn(E.type,f),y);break t}throw Error(xt(306,E,""))}return g;case 0:return E=g.type,w=g.pendingProps,w=g.elementType===E?w:nn(E,w),Xd(f,g,E,w,y);case 1:return E=g.type,w=g.pendingProps,w=g.elementType===E?w:nn(E,w),am(f,g,E,w,y);case 3:t:{if($1(g),f===null)throw Error(xt(387));E=g.pendingProps,R=g.memoizedState,w=R.element,p1(f,g),pl(g,E,null,y);var d=g.memoizedState;if(E=d.element,R.isDehydrated)if(R={element:E,isDehydrated:!1,cache:d.cache,pendingSuspenseBoundaries:d.pendingSuspenseBoundaries,transitions:d.transitions},g.updateQueue.baseState=R,g.memoizedState=R,g.flags&256){w=Zs(Error(xt(423)),g),g=om(f,g,E,y,w);break t}else if(E!==w){w=Zs(Error(xt(424)),g),g=om(f,g,E,y,w);break t}else for(Si=dr(g.stateNode.containerInfo.firstChild),Ci=g,de=!0,sn=null,y=x1(g,null,E,y),g.child=y;y;)y.flags=y.flags&-3|4096,y=y.sibling;else{if($s(),E===w){g=Yn(f,g,y);break t}ti(f,g,E,y)}g=g.child}return g;case 5:return T1(g),f===null&&zd(g),E=g.type,w=g.pendingProps,R=f!==null?f.memoizedProps:null,d=w.children,Dd(E,w)?d=null:R!==null&&Dd(E,R)&&(g.flags|=32),H1(f,g),ti(f,g,d,y),g.child;case 6:return f===null&&zd(g),null;case 13:return K1(f,g,y);case 4:return Zc(g,g.stateNode.containerInfo),E=g.pendingProps,f===null?g.child=Ks(g,null,E,y):ti(f,g,E,y),g.child;case 11:return E=g.type,w=g.pendingProps,w=g.elementType===E?w:nn(E,w),rm(f,g,E,w,y);case 7:return ti(f,g,g.pendingProps,y),g.child;case 8:return ti(f,g,g.pendingProps.children,y),g.child;case 12:return ti(f,g,g.pendingProps.children,y),g.child;case 10:t:{if(E=g.type._context,w=g.pendingProps,R=g.memoizedProps,d=w.value,se(cl,E._currentValue),E._currentValue=d,R!==null)if(ln(R.value,d)){if(R.children===w.children&&!ui.current){g=Yn(f,g,y);break t}}else for(R=g.child,R!==null&&(R.return=g);R!==null;){var x=R.dependencies;if(x!==null){d=R.child;for(var t=x.firstContext;t!==null;){if(t.context===E){if(R.tag===1){t=bn(-1,y&-y),t.tag=2;var a=R.updateQueue;if(a!==null){a=a.shared;var p=a.pending;p===null?t.next=t:(t.next=p.next,p.next=t),a.pending=t}}R.lanes|=y,t=R.alternate,t!==null&&(t.lanes|=y),Ud(R.return,y,g),x.lanes|=y;break}t=t.next}}else if(R.tag===10)d=R.type===g.type?null:R.child;else if(R.tag===18){if(d=R.return,d===null)throw Error(xt(341));d.lanes|=y,x=d.alternate,x!==null&&(x.lanes|=y),Ud(d,y,g),d=R.sibling}else d=R.child;if(d!==null)d.return=R;else for(d=R;d!==null;){if(d===g){d=null;break}if(R=d.sibling,R!==null){R.return=d.return,d=R;break}d=d.return}R=d}ti(f,g,w.children,y),g=g.child}return g;case 9:return w=g.type,E=g.pendingProps.children,zs(g,y),w=$i(w),E=E(w),g.flags|=1,ti(f,g,E,y),g.child;case 14:return E=g.type,w=nn(E,g.pendingProps),w=nn(E.type,w),sm(f,g,E,w,y);case 15:return X1(f,g,g.type,g.pendingProps,y);case 17:return E=g.type,w=g.pendingProps,w=g.elementType===E?w:nn(E,w),Hh(f,g),g.tag=1,fi(E)?(f=!0,ul(g)):f=!1,zs(g,y),m1(g,E,w),Vd(g,E,w,y),Yd(null,g,E,!0,f,y);case 19:return j1(f,g,y);case 22:return Y1(f,g,y)}throw Error(xt(156,g.tag))};function lx(f,g){return Ny(f,g)}function IM(f,g,y,E){this.tag=f,this.key=y,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=g,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=E,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xi(f,g,y,E){return new IM(f,g,y,E)}function lv(f){return f=f.prototype,!(!f||!f.isReactComponent)}function BM(f){if(typeof f=="function")return lv(f)?1:0;if(f!=null){if(f=f.$$typeof,f===Rc)return 11;if(f===Lc)return 14}return 2}function gr(f,g){var y=f.alternate;return y===null?(y=Xi(f.tag,g,f.key,f.mode),y.elementType=f.elementType,y.type=f.type,y.stateNode=f.stateNode,y.alternate=f,f.alternate=y):(y.pendingProps=g,y.type=f.type,y.flags=0,y.subtreeFlags=0,y.deletions=null),y.flags=f.flags&14680064,y.childLanes=f.childLanes,y.lanes=f.lanes,y.child=f.child,y.memoizedProps=f.memoizedProps,y.memoizedState=f.memoizedState,y.updateQueue=f.updateQueue,g=f.dependencies,y.dependencies=g===null?null:{lanes:g.lanes,firstContext:g.firstContext},y.sibling=f.sibling,y.index=f.index,y.ref=f.ref,y}function jh(f,g,y,E,w,R){var d=2;if(E=f,typeof f=="function")lv(f)&&(d=1);else if(typeof f=="string")d=5;else t:switch(f){case Ts:return $r(y.children,w,R,g);case Mc:d=8,w|=8;break;case ud:return f=Xi(12,y,g,w|2),f.elementType=ud,f.lanes=R,f;case fd:return f=Xi(13,y,g,w),f.elementType=fd,f.lanes=R,f;case dd:return f=Xi(19,y,g,w),f.elementType=dd,f.lanes=R,f;case yy:return bl(y,w,R,g);default:if(typeof f=="object"&&f!==null)switch(f.$$typeof){case gy:d=10;break t;case my:d=9;break t;case Rc:d=11;break t;case Lc:d=14;break t;case ir:d=16,E=null;break t}throw Error(xt(130,f==null?f:typeof f,""))}return g=Xi(d,y,g,w),g.elementType=f,g.type=E,g.lanes=R,g}function $r(f,g,y,E){return f=Xi(7,f,E,g),f.lanes=y,f}function bl(f,g,y,E){return f=Xi(22,f,E,g),f.elementType=yy,f.lanes=y,f.stateNode={isHidden:!1},f}function Qf(f,g,y){return f=Xi(6,f,null,g),f.lanes=y,f}function Jf(f,g,y){return g=Xi(4,f.children!==null?f.children:[],f.key,g),g.lanes=y,g.stateNode={containerInfo:f.containerInfo,pendingChildren:null,implementation:f.implementation},g}function NM(f,g,y,E,w){this.tag=g,this.containerInfo=f,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Of(0),this.expirationTimes=Of(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Of(0),this.identifierPrefix=E,this.onRecoverableError=w,this.mutableSourceEagerHydrationData=null}function uv(f,g,y,E,w,R,d,x,t){return f=new NM(f,g,y,x,t),g===1?(g=1,R===!0&&(g|=8)):g=0,R=Xi(3,null,null,g),f.current=R,R.stateNode=f,R.memoizedState={element:E,isDehydrated:y,cache:null,transitions:null,pendingSuspenseBoundaries:null},jc(R),f}function GM(f,g,y){var E=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(cx)}catch(f){console.error(f)}}cx(),fy.exports=Ai;var WM=fy.exports,vx,xm=WM;vx=xm.createRoot,xm.hydrateRoot;var XM=typeof Element<"u",YM=typeof Map=="function",HM=typeof Set=="function",$M=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function Zh(f,g){if(f===g)return!0;if(f&&g&&typeof f=="object"&&typeof g=="object"){if(f.constructor!==g.constructor)return!1;var y,E,w;if(Array.isArray(f)){if(y=f.length,y!=g.length)return!1;for(E=y;E--!==0;)if(!Zh(f[E],g[E]))return!1;return!0}var R;if(YM&&f instanceof Map&&g instanceof Map){if(f.size!==g.size)return!1;for(R=f.entries();!(E=R.next()).done;)if(!g.has(E.value[0]))return!1;for(R=f.entries();!(E=R.next()).done;)if(!Zh(E.value[1],g.get(E.value[0])))return!1;return!0}if(HM&&f instanceof Set&&g instanceof Set){if(f.size!==g.size)return!1;for(R=f.entries();!(E=R.next()).done;)if(!g.has(E.value[0]))return!1;return!0}if($M&&ArrayBuffer.isView(f)&&ArrayBuffer.isView(g)){if(y=f.length,y!=g.length)return!1;for(E=y;E--!==0;)if(f[E]!==g[E])return!1;return!0}if(f.constructor===RegExp)return f.source===g.source&&f.flags===g.flags;if(f.valueOf!==Object.prototype.valueOf&&typeof f.valueOf=="function"&&typeof g.valueOf=="function")return f.valueOf()===g.valueOf();if(f.toString!==Object.prototype.toString&&typeof f.toString=="function"&&typeof g.toString=="function")return f.toString()===g.toString();if(w=Object.keys(f),y=w.length,y!==Object.keys(g).length)return!1;for(E=y;E--!==0;)if(!Object.prototype.hasOwnProperty.call(g,w[E]))return!1;if(XM&&f instanceof Element)return!1;for(E=y;E--!==0;)if(!((w[E]==="_owner"||w[E]==="__v"||w[E]==="__o")&&f.$$typeof)&&!Zh(f[w[E]],g[w[E]]))return!1;return!0}return f!==f&&g!==g}var KM=function(g,y){try{return Zh(g,y)}catch(E){if((E.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw E}};const jM=ta(KM);var ZM=function(f,g,y,E,w,R,d,x){if(!f){var t;if(g===void 0)t=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var a=[y,E,w,R,d,x],p=0;t=new Error(g.replace(/%s/g,function(){return a[p++]})),t.name="Invariant Violation"}throw t.framesToPop=1,t}},kM=ZM;const Tm=ta(kM);var QM=function(g,y,E,w){var R=E?E.call(w,g,y):void 0;if(R!==void 0)return!!R;if(g===y)return!0;if(typeof g!="object"||!g||typeof y!="object"||!y)return!1;var d=Object.keys(g),x=Object.keys(y);if(d.length!==x.length)return!1;for(var t=Object.prototype.hasOwnProperty.bind(y),a=0;a(f.BASE="base",f.BODY="body",f.HEAD="head",f.HTML="html",f.LINK="link",f.META="meta",f.NOSCRIPT="noscript",f.SCRIPT="script",f.STYLE="style",f.TITLE="title",f.FRAGMENT="Symbol(react.fragment)",f))(px||{}),qf={link:{rel:["amphtml","canonical","alternate"]},script:{type:["application/ld+json"]},meta:{charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]}},Sm=Object.values(px),vv={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},qM=Object.entries(vv).reduce((f,[g,y])=>(f[y]=g,f),{}),an="data-rh",bs={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},Vs=(f,g)=>{for(let y=f.length-1;y>=0;y-=1){const E=f[y];if(Object.prototype.hasOwnProperty.call(E,g))return E[g]}return null},_M=f=>{let g=Vs(f,"title");const y=Vs(f,bs.TITLE_TEMPLATE);if(Array.isArray(g)&&(g=g.join("")),y&&g)return y.replace(/%s/g,()=>g);const E=Vs(f,bs.DEFAULT_TITLE);return g||E||void 0},t5=f=>Vs(f,bs.ON_CHANGE_CLIENT_STATE)||(()=>{}),_f=(f,g)=>g.filter(y=>typeof y[f]<"u").map(y=>y[f]).reduce((y,E)=>({...y,...E}),{}),e5=(f,g)=>g.filter(y=>typeof y.base<"u").map(y=>y.base).reverse().reduce((y,E)=>{if(!y.length){const w=Object.keys(E);for(let R=0;Rconsole&&typeof console.warn=="function"&&console.warn(f),Ra=(f,g,y)=>{const E={};return y.filter(w=>Array.isArray(w[f])?!0:(typeof w[f]<"u"&&i5(`Helmet: ${f} should be of type "Array". Instead found type "${typeof w[f]}"`),!1)).map(w=>w[f]).reverse().reduce((w,R)=>{const d={};R.filter(t=>{let a;const p=Object.keys(t);for(let s=0;sw.push(t));const x=Object.keys(d);for(let t=0;t{if(Array.isArray(f)&&f.length){for(let y=0;y({baseTag:e5(["href"],f),bodyAttributes:_f("bodyAttributes",f),defer:Vs(f,bs.DEFER),encode:Vs(f,bs.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:_f("htmlAttributes",f),linkTags:Ra("link",["rel","href"],f),metaTags:Ra("meta",["name","charset","http-equiv","property","itemprop"],f),noscriptTags:Ra("noscript",["innerHTML"],f),onChangeClientState:t5(f),scriptTags:Ra("script",["src","innerHTML"],f),styleTags:Ra("style",["cssText"],f),title:_M(f),titleAttributes:_f("titleAttributes",f),prioritizeSeoTags:n5(f,bs.PRIORITIZE_SEO_TAGS)}),gx=f=>Array.isArray(f)?f.join(""):f,s5=(f,g)=>{const y=Object.keys(f);for(let E=0;EArray.isArray(f)?f.reduce((y,E)=>(s5(E,g)?y.priority.push(E):y.default.push(E),y),{priority:[],default:[]}):{default:f,priority:[]},Cm=(f,g)=>({...f,[g]:void 0}),a5=["noscript","script","style"],ec=(f,g=!0)=>g===!1?String(f):String(f).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'"),mx=f=>Object.keys(f).reduce((g,y)=>{const E=typeof f[y]<"u"?`${y}="${f[y]}"`:`${y}`;return g?`${g} ${E}`:E},""),o5=(f,g,y,E)=>{const w=mx(y),R=gx(g);return w?`<${f} ${an}="true" ${w}>${ec(R,E)}`:`<${f} ${an}="true">${ec(R,E)}`},h5=(f,g,y=!0)=>g.reduce((E,w)=>{const R=w,d=Object.keys(R).filter(a=>!(a==="innerHTML"||a==="cssText")).reduce((a,p)=>{const o=typeof R[p]>"u"?p:`${p}="${ec(R[p],y)}"`;return a?`${a} ${o}`:o},""),x=R.innerHTML||R.cssText||"",t=a5.indexOf(f)===-1;return`${E}<${f} ${an}="true" ${d}${t?"/>":`>${x}`}`},""),yx=(f,g={})=>Object.keys(f).reduce((y,E)=>{const w=vv[E];return y[w||E]=f[E],y},g),l5=(f,g,y)=>{const E={key:g,[an]:!0},w=yx(y,E);return[Wi.createElement("title",w,g)]},kh=(f,g)=>g.map((y,E)=>{const w={key:E,[an]:!0};return Object.keys(y).forEach(R=>{const x=vv[R]||R;if(x==="innerHTML"||x==="cssText"){const t=y.innerHTML||y.cssText;w.dangerouslySetInnerHTML={__html:t}}else w[x]=y[R]}),Wi.createElement(f,w)}),zi=(f,g,y=!0)=>{switch(f){case"title":return{toComponent:()=>l5(f,g.title,g.titleAttributes),toString:()=>o5(f,g.title,g.titleAttributes,y)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>yx(g),toString:()=>mx(g)};default:return{toComponent:()=>kh(f,g),toString:()=>h5(f,g,y)}}},u5=({metaTags:f,linkTags:g,scriptTags:y,encode:E})=>{const w=td(f,qf.meta),R=td(g,qf.link),d=td(y,qf.script);return{priorityMethods:{toComponent:()=>[...kh("meta",w.priority),...kh("link",R.priority),...kh("script",d.priority)],toString:()=>`${zi("meta",w.priority,E)} ${zi("link",R.priority,E)} ${zi("script",d.priority,E)}`},metaTags:w.default,linkTags:R.default,scriptTags:d.default}},f5=f=>{const{baseTag:g,bodyAttributes:y,encode:E=!0,htmlAttributes:w,noscriptTags:R,styleTags:d,title:x="",titleAttributes:t,prioritizeSeoTags:a}=f;let{linkTags:p,metaTags:o,scriptTags:s}=f,r={toComponent:()=>{},toString:()=>""};return a&&({priorityMethods:r,linkTags:p,metaTags:o,scriptTags:s}=u5(f)),{priority:r,base:zi("base",g,E),bodyAttributes:zi("bodyAttributes",y,E),htmlAttributes:zi("htmlAttributes",w,E),link:zi("link",p,E),meta:zi("meta",o,E),noscript:zi("noscript",R,E),script:zi("script",s,E),style:zi("style",d,E),title:zi("title",{title:x,titleAttributes:t},E)}},ic=f5,Lh=[],xx=!!(typeof window<"u"&&window.document&&window.document.createElement),nc=class{constructor(f,g){In(this,"instances",[]);In(this,"canUseDOM",xx);In(this,"context");In(this,"value",{setHelmet:f=>{this.context.helmet=f},helmetInstances:{get:()=>this.canUseDOM?Lh:this.instances,add:f=>{(this.canUseDOM?Lh:this.instances).push(f)},remove:f=>{const g=(this.canUseDOM?Lh:this.instances).indexOf(f);(this.canUseDOM?Lh:this.instances).splice(g,1)}}});this.context=f,this.canUseDOM=g||!1,g||(f.helmet=ic({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},d5={},Tx=Wi.createContext(d5),Xs,Sx=(Xs=class extends Ei.Component{constructor(y){super(y);In(this,"helmetData");this.helmetData=new nc(this.props.context||{},Xs.canUseDOM)}render(){return Wi.createElement(Tx.Provider,{value:this.helmetData.value},this.props.children)}},In(Xs,"canUseDOM",xx),Xs),ms=(f,g)=>{const y=document.head||document.querySelector("head"),E=y.querySelectorAll(`${f}[${an}]`),w=[].slice.call(E),R=[];let d;return g&&g.length&&g.forEach(x=>{const t=document.createElement(f);for(const a in x)if(Object.prototype.hasOwnProperty.call(x,a))if(a==="innerHTML")t.innerHTML=x.innerHTML;else if(a==="cssText")t.styleSheet?t.styleSheet.cssText=x.cssText:t.appendChild(document.createTextNode(x.cssText));else{const p=a,o=typeof x[p]>"u"?"":x[p];t.setAttribute(a,o)}t.setAttribute(an,"true"),w.some((a,p)=>(d=p,t.isEqualNode(a)))?w.splice(d,1):R.push(t)}),w.forEach(x=>{var t;return(t=x.parentNode)==null?void 0:t.removeChild(x)}),R.forEach(x=>y.appendChild(x)),{oldTags:w,newTags:R}},rc=(f,g)=>{const y=document.getElementsByTagName(f)[0];if(!y)return;const E=y.getAttribute(an),w=E?E.split(","):[],R=[...w],d=Object.keys(g);for(const x of d){const t=g[x]||"";y.getAttribute(x)!==t&&y.setAttribute(x,t),w.indexOf(x)===-1&&w.push(x);const a=R.indexOf(x);a!==-1&&R.splice(a,1)}for(let x=R.length-1;x>=0;x-=1)y.removeAttribute(R[x]);w.length===R.length?y.removeAttribute(an):y.getAttribute(an)!==d.join(",")&&y.setAttribute(an,d.join(","))},c5=(f,g)=>{typeof f<"u"&&document.title!==f&&(document.title=gx(f)),rc("title",g)},Em=(f,g)=>{const{baseTag:y,bodyAttributes:E,htmlAttributes:w,linkTags:R,metaTags:d,noscriptTags:x,onChangeClientState:t,scriptTags:a,styleTags:p,title:o,titleAttributes:s}=f;rc("body",E),rc("html",w),c5(o,s);const r={baseTag:ms("base",y),linkTags:ms("link",R),metaTags:ms("meta",d),noscriptTags:ms("noscript",x),scriptTags:ms("script",a),styleTags:ms("style",p)},e={},n={};Object.keys(r).forEach(l=>{const{newTags:i,oldTags:h}=r[l];i.length&&(e[l]=i),h.length&&(n[l]=r[l].oldTags)}),g&&g(),t(f,e,n)},La=null,v5=f=>{La&&cancelAnimationFrame(La),f.defer?La=requestAnimationFrame(()=>{Em(f,()=>{La=null})}):(Em(f),La=null)},p5=v5,Pm=class extends Ei.Component{constructor(){super(...arguments);In(this,"rendered",!1)}shouldComponentUpdate(g){return!JM(g,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:g}=this.props.context;g.remove(this),this.emitChange()}emitChange(){const{helmetInstances:g,setHelmet:y}=this.props.context;let E=null;const w=r5(g.get().map(R=>{const d={...R.props};return delete d.context,d}));Sx.canUseDOM?p5(w):ic&&(E=ic(w)),y(E)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:g}=this.props.context;g.add(this),this.emitChange()}render(){return this.init(),null}},hd,g5=(hd=class extends Ei.Component{shouldComponentUpdate(f){return!jM(Cm(this.props,"helmetData"),Cm(f,"helmetData"))}mapNestedChildrenToProps(f,g){if(!g)return null;switch(f.type){case"script":case"noscript":return{innerHTML:g};case"style":return{cssText:g};default:throw new Error(`<${f.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(f,g,y,E){return{...g,[f.type]:[...g[f.type]||[],{...y,...this.mapNestedChildrenToProps(f,E)}]}}mapObjectTypeChildren(f,g,y,E){switch(f.type){case"title":return{...g,[f.type]:E,titleAttributes:{...y}};case"body":return{...g,bodyAttributes:{...y}};case"html":return{...g,htmlAttributes:{...y}};default:return{...g,[f.type]:{...y}}}}mapArrayTypeChildrenToProps(f,g){let y={...g};return Object.keys(f).forEach(E=>{y={...y,[E]:f[E]}}),y}warnOnInvalidChildren(f,g){return Tm(Sm.some(y=>f.type===y),typeof f.type=="function"?"You may be attempting to nest components within each other, which is not allowed. Refer to our API for more information.":`Only elements types ${Sm.join(", ")} are allowed. Helmet does not support rendering <${f.type}> elements. Refer to our API for more information.`),Tm(!g||typeof g=="string"||Array.isArray(g)&&!g.some(y=>typeof y!="string"),`Helmet expects a string as a child of <${f.type}>. Did you forget to wrap your children in braces? ( <${f.type}>{\`\`} ) Refer to our API for more information.`),!0}mapChildrenToProps(f,g){let y={};return Wi.Children.forEach(f,E=>{if(!E||!E.props)return;const{children:w,...R}=E.props,d=Object.keys(R).reduce((t,a)=>(t[qM[a]||a]=R[a],t),{});let{type:x}=E;switch(typeof x=="symbol"?x=x.toString():this.warnOnInvalidChildren(E,w),x){case"Symbol(react.fragment)":g=this.mapChildrenToProps(w,g);break;case"link":case"meta":case"noscript":case"script":case"style":y=this.flattenArrayTypeChildren(E,y,d,w);break;default:g=this.mapObjectTypeChildren(E,g,d,w);break}}),this.mapArrayTypeChildrenToProps(y,g)}render(){const{children:f,...g}=this.props;let y={...g},{helmetData:E}=g;if(f&&(y=this.mapChildrenToProps(f,y)),E&&!(E instanceof nc)){const w=E;E=new nc(w.context,!0),delete y.helmetData}return E?Wi.createElement(Pm,{...y,context:E.value}):Wi.createElement(Tx.Consumer,null,w=>Wi.createElement(Pm,{...y,context:w}))}},In(hd,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),hd),Cx={exports:{}},ee={};/** + * @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 pv=Symbol.for("react.element"),gv=Symbol.for("react.portal"),Hl=Symbol.for("react.fragment"),$l=Symbol.for("react.strict_mode"),Kl=Symbol.for("react.profiler"),jl=Symbol.for("react.provider"),Zl=Symbol.for("react.context"),m5=Symbol.for("react.server_context"),kl=Symbol.for("react.forward_ref"),Ql=Symbol.for("react.suspense"),Jl=Symbol.for("react.suspense_list"),ql=Symbol.for("react.memo"),_l=Symbol.for("react.lazy"),y5=Symbol.for("react.offscreen"),Ex;Ex=Symbol.for("react.module.reference");function Zi(f){if(typeof f=="object"&&f!==null){var g=f.$$typeof;switch(g){case pv:switch(f=f.type,f){case Hl:case Kl:case $l:case Ql:case Jl:return f;default:switch(f=f&&f.$$typeof,f){case m5:case Zl:case kl:case _l:case ql:case jl:return f;default:return g}}case gv:return g}}}ee.ContextConsumer=Zl;ee.ContextProvider=jl;ee.Element=pv;ee.ForwardRef=kl;ee.Fragment=Hl;ee.Lazy=_l;ee.Memo=ql;ee.Portal=gv;ee.Profiler=Kl;ee.StrictMode=$l;ee.Suspense=Ql;ee.SuspenseList=Jl;ee.isAsyncMode=function(){return!1};ee.isConcurrentMode=function(){return!1};ee.isContextConsumer=function(f){return Zi(f)===Zl};ee.isContextProvider=function(f){return Zi(f)===jl};ee.isElement=function(f){return typeof f=="object"&&f!==null&&f.$$typeof===pv};ee.isForwardRef=function(f){return Zi(f)===kl};ee.isFragment=function(f){return Zi(f)===Hl};ee.isLazy=function(f){return Zi(f)===_l};ee.isMemo=function(f){return Zi(f)===ql};ee.isPortal=function(f){return Zi(f)===gv};ee.isProfiler=function(f){return Zi(f)===Kl};ee.isStrictMode=function(f){return Zi(f)===$l};ee.isSuspense=function(f){return Zi(f)===Ql};ee.isSuspenseList=function(f){return Zi(f)===Jl};ee.isValidElementType=function(f){return typeof f=="string"||typeof f=="function"||f===Hl||f===Kl||f===$l||f===Ql||f===Jl||f===y5||typeof f=="object"&&f!==null&&(f.$$typeof===_l||f.$$typeof===ql||f.$$typeof===jl||f.$$typeof===Zl||f.$$typeof===kl||f.$$typeof===Ex||f.getModuleId!==void 0)};ee.typeOf=Zi;Cx.exports=ee;var Px=Cx.exports;function x5(f){function g(Z,V,H,N,U){for(var X=0,$=0,k=0,Q=0,J,et,nt=0,st=0,ot,ut=ot=J=0,at=0,ct=0,Et=0,St=0,Ct=H.length,dt=Ct-1,Tt,vt="",wt="",Bt="",jt="",Ut;atJ)&&(St=(vt=vt.replace(" ",":")).length),0N&&(N=(V=V.trim()).charCodeAt(0)),N){case 38:return V.replace(i,"$1"+Z.trim());case 58:return Z.trim()+V.replace(i,"$1"+Z.trim());default:if(0<1*H&&0$.charCodeAt(8))break;case 115:U=U.replace($,"-webkit-"+$)+";"+U;break;case 207:case 102:U=U.replace($,"-webkit-"+(102H.charCodeAt(0)&&(H=H.trim()),K=H,H=[K],01?g-1:0),E=1;E0?" Args: "+y.join(", "):""))}var b5=function(){function f(y){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=y}var g=f.prototype;return g.indexOfGroup=function(y){for(var E=0,w=0;w=this.groupSizes.length){for(var w=this.groupSizes,R=w.length,d=R;y>=d;)(d<<=1)<0&&Co(16,""+y);this.groupSizes=new Uint32Array(d),this.groupSizes.set(w),this.length=d;for(var x=R;x=this.length||this.groupSizes[y]===0)return E;for(var w=this.groupSizes[y],R=this.indexOfGroup(y),d=R+w,x=R;x=Ka&&(Ka=g+1),Qh.set(f,g),Al.set(g,f)},X5="style["+Qs+'][data-styled-version="5.3.6"]',Y5=new RegExp("^"+Qs+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),H5=function(f,g,y){for(var E,w=y.split(","),R=0,d=w.length;R=0;a--){var p=t[a];if(p&&p.nodeType===1&&p.hasAttribute(Qs))return p}}(y),R=w!==void 0?w.nextSibling:null;E.setAttribute(Qs,"active"),E.setAttribute("data-styled-version","5.3.6");var d=K5();return d&&E.setAttribute("nonce",d),y.insertBefore(E,R),E},j5=function(){function f(y){var E=this.element=Lx(y);E.appendChild(document.createTextNode("")),this.sheet=function(w){if(w.sheet)return w.sheet;for(var R=document.styleSheets,d=0,x=R.length;d=0){var w=document.createTextNode(E),R=this.nodes[y];return this.element.insertBefore(w,R||null),this.length++,!0}return!1},g.deleteRule=function(y){this.element.removeChild(this.nodes[y]),this.length--},g.getRule=function(y){return y0&&(o+=s+",")}),R+=""+a+p+'{content:"'+o+`"}/*!sc*/ +`}}}return R}(this)},f}(),J5=/(a)(d)/gi,Dm=function(f){return String.fromCharCode(f+(f>25?39:97))};function ac(f){var g,y="";for(g=Math.abs(f);g>52;g=g/52|0)y=Dm(g%52)+y;return(Dm(g%52)+y).replace(J5,"$1-$2")}var Os=function(f,g){for(var y=g.length;y;)f=33*f^g.charCodeAt(--y);return f},Ox=function(f){return Os(5381,f)};function q5(f){for(var g=0;g>>0);if(!y.hasNameForId(w,x)){var t=E(d,"."+x,void 0,w);y.insertRules(w,x,t)}R.push(x),this.staticRulesId=x}else{for(var a=this.rules.length,p=Os(this.baseHash,E.hash),o="",s=0;s>>0);if(!y.hasNameForId(w,l)){var i=E(o,"."+l,void 0,w);y.insertRules(w,l,i)}R.push(l)}}return R.join(" ")},f}(),e9=/^\s*\/\/.*$/gm,i9=[":","[",".","#"];function n9(f){var g,y,E,w,R=f===void 0?mr:f,d=R.options,x=d===void 0?mr:d,t=R.plugins,a=t===void 0?Pl:t,p=new x5(x),o=[],s=function(n){function l(i){if(i)try{n(i+"}")}catch{}}return function(i,h,u,c,v,m,T,C,S,P){switch(i){case 1:if(S===0&&h.charCodeAt(0)===64)return n(h+";"),"";break;case 2:if(C===0)return h+"/*|*/";break;case 3:switch(C){case 102:case 112:return n(u[0]+h),"";default:return h+(P===0?"/*|*/":"")}case-2:h.split("/*|*/}").forEach(l)}}}(function(n){o.push(n)}),r=function(n,l,i){return l===0&&i9.indexOf(i[y.length])!==-1||i.match(w)?n:"."+g};function e(n,l,i,h){h===void 0&&(h="&");var u=n.replace(e9,""),c=l&&i?i+" "+l+" { "+u+" }":u;return g=h,y=l,E=new RegExp("\\"+y+"\\b","g"),w=new RegExp("(\\"+y+"\\b){2,}"),p(i||!l?"":l,c)}return p.use([].concat(a,[function(n,l,i){n===2&&i.length&&i[0].lastIndexOf(y)>0&&(i[0]=i[0].replace(E,r))},s,function(n){if(n===-2){var l=o;return o=[],l}}])),e.hash=a.length?a.reduce(function(n,l){return l.name||Co(15),Os(n,l.name)},5381).toString():"",e}var Dx=Wi.createContext();Dx.Consumer;var Ix=Wi.createContext(),r9=(Ix.Consumer,new Fx),oc=n9();function s9(){return Ei.useContext(Dx)||r9}function a9(){return Ei.useContext(Ix)||oc}var o9=function(){function f(g,y){var E=this;this.inject=function(w,R){R===void 0&&(R=oc);var d=E.name+R.hash;w.hasNameForId(E.id,d)||w.insertRules(E.id,d,R(E.rules,d,"@keyframes"))},this.toString=function(){return Co(12,String(E.name))},this.name=g,this.id="sc-keyframes-"+g,this.rules=y}return f.prototype.getName=function(g){return g===void 0&&(g=oc),this.name+g.hash},f}(),h9=/([A-Z])/,l9=/([A-Z])/g,u9=/^ms-/,f9=function(f){return"-"+f.toLowerCase()};function Im(f){return h9.test(f)?f.replace(l9,f9).replace(u9,"-ms-"):f}var Bm=function(f){return f==null||f===!1||f===""};function Js(f,g,y,E){if(Array.isArray(f)){for(var w,R=[],d=0,x=f.length;d1?g-1:0),E=1;E?@[\\\]^`{|}~-]+/g,p9=/(^-|-$)/g;function ed(f){return f.replace(v9,"-").replace(p9,"")}var g9=function(f){return ac(Ox(f)>>>0)};function Oh(f){return typeof f=="string"&&!0}var hc=function(f){return typeof f=="function"||typeof f=="object"&&f!==null&&!Array.isArray(f)},m9=function(f){return f!=="__proto__"&&f!=="constructor"&&f!=="prototype"};function y9(f,g,y){var E=f[y];hc(g)&&hc(E)?Bx(E,g):f[y]=g}function Bx(f){for(var g=arguments.length,y=new Array(g>1?g-1:0),E=1;E=0||(P[C]=m[C]);return P}(g,["componentId"]),v=u&&u+"-"+(Oh(h)?h:ed(Fm(h)));return Gx(h,Un({},c,{attrs:s,componentId:v}),y)},Object.defineProperty(e,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(h){this._foldedDefaultProps=E?Bx({},f.defaultProps,h):h}}),e.toString=function(){return"."+e.styledComponentId},w&&z5(e,f,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),e}var lc=function(f){return function g(y,E,w){if(w===void 0&&(w=mr),!Px.isValidElementType(E))return Co(1,String(E));var R=function(){return y(E,w,d9.apply(void 0,arguments))};return R.withConfig=function(d){return g(y,E,Un({},w,{},d))},R.attrs=function(d){return g(y,E,Un({},w,{attrs:Array.prototype.concat(w.attrs,d).filter(Boolean)}))},R}(Gx,f)};["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(f){lc[f]=lc(f)});const zx=lc;var Ux={exports:{}};(function(f,g){(function(E,w){f.exports=w()})(g4,()=>(()=>{var y={50792:d=>{var x=Object.prototype.hasOwnProperty,t="~";function a(){}Object.create&&(a.prototype=Object.create(null),new a().__proto__||(t=!1));function p(e,n,l){this.fn=e,this.context=n,this.once=l||!1}function o(e,n,l,i,h){if(typeof l!="function")throw new TypeError("The listener must be a function");var u=new p(l,i||e,h),c=t?t+n:n;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],u]:e._events[c].push(u):(e._events[c]=u,e._eventsCount++),e}function s(e,n){--e._eventsCount===0?e._events=new a:delete e._events[n]}function r(){this._events=new a,this._eventsCount=0}r.prototype.eventNames=function(){var n=[],l,i;if(this._eventsCount===0)return n;for(i in l=this._events)x.call(l,i)&&n.push(t?i.slice(1):i);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(l)):n},r.prototype.listeners=function(n){var l=t?t+n:n,i=this._events[l];if(!i)return[];if(i.fn)return[i.fn];for(var h=0,u=i.length,c=new Array(u);h{/** + * @author samme + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(38829),p=function(o,s,r,e){for(var n=o[0],l=1;l{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(66979),p=function(o,s,r,e,n){return a(o,"angle",s,r,e,n)};d.exports=p},60757:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,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 x=function(t,a,p){p===void 0&&(p=0);for(var o=p;o{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){p===void 0&&(p=0);for(var o=t.length-1;o>=p;o--){var s=t[o],r=!0;for(var e in a)s[e]!==a[e]&&(r=!1);if(r)return s}return null};d.exports=x},94420:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(11879),p=t(60461),o=t(95540),s=t(29747),r=t(41481),e=new r({sys:{queueDepthSort:s,events:{once:s}}},0,0,1,1).setOrigin(0,0),n=function(l,i){i===void 0&&(i={});var h=i.hasOwnProperty("width"),u=i.hasOwnProperty("height"),c=o(i,"width",-1),v=o(i,"height",-1),m=o(i,"cellWidth",1),T=o(i,"cellHeight",m),C=o(i,"position",p.TOP_LEFT),S=o(i,"x",0),P=o(i,"y",0),A=0,L=0,F=c*m,I=v*T;e.setPosition(S,P),e.setSize(m,T);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(66979),p=function(o,s,r,e,n){return a(o,"alpha",s,r,e,n)};d.exports=p},67285:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(66979),p=function(o,s,r,e,n){return a(o,"x",s,r,e,n)};d.exports=p},9074:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(66979),p=function(o,s,r,e,n,l,i){return r==null&&(r=s),a(o,"x",s,e,l,i),a(o,"y",r,n,l,i)};d.exports=p},75222:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(66979),p=function(o,s,r,e,n){return a(o,"y",s,r,e,n)};d.exports=p},22983:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p,o){p===void 0&&(p=0),o===void 0&&(o=6.28);for(var s=p,r=(o-p)/t.length,e=a.x,n=a.y,l=a.radius,i=0;i{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p,o){p===void 0&&(p=0),o===void 0&&(o=6.28);for(var s=p,r=(o-p)/t.length,e=a.width/2,n=a.height/2,l=0;l{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(15258),p=t(26708),o=function(s,r,e){var n;e?n=p(r,e,s.length):n=a(r,s.length);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(14649),p=t(86003),o=t(49498),s=function(r,e,n){n===void 0&&(n=0);var l=a(e,!1,r.length);n>0?p(l,n):n<0&&o(l,Math.abs(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 a=t(84993),p=function(o,s,r){var e=a({x1:s.x1,y1:s.y1,x2:s.x2,y2:s.y2},r),n=a({x1:s.x2,y1:s.y2,x2:s.x3,y2:s.y3},r),l=a({x1:s.x3,y1:s.y3,x2:s.x1,y2:s.y1},r);e.pop(),n.pop(),l.pop(),e=e.concat(n,l);for(var i=e.length/o.length,h=0,u=0;u{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,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 x=function(t,a,p,o,s,r){o===void 0&&(o=0),s===void 0&&(s=0),r===void 0&&(r=1);var e,n=0,l=t.length;if(r===1)for(e=s;e=0;e--)t[e][a]+=p+n*o,n++;return t};d.exports=x},43967:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p,o,s,r){o===void 0&&(o=0),s===void 0&&(s=0),r===void 0&&(r=1);var e,n=0,l=t.length;if(r===1)for(e=s;e=0;e--)t[e][a]=p+n*o,n++;return t};d.exports=x},88926:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(28176),p=function(o,s){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(24820),p=function(o,s){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(65822),p=function(o,s){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(26597),p=function(o,s){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(90260),p=function(o,s){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(66979),p=function(o,s,r,e,n){return a(o,"rotation",s,r,e,n)};d.exports=p},91051:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(1163),p=t(20339),o=function(s,r,e){for(var n=r.x,l=r.y,i=0;i{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(1163),p=function(o,s,r,e){var n=s.x,l=s.y;if(e===0)return o;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(66979),p=function(o,s,r,e,n){return a(o,"scaleX",s,r,e,n)};d.exports=p},94868:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(66979),p=function(o,s,r,e,n,l,i){return r==null&&(r=s),a(o,"scaleX",s,e,l,i),a(o,"scaleY",r,n,l,i)};d.exports=p},95532:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(66979),p=function(o,s,r,e,n){return a(o,"scaleY",s,r,e,n)};d.exports=p},8689:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(43967),p=function(o,s,r,e,n){return a(o,"alpha",s,r,e,n)};d.exports=p},2645:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(43967),p=function(o,s,r,e){return a(o,"blendMode",s,0,r,e)};d.exports=p},32372:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(43967),p=function(o,s,r,e,n){return a(o,"depth",s,r,e,n)};d.exports=p},85373:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,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 a=t(43967),p=function(o,s,r,e,n,l,i){return r==null&&(r=s),a(o,"originX",s,e,l,i),a(o,"originY",r,n,l,i),o.forEach(function(h){h.updateDisplayOrigin()}),o};d.exports=p},79939:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(43967),p=function(o,s,r,e,n){return a(o,"rotation",s,r,e,n)};d.exports=p},2699:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(43967),p=function(o,s,r,e,n,l,i){return r==null&&(r=s),a(o,"scaleX",s,e,l,i),a(o,"scaleY",r,n,l,i)};d.exports=p},98739:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(43967),p=function(o,s,r,e,n){return a(o,"scaleX",s,r,e,n)};d.exports=p},98476:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(43967),p=function(o,s,r,e,n){return a(o,"scaleY",s,r,e,n)};d.exports=p},6207:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(43967),p=function(o,s,r,e,n,l,i){return r==null&&(r=s),a(o,"scrollFactorX",s,e,l,i),a(o,"scrollFactorY",r,n,l,i)};d.exports=p},6607:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(43967),p=function(o,s,r,e,n){return a(o,"scrollFactorX",s,r,e,n)};d.exports=p},72248:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(43967),p=function(o,s,r,e,n){return a(o,"scrollFactorY",s,r,e,n)};d.exports=p},14036:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p,o,s){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(43967),p=function(o,s,r,e){return a(o,"visible",s,0,r,e)};d.exports=p},77597:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(43967),p=function(o,s,r,e,n){return a(o,"x",s,r,e,n)};d.exports=p},83194:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(43967),p=function(o,s,r,e,n,l,i){return r==null&&(r=s),a(o,"x",s,e,l,i),a(o,"y",r,n,l,i)};d.exports=p},67678:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(43967),p=function(o,s,r,e,n){return a(o,"y",s,r,e,n)};d.exports=p},35850:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(26099),p=function(o,s,r,e,n){e===void 0&&(e=0),n===void 0&&(n=new a);var l,i,h=o.length;if(h===1)l=o[0].x,i=o[0].y,o[0].x=s,o[0].y=r;else{var u=1,c=0;e===0&&(c=h-1,u=h-2),l=o[c].x,i=o[c].y,o[c].x=s,o[c].y=r;for(var v=0;v=h||u===-1)){var m=o[u],T=m.x,C=m.y;m.x=l,m.y=i,l=T,i=C,e===0?u--:u++}}return n.x=l,n.y=i,n};d.exports=p},8628:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(33680),p=function(o){return a(o)};d.exports=p},21837:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(7602),p=function(o,s,r,e,n){n===void 0&&(n=!1);var l=Math.abs(e-r)/o.length,i;if(n)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(54261),p=function(o,s,r,e,n){n===void 0&&(n=!1);var l=Math.abs(e-r)/o.length,i;if(n)for(i=0;i{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p,o,s){if(s===void 0&&(s=!1),t.length===0)return t;if(t.length===1)return s?t[0][a]+=(o+p)/2:t[0][a]=(o+p)/2,t;var r=Math.abs(o-p)/(t.length-1),e;if(s)for(e=0;e{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=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),p=function(o,s,r){r===void 0&&(r=0);for(var e=0;e{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.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:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(45319),p=t(83419),o=t(74943),s=t(81957),r=t(41138),e=t(35154),n=t(90126),l=new p({initialize:function(h,u,c){this.manager=h,this.key=u,this.type="frame",this.frames=this.getFrames(h.textureManager,e(c,"frames",[]),e(c,"defaultTextureKey",null),e(c,"sortFrames",!0)),this.frameRate=e(c,"frameRate",null),this.duration=e(c,"duration",null),this.msPerFrame,this.skipMissedFrames=e(c,"skipMissedFrames",!0),this.delay=e(c,"delay",0),this.repeat=e(c,"repeat",0),this.repeatDelay=e(c,"repeatDelay",0),this.yoyo=e(c,"yoyo",!1),this.showBeforeDelay=e(c,"showBeforeDelay",!1),this.showOnStart=e(c,"showOnStart",!1),this.hideOnComplete=e(c,"hideOnComplete",!1),this.randomFrame=e(c,"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(i,h,u,c){u===null&&c===null?(i.frameRate=24,i.duration=24/h*1e3):u&&c===null?(i.duration=u,i.frameRate=h/(u/1e3)):(i.frameRate=c,i.duration=h/c*1e3),i.msPerFrame=1e3/i.frameRate},addFrame:function(i){return this.addFrameAt(this.frames.length,i)},addFrameAt:function(i,h){var u=this.getFrames(this.manager.textureManager,h);if(u.length>0){if(i===0)this.frames=u.concat(this.frames);else if(i===this.frames.length)this.frames=this.frames.concat(u);else{var c=this.frames.slice(0,i),v=this.frames.slice(i);this.frames=c.concat(u,v)}this.updateFrameSequence()}return this},checkFrame:function(i){return i>=0&&i0){T.isLast=!0,T.nextFrame=v[0],v[0].prevFrame=T;var G=1/(v.length-1);for(S=0;S0?i.inReverse&&i.forward?i.forward=!1:this.repeatAnimation(i):i.complete():this.updateAndGetNextTick(i,h.nextFrame)},handleYoyoFrame:function(i,h){if(h||(h=!1),i.inReverse===!h&&i.repeatCounter>0){(i.repeatDelay===0||i.pendingRepeat)&&(i.forward=h),this.repeatAnimation(i);return}if(i.inReverse!==h&&i.repeatCounter===0){i.complete();return}i.forward=h;var u=h?i.currentFrame.nextFrame:i.currentFrame.prevFrame;this.updateAndGetNextTick(i,u)},getLastFrame:function(){return this.frames[this.frames.length-1]},previousFrame:function(i){var h=i.currentFrame;h.isFirst?i.yoyo?this.handleYoyoFrame(i,!0):i.repeatCounter>0?i.inReverse&&!i.forward?this.repeatAnimation(i):(i.forward=!0,this.repeatAnimation(i)):i.complete():this.updateAndGetNextTick(i,h.prevFrame)},updateAndGetNextTick:function(i,h){i.setCurrentFrame(h),this.getNextTick(i)},removeFrame:function(i){var h=this.frames.indexOf(i);return h!==-1&&this.removeFrameAt(h),this},removeFrameAt:function(i){return this.frames.splice(i,1),this.updateFrameSequence(),this},repeatAnimation:function(i){if(i._pendingStop===2){if(i._pendingStopValue===0)return i.stop();i._pendingStopValue--}i.repeatDelay>0&&!i.pendingRepeat?(i.pendingRepeat=!0,i.accumulator-=i.nextTick,i.nextTick+=i.repeatDelay):(i.repeatCounter--,i.forward?i.setCurrentFrame(i.currentFrame.nextFrame):i.setCurrentFrame(i.currentFrame.prevFrame),i.isPlaying&&(this.getNextTick(i),i.handleRepeat()))},toJSON:function(){var i={key:this.key,type:this.type,frames:[],frameRate:this.frameRate,duration:this.duration,skipMissedFrames:this.skipMissedFrames,delay:this.delay,repeat:this.repeat,repeatDelay:this.repeatDelay,yoyo:this.yoyo,showBeforeDelay:this.showBeforeDelay,showOnStart:this.showOnStart,randomFrame:this.randomFrame,hideOnComplete:this.hideOnComplete};return this.frames.forEach(function(h){i.frames.push(h.toJSON())}),i},updateFrameSequence:function(){for(var i=this.frames.length,h=1/(i-1),u,c=0;c1?(u.isLast=!0,u.prevFrame=this.frames[i-2],u.nextFrame=this.frames[0]):i>1&&(u.prevFrame=this.frames[c-1],u.nextFrame=this.frames[c+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 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),p=new a({initialize:function(s,r,e,n,l){l===void 0&&(l=!1),this.textureKey=s,this.textureFrame=r,this.index=e,this.frame=n,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0,this.isKeyFrame=l},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration,keyframe:this.isKeyFrame}},destroy:function(){this.frame=void 0}});d.exports=p},60848:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(42099),p=t(83419),o=t(90330),s=t(50792),r=t(74943),e=t(8443),n=t(95540),l=t(35154),i=t(36383),h=t(20283),u=t(41836),c=new p({Extends:s,initialize:function(m){s.call(this),this.game=m,this.textureManager=null,this.globalTimeScale=1,this.anims=new o,this.mixes=new o,this.paused=!1,this.name="AnimationManager",m.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(v,m,T){var C=this.anims,S=this.mixes,P=typeof v=="string"?v:v.key,A=typeof m=="string"?m:m.key;if(C.has(P)&&C.has(A)){var L=S.get(P);L||(L={}),L[A]=T,S.set(P,L)}return this},removeMix:function(v,m){var T=this.mixes,C=typeof v=="string"?v:v.key,S=T.get(C);if(S)if(m){var P=typeof m=="string"?m:m.key;S.hasOwnProperty(P)&&delete S[P]}else m||T.delete(C);return this},getMix:function(v,m){var T=this.mixes,C=typeof v=="string"?v:v.key,S=typeof m=="string"?m:m.key,P=T.get(C);return P&&P.hasOwnProperty(S)?P[S]:0},add:function(v,m){return this.anims.has(v)?(console.warn("Animation key exists: "+v),this):(m.key=v,this.anims.set(v,m),this.emit(r.ADD_ANIMATION,v,m),this)},exists:function(v){return this.anims.has(v)},createFromAseprite:function(v,m,T){var C=[],S=this.game.cache.json.get(v);if(!S)return console.warn("No Aseprite data found for: "+v),C;var P=this,A=l(S,"meta",null),L=l(S,"frames",null);if(A&&L){var F=l(A,"frameTags",[]);F.forEach(function(I){var D=[],B=n(I,"name",null),G=n(I,"from",0),z=n(I,"to",0),W=n(I,"direction","forward");if(B&&(!m||m&&m.indexOf(B)>-1)){for(var Y=0,K=G;K<=z;K++){var Z=K.toString(),V=L[Z];if(V){var H=n(V,"duration",i.MAX_SAFE_INTEGER);D.push({key:v,frame:Z,duration:H}),Y+=H}}W==="reverse"&&(D=D.reverse());var N={key:B,frames:D,duration:Y,yoyo:W==="pingpong"},U;T?T.anims&&(U=T.anims.create(N)):U=P.create(N),U&&C.push(U)}})}return C},create:function(v){var m=v.key,T=!1;return m&&(T=this.get(m),T?console.warn("AnimationManager key already exists: "+m):(T=new a(this,m,v),this.anims.set(m,T),this.emit(r.ADD_ANIMATION,m,T))),T},fromJSON:function(v,m){m===void 0&&(m=!1),m&&this.anims.clear(),typeof v=="string"&&(v=JSON.parse(v));var T=[];if(v.hasOwnProperty("anims")&&Array.isArray(v.anims)){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(42099),p=t(30976),o=t(83419),s=t(90330),r=t(74943),e=t(95540),n=new o({initialize:function(i){this.parent=i,this.animationManager=i.scene.sys.anims,this.animationManager.on(r.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(l){var i=this.parent;if(l===void 0)return this.nextAnimsQueue.length=0,this.nextAnim=null,i;Array.isArray(l)||(l=[l]);for(var h=0;hc&&(T=0),this.randomFrame&&(T=p(0,c-1));var C=u.frames[T];T===0&&!this.forward&&(C=u.getLastFrame()),this.currentFrame=C}return this.parent},pause:function(l){return this._paused||(this._paused=!0,this._wasPlaying=this.isPlaying,this.isPlaying=!1),l!==void 0&&this.setCurrentFrame(l),this.parent},resume:function(l){return this._paused&&(this._paused=!1,this.isPlaying=this._wasPlaying),l!==void 0&&this.setCurrentFrame(l),this.parent},playAfterDelay:function(l,i){if(!this.isPlaying)this.delayCounter=i,this.play(l,!0);else{var h=this.nextAnim,u=this.nextAnimsQueue;h&&u.unshift(h),this.nextAnim=l,this._pendingStop=1,this._pendingStopValue=i}return this.parent},playAfterRepeat:function(l,i){if(i===void 0&&(i=1),!this.isPlaying)this.play(l);else{var h=this.nextAnim,u=this.nextAnimsQueue;h&&u.unshift(h),this.repeatCounter!==-1&&i>this.repeatCounter&&(i=this.repeatCounter),this.nextAnim=l,this._pendingStop=2,this._pendingStopValue=i}return this.parent},play:function(l,i){i===void 0&&(i=!1);var h=this.currentAnim,u=this.parent,c=typeof l=="string"?l:l.key;if(i&&this.isPlaying&&h.key===c)return u;if(h&&this.isPlaying){var v=this.animationManager.getMix(h.key,l);if(v>0)return this.playAfterDelay(l,v)}return this.forward=!0,this.inReverse=!1,this._paused=!1,this._wasPlaying=!0,this.startAnimation(l)},playReverse:function(l,i){i===void 0&&(i=!1);var h=typeof l=="string"?l:l.key;return i&&this.isPlaying&&this.currentAnim.key===h?this.parent:(this.forward=!1,this.inReverse=!0,this._paused=!1,this._wasPlaying=!0,this.startAnimation(l))},startAnimation:function(l){this.load(l);var i=this.currentAnim,h=this.parent;return i&&(this.repeatCounter=this.repeat===-1?Number.MAX_VALUE:this.repeat,i.getFirstTick(this),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!1,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.delayCounter+=this.delay,this.delayCounter===0?this.handleStart():this.showBeforeDelay&&this.setCurrentFrame(this.currentFrame)),h},handleStart:function(){this.showOnStart&&this.parent.setVisible(!0),this.setCurrentFrame(this.currentFrame),this.hasStarted=!0,this.emitEvents(r.ANIMATION_START)},handleRepeat:function(){this.pendingRepeat=!1,this.emitEvents(r.ANIMATION_REPEAT)},handleStop:function(){this._pendingStop=0,this.isPlaying=!1,this.emitEvents(r.ANIMATION_STOP)},handleComplete:function(){this._pendingStop=0,this.isPlaying=!1,this.hideOnComplete&&this.parent.setVisible(!1),this.emitEvents(r.ANIMATION_COMPLETE,r.ANIMATION_COMPLETE_KEY)},emitEvents:function(l,i){var h=this.currentAnim;if(h){var u=this.currentFrame,c=this.parent,v=u.textureFrame;c.emit(l,h,u,c,v),i&&c.emit(i+h.key,h,u,c,v)}},reverse:function(){return this.isPlaying&&(this.inReverse=!this.inReverse,this.forward=!this.forward),this.parent},getProgress:function(){var l=this.currentFrame;if(!l)return 0;var i=l.progress;return this.inReverse&&(i*=-1),i},setProgress:function(l){return this.forward||(l=1-l),this.setCurrentFrame(this.currentAnim.getFrameByProgress(l)),this.parent},setRepeat:function(l){return this.repeatCounter=l===-1?Number.MAX_VALUE:l,this.parent},globalRemove:function(l,i){i===void 0&&(i=this.currentAnim),this.isPlaying&&i.key===this.currentAnim.key&&(this.stop(),this.setCurrentFrame(this.currentAnim.frames[0]))},restart:function(l,i){l===void 0&&(l=!1),i===void 0&&(i=!1);var h=this.currentAnim,u=this.parent;return h?(i&&(this.repeatCounter=this.repeat===-1?Number.MAX_VALUE:this.repeat),h.getFirstTick(this),this.emitEvents(r.ANIMATION_RESTART),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!l,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.setCurrentFrame(h.frames[0]),this.parent):u},complete:function(){if(this._pendingStop=0,this.isPlaying=!1,this.currentAnim&&this.handleComplete(),this.nextAnim){var l=this.nextAnim;this.nextAnim=this.nextAnimsQueue.length>0?this.nextAnimsQueue.shift():null,this.play(l)}return this.parent},stop:function(){if(this._pendingStop=0,this.isPlaying=!1,this.delayCounter=0,this.currentAnim&&this.handleStop(),this.nextAnim){var l=this.nextAnim;this.nextAnim=this.nextAnimsQueue.shift(),this.play(l)}return this.parent},stopAfterDelay:function(l){return this._pendingStop=1,this._pendingStopValue=l,this.parent},stopAfterRepeat:function(l){return l===void 0&&(l=1),this.repeatCounter!==-1&&l>this.repeatCounter&&(l=this.repeatCounter),this._pendingStop=2,this._pendingStopValue=l,this.parent},stopOnFrame:function(l){return this._pendingStop=3,this._pendingStopValue=l,this.parent},getTotalFrames:function(){return this.currentAnim?this.currentAnim.getTotalFrames():0},update:function(l,i){var h=this.currentAnim;if(!(!this.isPlaying||!h||h.paused)){if(this.accumulator+=i*this.timeScale*this.animationManager.globalTimeScale,this._pendingStop===1&&(this._pendingStopValue-=i,this._pendingStopValue<=0))return this.stop();if(!this.hasStarted)this.accumulator>=this.delayCounter&&(this.accumulator-=this.delayCounter,this.handleStart());else if(this.accumulator>=this.nextTick&&(this.forward?h.nextFrame(this):h.previousFrame(this),this.isPlaying&&this._pendingStop===0&&this.skipMissedFrames&&this.accumulator>this.nextTick)){var u=0;do this.forward?h.nextFrame(this):h.previousFrame(this),u++;while(this.isPlaying&&this.accumulator>this.nextTick&&u<60)}}},setCurrentFrame:function(l){var i=this.parent;return this.currentFrame=l,i.texture=l.frame.texture,i.frame=l.frame,i.isCropped&&i.frame.updateCropUVs(i._crop,i.flipX,i.flipY),l.setAlpha&&(i.alpha=l.alpha),i.setSizeToFrame(),i._originComponent&&(l.frame.customPivot?i.setOrigin(l.frame.pivotX,l.frame.pivotY):i.updateDisplayOrigin()),this.isPlaying&&this.hasStarted&&(this.emitEvents(r.ANIMATION_UPDATE),this._pendingStop===3&&this._pendingStopValue===l&&this.stop()),i},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},get:function(l){return this.anims?this.anims.get(l):null},exists:function(l){return this.anims?this.anims.has(l):!1},create:function(l){var i=l.key,h=!1;return i&&(h=this.get(i),h?console.warn("Animation key already exists: "+i):(h=new a(this,i,l),this.anims||(this.anims=new s),this.anims.set(i,h))),h},createFromAseprite:function(l,i){return this.animationManager.createFromAseprite(l,i,this.parent)},generateFrameNames:function(l,i){return this.animationManager.generateFrameNames(l,i)},generateFrameNumbers:function(l,i){return this.animationManager.generateFrameNumbers(l,i)},remove:function(l){var i=this.get(l);return i&&(this.currentAnim===i&&this.stop(),this.anims.delete(l)),i},destroy:function(){this.animationManager.off(r.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}}});d.exports=n},57090:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="add"},25312:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="animationcomplete"},89580:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="animationcomplete-"},52860:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="animationrepeat"},63850:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="animationrestart"},99085:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="animationstart"},28087:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="animationstop"},1794:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="animationupdate"},52562:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="pauseall"},57953:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="remove"},68339:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="resumeall"},74943:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.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:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports={Animation:t(42099),AnimationFrame:t(41138),AnimationManager:t(60848),AnimationState:t(9674),Events:t(74943)}},2161:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(90330),o=t(50792),s=t(24736),r=new a({initialize:function(){this.entries=new p,this.events=new o},add:function(e,n){return this.entries.set(e,n),this.events.emit(s.ADD,this,e,n),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 n=this.get(e);return n&&(this.entries.delete(e),this.events.emit(s.REMOVE,this,e,n.data)),this},getKeys:function(){return this.entries.keys()},destroy:function(){this.entries.clear(),this.events.removeAllListeners(),this.entries=null,this.events=null}});d.exports=r},24047:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(2161),p=t(83419),o=t(8443),s=new p({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(r){return this.custom.hasOwnProperty(r)||(this.custom[r]=new a),this.custom[r]},destroy:function(){for(var r=["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} + */d.exports="add"},59261:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="remove"},24736:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports={ADD:t(51464),REMOVE:t(59261)}},83388:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports={BaseCache:t(2161),CacheManager:t(24047),Events:t(24736)}},71911:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(31401),o=t(39506),s=t(50792),r=t(19715),e=t(87841),n=t(61340),l=t(80333),i=t(26099),h=new a({Extends:s,Mixins:[p.AlphaSingle,p.Visible],initialize:function(c,v,m,T){c===void 0&&(c=0),v===void 0&&(v=0),m===void 0&&(m=0),T===void 0&&(T=0),s.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=c,this._y=v,this._width=m,this._height=T,this._bounds=new e,this._scrollX=0,this._scrollY=0,this._zoomX=1,this._zoomY=1,this._rotation=0,this.matrix=new n,this.transparent=!0,this.backgroundColor=l("rgba(0,0,0,0)"),this.disableCull=!1,this.culledObjects=[],this.midPoint=new i(m/2,T/2),this.originX=.5,this.originY=.5,this._customViewport=!1,this.mask=null,this._maskCamera=null,this.renderList=[],this.isSceneCamera=!0},addToRenderList:function(u){this.renderList.push(u)},setOrigin:function(u,c){return u===void 0&&(u=.5),c===void 0&&(c=u),this.originX=u,this.originY=c,this},getScroll:function(u,c,v){v===void 0&&(v=new i);var m=this.width*.5,T=this.height*.5;return v.x=u-m,v.y=c-T,this.useBounds&&(v.x=this.clampX(v.x),v.y=this.clampY(v.y)),v},centerOnX:function(u){var c=this.width*.5;return this.midPoint.x=u,this.scrollX=u-c,this.useBounds&&(this.scrollX=this.clampX(this.scrollX)),this},centerOnY:function(u){var c=this.height*.5;return this.midPoint.y=u,this.scrollY=u-c,this.useBounds&&(this.scrollY=this.clampY(this.scrollY)),this},centerOn:function(u,c){return this.centerOnX(u),this.centerOnY(c),this},centerToBounds:function(){if(this.useBounds){var u=this._bounds,c=this.width*.5,v=this.height*.5;this.midPoint.set(u.centerX,u.centerY),this.scrollX=u.centerX-c,this.scrollY=u.centerY-v}return this},centerToSize:function(){return this.scrollX=this.width*.5,this.scrollY=this.height*.5,this},cull:function(u){if(this.disableCull)return u;var c=this.matrix.matrix,v=c[0],m=c[1],T=c[2],C=c[3],S=v*C-m*T;if(!S)return u;var P=c[4],A=c[5],L=this.scrollX,F=this.scrollY,I=this.width,D=this.height,B=this.y,G=B+D,z=this.x,W=z+I,Y=this.culledObjects,K=u.length;S=1/S,Y.length=0;for(var Z=0;Zz&&$B&&kT&&(u=T),u},clampY:function(u){var c=this._bounds,v=this.displayHeight,m=c.y+(v-this.height)/2,T=Math.max(m,m+c.height-v);return uT&&(u=T),u},removeBounds:function(){return this.useBounds=!1,this.dirty=!0,this._bounds.setEmpty(),this},setAngle:function(u){return u===void 0&&(u=0),this.rotation=o(u),this},setBackgroundColor:function(u){return u===void 0&&(u="rgba(0,0,0,0)"),this.backgroundColor=l(u),this.transparent=this.backgroundColor.alpha===0,this},setBounds:function(u,c,v,m,T){return T===void 0&&(T=!1),this._bounds.setTo(u,c,v,m),this.dirty=!0,this.useBounds=!0,T?this.centerToBounds():(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},getBounds:function(u){u===void 0&&(u=new e);var c=this._bounds;return u.setTo(c.x,c.y,c.width,c.height),u},setName:function(u){return u===void 0&&(u=""),this.name=u,this},setPosition:function(u,c){return c===void 0&&(c=u),this.x=u,this.y=c,this},setRotation:function(u){return u===void 0&&(u=0),this.rotation=u,this},setRoundPixels:function(u){return this.roundPixels=u,this},setScene:function(u,c){c===void 0&&(c=!0),this.scene&&this._customViewport&&this.sceneManager.customViewports--,this.scene=u,this.isSceneCamera=c;var v=u.sys;return this.sceneManager=v.game.scene,this.scaleManager=v.scale,this.cameraManager=v.cameras,this.updateSystem(),this},setScroll:function(u,c){return c===void 0&&(c=u),this.scrollX=u,this.scrollY=c,this},setSize:function(u,c){return c===void 0&&(c=u),this.width=u,this.height=c,this},setViewport:function(u,c,v,m){return this.x=u,this.y=c,this.width=v,this.height=m,this},setZoom:function(u,c){return u===void 0&&(u=1),c===void 0&&(c=u),u===0&&(u=.001),c===0&&(c=.001),this.zoomX=u,this.zoomY=c,this},setMask:function(u,c){return c===void 0&&(c=!0),this.mask=u,this._maskCamera=c?this.cameraManager.default:this,this},clearMask:function(u){return u===void 0&&(u=!1),u&&this.mask&&this.mask.destroy(),this.mask=null,this},toJSON:function(){var u={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&&(u.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),u},update:function(){},setIsSceneCamera:function(u){return this.isSceneCamera=u,this},updateSystem:function(){if(!(!this.scaleManager||!this.isSceneCamera)){var u=this._x!==0||this._y!==0||this.scaleManager.width!==this._width||this.scaleManager.height!==this._height,c=this.sceneManager;u&&!this._customViewport?c.customViewports++:!u&&this._customViewport&&c.customViewports--,this.dirty=!0,this._customViewport=u}},destroy:function(){this.emit(r.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(u){this._x=u,this.updateSystem()}},y:{get:function(){return this._y},set:function(u){this._y=u,this.updateSystem()}},width:{get:function(){return this._width},set:function(u){this._width=u,this.updateSystem()}},height:{get:function(){return this._height},set:function(u){this._height=u,this.updateSystem()}},scrollX:{get:function(){return this._scrollX},set:function(u){u!==this._scrollX&&(this._scrollX=u,this.dirty=!0)}},scrollY:{get:function(){return this._scrollY},set:function(u){u!==this._scrollY&&(this._scrollY=u,this.dirty=!0)}},zoom:{get:function(){return(this._zoomX+this._zoomY)/2},set:function(u){this._zoomX=u,this._zoomY=u,this.dirty=!0}},zoomX:{get:function(){return this._zoomX},set:function(u){this._zoomX=u,this.dirty=!0}},zoomY:{get:function(){return this._zoomY},set:function(u){this._zoomY=u,this.dirty=!0}},rotation:{get:function(){return this._rotation},set:function(u){this._rotation=u,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}}});d.exports=h},38058:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(71911),p=t(67502),o=t(45319),s=t(83419),r=t(31401),e=t(20052),n=t(19715),l=t(28915),i=t(87841),h=t(26099),u=new s({Extends:a,Mixins:[r.PostPipeline],initialize:function(v,m,T,C){a.call(this,v,m,T,C),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 h(1,1),this.followOffset=new h,this.deadzone=null,this._follow=null},setDeadzone:function(c,v){if(c===void 0)this.deadzone=null;else{if(this.deadzone?(this.deadzone.width=c,this.deadzone.height=v):this.deadzone=new i(0,0,c,v),this._follow){var m=this.width/2,T=this.height/2,C=this._follow.x-this.followOffset.x,S=this._follow.y-this.followOffset.y;this.midPoint.set(C,S),this.scrollX=C-m,this.scrollY=S-T}p(this.deadzone,this.midPoint.x,this.midPoint.y)}return this},fadeIn:function(c,v,m,T,C,S){return this.fadeEffect.start(!1,c,v,m,T,!0,C,S)},fadeOut:function(c,v,m,T,C,S){return this.fadeEffect.start(!0,c,v,m,T,!0,C,S)},fadeFrom:function(c,v,m,T,C,S,P){return this.fadeEffect.start(!1,c,v,m,T,C,S,P)},fade:function(c,v,m,T,C,S,P){return this.fadeEffect.start(!0,c,v,m,T,C,S,P)},flash:function(c,v,m,T,C,S,P){return this.flashEffect.start(c,v,m,T,C,S,P)},shake:function(c,v,m,T,C){return this.shakeEffect.start(c,v,m,T,C)},pan:function(c,v,m,T,C,S,P){return this.panEffect.start(c,v,m,T,C,S,P)},rotateTo:function(c,v,m,T,C,S,P){return this.rotateToEffect.start(c,v,m,T,C,S,P)},zoomTo:function(c,v,m,T,C,S){return this.zoomEffect.start(c,v,m,T,C,S)},preRender:function(){this.renderList.length=0;var c=this.width,v=this.height,m=c*.5,T=v*.5,C=this.zoom,S=this.matrix,P=c*this.originX,A=v*this.originY,L=this._follow,F=this.deadzone,I=this.scrollX,D=this.scrollY;F&&p(F,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;F?(zF.right&&(I=l(I,I+(z-F.right),G.x)),WF.bottom&&(D=l(D,D+(W-F.bottom),G.y))):(I=l(I,z-P,G.x),D=l(D,W-A,G.y)),B=!0}this.useBounds&&(I=this.clampX(I),D=this.clampY(D)),this.scrollX=I,this.scrollY=D;var Y=I+m,K=D+T;this.midPoint.set(Y,K);var Z=c/C,V=v/C,H=Math.floor(Y-Z/2),N=Math.floor(K-V/2);this.worldView.setTo(H,N,Z,V),S.applyITRS(Math.floor(this.x+P),Math.floor(this.y+A),this.rotation,C,C),S.translate(-P,-A),this.shakeEffect.preRender(),B&&this.emit(n.FOLLOW_UPDATE,this,L)},setLerp:function(c,v){return c===void 0&&(c=1),v===void 0&&(v=c),this.lerp.set(c,v),this},setFollowOffset:function(c,v){return c===void 0&&(c=0),v===void 0&&(v=0),this.followOffset.set(c,v),this},startFollow:function(c,v,m,T,C,S){v===void 0&&(v=!1),m===void 0&&(m=1),T===void 0&&(T=m),C===void 0&&(C=0),S===void 0&&(S=C),this._follow=c,this.roundPixels=v,m=o(m,0,1),T=o(T,0,1),this.lerp.set(m,T),this.followOffset.set(C,S);var P=this.width/2,A=this.height/2,L=c.x-C,F=c.y-S;return this.midPoint.set(L,F),this.scrollX=L-P,this.scrollY=F-A,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(c,v){this.visible&&(this.rotateToEffect.update(c,v),this.panEffect.update(c,v),this.zoomEffect.update(c,v),this.shakeEffect.update(c,v),this.flashEffect.update(c,v),this.fadeEffect.update(c,v))},destroy:function(){this.resetFX(),a.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});d.exports=u},32743:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(38058),p=t(83419),o=t(95540),s=t(37277),r=t(37303),e=t(97480),n=t(44594),l=new p({initialize:function(h){this.scene=h,this.systems=h.sys,this.roundPixels=h.sys.game.config.roundPixels,this.cameras=[],this.main,this.default,h.sys.events.once(n.BOOT,this.boot,this),h.sys.events.on(n.START,this.start,this)},boot:function(){var i=this.systems;i.settings.cameras?this.fromJSON(i.settings.cameras):this.add(),this.main=this.cameras[0],this.default=new a(0,0,i.scale.width,i.scale.height).setScene(this.scene),i.game.scale.on(e.RESIZE,this.onResize,this),this.systems.events.once(n.DESTROY,this.destroy,this)},start:function(){if(!this.main){var i=this.systems;i.settings.cameras?this.fromJSON(i.settings.cameras):this.add(),this.main=this.cameras[0]}var h=this.systems.events;h.on(n.UPDATE,this.update,this),h.once(n.SHUTDOWN,this.shutdown,this)},add:function(i,h,u,c,v,m){i===void 0&&(i=0),h===void 0&&(h=0),u===void 0&&(u=this.scene.sys.scale.width),c===void 0&&(c=this.scene.sys.scale.height),v===void 0&&(v=!1),m===void 0&&(m="");var T=new a(i,h,u,c);return T.setName(m),T.setScene(this.scene),T.setRoundPixels(this.roundPixels),T.id=this.getNextID(),this.cameras.push(T),v&&(this.main=T),T},addExisting:function(i,h){h===void 0&&(h=!1);var u=this.cameras.indexOf(i);return u===-1?(i.id=this.getNextID(),i.setRoundPixels(this.roundPixels),this.cameras.push(i),h&&(this.main=i),i):null},getNextID:function(){for(var i=this.cameras,h=1,u=0;u<32;u++){for(var c=!1,v=0;v0){m.preRender();var T=this.getVisibleChildren(h.getChildren(),m);i.render(u,T,m)}}},getVisibleChildren:function(i,h){return i.filter(function(u){return u.willRender(h)})},resetAll:function(){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(45319),p=t(83419),o=t(19715),s=new p({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(r,e,n,l,i,h,u,c){if(r===void 0&&(r=!0),e===void 0&&(e=1e3),n===void 0&&(n=0),l===void 0&&(l=0),i===void 0&&(i=0),h===void 0&&(h=!1),u===void 0&&(u=null),c===void 0&&(c=this.camera.scene),!h&&this.isRunning)return this.camera;this.isRunning=!0,this.isComplete=!1,this.duration=e,this.direction=r,this.progress=0,this.red=n,this.green=l,this.blue=i,this.alpha=r?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=u,this._onUpdateScope=c;var v=r?o.FADE_OUT_START:o.FADE_IN_START;return this.camera.emit(v,this.camera,this,e,n,l,i),this.camera},update:function(r,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),p=t(83419),o=t(19715),s=new p({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(r,e,n,l,i,h,u){return r===void 0&&(r=250),e===void 0&&(e=255),n===void 0&&(n=255),l===void 0&&(l=255),i===void 0&&(i=!1),h===void 0&&(h=null),u===void 0&&(u=this.camera.scene),!i&&this.isRunning?this.camera:(this.isRunning=!0,this.duration=r,this.progress=0,this.red=e,this.green=n,this.blue=l,this._alpha=this.alpha,this._elapsed=0,this._onUpdate=h,this._onUpdateScope=u,this.camera.emit(o.FLASH_START,this.camera,this,r,e,n,l),this.camera)},update:function(r,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),p=t(83419),o=t(62640),s=t(19715),r=t(26099),e=new p({initialize:function(l){this.camera=l,this.isRunning=!1,this.duration=0,this.source=new r,this.current=new r,this.destination=new r,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(n,l,i,h,u,c,v){i===void 0&&(i=1e3),h===void 0&&(h=o.Linear),u===void 0&&(u=!1),c===void 0&&(c=null),v===void 0&&(v=this.camera.scene);var m=this.camera;return!u&&this.isRunning||(this.isRunning=!0,this.duration=i,this.progress=0,this.source.set(m.scrollX,m.scrollY),this.destination.set(n,l),m.getScroll(n,l,this.current),typeof h=="string"&&o.hasOwnProperty(h)?this.ease=o[h]:typeof h=="function"&&(this.ease=h),this._elapsed=0,this._onUpdate=c,this._onUpdateScope=v,this.camera.emit(s.PAN_START,this.camera,this,i,n,l)),m},update:function(n,l){if(this.isRunning){this._elapsed+=l;var i=a(this._elapsed/this.duration,0,1);this.progress=i;var h=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),p=t(83419),o=t(19715),s=t(62640),r=new p({initialize:function(n){this.camera=n,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,n,l,i,h,u,c){l===void 0&&(l=1e3),i===void 0&&(i=s.Linear),h===void 0&&(h=!1),u===void 0&&(u=null),c===void 0&&(c=this.camera.scene),n===void 0&&(n=!1),this.shortestPath=n;var v=e;e<0?(v=-1*e,this.clockwise=!1):this.clockwise=!0;var m=360*Math.PI/180;v=v-Math.floor(v/m)*m;var T=this.camera;if(!h&&this.isRunning)return T;if(this.isRunning=!0,this.duration=l,this.progress=0,this.source=T.rotation,this.destination=v,typeof i=="string"&&s.hasOwnProperty(i)?this.ease=s[i]:typeof i=="function"&&(this.ease=i),this._elapsed=0,this._onUpdate=u,this._onUpdateScope=c,this.shortestPath){var C=0,S=0;this.destination>this.source?C=Math.abs(this.destination-this.source):C=Math.abs(this.destination+m)-this.source,this.source>this.destination?S=Math.abs(this.source-this.destination):S=Math.abs(this.source+m)-this.destination,CS&&(this.clockwise=!1)}return this.camera.emit(o.ROTATE_START,this.camera,this,l,v),T},update:function(e,n){if(this.isRunning){this._elapsed+=n;var l=a(this._elapsed/this.duration,0,1);this.progress=l;var i=this.camera;if(this._elapsed=m?u=Math.abs(v-m):u=Math.abs(v+c)-m;var T=0;this.clockwise?T=i.rotation+u*h:T=i.rotation-u*h,i.rotation=T,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,i,l,T)}else i.rotation=this.destination,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,i,l,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}});d.exports=r},30330:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(45319),p=t(83419),o=t(19715),s=t(26099),r=new p({initialize:function(n){this.camera=n,this.isRunning=!1,this.duration=0,this.intensity=new s,this.progress=0,this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate,this._onUpdateScope},start:function(e,n,l,i,h){return e===void 0&&(e=100),n===void 0&&(n=.05),l===void 0&&(l=!1),i===void 0&&(i=null),h===void 0&&(h=this.camera.scene),!l&&this.isRunning?this.camera:(this.isRunning=!0,this.duration=e,this.progress=0,typeof n=="number"?this.intensity.set(n):this.intensity.set(n.x,n.y),this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate=i,this._onUpdateScope=h,this.camera.emit(o.SHAKE_START,this.camera,this,e,n),this.camera)},preRender:function(){this.isRunning&&this.camera.matrix.translate(this._offsetX,this._offsetY)},update:function(e,n){if(this.isRunning)if(this._elapsed+=n,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),p=t(83419),o=t(62640),s=t(19715),r=new p({initialize:function(n){this.camera=n,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,n,l,i,h,u){n===void 0&&(n=1e3),l===void 0&&(l=o.Linear),i===void 0&&(i=!1),h===void 0&&(h=null),u===void 0&&(u=this.camera.scene);var c=this.camera;return!i&&this.isRunning||(this.isRunning=!0,this.duration=n,this.progress=0,this.source=c.zoom,this.destination=e,typeof l=="string"&&o.hasOwnProperty(l)?this.ease=o[l]:typeof l=="function"&&(this.ease=l),this._elapsed=0,this._onUpdate=h,this._onUpdateScope=u,this.camera.emit(s.ZOOM_START,this.camera,this,n,e)),c},update:function(e,n){this.isRunning&&(this._elapsed+=n,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} + */d.exports={Fade:t(5020),Flash:t(10662),Pan:t(20359),Shake:t(30330),RotateTo:t(34208),Zoom:t(45641)}},16438:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="cameradestroy"},32726:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="camerafadeincomplete"},87807:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="camerafadeinstart"},45917:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="camerafadeoutcomplete"},95666:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="camerafadeoutstart"},47056:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="cameraflashcomplete"},91261:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="cameraflashstart"},45047:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="followupdate"},81927:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="camerapancomplete"},74264:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="camerapanstart"},54419:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="postrender"},79330:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="prerender"},93183:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="camerarotatecomplete"},80112:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="camerarotatestart"},62252:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="camerashakecomplete"},86017:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="camerashakestart"},539:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="camerazoomcomplete"},51892:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="camerazoomstart"},19715:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.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:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports={Camera:t(38058),BaseCamera:t(71911),CameraManager:t(32743),Effects:t(20052),Events:t(19715)}},63091:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(35154),o=new a({initialize:function(r){this.camera=p(r,"camera",null),this.left=p(r,"left",null),this.right=p(r,"right",null),this.up=p(r,"up",null),this.down=p(r,"down",null),this.zoomIn=p(r,"zoomIn",null),this.zoomOut=p(r,"zoomOut",null),this.zoomSpeed=p(r,"zoomSpeed",.01),this.minZoom=p(r,"minZoom",.001),this.maxZoom=p(r,"maxZoom",1e3),this.speedX=0,this.speedY=0;var e=p(r,"speed",null);typeof e=="number"?(this.speedX=e,this.speedY=e):(this.speedX=p(r,"speed.x",0),this.speedY=p(r,"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(s){return this.camera=s,this},update:function(s){if(this.active){s===void 0&&(s=1);var r=this.camera;this.up&&this.up.isDown?r.scrollY-=this.speedY*s|0:this.down&&this.down.isDown&&(r.scrollY+=this.speedY*s|0),this.left&&this.left.isDown?r.scrollX-=this.speedX*s|0:this.right&&this.right.isDown&&(r.scrollX+=this.speedX*s|0),this.zoomIn&&this.zoomIn.isDown?(r.zoom-=this.zoomSpeed,r.zoomthis.maxZoom&&(r.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}});d.exports=o},58818:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(35154),o=new a({initialize:function(r){this.camera=p(r,"camera",null),this.left=p(r,"left",null),this.right=p(r,"right",null),this.up=p(r,"up",null),this.down=p(r,"down",null),this.zoomIn=p(r,"zoomIn",null),this.zoomOut=p(r,"zoomOut",null),this.zoomSpeed=p(r,"zoomSpeed",.01),this.minZoom=p(r,"minZoom",.001),this.maxZoom=p(r,"maxZoom",1e3),this.accelX=0,this.accelY=0;var e=p(r,"acceleration",null);typeof e=="number"?(this.accelX=e,this.accelY=e):(this.accelX=p(r,"acceleration.x",0),this.accelY=p(r,"acceleration.y",0)),this.dragX=0,this.dragY=0;var n=p(r,"drag",null);typeof n=="number"?(this.dragX=n,this.dragY=n):(this.dragX=p(r,"drag.x",0),this.dragY=p(r,"drag.y",0)),this.maxSpeedX=0,this.maxSpeedY=0;var l=p(r,"maxSpeed",null);typeof l=="number"?(this.maxSpeedX=l,this.maxSpeedY=l):(this.maxSpeedX=p(r,"maxSpeed.x",0),this.maxSpeedY=p(r,"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(s){return this.camera=s,this},update:function(s){if(this.active){s===void 0&&(s=1);var r=this.camera;this._speedX>0?(this._speedX-=this.dragX*s,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*s,this._speedX>0&&(this._speedX=0)),this._speedY>0?(this._speedY-=this.dragY*s,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*s,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&&(r.scrollX-=this._speedX*s|0),this._speedY!==0&&(r.scrollY-=this._speedY*s|0),this._zoom!==0&&(r.zoom+=this._zoom,r.zoomthis.maxZoom&&(r.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}});d.exports=o},38865:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports={FixedKeyControl:t(63091),SmoothedKeyControl:t(58818)}},26638:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports={Controls:t(38865),Scene2D:t(87969)}},8054:(d,x,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};d.exports=a},69547:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(8054),o=t(42363),s=t(82264),r=t(95540),e=t(35154),n=t(41212),l=t(29747),i=t(75508),h=t(36060),u=t(80333),c=new a({initialize:function(m){m===void 0&&(m={});var T=["#ff0000","#ffff00","#00ff00","#00ffff","#000000"],C="#ffffff",S=e(m,"scale",null);this.width=e(S,"width",1024,m),this.height=e(S,"height",768,m),this.zoom=e(S,"zoom",1,m),this.parent=e(S,"parent",void 0,m),this.scaleMode=e(S,S?"mode":"scaleMode",0,m),this.expandParent=e(S,"expandParent",!0,m),this.autoRound=e(S,"autoRound",!1,m),this.autoCenter=e(S,"autoCenter",0,m),this.resizeInterval=e(S,"resizeInterval",500,m),this.fullscreenTarget=e(S,"fullscreenTarget",null,m),this.minWidth=e(S,"min.width",0,m),this.maxWidth=e(S,"max.width",0,m),this.minHeight=e(S,"min.height",0,m),this.maxHeight=e(S,"max.height",0,m),this.snapWidth=e(S,"snap.width",0,m),this.snapHeight=e(S,"snap.height",0,m),this.renderType=e(m,"type",p.AUTO),this.canvas=e(m,"canvas",null),this.context=e(m,"context",null),this.canvasStyle=e(m,"canvasStyle",null),this.customEnvironment=e(m,"customEnvironment",!1),this.sceneConfig=e(m,"scene",null),this.seed=e(m,"seed",[(Date.now()*Math.random()).toString()]),i.RND=new i.RandomDataGenerator(this.seed),this.gameTitle=e(m,"title",""),this.gameURL=e(m,"url","https://phaser.io"),this.gameVersion=e(m,"version",""),this.autoFocus=e(m,"autoFocus",!0),this.stableSort=e(m,"stableSort",-1),this.stableSort===-1&&(this.stableSort=s.browser.es2019?1:0),s.features.stableSort=this.stableSort,this.domCreateContainer=e(m,"dom.createContainer",!1),this.domPointerEvents=e(m,"dom.pointerEvents","none"),this.inputKeyboard=e(m,"input.keyboard",!0),this.inputKeyboardEventTarget=e(m,"input.keyboard.target",window),this.inputKeyboardCapture=e(m,"input.keyboard.capture",[]),this.inputMouse=e(m,"input.mouse",!0),this.inputMouseEventTarget=e(m,"input.mouse.target",null),this.inputMousePreventDefaultDown=e(m,"input.mouse.preventDefaultDown",!0),this.inputMousePreventDefaultUp=e(m,"input.mouse.preventDefaultUp",!0),this.inputMousePreventDefaultMove=e(m,"input.mouse.preventDefaultMove",!0),this.inputMousePreventDefaultWheel=e(m,"input.mouse.preventDefaultWheel",!0),this.inputTouch=e(m,"input.touch",s.input.touch),this.inputTouchEventTarget=e(m,"input.touch.target",null),this.inputTouchCapture=e(m,"input.touch.capture",!0),this.inputActivePointers=e(m,"input.activePointers",1),this.inputSmoothFactor=e(m,"input.smoothFactor",0),this.inputWindowEvents=e(m,"input.windowEvents",!0),this.inputGamepad=e(m,"input.gamepad",!1),this.inputGamepadEventTarget=e(m,"input.gamepad.target",window),this.disableContextMenu=e(m,"disableContextMenu",!1),this.audio=e(m,"audio",{}),this.hideBanner=e(m,"banner",null)===!1,this.hidePhaser=e(m,"banner.hidePhaser",!1),this.bannerTextColor=e(m,"banner.text",C),this.bannerBackgroundColor=e(m,"banner.background",T),this.gameTitle===""&&this.hidePhaser&&(this.hideBanner=!0),this.fps=e(m,"fps",null),this.disablePreFX=e(m,"disablePreFX",!1),this.disablePostFX=e(m,"disablePostFX",!1);var P=e(m,"render",null);this.pipeline=e(P,"pipeline",null,m),this.autoMobilePipeline=e(P,"autoMobilePipeline",!0,m),this.defaultPipeline=e(P,"defaultPipeline",h.MULTI_PIPELINE,m),this.antialias=e(P,"antialias",!0,m),this.antialiasGL=e(P,"antialiasGL",!0,m),this.mipmapFilter=e(P,"mipmapFilter","",m),this.desynchronized=e(P,"desynchronized",!1,m),this.roundPixels=e(P,"roundPixels",!0,m),this.pixelArt=e(P,"pixelArt",this.zoom!==1,m),this.pixelArt&&(this.antialias=!1,this.antialiasGL=!1,this.roundPixels=!0),this.transparent=e(P,"transparent",!1,m),this.clearBeforeRender=e(P,"clearBeforeRender",!0,m),this.preserveDrawingBuffer=e(P,"preserveDrawingBuffer",!1,m),this.premultipliedAlpha=e(P,"premultipliedAlpha",!0,m),this.failIfMajorPerformanceCaveat=e(P,"failIfMajorPerformanceCaveat",!1,m),this.powerPreference=e(P,"powerPreference","default",m),this.batchSize=e(P,"batchSize",4096,m),this.maxTextures=e(P,"maxTextures",-1,m),this.maxLights=e(P,"maxLights",10,m);var A=e(m,"backgroundColor",0);this.backgroundColor=u(A),this.transparent&&(this.backgroundColor=u(0),this.backgroundColor.alpha=0),this.preBoot=e(m,"callbacks.preBoot",l),this.postBoot=e(m,"callbacks.postBoot",l),this.physics=e(m,"physics",{}),this.defaultPhysicsSystem=e(this.physics,"default",!1),this.loaderBaseURL=e(m,"loader.baseURL",""),this.loaderPath=e(m,"loader.path",""),this.loaderMaxParallelDownloads=e(m,"loader.maxParallelDownloads",s.os.android?6:32),this.loaderCrossOrigin=e(m,"loader.crossOrigin",void 0),this.loaderResponseType=e(m,"loader.responseType",""),this.loaderAsync=e(m,"loader.async",!0),this.loaderUser=e(m,"loader.user",""),this.loaderPassword=e(m,"loader.password",""),this.loaderTimeout=e(m,"loader.timeout",0),this.loaderWithCredentials=e(m,"loader.withCredentials",!1),this.loaderImageLoadType=e(m,"loader.imageLoadType","XHR"),this.loaderLocalScheme=e(m,"loader.localScheme",["file://","capacitor://"]),this.glowFXQuality=e(m,"fx.glow.quality",.1),this.glowFXDistance=e(m,"fx.glow.distance",10),this.installGlobalPlugins=[],this.installScenePlugins=[];var L=e(m,"plugins",null),F=o.DefaultScene;L&&(Array.isArray(L)?this.defaultPlugins=L:n(L)&&(this.installGlobalPlugins=r(L,"global",[]),this.installScenePlugins=r(L,"scene",[]),Array.isArray(L.default)?F=L.default:Array.isArray(L.defaultMerge)&&(F=F.concat(L.defaultMerge)))),this.defaultPlugins=F;var I="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=e(m,"images.default",I+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=e(m,"images.missing",I+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),this.whiteImage=e(m,"images.white","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABdJREFUeNpi/P//PwMMMDEgAdwcgAADAJZuAwXJYZOzAAAAAElFTkSuQmCC"),window&&(window.FORCE_WEBGL?this.renderType=p.WEBGL:window.FORCE_CANVAS&&(this.renderType=p.CANVAS))}});d.exports=c},86054:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(20623),p=t(27919),o=t(8054),s=t(89357),r=function(e){var n=e.config;if((n.customEnvironment||n.canvas)&&n.renderType===o.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!n.customEnvironment&&!n.canvas&&n.renderType!==o.HEADLESS)if(n.renderType===o.AUTO&&(n.renderType=s.webGL?o.WEBGL:o.CANVAS),n.renderType===o.WEBGL){if(!s.webGL)throw new Error("Cannot create WebGL context, aborting.")}else if(n.renderType===o.CANVAS){if(!s.canvas)throw new Error("Cannot create Canvas context, aborting.")}else throw new Error("Unknown value for renderer type: "+n.renderType);n.antialias||p.disableSmoothing();var l=e.scale.baseSize,i=l.width,h=l.height;if(n.canvas?(e.canvas=n.canvas,e.canvas.width=i,e.canvas.height=h):e.canvas=p.create(e,i,h,n.renderType),n.canvasStyle&&(e.canvas.style=n.canvasStyle),n.antialias||a.setCrisp(e.canvas),n.renderType!==o.HEADLESS){var u,c;u=t(68627),c=t(74797),n.renderType===o.WEBGL?e.renderer=new c(e):(e.renderer=new u(e),e.context=e.renderer.gameContext)}};d.exports=r},96391:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(8054),p=function(o){var s=o.config;if(!s.hideBanner){var r="WebGL";s.renderType===a.CANVAS?r="Canvas":s.renderType===a.HEADLESS&&(r="Headless");var e=s.audio,n=o.device.audio,l;if(n.webAudio&&!e.disableWebAudio?l="Web Audio":e.noAudio||!n.webAudio&&!n.audioData?l="No Audio":l="HTML5 Audio",o.device.browser.ie)window.console&&console.log("Phaser v"+a.VERSION+" / https://phaser.io");else{var i="",h=[i];if(Array.isArray(s.bannerBackgroundColor)){var u;s.bannerBackgroundColor.forEach(function(v){i=i.concat("%c "),h.push("background: "+v),u=v}),h[h.length-1]="color: "+s.bannerTextColor+"; background: "+u}else i=i.concat("%c "),h.push("color: "+s.bannerTextColor+"; background: "+s.bannerBackgroundColor);h.push("background: transparent"),s.gameTitle&&(i=i.concat(s.gameTitle),s.gameVersion&&(i=i.concat(" v"+s.gameVersion)),s.hidePhaser||(i=i.concat(" / ")));var c="";s.hidePhaser||(i=i.concat("Phaser v"+a.VERSION+c+" ("+r+" | "+l+")")),i=i.concat(" %c "+s.gameURL),h[0]=i,console.log.apply(console,h)}}};d.exports=p},50127:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(40366),p=t(60848),o=t(24047),s=t(27919),r=t(83419),e=t(69547),n=t(83719),l=t(86054),i=t(45893),h=t(96391),u=t(82264),c=t(57264),v=t(50792),m=t(8443),T=t(7003),C=t(37277),S=t(77332),P=t(76531),A=t(60903),L=t(69442),F=t(17130),I=t(65898),D=t(51085),B=t(14747),G=new r({initialize:function(W){this.config=new e(W),this.renderer=null,this.domContainer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new v,this.anims=new p(this),this.textures=new F(this),this.cache=new o(this),this.registry=new i(this,new v),this.input=new T(this,this.config),this.scene=new A(this,this.config.sceneConfig),this.device=u,this.scale=new P(this,this.config),this.sound=null,this.sound=B.create(this),this.loop=new I(this,this.config.fps),this.plugins=new S(this,this.config),this.pendingDestroy=!1,this.removeCanvas=!1,this.noReturn=!1,this.hasFocus=!1,this.isPaused=!1,c(this.boot.bind(this))},boot:function(){if(!C.hasCore("EventEmitter")){console.warn("Aborting. Core Plugins missing.");return}this.isBooted=!0,this.config.preBoot(this),this.scale.preBoot(),l(this),n(this),h(this),a(this.canvas,this.config.parent),this.textures.once(L.READY,this.texturesReady,this),this.events.emit(m.BOOT)},texturesReady:function(){this.events.emit(m.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(m.HIDDEN,this.onHidden,this),z.on(m.VISIBLE,this.onVisible,this),z.on(m.BLUR,this.onBlur,this),z.on(m.FOCUS,this.onFocus,this)},step:function(z,W){if(this.pendingDestroy)return this.runDestroy();if(!this.isPaused){var Y=this.events;Y.emit(m.PRE_STEP,z,W),Y.emit(m.STEP,z,W),this.scene.update(z,W),Y.emit(m.POST_STEP,z,W);var K=this.renderer;K.preRender(),Y.emit(m.PRE_RENDER,K,z,W),this.scene.render(K),K.postRender(),Y.emit(m.POST_RENDER,K,z,W)}},headlessStep:function(z,W){if(this.pendingDestroy)return this.runDestroy();if(!this.isPaused){var Y=this.events;Y.emit(m.PRE_STEP,z,W),Y.emit(m.STEP,z,W),this.scene.update(z,W),Y.emit(m.POST_STEP,z,W),this.scene.isProcessing=!1,Y.emit(m.PRE_RENDER,null,z,W),Y.emit(m.POST_RENDER,null,z,W)}},onHidden:function(){this.loop.pause(),this.events.emit(m.PAUSE)},pause:function(){var z=this.isPaused;this.isPaused=!0,z||this.events.emit(m.PAUSE)},onVisible:function(){this.loop.resume(),this.events.emit(m.RESUME)},resume:function(){var z=this.isPaused;this.isPaused=!1,z&&this.events.emit(m.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(m.DESTROY),this.events.removeAllListeners(),this.renderer&&this.renderer.destroy(),this.removeCanvas&&this.canvas&&(s.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}});d.exports=G},65898:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(35154),o=t(29747),s=t(43092),r=new a({initialize:function(n,l){this.game=n,this.raf=new s,this.started=!1,this.running=!1,this.minFps=p(l,"min",5),this.targetFps=p(l,"target",60),this.fpsLimit=p(l,"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=p(l,"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(l,"deltaHistory",10),this.panicMax=p(l,"panicMax",120),this.rawDelta=0,this.now=0,this.smoothStep=p(l,"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 n=0;n0||!this.inFocus)&&(this._coolDown--,e=Math.min(e,this._target)),e>this._min&&(e=l[n],e=Math.min(e,this._min)),l[n]=e,this.deltaIndex++,this.deltaIndex>=i&&(this.deltaIndex=0);for(var h=0,u=0;u=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 n=Math.max(0,e-this.lastTime);this.rawDelta=n,this.time+=this.rawDelta,this.smoothStep&&(n=this.smoothDelta(n)),this.delta=n,e>=this.nextFpsUpdate&&this.updateFPS(e),this.framesThisSecond++,this.callback(e,n),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 n=window.performance.now();if(!this.running){e&&(this.startTime+=-this.lastTime+(this.lastTime+n));var l=this.hasFpsLimit?this.stepLimitFPS.bind(this):this.step.bind(this);this.raf.start(l,this.forceSetTimeOut,this._target),this.running=!0,this.nextFpsUpdate=n+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}});d.exports=r},51085:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(8443),p=function(o){var s,r=o.events;if(document.hidden!==void 0)s="visibilitychange";else{var e=["webkit","moz","ms"];e.forEach(function(l){document[l+"Hidden"]!==void 0&&(document.hidden=function(){return document[l+"Hidden"]},s=l+"visibilitychange")})}var n=function(l){document.hidden||l.type==="pause"?r.emit(a.HIDDEN):r.emit(a.VISIBLE)};s&&document.addEventListener(s,n,!1),window.onblur=function(){r.emit(a.BLUR)},window.onfocus=function(){r.emit(a.FOCUS)},window.focus&&o.config.autoFocus&&window.focus()};d.exports=p},97217:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="blur"},47548:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="boot"},19814:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="contextlost"},68446:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="destroy"},41700:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="focus"},25432:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="hidden"},65942:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="pause"},59211:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="postrender"},47789:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="poststep"},39066:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="prerender"},460:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="prestep"},16175:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="ready"},42331:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="resume"},11966:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="step"},32969:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="systemready"},94830:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="visible"},8443:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.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:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports={Config:t(69547),CreateRenderer:t(86054),DebugHeader:t(96391),Events:t(8443),TimeStep:t(65898),VisibilityHandler:t(51085)}},99584:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(5290),p=t(27919),o=t(35154),s=function(r){var e=o(r,"data",[]),n=o(r,"canvas",null),l=o(r,"palette",a),i=o(r,"pixelWidth",1),h=o(r,"pixelHeight",i),u=o(r,"resizeCanvas",!0),c=o(r,"clearCanvas",!0),v=o(r,"preRender",null),m=o(r,"postRender",null),T=Math.floor(Math.abs(e[0].length*i)),C=Math.floor(Math.abs(e.length*h));n||(n=p.create2D(this,T,C),u=!1,c=!1),u&&(n.width=T,n.height=C);var S=n.getContext("2d",{willReadFrequently:!0});c&&S.clearRect(0,0,T,C),v&&v(n,S);for(var P=0;P{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports={GenerateTexture:t(99584),Palettes:t(57763)}},5290:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.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:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.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:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.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:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.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:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.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:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports={ARNE16:t(5290),C64:t(23816),CGA:t(9866),JMP:t(77552),MSX:t(92259)}},46728:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(36316),o=t(80021),s=t(26099),r=new a({Extends:o,initialize:function(n,l,i,h){o.call(this,"CubicBezierCurve"),Array.isArray(n)&&(h=new s(n[6],n[7]),i=new s(n[4],n[5]),l=new s(n[2],n[3]),n=new s(n[0],n[1])),this.p0=n,this.p1=l,this.p2=i,this.p3=h},getStartPoint:function(e){return e===void 0&&(e=new s),e.copy(this.p0)},getResolution:function(e){return e},getPoint:function(e,n){n===void 0&&(n=new s);var l=this.p0,i=this.p1,h=this.p2,u=this.p3;return n.set(p(e,l.x,i.x,h.x,u.x),p(e,l.y,i.y,h.y,u.y))},draw:function(e,n){n===void 0&&(n=32);var l=this.getPoints(n);e.beginPath(),e.moveTo(this.p0.x,this.p0.y);for(var i=1;i{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(19217),o=t(87841),s=t(26099),r=new a({initialize:function(n){this.type=n,this.defaultDivisions=5,this.arcLengthDivisions=100,this.cacheArcLengths=[],this.needsUpdate=!0,this.active=!0,this._tmpVec2A=new s,this._tmpVec2B=new s},draw:function(e,n){return n===void 0&&(n=32),e.strokePoints(this.getPoints(n))},getBounds:function(e,n){e||(e=new o),n===void 0&&(n=16);var l=this.getLength();n>l&&(n=l/2);var i=Math.max(1,Math.round(l/n));return p(this.getSpacedPoints(i),e)},getDistancePoints:function(e){var n=this.getLength(),l=Math.max(1,n/e);return this.getSpacedPoints(l)},getEndPoint:function(e){return e===void 0&&(e=new s),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 n=[],l,i=this.getPoint(0,this._tmpVec2A),h=0;n.push(0);for(var u=1;u<=e;u++)l=this.getPoint(u/e,this._tmpVec2B),h+=l.distance(i),n.push(h),i.copy(l);return this.cacheArcLengths=n,n},getPointAt:function(e,n){var l=this.getUtoTmapping(e);return this.getPoint(l,n)},getPoints:function(e,n,l){l===void 0&&(l=[]),e||(n?e=this.getLength()/n:e=this.defaultDivisions);for(var i=0;i<=e;i++)l.push(this.getPoint(i/e));return l},getRandomPoint:function(e){return e===void 0&&(e=new s),this.getPoint(Math.random(),e)},getSpacedPoints:function(e,n,l){l===void 0&&(l=[]),e||(n?e=this.getLength()/n:e=this.defaultDivisions);for(var i=0;i<=e;i++){var h=this.getUtoTmapping(i/e,null,e);l.push(this.getPoint(h))}return l},getStartPoint:function(e){return e===void 0&&(e=new s),this.getPointAt(0,e)},getTangent:function(e,n){n===void 0&&(n=new s);var l=1e-4,i=e-l,h=e+l;return i<0&&(i=0),h>1&&(h=1),this.getPoint(i,this._tmpVec2A),this.getPoint(h,n),n.subtract(this._tmpVec2A).normalize()},getTangentAt:function(e,n){var l=this.getUtoTmapping(e);return this.getTangent(l,n)},getTFromDistance:function(e,n){return e<=0?0:this.getUtoTmapping(0,e,n)},getUtoTmapping:function(e,n,l){var i=this.getLengths(l),h=0,u=i.length,c;n?c=Math.min(n,i[u-1]):c=e*i[u-1];for(var v=0,m=u-1,T;v<=m;)if(h=Math.floor(v+(m-v)/2),T=i[h]-c,T<0)v=h+1;else if(T>0)m=h-1;else{m=h;break}if(h=m,i[h]===c)return h/(u-1);var C=i[h],S=i[h+1],P=S-C,A=(c-C)/P;return(h+A)/(u-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});d.exports=r},73825:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(80021),o=t(39506),s=t(35154),r=t(43396),e=t(26099),n=new a({Extends:p,initialize:function(i,h,u,c,v,m,T,C){if(typeof i=="object"){var S=i;i=s(S,"x",0),h=s(S,"y",0),u=s(S,"xRadius",0),c=s(S,"yRadius",u),v=s(S,"startAngle",0),m=s(S,"endAngle",360),T=s(S,"clockwise",!1),C=s(S,"rotation",0)}else c===void 0&&(c=u),v===void 0&&(v=0),m===void 0&&(m=360),T===void 0&&(T=!1),C===void 0&&(C=0);p.call(this,"EllipseCurve"),this.p0=new e(i,h),this._xRadius=u,this._yRadius=c,this._startAngle=o(v),this._endAngle=o(m),this._clockwise=T,this._rotation=o(C)},getStartPoint:function(l){return l===void 0&&(l=new e),this.getPoint(0,l)},getResolution:function(l){return l*2},getPoint:function(l,i){i===void 0&&(i=new e);for(var h=Math.PI*2,u=this._endAngle-this._startAngle,c=Math.abs(u)h;)u-=h;u{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(80021),o=t(19217),s=t(87841),r=t(26099),e=new a({Extends:p,initialize:function(l,i){p.call(this,"LineCurve"),Array.isArray(l)&&(i=new r(l[2],l[3]),l=new r(l[0],l[1])),this.p0=l,this.p1=i,this.arcLengthDivisions=1},getBounds:function(n){return n===void 0&&(n=new s),o([this.p0,this.p1],n)},getStartPoint:function(n){return n===void 0&&(n=new r),n.copy(this.p0)},getResolution:function(n){return n===void 0&&(n=1),n},getPoint:function(n,l){return l===void 0&&(l=new r),n===1?l.copy(this.p1):(l.copy(this.p1).subtract(this.p0).scale(n).add(this.p0),l)},getPointAt:function(n,l){return this.getPoint(n,l)},getTangent:function(n,l){return l===void 0&&(l=new r),l.copy(this.p1).subtract(this.p0).normalize(),l},getUtoTmapping:function(n,l,i){var h;if(l){var u=this.getLengths(i),c=u[u.length-1],v=Math.min(l,c);h=v/c}else h=n;return h},draw:function(n){return n.lineBetween(this.p0.x,this.p0.y,this.p1.x,this.p1.y),n},toJSON:function(){return{type:this.type,points:[this.p0.x,this.p0.y,this.p1.x,this.p1.y]}}});e.fromJSON=function(n){var l=n.points,i=new r(l[0],l[1]),h=new r(l[2],l[3]);return new e(i,h)},d.exports=e},14744:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(80021),o=t(32112),s=t(26099),r=new a({Extends:p,initialize:function(n,l,i){p.call(this,"QuadraticBezierCurve"),Array.isArray(n)&&(i=new s(n[4],n[5]),l=new s(n[2],n[3]),n=new s(n[0],n[1])),this.p0=n,this.p1=l,this.p2=i},getStartPoint:function(e){return e===void 0&&(e=new s),e.copy(this.p0)},getResolution:function(e){return e},getPoint:function(e,n){n===void 0&&(n=new s);var l=this.p0,i=this.p1,h=this.p2;return n.set(o(e,l.x,i.x,h.x),o(e,l.y,i.y,h.y))},draw:function(e,n){n===void 0&&(n=32);var l=this.getPoints(n);e.beginPath(),e.moveTo(this.p0.x,this.p0.y);for(var i=1;i{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(87842),p=t(83419),o=t(80021),s=t(26099),r=new p({Extends:o,initialize:function(n){n===void 0&&(n=[]),o.call(this,"SplineCurve"),this.points=[],this.addPoints(n)},addPoints:function(e){for(var n=0;nl.length-2?l.length-1:h+1],T=l[h>l.length-3?l.length-1:h+2];return n.set(a(u,c.x,v.x,m.x,T.x),a(u,c.y,v.y,m.y,T.y))},toJSON:function(){for(var e=[],n=0;n{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.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:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(26099),o=new a({initialize:function(r,e){this.active=!1,this.p0=new p(r,e)},getPoint:function(s,r){return r===void 0&&(r=new p),r.copy(this.p0)},getPointAt:function(s,r){return this.getPoint(s,r)},getResolution:function(){return 1},getLength:function(){return 0},toJSON:function(){return{type:"MoveTo",points:[this.p0.x,this.p0.y]}}});d.exports=o},46669:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(46728),o=t(73825),s=t(39429),r=t(33951),e=t(68618),n=t(14744),l=t(87841),i=t(42534),h=t(26099),u=t(36383),c=new a({initialize:function(m,T){m===void 0&&(m=0),T===void 0&&(T=0),this.name="",this.defaultDivisions=12,this.curves=[],this.cacheLengths=[],this.autoClose=!1,this.startPoint=new h,this._tmpVec2A=new h,this._tmpVec2B=new h,typeof m=="object"?this.fromJSON(m):this.startPoint.set(m,T)},add:function(v){return this.curves.push(v),this},circleTo:function(v,m,T){return m===void 0&&(m=!1),this.ellipseTo(v,v,0,360,m,T)},closePath:function(){var v=this.curves[0].getPoint(0),m=this.curves[this.curves.length-1].getPoint(1);return v.equals(m)||this.curves.push(new r(m,v)),this},cubicBezierTo:function(v,m,T,C,S,P){var A=this.getEndPoint(),L,F,I;return v instanceof h?(L=v,F=m,I=T):(L=new h(T,C),F=new h(S,P),I=new h(v,m)),this.add(new p(A,L,F,I))},quadraticBezierTo:function(v,m,T,C){var S=this.getEndPoint(),P,A;return v instanceof h?(P=v,A=m):(P=new h(T,C),A=new h(v,m)),this.add(new n(S,P,A))},draw:function(v,m){for(var T=0;T=m)return this.curves[C];C++}return null},getEndPoint:function(v){return v===void 0&&(v=new h),this.curves.length>0?this.curves[this.curves.length-1].getPoint(1,v):v.copy(this.startPoint),v},getLength:function(){var v=this.getCurveLengths();return v[v.length-1]},getPoint:function(v,m){m===void 0&&(m=new h);for(var T=v*this.getLength(),C=this.getCurveLengths(),S=0;S=T){var P=C[S]-T,A=this.curves[S],L=A.getLength(),F=L===0?0:1-P/L;return A.getPointAt(F,m)}S++}return null},getPoints:function(v,m){!v&&!m&&(v=this.defaultDivisions);for(var T=[],C,S=0;S1&&!T[T.length-1].equals(T[0])&&T.push(T[0]),T},getRandomPoint:function(v){return v===void 0&&(v=new h),this.getPoint(Math.random(),v)},getSpacedPoints:function(v){v===void 0&&(v=40);for(var m=[],T=0;T<=v;T++)m.push(this.getPoint(T/v));return this.autoClose&&m.push(m[0]),m},getStartPoint:function(v){return v===void 0&&(v=new h),v.copy(this.startPoint)},getTangent:function(v,m){m===void 0&&(m=new h);for(var T=v*this.getLength(),C=this.getCurveLengths(),S=0;S=T){var P=C[S]-T,A=this.curves[S],L=A.getLength(),F=L===0?0:1-P/L;return A.getTangentAt(F,m)}S++}return null},lineTo:function(v,m){v instanceof h?this._tmpVec2B.copy(v):typeof v=="object"?this._tmpVec2B.setFromObject(v):this._tmpVec2B.set(v,m);var T=this.getEndPoint(this._tmpVec2A);return this.add(new r([T.x,T.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(v){return v.unshift(this.getEndPoint()),this.add(new i(v))},moveTo:function(v,m){return v instanceof h?this.add(new e(v.x,v.y)):this.add(new e(v,m))},toJSON:function(){for(var v=[],m=0;m{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(24882),o=new a({initialize:function(r,e){this.parent=r,this.events=e,e||(this.events=r.events?r.events:r),this.list={},this.values={},this._frozen=!1,!r.hasOwnProperty("sys")&&this.events&&this.events.once(p.DESTROY,this.destroy,this)},get:function(s){var r=this.list;if(Array.isArray(s)){for(var e=[],n=0;n{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(45893),o=t(37277),s=t(44594),r=new a({Extends:p,initialize:function(n){p.call(this,n,n.sys.events),this.scene=n,this.systems=n.sys,n.sys.events.once(s.BOOT,this.boot,this),n.sys.events.on(s.START,this.start,this)},boot:function(){this.events=this.systems.events,this.events.once(s.DESTROY,this.destroy,this)},start:function(){this.events.once(s.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.systems.events.off(s.SHUTDOWN,this.shutdown,this)},destroy:function(){p.prototype.destroy.call(this),this.events.off(s.START,this.start,this),this.scene=null,this.systems=null}});o.register("DataManagerPlugin",r,"data"),d.exports=r},10700:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="changedata"},93608:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="changedata-"},60883:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="destroy"},69780:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="removedata"},22166:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="setdata"},24882:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports={CHANGE_DATA:t(10700),CHANGE_DATA_KEY:t(93608),DESTROY:t(60883),REMOVE_DATA:t(69780),SET_DATA:t(22166)}},44965:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports={DataManager:t(45893),DataManagerPlugin:t(63646),Events:t(24882)}},7098:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=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 o(){if(typeof importScripts=="function")return p;p.audioData=!!window.Audio,p.webAudio=!!(window.AudioContext||window.webkitAudioContext);var s=document.createElement("audio"),r=!!s.canPlayType;try{if(r){var e=function(i,h){var u=s.canPlayType("audio/"+i).replace(/^no$/,"");return h?!!(u||s.canPlayType("audio/"+h).replace(/^no$/,"")):!!u};if(p.ogg=e('ogg; codecs="vorbis"'),p.opus=e('ogg; codecs="opus"',"opus"),p.mp3=e("mpeg"),p.wav=e("wav"),p.m4a=e("x-m4a"),p.aac=e("aac"),p.flac=e("flac","x-flac"),p.webm=e('webm; codecs="vorbis"'),s.canPlayType('audio/mp4; codecs="ec-3"')!==""){if(a.edge)p.dolby=!0;else if(a.safari&&a.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var n=parseInt(RegExp.$1,10),l=parseInt(RegExp.$2,10);(n===10&&l>=11||n>10)&&(p.dolby=!0)}}}}catch{}return p}d.exports=o()},84148:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=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 o(){var s=navigator.userAgent;return/Edg\/\d+/.test(s)?(p.edge=!0,p.es2019=!0):/OPR/.test(s)?(p.opera=!0,p.es2019=!0):/Chrome\/(\d+)/.test(s)&&!a.windowsPhone?(p.chrome=!0,p.chromeVersion=parseInt(RegExp.$1,10),p.es2019=p.chromeVersion>69):/Firefox\D+(\d+)/.test(s)?(p.firefox=!0,p.firefoxVersion=parseInt(RegExp.$1,10),p.es2019=p.firefoxVersion>10):/AppleWebKit\/(?!.*CriOS)/.test(s)&&a.iOS?(p.mobileSafari=!0,p.es2019=!0):/MSIE (\d+\.\d+);/.test(s)?(p.ie=!0,p.ieVersion=parseInt(RegExp.$1,10)):/Version\/(\d+\.\d+(\.\d+)?) Safari/.test(s)&&!a.windowsPhone?(p.safari=!0,p.safariVersion=parseInt(RegExp.$1,10),p.es2019=p.safariVersion>10):/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(s)&&(p.ie=!0,p.trident=!0,p.tridentVersion=parseInt(RegExp.$1,10),p.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(s)&&(p.silk=!0),p}d.exports=o()},89289:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(27919),p={supportInverseAlpha:!1,supportNewBlendModes:!1};function o(){var e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",n="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",l=new Image;return l.onload=function(){var i=new Image;i.onload=function(){var h=a.create2D(i,6),u=h.getContext("2d",{willReadFrequently:!0});if(u.globalCompositeOperation="multiply",u.drawImage(l,0,0),u.drawImage(i,2,0),!u.getImageData(2,0,1,1))return!1;var c=u.getImageData(2,0,1,1).data;a.remove(i),p.supportNewBlendModes=c[0]===255&&c[1]===0&&c[2]===0},i.src=e+"/wCKxvRF"+n},l.src=e+"AP804Oa6"+n,!1}function s(){var e=a.create2D(this,2),n=e.getContext("2d",{willReadFrequently:!0});n.fillStyle="rgba(10, 20, 30, 0.5)",n.fillRect(0,0,1,1);var l=n.getImageData(0,0,1,1);if(l===null)return!1;n.putImageData(l,1,0);var i=n.getImageData(1,0,1,1),h=i.data[0]===l.data[0]&&i.data[1]===l.data[1]&&i.data[2]===l.data[2]&&i.data[3]===l.data[3];return a.remove(this),h}function r(){return typeof importScripts!="function"&&document!==void 0&&(p.supportNewBlendModes=o(),p.supportInverseAlpha=s()),p}d.exports=r()},89357:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(25892),p=t(84148),o=t(27919),s={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 r(){var n=new ArrayBuffer(4),l=new Uint8Array(n),i=new Uint32Array(n);return l[0]=161,l[1]=178,l[2]=195,l[3]=212,i[0]===3569595041?!0:i[0]===2712847316?!1:null}function e(){if(typeof importScripts=="function")return s;s.canvas=!!window.CanvasRenderingContext2D;try{s.localStorage=!!localStorage.getItem}catch{s.localStorage=!1}s.file=!!window.File&&!!window.FileReader&&!!window.FileList&&!!window.Blob,s.fileSystem=!!window.requestFileSystem;var n=!1,l=function(){if(window.WebGLRenderingContext)try{var i=o.createWebGL(this),h=i.getContext("webgl")||i.getContext("experimental-webgl"),u=o.create2D(this),c=u.getContext("2d",{willReadFrequently:!0}),v=c.createImageData(1,1);return n=v.data instanceof Uint8ClampedArray,o.remove(i),o.remove(u),!!h}catch{return!1}return!1};return s.webGL=l(),s.worker=!!window.Worker,s.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,s.getUserMedia=s.getUserMedia&&!!navigator.getUserMedia&&!!window.URL,p.firefox&&p.firefoxVersion<21&&(s.getUserMedia=!1),!a.iOS&&(p.ie||p.firefox||p.chrome)&&(s.canvasBitBltShift=!0),(p.safari||p.mobileSafari)&&(s.canvasBitBltShift=!1),navigator.vibrate=navigator.vibrate||navigator.webkitVibrate||navigator.mozVibrate||navigator.msVibrate,navigator.vibrate&&(s.vibration=!0),typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&typeof Uint32Array<"u"&&(s.littleEndian=r()),s.support32bit=typeof ArrayBuffer<"u"&&typeof Uint8ClampedArray<"u"&&typeof Int32Array<"u"&&s.littleEndian!==null&&n,s}d.exports=e()},91639:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x={available:!1,cancel:"",keyboard:!1,request:""};function t(){if(typeof importScripts=="function")return x;var a,p="Fullscreen",o="FullScreen",s=["request"+p,"request"+o,"webkitRequest"+p,"webkitRequest"+o,"msRequest"+p,"msRequest"+o,"mozRequest"+o,"mozRequest"+p];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),p={gamepads:!1,mspointer:!1,touch:!1,wheelEvent:null};function o(){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||a.ie&&"WheelEvent"in window?p.wheelEvent="wheel":"onmousewheel"in window?p.wheelEvent="mousewheel":a.firefox&&"MouseScrollEvent"in window&&(p.wheelEvent="DOMMouseScroll")),p}d.exports=o()},25892:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x={android:!1,chromeOS:!1,cordova:!1,crosswalk:!1,desktop:!1,ejecta:!1,electron:!1,iOS:!1,iOSVersion:0,iPad:!1,iPhone:!1,kindle:!1,linux:!1,macOS:!1,node:!1,nodeWebkit:!1,pixelRatio:1,webApp:!1,windows:!1,windowsPhone:!1};function t(){if(typeof importScripts=="function")return x;var a=navigator.userAgent;/Windows/.test(a)?x.windows=!0:/Mac OS/.test(a)&&!/like Mac OS/.test(a)?navigator.maxTouchPoints&&navigator.maxTouchPoints>2?(x.iOS=!0,x.iPad=!0,navigator.appVersion.match(/Version\/(\d+)/),x.iOSVersion=parseInt(RegExp.$1,10)):x.macOS=!0:/Android/.test(a)?x.android=!0:/Linux/.test(a)?x.linux=!0:/iP[ao]d|iPhone/i.test(a)?(x.iOS=!0,navigator.appVersion.match(/OS (\d+)/),x.iOSVersion=parseInt(RegExp.$1,10),x.iPhone=a.toLowerCase().indexOf("iphone")!==-1,x.iPad=a.toLowerCase().indexOf("ipad")!==-1):/Kindle/.test(a)||/\bKF[A-Z][A-Z]+/.test(a)||/Silk.*Mobile Safari/.test(a)?x.kindle=!0:/CrOS/.test(a)&&(x.chromeOS=!0),(/Windows Phone/i.test(a)||/IEMobile/i.test(a))&&(x.android=!1,x.iOS=!1,x.macOS=!1,x.windows=!0,x.windowsPhone=!0);var p=/Silk/.test(a);return(x.windows||x.macOS||x.linux&&!p||x.chromeOS)&&(x.desktop=!0),(x.windowsPhone||/Windows NT/i.test(a)&&/Touch/i.test(a))&&(x.desktop=!1),navigator.standalone&&(x.webApp=!0),typeof importScripts!="function"&&(window.cordova!==void 0&&(x.cordova=!0),window.ejecta!==void 0&&(x.ejecta=!0)),typeof process<"u"&&process.versions&&process.versions.node&&(x.node=!0),x.node&&typeof process.versions=="object"&&(x.nodeWebkit=!!process.versions["node-webkit"],x.electron=!!process.versions.electron),/Crosswalk/.test(a)&&(x.crosswalk=!0),x.pixelRatio=window.devicePixelRatio||1,x}d.exports=t()},43267:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(95540),p={h264:!1,hls:!1,mp4:!1,m4v:!1,ogg:!1,vp9:!1,webm:!1,hasRequestVideoFrame:!1};function o(){if(typeof importScripts=="function")return p;var s=document.createElement("video"),r=!!s.canPlayType,e=/^no$/;try{r&&(s.canPlayType('video/ogg; codecs="theora"').replace(e,"")&&(p.ogg=!0),s.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(e,"")&&(p.h264=!0,p.mp4=!0),s.canPlayType("video/x-m4v").replace(e,"")&&(p.m4v=!0),s.canPlayType('video/webm; codecs="vp8, vorbis"').replace(e,"")&&(p.webm=!0),s.canPlayType('video/webm; codecs="vp9"').replace(e,"")&&(p.vp9=!0),s.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(e,"")&&(p.hls=!0))}catch{}return s.parentNode&&s.parentNode.removeChild(s),p.getVideoURL=function(n){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} + */d.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:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=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(s){return this._matrix.set(s),this._dirty=!0,this},reset:function(){var s=this._matrix;return s.fill(0),s[0]=1,s[6]=1,s[12]=1,s[18]=1,this.alpha=1,this._dirty=!0,this},getData:function(){var s=this._data;return this._dirty&&(s.set(this._matrix),s[4]/=255,s[9]/=255,s[14]/=255,s[19]/=255,this._dirty=!1),s},brightness:function(s,r){s===void 0&&(s=0),r===void 0&&(r=!1);var e=s;return this.multiply([e,0,0,0,0,0,e,0,0,0,0,0,e,0,0,0,0,0,1,0],r)},saturate:function(s,r){s===void 0&&(s=0),r===void 0&&(r=!1);var e=s*2/3+1,n=(e-1)*-.5;return this.multiply([e,n,n,0,0,n,e,n,0,0,n,n,e,0,0,0,0,0,1,0],r)},desaturate:function(s){return s===void 0&&(s=!1),this.saturate(-1,s)},hue:function(s,r){s===void 0&&(s=0),r===void 0&&(r=!1),s=s/180*Math.PI;var e=Math.cos(s),n=Math.sin(s),l=.213,i=.715,h=.072;return this.multiply([l+e*(1-l)+n*-l,i+e*-i+n*-i,h+e*-h+n*(1-h),0,0,l+e*-l+n*.143,i+e*(1-i)+n*.14,h+e*-h+n*-.283,0,0,l+e*-l+n*-(1-l),i+e*-i+n*i,h+e*(1-h)+n*h,0,0,0,0,0,1,0],r)},grayscale:function(s,r){return s===void 0&&(s=1),r===void 0&&(r=!1),this.saturate(-s,r)},blackWhite:function(s){return s===void 0&&(s=!1),this.multiply(o.BLACK_WHITE,s)},contrast:function(s,r){s===void 0&&(s=0),r===void 0&&(r=!1);var e=s+1,n=-.5*(e-1);return this.multiply([e,0,0,0,n,0,e,0,0,n,0,0,e,0,n,0,0,0,1,0],r)},negative:function(s){return s===void 0&&(s=!1),this.multiply(o.NEGATIVE,s)},desaturateLuminance:function(s){return s===void 0&&(s=!1),this.multiply(o.DESATURATE_LUMINANCE,s)},sepia:function(s){return s===void 0&&(s=!1),this.multiply(o.SEPIA,s)},night:function(s,r){return s===void 0&&(s=.1),r===void 0&&(r=!1),this.multiply([s*-2,-s,0,0,0,-s,0,s,0,0,0,s,s*2,0,0,0,0,0,1,0],r)},lsd:function(s){return s===void 0&&(s=!1),this.multiply(o.LSD,s)},brown:function(s){return s===void 0&&(s=!1),this.multiply(o.BROWN,s)},vintagePinhole:function(s){return s===void 0&&(s=!1),this.multiply(o.VINTAGE,s)},kodachrome:function(s){return s===void 0&&(s=!1),this.multiply(o.KODACHROME,s)},technicolor:function(s){return s===void 0&&(s=!1),this.multiply(o.TECHNICOLOR,s)},polaroid:function(s){return s===void 0&&(s=!1),this.multiply(o.POLAROID,s)},shiftToBGR:function(s){return s===void 0&&(s=!1),this.multiply(o.SHIFT_BGR,s)},multiply:function(s,r){r===void 0&&(r=!1),r||this.reset();var e=this._matrix,n=p;return n.set(e),e.set([n[0]*s[0]+n[1]*s[5]+n[2]*s[10]+n[3]*s[15],n[0]*s[1]+n[1]*s[6]+n[2]*s[11]+n[3]*s[16],n[0]*s[2]+n[1]*s[7]+n[2]*s[12]+n[3]*s[17],n[0]*s[3]+n[1]*s[8]+n[2]*s[13]+n[3]*s[18],n[0]*s[4]+n[1]*s[9]+n[2]*s[14]+n[3]*s[19]+n[4],n[5]*s[0]+n[6]*s[5]+n[7]*s[10]+n[8]*s[15],n[5]*s[1]+n[6]*s[6]+n[7]*s[11]+n[8]*s[16],n[5]*s[2]+n[6]*s[7]+n[7]*s[12]+n[8]*s[17],n[5]*s[3]+n[6]*s[8]+n[7]*s[13]+n[8]*s[18],n[5]*s[4]+n[6]*s[9]+n[7]*s[14]+n[8]*s[19]+n[9],n[10]*s[0]+n[11]*s[5]+n[12]*s[10]+n[13]*s[15],n[10]*s[1]+n[11]*s[6]+n[12]*s[11]+n[13]*s[16],n[10]*s[2]+n[11]*s[7]+n[12]*s[12]+n[13]*s[17],n[10]*s[3]+n[11]*s[8]+n[12]*s[13]+n[13]*s[18],n[10]*s[4]+n[11]*s[9]+n[12]*s[14]+n[13]*s[19]+n[14],n[15]*s[0]+n[16]*s[5]+n[17]*s[10]+n[18]*s[15],n[15]*s[1]+n[16]*s[6]+n[17]*s[11]+n[18]*s[16],n[15]*s[2]+n[16]*s[7]+n[17]*s[12]+n[18]*s[17],n[15]*s[3]+n[16]*s[8]+n[17]*s[13]+n[18]*s[18],n[15]*s[4]+n[16]*s[9]+n[17]*s[14]+n[18]*s[19]+n[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],d.exports=o},51767:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(29747),o=new a({initialize:function(r,e,n){this._rgb=[0,0,0],this.onChangeCallback=p,this.dirty=!1,this.set(r,e,n)},set:function(s,r,e){return s===void 0&&(s=0),r===void 0&&(r=0),e===void 0&&(e=0),this._rgb=[s,r,e],this.onChange(),this},equals:function(s,r,e){var n=this._rgb;return n[0]===s&&n[1]===r&&n[2]===e},onChange:function(){this.dirty=!0;var s=this._rgb;this.onChangeCallback.call(this,s[0],s[1],s[2])},r:{get:function(){return this._rgb[0]},set:function(s){this._rgb[0]=s,this.onChange()}},g:{get:function(){return this._rgb[1]},set:function(s){this._rgb[1]=s,this.onChange()}},b:{get:function(){return this._rgb[2]},set:function(s){this._rgb[2]=s,this.onChange()}},destroy:function(){this.onChangeCallback=null}});d.exports=o},60461:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x={TOP_LEFT:0,TOP_CENTER:1,TOP_RIGHT:2,LEFT_TOP:3,LEFT_CENTER:4,LEFT_BOTTOM:5,CENTER:6,RIGHT_TOP:7,RIGHT_CENTER:8,RIGHT_BOTTOM:9,BOTTOM_LEFT:10,BOTTOM_CENTER:11,BOTTOM_RIGHT:12};d.exports=x},54312:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(62235),p=t(35893),o=t(86327),s=t(88417),r=function(e,n,l,i){return l===void 0&&(l=0),i===void 0&&(i=0),s(e,p(n)+l),o(e,a(n)+i),e};d.exports=r},46768:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(62235),p=t(26541),o=t(86327),s=t(385),r=function(e,n,l,i){return l===void 0&&(l=0),i===void 0&&(i=0),s(e,p(n)-l),o(e,a(n)+i),e};d.exports=r},35827:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(62235),p=t(54380),o=t(86327),s=t(40136),r=function(e,n,l,i){return l===void 0&&(l=0),i===void 0&&(i=0),s(e,p(n)+l),o(e,a(n)+i),e};d.exports=r},46871:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(66786),p=t(35893),o=t(7702),s=function(r,e,n,l){return n===void 0&&(n=0),l===void 0&&(l=0),a(r,p(e)+n,o(e)+l),r};d.exports=s},5198:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(7702),p=t(26541),o=t(20786),s=t(385),r=function(e,n,l,i){return l===void 0&&(l=0),i===void 0&&(i=0),s(e,p(n)-l),o(e,a(n)+i),e};d.exports=r},11879:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(60461),p=[];p[a.BOTTOM_CENTER]=t(54312),p[a.BOTTOM_LEFT]=t(46768),p[a.BOTTOM_RIGHT]=t(35827),p[a.CENTER]=t(46871),p[a.LEFT_CENTER]=t(5198),p[a.RIGHT_CENTER]=t(80503),p[a.TOP_CENTER]=t(89698),p[a.TOP_LEFT]=t(922),p[a.TOP_RIGHT]=t(21373),p[a.LEFT_BOTTOM]=p[a.BOTTOM_LEFT],p[a.LEFT_TOP]=p[a.TOP_LEFT],p[a.RIGHT_BOTTOM]=p[a.BOTTOM_RIGHT],p[a.RIGHT_TOP]=p[a.TOP_RIGHT];var o=function(s,r,e,n,l){return p[e](s,r,n,l)};d.exports=o},80503:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(7702),p=t(54380),o=t(20786),s=t(40136),r=function(e,n,l,i){return l===void 0&&(l=0),i===void 0&&(i=0),s(e,p(n)+l),o(e,a(n)+i),e};d.exports=r},89698:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(35893),p=t(17717),o=t(88417),s=t(66737),r=function(e,n,l,i){return l===void 0&&(l=0),i===void 0&&(i=0),o(e,a(n)+l),s(e,p(n)-i),e};d.exports=r},922:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(26541),p=t(17717),o=t(385),s=t(66737),r=function(e,n,l,i){return l===void 0&&(l=0),i===void 0&&(i=0),o(e,a(n)-l),s(e,p(n)-i),e};d.exports=r},21373:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(54380),p=t(17717),o=t(40136),s=t(66737),r=function(e,n,l,i){return l===void 0&&(l=0),i===void 0&&(i=0),o(e,a(n)+l),s(e,p(n)-i),e};d.exports=r},91660:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.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:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(60461),p=t(79291),o={In:t(91660),To:t(16694)};o=p(!1,o,a),d.exports=o},21578:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(62235),p=t(35893),o=t(88417),s=t(66737),r=function(e,n,l,i){return l===void 0&&(l=0),i===void 0&&(i=0),o(e,p(n)+l),s(e,a(n)+i),e};d.exports=r},10210:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(62235),p=t(26541),o=t(385),s=t(66737),r=function(e,n,l,i){return l===void 0&&(l=0),i===void 0&&(i=0),o(e,p(n)-l),s(e,a(n)+i),e};d.exports=r},82341:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(62235),p=t(54380),o=t(40136),s=t(66737),r=function(e,n,l,i){return l===void 0&&(l=0),i===void 0&&(i=0),o(e,p(n)+l),s(e,a(n)+i),e};d.exports=r},87958:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(62235),p=t(26541),o=t(86327),s=t(40136),r=function(e,n,l,i){return l===void 0&&(l=0),i===void 0&&(i=0),s(e,p(n)-l),o(e,a(n)+i),e};d.exports=r},40080:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(7702),p=t(26541),o=t(20786),s=t(40136),r=function(e,n,l,i){return l===void 0&&(l=0),i===void 0&&(i=0),s(e,p(n)-l),o(e,a(n)+i),e};d.exports=r},88466:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(26541),p=t(17717),o=t(40136),s=t(66737),r=function(e,n,l,i){return l===void 0&&(l=0),i===void 0&&(i=0),o(e,a(n)-l),s(e,p(n)-i),e};d.exports=r},38829:(d,x,t)=>{/** + * @author samme + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(60461),p=[];p[a.BOTTOM_CENTER]=t(21578),p[a.BOTTOM_LEFT]=t(10210),p[a.BOTTOM_RIGHT]=t(82341),p[a.LEFT_BOTTOM]=t(87958),p[a.LEFT_CENTER]=t(40080),p[a.LEFT_TOP]=t(88466),p[a.RIGHT_BOTTOM]=t(19211),p[a.RIGHT_CENTER]=t(34609),p[a.RIGHT_TOP]=t(48741),p[a.TOP_CENTER]=t(49440),p[a.TOP_LEFT]=t(81288),p[a.TOP_RIGHT]=t(61323);var o=function(s,r,e,n,l){return p[e](s,r,n,l)};d.exports=o},19211:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(62235),p=t(54380),o=t(86327),s=t(385),r=function(e,n,l,i){return l===void 0&&(l=0),i===void 0&&(i=0),s(e,p(n)+l),o(e,a(n)+i),e};d.exports=r},34609:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(7702),p=t(54380),o=t(20786),s=t(385),r=function(e,n,l,i){return l===void 0&&(l=0),i===void 0&&(i=0),s(e,p(n)+l),o(e,a(n)+i),e};d.exports=r},48741:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(54380),p=t(17717),o=t(385),s=t(66737),r=function(e,n,l,i){return l===void 0&&(l=0),i===void 0&&(i=0),o(e,a(n)+l),s(e,p(n)-i),e};d.exports=r},49440:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(35893),p=t(17717),o=t(86327),s=t(88417),r=function(e,n,l,i){return l===void 0&&(l=0),i===void 0&&(i=0),s(e,a(n)+l),o(e,p(n)-i),e};d.exports=r},81288:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(26541),p=t(17717),o=t(86327),s=t(385),r=function(e,n,l,i){return l===void 0&&(l=0),i===void 0&&(i=0),s(e,a(n)-l),o(e,p(n)-i),e};d.exports=r},61323:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(54380),p=t(17717),o=t(86327),s=t(40136),r=function(e,n,l,i){return l===void 0&&(l=0),i===void 0&&(i=0),s(e,a(n)+l),o(e,p(n)-i),e};d.exports=r},16694:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.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:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(88417),p=t(20786),o=function(s,r,e){return a(s,r),p(s,e)};d.exports=o},62235:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return t.y+t.height-t.height*t.originY};d.exports=x},72873:(d,x,t)=>{/** + * @author samme + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(62235),p=t(26541),o=t(54380),s=t(17717),r=t(87841),e=function(n,l){l===void 0&&(l=new r);var i=p(n),h=s(n);return l.x=i,l.y=h,l.width=o(n)-i,l.height=a(n)-h,l};d.exports=e},35893:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return t.x-t.width*t.originX+t.width*.5};d.exports=x},7702:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return t.y-t.height*t.originY+t.height*.5};d.exports=x},26541:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return t.x-t.width*t.originX};d.exports=x},87431:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return t.width*t.originX};d.exports=x},46928:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return t.height*t.originY};d.exports=x},54380:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return t.x+t.width-t.width*t.originX};d.exports=x},17717:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return t.y-t.height*t.originY};d.exports=x},86327:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){return t.y=a-t.height+t.height*t.originY,t};d.exports=x},88417:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){var p=t.width*t.originX;return t.x=a+p-t.width*.5,t};d.exports=x},20786:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){var p=t.height*t.originY;return t.y=a+p-t.height*.5,t};d.exports=x},385:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){return t.x=a+t.width*t.originX,t};d.exports=x},40136:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){return t.x=a-t.width+t.width*t.originX,t};d.exports=x},66737:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){return t.y=a+t.height*t.originY,t};d.exports=x},58724:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.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:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x={setCrisp:function(t){var a=["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"];return a.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}};d.exports=x},27919:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(8054),p=t(68703),o=[],s=!1,r=function(){var e=function(T,C,S,P,A){C===void 0&&(C=1),S===void 0&&(S=1),P===void 0&&(P=a.CANVAS),A===void 0&&(A=!1);var L,F=i(P);return F===null?(F={parent:T,canvas:document.createElement("canvas"),type:P},P===a.CANVAS&&o.push(F),L=F.canvas):(F.parent=T,L=F.canvas),A&&(F.parent=L),L.width=C,L.height=S,s&&P===a.CANVAS&&p.disable(L.getContext("2d",{willReadFrequently:!1})),L},n=function(T,C,S){return e(T,C,S,a.CANVAS)},l=function(T,C,S){return e(T,C,S,a.WEBGL)},i=function(T){if(T===void 0&&(T=a.CANVAS),T===a.WEBGL)return null;for(var C=0;C{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x="",t=function(){var a=function(r){for(var e=["i","webkitI","msI","mozI","oI"],n=0;n{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=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};d.exports=x},91610:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){a===void 0&&(a="none");var p=["-webkit-","-khtml-","-moz-","-ms-",""];return p.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};d.exports=x},26253:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports={CanvasInterpolation:t(20623),CanvasPool:t(27919),Smoothing:t(68703),TouchAction:t(65208),UserSelect:t(91610)}},40987:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(37589),o=t(1e3),s=t(7537),r=t(87837),e=new a({initialize:function(l,i,h,u){l===void 0&&(l=0),i===void 0&&(i=0),h===void 0&&(h=0),u===void 0&&(u=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(l,i,h,u)},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(n,l,i,h,u){return h===void 0&&(h=255),u===void 0&&(u=!0),this._locked=!0,this.red=n,this.green=l,this.blue=i,this.alpha=h,this._locked=!1,this.update(u)},setGLTo:function(n,l,i,h){return h===void 0&&(h=1),this._locked=!0,this.redGL=n,this.greenGL=l,this.blueGL=i,this.alphaGL=h,this._locked=!1,this.update(!0)},setFromRGB:function(n){return this._locked=!0,this.red=n.r,this.green=n.g,this.blue=n.b,n.hasOwnProperty("a")&&(this.alpha=n.a),this._locked=!1,this.update(!0)},setFromHSV:function(n,l,i){return s(n,l,i,this)},update:function(n){if(n===void 0&&(n=!1),this._locked)return this;var l=this.r,i=this.g,h=this.b,u=this.a;return this._color=p(l,i,h),this._color32=o(l,i,h,u),this._rgba="rgba("+l+","+i+","+h+","+u/255+")",n&&r(l,i,h,this),this},updateHSV:function(){var n=this.r,l=this.g,i=this.b;return r(n,l,i,this),this},clone:function(){return new e(this.r,this.g,this.b,this.a)},gray:function(n){return this.setTo(n,n,n)},random:function(n,l){n===void 0&&(n=0),l===void 0&&(l=255);var i=Math.floor(n+Math.random()*(l-n)),h=Math.floor(n+Math.random()*(l-n)),u=Math.floor(n+Math.random()*(l-n));return this.setTo(i,h,u)},randomGray:function(n,l){n===void 0&&(n=0),l===void 0&&(l=255);var i=Math.floor(n+Math.random()*(l-n));return this.setTo(i,i,i)},saturate:function(n){return this.s+=n/100,this},desaturate:function(n){return this.s-=n/100,this},lighten:function(n){return this.v+=n/100,this},darken:function(n){return this.v-=n/100,this},brighten:function(n){var l=this.r,i=this.g,h=this.b;return l=Math.max(0,Math.min(255,l-Math.round(255*-(n/100)))),i=Math.max(0,Math.min(255,i-Math.round(255*-(n/100)))),h=Math.max(0,Math.min(255,h-Math.round(255*-(n/100)))),this.setTo(l,i,h)},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(n){this.gl[0]=Math.min(Math.abs(n),1),this.r=Math.floor(this.gl[0]*255),this.update(!0)}},greenGL:{get:function(){return this.gl[1]},set:function(n){this.gl[1]=Math.min(Math.abs(n),1),this.g=Math.floor(this.gl[1]*255),this.update(!0)}},blueGL:{get:function(){return this.gl[2]},set:function(n){this.gl[2]=Math.min(Math.abs(n),1),this.b=Math.floor(this.gl[2]*255),this.update(!0)}},alphaGL:{get:function(){return this.gl[3]},set:function(n){this.gl[3]=Math.min(Math.abs(n),1),this.a=Math.floor(this.gl[3]*255),this.update()}},red:{get:function(){return this.r},set:function(n){n=Math.floor(Math.abs(n)),this.r=Math.min(n,255),this.gl[0]=n/255,this.update(!0)}},green:{get:function(){return this.g},set:function(n){n=Math.floor(Math.abs(n)),this.g=Math.min(n,255),this.gl[1]=n/255,this.update(!0)}},blue:{get:function(){return this.b},set:function(n){n=Math.floor(Math.abs(n)),this.b=Math.min(n,255),this.gl[2]=n/255,this.update(!0)}},alpha:{get:function(){return this.a},set:function(n){n=Math.floor(Math.abs(n)),this.a=Math.min(n,255),this.gl[3]=n/255,this.update()}},h:{get:function(){return this._h},set:function(n){this._h=n,s(n,this._s,this._v,this)}},s:{get:function(){return this._s},set:function(n){this._s=n,s(this._h,n,this._v,this)}},v:{get:function(){return this._v},set:function(n){this._v=n,s(this._h,this._s,n,this)}}});d.exports=e},92728:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(37589),p=function(o){o===void 0&&(o=1024);var s=[],r=255,e,n=255,l=0,i=0;for(e=0;e<=r;e++)s.push({r:n,g:e,b:i,color:a(n,e,i)});for(l=255,e=r;e>=0;e--)s.push({r:e,g:l,b:i,color:a(e,l,i)});for(n=0,e=0;e<=r;e++,l--)s.push({r:n,g:l,b:e,color:a(n,l,e)});for(l=0,i=255,e=0;e<=r;e++,i--,n++)s.push({r:n,g:l,b:i,color:a(n,l,i)});if(o===1024)return s;var h=[],u=0,c=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 x=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};d.exports=x},62957:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){var a=t.toString(16);return a.length===1?"0"+a:a};d.exports=x},37589:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){return t<<16|a<<8|p};d.exports=x},1e3:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p,o){return o<<24|t<<16|a<<8|p};d.exports=x},62183:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(40987),p=t(89528),o=function(s,r,e){var n=e,l=e,i=e;if(r!==0){var h=e<.5?e*(1+r):e+r-e*r,u=2*e-h;n=p(u,h,s+1/3),l=p(u,h,s),i=p(u,h,s-1/3)}var c=new a;return c.setGLTo(n,l,i,1)};d.exports=o},27939:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(7537),p=function(o,s){o===void 0&&(o=1),s===void 0&&(s=1);for(var r=[],e=0;e<=359;e++)r.push(a(e/359,o,s));return r};d.exports=p},7537:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(37589);function p(s,r,e,n){var l=(s+r*6)%6,i=Math.min(l,4-l,1);return Math.round(255*(n-n*e*Math.max(0,i)))}var o=function(s,r,e,n){r===void 0&&(r=1),e===void 0&&(e=1);var l=p(5,s,r,e),i=p(3,s,r,e),h=p(1,s,r,e);return n?n.setTo?n.setTo(l,i,h,n.alpha,!0):(n.r=l,n.g=i,n.b=h,n.color=a(l,i,h),n):{r:l,g:i,b:h,color:a(l,i,h)}};d.exports=o},70238:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(40987),p=function(o){var s=new a;o=o.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,function(i,h,u,c){return h+h+u+u+c+c});var r=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(o);if(r){var e=parseInt(r[1],16),n=parseInt(r[2],16),l=parseInt(r[3],16);s.setTo(e,n,l)}return s};d.exports=p},89528:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){return p<0&&(p+=1),p>1&&(p-=1),p<.16666666666666666?t+(a-t)*6*p:p<.5?a:p<.6666666666666666?t+(a-t)*(.6666666666666666-p)*6:t};d.exports=x},30100:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(40987),p=t(90664),o=function(s){var r=p(s);return new a(r.r,r.g,r.b,r.a)};d.exports=o},90664:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=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}};d.exports=x},13699:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(28915),p=function(r,e,n,l,i,h,u,c){u===void 0&&(u=100),c===void 0&&(c=0);var v=c/u;return{r:a(r,l,v),g:a(e,i,v),b:a(n,h,v)}},o=function(r,e,n,l){return n===void 0&&(n=100),l===void 0&&(l=0),p(r.r,r.g,r.b,e.r,e.g,e.b,n,l)},s=function(r,e,n,l,i,h){return i===void 0&&(i=100),h===void 0&&(h=0),p(r.r,r.g,r.b,e,n,l,i,h)};d.exports={RGBWithRGB:p,ColorWithRGB:s,ColorWithColor:o}},68957:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(40987),p=function(o){return new a(o.r,o.g,o.b,o.a)};d.exports=p},87388:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(40987),p=function(o){var s=new a,r=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(o.toLowerCase());if(r){var e=parseInt(r[1],10),n=parseInt(r[2],10),l=parseInt(r[3],10),i=r[4]!==void 0?parseFloat(r[4]):1;s.setTo(e,n,l,i*255)}return s};d.exports=p},87837:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p,o){o===void 0&&(o={h:0,s:0,v:0}),t/=255,a/=255,p/=255;var s=Math.min(t,a,p),r=Math.max(t,a,p),e=r-s,n=0,l=r===0?0:e/r,i=r;return r!==s&&(r===t?n=(a-p)/e+(a{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(62957),p=function(o,s,r,e,n){return e===void 0&&(e=255),n===void 0&&(n="#"),n==="#"?"#"+((1<<24)+(o<<16)+(s<<8)+r).toString(16).slice(1,7):"0x"+a(e)+a(o)+a(s)+a(r)};d.exports=p},85386:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(30976),p=t(40987),o=function(s,r){return s===void 0&&(s=0),r===void 0&&(r=255),new p(a(s,r),a(s,r),a(s,r))};d.exports=o},80333:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(70238),p=t(30100),o=t(68957),s=t(87388),r=function(e){var n=typeof e;switch(n){case"string":return e.substr(0,3).toLowerCase()==="rgb"?s(e):a(e);case"number":return p(e);case"object":return o(e)}};d.exports=r},3956:(d,x,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),d.exports=a},27460:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.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:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(39429),o=new a({initialize:function(r,e,n,l,i,h){e||(e=r.sys.make.image({x:n,y:l,key:i,frame:h,add:!1})),this.bitmapMask=e,this.invertAlpha=!1,this.isStencil=!1},setBitmap:function(s){this.bitmapMask=s},preRenderWebGL:function(s,r,e){s.pipelines.BITMAPMASK_PIPELINE.beginMask(this,r,e)},postRenderWebGL:function(s,r,e){s.pipelines.BITMAPMASK_PIPELINE.endMask(this,r,e)},preRenderCanvas:function(){},postRenderCanvas:function(){},destroy:function(){this.bitmapMask=null}});p.register("bitmapMask",function(s,r,e,n,l){return new o(this.scene,s,r,e,n,l)}),d.exports=o},80661:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=new a({initialize:function(s,r){this.geometryMask=r,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,s,r){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:r}),this.applyStencil(o,r,!0),o.maskCount++},applyStencil:function(o,s,r){var e=o.gl,n=this.geometryMask,l=o.maskCount,i=255;e.colorMask(!1,!1,!1,!1),r?(e.stencilFunc(e.EQUAL,l,i),e.stencilOp(e.KEEP,e.KEEP,e.INCR),l++):(e.stencilFunc(e.EQUAL,l+1,i),e.stencilOp(e.KEEP,e.KEEP,e.DECR)),this.level=l,n.renderWebGL(o,n,s),o.flush(),e.colorMask(!0,!0,!0,!0),e.stencilOp(e.KEEP,e.KEEP,e.KEEP),this.invertAlpha?e.stencilFunc(e.NOTEQUAL,l,i):e.stencilFunc(e.EQUAL,l,i)},postRenderWebGL:function(o){var s=o.gl;o.maskStack.pop(),o.maskCount--,o.flush();var r=o.currentMask;if(o.maskStack.length===0)r.mask=null,s.disable(s.STENCIL_TEST);else{var e=o.maskStack[o.maskStack.length-1];e.mask.applyStencil(o,e.camera,!1),o.currentCameraMask.mask!==e.mask?(r.mask=e.mask,r.camera=e.camera):r.mask=null}},preRenderCanvas:function(o,s,r){var e=this.geometryMask;o.currentContext.save(),e.renderCanvas(o,e,r,null,null,!0),o.currentContext.clip()},postRenderCanvas:function(o){o.currentContext.restore()},destroy:function(){this.geometryMask=null}});d.exports=p},69781:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports={BitmapMask:t(6858),GeometryMask:t(80661)}},73894:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=new a({initialize:function(s,r,e,n){(!r||r==="")&&(r=["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(` +`)),n===void 0&&(n=null),this.key=s,this.fragmentSrc=r,this.vertexSrc=e,this.uniforms=n}});d.exports=p},40366:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){var p;if(a)typeof a=="string"?p=document.getElementById(a):typeof a=="object"&&a.nodeType===1&&(p=a);else if(t.parentElement||a===null)return t;return p||(p=document.body),p.appendChild(t),t};d.exports=x},83719:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(40366),p=function(o){var s=o.config;if(!(!s.parent||!s.domCreateContainer)){var r=document.createElement("div");r.style.cssText=["display: block;","width: "+o.scale.width+"px;","height: "+o.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: "+s.domPointerEvents+";","transform: scale(1);","transform-origin: left top;"].join(" "),o.domContainer=r,a(r,s.parent)}};d.exports=p},57264:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(25892),p=function(o){if(document.readyState==="complete"||document.readyState==="interactive"){o();return}var s=function(){document.removeEventListener("deviceready",s,!0),document.removeEventListener("DOMContentLoaded",s,!0),window.removeEventListener("load",s,!0),o()};document.body?a.cordova?document.addEventListener("deviceready",s,!1):(document.addEventListener("DOMContentLoaded",s,!0),window.addEventListener("load",s,!0)):window.setTimeout(s,20)};d.exports=p},57811:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){if(!t)return window.innerHeight;var a=Math.abs(window.orientation),p={w:0,h:0},o=document.createElement("div");return o.setAttribute("style","position: fixed; height: 100vh; width: 0; top: 0"),document.documentElement.appendChild(o),p.w=a===90?o.offsetHeight:window.innerWidth,p.h=a===90?window.innerWidth:o.offsetHeight,document.documentElement.removeChild(o),o=null,Math.abs(window.orientation)!==90?p.h:p.w};d.exports=x},45818:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(13560),p=function(o,s){var r=window.screen,e=r?r.orientation||r.mozOrientation||r.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 s>o?a.ORIENTATION.PORTRAIT:a.ORIENTATION.LANDSCAPE};d.exports=p},74403:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){var a;return t!==""&&(typeof t=="string"?a=document.getElementById(t):t&&t.nodeType===1&&(a=t)),a||(a=document.body),a};d.exports=x},56836:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){var a="";try{if(window.DOMParser){var p=new DOMParser;a=p.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};d.exports=x},35846:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){t.parentNode&&t.parentNode.removeChild(t)};d.exports=x},43092:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(29747),o=new a({initialize:function(){this.isRunning=!1,this.callback=p,this.isSetTimeOut=!1,this.timeOutID=null,this.delay=0;var r=this;this.step=function e(n){r.callback(n),r.isRunning&&(r.timeOutID=window.requestAnimationFrame(e))},this.stepTimeout=function e(){r.isRunning&&(r.timeOutID=window.setTimeout(e,r.delay)),r.callback(window.performance.now())}},start:function(s,r,e){this.isRunning||(this.callback=s,this.isSetTimeOut=r,this.delay=e,this.isRunning=!0,this.timeOutID=r?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}});d.exports=o},84902:(d,x,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)};d.exports=a},47565:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(50792),o=t(37277),s=new a({Extends:p,initialize:function(){p.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});o.register("EventEmitter",s,"events"),d.exports=s},93055:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports={EventEmitter:t(47565)}},20122:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(72898),o=t(14811),s=new a({Extends:p,initialize:function(e,n){n===void 0&&(n=1),p.call(this,o.BARREL,e),this.amount=n}});d.exports=s},32251:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(72898),o=t(14811),s=new a({Extends:p,initialize:function(e,n,l,i,h,u,c){l===void 0&&(l=1),i===void 0&&(i=1),h===void 0&&(h=1),u===void 0&&(u=1),c===void 0&&(c=4),p.call(this,o.BLOOM,e),this.steps=c,this.offsetX=l,this.offsetY=i,this.blurStrength=h,this.strength=u,this.glcolor=[1,1,1],n!=null&&(this.color=n)},color:{get:function(){var r=this.glcolor;return(r[0]*255<<16)+(r[1]*255<<8)+(r[2]*255|0)},set:function(r){var e=this.glcolor;e[0]=(r>>16&255)/255,e[1]=(r>>8&255)/255,e[2]=(r&255)/255}}});d.exports=s},9047:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(72898),o=t(14811),s=new a({Extends:p,initialize:function(e,n,l,i,h,u,c){n===void 0&&(n=0),l===void 0&&(l=2),i===void 0&&(i=2),h===void 0&&(h=1),c===void 0&&(c=4),p.call(this,o.BLUR,e),this.quality=n,this.x=l,this.y=i,this.steps=c,this.strength=h,this.glcolor=[1,1,1],u!=null&&(this.color=u)},color:{get:function(){var r=this.glcolor;return(r[0]*255<<16)+(r[1]*255<<8)+(r[2]*255|0)},set:function(r){var e=this.glcolor;e[0]=(r>>16&255)/255,e[1]=(r>>8&255)/255,e[2]=(r&255)/255}}});d.exports=s},27885:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(72898),o=t(14811),s=new a({Extends:p,initialize:function(e,n,l,i,h,u,c,v){n===void 0&&(n=.5),l===void 0&&(l=1),i===void 0&&(i=.2),h===void 0&&(h=!1),u===void 0&&(u=1),c===void 0&&(c=1),v===void 0&&(v=1),p.call(this,o.BOKEH,e),this.radius=n,this.amount=l,this.contrast=i,this.isTiltShift=h,this.strength=v,this.blurX=u,this.blurY=c}});d.exports=s},12578:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(72898),o=t(14811),s=new a({Extends:p,initialize:function(e,n,l,i,h,u){n===void 0&&(n=8),h===void 0&&(h=1),u===void 0&&(u=.005),p.call(this,o.CIRCLE,e),this.scale=h,this.feather=u,this.thickness=n,this.glcolor=[1,.2,.7],this.glcolor2=[1,0,0,.4],l!=null&&(this.color=l),i!=null&&(this.backgroundColor=i)},color:{get:function(){var r=this.glcolor;return(r[0]*255<<16)+(r[1]*255<<8)+(r[2]*255|0)},set:function(r){var e=this.glcolor;e[0]=(r>>16&255)/255,e[1]=(r>>8&255)/255,e[2]=(r&255)/255}},backgroundColor:{get:function(){var r=this.glcolor2;return(r[0]*255<<16)+(r[1]*255<<8)+(r[2]*255|0)},set:function(r){var e=this.glcolor2;e[0]=(r>>16&255)/255,e[1]=(r>>8&255)/255,e[2]=(r&255)/255}},backgroundAlpha:{get:function(){return this.glcolor2[3]},set:function(r){this.glcolor2[3]=r}}});d.exports=s},15802:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(89422),o=t(14811),s=new a({Extends:p,initialize:function(e){p.call(this),this.type=o.COLOR_MATRIX,this.gameObject=e,this.active=!0},destroy:function(){this.gameObject=null,this._matrix=null,this._data=null}});d.exports=s},72898:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=new a({initialize:function(s,r){this.type=s,this.gameObject=r,this.active=!0},setActive:function(o){return this.active=o,this},destroy:function(){this.gameObject=null,this.active=!1}});d.exports=p},44553:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(72898),o=t(14811),s=new a({Extends:p,initialize:function(e,n,l,i){n===void 0&&(n="__WHITE"),l===void 0&&(l=.005),i===void 0&&(i=.005),p.call(this,o.DISPLACEMENT,e),this.x=l,this.y=i,this.glTexture,this.setTexture(n)},setTexture:function(r){var e=this.gameObject.scene.sys.textures.getFrame(r);return e&&(this.glTexture=e.glTexture),this}});d.exports=s},68531:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(72898),o=t(14811),s=new a({Extends:p,initialize:function(e,n,l,i,h){l===void 0&&(l=4),i===void 0&&(i=0),h===void 0&&(h=!1),p.call(this,o.GLOW,e),this.outerStrength=l,this.innerStrength=i,this.knockout=h,this.glcolor=[1,1,1,1],n!==void 0&&(this.color=n)},color:{get:function(){var r=this.glcolor;return(r[0]*255<<16)+(r[1]*255<<8)+(r[2]*255|0)},set:function(r){var e=this.glcolor;e[0]=(r>>16&255)/255,e[1]=(r>>8&255)/255,e[2]=(r&255)/255}}});d.exports=s},37102:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(72898),o=t(14811),s=new a({Extends:p,initialize:function(e,n,l,i,h,u,c,v,m){i===void 0&&(i=.2),h===void 0&&(h=0),u===void 0&&(u=0),c===void 0&&(c=0),v===void 0&&(v=1),m===void 0&&(m=0),p.call(this,o.GRADIENT,e),this.alpha=i,this.size=m,this.fromX=h,this.fromY=u,this.toX=c,this.toY=v,this.glcolor1=[255,0,0],this.glcolor2=[0,255,0],n!=null&&(this.color1=n),l!=null&&(this.color2=l)},color1:{get:function(){var r=this.glcolor1;return(r[0]<<16)+(r[1]<<8)+(r[2]|0)},set:function(r){var e=this.glcolor1;e[0]=r>>16&255,e[1]=r>>8&255,e[2]=r&255}},color2:{get:function(){var r=this.glcolor2;return(r[0]<<16)+(r[1]<<8)+(r[2]|0)},set:function(r){var e=this.glcolor2;e[0]=r>>16&255,e[1]=r>>8&255,e[2]=r&255}}});d.exports=s},86886:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(72898),o=t(14811),s=new a({Extends:p,initialize:function(e,n){n===void 0&&(n=1),p.call(this,o.PIXELATE,e),this.amount=n}});d.exports=s},92322:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(72898),o=t(14811),s=new a({Extends:p,initialize:function(e,n,l,i,h,u,c,v){n===void 0&&(n=0),l===void 0&&(l=0),i===void 0&&(i=.1),h===void 0&&(h=1),c===void 0&&(c=6),v===void 0&&(v=1),p.call(this,o.SHADOW,e),this.x=n,this.y=l,this.decay=i,this.power=h,this.glcolor=[0,0,0,1],this.samples=c,this.intensity=v,u!==void 0&&(this.color=u)},color:{get:function(){var r=this.glcolor;return(r[0]*255<<16)+(r[1]*255<<8)+(r[2]*255|0)},set:function(r){var e=this.glcolor;e[0]=(r>>16&255)/255,e[1]=(r>>8&255)/255,e[2]=(r&255)/255}}});d.exports=s},39563:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(72898),o=t(14811),s=new a({Extends:p,initialize:function(e,n,l,i,h){n===void 0&&(n=.5),l===void 0&&(l=.5),i===void 0&&(i=3),h===void 0&&(h=!1),p.call(this,o.SHINE,e),this.speed=n,this.lineWidth=l,this.gradient=i,this.reveal=h}});d.exports=s},56448:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(72898),o=t(14811),s=new a({Extends:p,initialize:function(e,n,l,i,h){n===void 0&&(n=.5),l===void 0&&(l=.5),i===void 0&&(i=.5),h===void 0&&(h=.5),p.call(this,o.VIGNETTE,e),this.x=n,this.y=l,this.radius=i,this.strength=h}});d.exports=s},38433:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(72898),o=t(14811),s=new a({Extends:p,initialize:function(e,n,l,i,h){n===void 0&&(n=.1),l===void 0&&(l=0),i===void 0&&(i=0),h===void 0&&(h=!1),p.call(this,o.WIPE,e),this.progress=0,this.wipeWidth=n,this.direction=l,this.axis=i,this.reveal=h}});d.exports=s},14811:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x={GLOW:4,SHADOW:5,PIXELATE:6,VIGNETTE:7,SHINE:8,BLUR:9,GRADIENT:12,BLOOM:13,COLOR_MATRIX:14,CIRCLE:15,BARREL:16,DISPLACEMENT:17,WIPE:18,BOKEH:19};d.exports=x},66064:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(79291),p=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,p),d.exports=o},25305:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(10312),p=t(23568),o=function(s,r,e){r.x=p(e,"x",0),r.y=p(e,"y",0),r.depth=p(e,"depth",0),r.flipX=p(e,"flipX",!1),r.flipY=p(e,"flipY",!1);var n=p(e,"scale",null);typeof n=="number"?r.setScale(n):n!==null&&(r.scaleX=p(n,"x",1),r.scaleY=p(n,"y",1));var l=p(e,"scrollFactor",null);typeof l=="number"?r.setScrollFactor(l):l!==null&&(r.scrollFactorX=p(l,"x",1),r.scrollFactorY=p(l,"y",1)),r.rotation=p(e,"rotation",0);var i=p(e,"angle",null);i!==null&&(r.angle=i),r.alpha=p(e,"alpha",1);var h=p(e,"origin",null);if(typeof h=="number")r.setOrigin(h);else if(h!==null){var u=p(h,"x",.5),c=p(h,"y",.5);r.setOrigin(u,c)}r.blendMode=p(e,"blendMode",a.NORMAL),r.visible=p(e,"visible",!0);var v=p(e,"add",!0);return v&&s.sys.displayList.add(r),r.preUpdate&&s.sys.updateList.add(r),r};d.exports=o},13059:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(23568),p=function(o,s){var r=a(s,"anims",null);if(r===null)return o;if(typeof r=="string")o.anims.play(r);else if(typeof r=="object"){var e=o.anims,n=a(r,"key",void 0);if(n){var l=a(r,"startFrame",void 0),i=a(r,"delay",0),h=a(r,"repeat",0),u=a(r,"repeatDelay",0),c=a(r,"yoyo",!1),v=a(r,"play",!1),m=a(r,"delayedPlay",0),T={key:n,delay:i,repeat:h,repeatDelay:u,yoyo:c,startFrame:l};v?e.play(T):m>0?e.playAfterDelay(T,m):e.load(T)}}return o};d.exports=p},8050:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(73162),o=t(37277),s=t(51708),r=t(44594),e=t(19186),n=new a({Extends:p,initialize:function(i){p.call(this,i),this.sortChildrenFlag=!1,this.scene=i,this.systems=i.sys,this.events=i.sys.events,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.events.once(r.BOOT,this.boot,this),this.events.on(r.START,this.start,this)},boot:function(){this.events.once(r.DESTROY,this.destroy,this)},addChildCallback:function(l){l.displayList&&l.displayList!==this&&l.removeFromDisplayList(),l.parentContainer&&l.parentContainer.remove(l),l.displayList||(this.queueDepthSort(),l.displayList=this,l.emit(s.ADDED_TO_SCENE,l,this.scene),this.events.emit(r.ADDED_TO_SCENE,l,this.scene))},removeChildCallback:function(l){this.queueDepthSort(),l.displayList=null,l.emit(s.REMOVED_FROM_SCENE,l,this.scene),this.events.emit(r.REMOVED_FROM_SCENE,l,this.scene)},start:function(){this.events.once(r.SHUTDOWN,this.shutdown,this)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(e(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(l,i){return l._depth-i._depth},getChildren:function(){return this.list},shutdown:function(){for(var l=this.list;l.length;)l[0].destroy(!0);this.events.off(r.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.events=null}});o.register("DisplayList",n,"displayList"),d.exports=n},95643:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(53774),o=t(45893),s=t(50792),r=t(51708),e=t(44594),n=new a({Extends:s,initialize:function(i,h){s.call(this),this.scene=i,this.displayList=null,this.type=h,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(r.ADDED_TO_SCENE,this.addedToScene,this),this.on(r.REMOVED_FROM_SCENE,this.removedFromScene,this),i.sys.queueDepthSort()},setActive:function(l){return this.active=l,this},setName:function(l){return this.name=l,this},setState:function(l){return this.state=l,this},setDataEnabled:function(){return this.data||(this.data=new o(this)),this},setData:function(l,i){return this.data||(this.data=new o(this)),this.data.set(l,i),this},incData:function(l,i){return this.data||(this.data=new o(this)),this.data.inc(l,i),this},toggleData:function(l){return this.data||(this.data=new o(this)),this.data.toggle(l),this},getData:function(l){return this.data||(this.data=new o(this)),this.data.get(l)},setInteractive:function(l,i,h){return this.scene.sys.input.enable(this,l,i,h),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(l){var i=this.displayList&&this.displayList.active?this.displayList.willRender(l):!0;return!(!i||n.RENDER_MASK!==this.renderFlags||this.cameraFilter!==0&&this.cameraFilter&l.id)},getIndexList:function(){for(var l=this,i=this.parentContainer,h=[];i&&(h.unshift(i.getIndex(l)),l=i,i.parentContainer);)i=i.parentContainer;return this.displayList?h.unshift(this.displayList.getIndex(l)):h.unshift(this.scene.sys.displayList.getIndex(l)),h},addToDisplayList:function(l){return l===void 0&&(l=this.scene.sys.displayList),this.displayList&&this.displayList!==l&&this.removeFromDisplayList(),l.exists(this)||(this.displayList=l,l.add(this,!0),l.queueDepthSort(),this.emit(r.ADDED_TO_SCENE,this,this.scene),l.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 l=this.displayList||this.scene.sys.displayList;return l&&l.exists(this)&&(l.remove(this,!0),l.queueDepthSort(),this.displayList=null,this.emit(r.REMOVED_FROM_SCENE,this,this.scene),l.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(l){!this.scene||this.ignoreDestroy||(l===void 0&&(l=!1),this.preDestroy&&this.preDestroy.call(this),this.emit(r.DESTROY,this,l),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)}});n.RENDER_MASK=15,d.exports=n},44603:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(37277),o=t(44594),s=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}});s.register=function(r,e){s.prototype.hasOwnProperty(r)||(s.prototype[r]=e)},s.remove=function(r){s.prototype.hasOwnProperty(r)&&delete s.prototype[r]},p.register("GameObjectCreator",s,"make"),d.exports=s},39429:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(37277),o=t(44594),s=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(r){return(r.renderCanvas||r.renderWebGL)&&this.displayList.add(r),r.preUpdate&&this.updateList.add(r),r},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}});s.register=function(r,e){s.prototype.hasOwnProperty(r)||(s.prototype[r]=e)},s.remove=function(r){s.prototype.hasOwnProperty(r)&&delete s.prototype[r]},p.register("GameObjectFactory",s,"add"),d.exports=s},91296:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(61340),p=new a,o=new a,s=new a,r={camera:p,sprite:o,calc:s},e=function(n,l,i){var h=p,u=o,c=s;return u.applyITRS(n.x,n.y,n.rotation,n.scaleX,n.scaleY),h.copyFrom(l.matrix),i?(h.multiplyWithOffset(i,-l.scrollX*n.scrollFactorX,-l.scrollY*n.scrollFactorY),u.e=n.x,u.f=n.y):(u.e-=l.scrollX*n.scrollFactorX,u.f-=l.scrollY*n.scrollFactorY),h.multiply(u,c),r};d.exports=e},45027:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(25774),o=t(37277),s=t(44594),r=new a({Extends:p,initialize:function(n){p.call(this),this.checkQueue=!0,this.scene=n,this.systems=n.sys,n.sys.events.once(s.BOOT,this.boot,this),n.sys.events.on(s.START,this.start,this)},boot:function(){this.systems.events.once(s.DESTROY,this.destroy,this)},start:function(){var e=this.systems.events;e.on(s.PRE_UPDATE,this.update,this),e.on(s.UPDATE,this.sceneUpdate,this),e.once(s.SHUTDOWN,this.shutdown,this)},sceneUpdate:function(e,n){for(var l=this._active,i=l.length,h=0;h{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p,o,s,r,e,n,l,i,h,u,c,v,m){var T=p.x-a.displayOriginX+s,C=p.y-a.displayOriginY+r,S=T+p.w,P=C+p.h,A=e.getXRound(T,C,n),L=e.getYRound(T,C,n),F=e.getXRound(T,P,n),I=e.getYRound(T,P,n),D=e.getXRound(S,P,n),B=e.getYRound(S,P,n),G=e.getXRound(S,C,n),z=e.getYRound(S,C,n);t.batchQuad(a,A,L,F,I,D,B,G,z,o.u0,o.v0,o.u1,o.v1,l,i,h,u,c,v,m)};d.exports=x},53048:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p,o){if(p===void 0&&(p=!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 s=t.text,r=s.length,e=t.maxWidth,n=t.wordWrapCharCode,l=Number.MAX_VALUE,i=Number.MAX_VALUE,h=0,u=0,c=t.fontData.chars,v=t.fontData.lineHeight,m=t.letterSpacing,T=t.lineSpacing,C=0,S=0,P=0,A=null,L=t._align,F=0,I=0,D=t.fontSize/t.fontData.size,B=D*t.scaleX,G=D*t.scaleY,z=null,W=0,Y=[],K=Number.MAX_VALUE,Z=0,V=0,H=0,N,U=[],X=[],$=null;if(e>0){for(N=0;Ne||ct>e?(et.push(nt.i-1),nt.cr?(et.push(nt.i+nt.word.length),J=0,Q=null):Q=nt):nt.cr&&(et.push(nt.i+nt.word.length),J=0,Q=null)}var Et=function(Qt,xe,Ce){return Qt.substr(0,xe)+Ce+Qt.substr(xe+1)};for(N=et.length-1;N>=0;N--)s=Et(s,et[N],` +`);o.wrappedText=s,r=s.length,U=[],$=null}var St=0;for(N=0;NZ&&(Z=H),HF&&(l=F),i>I&&(i=I);var dt=F+A.xAdvance,Tt=I+v;hZ&&(Z=H),H0)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),p=function(o,s,r,e,n,l,i){var h=o.sys.textures.get(r),u=h.get(e),c=o.sys.cache.xml.get(n);if(u&&c){var v=a(c,u,l,i,h);return o.sys.cache.bitmapFont.add(s,{data:v,texture:r,frame:e,fromAtlas:!0}),!0}else return!1};d.exports=p},6925:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(35154),p=function(o,s){var r=s.width,e=s.height,n=Math.floor(r/2),l=Math.floor(e/2),i=a(s,"chars","");if(i!==""){var h=a(s,"image",""),u=o.sys.textures.getFrame(h),c=u.cutX,v=u.cutY,m=u.source.width,T=u.source.height,C=a(s,"offset.x",0),S=a(s,"offset.y",0),P=a(s,"spacing.x",0),A=a(s,"spacing.y",0),L=a(s,"lineSpacing",0),F=a(s,"charsPerRow",null);F===null&&(F=m/r,F>i.length&&(F=i.length));for(var I=C,D=S,B={retroFont:!0,font:h,size:r,lineHeight:e+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 x(a,p){return parseInt(a.getAttribute(p),10)}var t=function(a,p,o,s,r){o===void 0&&(o=0),s===void 0&&(s=0);var e=p.cutX,n=p.cutY,l=p.source.width,i=p.source.height,h=p.sourceIndex,u={},c=a.getElementsByTagName("info")[0],v=a.getElementsByTagName("common")[0];u.font=c.getAttribute("face"),u.size=x(c,"size"),u.lineHeight=x(v,"lineHeight")+s,u.chars={};var m=a.getElementsByTagName("char"),T=p!==void 0&&p.trimmed;if(T)var C=p.height,S=p.width;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(87662),p=t(79291),o={Parse:t(6925)};o=p(!1,o,a),d.exports=o},87662:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x={TEXT_SET1:" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",TEXT_SET2:` !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ`,TEXT_SET3:"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",TEXT_SET4:"ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789",TEXT_SET5:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789",TEXT_SET6:`ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789"(),-.' `,TEXT_SET7:`AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW")28FLRX-'39`,TEXT_SET8:"0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET9:`ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'"?!`,TEXT_SET10:"ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET11:`ABCDEFGHIJKLMNOPQRSTUVWXYZ.,"-+!?()':;0123456789`};d.exports=x},2638:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(22186),p=t(83419),o=t(12310),s=new p({Extends:a,Mixins:[o],initialize:function(e,n,l,i,h,u,c){a.call(this,e,n,l,i,h,u,c),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(r,e){return this.cropWidth=r,this.cropHeight=e,this},setDisplayCallback:function(r){return this.displayCallback=r,this},setScrollX:function(r){return this.scrollX=r,this},setScrollY:function(r){return this.scrollY=r,this}});d.exports=s},86741:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(20926),p=function(o,s,r,e){var n=s._text,l=n.length,i=o.currentContext;if(!(l===0||!a(o,i,s,r,e))){r.addToRenderList(s);var h=s.fromAtlas?s.frame:s.texture.frames.__BASE,u=s.displayCallback,c=s.callbackData,v=s.fontData.chars,m=s.fontData.lineHeight,T=s._letterSpacing,C=0,S=0,P=0,A=null,L=0,F=0,I=0,D=0,B=0,G=0,z=null,W=0,Y=s.frame.source.image,K=h.cutX,Z=h.cutY,V=0,H=0,N=s._fontSize/s.fontData.size,U=s._align,X=0,$=0;s.getTextBounds(!1);var k=s._bounds.lines;U===1?$=(k.longest-k.lengths[0])/2:U===2&&($=k.longest-k.lengths[0]),i.translate(-s.displayOriginX,-s.displayOriginY);var Q=r.roundPixels;s.cropWidth>0&&s.cropHeight>0&&(i.beginPath(),i.rect(0,0,s.cropWidth,s.cropHeight),i.clip());for(var J=0;J{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(2638),p=t(25305),o=t(44603),s=t(23568);o.register("dynamicBitmapText",function(r,e){r===void 0&&(r={});var n=s(r,"font",""),l=s(r,"text",""),i=s(r,"size",!1),h=new a(this.scene,0,0,n,l,i);return e!==void 0&&(r.add=e),p(this.scene,h,r),h})},72566:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(2638),p=t(39429);p.register("dynamicBitmapText",function(o,s,r,e,n){return this.displayList.add(new a(this.scene,o,s,r,e,n))})},12310:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),p=a,o=a;p=t(73482),o=t(86741),d.exports={renderWebGL:p,renderCanvas:o}},73482:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(91296),p=t(61340),o=t(70554),s=new p,r=function(e,n,l,i){var h=n.text,u=h.length;if(u!==0){l.addToRenderList(n);var c=e.pipelines.set(n.pipeline,n),v=a(n,l,i);e.pipelines.preBatch(n);var m=v.sprite,T=v.calc,C=s,S=n.cropWidth>0||n.cropHeight>0;S&&(c.flush(),e.pushScissor(T.tx,T.ty,n.cropWidth*T.scaleX,n.cropHeight*T.scaleY));var P=n.frame,A=P.glTexture,L=n.tintFill,F=o.getTintAppendFloatAlpha(n.tintTopLeft,l.alpha*n._alphaTL),I=o.getTintAppendFloatAlpha(n.tintTopRight,l.alpha*n._alphaTR),D=o.getTintAppendFloatAlpha(n.tintBottomLeft,l.alpha*n._alphaBL),B=o.getTintAppendFloatAlpha(n.tintBottomRight,l.alpha*n._alphaBR),G=c.setGameObject(n),z=0,W=0,Y=0,K=0,Z=n.letterSpacing,V,H=0,N=0,U,X=n.scrollX,$=n.scrollY,k=n.fontData,Q=k.chars,J=k.lineHeight,et=n.fontSize/k.size,nt=0,st=n._align,ot=0,ut=0,at=n.getTextBounds(!1);n.maxWidth>0&&(h=at.wrappedText,u=h.length);var ct=n._bounds.lines;st===1?ut=(ct.longest-ct.lengths[0])/2:st===2&&(ut=ct.longest-ct.lengths[0]);for(var Et=l.roundPixels,St=n.displayCallback,Ct=n.callbackData,dt=0;dt{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(45319),o=t(31401),s=t(95643),r=t(53048),e=t(61327),n=t(21859),l=t(87841),i=t(18658),h=new a({Extends:s,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,i],initialize:function(c,v,m,T,C,S,P){C===void 0&&(C=""),P===void 0&&(P=0),s.call(this,c,"BitmapText"),this.font=T;var A=this.scene.sys.cache.bitmapFont.get(T);A||console.warn("Invalid BitmapText key: "+T),this.fontData=A.data,this._text="",this._fontSize=S||this.fontData.size,this._letterSpacing=0,this._lineSpacing=0,this._align=P,this._bounds=r(),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=A.fromAtlas,this.setTexture(A.texture,A.frame),this.setPosition(v,m),this.setOrigin(0,0),this.initPipeline(),this.initPostPipeline(),this.setText(C)},setLeftAlign:function(){return this._align=h.ALIGN_LEFT,this._dirty=!0,this},setCenterAlign:function(){return this._align=h.ALIGN_CENTER,this._dirty=!0,this},setRightAlign:function(){return this._align=h.ALIGN_RIGHT,this._dirty=!0,this},setFontSize:function(u){return this._fontSize=u,this._dirty=!0,this},setLetterSpacing:function(u){return u===void 0&&(u=0),this._letterSpacing=u,this._dirty=!0,this},setLineSpacing:function(u){return u===void 0&&(u=0),this.lineSpacing=u,this},setText:function(u){return!u&&u!==0&&(u=""),Array.isArray(u)&&(u=u.join(` +`)),u!==this.text&&(this._text=u.toString(),this._dirty=!0,this.updateDisplayOrigin()),this},setDropShadow:function(u,c,v,m){return u===void 0&&(u=0),c===void 0&&(c=0),v===void 0&&(v=0),m===void 0&&(m=.5),this.dropShadowX=u,this.dropShadowY=c,this.dropShadowColor=v,this.dropShadowAlpha=m,this},setCharacterTint:function(u,c,v,m,T,C,S){u===void 0&&(u=0),c===void 0&&(c=1),v===void 0&&(v=!1),m===void 0&&(m=-1),T===void 0&&(T=m,C=m,S=m);var P=this.text.length;c===-1&&(c=P),u<0&&(u=P+u),u=p(u,0,P-1);for(var A=p(u+c,u,P),L=this.charColors,F=u;F{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(20926),p=function(o,s,r,e){var n=s._text,l=n.length,i=o.currentContext;if(!(l===0||!a(o,i,s,r,e))){r.addToRenderList(s);var h=s.fromAtlas?s.frame:s.texture.frames.__BASE,u=s.fontData.chars,c=s.fontData.lineHeight,v=s._letterSpacing,m=s._lineSpacing,T=0,C=0,S=0,P=null,A=0,L=0,F=0,I=0,D=0,B=0,G=null,z=0,W=h.source.image,Y=h.cutX,K=h.cutY,Z=s._fontSize/s.fontData.size,V=s._align,H=0,N=0,U=s.getTextBounds(!1);s.maxWidth>0&&(n=U.wrappedText,l=n.length);var X=s._bounds.lines;V===1?N=(X.longest-X.lengths[0])/2:V===2&&(N=X.longest-X.lengths[0]),i.translate(-s.displayOriginX,-s.displayOriginY);for(var $=r.roundPixels,k=0;k{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(22186),p=t(25305),o=t(44603),s=t(23568),r=t(35154);o.register("bitmapText",function(e,n){e===void 0&&(e={});var l=r(e,"font",""),i=s(e,"text",""),h=s(e,"size",!1),u=r(e,"align",0),c=new a(this.scene,0,0,l,i,h,u);return n!==void 0&&(e.add=n),p(this.scene,c,e),c})},34914:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(22186),p=t(39429);p.register("bitmapText",function(o,s,r,e,n,l){return this.displayList.add(new a(this.scene,o,s,r,e,n,l))})},18658:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),p=a,o=a;p=t(33590),o=t(37289),d.exports={renderWebGL:p,renderCanvas:o}},33590:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(3217),p=t(91296),o=t(70554),s=function(r,e,n,l){var i=e._text,h=i.length;if(h!==0){n.addToRenderList(e);var u=r.pipelines.set(e.pipeline,e),c=p(e,n,l).calc;r.pipelines.preBatch(e);var v=n.roundPixels,m=n.alpha,T=e.charColors,C=e.tintFill,S=o.getTintAppendFloatAlpha,P=S(e.tintTopLeft,m*e._alphaTL),A=S(e.tintTopRight,m*e._alphaTR),L=S(e.tintBottomLeft,m*e._alphaBL),F=S(e.tintBottomRight,m*e._alphaBR),I=e.frame.glTexture,D=u.setGameObject(e),B=e.getTextBounds(!1),G,z,W,Y=B.characters,K=e.dropShadowX,Z=e.dropShadowY,V=K!==0||Z!==0;if(V){var H=e.dropShadowColor,N=e.dropShadowAlpha,U=S(H,m*N*e._alphaTL),X=S(H,m*N*e._alphaTR),$=S(H,m*N*e._alphaBL),k=S(H,m*N*e._alphaBR);for(G=0;G{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(48011),p=t(46590),o=t(83419),s=t(31401),r=t(4327),e=t(95643),n=t(73162),l=new o({Extends:e,Mixins:[s.Alpha,s.BlendMode,s.Depth,s.Mask,s.Pipeline,s.PostPipeline,s.ScrollFactor,s.Size,s.Texture,s.Transform,s.Visible,a],initialize:function(h,u,c,v,m){e.call(this,h,"Blitter"),this.setTexture(v,m),this.setPosition(u,c),this.initPipeline(),this.initPostPipeline(),this.children=new n,this.renderList=[],this.dirty=!1},create:function(i,h,u,c,v){c===void 0&&(c=!0),v===void 0&&(v=this.children.length),u===void 0?u=this.frame:u instanceof r||(u=this.texture.get(u));var m=new p(this,i,h,u,c);return this.children.addAt(m,v,!1),this.dirty=!0,m},createFromCallback:function(i,h,u,c){for(var v=this.createMultiple(h,u,c),m=0;m0},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=[]}});d.exports=l},72396:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p,o){var s=a.getRenderList();if(s.length!==0){var r=t.currentContext,e=p.alpha*a.alpha;if(e!==0){p.addToRenderList(a),r.globalCompositeOperation=t.blendModes[a.blendMode],r.imageSmoothingEnabled=!a.frame.source.scaleMode;var n=a.x-p.scrollX*a.scrollFactorX,l=a.y-p.scrollY*a.scrollFactorY;r.save(),o&&o.copyToContext(r);for(var i=p.roundPixels,h=0;h0&&m.height>0&&(r.save(),r.translate(u.x+n,u.y+l),r.scale(S,P),r.drawImage(v.source.image,m.x,m.y,m.width,m.height,T,C,m.width,m.height),r.restore())):(i&&(T=Math.round(T),C=Math.round(C)),m.width>0&&m.height>0&&r.drawImage(v.source.image,m.x,m.y,m.width,m.height,T+u.x+n,C+u.y+l,m.width,m.height)))}r.restore()}}};d.exports=x},9403:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(6107),p=t(25305),o=t(44603),s=t(23568);o.register("blitter",function(r,e){r===void 0&&(r={});var n=s(r,"key",null),l=s(r,"frame",null),i=new a(this.scene,0,0,n,l);return e!==void 0&&(r.add=e),p(this.scene,i,r),i})},12709:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(6107),p=t(39429);p.register("blitter",function(o,s,r,e){return this.displayList.add(new a(this.scene,o,s,r,e))})},48011:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),p=a,o=a;p=t(99485),o=t(72396),d.exports={renderWebGL:p,renderCanvas:o}},99485:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(61340),p=t(70554),o=new a,s=function(r,e,n,l){var i=e.getRenderList(),h=n.alpha*e.alpha;if(!(i.length===0||h===0)){n.addToRenderList(e);var u=r.pipelines.set(this.pipeline,e),c=n.scrollX*e.scrollFactorX,v=n.scrollY*e.scrollFactorY,m=o.copyFrom(n.matrix);l&&(m.multiplyWithOffset(l,-c,-v),c=0,v=0);var T=e.x-c,C=e.y-v,S=-1,P=!1;r.pipelines.preBatch(e);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(83419),p=t(4327),o=new a({initialize:function(r,e,n,l,i){this.parent=r,this.x=e,this.y=n,this.frame=l,this.data={},this.tint=16777215,this._visible=i,this._alpha=1,this.flipX=!1,this.flipY=!1,this.hasTransformComponent=!0},setFrame:function(s){return s===void 0?this.frame=this.parent.frame:s instanceof p&&s.texture===this.parent.texture?this.frame=s:this.frame=this.parent.texture.get(s),this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this},reset:function(s,r,e){return this.x=s,this.y=r,this.flipX=!1,this.flipY=!1,this._alpha=1,this._visible=!0,this.parent.dirty=!0,e&&this.setFrame(e),this},setPosition:function(s,r){return this.x=s,this.y=r,this},setFlipX:function(s){return this.flipX=s,this},setFlipY:function(s){return this.flipY=s,this},setFlip:function(s,r){return this.flipX=s,this.flipY=r,this},setVisible:function(s){return this.visible=s,this},setAlpha:function(s){return this.alpha=s,this},setTint:function(s){return this.tint=s,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(s){this.parent.dirty|=this._visible!==s,this._visible=s}},alpha:{get:function(){return this._alpha},set:function(s){this.parent.dirty|=this._alpha>0!=s>0,this._alpha=s}}});d.exports=o},16005:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(45319),p=2,o={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(s,r,e,n){return s===void 0&&(s=1),r===void 0?this.alpha=s:(this._alphaTL=a(s,0,1),this._alphaTR=a(r,0,1),this._alphaBL=a(e,0,1),this._alphaBR=a(n,0,1)),this},alpha:{get:function(){return this._alpha},set:function(s){var r=a(s,0,1);this._alpha=r,this._alphaTL=r,this._alphaTR=r,this._alphaBL=r,this._alphaBR=r,r===0?this.renderFlags&=~p:this.renderFlags|=p}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(s){var r=a(s,0,1);this._alphaTL=r,r!==0&&(this.renderFlags|=p)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(s){var r=a(s,0,1);this._alphaTR=r,r!==0&&(this.renderFlags|=p)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(s){var r=a(s,0,1);this._alphaBL=r,r!==0&&(this.renderFlags|=p)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(s){var r=a(s,0,1);this._alphaBR=r,r!==0&&(this.renderFlags|=p)}}};d.exports=o},88509:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(45319),p=2,o={_alpha:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(s){return s===void 0&&(s=1),this.alpha=s,this},alpha:{get:function(){return this._alpha},set:function(s){var r=a(s,0,1);this._alpha=r,r===0?this.renderFlags&=~p:this.renderFlags|=p}}};d.exports=o},90065:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(10312),p={_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}};d.exports=p},94215:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x={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}};d.exports=x},61683:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x={texture:null,frame:null,isCropped:!1,setCrop:function(t,a,p,o){if(t===void 0)this.isCropped=!1;else if(this.frame){if(typeof t=="number")this.frame.setCropUVs(this._crop,t,a,p,o,this.flipX,this.flipY);else{var s=t;this.frame.setCropUVs(this._crop,s.x,s.y,s.width,s.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}}};d.exports=x},89272:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x={_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}};d.exports=x},47059:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(66064),o=t(19133),s=new a({initialize:function(e,n){this.gameObject=e,this.isPost=n,this.enabled=!1,this.list=[],this.padding=0},setPadding:function(r){return r===void 0&&(r=0),this.padding=r,this.gameObject},onFXCopy:function(){},onFX:function(){},enable:function(r){if(!this.isPost){var e=this.gameObject.scene.sys.renderer;e&&e.pipelines?(this.gameObject.pipeline=e.pipelines.FX_PIPELINE,r!==void 0&&(this.padding=r),this.enabled=!0):this.enabled=!1}},clear:function(){if(this.isPost)this.gameObject.resetPostPipeline(!0);else{for(var r=this.list,e=0;e{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x={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}};d.exports=x},8004:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(87841),p=t(11520),o=t(26099),s={prepareBoundsOutput:function(r,e){if(e===void 0&&(e=!1),this.rotation!==0&&p(r,this.x,this.y,this.rotation),e&&this.parentContainer){var n=this.parentContainer.getBoundsTransformMatrix();n.transformPoint(r.x,r.y,r)}return r},getCenter:function(r,e){return r===void 0&&(r=new o),r.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,r.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(r,e)},getTopLeft:function(r,e){return r||(r=new o),r.x=this.x-this.displayWidth*this.originX,r.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(r,e)},getTopCenter:function(r,e){return r||(r=new o),r.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,r.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(r,e)},getTopRight:function(r,e){return r||(r=new o),r.x=this.x-this.displayWidth*this.originX+this.displayWidth,r.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(r,e)},getLeftCenter:function(r,e){return r||(r=new o),r.x=this.x-this.displayWidth*this.originX,r.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(r,e)},getRightCenter:function(r,e){return r||(r=new o),r.x=this.x-this.displayWidth*this.originX+this.displayWidth,r.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(r,e)},getBottomLeft:function(r,e){return r||(r=new o),r.x=this.x-this.displayWidth*this.originX,r.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(r,e)},getBottomCenter:function(r,e){return r||(r=new o),r.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,r.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(r,e)},getBottomRight:function(r,e){return r||(r=new o),r.x=this.x-this.displayWidth*this.originX+this.displayWidth,r.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(r,e)},getBounds:function(r){r===void 0&&(r=new a);var e,n,l,i,h,u,c,v;if(this.parentContainer){var m=this.parentContainer.getBoundsTransformMatrix();this.getTopLeft(r),m.transformPoint(r.x,r.y,r),e=r.x,n=r.y,this.getTopRight(r),m.transformPoint(r.x,r.y,r),l=r.x,i=r.y,this.getBottomLeft(r),m.transformPoint(r.x,r.y,r),h=r.x,u=r.y,this.getBottomRight(r),m.transformPoint(r.x,r.y,r),c=r.x,v=r.y}else this.getTopLeft(r),e=r.x,n=r.y,this.getTopRight(r),l=r.x,i=r.y,this.getBottomLeft(r),h=r.x,u=r.y,this.getBottomRight(r),c=r.x,v=r.y;return r.x=Math.min(e,l,h,c),r.y=Math.min(n,i,u,v),r.width=Math.max(e,l,h,c)-r.x,r.height=Math.max(n,i,u,v)-r.y,r}};d.exports=s},8573:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(6858),p=t(80661),o={mask:null,setMask:function(s){return this.mask=s,this},clearMask:function(s){return s===void 0&&(s=!1),s&&this.mask&&this.mask.destroy(),this.mask=null,this},createBitmapMask:function(s,r,e,n,l){return s===void 0&&(this.texture||this.shader||this.geom)&&(s=this),new a(this.scene,s,r,e,n,l)},createGeometryMask:function(s){return s===void 0&&(this.type==="Graphics"||this.geom)&&(s=this),new p(this.scene,s)}};d.exports=o},27387:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x={_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}};d.exports=x},37640:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(39506),p=t(57355),o=t(35154),s=t(86353),r=t(26099),e={path:null,rotateToPath:!1,pathRotationOffset:0,pathOffset:null,pathVector:null,pathDelta:null,pathTween:null,pathConfig:null,_prevDirection:s.PLAYING_FORWARD,setPath:function(n,l){l===void 0&&(l=this.pathConfig);var i=this.pathTween;return i&&i.isPlaying()&&i.stop(),this.path=n,l&&this.startFollow(l),this},setRotateToPath:function(n,l){return l===void 0&&(l=0),this.rotateToPath=n,this.pathRotationOffset=l,this},isFollowing:function(){var n=this.pathTween;return n&&n.isPlaying()},startFollow:function(n,l){n===void 0&&(n={}),l===void 0&&(l=0);var i=this.pathTween;i&&i.isPlaying()&&i.stop(),typeof n=="number"&&(n={duration:n}),n.from=o(n,"from",0),n.to=o(n,"to",1);var h=p(n,"positionOnPath",!1);this.rotateToPath=p(n,"rotateToPath",!1),this.pathRotationOffset=o(n,"rotationOffset",0);var u=o(n,"startAt",l);if(u&&(n.onStart=function(v){var m=v.data[0];m.progress=u,m.elapsed=m.duration*u;var T=m.ease(m.progress);m.current=m.start+(m.end-m.start)*T,m.setTargetValue()}),this.pathOffset||(this.pathOffset=new r(this.x,this.y)),this.pathVector||(this.pathVector=new r),this.pathDelta||(this.pathDelta=new r),this.pathDelta.reset(),n.persist=!0,this.pathTween=this.scene.sys.tweens.addCounter(n),this.path.getStartPoint(this.pathOffset),h&&(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=s.PLAYING_FORWARD,this.rotateToPath){var c=this.path.getPoint(.1);this.rotation=Math.atan2(c.y-this.y,c.x-this.x)+a(this.pathRotationOffset)}return this.pathConfig=n,this},pauseFollow:function(){var n=this.pathTween;return n&&n.isPlaying()&&n.pause(),this},resumeFollow:function(){var n=this.pathTween;return n&&n.isPaused()&&n.resume(),this},stopFollow:function(){var n=this.pathTween;return n&&n.isPlaying()&&n.stop(),this},pathUpdate:function(){var n=this.pathTween;if(n&&n.data){var l=n.data[0],i=this.pathDelta,h=this.pathVector;if(i.copy(h).negate(),l.state===s.COMPLETE){this.path.getPoint(l.end,h),i.add(h),h.add(this.pathOffset),this.setPosition(h.x,h.y);return}else if(l.state!==s.PLAYING_FORWARD&&l.state!==s.PLAYING_BACKWARD)return;this.path.getPoint(n.getValue(),h),i.add(h),h.add(this.pathOffset);var u=this.x,c=this.y;this.setPosition(h.x,h.y);var v=this.x-u,m=this.y-c;if(v===0&&m===0)return;if(l.state!==this._prevDirection){this._prevDirection=l.state;return}this.rotateToPath&&(this.rotation=Math.atan2(m,v)+a(this.pathRotationOffset))}}};d.exports=e},72699:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(62644),p={defaultPipeline:null,pipeline:null,pipelineData:null,initPipeline:function(o){this.pipelineData={};var s=this.scene.sys.renderer;if(!s)return!1;var r=s.pipelines;if(r){o===void 0&&(o=r.default);var e=r.get(o);if(e)return this.defaultPipeline=e,this.pipeline=e,!0}return!1},setPipeline:function(o,s,r){var e=this.scene.sys.renderer;if(!e)return this;var n=e.pipelines;if(n){var l=n.get(o);l&&(this.pipeline=l),s&&(this.pipelineData=r?a(s):s)}return this},setPipelineData:function(o,s){var r=this.pipelineData;return s===void 0?delete r[o]:r[o]=s,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}};d.exports=p},17581:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(62644),p=t(47059),o=t(19133),s={hasPostPipeline:!1,postPipelines:null,postPipelineData:null,preFX:null,postFX:null,initPostPipeline:function(r){this.postPipelines=[],this.postPipelineData={},this.postFX=new p(this,!0),r&&(this.preFX=new p(this,!1))},setPostPipeline:function(r,e,n){var l=this.scene.sys.renderer;if(!l)return this;var i=l.pipelines;if(i){Array.isArray(r)||(r=[r]);for(var h=0;h0,this},setPostPipelineData:function(r,e){var n=this.postPipelineData;return e===void 0?delete n[r]:n[r]=e,this},getPostPipeline:function(r){for(var e=typeof r=="string",n=this.postPipelines,l=[],i=0;i=0;l--){var i=n[l];(e&&i.name===r||!e&&i===r)&&(i.destroy(),o(n,l))}return this.hasPostPipeline=this.postPipelines.length>0,this},clearFX:function(){return this.preFX&&this.preFX.clear(),this.postFX&&this.postFX.clear(),this}};d.exports=s},80227:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,a){return a===void 0&&(a=t),this.scrollFactorX=t,this.scrollFactorY=a,this}};d.exports=x},16736:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x={_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}};d.exports=x},37726:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(4327),p=8,o={texture:null,frame:null,isCropped:!1,setTexture:function(s,r,e,n){return this.texture=this.scene.sys.textures.get(s),this.setFrame(r,e,n)},setFrame:function(s,r,e){return r===void 0&&(r=!0),e===void 0&&(e=!0),s instanceof a?(this.texture=this.scene.sys.textures.get(s.texture.key),this.frame=s):this.frame=this.texture.get(s),!this.frame.cutWidth||!this.frame.cutHeight?this.renderFlags&=~p:this.renderFlags|=p,this._sizeComponent&&r&&this.setSizeToFrame(),this._originComponent&&e&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}};d.exports=o},79812:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(4327),p=8,o={texture:null,frame:null,isCropped:!1,setCrop:function(s,r,e,n){if(s===void 0)this.isCropped=!1;else if(this.frame){if(typeof s=="number")this.frame.setCropUVs(this._crop,s,r,e,n,this.flipX,this.flipY);else{var l=s;this.frame.setCropUVs(this._crop,l.x,l.y,l.width,l.height,this.flipX,this.flipY)}this.isCropped=!0}return this},setTexture:function(s,r){return this.texture=this.scene.sys.textures.get(s),this.setFrame(r)},setFrame:function(s,r,e){return r===void 0&&(r=!0),e===void 0&&(e=!0),s instanceof a?(this.texture=this.scene.sys.textures.get(s.texture.key),this.frame=s):this.frame=this.texture.get(s),!this.frame.cutWidth||!this.frame.cutHeight?this.renderFlags&=~p:this.renderFlags|=p,this._sizeComponent&&r&&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}}};d.exports=o},27472:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x={tintTopLeft:16777215,tintTopRight:16777215,tintBottomLeft:16777215,tintBottomRight:16777215,tintFill:!1,clearTint:function(){return this.setTint(16777215),this},setTint:function(t,a,p,o){return t===void 0&&(t=16777215),a===void 0&&(a=t,p=t,o=t),this.tintTopLeft=t,this.tintTopRight=a,this.tintBottomLeft=p,this.tintBottomRight=o,this.tintFill=!1,this},setTintFill:function(t,a,p,o){return this.setTint(t,a,p,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}}};d.exports=x},53774:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=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};d.exports=x},16901:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(36383),p=t(61340),o=t(85955),s=t(86554),r=t(30954),e=t(26099),n=4,l={hasTransformComponent:!0,_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scale:{get:function(){return(this._scaleX+this._scaleY)/2},set:function(i){this._scaleX=i,this._scaleY=i,i===0?this.renderFlags&=~n:this.renderFlags|=n}},scaleX:{get:function(){return this._scaleX},set:function(i){this._scaleX=i,i===0?this.renderFlags&=~n:this._scaleY!==0&&(this.renderFlags|=n)}},scaleY:{get:function(){return this._scaleY},set:function(i){this._scaleY=i,i===0?this.renderFlags&=~n:this._scaleX!==0&&(this.renderFlags|=n)}},angle:{get:function(){return r(this._rotation*a.RAD_TO_DEG)},set:function(i){this.rotation=r(i)*a.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(i){this._rotation=s(i)}},setPosition:function(i,h,u,c){return i===void 0&&(i=0),h===void 0&&(h=i),u===void 0&&(u=0),c===void 0&&(c=0),this.x=i,this.y=h,this.z=u,this.w=c,this},copyPosition:function(i){return i.x!==void 0&&(this.x=i.x),i.y!==void 0&&(this.y=i.y),i.z!==void 0&&(this.z=i.z),i.w!==void 0&&(this.w=i.w),this},setRandomPosition:function(i,h,u,c){return i===void 0&&(i=0),h===void 0&&(h=0),u===void 0&&(u=this.scene.sys.scale.width),c===void 0&&(c=this.scene.sys.scale.height),this.x=i+Math.random()*u,this.y=h+Math.random()*c,this},setRotation:function(i){return i===void 0&&(i=0),this.rotation=i,this},setAngle:function(i){return i===void 0&&(i=0),this.angle=i,this},setScale:function(i,h){return i===void 0&&(i=1),h===void 0&&(h=i),this.scaleX=i,this.scaleY=h,this},setX:function(i){return i===void 0&&(i=0),this.x=i,this},setY:function(i){return i===void 0&&(i=0),this.y=i,this},setZ:function(i){return i===void 0&&(i=0),this.z=i,this},setW:function(i){return i===void 0&&(i=0),this.w=i,this},getLocalTransformMatrix:function(i){return i===void 0&&(i=new p),i.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(i,h){i===void 0&&(i=new p);var u=this.parentContainer;if(!u)return this.getLocalTransformMatrix(i);for(h||(h=new p),i.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY);u;)h.applyITRS(u.x,u.y,u._rotation,u._scaleX,u._scaleY),h.multiply(i,i),u=u.parentContainer;return i},getLocalPoint:function(i,h,u,c){u||(u=new e),c||(c=this.scene.sys.cameras.main);var v=c.scrollX,m=c.scrollY,T=i+v*this.scrollFactorX-v,C=h+m*this.scrollFactorY-m;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(T,C,u):o(T,C,this.x,this.y,this.rotation,this.scaleX,this.scaleY,u),this._originComponent&&(u.x+=this._displayOriginX,u.y+=this._displayOriginY),u},getParentRotation:function(){for(var i=0,h=this.parentContainer;h;)i+=h.rotation,h=h.parentContainer;return i}};d.exports=l},61340:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(36383),o=t(26099),s=new a({initialize:function(e,n,l,i,h,u){e===void 0&&(e=1),n===void 0&&(n=0),l===void 0&&(l=0),i===void 0&&(i=1),h===void 0&&(h=0),u===void 0&&(u=0),this.matrix=new Float32Array([e,n,l,i,h,u,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(r){this.matrix[0]=r}},b:{get:function(){return this.matrix[1]},set:function(r){this.matrix[1]=r}},c:{get:function(){return this.matrix[2]},set:function(r){this.matrix[2]=r}},d:{get:function(){return this.matrix[3]},set:function(r){this.matrix[3]=r}},e:{get:function(){return this.matrix[4]},set:function(r){this.matrix[4]=r}},f:{get:function(){return this.matrix[5]},set:function(r){this.matrix[5]=r}},tx:{get:function(){return this.matrix[4]},set:function(r){this.matrix[4]=r}},ty:{get:function(){return this.matrix[5]},set:function(r){this.matrix[5]=r}},rotation:{get:function(){return Math.acos(this.a/this.scaleX)*(Math.atan(-this.c/this.a)<0?-1:1)}},rotationNormalized:{get:function(){var r=this.matrix,e=r[0],n=r[1],l=r[2],i=r[3];return e||n?n>0?Math.acos(e/this.scaleX):-Math.acos(e/this.scaleX):l||i?p.TAU-(i>0?Math.acos(-l/this.scaleY):-Math.acos(l/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 r=this.matrix;return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,this},translate:function(r,e){var n=this.matrix;return n[4]=n[0]*r+n[2]*e+n[4],n[5]=n[1]*r+n[3]*e+n[5],this},scale:function(r,e){var n=this.matrix;return n[0]*=r,n[1]*=r,n[2]*=e,n[3]*=e,this},rotate:function(r){var e=Math.sin(r),n=Math.cos(r),l=this.matrix,i=l[0],h=l[1],u=l[2],c=l[3];return l[0]=i*n+u*e,l[1]=h*n+c*e,l[2]=i*-e+u*n,l[3]=h*-e+c*n,this},multiply:function(r,e){var n=this.matrix,l=r.matrix,i=n[0],h=n[1],u=n[2],c=n[3],v=n[4],m=n[5],T=l[0],C=l[1],S=l[2],P=l[3],A=l[4],L=l[5],F=e===void 0?n:e.matrix;return F[0]=T*i+C*u,F[1]=T*h+C*c,F[2]=S*i+P*u,F[3]=S*h+P*c,F[4]=A*i+L*u+v,F[5]=A*h+L*c+m,F},multiplyWithOffset:function(r,e,n){var l=this.matrix,i=r.matrix,h=l[0],u=l[1],c=l[2],v=l[3],m=l[4],T=l[5],C=e*h+n*c+m,S=e*u+n*v+T,P=i[0],A=i[1],L=i[2],F=i[3],I=i[4],D=i[5];return l[0]=P*h+A*c,l[1]=P*u+A*v,l[2]=L*h+F*c,l[3]=L*u+F*v,l[4]=I*h+D*c+C,l[5]=I*u+D*v+S,this},transform:function(r,e,n,l,i,h){var u=this.matrix,c=u[0],v=u[1],m=u[2],T=u[3],C=u[4],S=u[5];return u[0]=r*c+e*m,u[1]=r*v+e*T,u[2]=n*c+l*m,u[3]=n*v+l*T,u[4]=i*c+h*m+C,u[5]=i*v+h*T+S,this},transformPoint:function(r,e,n){n===void 0&&(n={x:0,y:0});var l=this.matrix,i=l[0],h=l[1],u=l[2],c=l[3],v=l[4],m=l[5];return n.x=r*i+e*u+v,n.y=r*h+e*c+m,n},invert:function(){var r=this.matrix,e=r[0],n=r[1],l=r[2],i=r[3],h=r[4],u=r[5],c=e*i-n*l;return r[0]=i/c,r[1]=-n/c,r[2]=-l/c,r[3]=e/c,r[4]=(l*u-i*h)/c,r[5]=-(e*u-n*h)/c,this},copyFrom:function(r){var e=this.matrix;return e[0]=r.a,e[1]=r.b,e[2]=r.c,e[3]=r.d,e[4]=r.e,e[5]=r.f,this},copyFromArray:function(r){var e=this.matrix;return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[4]=r[4],e[5]=r[5],this},copyToContext:function(r){var e=this.matrix;return r.transform(e[0],e[1],e[2],e[3],e[4],e[5]),r},setToContext:function(r){return r.setTransform(this),r},copyToArray:function(r){var e=this.matrix;return r===void 0?r=[e[0],e[1],e[2],e[3],e[4],e[5]]:(r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4],r[5]=e[5]),r},setTransform:function(r,e,n,l,i,h){var u=this.matrix;return u[0]=r,u[1]=e,u[2]=n,u[3]=l,u[4]=i,u[5]=h,this},decomposeMatrix:function(){var r=this.decomposedMatrix,e=this.matrix,n=e[0],l=e[1],i=e[2],h=e[3],u=n*h-l*i;if(r.translateX=e[4],r.translateY=e[5],n||l){var c=Math.sqrt(n*n+l*l);r.rotation=l>0?Math.acos(n/c):-Math.acos(n/c),r.scaleX=c,r.scaleY=u/c}else if(i||h){var v=Math.sqrt(i*i+h*h);r.rotation=Math.PI*.5-(h>0?Math.acos(-i/v):-Math.acos(i/v)),r.scaleX=u/v,r.scaleY=v}else r.rotation=0,r.scaleX=0,r.scaleY=0;return r},applyITRS:function(r,e,n,l,i){var h=this.matrix,u=Math.sin(n),c=Math.cos(n);return h[4]=r,h[5]=e,h[0]=c*l,h[1]=u*l,h[2]=-u*i,h[3]=c*i,this},applyInverse:function(r,e,n){n===void 0&&(n=new o);var l=this.matrix,i=l[0],h=l[1],u=l[2],c=l[3],v=l[4],m=l[5],T=1/(i*c+u*-h);return n.x=c*T*r+-u*T*e+(m*u-v*c)*T,n.y=i*T*e+-h*T*r+(-m*i+v*h)*T,n},setQuad:function(r,e,n,l,i,h){i===void 0&&(i=!1),h===void 0&&(h=this.quad);var u=this.matrix,c=u[0],v=u[1],m=u[2],T=u[3],C=u[4],S=u[5];return i?(h[0]=Math.round(r*c+e*m+C),h[1]=Math.round(r*v+e*T+S),h[2]=Math.round(r*c+l*m+C),h[3]=Math.round(r*v+l*T+S),h[4]=Math.round(n*c+l*m+C),h[5]=Math.round(n*v+l*T+S),h[6]=Math.round(n*c+e*m+C),h[7]=Math.round(n*v+e*T+S)):(h[0]=r*c+e*m+C,h[1]=r*v+e*T+S,h[2]=r*c+l*m+C,h[3]=r*v+l*T+S,h[4]=n*c+l*m+C,h[5]=n*v+l*T+S,h[6]=n*c+e*m+C,h[7]=n*v+e*T+S),h},getX:function(r,e){return r*this.a+e*this.c+this.e},getY:function(r,e){return r*this.b+e*this.d+this.f},getXRound:function(r,e,n){var l=this.getX(r,e);return n&&(l=Math.round(l)),l},getYRound:function(r,e,n){var l=this.getY(r,e);return n&&(l=Math.round(l)),l},getCSSMatrix:function(){var r=this.matrix;return"matrix("+r[0]+","+r[1]+","+r[2]+","+r[3]+","+r[4]+","+r[5]+")"},destroy:function(){this.matrix=null,this.quad=null,this.decomposedMatrix=null}});d.exports=s},59715:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=1,t={_visible:!0,visible:{get:function(){return this._visible},set:function(a){a?(this._visible=!0,this.renderFlags|=x):(this._visible=!1,this.renderFlags&=~x)}},setVisible:function(a){return this.visible=a,this}};d.exports=t},31401:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.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:(d,x,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),p=t(10312),o=t(83419),s=t(31401),r=t(51708),e=t(95643),n=t(87841),l=t(29959),i=t(36899),h=t(26099),u=new o({Extends:e,Mixins:[s.AlphaSingle,s.BlendMode,s.ComputedSize,s.Depth,s.Mask,s.PostPipeline,s.Transform,s.Visible,l],initialize:function(v,m,T,C){e.call(this,v,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new s.TransformMatrix,this.tempTransformMatrix=new s.TransformMatrix,this._sortKey="",this._sysEvents=v.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.initPostPipeline(),this.setPosition(m,T),this.setBlendMode(p.SKIP_CHECK),C&&this.add(C)},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(c){return c===void 0&&(c=!0),this.exclusive=c,this},getBounds:function(c){if(c===void 0&&(c=new n),c.setTo(this.x,this.y,0,0),this.parentContainer){var v=this.parentContainer.getBoundsTransformMatrix(),m=v.transformPoint(this.x,this.y);c.setTo(m.x,m.y,0,0)}if(this.list.length>0){var T=this.list,C=new n,S=!1;c.setEmpty();for(var P=0;P-1},setAll:function(c,v,m,T){return a.SetAll(this.list,c,v,m,T),this},each:function(c,v){var m=[null],T,C=this.list.slice(),S=C.length;for(T=2;T0?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(c){a.Remove(this.list,c),this.exclusive&&(c.parentContainer=null,c.removedFromScene())}});d.exports=u},53584:d=>{/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p,o){p.addToRenderList(a);var s=a.list;if(s.length!==0){var r=a.localTransform;o?(r.loadIdentity(),r.multiply(o),r.translate(a.x,a.y),r.rotate(a.rotation),r.scale(a.scaleX,a.scaleY)):r.applyITRS(a.x,a.y,a.rotation,a.scaleX,a.scaleY);var e=a.blendMode!==-1;e||t.setBlendMode(0);var n=a._alpha,l=a.scrollFactorX,i=a.scrollFactorY;a.mask&&a.mask.preRenderCanvas(t,null,p);for(var h=0;h{/** + * @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),p=t(31559),o=t(44603),s=t(23568),r=t(95540);o.register("container",function(e,n){e===void 0&&(e={});var l=s(e,"x",0),i=s(e,"y",0),h=r(e,"children",null),u=new p(this.scene,l,i,h);return n!==void 0&&(e.add=n),a(this.scene,u,e),u})},24961:(d,x,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),p=t(39429);p.register("container",function(o,s,r){return this.displayList.add(new a(this.scene,o,s,r))})},29959:(d,x,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),p=a,o=a;p=t(72249),o=t(53584),d.exports={renderWebGL:p,renderCanvas:o}},72249:d=>{/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p,o){p.addToRenderList(a);var s=a.list,r=s.length;if(r!==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 n=a.blendMode!==-1;n||t.setBlendMode(0);for(var l=a.alpha,i=a.scrollFactorX,h=a.scrollFactorY,u=0;u{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports=["normal","multiply","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]},3069:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(31401),o=t(441),s=t(95643),r=t(41212),e=t(35846),n=t(44594),l=t(61369),i=new a({Extends:s,Mixins:[p.AlphaSingle,p.BlendMode,p.Depth,p.Origin,p.ScrollFactor,p.Transform,p.Visible,o],initialize:function(u,c,v,m,T,C){s.call(this,u,"DOMElement"),this.parent=u.sys.game.domContainer,this.cache=u.sys.cache.html,this.node,this.transformOnly=!1,this.skewX=0,this.skewY=0,this.rotate3d=new l,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(c,v),typeof m=="string"?m[0]==="#"?this.setElement(m.substr(1),T,C):this.createElement(m,T,C):m&&this.setElement(m,T,C),u.sys.events.on(n.SLEEP,this.handleSceneEvent,this),u.sys.events.on(n.WAKE,this.handleSceneEvent,this),u.sys.events.on(n.PRE_RENDER,this.preRender,this)},handleSceneEvent:function(h){var u=this.node,c=u.style;u&&(c.display=h.settings.visible?"block":"none")},setSkew:function(h,u){return h===void 0&&(h=0),u===void 0&&(u=h),this.skewX=h,this.skewY=u,this},setPerspective:function(h){return this.parent.style.perspective=h+"px",this},perspective:{get:function(){return parseFloat(this.parent.style.perspective)},set:function(h){this.parent.style.perspective=h+"px"}},addListener:function(h){if(this.node){h=h.split(" ");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(47407),p=t(95643),o=t(61340),s=new o,r=new o,e=new o,n=function(l,i,h,u){if(i.node){var c=i.node.style,v=i.scene.sys.settings;if(!c||!v.visible||p.RENDER_MASK!==i.renderFlags||i.cameraFilter!==0&&i.cameraFilter&h.id||i.parentContainer&&!i.parentContainer.willRender()){c.display="none";return}var m=i.parentContainer,T=h.alpha*i.alpha;m&&(T*=m.alpha);var C=s,S=r,P=e,A=0,L=0,F="0%",I="0%";u?(A=i.width*i.scaleX*i.originX,L=i.height*i.scaleY*i.originY,S.applyITRS(i.x-A,i.y-L,i.rotation,i.scaleX,i.scaleY),C.copyFrom(h.matrix),C.multiplyWithOffset(u,-h.scrollX*i.scrollFactorX,-h.scrollY*i.scrollFactorY),S.e=i.x-A,S.f=i.y-L,C.multiply(S,P)):(A=i.width*i.originX,L=i.height*i.originY,S.applyITRS(i.x-A,i.y-L,i.rotation,i.scaleX,i.scaleY),C.copyFrom(h.matrix),F=100*i.originX+"%",I=100*i.originY+"%",S.e-=h.scrollX*i.scrollFactorX,S.f-=h.scrollY*i.scrollFactorY,C.multiply(S,P)),i.transformOnly||(c.display="block",c.opacity=T,c.zIndex=i._depth,c.pointerEvents=i.pointerEvents,c.mixBlendMode=a[i._blendMode]),c.transform=P.getCSSMatrix()+" skew("+i.skewX+"rad, "+i.skewY+"rad) rotate3d("+i.rotate3d.x+","+i.rotate3d.y+","+i.rotate3d.z+","+i.rotate3d.w+i.rotate3dAngle+")",c.transformOrigin=F+" "+I}};d.exports=n},2611:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(3069),p=t(39429);p.register("dom",function(o,s,r,e,n){var l=new a(this.scene,o,s,r,e,n);return this.displayList.add(l),l})},441:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),p=a,o=a;p=t(49381),o=t(49381),d.exports={renderWebGL:p,renderCanvas:o}},62980:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="addedtoscene"},41337:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="destroy"},44947:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="removedfromscene"},49358:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="complete"},35163:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="created"},97249:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="error"},19483:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="locked"},56059:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="loop"},26772:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="metadata"},64437:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="playing"},83411:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="play"},75780:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="seeked"},67799:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="seeking"},63500:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="stalled"},55541:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="stop"},53208:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="textureready"},4992:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="unlocked"},12:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="unsupported"},51708:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.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:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(31401),o=t(95643),s=t(64993),r=new a({Extends:o,Mixins:[p.Alpha,p.BlendMode,p.Depth,p.Flip,p.Origin,p.ScrollFactor,p.Size,p.Texture,p.Tint,p.Transform,p.Visible,s],initialize:function(n){o.call(this,n,"Extern")},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(){},render:function(){}});d.exports=r},70217:()=>{},56315:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(42421),p=t(39429);p.register("extern",function(){var o=new a(this.scene);return this.displayList.add(o),o})},64993:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),p=a,o=a;p=t(80287),o=t(70217),d.exports={renderWebGL:p,renderCanvas:o}},80287:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(91296),p=function(o,s,r,e){o.pipelines.clear();var n=a(s,r,e).calc;s.render.call(s,o,r,n),o.pipelines.rebind()};d.exports=p},85592:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.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:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(71911),p=t(83419),o=t(85592),s=t(31401),r=t(8497),e=t(95643),n=t(95540),l=t(35154),i=t(36383),h=t(84503),u=new p({Extends:e,Mixins:[s.AlphaSingle,s.BlendMode,s.Depth,s.Mask,s.Pipeline,s.PostPipeline,s.Transform,s.Visible,s.ScrollFactor,h],initialize:function(v,m){var T=l(m,"x",0),C=l(m,"y",0);e.call(this,v,"Graphics"),this.setPosition(T,C),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(m)},setDefaultStyles:function(c){return l(c,"lineStyle",null)&&(this.defaultStrokeWidth=l(c,"lineStyle.width",1),this.defaultStrokeColor=l(c,"lineStyle.color",16777215),this.defaultStrokeAlpha=l(c,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),l(c,"fillStyle",null)&&(this.defaultFillColor=l(c,"fillStyle.color",16777215),this.defaultFillAlpha=l(c,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(c,v,m){return m===void 0&&(m=1),this.commandBuffer.push(o.LINE_STYLE,c,v,m),this._lineWidth=c,this},fillStyle:function(c,v){return v===void 0&&(v=1),this.commandBuffer.push(o.FILL_STYLE,c,v),this},fillGradientStyle:function(c,v,m,T,C,S,P,A){return C===void 0&&(C=1),S===void 0&&(S=C),P===void 0&&(P=C),A===void 0&&(A=C),this.commandBuffer.push(o.GRADIENT_FILL_STYLE,C,S,P,A,c,v,m,T),this},lineGradientStyle:function(c,v,m,T,C,S){return S===void 0&&(S=1),this.commandBuffer.push(o.GRADIENT_LINE_STYLE,c,S,v,m,T,C),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(c){return this.fillCircle(c.x,c.y,c.radius)},strokeCircleShape:function(c){return this.strokeCircle(c.x,c.y,c.radius)},fillCircle:function(c,v,m){return this.beginPath(),this.arc(c,v,m,0,i.PI2),this.fillPath(),this},strokeCircle:function(c,v,m){return this.beginPath(),this.arc(c,v,m,0,i.PI2),this.strokePath(),this},fillRectShape:function(c){return this.fillRect(c.x,c.y,c.width,c.height)},strokeRectShape:function(c){return this.strokeRect(c.x,c.y,c.width,c.height)},fillRect:function(c,v,m,T){return this.commandBuffer.push(o.FILL_RECT,c,v,m,T),this},strokeRect:function(c,v,m,T){var C=this._lineWidth/2,S=c-C,P=c+C;return this.beginPath(),this.moveTo(c,v),this.lineTo(c,v+T),this.strokePath(),this.beginPath(),this.moveTo(c+m,v),this.lineTo(c+m,v+T),this.strokePath(),this.beginPath(),this.moveTo(S,v),this.lineTo(P+m,v),this.strokePath(),this.beginPath(),this.moveTo(S,v+T),this.lineTo(P+m,v+T),this.strokePath(),this},fillRoundedRect:function(c,v,m,T,C){C===void 0&&(C=20);var S=C,P=C,A=C,L=C;typeof C!="number"&&(S=n(C,"tl",20),P=n(C,"tr",20),A=n(C,"bl",20),L=n(C,"br",20));var F=S>=0,I=P>=0,D=A>=0,B=L>=0;return S=Math.abs(S),P=Math.abs(P),A=Math.abs(A),L=Math.abs(L),this.beginPath(),this.moveTo(c+S,v),this.lineTo(c+m-P,v),I?this.arc(c+m-P,v+P,P,-i.TAU,0):this.arc(c+m,v,P,Math.PI,i.TAU,!0),this.lineTo(c+m,v+T-L),B?this.arc(c+m-L,v+T-L,L,0,i.TAU):this.arc(c+m,v+T,L,-i.TAU,Math.PI,!0),this.lineTo(c+A,v+T),D?this.arc(c+A,v+T-A,A,i.TAU,Math.PI):this.arc(c,v+T,A,0,-i.TAU,!0),this.lineTo(c,v+S),F?this.arc(c+S,v+S,S,-Math.PI,-i.TAU):this.arc(c,v,S,i.TAU,0,!0),this.fillPath(),this},strokeRoundedRect:function(c,v,m,T,C){C===void 0&&(C=20);var S=C,P=C,A=C,L=C,F=Math.min(m,T)/2;typeof C!="number"&&(S=n(C,"tl",20),P=n(C,"tr",20),A=n(C,"bl",20),L=n(C,"br",20));var I=S>=0,D=P>=0,B=A>=0,G=L>=0;return S=Math.min(Math.abs(S),F),P=Math.min(Math.abs(P),F),A=Math.min(Math.abs(A),F),L=Math.min(Math.abs(L),F),this.beginPath(),this.moveTo(c+S,v),this.lineTo(c+m-P,v),this.moveTo(c+m-P,v),D?this.arc(c+m-P,v+P,P,-i.TAU,0):this.arc(c+m,v,P,Math.PI,i.TAU,!0),this.lineTo(c+m,v+T-L),this.moveTo(c+m,v+T-L),G?this.arc(c+m-L,v+T-L,L,0,i.TAU):this.arc(c+m,v+T,L,-i.TAU,Math.PI,!0),this.lineTo(c+A,v+T),this.moveTo(c+A,v+T),B?this.arc(c+A,v+T-A,A,i.TAU,Math.PI):this.arc(c,v+T,A,0,-i.TAU,!0),this.lineTo(c,v+S),this.moveTo(c,v+S),I?this.arc(c+S,v+S,S,-Math.PI,-i.TAU):this.arc(c,v,S,i.TAU,0,!0),this.strokePath(),this},fillPointShape:function(c,v){return this.fillPoint(c.x,c.y,v)},fillPoint:function(c,v,m){return!m||m<1?m=1:(c-=m/2,v-=m/2),this.commandBuffer.push(o.FILL_RECT,c,v,m,m),this},fillTriangleShape:function(c){return this.fillTriangle(c.x1,c.y1,c.x2,c.y2,c.x3,c.y3)},strokeTriangleShape:function(c){return this.strokeTriangle(c.x1,c.y1,c.x2,c.y2,c.x3,c.y3)},fillTriangle:function(c,v,m,T,C,S){return this.commandBuffer.push(o.FILL_TRIANGLE,c,v,m,T,C,S),this},strokeTriangle:function(c,v,m,T,C,S){return this.commandBuffer.push(o.STROKE_TRIANGLE,c,v,m,T,C,S),this},strokeLineShape:function(c){return this.lineBetween(c.x1,c.y1,c.x2,c.y2)},lineBetween:function(c,v,m,T){return this.beginPath(),this.moveTo(c,v),this.lineTo(m,T),this.strokePath(),this},lineTo:function(c,v){return this.commandBuffer.push(o.LINE_TO,c,v),this},moveTo:function(c,v){return this.commandBuffer.push(o.MOVE_TO,c,v),this},strokePoints:function(c,v,m,T){v===void 0&&(v=!1),m===void 0&&(m=!1),T===void 0&&(T=c.length),this.beginPath(),this.moveTo(c[0].x,c[0].y);for(var C=1;C-1&&this.fillStyle(this.defaultFillColor,this.defaultFillAlpha),this.defaultStrokeColor>-1&&this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha),this},generateTexture:function(c,v,m){var T=this.scene.sys,C=T.game.renderer;v===void 0&&(v=T.scale.width),m===void 0&&(m=T.scale.height),u.TargetCamera.setScene(this.scene),u.TargetCamera.setViewport(0,0,v,m),u.TargetCamera.scrollX=this.x,u.TargetCamera.scrollY=this.y;var S,P,A={willReadFrequently:!0};if(typeof c=="string")if(T.textures.exists(c)){S=T.textures.get(c);var L=S.getSourceImage();L instanceof HTMLCanvasElement&&(P=L.getContext("2d",A))}else S=T.textures.createCanvas(c,v,m),P=S.getSourceImage().getContext("2d",A);else c instanceof HTMLCanvasElement&&(P=c.getContext("2d",A));return P&&(this.renderCanvas(C,this,u.TargetCamera,null,P,!1),S&&S.refresh()),this},preDestroy:function(){this.commandBuffer=[]}});u.TargetCamera=new a,d.exports=u},32768:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(85592),p=t(20926),o=function(s,r,e,n,l,i){var h=r.commandBuffer,u=h.length,c=l||s.currentContext;if(!(u===0||!p(s,c,r,e,n))){e.addToRenderList(r);var v=1,m=1,T=0,C=0,S=1,P=0,A=0,L=0;c.beginPath();for(var F=0;F>>16,A=(T&65280)>>>8,L=T&255,c.strokeStyle="rgba("+P+","+A+","+L+","+v+")",c.lineWidth=S,F+=3;break;case a.FILL_STYLE:C=h[F+1],m=h[F+2],P=(C&16711680)>>>16,A=(C&65280)>>>8,L=C&255,c.fillStyle="rgba("+P+","+A+","+L+","+m+")",F+=2;break;case a.BEGIN_PATH:c.beginPath();break;case a.CLOSE_PATH:c.closePath();break;case a.FILL_PATH:i||c.fill();break;case a.STROKE_PATH:i||c.stroke();break;case a.FILL_RECT:i?c.rect(h[F+1],h[F+2],h[F+3],h[F+4]):c.fillRect(h[F+1],h[F+2],h[F+3],h[F+4]),F+=4;break;case a.FILL_TRIANGLE:c.beginPath(),c.moveTo(h[F+1],h[F+2]),c.lineTo(h[F+3],h[F+4]),c.lineTo(h[F+5],h[F+6]),c.closePath(),i||c.fill(),F+=6;break;case a.STROKE_TRIANGLE:c.beginPath(),c.moveTo(h[F+1],h[F+2]),c.lineTo(h[F+3],h[F+4]),c.lineTo(h[F+5],h[F+6]),c.closePath(),i||c.stroke(),F+=6;break;case a.LINE_TO:c.lineTo(h[F+1],h[F+2]),F+=2;break;case a.MOVE_TO:c.moveTo(h[F+1],h[F+2]),F+=2;break;case a.LINE_FX_TO:c.lineTo(h[F+1],h[F+2]),F+=5;break;case a.MOVE_FX_TO:c.moveTo(h[F+1],h[F+2]),F+=5;break;case a.SAVE:c.save();break;case a.RESTORE:c.restore();break;case a.TRANSLATE:c.translate(h[F+1],h[F+2]),F+=2;break;case a.SCALE:c.scale(h[F+1],h[F+2]),F+=2;break;case a.ROTATE:c.rotate(h[F+1]),F+=1;break;case a.GRADIENT_FILL_STYLE:F+=5;break;case a.GRADIENT_LINE_STYLE:F+=6;break}}c.restore()}};d.exports=o},87079:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(44603),p=t(43831);a.register("graphics",function(o,s){o===void 0&&(o={}),s!==void 0&&(o.add=s);var r=new p(this.scene,o);return o.add&&this.scene.sys.displayList.add(r),r})},1201:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(43831),p=t(39429);p.register("graphics",function(o){return this.displayList.add(new a(this.scene,o))})},84503:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),p=a,o=a;p=t(77545),o=t(32768),o=t(32768),d.exports={renderWebGL:p,renderCanvas:o}},77545:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(85592),p=t(91296),o=t(61340),s=t(70554),r=function(h,u,c){this.x=h,this.y=u,this.width=c},e=function(h,u,c){this.points=[],this.pointsLength=1,this.points[0]=new r(h,u,c)},n=[],l=new o,i=function(h,u,c,v){if(u.commandBuffer.length!==0){c.addToRenderList(u);var m=h.pipelines.set(u.pipeline,u);h.pipelines.preBatch(u);for(var T=p(u,c,v).calc,C=l.loadIdentity(),S=u.commandBuffer,P=c.alpha*u.alpha,A=1,L=m.fillTint,F=m.strokeTint,I=0,D=0,B=0,G=.01,z=Math.PI*2,W,Y=[],K=0,Z=!0,V=null,H=s.getTintAppendFloatAlpha,N=0;N0&&(dt=-z+dt%z):dt>z?dt=z:dt<0&&(dt=z+dt%z),V===null&&(V=new e(ct+Math.cos(Ct)*St,Et+Math.sin(Ct)*St,A),Y.push(V),at+=G);at<1+vt;)B=dt*at+Ct,I=ct+Math.cos(B)*St,D=Et+Math.sin(B)*St,V.points.push(new r(I,D,A)),at+=G;B=dt+Ct,I=ct+Math.cos(B)*St,D=Et+Math.sin(B)*St,V.points.push(new r(I,D,A));break}case a.FILL_RECT:{m.batchFillRect(S[++N],S[++N],S[++N],S[++N],C,T);break}case a.FILL_TRIANGLE:{m.batchFillTriangle(S[++N],S[++N],S[++N],S[++N],S[++N],S[++N],C,T);break}case a.STROKE_TRIANGLE:{m.batchStrokeTriangle(S[++N],S[++N],S[++N],S[++N],S[++N],S[++N],A,C,T);break}case a.LINE_TO:{V!==null?V.points.push(new r(S[++N],S[++N],A)):(V=new e(S[++N],S[++N],A),Y.push(V));break}case a.MOVE_TO:{V=new e(S[++N],S[++N],A),Y.push(V);break}case a.SAVE:{n.push(C.copyToArray());break}case a.RESTORE:{C.copyFromArray(n.pop());break}case a.TRANSLATE:{ct=S[++N],Et=S[++N],C.translate(ct,Et);break}case a.SCALE:{ct=S[++N],Et=S[++N],C.scale(ct,Et);break}case a.ROTATE:{C.rotate(S[++N]);break}}h.pipelines.postBatch(u)}};d.exports=i},26479:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(61061),p=t(83419),o=t(51708),s=t(50792),r=t(46710),e=t(95540),n=t(35154),l=t(97022),i=t(41212),h=t(88492),u=t(35072),c=t(68287),v=new p({Extends:s,initialize:function(T,C,S){s.call(this),S?C&&!Array.isArray(C)&&(C=[C]):Array.isArray(C)?i(C[0])&&(S=C,C=null):i(C)&&(S=C,C=null),this.scene=T,this.children=new u,this.isParent=!0,this.type="Group",this.classType=e(S,"classType",c),this.name=e(S,"name",""),this.active=e(S,"active",!0),this.maxSize=e(S,"maxSize",-1),this.defaultKey=e(S,"defaultKey",null),this.defaultFrame=e(S,"defaultFrame",null),this.runChildUpdate=e(S,"runChildUpdate",!1),this.createCallback=e(S,"createCallback",null),this.removeCallback=e(S,"removeCallback",null),this.createMultipleCallback=e(S,"createMultipleCallback",null),this.internalCreateCallback=e(S,"internalCreateCallback",null),this.internalRemoveCallback=e(S,"internalRemoveCallback",null),C&&this.addMultiple(C),S&&this.createMultiple(S),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(m,T,C,S,P,A){if(m===void 0&&(m=0),T===void 0&&(T=0),C===void 0&&(C=this.defaultKey),S===void 0&&(S=this.defaultFrame),P===void 0&&(P=!0),A===void 0&&(A=!0),this.isFull())return null;var L=new this.classType(this.scene,m,T,C,S);return L.addToDisplayList(this.scene.sys.displayList),L.addToUpdateList(),L.visible=P,L.setActive(A),this.add(L),L},createMultiple:function(m){if(this.isFull())return[];Array.isArray(m)||(m=[m]);var T=[];if(m[0].key)for(var C=0;C=0;B--)if(D=z[B],D.active===C){if(G++,G===T)break}else D=null;return D?(typeof P=="number"&&(D.x=P),typeof A=="number"&&(D.y=A),D):S?this.create(P,A,L,F,I):null},get:function(m,T,C,S,P){return this.getFirst(!1,!0,m,T,C,S,P)},getFirstAlive:function(m,T,C,S,P,A){return this.getFirst(!0,m,T,C,S,P,A)},getFirstDead:function(m,T,C,S,P,A){return this.getFirst(!1,m,T,C,S,P,A)},playAnimation:function(m,T){return a.PlayAnimation(this.children.entries,m,T),this},isFull:function(){return this.maxSize===-1?!1:this.children.size>=this.maxSize},countActive:function(m){m===void 0&&(m=!0);for(var T=0,C=0;C{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(44603),p=t(26479);a.register("group",function(o){return new p(this.scene,null,o)})},3385:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(26479),p=t(39429);p.register("group",function(o,s){return this.updateList.add(new a(this.scene,o,s))})},88571:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(31401),o=t(95643),s=t(59819),r=new a({Extends:o,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,s],initialize:function(n,l,i,h,u){o.call(this,n,"Image"),this._crop=this.resetCropObject(),this.setTexture(h,u),this.setPosition(l,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline(),this.initPostPipeline(!0)}});d.exports=r},40652:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p,o){p.addToRenderList(a),t.batchSprite(a,a.frame,p,o)};d.exports=x},82459:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(25305),p=t(44603),o=t(23568),s=t(88571);p.register("image",function(r,e){r===void 0&&(r={});var n=o(r,"key",null),l=o(r,"frame",null),i=new s(this.scene,0,0,n,l);return e!==void 0&&(r.add=e),a(this.scene,i,r),i})},2117:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(88571),p=t(39429);p.register("image",function(o,s,r,e){return this.displayList.add(new a(this.scene,o,s,r,e))})},59819:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),p=a,o=a;p=t(99517),o=t(40652),d.exports={renderWebGL:p,renderCanvas:o}},99517:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p,o){p.addToRenderList(a),this.pipeline.batchSprite(a,p,o)};d.exports=x},77856:(d,x,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),d.exports=a},93595:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(10312),p=t(83419),o=t(31401),s=t(53774),r=t(45893),e=t(50792),n=t(51708),l=t(73162),i=t(33963),h=t(44594),u=t(19186),c=new p({Extends:l,Mixins:[o.AlphaSingle,o.BlendMode,o.Depth,o.Mask,o.PostPipeline,o.Visible,e,i],initialize:function(m,T){l.call(this,m),e.call(this),this.scene=m,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=m.sys,this.events=m.sys.events,this.sortChildrenFlag=!1,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.initPostPipeline(),this.clearAlpha(),this.setBlendMode(a.SKIP_CHECK),T&&this.add(T),m.sys.queueDepthSort()},setActive:function(v){return this.active=v,this},setName:function(v){return this.name=v,this},setState:function(v){return this.state=v,this},setDataEnabled:function(){return this.data||(this.data=new r(this)),this},setData:function(v,m){return this.data||(this.data=new r(this)),this.data.set(v,m),this},incData:function(v,m){return this.data||(this.data=new r(this)),this.data.inc(v,m),this},toggleData:function(v){return this.data||(this.data=new r(this)),this.data.toggle(v),this},getData:function(v){return this.data||(this.data=new r(this)),this.data.get(v)},setInteractive:function(){return this},disableInteractive:function(){return this},removeInteractive:function(){return this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return s(this)},willRender:function(v){return!(this.renderFlags!==15||this.list.length===0||this.cameraFilter!==0&&this.cameraFilter&v.id)},getIndexList:function(){for(var v=this,m=this.parentContainer,T=[];m&&(T.unshift(m.getIndex(v)),v=m,m.parentContainer);)m=m.parentContainer;return T.unshift(this.displayList.getIndex(v)),T},addChildCallback:function(v){var m=v.displayList;m&&m!==this&&v.removeFromDisplayList(),v.displayList||(this.queueDepthSort(),v.displayList=this,v.emit(n.ADDED_TO_SCENE,v,this.scene),this.events.emit(h.ADDED_TO_SCENE,v,this.scene))},removeChildCallback:function(v){this.queueDepthSort(),v.displayList=null,v.emit(n.REMOVED_FROM_SCENE,v,this.scene),this.events.emit(h.REMOVED_FROM_SCENE,v,this.scene)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(u(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(v,m){return v._depth-m._depth},getChildren:function(){return this.list},addToDisplayList:function(v){return v===void 0&&(v=this.scene.sys.displayList),this.displayList&&this.displayList!==v&&this.removeFromDisplayList(),v.exists(this)||(this.displayList=v,v.add(this,!0),v.queueDepthSort(),this.emit(n.ADDED_TO_SCENE,this,this.scene),v.events.emit(h.ADDED_TO_SCENE,this,this.scene)),this},removeFromDisplayList:function(){var v=this.displayList||this.scene.sys.displayList;return v.exists(this)&&(v.remove(this,!0),v.queueDepthSort(),this.displayList=null,this.emit(n.REMOVED_FROM_SCENE,this,this.scene),v.events.emit(h.REMOVED_FROM_SCENE,this,this.scene)),this},destroy:function(v){if(!(!this.scene||this.ignoreDestroy)){this.emit(n.DESTROY,this);for(var m=this.list;m.length;)m[0].destroy(v);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}}});d.exports=c},2956:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){var o=a.list;if(o.length!==0){a.depthSort();var s=a.blendMode!==-1;s||t.setBlendMode(0);var r=a._alpha;a.mask&&a.mask.preRenderCanvas(t,null,p);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),p=t(93595),o=t(44603),s=t(23568);o.register("layer",function(r,e){r===void 0&&(r={});var n=s(r,"children",null),l=new p(this.scene,n);return e!==void 0&&(r.add=e),a(this.scene,l,r),l})},20005:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(93595),p=t(39429);p.register("layer",function(o){return this.displayList.add(new a(this.scene,o))})},33963:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),p=a,o=a;p=t(15869),o=t(2956),d.exports={renderWebGL:p,renderCanvas:o}},15869:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){var o=a.list,s=o.length;if(s!==0){a.depthSort(),t.pipelines.preBatch(a);var r=a.blendMode!==-1;r||t.setBlendMode(0);for(var e=a.alpha,n=0;n{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(96503),p=t(83419),o=t(31401),s=t(51767),r=t(70554),e=new p({Extends:a,Mixins:[o.Origin,o.ScrollFactor,o.Visible],initialize:function(l,i,h,u,c,v,m){a.call(this,l,i,h),this.color=new s(u,c,v),this.intensity=m,this.renderFlags=15,this.cameraFilter=0,this.setScrollFactor(1,1),this.setOrigin(),this.setDisplayOrigin(h)},displayWidth:{get:function(){return this.diameter},set:function(n){this.diameter=n}},displayHeight:{get:function(){return this.diameter},set:function(n){this.diameter=n}},width:{get:function(){return this.diameter},set:function(n){this.diameter=n}},height:{get:function(){return this.diameter},set:function(n){this.diameter=n}},willRender:function(n){return!(e.RENDER_MASK!==this.renderFlags||this.cameraFilter!==0&&this.cameraFilter&n.id)},setColor:function(n){var l=r.getFloatsFromUintRGB(n);return this.color.set(l[0],l[1],l[2]),this},setIntensity:function(n){return this.intensity=n,this},setRadius:function(n){return this.radius=n,this}});e.RENDER_MASK=15,d.exports=e},61356:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(81491),p=t(83419),o=t(20339),s=t(41432),r=t(80321),e=t(51767),n=t(19133),l=t(19186),i=t(70554),h=new p({initialize:function(){this.lights=[],this.ambientColor=new e(.1,.1,.1),this.active=!1,this.maxLights=-1,this.visibleLights=0},addPointLight:function(u,c,v,m,T,C){return this.systems.displayList.add(new r(this.scene,u,c,v,m,T,C))},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(u){for(var c=this.lights,v=u.worldView,m=[],T=0;Tthis.maxLights&&(l(m,this.sortByDistance),m=m.slice(0,this.maxLights)),this.visibleLights=m.length,m},sortByDistance:function(u,c){return u.distance>=c.distance},setAmbientColor:function(u){var c=i.getFloatsFromUintRGB(u);return this.ambientColor.set(c[0],c[1],c[2]),this},getMaxVisibleLights:function(){return this.maxLights},getLightCount:function(){return this.lights.length},addLight:function(u,c,v,m,T){u===void 0&&(u=0),c===void 0&&(c=0),v===void 0&&(v=128),m===void 0&&(m=16777215),T===void 0&&(T=1);var C=i.getFloatsFromUintRGB(m),S=new s(u,c,v,C[0],C[1],C[2],T);return this.lights.push(S),S},removeLight:function(u){var c=this.lights.indexOf(u);return c>=0&&n(this.lights,c),this},shutdown:function(){this.lights.length=0},destroy:function(){this.shutdown()}});d.exports=h},88992:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(61356),o=t(37277),s=t(44594),r=new a({Extends:p,initialize:function(n){this.scene=n,this.systems=n.sys,n.sys.settings.isBooted||n.sys.events.once(s.BOOT,this.boot,this),p.call(this)},boot:function(){var e=this.systems.events;e.on(s.SHUTDOWN,this.shutdown,this),e.on(s.DESTROY,this.destroy,this)},destroy:function(){this.shutdown(),this.scene=void 0,this.systems=void 0}});o.register("LightsPlugin",r,"lights"),d.exports=r},4703:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(31401),o=t(39506),s=t(83997),r=t(95643),e=t(34684),n=t(92515),l=t(91296),i=t(37867),h=t(29807),u=t(43396),c=t(19186),v=t(25836),m=t(39318),T=new a({Extends:r,Mixins:[p.AlphaSingle,p.BlendMode,p.Depth,p.Mask,p.Pipeline,p.PostPipeline,p.ScrollFactor,p.Size,p.Texture,p.Transform,p.Visible,h],initialize:function(S,P,A,L,F,I,D,B,G,z,W,Y){P===void 0&&(P=0),A===void 0&&(A=0),L===void 0&&(L="__WHITE"),r.call(this,S,"Mesh"),this.faces=[],this.vertices=[],this.tintFill=!1,this.debugCallback=null,this.debugGraphic=null,this.hideCCW=!0,this.modelPosition=new v,this.modelScale=new v(1,1,1),this.modelRotation=new v,this.dirtyCache=[0,0,0,0,0,0,0,0,0,0,0,0],this.transformMatrix=new i,this.viewPosition=new v,this.viewMatrix=new i,this.projectionMatrix=new i,this.totalRendered=0,this.totalFrame=0,this.ignoreDirtyCache=!1,this.fov,this.displayOriginX=0,this.displayOriginY=0;var K=S.sys.renderer;this.setPosition(P,A),this.setTexture(L,F),this.setSize(K.width,K.height),this.initPipeline(),this.initPostPipeline(),this.setPerspective(K.width,K.height),I&&this.addVertices(I,D,B,G,z,W,Y)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},panX:function(C){return this.viewPosition.addScale(v.LEFT,C),this.dirtyCache[10]=1,this},panY:function(C){return this.viewPosition.y+=v.DOWN.y*C,this.dirtyCache[10]=1,this},panZ:function(C){return this.viewPosition.z+=C,this.dirtyCache[10]=1,this},setPerspective:function(C,S,P,A,L){return P===void 0&&(P=45),A===void 0&&(A=.01),L===void 0&&(L=1e3),this.fov=P,this.projectionMatrix.perspective(o(P),C/S,A,L),this.dirtyCache[10]=1,this.dirtyCache[11]=0,this},setOrtho:function(C,S,P,A){return C===void 0&&(C=this.scene.sys.renderer.getAspectRatio()),S===void 0&&(S=1),P===void 0&&(P=-1e3),A===void 0&&(A=1e3),this.fov=0,this.projectionMatrix.ortho(-C,C,-S,S,P,A),this.dirtyCache[10]=1,this.dirtyCache[11]=1,this},clear:function(){return this.faces.forEach(function(C){C.destroy()}),this.faces=[],this.vertices=[],this},addVerticesFromObj:function(C,S,P,A,L,F,I,D,B){var G=this.scene.sys.cache.obj.get(C),z;return G&&(z=e(G,this,S,P,A,L,F,I,D,B)),(!z||z.verts.length===0)&&console.warn("Mesh.addVerticesFromObj data empty:",C),this},sortByDepth:function(C,S){return C.depth-S.depth},depthSort:function(){return c(this.faces,this.sortByDepth),this},addVertex:function(C,S,P,A,L,F,I){var D=new m(C,S,P,A,L,F,I);return this.vertices.push(D),D},addFace:function(C,S,P){var A=new s(C,S,P);return this.faces.push(A),this.dirtyCache[9]=-1,A},addVertices:function(C,S,P,A,L,F,I){var D=n(C,S,P,A,L,F,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(C){return this.faces[C]},hasFaceAt:function(C,S,P){P===void 0&&(P=this.scene.sys.cameras.main);for(var A=l(this,P).calc,L=this.faces,F=0;F{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(){};d.exports=x},20527:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(25305),p=t(44603),o=t(23568),s=t(35154),r=t(4703);p.register("mesh",function(e,n){e===void 0&&(e={});var l=o(e,"key",null),i=o(e,"frame",null),h=s(e,"vertices",[]),u=s(e,"uvs",[]),c=s(e,"indicies",[]),v=s(e,"containsZ",!1),m=s(e,"normals",[]),T=s(e,"colors",16777215),C=s(e,"alphas",1),S=new r(this.scene,0,0,l,i,h,u,c,v,m,T,C);return n!==void 0&&(e.add=n),a(this.scene,S,e),S})},9225:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(4703),p=t(39429);p.register("mesh",function(o,s,r,e,n,l,i,h,u,c,v){return this.displayList.add(new a(this.scene,o,s,r,e,n,l,i,h,u,c,v))})},29807:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),p=a,o=a;p=t(48833),o=t(36488),d.exports={renderWebGL:p,renderCanvas:o}},48833:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(91296),p=function(o,s,r,e){var n=s.faces,l=n.length;if(l!==0){r.addToRenderList(s);var i=o.pipelines.set(s.pipeline,s),h=a(s,r,e).calc;o.pipelines.preBatch(s);for(var u=i.setGameObject(s),c=i.vertexViewF32,v=i.vertexViewU32,m=i.vertexCount*i.currentShader.vertexComponentCount-1,T=s.tintFill,C=[],S=s.debugCallback,P=h.a,A=h.b,L=h.c,F=h.d,I=h.e,D=h.f,B=s.viewPosition.z,G=s.hideCCW,z=r.roundPixels,W=r.alpha*s.alpha,Y=0,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),p=t(31401),o=t(95643),s=t(78023),r=t(39318),e=new a({Extends:o,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,s],initialize:function(l,i,h,u,c,v,m,T,C,S,P){o.call(this,l,"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 A=l.textures.getFrame(u,c);this.is3Slice=!S&&!P,A.scale9&&(this.is3Slice=A.is3Slice);for(var L=this.is3Slice?18:54,F=0;F{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(25305),p=t(44603),o=t(23568),s=t(35154),r=t(28103);p.register("nineslice",function(e,n){e===void 0&&(e={});var l=o(e,"key",null),i=o(e,"frame",null),h=s(e,"width",256),u=s(e,"height",256),c=s(e,"leftWidth",10),v=s(e,"rightWidth",10),m=s(e,"topHeight",0),T=s(e,"bottomHeight",0),C=new r(this.scene,0,0,l,i,h,u,c,v,m,T);return n!==void 0&&(e.add=n),a(this.scene,C,e),C})},47521:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(28103),p=t(39429);p.register("nineslice",function(o,s,r,e,n,l,i,h,u,c){return this.displayList.add(new a(this.scene,o,s,r,e,n,l,i,h,u,c))})},78023:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),p=a,o=a;p=t(52230),d.exports={renderWebGL:p,renderCanvas:o}},52230:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(91296),p=t(70554),o=function(s,r,e,n){var l=r.vertices,i=l.length;if(i!==0){e.addToRenderList(r);var h=s.pipelines.set(r.pipeline,r),u=a(r,e,n,!1).calc;s.pipelines.preBatch(r);var c=h.setGameObject(r),v=h.vertexViewF32,m=h.vertexViewU32,T=h.vertexCount*h.currentShader.vertexComponentCount-1,C=e.roundPixels,S=r.tintFill,P=e.alpha*r.alpha,A=p.getTintAppendFloatAlpha(r.tint,P),L=h.vertexAvailable(),F=-1;L{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(44777),o=t(37589),s=t(6113),r=t(91389),e=t(90664),n=new a({Extends:p,initialize:function(i){p.call(this,i,null,!1),this.active=!1,this.easeName="Linear",this.r=[],this.g=[],this.b=[]},getMethod:function(){return this.propertyValue===null?0:9},setMethods:function(){var l=this.propertyValue,i=l,h=this.defaultEmit,u=this.defaultUpdate;if(this.method===9){this.start=l[0],this.ease=s("Linear"),this.interpolation=r("linear"),h=this.easedValueEmit,u=this.easeValueUpdate,i=l[0],this.active=!0;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(30976),p=t(45319),o=t(83419),s=t(99472),r=t(6113),e=t(95540),n=t(91389),l=t(77720),i=t(15994),h=new o({initialize:function(c,v,m){m===void 0&&(m=!1),this.propertyKey=c,this.propertyValue=v,this.defaultValue=v,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=m,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.active=!0,this.method=0,this._onEmit,this._onUpdate},loadConfig:function(u,c){u===void 0&&(u={}),c&&(this.propertyKey=c),this.propertyValue=e(u,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(u){var c;switch(this.method){case 1:case 3:case 8:c=u;break;case 2:this.propertyValue.indexOf(u)>=0&&(c=u);break;case 4:var v=(this.end-this.start)/this.steps;c=l(u,v),this.counter=c;break;case 5:case 6:case 7:c=p(u,this.start,this.end);break;case 9:c=this.start[0];break}return this.current=c,this},getMethod:function(){var u=this.propertyValue;if(u===null)return 0;var c=typeof u;if(c==="number")return 1;if(Array.isArray(u))return 2;if(c==="function")return 3;if(c==="object"){if(this.hasBoth(u,"start","end"))return this.has(u,"steps")?4:5;if(this.hasBoth(u,"min","max"))return 6;if(this.has(u,"random"))return 7;if(this.hasEither(u,"onEmit","onUpdate"))return 8;if(this.hasEither(u,"values","interpolation"))return 9}return 0},setMethods:function(){var u=this.propertyValue,c=u,v=this.defaultEmit,m=this.defaultUpdate;switch(this.method){case 1:v=this.staticValueEmit;break;case 2:v=this.randomStaticValueEmit,c=u[0];break;case 3:this._onEmit=u,v=this.proxyEmit;break;case 4:this.start=u.start,this.end=u.end,this.steps=u.steps,this.counter=this.start,this.yoyo=this.has(u,"yoyo")?u.yoyo:!1,this.direction=0,v=this.steppedEmit,c=this.start;break;case 5:this.start=u.start,this.end=u.end;var T=this.has(u,"ease")?u.ease:"Linear";this.ease=r(T,u.easeParams),v=this.has(u,"random")&&u.random?this.randomRangedValueEmit:this.easedValueEmit,m=this.easeValueUpdate,c=this.start;break;case 6:this.start=u.min,this.end=u.max,v=this.has(u,"int")&&u.int?this.randomRangedIntEmit:this.randomRangedValueEmit,c=this.start;break;case 7:var C=u.random;Array.isArray(C)&&(this.start=C[0],this.end=C[1]),v=this.randomRangedIntEmit,c=this.start;break;case 8:this._onEmit=this.has(u,"onEmit")?u.onEmit:this.defaultEmit,this._onUpdate=this.has(u,"onUpdate")?u.onUpdate:this.defaultUpdate,v=this.proxyEmit,m=this.proxyUpdate;break;case 9:this.start=u.values;var S=this.has(u,"ease")?u.ease:"Linear";this.ease=r(S,u.easeParams),this.interpolation=n(u.interpolation),v=this.easedValueEmit,m=this.easeValueUpdate,c=this.start[0];break}return this.onEmit=v,this.onUpdate=m,this.current=c,this},has:function(u,c){return u.hasOwnProperty(c)},hasBoth:function(u,c,v){return u.hasOwnProperty(c)&&u.hasOwnProperty(v)},hasEither:function(u,c,v){return u.hasOwnProperty(c)||u.hasOwnProperty(v)},defaultEmit:function(u,c,v){return v},defaultUpdate:function(u,c,v,m){return m},proxyEmit:function(u,c,v){var m=this._onEmit(u,c,v);return this.current=m,m},proxyUpdate:function(u,c,v,m){var T=this._onUpdate(u,c,v,m);return this.current=T,T},staticValueEmit:function(){return this.current},staticValueUpdate:function(){return this.current},randomStaticValueEmit:function(){var u=Math.floor(Math.random()*this.propertyValue.length);return this.current=this.propertyValue[u],this.current},randomRangedValueEmit:function(u,c){var v=s(this.start,this.end);return u&&u.data[c]&&(u.data[c].min=v,u.data[c].max=this.end),this.current=v,v},randomRangedIntEmit:function(u,c){var v=a(this.start,this.end);return u&&u.data[c]&&(u.data[c].min=v,u.data[c].max=this.end),this.current=v,v},steppedEmit:function(){var u=this.counter,c=u,v=(this.end-this.start)/this.steps;if(this.yoyo){var m;this.direction===0?(c+=v,c>=this.end&&(m=c-this.end,c=this.end-m,this.direction=1)):(c-=v,c<=this.start&&(m=this.start-c,c=this.start+m,this.direction=0)),this.counter=c}else this.counter=i(c+v,this.start,this.end);return this.current=u,u},easedValueEmit:function(u,c){if(u&&u.data[c]){var v=u.data[c];v.min=this.start,v.max=this.end}return this.current=this.start,this.start},easeValueUpdate:function(u,c,v){var m=u.data[c],T,C=this.ease(v);return this.interpolation?T=this.interpolation(this.start,C):T=(m.max-m.min)*C+m.min,this.current=T,T},destroy:function(){this.propertyValue=null,this.defaultValue=null,this.ease=null,this.interpolation=null,this._onEmit=null,this._onUpdate=null}});d.exports=h},24502:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(95540),o=t(20286),s=new a({Extends:o,initialize:function(e,n,l,i,h){if(typeof e=="object"){var u=e;e=p(u,"x",0),n=p(u,"y",0),l=p(u,"power",0),i=p(u,"epsilon",100),h=p(u,"gravity",50)}else e===void 0&&(e=0),n===void 0&&(n=0),l===void 0&&(l=0),i===void 0&&(i=100),h===void 0&&(h=50);o.call(this,e,n,!0),this._gravity=h,this._power=l*h,this._epsilon=i*i},update:function(r,e){var n=this.x-r.x,l=this.y-r.y,i=n*n+l*l;if(i!==0){var h=Math.sqrt(i);i{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(9674),p=t(45319),o=t(83419),s=t(39506),r=t(87841),e=t(11520),n=t(26099),l=new o({initialize:function(h){this.emitter=h,this.texture=null,this.frame=null,this.x=0,this.y=0,this.worldPosition=new n,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=h.scene,this.anims=new a(this),this.bounds=new r},emit:function(i,h,u,c,v,m){return this.emitter.emit(i,h,u,c,v,m)},isAlive:function(){return this.lifeCurrent>0},kill:function(){this.lifeCurrent=0},setPosition:function(i,h){i===void 0&&(i=0),h===void 0&&(h=0),this.x=i,this.y=h},fire:function(i,h){var u=this.emitter,c=u.ops,v=u.getAnim();if(v?this.anims.play(v):(this.frame=u.getFrame(),this.texture=this.frame.texture),!this.frame)throw new Error("Particle has no texture frame");if(u.getEmitZone(this),i===void 0?this.x+=c.x.onEmit(this,"x"):c.x.steps>0?this.x+=i+c.x.onEmit(this,"x"):this.x+=i,h===void 0?this.y+=c.y.onEmit(this,"y"):c.y.steps>0?this.y+=h+c.y.onEmit(this,"y"):this.y+=h,this.life=c.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0,this.delayCurrent=c.delay.onEmit(this,"delay"),this.holdCurrent=c.hold.onEmit(this,"hold"),this.scaleX=c.scaleX.onEmit(this,"scaleX"),this.scaleY=c.scaleY.active?c.scaleY.onEmit(this,"scaleY"):this.scaleX,this.angle=c.rotate.onEmit(this,"rotate"),this.rotation=s(this.angle),u.worldMatrix.transformPoint(this.x,this.y,this.worldPosition),this.delayCurrent===0&&u.getDeathZone(this))return this.lifeCurrent=0,!1;var m=c.speedX.onEmit(this,"speedX"),T=c.speedY.active?c.speedY.onEmit(this,"speedY"):m;if(u.radial){var C=s(c.angle.onEmit(this,"angle"));this.velocityX=Math.cos(C)*Math.abs(m),this.velocityY=Math.sin(C)*Math.abs(T)}else if(u.moveTo){var S=c.moveToX.onEmit(this,"moveToX"),P=c.moveToY.onEmit(this,"moveToY"),A=this.life/1e3;this.velocityX=(S-this.x)/A,this.velocityY=(P-this.y)/A}else this.velocityX=m,this.velocityY=T;return u.acceleration&&(this.accelerationX=c.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=c.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=c.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=c.maxVelocityY.onEmit(this,"maxVelocityY"),this.bounce=c.bounce.onEmit(this,"bounce"),this.alpha=c.alpha.onEmit(this,"alpha"),c.color.active?this.tint=c.color.onEmit(this,"tint"):this.tint=c.tint.onEmit(this,"tint"),!0},update:function(i,h,u){if(this.lifeCurrent<=0)return this.holdCurrent>0?(this.holdCurrent-=i,this.holdCurrent<=0):!0;if(this.delayCurrent>0)return this.delayCurrent-=i,!1;this.anims.update(0,i);var c=this.emitter,v=c.ops,m=1-this.lifeCurrent/this.life;if(this.lifeT=m,this.x=v.x.onUpdate(this,"x",m,this.x),this.y=v.y.onUpdate(this,"y",m,this.y),c.moveTo){var T=v.moveToX.onUpdate(this,"moveToX",m,c.moveToX),C=v.moveToY.onUpdate(this,"moveToY",m,c.moveToY),S=this.lifeCurrent/1e3;this.velocityX=(T-this.x)/S,this.velocityY=(C-this.y)/S}return this.computeVelocity(c,i,h,u,m),this.scaleX=v.scaleX.onUpdate(this,"scaleX",m,this.scaleX),v.scaleY.active?this.scaleY=v.scaleY.onUpdate(this,"scaleY",m,this.scaleY):this.scaleY=this.scaleX,this.angle=v.rotate.onUpdate(this,"rotate",m,this.angle),this.rotation=s(this.angle),c.getDeathZone(this)?(this.lifeCurrent=0,!0):(this.alpha=p(v.alpha.onUpdate(this,"alpha",m,this.alpha),0,1),v.color.active?this.tint=v.color.onUpdate(this,"color",m,this.tint):this.tint=v.tint.onUpdate(this,"tint",m,this.tint),this.lifeCurrent-=i,this.lifeCurrent<=0&&this.holdCurrent<=0)},computeVelocity:function(i,h,u,c,v){var m=i.ops,T=this.velocityX,C=this.velocityY,S=m.accelerationX.onUpdate(this,"accelerationX",v,this.accelerationX),P=m.accelerationY.onUpdate(this,"accelerationY",v,this.accelerationY),A=m.maxVelocityX.onUpdate(this,"maxVelocityX",v,this.maxVelocityX),L=m.maxVelocityY.onUpdate(this,"maxVelocityY",v,this.maxVelocityY);this.bounce=m.bounce.onUpdate(this,"bounce",v,this.bounce),T+=i.gravityX*u+S*u,C+=i.gravityY*u+P*u,T=p(T,-A,A),C=p(C,-L,L),this.velocityX=T,this.velocityY=C,this.x+=T*u,this.y+=C*u,i.worldMatrix.transformPoint(this.x,this.y,this.worldPosition);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),p=t(20286),o=t(87841),s=new a({Extends:p,initialize:function(e,n,l,i,h,u,c,v){h===void 0&&(h=!0),u===void 0&&(u=!0),c===void 0&&(c=!0),v===void 0&&(v=!0),p.call(this,e,n,!0),this.bounds=new o(e,n,l,i),this.collideLeft=h,this.collideRight=u,this.collideTop=c,this.collideBottom=v},update:function(r){var e=this.bounds,n=-r.bounce,l=r.worldPosition;l.xe.right&&this.collideRight&&(r.x-=l.x-e.right,r.velocityX*=n),l.ye.bottom&&this.collideBottom&&(r.y-=l.y-e.bottom,r.velocityY*=n)}});d.exports=s},31600:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(31401),o=t(53774),s=t(43459),r=t(26388),e=t(19909),n=t(76472),l=t(44777),i=t(20696),h=t(95643),u=t(95540),c=t(26546),v=t(24502),m=t(1985),T=t(97022),C=t(86091),S=t(73162),P=t(20074),A=t(56480),L=t(68875),F=t(87841),I=t(59996),D=t(72905),B=t(90668),G=t(19186),z=t(61340),W=t(26099),Y=t(15994),K=t(69601),Z=["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"],V=["accelerationX","accelerationY","alpha","angle","bounce","color","delay","hold","lifespan","maxVelocityX","maxVelocityY","moveToX","moveToY","quantity","rotate","scaleX","scaleY","speedX","speedY","tint","x","y"],H=new a({Extends:h,Mixins:[p.AlphaSingle,p.BlendMode,p.Depth,p.Mask,p.Pipeline,p.PostPipeline,p.ScrollFactor,p.Texture,p.Transform,p.Visible,B],initialize:function(U,X,$,k,Q){h.call(this,U,"ParticleEmitter"),this.particleClass=A,this.ops={accelerationX:new l("accelerationX",0),accelerationY:new l("accelerationY",0),alpha:new l("alpha",1),angle:new l("angle",{min:0,max:360},!0),bounce:new l("bounce",0),color:new n("color"),delay:new l("delay",0,!0),hold:new l("hold",0,!0),lifespan:new l("lifespan",1e3,!0),maxVelocityX:new l("maxVelocityX",1e4),maxVelocityY:new l("maxVelocityY",1e4),moveToX:new l("moveToX",0),moveToY:new l("moveToY",0),quantity:new l("quantity",1,!0),rotate:new l("rotate",0),scaleX:new l("scaleX",1),scaleY:new l("scaleY",1),speedX:new l("speedX",0,!0),speedY:new l("speedY",0,!0),tint:new l("tint",16777215),x:new l("x",0),y:new l("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 S(this),this.tintFill=!1,this.initPipeline(),this.initPostPipeline(),this.setPosition(X,$),this.setTexture(k),Q&&this.setConfig(Q)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},setConfig:function(N){if(!N)return this;var U=0,X="",$=this.ops;for(U=0;U=this.animQuantity&&(this.animCounter=0,this.currentAnim=Y(this.currentAnim+1,0,U)),X},setAnim:function(N,U,X){U===void 0&&(U=!0),X===void 0&&(X=1),this.randomAnim=U,this.animQuantity=X,this.currentAnim=0;var $=typeof N;if(this.anims.length=0,Array.isArray(N))this.anims=this.anims.concat(N);else if($==="string")this.anims.push(N);else if($==="object"){var k=N;N=u(k,"anims",null),N&&(this.anims=this.anims.concat(N));var Q=u(k,"cycle",!1);this.randomAnim=!Q,this.animQuantity=u(k,"quantity",X)}return this.anims.length===1&&(this.animQuantity=1,this.randomAnim=!1),this},setRadial:function(N){return N===void 0&&(N=!0),this.radial=N,this},addParticleBounds:function(N,U,X,$,k,Q,J,et){if(typeof N=="object"){var nt=N;N=nt.x,U=nt.y,X=T(nt,"w")?nt.w:nt.width,$=T(nt,"h")?nt.h:nt.height}return this.addParticleProcessor(new K(N,U,X,$,k,Q,J,et))},setParticleSpeed:function(N,U){return U===void 0&&(U=N),this.ops.speedX.onChange(N),N===U?this.ops.speedY.active=!1:this.ops.speedY.onChange(U),this.radial=!0,this},setParticleScale:function(N,U){return N===void 0&&(N=1),U===void 0&&(U=N),this.ops.scaleX.onChange(N),this.ops.scaleY.onChange(U),this},setParticleGravity:function(N,U){return this.gravityX=N,this.gravityY=U,this},setParticleAlpha:function(N){return this.ops.alpha.onChange(N),this},setParticleTint:function(N){return this.ops.tint.onChange(N),this},setEmitterAngle:function(N){return this.ops.angle.onChange(N),this},setParticleLifespan:function(N){return this.ops.lifespan.onChange(N),this},setQuantity:function(N){return this.quantity=N,this},setFrequency:function(N,U){return this.frequency=N,this.flowCounter=N>0?N:0,U&&(this.quantity=U),this},addDeathZone:function(N){Array.isArray(N)||(N=[N]);for(var U,X=[],$=0;$-1&&(this.zoneTotal++,this.zoneTotal===$.total&&(this.zoneTotal=0,this.zoneIndex++,this.zoneIndex===X&&(this.zoneIndex=0)))}},getDeathZone:function(N){for(var U=this.deathZones,X=0;X=0&&(this.zoneIndex=U),this},addParticleProcessor:function(N){return this.processors.exists(N)||(N.emitter&&N.emitter.removeParticleProcessor(N),this.processors.add(N),N.emitter=this),N},removeParticleProcessor:function(N){return this.processors.exists(N)&&(this.processors.remove(N,!0),N.emitter=null),N},getProcessors:function(){return this.processors.getAll("active",!0)},createGravityWell:function(N){return this.addParticleProcessor(new v(N))},reserve:function(N){var U=this.dead;if(this.maxParticles>0){var X=this.getParticleCount();X+N>this.maxParticles&&(N=this.maxParticles-(X+N))}for(var $=0;$0&&this.getParticleCount()>=this.maxParticles?!0:this.maxAliveParticles>0&&this.getAliveParticleCount()>=this.maxAliveParticles},onParticleEmit:function(N,U){return N===void 0?(this.emitCallback=null,this.emitCallbackScope=null):typeof N=="function"&&(this.emitCallback=N,U&&(this.emitCallbackScope=U)),this},onParticleDeath:function(N,U){return N===void 0?(this.deathCallback=null,this.deathCallbackScope=null):typeof N=="function"&&(this.deathCallback=N,U&&(this.deathCallbackScope=U)),this},killAll:function(){for(var N=this.dead,U=this.alive;U.length>0;)N.push(U.pop());return this},forEachAlive:function(N,U){for(var X=this.alive,$=X.length,k=0;k<$;k++)N.call(U,X[k],this);return this},forEachDead:function(N,U){for(var X=this.dead,$=X.length,k=0;k<$;k++)N.call(U,X[k],this);return this},start:function(N,U){return N===void 0&&(N=0),this.emitting||(N>0&&this.fastForward(N),this.emitting=!0,this.resetCounters(this.frequency,!0),U!==void 0&&(this.duration=Math.abs(U)),this.emit(i.START,this)),this},stop:function(N){return N===void 0&&(N=!1),this.emitting&&(this.emitting=!1,N&&this.killAll(),this.emit(i.STOP,this)),this},pause:function(){return this.active=!1,this},resume:function(){return this.active=!0,this},setSortProperty:function(N,U){return N===void 0&&(N=""),U===void 0&&(U=this.true),this.sortProperty=N,this.sortOrderAsc=U,this.sortCallback=this.depthSortCallback,this},setSortCallback:function(N){return this.sortProperty!==""?N=this.depthSortCallback:N=null,this.sortCallback=N,this},depthSort:function(){return G(this.alive,this.sortCallback.bind(this)),this},depthSortCallback:function(N,U){var X=this.sortProperty;return this.sortOrderAsc?N[X]-U[X]:U[X]-N[X]},flow:function(N,U,X){return U===void 0&&(U=1),this.emitting=!1,this.frequency=N,this.quantity=U,X!==void 0&&(this.stopAfter=X),this.start()},explode:function(N,U,X){this.frequency=-1,this.resetCounters(-1,!0);var $=this.emitParticle(N,U,X);return this.emit(i.EXPLODE,this,$),$},emitParticleAt:function(N,U,X){return this.emitParticle(X,N,U)},emitParticle:function(N,U,X){if(!this.atLimit()){N===void 0&&(N=this.ops.quantity.onEmit());for(var $=this.dead,k=this.stopAfter,Q=this.follow?this.follow.x+this.followOffset.x:U,J=this.follow?this.follow.y+this.followOffset.y:X,et=0;et0&&(this.stopCounter++,this.stopCounter>=k)||this.atLimit())break}return nt}},fastForward:function(N,U){U===void 0&&(U=1e3/60);var X=0;for(this.skipping=!0;X0){var ot=this.deathCallback,ut=this.deathCallbackScope;for(J=nt-1;J>=0;J--){var at=et[J];k.splice(at.index,1),Q.push(at.particle),ot&&ot.call(ut,at.particle),at.particle.setPosition()}}if(!this.emitting&&!this.skipping){this.completeFlag===1&&k.length===0&&(this.completeFlag=0,this.emit(i.COMPLETE,this));return}if(this.frequency===0)this.emitParticle();else if(this.frequency>0)for(this.flowCounter-=U;this.flowCounter<=0;)this.emitParticle(),this.flowCounter+=this.frequency;this.skipping||(this.duration>0&&(this.elapsed+=U,this.elapsed>=this.duration&&this.stop()),this.stopAfter>0&&this.stopCounter>=this.stopAfter&&this.stop())},overlap:function(N){for(var U=this.getWorldTransformMatrix(),X=this.alive,$=X.length,k=[],Q=0;Q<$;Q++){var J=X[Q];I(N,J.getBounds(U))&&k.push(J)}return k},getBounds:function(N,U,X,$){N===void 0&&(N=0),U===void 0&&(U=0),X===void 0&&(X=1e3/60),$===void 0&&($=new F);var k=this.getWorldTransformMatrix(),Q,J,et=this.alive,nt=!1;if($.setTo(0,0,0,0),U>0){var st=0;for(this.skipping=!0;st0&&C($,N,N),$},createEmitter:function(){throw new Error("createEmitter removed. See ParticleEmitter docs for info")},particleX:{get:function(){return this.ops.x.current},set:function(N){this.ops.x.onChange(N)}},particleY:{get:function(){return this.ops.y.current},set:function(N){this.ops.y.onChange(N)}},accelerationX:{get:function(){return this.ops.accelerationX.current},set:function(N){this.ops.accelerationX.onChange(N)}},accelerationY:{get:function(){return this.ops.accelerationY.current},set:function(N){this.ops.accelerationY.onChange(N)}},maxVelocityX:{get:function(){return this.ops.maxVelocityX.current},set:function(N){this.ops.maxVelocityX.onChange(N)}},maxVelocityY:{get:function(){return this.ops.maxVelocityY.current},set:function(N){this.ops.maxVelocityY.onChange(N)}},speed:{get:function(){return this.ops.speedX.current},set:function(N){this.ops.speedX.onChange(N),this.ops.speedY.onChange(N)}},speedX:{get:function(){return this.ops.speedX.current},set:function(N){this.ops.speedX.onChange(N)}},speedY:{get:function(){return this.ops.speedY.current},set:function(N){this.ops.speedY.onChange(N)}},moveToX:{get:function(){return this.ops.moveToX.current},set:function(N){this.ops.moveToX.onChange(N)}},moveToY:{get:function(){return this.ops.moveToY.current},set:function(N){this.ops.moveToY.onChange(N)}},bounce:{get:function(){return this.ops.bounce.current},set:function(N){this.ops.bounce.onChange(N)}},particleScaleX:{get:function(){return this.ops.scaleX.current},set:function(N){this.ops.scaleX.onChange(N)}},particleScaleY:{get:function(){return this.ops.scaleY.current},set:function(N){this.ops.scaleY.onChange(N)}},particleColor:{get:function(){return this.ops.color.current},set:function(N){this.ops.color.onChange(N)}},colorEase:{get:function(){return this.ops.color.easeName},set:function(N){this.ops.color.setEase(N)}},particleTint:{get:function(){return this.ops.tint.current},set:function(N){this.ops.tint.onChange(N)}},particleAlpha:{get:function(){return this.ops.alpha.current},set:function(N){this.ops.alpha.onChange(N)}},lifespan:{get:function(){return this.ops.lifespan.current},set:function(N){this.ops.lifespan.onChange(N)}},particleAngle:{get:function(){return this.ops.angle.current},set:function(N){this.ops.angle.onChange(N)}},particleRotate:{get:function(){return this.ops.rotate.current},set:function(N){this.ops.rotate.onChange(N)}},quantity:{get:function(){return this.ops.quantity.current},set:function(N){this.ops.quantity.onChange(N)}},delay:{get:function(){return this.ops.delay.current},set:function(N){this.ops.delay.onChange(N)}},hold:{get:function(){return this.ops.hold.current},set:function(N){this.ops.hold.onChange(N)}},flowCounter:{get:function(){return this.counters[0]},set:function(N){this.counters[0]=N}},frameCounter:{get:function(){return this.counters[1]},set:function(N){this.counters[1]=N}},animCounter:{get:function(){return this.counters[2]},set:function(N){this.counters[2]=N}},elapsed:{get:function(){return this.counters[3]},set:function(N){this.counters[3]=N}},stopCounter:{get:function(){return this.counters[4]},set:function(N){this.counters[4]=N}},completeFlag:{get:function(){return this.counters[5]},set:function(N){this.counters[5]=N}},zoneIndex:{get:function(){return this.counters[6]},set:function(N){this.counters[6]=N}},zoneTotal:{get:function(){return this.counters[7]},set:function(N){this.counters[7]=N}},currentFrame:{get:function(){return this.counters[8]},set:function(N){this.counters[8]=N}},currentAnim:{get:function(){return this.counters[9]},set:function(N){this.counters[9]=N}},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 N,U=this.ops;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(59996),p=t(61340),o=new p,s=new p,r=new p,e=new p,n=function(l,i,h,u){var c=o,v=s,m=r,T=e;u?(T.loadIdentity(),T.multiply(u),T.translate(i.x,i.y),T.rotate(i.rotation),T.scale(i.scaleX,i.scaleY)):T.applyITRS(i.x,i.y,i.rotation,i.scaleX,i.scaleY);var C=l.currentContext,S=h.roundPixels,P=h.alpha,A=i.alpha,L=i.alive,F=L.length,I=i.viewBounds;if(!(!i.visible||F===0||I&&!a(I,h.worldView))){i.sortCallback&&i.depthSort(),h.addToRenderList(i);var D=i.scrollFactorX,B=i.scrollFactorY;C.save(),C.globalCompositeOperation=l.blendModes[i.blendMode];for(var G=0;G0&&K.height>0){var Z=-Y.halfWidth,V=-Y.halfHeight;C.globalAlpha=W,C.save(),v.setToContext(C),S&&(Z=Math.round(Z),V=Math.round(V)),C.imageSmoothingEnabled=!Y.source.scaleMode,C.drawImage(Y.source.image,K.x,K.y,K.width,K.height,Z,V,K.width,K.height),C.restore()}}}C.restore()}};d.exports=n},92730:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(25305),p=t(44603),o=t(23568),s=t(95540),r=t(31600);p.register("particles",function(e,n){e===void 0&&(e={});var l=o(e,"key",null),i=s(e,"config",null),h=new r(this.scene,0,0,l);return n!==void 0&&(e.add=n),a(this.scene,h,e),i&&h.setConfig(i),h})},676:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(39429),p=t(31600);a.register("particles",function(o,s,r,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 p(this.scene,o,s,r,e))})},90668:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),p=a,o=a;p=t(21188),o=t(9871),d.exports={renderWebGL:p,renderCanvas:o}},21188:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(59996),p=t(61340),o=t(70554),s=new p,r=new p,e=new p,n=new p,l=function(i,h,u,c){var v=i.pipelines.set(h.pipeline),m=s,T=r,C=e,S=n;c?(S.loadIdentity(),S.multiply(c),S.translate(h.x,h.y),S.rotate(h.rotation),S.scale(h.scaleX,h.scaleY)):S.applyITRS(h.x,h.y,h.rotation,h.scaleX,h.scaleY);var P=o.getTintAppendFloatAlpha,A=u.alpha,L=h.alpha;i.pipelines.preBatch(h);var F=h.alive,I=F.length,D=h.viewBounds;if(!(I===0||D&&!a(D,u.worldView))){h.sortCallback&&h.depthSort(),u.addToRenderList(h),m.copyFrom(u.matrix),m.multiplyWithOffset(S,-u.scrollX*h.scrollFactorX,-u.scrollY*h.scrollFactorY),i.setBlendMode(h.blendMode),h.mask&&(h.mask.preRenderWebGL(i,h,u),i.pipelines.set(h.pipeline));for(var B=h.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 a=t(83419),p=new a({initialize:function(s,r,e){s===void 0&&(s=0),r===void 0&&(r=0),e===void 0&&(e=!0),this.emitter,this.x=s,this.y=r,this.active=e},update:function(){},destroy:function(){this.emitter=null}});d.exports=p},9774:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="complete"},812:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="deathzone"},30522:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="explode"},96695:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="start"},18677:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="stop"},20696:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports={COMPLETE:t(9774),DEATH_ZONE:t(812),EXPLODE:t(30522),START:t(96695),STOP:t(18677)}},18404:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.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:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=new a({initialize:function(s,r){this.source=s,this.killOnEnter=r},willKill:function(o){var s=o.worldPosition,r=this.source.contains(s.x,s.y);return r&&this.killOnEnter||!r&&!this.killOnEnter}});d.exports=p},19909:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=new a({initialize:function(s,r,e,n,l,i){n===void 0&&(n=!1),l===void 0&&(l=!0),i===void 0&&(i=-1),this.source=s,this.points=[],this.quantity=r,this.stepRate=e,this.yoyo=n,this.counter=-1,this.seamless=l,this._length=0,this._direction=0,this.total=i,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var o=this.points[0],s=this.points[this.points.length-1];o.x===s.x&&o.y===s.y&&this.points.pop()}var r=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 s=this.points[this.counter];s&&(o.x=s.x,o.y=s.y)}});d.exports=p},68875:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(26099),o=new a({initialize:function(r){this.source=r,this._tempVec=new p,this.total=-1},getPoint:function(s){var r=this._tempVec;this.source.getRandomPoint(r),s.x=r.x,s.y=r.y}});d.exports=o},21024:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports={DeathZone:t(26388),EdgeZone:t(19909),RandomZone:t(68875)}},1159:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(31401),o=t(68287),s=new a({Extends:o,Mixins:[p.PathFollower],initialize:function(e,n,l,i,h,u){o.call(this,e,l,i,h,u),this.path=n},preUpdate:function(r,e){this.anims.update(r,e),this.pathUpdate(r)}});d.exports=s},90145:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(39429),p=t(1159);a.register("follower",function(o,s,r,e,n){var l=new p(this.scene,o,s,r,e,n);return this.displayList.add(l),this.updateList.add(l),l})},33663:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(9674),p=t(83419),o=t(48803),s=t(90664),r=t(4703),e=t(45650),n=new p({Extends:r,initialize:function(i,h,u,c,v,m,T,C){c||(c="__DEFAULT"),r.call(this,i,h,u,c,v),this.type="Plane",this.anims=new a(this),this.gridWidth,this.gridHeight,this.isTiled,this._checkerboard=null,this.hideCCW=!1,this.setGridSize(m,T,C),this.setSizeToFrame(!1),this.setViewHeight()},originX:{get:function(){return .5}},originY:{get:function(){return .5}},setGridSize:function(l,i,h){l===void 0&&(l=8),i===void 0&&(i=8),h===void 0&&(h=!1);var u=!1;return h&&(u=!0),this.gridWidth=l,this.gridHeight=i,this.isTiled=h,this.clear(),o({mesh:this,widthSegments:l,heightSegments:i,isOrtho:!1,tile:h,flipY:u}),this},setSizeToFrame:function(l){l===void 0&&(l=!0);var i=this.frame;if(this.setPerspective(this.width/i.width,this.height/i.height),this._checkerboard&&this._checkerboard!==this.texture&&this.removeCheckerboard(),!l)return this;var h=this.gridWidth,u=this.gridHeight,c=this.vertices,v=i.u0,m=i.u1,T=i.v0,C=i.v1,S,P,A=0;if(this.isTiled)for(T=i.v1,C=i.v0,P=0;P7&&S>7?T.push(v.r,v.g,v.b,h):T.push(m.r,m.g,m.b,u);var P=this.scene.sys.textures.addUint8Array(e(),new Uint8Array(T),16,16);return this.removeCheckerboard(),this.setTexture(P),this.setSizeToFrame(),this.setViewHeight(c),this},removeCheckerboard:function(){this._checkerboard&&(this._checkerboard.destroy(),this._checkerboard=null)},play:function(l,i){return this.anims.play(l,i)},playReverse:function(l,i){return this.anims.playReverse(l,i)},playAfterDelay:function(l,i){return this.anims.playAfterDelay(l,i)},playAfterRepeat:function(l,i){return this.anims.playAfterRepeat(l,i)},stop:function(){return this.anims.stop()},stopAfterDelay:function(l){return this.anims.stopAfterDelay(l)},stopAfterRepeat:function(l){return this.anims.stopAfterRepeat(l)},stopOnFrame:function(l){return this.anims.stopOnFrame(l)},preUpdate:function(l,i){r.prototype.preUpdate.call(this,l,i),this.anims.update(l,i)},preDestroy:function(){this.clear(),this.removeCheckerboard(),this.anims.destroy(),this.anims=void 0,this.debugCallback=null,this.debugGraphic=null}});d.exports=n},56015:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(25305),p=t(13059),o=t(44603),s=t(23568),r=t(35154),e=t(33663);o.register("plane",function(n,l){n===void 0&&(n={});var i=s(n,"key",null),h=s(n,"frame",null),u=r(n,"width",8),c=r(n,"height",8),v=r(n,"tile",!1),m=new e(this.scene,0,0,i,h,u,c,v);l!==void 0&&(n.add=l);var T=r(n,"checkerboard",null);if(T){var C=r(T,"color1",16777215),S=r(T,"color2",255),P=r(T,"alpha1",255),A=r(T,"alpha2",255),L=r(T,"height",128);m.createCheckerboard(C,S,P,A,L)}return a(this.scene,m,n),p(m,n),m})},30985:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(33663),p=t(39429);p.register("plane",function(o,s,r,e,n,l,i){return this.displayList.add(new a(this.scene,o,s,r,e,n,l,i))})},80321:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(31401),o=t(95643),s=t(30100),r=t(36060),e=t(67277),n=new a({Extends:o,Mixins:[p.AlphaSingle,p.BlendMode,p.Depth,p.Mask,p.Pipeline,p.PostPipeline,p.ScrollFactor,p.Transform,p.Visible,e],initialize:function(i,h,u,c,v,m,T){c===void 0&&(c=16777215),v===void 0&&(v=128),m===void 0&&(m=1),T===void 0&&(T=.1),o.call(this,i,"PointLight"),this.initPipeline(r.POINTLIGHT_PIPELINE),this.initPostPipeline(),this.setPosition(h,u),this.color=s(c),this.intensity=m,this.attenuation=T,this.width=v*2,this.height=v*2,this._radius=v},radius:{get:function(){return this._radius},set:function(l){this._radius=l,this.width=l*2,this.height=l*2}},originX:{get:function(){return .5}},originY:{get:function(){return .5}},displayOriginX:{get:function(){return this._radius}},displayOriginY:{get:function(){return this._radius}}});d.exports=n},39829:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(25305),p=t(44603),o=t(23568),s=t(80321);p.register("pointlight",function(r,e){r===void 0&&(r={});var n=o(r,"color",16777215),l=o(r,"radius",128),i=o(r,"intensity",1),h=o(r,"attenuation",.1),u=new s(this.scene,0,0,n,l,i,h);return e!==void 0&&(r.add=e),a(this.scene,u,r),u})},71255:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(39429),p=t(80321);a.register("pointlight",function(o,s,r,e,n,l){return this.displayList.add(new p(this.scene,o,s,r,e,n,l))})},67277:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),p=a,o=a;p=t(57787),d.exports={renderWebGL:p,renderCanvas:o}},57787:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(91296),p=function(o,s,r,e){r.addToRenderList(s);var n=o.pipelines.set(s.pipeline),l=a(s,r,e).calc,i=s.width,h=s.height,u=-s._radius,c=-s._radius,v=u+i,m=c+h,T=l.getX(0,0),C=l.getY(0,0),S=l.getX(u,c),P=l.getY(u,c),A=l.getX(u,m),L=l.getY(u,m),F=l.getX(v,m),I=l.getY(v,m),D=l.getX(v,c),B=l.getY(v,c);o.pipelines.preBatch(s),n.batchPointLight(s,r,S,P,A,L,F,I,D,B,T,C),o.pipelines.postBatch(s)};d.exports=p},591:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(81320),o=t(88571),s=new a({Extends:o,initialize:function(e,n,l,i,h){n===void 0&&(n=0),l===void 0&&(l=0),i===void 0&&(i=32),h===void 0&&(h=32);var u=new p(e.sys.textures,"",i,h);o.call(this,e,n,l,u),this.type="RenderTexture",this.camera=this.texture.camera,this._saved=!1},setSize:function(r,e){this.width=r,this.height=e,this.texture.setSize(r,e),this.updateDisplayOrigin();var n=this.input;return n&&!n.customHitArea&&(n.hitArea.width=r,n.hitArea.height=e),this},resize:function(r,e){return this.setSize(r,e),this},saveTexture:function(r){var e=this.texture;return e.key=r,e.manager.addDynamicTexture(e)&&(this._saved=!0),e},fill:function(r,e,n,l,i,h){return this.texture.fill(r,e,n,l,i,h),this},clear:function(){return this.texture.clear(),this},stamp:function(r,e,n,l,i){return this.texture.stamp(r,e,n,l,i),this},erase:function(r,e,n){return this.texture.erase(r,e,n),this},draw:function(r,e,n,l,i){return this.texture.draw(r,e,n,l,i),this},drawFrame:function(r,e,n,l,i,h){return this.texture.drawFrame(r,e,n,l,i,h),this},repeat:function(r,e,n,l,i,h,u,c,v){return this.texture.repeat(r,e,n,l,i,h,u,c,v),this},beginDraw:function(){return this.texture.beginDraw(),this},batchDraw:function(r,e,n,l,i){return this.texture.batchDraw(r,e,n,l,i),this},batchDrawFrame:function(r,e,n,l,i,h){return this.texture.batchDrawFrame(r,e,n,l,i,h),this},endDraw:function(r){return this.texture.endDraw(r),this},snapshotArea:function(r,e,n,l,i,h,u){return this.texture.snapshotArea(r,e,n,l,i,h,u),this},snapshot:function(r,e,n){return this.snapshotArea(0,0,this.width,this.height,r,e,n)},snapshotPixel:function(r,e,n){return this.snapshotArea(r,e,1,1,n,"pixel")},preDestroy:function(){this.camera=null,this._saved||this.texture.destroy()}});d.exports=s},34495:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(25305),p=t(44603),o=t(23568),s=t(591);p.register("renderTexture",function(r,e){r===void 0&&(r={});var n=o(r,"x",0),l=o(r,"y",0),i=o(r,"width",32),h=o(r,"height",32),u=new s(this.scene,n,l,i,h);return e!==void 0&&(r.add=e),a(this.scene,u,r),u})},60505:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(39429),p=t(591);a.register("renderTexture",function(o,s,r,e){return this.displayList.add(new p(this.scene,o,s,r,e))})},77757:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(9674),p=t(83419),o=t(31401),s=t(95643),r=t(36060),e=t(38745),n=t(26099),l=new p({Extends:s,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(h,u,c,v,m,T,C,S,P){v===void 0&&(v="__DEFAULT"),T===void 0&&(T=2),C===void 0&&(C=!0),s.call(this,h,"Rope"),this.anims=new a(this),this.points=T,this.vertices,this.uv,this.colors,this.alphas,this.tintFill=v==="__DEFAULT",this.dirty=!1,this.horizontal=C,this._flipX=!1,this._flipY=!1,this._perp=new n,this.debugCallback=null,this.debugGraphic=null,this.setTexture(v,m),this.setPosition(u,c),this.setSizeToFrame(),this.initPipeline(r.ROPE_PIPELINE),this.initPostPipeline(),Array.isArray(T)&&this.resizeArrays(T.length),this.setPoints(T,S,P),this.updateVertices()},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(i,h){var u=this.anims.currentFrame;this.anims.update(i,h),this.anims.currentFrame!==u&&(this.updateUVs(),this.updateVertices())},play:function(i,h,u){return this.anims.play(i,h,u),this},setDirty:function(){return this.dirty=!0,this},setHorizontal:function(i,h,u){return i===void 0&&(i=this.points.length),this.horizontal?this:(this.horizontal=!0,this.setPoints(i,h,u))},setVertical:function(i,h,u){return i===void 0&&(i=this.points.length),this.horizontal?(this.horizontal=!1,this.setPoints(i,h,u)):this},setTintFill:function(i){return i===void 0&&(i=!1),this.tintFill=i,this},setAlphas:function(i,h){var u=this.points.length;if(u<1)return this;var c=this.alphas;i===void 0?i=[1]:!Array.isArray(i)&&h===void 0&&(i=[i]);var v,m=0;if(h!==void 0)for(v=0;vm&&(T=i[m]),c[m]=T,i.length>m+1&&(T=i[m+1]),c[m+1]=T}return this},setColors:function(i){var h=this.points.length;if(h<1)return this;var u=this.colors;i===void 0?i=[16777215]:Array.isArray(i)||(i=[i]);var c,v=0;if(i.length===h)for(c=0;cv&&(m=i[v]),u[v]=m,i.length>v+1&&(m=i[v+1]),u[v+1]=m}return this},setPoints:function(i,h,u){if(i===void 0&&(i=2),typeof i=="number"){var c=i;c<2&&(c=2),i=[];var v,m,T;if(this.horizontal)for(T=-this.frame.halfWidth,m=this.frame.width/(c-1),v=0;v{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(){};d.exports=x},26209:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(25305),p=t(44603),o=t(23568),s=t(35154),r=t(77757);p.register("rope",function(e,n){e===void 0&&(e={});var l=o(e,"key",null),i=o(e,"frame",null),h=o(e,"horizontal",!0),u=s(e,"points",void 0),c=s(e,"colors",void 0),v=s(e,"alphas",void 0),m=new r(this.scene,0,0,l,i,u,h,c,v);return n!==void 0&&(e.add=n),a(this.scene,m,e),m})},96819:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(77757),p=t(39429);p.register("rope",function(o,s,r,e,n,l,i,h){return this.displayList.add(new a(this.scene,o,s,r,e,n,l,i,h))})},38745:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),p=a,o=a;p=t(20439),o=t(95262),d.exports={renderWebGL:p,renderCanvas:o}},20439:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(91296),p=t(70554),o=function(s,r,e,n){e.addToRenderList(r);var l=s.pipelines.set(r.pipeline,r),i=a(r,e,n).calc,h=r.vertices,u=r.uv,c=r.colors,v=r.alphas,m=r.alpha,T=p.getTintAppendFloatAlpha,C=e.roundPixels,S=h.length,P=Math.floor(S*.5);l.flush(),s.pipelines.preBatch(r);var A=l.setGameObject(r),L=l.vertexViewF32,F=l.vertexViewU32,I=l.vertexCount*l.currentShader.vertexComponentCount-1,D=0,B=r.tintFill;r.dirty&&r.updateVertices();for(var G=r.debugCallback,z=[],W=0;W{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(31401),o=t(95643),s=t(95540),r=t(79291),e=t(61622),n=t(25479),l=t(61340),i=t(95428),h=t(92503),u=new a({Extends:o,Mixins:[p.ComputedSize,p.Depth,p.GetBounds,p.Mask,p.Origin,p.ScrollFactor,p.Transform,p.Visible,n],initialize:function(v,m,T,C,S,P,A,L){T===void 0&&(T=0),C===void 0&&(C=0),S===void 0&&(S=128),P===void 0&&(P=128),o.call(this,v,"Shader"),this.blendMode=-1,this.shader;var F=v.sys.renderer;this.renderer=F,this.gl=F.gl,this.vertexData=new ArrayBuffer(6*(Float32Array.BYTES_PER_ELEMENT*2)),this.vertexBuffer=F.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 l,this._tempMatrix2=new l,this._tempMatrix3=new l,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=F.width,this._rendererHeight=F.height,this._textureCount=0,this.framebuffer=null,this.glTexture=null,this.renderToTexture=!1,this.texture=null,this.setPosition(T,C),this.setSize(S,P),this.setOrigin(.5,.5),this.setShader(m,A,L),this.renderer.on(h.RESTORE_WEBGL,this.onContextRestored,this)},willRender:function(c){return this.renderToTexture?!0:!(o.RENDER_MASK!==this.renderFlags||this.cameraFilter!==0&&this.cameraFilter&c.id)},setRenderToTexture:function(c,v){if(!this.renderToTexture){var m=this.width,T=this.height,C=this.renderer;this.glTexture=C.createTextureFromSource(null,m,T,0),this.framebuffer=C.createFramebuffer(m,T,this.glTexture,!1),this._rendererWidth=m,this._rendererHeight=T,this.renderToTexture=!0,this.projOrtho(0,this.width,this.height,0),c&&(this.texture=this.scene.sys.textures.addGLTexture(c,this.glTexture))}return this.shader&&(C.pipelines.clear(),this.load(),this.flush(),C.pipelines.rebind()),this},setShader:function(c,v,m){if(this.renderer.contextLost)return this._deferSetShader={key:c,textures:v,textureData:m},this;if(v===void 0&&(v=[]),typeof c=="string"){var T=this.scene.sys.cache.shader;if(!T.has(c))return console.warn("Shader missing: "+c),this;this.shader=T.get(c)}else this.shader=c;var C=this.gl,S=this.renderer;this.program&&S.deleteProgram(this.program);var P=S.createProgram(this.shader.vertexSrc,this.shader.fragmentSrc);C.uniformMatrix4fv(C.getUniformLocation(P.webGLProgram,"uViewMatrix"),!1,this.viewMatrix),C.uniformMatrix4fv(C.getUniformLocation(P.webGLProgram,"uProjectionMatrix"),!1,this.projectionMatrix),C.uniform2f(C.getUniformLocation(P.webGLProgram,"uResolution"),this.width,this.height),this.program=P;var A=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:[A.getFullYear(),A.getMonth(),A.getDate(),A.getHours()*60*60+A.getMinutes()*60+A.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=r(!0,{},this.shader.uniforms,L):this.uniforms=L;for(var F=0;F<4;F++)v[F]&&this.setSampler2D("iChannel"+F,v[F],F,m);return this.initUniforms(),this.projOrtho(0,this._rendererWidth,this._rendererHeight,0),this},setPointer:function(c){return this.pointer=c,this},projOrtho:function(c,v,m,T){if(this.renderer.contextLost){this._deferProjOrtho={left:c,right:v,bottom:m,top:T};return}var C=-1e3,S=1e3,P=1/(c-v),A=1/(m-T),L=1/(C-S),F=this.projectionMatrix;F[0]=-2*P,F[5]=-2*A,F[10]=2*L,F[12]=(c+v)*P,F[13]=(T+m)*A,F[14]=(S+C)*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=v,this._rendererHeight=m},initUniforms:function(){var c=this.renderer.glFuncMap,v=this.program;this._textureCount=0;for(var m in this.uniforms){var T=this.uniforms[m],C=T.type,S=c[C];T.uniformLocation=this.renderer.createUniformLocation(v,m),C!=="sampler2D"&&(T.glMatrix=S.matrix,T.glValueLength=S.length,T.glFunc=S.func)}},setSampler2DBuffer:function(c,v,m,T,C,S){C===void 0&&(C=0),S===void 0&&(S={});var P=this.uniforms[c];return P.value=v,S.width=m,S.height=T,P.textureData=S,this._textureCount=C,this.initSampler2D(P),this},setSampler2D:function(c,v,m,T){m===void 0&&(m=0);var C=this.scene.sys.textures;if(C.exists(v)){var S=C.getFrame(v);if(S.glTexture&&S.glTexture.isRenderTexture)return this.setSampler2DBuffer(c,S.glTexture,S.width,S.height,m,T);var P=this.uniforms[c],A=S.source;P.textureKey=v,P.source=A.image,P.value=S.glTexture,A.isGLTexture&&(T||(T={}),T.width=A.width,T.height=A.height),T&&(P.textureData=T),this._textureCount=m,this.initSampler2D(P)}return this},setUniform:function(c,v){return e(this.uniforms,c,v),this},getUniform:function(c){return s(this.uniforms,c,null)},setChannel0:function(c,v){return this.setSampler2D("iChannel0",c,0,v)},setChannel1:function(c,v){return this.setSampler2D("iChannel1",c,1,v)},setChannel2:function(c,v){return this.setSampler2D("iChannel2",c,2,v)},setChannel3:function(c,v){return this.setSampler2D("iChannel3",c,3,v)},initSampler2D:function(c){if(c.value){var v=c.textureData;if(v&&!c.value.isRenderTexture){var m=this.gl,T=c.value,C=m[s(v,"magFilter","linear").toUpperCase()],S=m[s(v,"minFilter","linear").toUpperCase()],P=m[s(v,"wrapS","repeat").toUpperCase()],A=m[s(v,"wrapT","repeat").toUpperCase()],L=m[s(v,"format","rgba").toUpperCase()],F=s(v,"flipY",!1),I=s(v,"width",T.width),D=s(v,"height",T.height),B=s(v,"source",T.pixels);v.repeat&&(P=m.REPEAT,A=m.REPEAT),v.width&&(B=null),T.update(B,I,D,F,P,A,S,C,L)}this.renderer.setProgram(this.program),this._textureCount++}},syncUniforms:function(){var c=this.gl,v=this.uniforms,m,T,C,S,P,A=0;for(var L in v)m=v[L],C=m.glFunc,T=m.glValueLength,S=m.uniformLocation,P=m.value,P!==null&&(T===1?m.glMatrix?C.call(c,S.webGLUniformLocation,m.transpose,P):C.call(c,S.webGLUniformLocation,P):T===2?C.call(c,S.webGLUniformLocation,P.x,P.y):T===3?C.call(c,S.webGLUniformLocation,P.x,P.y,P.z):T===4?C.call(c,S.webGLUniformLocation,P.x,P.y,P.z,P.w):m.type==="sampler2D"&&(c.activeTexture(c.TEXTURE0+A),c.bindTexture(c.TEXTURE_2D,P.webGLTexture),c.uniform1i(S.webGLUniformLocation,A),A++))},load:function(c){var v=this.gl,m=this.width,T=this.height,C=this.renderer,S=this.program,P=this.viewMatrix;if(!this.renderToTexture){var A=-this._displayOriginX,L=-this._displayOriginY;P[0]=c[0],P[1]=c[1],P[4]=c[2],P[5]=c[3],P[8]=c[4],P[9]=c[5],P[12]=P[0]*A+P[4]*L,P[13]=P[1]*A+P[5]*L}v.useProgram(S.webGLProgram),v.uniformMatrix4fv(v.getUniformLocation(S.webGLProgram,"uViewMatrix"),!1,P),v.uniformMatrix4fv(v.getUniformLocation(S.webGLProgram,"uProjectionMatrix"),!1,this.projectionMatrix),v.uniform2f(v.getUniformLocation(S.webGLProgram,"uResolution"),this.width,this.height);var F=this.uniforms,I=F.resolution;I.value.x=m,I.value.y=T,F.time.value=C.game.loop.getDuration();var D=this.pointer;if(D){var B=F.mouse,G=D.x/m,z=1-D.y/T;B.value.x=G.toFixed(2),B.value.y=z.toFixed(2)}this.syncUniforms()},flush:function(){var c=this.width,v=this.height,m=this.program,T=this.gl,C=this.vertexBuffer,S=this.renderer,P=Float32Array.BYTES_PER_ELEMENT*2;this.renderToTexture&&(S.setFramebuffer(this.framebuffer),T.clearColor(0,0,0,0),T.clear(T.COLOR_BUFFER_BIT)),T.bindBuffer(T.ARRAY_BUFFER,C.webGLBuffer);var A=T.getAttribLocation(m.webGLProgram,"inPosition");A!==-1&&(T.enableVertexAttribArray(A),T.vertexAttribPointer(A,2,T.FLOAT,!1,P,0));var L=this.vertexViewF32;L[3]=v,L[4]=c,L[5]=v,L[8]=c,L[9]=v,L[10]=c;var F=6;T.bufferSubData(T.ARRAY_BUFFER,0,this.bytes.subarray(0,F*P)),T.drawArrays(T.TRIANGLES,0,F),this.renderToTexture&&S.setFramebuffer(null,!1)},setAlpha:function(){},setBlendMode:function(){},onContextRestored:function(){if(this._deferSetShader!==null){var c=this._deferSetShader.key,v=this._deferSetShader.textures,m=this._deferSetShader.textureData;this._deferSetShader=null,this.setShader(c,v,m)}if(this._deferProjOrtho!==null){var T=this._deferProjOrtho.left,C=this._deferProjOrtho.right,S=this._deferProjOrtho.bottom,P=this._deferProjOrtho.top;this._deferProjOrtho=null,this.projOrtho(T,C,S,P)}},preDestroy:function(){var c=this.renderer;c.off(h.RESTORE_WEBGL,this.onContextRestored,this),c.deleteProgram(this.program),c.deleteBuffer(this.vertexBuffer),this.renderToTexture&&(c.deleteFramebuffer(this.framebuffer),this.texture.destroy(),this.framebuffer=null,this.glTexture=null,this.texture=null),i(this.uniforms,function(v){c.deleteUniformLocation(v.uniformLocation),v.uniformLocation=null})}});d.exports=u},80464:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(){};d.exports=x},54935:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(25305),p=t(44603),o=t(23568),s=t(20071);p.register("shader",function(r,e){r===void 0&&(r={});var n=o(r,"key",null),l=o(r,"x",0),i=o(r,"y",0),h=o(r,"width",128),u=o(r,"height",128),c=new s(this.scene,n,l,i,h,u);return e!==void 0&&(r.add=e),a(this.scene,c,r),c})},74177:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(20071),p=t(39429);p.register("shader",function(o,s,r,e,n,l,i){return this.displayList.add(new a(this.scene,o,s,r,e,n,l,i))})},25479:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),p=a,o=a;p=t(19257),o=t(80464),d.exports={renderWebGL:p,renderCanvas:o}},19257:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(91296),p=function(o,s,r,e){if(s.shader){if(r.addToRenderList(s),o.pipelines.clear(),s.renderToTexture)s.load(),s.flush();else{var n=a(s,r,e).calc;(o.width!==s._rendererWidth||o.height!==s._rendererHeight)&&s.projOrtho(0,o.width,o.height,0),s.load(n.matrix),s.flush()}o.pipelines.rebind()}};d.exports=p},10441:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(70554),p=function(o,s,r,e,n,l){for(var i=a.getTintAppendFloatAlpha(r.fillColor,r.fillAlpha*e),h=r.pathData,u=r.pathIndexes,c=0;c{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p,o){var s=p||a.fillColor,r=o||a.fillAlpha,e=(s&16711680)>>>16,n=(s&65280)>>>8,l=s&255;t.fillStyle="rgba("+e+","+n+","+l+","+r+")"};d.exports=x},75177:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p,o){var s=p||a.strokeColor,r=o||a.strokeAlpha,e=(s&16711680)>>>16,n=(s&65280)>>>8,l=s&255;t.strokeStyle="rgba("+e+","+n+","+l+","+r+")",t.lineWidth=a.lineWidth};d.exports=x},17803:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(31401),o=t(95643),s=t(23031),r=new a({Extends:o,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(n,l,i){l===void 0&&(l="Shape"),o.call(this,n,l),this.geom=i,this.pathData=[],this.pathIndexes=[],this.fillColor=16777215,this.fillAlpha=1,this.strokeColor=16777215,this.strokeAlpha=1,this.lineWidth=1,this.isFilled=!1,this.isStroked=!1,this.closePath=!0,this._tempLine=new s,this.width=0,this.height=0,this.initPipeline(),this.initPostPipeline()},setFillStyle:function(e,n){return n===void 0&&(n=1),e===void 0?this.isFilled=!1:(this.fillColor=e,this.fillAlpha=n,this.isFilled=!0),this},setStrokeStyle:function(e,n,l){return l===void 0&&(l=1),e===void 0?this.isStroked=!1:(this.lineWidth=e,this.strokeColor=n,this.strokeAlpha=l,this.isStroked=!0),this},setClosePath:function(e){return this.closePath=e,this},setSize:function(e,n){return this.width=e,this.height=n,this},setDisplaySize:function(e,n){return this.displayWidth=e,this.displayHeight=n,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}}});d.exports=r},34682:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(70554),p=function(o,s,r,e,n){var l=o.strokeTint,i=a.getTintAppendFloatAlpha(s.strokeColor,s.strokeAlpha*r);l.TL=i,l.TR=i,l.BL=i,l.BR=i;var h=s.pathData,u=h.length-1,c=s.lineWidth,v=c/2,m=h[0]-e,T=h[1]-n;s.closePath||(u-=2);for(var C=2;C{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(13609),p=t(83419),o=t(39506),s=t(94811),r=t(96503),e=t(36383),n=t(17803),l=new p({Extends:n,Mixins:[a],initialize:function(h,u,c,v,m,T,C,S,P){u===void 0&&(u=0),c===void 0&&(c=0),v===void 0&&(v=128),m===void 0&&(m=0),T===void 0&&(T=360),C===void 0&&(C=!1),n.call(this,h,"Arc",new r(0,0,v)),this._startAngle=m,this._endAngle=T,this._anticlockwise=C,this._iterations=.01,this.setPosition(u,c);var A=this.geom.radius*2;this.setSize(A,A),S!==void 0&&this.setFillStyle(S,P),this.updateDisplayOrigin(),this.updateData()},iterations:{get:function(){return this._iterations},set:function(i){this._iterations=i,this.updateData()}},radius:{get:function(){return this.geom.radius},set:function(i){this.geom.radius=i;var h=i*2;this.setSize(h,h),this.updateDisplayOrigin(),this.updateData()}},startAngle:{get:function(){return this._startAngle},set:function(i){this._startAngle=i,this.updateData()}},endAngle:{get:function(){return this._endAngle},set:function(i){this._endAngle=i,this.updateData()}},anticlockwise:{get:function(){return this._anticlockwise},set:function(i){this._anticlockwise=i,this.updateData()}},setRadius:function(i){return this.radius=i,this},setIterations:function(i){return i===void 0&&(i=.01),this.iterations=i,this},setStartAngle:function(i,h){return this._startAngle=i,h!==void 0&&(this._anticlockwise=h),this.updateData()},setEndAngle:function(i,h){return this._endAngle=i,h!==void 0&&(this._anticlockwise=h),this.updateData()},updateData:function(){var i=this._iterations,h=i,u=this.geom.radius,c=o(this._startAngle),v=o(this._endAngle),m=this._anticlockwise,T=u,C=u;v-=c,m?v<-e.PI2?v=-e.PI2:v>0&&(v=-e.PI2+v%e.PI2):v>e.PI2?v=e.PI2:v<0&&(v=e.PI2+v%e.PI2);for(var S=[T+Math.cos(c)*u,C+Math.sin(c)*u],P;h<1;)P=v*h+c,S.push(T+Math.cos(P)*u,C+Math.sin(P)*u),h+=i;return P=v+c,S.push(T+Math.cos(P)*u,C+Math.sin(P)*u),S.push(T+Math.cos(c)*u,C+Math.sin(c)*u),this.pathIndexes=s(S),this.pathData=S,this}});d.exports=l},42542:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(39506),p=t(65960),o=t(75177),s=t(20926),r=function(e,n,l,i){l.addToRenderList(n);var h=e.currentContext;if(s(e,h,n,l,i)){var u=n.radius;h.beginPath(),h.arc(u-n.originX*(u*2),u-n.originY*(u*2),u,a(n._startAngle),a(n._endAngle),n.anticlockwise),n.closePath&&h.closePath(),n.isFilled&&(p(h,n),h.fill()),n.isStroked&&(o(h,n),h.stroke()),h.restore()}};d.exports=r},42563:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(23629),p=t(39429);p.register("arc",function(o,s,r,e,n,l,i,h){return this.displayList.add(new a(this.scene,o,s,r,e,n,l,i,h))}),p.register("circle",function(o,s,r,e,n){return this.displayList.add(new a(this.scene,o,s,r,0,360,!1,e,n))})},13609:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),p=a,o=a;p=t(41447),o=t(42542),d.exports={renderWebGL:p,renderCanvas:o}},41447:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(91296),p=t(10441),o=t(34682),s=function(r,e,n,l){n.addToRenderList(e);var i=r.pipelines.set(e.pipeline),h=a(e,n,l),u=i.calcMatrix.copyFrom(h.calc),c=e._displayOriginX,v=e._displayOriginY,m=n.alpha*e.alpha;r.pipelines.preBatch(e),e.isFilled&&p(i,u,e,m,c,v),e.isStroked&&o(i,e,m,c,v),r.pipelines.postBatch(e)};d.exports=s},89:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(33141),o=t(94811),s=t(87841),r=t(17803),e=new a({Extends:r,Mixins:[p],initialize:function(l,i,h,u,c,v){i===void 0&&(i=0),h===void 0&&(h=0),r.call(this,l,"Curve",u),this._smoothness=32,this._curveBounds=new s,this.closePath=!1,this.setPosition(i,h),c!==void 0&&this.setFillStyle(c,v),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(n){this._smoothness=n,this.updateData()}},setSmoothness:function(n){return this._smoothness=n,this.updateData()},updateData:function(){var n=this._curveBounds,l=this._smoothness;this.geom.getBounds(n,l),this.setSize(n.width,n.height),this.updateDisplayOrigin();for(var i=[],h=this.geom.getPoints(l),u=0;u{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(65960),p=t(75177),o=t(20926),s=function(r,e,n,l){n.addToRenderList(e);var i=r.currentContext;if(o(r,i,e,n,l)){var h=e._displayOriginX+e._curveBounds.x,u=e._displayOriginY+e._curveBounds.y,c=e.pathData,v=c.length-1,m=c[0]-h,T=c[1]-u;i.beginPath(),i.moveTo(m,T),e.closePath||(v-=2);for(var C=2;C{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(39429),p=t(89);a.register("curve",function(o,s,r,e,n){return this.displayList.add(new p(this.scene,o,s,r,e,n))})},33141:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),p=a,o=a;p=t(53987),o=t(3170),d.exports={renderWebGL:p,renderCanvas:o}},53987:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(10441),p=t(91296),o=t(34682),s=function(r,e,n,l){n.addToRenderList(e);var i=r.pipelines.set(e.pipeline),h=p(e,n,l),u=i.calcMatrix.copyFrom(h.calc),c=e._displayOriginX+e._curveBounds.x,v=e._displayOriginY+e._curveBounds.y,m=n.alpha*e.alpha;r.pipelines.preBatch(e),e.isFilled&&a(i,u,e,m,c,v),e.isStroked&&o(i,e,m,c,v),r.pipelines.postBatch(e)};d.exports=s},19921:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(94811),o=t(54205),s=t(8497),r=t(17803),e=new a({Extends:r,Mixins:[o],initialize:function(l,i,h,u,c,v,m){i===void 0&&(i=0),h===void 0&&(h=0),u===void 0&&(u=128),c===void 0&&(c=128),r.call(this,l,"Ellipse",new s(u/2,c/2,u,c)),this._smoothness=64,this.setPosition(i,h),this.width=u,this.height=c,v!==void 0&&this.setFillStyle(v,m),this.updateDisplayOrigin(),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(n){this._smoothness=n,this.updateData()}},setSize:function(n,l){return this.width=n,this.height=l,this.geom.setPosition(n/2,l/2),this.geom.setSize(n,l),this.updateData()},setSmoothness:function(n){return this._smoothness=n,this.updateData()},updateData:function(){for(var n=[],l=this.geom.getPoints(this._smoothness),i=0;i{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(65960),p=t(75177),o=t(20926),s=function(r,e,n,l){n.addToRenderList(e);var i=r.currentContext;if(o(r,i,e,n,l)){var h=e._displayOriginX,u=e._displayOriginY,c=e.pathData,v=c.length-1,m=c[0]-h,T=c[1]-u;i.beginPath(),i.moveTo(m,T),e.closePath||(v-=2);for(var C=2;C{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(19921),p=t(39429);p.register("ellipse",function(o,s,r,e,n,l){return this.displayList.add(new a(this.scene,o,s,r,e,n,l))})},54205:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),p=a,o=a;p=t(19467),o=t(7930),d.exports={renderWebGL:p,renderCanvas:o}},19467:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(10441),p=t(91296),o=t(34682),s=function(r,e,n,l){n.addToRenderList(e);var i=r.pipelines.set(e.pipeline),h=p(e,n,l),u=i.calcMatrix.copyFrom(h.calc),c=e._displayOriginX,v=e._displayOriginY,m=n.alpha*e.alpha;r.pipelines.preBatch(e),e.isFilled&&a(i,u,e,m,c,v),e.isStroked&&o(i,e,m,c,v),r.pipelines.postBatch(e)};d.exports=s},30479:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(17803),o=t(26015),s=new a({Extends:p,Mixins:[o],initialize:function(e,n,l,i,h,u,c,v,m,T,C){n===void 0&&(n=0),l===void 0&&(l=0),i===void 0&&(i=128),h===void 0&&(h=128),u===void 0&&(u=32),c===void 0&&(c=32),p.call(this,e,"Grid",null),this.cellWidth=u,this.cellHeight=c,this.showCells=!0,this.outlineFillColor=0,this.outlineFillAlpha=0,this.showOutline=!0,this.showAltCells=!1,this.altFillColor,this.altFillAlpha,this.setPosition(n,l),this.setSize(i,h),this.setFillStyle(v,m),T!==void 0&&this.setOutlineStyle(T,C),this.updateDisplayOrigin()},setFillStyle:function(r,e){return e===void 0&&(e=1),r===void 0?this.showCells=!1:(this.fillColor=r,this.fillAlpha=e,this.showCells=!0),this},setAltFillStyle:function(r,e){return e===void 0&&(e=1),r===void 0?this.showAltCells=!1:(this.altFillColor=r,this.altFillAlpha=e,this.showAltCells=!0),this},setOutlineStyle:function(r,e){return e===void 0&&(e=1),r===void 0?this.showOutline=!1:(this.outlineFillColor=r,this.outlineFillAlpha=e,this.showOutline=!0),this}});d.exports=s},49912:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(65960),p=t(75177),o=t(20926),s=function(r,e,n,l){n.addToRenderList(e);var i=r.currentContext;if(o(r,i,e,n,l)){var h=-e._displayOriginX,u=-e._displayOriginY,c=n.alpha*e.alpha,v=e.width,m=e.height,T=e.cellWidth,C=e.cellHeight,S=Math.ceil(v/T),P=Math.ceil(m/C),A=T,L=C,F=T-(S*T-v),I=C-(P*C-m),D=e.showCells,B=e.showAltCells,G=e.showOutline,z=0,W=0,Y=0,K=0,Z=0;if(G&&(A--,L--,F===T&&F--,I===C&&I--),D&&e.fillAlpha>0)for(a(i,e),W=0;W0)for(a(i,e,e.altFillColor,e.altFillAlpha*c),W=0;W0){for(p(i,e,e.outlineFillColor,e.outlineFillAlpha*c),z=1;z{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(39429),p=t(30479);a.register("grid",function(o,s,r,e,n,l,i,h,u,c){return this.displayList.add(new p(this.scene,o,s,r,e,n,l,i,h,u,c))})},26015:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),p=a,o=a;p=t(46161),o=t(49912),d.exports={renderWebGL:p,renderCanvas:o}},46161:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(91296),p=t(70554),o=function(s,r,e,n){e.addToRenderList(r);var l=s.pipelines.set(r.pipeline),i=a(r,e,n),h=l.calcMatrix.copyFrom(i.calc);h.translate(-r._displayOriginX,-r._displayOriginY);var u=e.alpha*r.alpha,c=r.width,v=r.height,m=r.cellWidth,T=r.cellHeight,C=Math.ceil(c/m),S=Math.ceil(v/T),P=m,A=T,L=m-(C*m-c),F=T-(S*T-v),I,D,B=r.showCells,G=r.showAltCells,z=r.showOutline,W=0,Y=0,K=0,Z=0,V=0;if(z&&(P--,A--,L===m&&L--,F===T&&F--),s.pipelines.preBatch(r),B&&r.fillAlpha>0)for(I=l.fillTint,D=p.getTintAppendFloatAlpha(r.fillColor,r.fillAlpha*u),I.TL=D,I.TR=D,I.BL=D,I.BR=D,Y=0;Y0)for(I=l.fillTint,D=p.getTintAppendFloatAlpha(r.altFillColor,r.altFillAlpha*u),I.TL=D,I.TR=D,I.BL=D,I.BR=D,Y=0;Y0){var H=l.strokeTint,N=p.getTintAppendFloatAlpha(r.outlineFillColor,r.outlineFillAlpha*u);for(H.TL=N,H.TR=N,H.BL=N,H.BR=N,W=1;W{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(99651),p=t(83419),o=t(17803),s=new p({Extends:o,Mixins:[a],initialize:function(e,n,l,i,h,u,c,v){n===void 0&&(n=0),l===void 0&&(l=0),i===void 0&&(i=48),h===void 0&&(h=32),u===void 0&&(u=15658734),c===void 0&&(c=10066329),v===void 0&&(v=13421772),o.call(this,e,"IsoBox",null),this.projection=4,this.fillTop=u,this.fillLeft=c,this.fillRight=v,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isFilled=!0,this.setPosition(n,l),this.setSize(i,h),this.updateDisplayOrigin()},setProjection:function(r){return this.projection=r,this},setFaces:function(r,e,n){return r===void 0&&(r=!0),e===void 0&&(e=!0),n===void 0&&(n=!0),this.showTop=r,this.showLeft=e,this.showRight=n,this},setFillStyle:function(r,e,n){return this.fillTop=r,this.fillLeft=e,this.fillRight=n,this.isFilled=!0,this}});d.exports=s},11508:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(65960),p=t(20926),o=function(s,r,e,n){e.addToRenderList(r);var l=s.currentContext;if(p(s,l,r,e,n)&&r.isFilled){var i=r.width,h=r.height,u=i/2,c=i/r.projection;r.showTop&&(a(l,r,r.fillTop),l.beginPath(),l.moveTo(-u,-h),l.lineTo(0,-c-h),l.lineTo(u,-h),l.lineTo(u,-1),l.lineTo(0,c-1),l.lineTo(-u,-1),l.lineTo(-u,-h),l.fill()),r.showLeft&&(a(l,r,r.fillLeft),l.beginPath(),l.moveTo(-u,0),l.lineTo(0,c),l.lineTo(0,c-h),l.lineTo(-u,-h),l.lineTo(-u,0),l.fill()),r.showRight&&(a(l,r,r.fillRight),l.beginPath(),l.moveTo(u,0),l.lineTo(0,c),l.lineTo(0,c-h),l.lineTo(u,-h),l.lineTo(u,0),l.fill()),l.restore()}};d.exports=o},3933:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(39429),p=t(61475);a.register("isobox",function(o,s,r,e,n,l,i){return this.displayList.add(new p(this.scene,o,s,r,e,n,l,i))})},99651:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),p=a,o=a;p=t(68149),o=t(11508),d.exports={renderWebGL:p,renderCanvas:o}},68149:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(91296),p=t(70554),o=function(s,r,e,n){e.addToRenderList(r);var l=s.pipelines.set(r.pipeline),i=a(r,e,n),h=l.calcMatrix.copyFrom(i.calc),u=r.width,c=r.height,v=u/2,m=u/r.projection,T=e.alpha*r.alpha;if(r.isFilled){var C,S,P,A,L,F,I,D,B;s.pipelines.preBatch(r),r.showTop&&(C=p.getTintAppendFloatAlpha(r.fillTop,T),S=h.getX(-v,-c),P=h.getY(-v,-c),A=h.getX(0,-m-c),L=h.getY(0,-m-c),F=h.getX(v,-c),I=h.getY(v,-c),D=h.getX(0,m-c),B=h.getY(0,m-c),l.batchQuad(r,S,P,A,L,F,I,D,B,0,0,1,1,C,C,C,C,2)),r.showLeft&&(C=p.getTintAppendFloatAlpha(r.fillLeft,T),S=h.getX(-v,0),P=h.getY(-v,0),A=h.getX(0,m),L=h.getY(0,m),F=h.getX(0,m-c),I=h.getY(0,m-c),D=h.getX(-v,-c),B=h.getY(-v,-c),l.batchQuad(r,S,P,A,L,F,I,D,B,0,0,1,1,C,C,C,C,2)),r.showRight&&(C=p.getTintAppendFloatAlpha(r.fillRight,T),S=h.getX(v,0),P=h.getY(v,0),A=h.getX(0,m),L=h.getY(0,m),F=h.getX(0,m-c),I=h.getY(0,m-c),D=h.getX(v,-c),B=h.getY(v,-c),l.batchQuad(r,S,P,A,L,F,I,D,B,0,0,1,1,C,C,C,C,2)),s.pipelines.postBatch(r)}};d.exports=o},16933:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(60561),o=t(17803),s=new a({Extends:o,Mixins:[p],initialize:function(e,n,l,i,h,u,c,v,m){n===void 0&&(n=0),l===void 0&&(l=0),i===void 0&&(i=48),h===void 0&&(h=32),u===void 0&&(u=!1),c===void 0&&(c=15658734),v===void 0&&(v=10066329),m===void 0&&(m=13421772),o.call(this,e,"IsoTriangle",null),this.projection=4,this.fillTop=c,this.fillLeft=v,this.fillRight=m,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isReversed=u,this.isFilled=!0,this.setPosition(n,l),this.setSize(i,h),this.updateDisplayOrigin()},setProjection:function(r){return this.projection=r,this},setReversed:function(r){return this.isReversed=r,this},setFaces:function(r,e,n){return r===void 0&&(r=!0),e===void 0&&(e=!0),n===void 0&&(n=!0),this.showTop=r,this.showLeft=e,this.showRight=n,this},setFillStyle:function(r,e,n){return this.fillTop=r,this.fillLeft=e,this.fillRight=n,this.isFilled=!0,this}});d.exports=s},79590:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(65960),p=t(20926),o=function(s,r,e,n){e.addToRenderList(r);var l=s.currentContext;if(p(s,l,r,e,n)&&r.isFilled){var i=r.width,h=r.height,u=i/2,c=i/r.projection,v=r.isReversed;r.showTop&&v&&(a(l,r,r.fillTop),l.beginPath(),l.moveTo(-u,-h),l.lineTo(0,-c-h),l.lineTo(u,-h),l.lineTo(0,c-h),l.fill()),r.showLeft&&(a(l,r,r.fillLeft),l.beginPath(),v?(l.moveTo(-u,-h),l.lineTo(0,c),l.lineTo(0,c-h)):(l.moveTo(-u,0),l.lineTo(0,c),l.lineTo(0,c-h)),l.fill()),r.showRight&&(a(l,r,r.fillRight),l.beginPath(),v?(l.moveTo(u,-h),l.lineTo(0,c),l.lineTo(0,c-h)):(l.moveTo(u,0),l.lineTo(0,c),l.lineTo(0,c-h)),l.fill()),l.restore()}};d.exports=o},49803:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(39429),p=t(16933);a.register("isotriangle",function(o,s,r,e,n,l,i,h){return this.displayList.add(new p(this.scene,o,s,r,e,n,l,i,h))})},60561:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),p=a,o=a;p=t(51503),o=t(79590),d.exports={renderWebGL:p,renderCanvas:o}},51503:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(91296),p=t(70554),o=function(s,r,e,n){e.addToRenderList(r);var l=s.pipelines.set(r.pipeline),i=a(r,e,n),h=l.calcMatrix.copyFrom(i.calc),u=r.width,c=r.height,v=u/2,m=u/r.projection,T=r.isReversed,C=e.alpha*r.alpha;if(r.isFilled){s.pipelines.preBatch(r);var S,P,A,L,F,I,D;if(r.showTop&&T){S=p.getTintAppendFloatAlpha(r.fillTop,C),P=h.getX(-v,-c),A=h.getY(-v,-c),L=h.getX(0,-m-c),F=h.getY(0,-m-c),I=h.getX(v,-c),D=h.getY(v,-c);var B=h.getX(0,m-c),G=h.getY(0,m-c);l.batchQuad(r,P,A,L,F,I,D,B,G,0,0,1,1,S,S,S,S,2)}r.showLeft&&(S=p.getTintAppendFloatAlpha(r.fillLeft,C),T?(P=h.getX(-v,-c),A=h.getY(-v,-c),L=h.getX(0,m),F=h.getY(0,m),I=h.getX(0,m-c),D=h.getY(0,m-c)):(P=h.getX(-v,0),A=h.getY(-v,0),L=h.getX(0,m),F=h.getY(0,m),I=h.getX(0,m-c),D=h.getY(0,m-c)),l.batchTri(r,P,A,L,F,I,D,0,0,1,1,S,S,S,2)),r.showRight&&(S=p.getTintAppendFloatAlpha(r.fillRight,C),T?(P=h.getX(v,-c),A=h.getY(v,-c),L=h.getX(0,m),F=h.getY(0,m),I=h.getX(0,m-c),D=h.getY(0,m-c)):(P=h.getX(v,0),A=h.getY(v,0),L=h.getX(0,m),F=h.getY(0,m),I=h.getX(0,m-c),D=h.getY(0,m-c)),l.batchTri(r,P,A,L,F,I,D,0,0,1,1,S,S,S,2)),s.pipelines.postBatch(r)}};d.exports=o},57847:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(17803),o=t(23031),s=t(36823),r=new a({Extends:p,Mixins:[s],initialize:function(n,l,i,h,u,c,v,m,T){l===void 0&&(l=0),i===void 0&&(i=0),h===void 0&&(h=0),u===void 0&&(u=0),c===void 0&&(c=128),v===void 0&&(v=0),p.call(this,n,"Line",new o(h,u,c,v));var C=Math.max(1,this.geom.right-this.geom.left),S=Math.max(1,this.geom.bottom-this.geom.top);this.lineWidth=1,this._startWidth=1,this._endWidth=1,this.setPosition(l,i),this.setSize(C,S),m!==void 0&&this.setStrokeStyle(1,m,T),this.updateDisplayOrigin()},setLineWidth:function(e,n){return n===void 0&&(n=e),this._startWidth=e,this._endWidth=n,this.lineWidth=e,this},setTo:function(e,n,l,i){return this.geom.setTo(e,n,l,i),this}});d.exports=r},17440:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(75177),p=t(20926),o=function(s,r,e,n){e.addToRenderList(r);var l=s.currentContext;if(p(s,l,r,e,n)){var i=r._displayOriginX,h=r._displayOriginY;r.isStroked&&(a(l,r),l.beginPath(),l.moveTo(r.geom.x1-i,r.geom.y1-h),l.lineTo(r.geom.x2-i,r.geom.y2-h),l.stroke()),l.restore()}};d.exports=o},2481:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(39429),p=t(57847);a.register("line",function(o,s,r,e,n,l,i,h){return this.displayList.add(new p(this.scene,o,s,r,e,n,l,i,h))})},36823:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),p=a,o=a;p=t(77385),o=t(17440),d.exports={renderWebGL:p,renderCanvas:o}},77385:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(91296),p=t(70554),o=function(s,r,e,n){e.addToRenderList(r);var l=s.pipelines.set(r.pipeline),i=a(r,e,n);l.calcMatrix.copyFrom(i.calc);var h=r._displayOriginX,u=r._displayOriginY,c=e.alpha*r.alpha;if(s.pipelines.preBatch(r),r.isStroked){var v=l.strokeTint,m=p.getTintAppendFloatAlpha(r.strokeColor,r.strokeAlpha*c);v.TL=m,v.TR=m,v.BL=m,v.BR=m,l.batchLine(r.geom.x1-h,r.geom.y1-u,r.geom.x2-h,r.geom.y2-u,r._startWidth/2,r._endWidth/2,1,0,!1,i.sprite,i.camera)}s.pipelines.postBatch(r)};d.exports=o},24949:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(90273),p=t(83419),o=t(94811),s=t(13829),r=t(25717),e=t(17803),n=t(5469),l=new p({Extends:e,Mixins:[a],initialize:function(h,u,c,v,m,T){u===void 0&&(u=0),c===void 0&&(c=0),e.call(this,h,"Polygon",new r(v));var C=s(this.geom);this.setPosition(u,c),this.setSize(C.width,C.height),m!==void 0&&this.setFillStyle(m,T),this.updateDisplayOrigin(),this.updateData()},smooth:function(i){i===void 0&&(i=1);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(65960),p=t(75177),o=t(20926),s=function(r,e,n,l){n.addToRenderList(e);var i=r.currentContext;if(o(r,i,e,n,l)){var h=e._displayOriginX,u=e._displayOriginY,c=e.pathData,v=c.length-1,m=c[0]-h,T=c[1]-u;i.beginPath(),i.moveTo(m,T),e.closePath||(v-=2);for(var C=2;C{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(39429),p=t(24949);a.register("polygon",function(o,s,r,e,n){return this.displayList.add(new p(this.scene,o,s,r,e,n))})},90273:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),p=a,o=a;p=t(73695),o=t(38710),d.exports={renderWebGL:p,renderCanvas:o}},73695:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(10441),p=t(91296),o=t(34682),s=function(r,e,n,l){n.addToRenderList(e);var i=r.pipelines.set(e.pipeline),h=p(e,n,l),u=i.calcMatrix.copyFrom(h.calc),c=e._displayOriginX,v=e._displayOriginY,m=n.alpha*e.alpha;r.pipelines.preBatch(e),e.isFilled&&a(i,u,e,m,c,v),e.isStroked&&o(i,e,m,c,v),r.pipelines.postBatch(e)};d.exports=s},74561:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(87841),o=t(17803),s=t(95597),r=new a({Extends:o,Mixins:[s],initialize:function(n,l,i,h,u,c,v){l===void 0&&(l=0),i===void 0&&(i=0),h===void 0&&(h=128),u===void 0&&(u=128),o.call(this,n,"Rectangle",new p(0,0,h,u)),this.setPosition(l,i),this.setSize(h,u),c!==void 0&&this.setFillStyle(c,v),this.updateDisplayOrigin(),this.updateData()},setSize:function(e,n){this.width=e,this.height=n,this.geom.setSize(e,n),this.updateData(),this.updateDisplayOrigin();var l=this.input;return l&&!l.customHitArea&&(l.hitArea.width=e,l.hitArea.height=n),this},updateData:function(){var e=[],n=this.geom,l=this._tempLine;return n.getLineA(l),e.push(l.x1,l.y1,l.x2,l.y2),n.getLineB(l),e.push(l.x2,l.y2),n.getLineC(l),e.push(l.x2,l.y2),n.getLineD(l),e.push(l.x2,l.y2),this.pathData=e,this}});d.exports=r},48682:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(65960),p=t(75177),o=t(20926),s=function(r,e,n,l){n.addToRenderList(e);var i=r.currentContext;if(o(r,i,e,n,l)){var h=e._displayOriginX,u=e._displayOriginY;e.isFilled&&(a(i,e),i.fillRect(-h,-u,e.width,e.height)),e.isStroked&&(p(i,e),i.beginPath(),i.rect(-h,-u,e.width,e.height),i.stroke()),i.restore()}};d.exports=s},87959:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(39429),p=t(74561);a.register("rectangle",function(o,s,r,e,n,l){return this.displayList.add(new p(this.scene,o,s,r,e,n,l))})},95597:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),p=a,o=a;p=t(52059),o=t(48682),d.exports={renderWebGL:p,renderCanvas:o}},52059:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(91296),p=t(34682),o=t(70554),s=function(r,e,n,l){n.addToRenderList(e);var i=r.pipelines.set(e.pipeline),h=a(e,n,l);i.calcMatrix.copyFrom(h.calc);var u=e._displayOriginX,c=e._displayOriginY,v=n.alpha*e.alpha;if(r.pipelines.preBatch(e),e.isFilled){var m=i.fillTint,T=o.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*v);m.TL=T,m.TR=T,m.BL=T,m.BR=T,i.batchFillRect(-u,-c,e.width,e.height)}e.isStroked&&p(i,e,v,u,c),r.pipelines.postBatch(e)};d.exports=s},55911:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(81991),p=t(83419),o=t(94811),s=t(17803),r=new p({Extends:s,Mixins:[a],initialize:function(n,l,i,h,u,c,v,m){l===void 0&&(l=0),i===void 0&&(i=0),h===void 0&&(h=5),u===void 0&&(u=32),c===void 0&&(c=64),s.call(this,n,"Star",null),this._points=h,this._innerRadius=u,this._outerRadius=c,this.setPosition(l,i),this.setSize(c*2,c*2),v!==void 0&&this.setFillStyle(v,m),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=[],n=this._points,l=this._innerRadius,i=this._outerRadius,h=Math.PI/2*3,u=Math.PI/n,c=i,v=i;e.push(c,v+-i);for(var m=0;m{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(65960),p=t(75177),o=t(20926),s=function(r,e,n,l){n.addToRenderList(e);var i=r.currentContext;if(o(r,i,e,n,l)){var h=e._displayOriginX,u=e._displayOriginY,c=e.pathData,v=c.length-1,m=c[0]-h,T=c[1]-u;i.beginPath(),i.moveTo(m,T),e.closePath||(v-=2);for(var C=2;C{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(55911),p=t(39429);p.register("star",function(o,s,r,e,n,l,i){return this.displayList.add(new a(this.scene,o,s,r,e,n,l,i))})},81991:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),p=a,o=a;p=t(57017),o=t(64272),d.exports={renderWebGL:p,renderCanvas:o}},57017:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(10441),p=t(91296),o=t(34682),s=function(r,e,n,l){n.addToRenderList(e);var i=r.pipelines.set(e.pipeline),h=p(e,n,l),u=i.calcMatrix.copyFrom(h.calc),c=e._displayOriginX,v=e._displayOriginY,m=n.alpha*e.alpha;r.pipelines.preBatch(e),e.isFilled&&a(i,u,e,m,c,v),e.isStroked&&o(i,e,m,c,v),r.pipelines.postBatch(e)};d.exports=s},36931:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(17803),o=t(16483),s=t(96195),r=new a({Extends:p,Mixins:[s],initialize:function(n,l,i,h,u,c,v,m,T,C,S){l===void 0&&(l=0),i===void 0&&(i=0),h===void 0&&(h=0),u===void 0&&(u=128),c===void 0&&(c=64),v===void 0&&(v=0),m===void 0&&(m=128),T===void 0&&(T=128),p.call(this,n,"Triangle",new o(h,u,c,v,m,T));var P=this.geom.right-this.geom.left,A=this.geom.bottom-this.geom.top;this.setPosition(l,i),this.setSize(P,A),C!==void 0&&this.setFillStyle(C,S),this.updateDisplayOrigin(),this.updateData()},setTo:function(e,n,l,i,h,u){return this.geom.setTo(e,n,l,i,h,u),this.updateData()},updateData:function(){var e=[],n=this.geom,l=this._tempLine;return n.getLineA(l),e.push(l.x1,l.y1,l.x2,l.y2),n.getLineB(l),e.push(l.x2,l.y2),n.getLineC(l),e.push(l.x2,l.y2),this.pathData=e,this}});d.exports=r},85172:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(65960),p=t(75177),o=t(20926),s=function(r,e,n,l){n.addToRenderList(e);var i=r.currentContext;if(o(r,i,e,n,l)){var h=e._displayOriginX,u=e._displayOriginY,c=e.geom.x1-h,v=e.geom.y1-u,m=e.geom.x2-h,T=e.geom.y2-u,C=e.geom.x3-h,S=e.geom.y3-u;i.beginPath(),i.moveTo(c,v),i.lineTo(m,T),i.lineTo(C,S),i.closePath(),e.isFilled&&(a(i,e),i.fill()),e.isStroked&&(p(i,e),i.stroke()),i.restore()}};d.exports=s},45245:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(39429),p=t(36931);a.register("triangle",function(o,s,r,e,n,l,i,h,u,c){return this.displayList.add(new p(this.scene,o,s,r,e,n,l,i,h,u,c))})},96195:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),p=a,o=a;p=t(83253),o=t(85172),d.exports={renderWebGL:p,renderCanvas:o}},83253:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(91296),p=t(34682),o=t(70554),s=function(r,e,n,l){n.addToRenderList(e);var i=r.pipelines.set(e.pipeline),h=a(e,n,l);i.calcMatrix.copyFrom(h.calc);var u=e._displayOriginX,c=e._displayOriginY,v=n.alpha*e.alpha;if(r.pipelines.preBatch(e),e.isFilled){var m=i.fillTint,T=o.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*v);m.TL=T,m.TR=T,m.BL=T,m.BR=T;var C=e.geom.x1-u,S=e.geom.y1-c,P=e.geom.x2-u,A=e.geom.y2-c,L=e.geom.x3-u,F=e.geom.y3-c;i.batchFillTriangle(C,S,P,A,L,F,h.sprite,h.camera)}e.isStroked&&p(i,e,v,u,c),r.pipelines.postBatch(e)};d.exports=s},68287:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(9674),p=t(83419),o=t(31401),s=t(95643),r=t(92751),e=new p({Extends:s,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,r],initialize:function(l,i,h,u,c){s.call(this,l,"Sprite"),this._crop=this.resetCropObject(),this.anims=new a(this),this.setTexture(u,c),this.setPosition(i,h),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(n,l){this.anims.update(n,l)},play:function(n,l){return this.anims.play(n,l)},playReverse:function(n,l){return this.anims.playReverse(n,l)},playAfterDelay:function(n,l){return this.anims.playAfterDelay(n,l)},playAfterRepeat:function(n,l){return this.anims.playAfterRepeat(n,l)},chain:function(n){return this.anims.chain(n)},stop:function(){return this.anims.stop()},stopAfterDelay:function(n){return this.anims.stopAfterDelay(n)},stopAfterRepeat:function(n){return this.anims.stopAfterRepeat(n)},stopOnFrame:function(n){return this.anims.stopOnFrame(n)},toJSON:function(){return o.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}});d.exports=e},76552:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p,o){p.addToRenderList(a),t.batchSprite(a,a.frame,p,o)};d.exports=x},15567:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(25305),p=t(13059),o=t(44603),s=t(23568),r=t(68287);o.register("sprite",function(e,n){e===void 0&&(e={});var l=s(e,"key",null),i=s(e,"frame",null),h=new r(this.scene,0,0,l,i);return n!==void 0&&(e.add=n),a(this.scene,h,e),p(h,e),h})},46409:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(39429),p=t(68287);a.register("sprite",function(o,s,r,e){return this.displayList.add(new p(this.scene,o,s,r,e))})},92751:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),p=a,o=a;p=t(9409),o=t(76552),d.exports={renderWebGL:p,renderCanvas:o}},9409:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p,o){p.addToRenderList(a),a.pipeline.batchSprite(a,p,o)};d.exports=x},14220:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){var o=t.canvas,s=t.context,r=t.style,e=[],n=0,l=p.length;r.maxLines>0&&r.maxLines1&&(h+=t.letterSpacing*(p[i].length-1)),r.wordWrap&&(h-=s.measureText(" ").width),e[i]=Math.ceil(h),n=Math.max(n,e[i])}var u=a.fontSize+r.strokeThickness,c=u*l,v=t.lineSpacing;return l>1&&(c+=v*(l-1)),{width:n,height:c,lines:l,lineWidths:e,lineSpacing:v,lineHeight:u}};d.exports=x},79557:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(27919),p=function(o){var s=a.create(this),r=s.getContext("2d",{willReadFrequently:!0});o.syncFont(s,r);var e=r.measureText(o.testString);if("actualBoundingBoxAscent"in e){var n=e.actualBoundingBoxAscent,l=e.actualBoundingBoxDescent;return a.remove(s),{ascent:n,descent:l,fontSize:n+l}}var i=Math.ceil(e.width*o.baselineX),h=i,u=2*h;h=h*o.baselineY|0,s.width=i,s.height=u,r.fillStyle="#f00",r.fillRect(0,0,i,u),r.font=o._font,r.textBaseline="alphabetic",r.fillStyle="#000",r.fillText(o.testString,0,h);var c={ascent:0,descent:0,fontSize:0},v=r.getImageData(0,0,i,u);if(!v)return c.ascent=h,c.descent=h+6,c.fontSize=c.ascent+c.descent,a.remove(s),c;var m=v.data,T=m.length,C=i*4,S,P,A=0,L=!1;for(S=0;Sh;S--){for(P=0;P{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(40366),p=t(27919),o=t(83419),s=t(31401),r=t(95643),e=t(14220),n=t(35154),l=t(35846),i=t(61771),h=t(35762),u=t(45650),c=new o({Extends:r,Mixins:[s.Alpha,s.BlendMode,s.ComputedSize,s.Crop,s.Depth,s.Flip,s.GetBounds,s.Mask,s.Origin,s.Pipeline,s.PostPipeline,s.ScrollFactor,s.Tint,s.Transform,s.Visible,i],initialize:function(m,T,C,S,P){T===void 0&&(T=0),C===void 0&&(C=0),r.call(this,m,"Text"),this.renderer=m.sys.renderer,this.setPosition(T,C),this.setOrigin(0,0),this.initPipeline(),this.initPostPipeline(!0),this.canvas=p.create(this),this.context,this.style=new h(this,P),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=u(),this.texture=m.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(S),P&&P.padding&&this.setPadding(P.padding),P&&P.lineSpacing&&this.setLineSpacing(P.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(v){var m=this.style;if(m.wordWrapCallback){var T=m.wordWrapCallback.call(m.wordWrapCallbackScope,v,this);return Array.isArray(T)&&(T=T.join(` +`)),T}else return m.wordWrapWidth?m.wordWrapUseAdvanced?this.advancedWordWrap(v,this.context,this.style.wordWrapWidth):this.basicWordWrap(v,this.context,this.style.wordWrapWidth):v},advancedWordWrap:function(v,m,T){for(var C="",S=v.replace(/ +/gi," ").split(this.splitRegExp),P=S.length,A=0;AD){if(G===0){for(var K=W;K.length&&(K=K.slice(0,-1),Y=m.measureText(K).width,!(Y<=D)););if(!K.length)throw new Error("wordWrapWidth < a single character");var Z=z.substr(K.length);B[G]=Z,F+=K}var V=B[G].length?G:G+1,H=B.slice(V).join(" ").replace(/[ \n]*$/gi,"");S.splice(A+1,0,H),P=S.length;break}else F+=W,D-=Y}C+=F.replace(/[ \n]*$/gi,"")+` +`}return C=C.replace(/[\s|\n]*$/gi,""),C},basicWordWrap:function(v,m,T){for(var C="",S=v.split(this.splitRegExp),P=S.length-1,A=m.measureText(" ").width,L=0;L<=P;L++){for(var F=T,I=S[L].split(" "),D=I.length-1,B=0;B<=D;B++){var G=I[B],z=m.measureText(G).width,W=z;BF&&B>0&&(C+=` +`,F=T),C+=G,B0&&(z+=L.lineSpacing*W),T.rtl)G=D-G-F.left-F.right;else if(T.align==="right")G+=I-L.lineWidths[W];else if(T.align==="center")G+=(I-L.lineWidths[W])/2;else if(T.align==="justify"){var Y=.85;if(L.lineWidths[W]/L.width>=Y){var K=L.width-L.lineWidths[W],Z=m.measureText(" ").width,V=A[W].trim(),H=V.split(" ");K+=(A[W].length-V.length)*Z;for(var N=Math.floor(K/Z),U=0;N>0;)H[U]+=" ",U=(U+1)%(H.length-1||1),--N;A[W]=H.join(" ")}}if(this.autoRound&&(G=Math.round(G),z=Math.round(z)),T.strokeThickness&&(T.syncShadow(m,T.shadowStroke),m.strokeText(A[W],G,z)),T.color){T.syncShadow(m,T.shadowFill);var X=this.letterSpacing;if(X!==0)for(var $=0,k=A[W].split(""),Q=0;Q{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p,o){a.width===0||a.height===0||(p.addToRenderList(a),t.batchSprite(a,a.frame,p,o))};d.exports=x},71259:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(25305),p=t(44603),o=t(23568),s=t(50171);p.register("text",function(r,e){r===void 0&&(r={});var n=o(r,"text",""),l=o(r,"style",null),i=o(r,"padding",null);i!==null&&(l.padding=i);var h=new s(this.scene,0,0,n,l);return e!==void 0&&(r.add=e),a(this.scene,h,r),h.autoRound=o(r,"autoRound",!0),h.resolution=o(r,"resolution",1),h})},68005:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(50171),p=t(39429);p.register("text",function(o,s,r,e){return this.displayList.add(new a(this.scene,o,s,r,e))})},61771:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),p=a,o=a;p=t(34397),o=t(79724),d.exports={renderWebGL:p,renderCanvas:o}},35762:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(23568),o=t(35154),s=t(79557),r={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(l,i){this.parent=l,this.fontFamily,this.fontSize,this.fontStyle,this.backgroundColor,this.color,this.stroke,this.strokeThickness,this.shadowOffsetX,this.shadowOffsetY,this.shadowColor,this.shadowBlur,this.shadowStroke,this.shadowFill,this.align,this.maxLines,this.fixedWidth,this.fixedHeight,this.resolution,this.rtl,this.testString,this.baselineX,this.baselineY,this.wordWrapWidth,this.wordWrapCallback,this.wordWrapCallbackScope,this.wordWrapUseAdvanced,this._font,this.setStyle(i,!1,!0)},setStyle:function(n,l,i){l===void 0&&(l=!0),i===void 0&&(i=!1),n&&n.hasOwnProperty("fontSize")&&typeof n.fontSize=="number"&&(n.fontSize=n.fontSize.toString()+"px");for(var h in r){var u=i?r[h][1]:this[h];h==="wordWrapCallback"||h==="wordWrapCallbackScope"?this[h]=o(n,r[h][0],u):this[h]=p(n,r[h][0],u)}var c=o(n,"font",null);c!==null&&this.setFont(c,!1),this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim();var v=o(n,"fill",null);v!==null&&(this.color=v);var m=o(n,"metrics",!1);return m?this.metrics={ascent:o(m,"ascent",0),descent:o(m,"descent",0),fontSize:o(m,"fontSize",0)}:(l||!this.metrics)&&(this.metrics=s(this)),l?this.parent.updateText():this.parent},syncFont:function(n,l){l.font=this._font},syncStyle:function(n,l){l.textBaseline="alphabetic",l.fillStyle=this.color,l.strokeStyle=this.stroke,l.lineWidth=this.strokeThickness,l.lineCap="round",l.lineJoin="round"},syncShadow:function(n,l){l?(n.shadowOffsetX=this.shadowOffsetX,n.shadowOffsetY=this.shadowOffsetY,n.shadowColor=this.shadowColor,n.shadowBlur=this.shadowBlur):(n.shadowOffsetX=0,n.shadowOffsetY=0,n.shadowColor=0,n.shadowBlur=0)},update:function(n){return n&&(this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim(),this.metrics=s(this)),this.parent.updateText()},setFont:function(n,l){l===void 0&&(l=!0);var i=n,h="",u="";if(typeof n!="string")i=o(n,"fontFamily","Courier"),h=o(n,"fontSize","16px"),u=o(n,"fontStyle","");else{var c=n.split(" "),v=0;u=c.length>2?c[v++]:"",h=c[v++]||"16px",i=c[v++]||"Courier"}return(i!==this.fontFamily||h!==this.fontSize||u!==this.fontStyle)&&(this.fontFamily=i,this.fontSize=h,this.fontStyle=u,l&&this.update(!0)),this.parent},setFontFamily:function(n){return this.fontFamily!==n&&(this.fontFamily=n,this.update(!0)),this.parent},setFontStyle:function(n){return this.fontStyle!==n&&(this.fontStyle=n,this.update(!0)),this.parent},setFontSize:function(n){return typeof n=="number"&&(n=n.toString()+"px"),this.fontSize!==n&&(this.fontSize=n,this.update(!0)),this.parent},setTestString:function(n){return this.testString=n,this.update(!0)},setFixedSize:function(n,l){return this.fixedWidth=n,this.fixedHeight=l,n&&(this.parent.width=n),l&&(this.parent.height=l),this.update(!1)},setBackgroundColor:function(n){return this.backgroundColor=n,this.update(!1)},setFill:function(n){return this.color=n,this.update(!1)},setColor:function(n){return this.color=n,this.update(!1)},setResolution:function(n){return this.resolution=n,this.update(!1)},setStroke:function(n,l){return l===void 0&&(l=this.strokeThickness),n===void 0&&this.strokeThickness!==0?(this.strokeThickness=0,this.update(!0)):(this.stroke!==n||this.strokeThickness!==l)&&(this.stroke=n,this.strokeThickness=l,this.update(!0)),this.parent},setShadow:function(n,l,i,h,u,c){return n===void 0&&(n=0),l===void 0&&(l=0),i===void 0&&(i="#000"),h===void 0&&(h=0),u===void 0&&(u=!1),c===void 0&&(c=!0),this.shadowOffsetX=n,this.shadowOffsetY=l,this.shadowColor=i,this.shadowBlur=h,this.shadowStroke=u,this.shadowFill=c,this.update(!1)},setShadowOffset:function(n,l){return n===void 0&&(n=0),l===void 0&&(l=n),this.shadowOffsetX=n,this.shadowOffsetY=l,this.update(!1)},setShadowColor:function(n){return n===void 0&&(n="#000"),this.shadowColor=n,this.update(!1)},setShadowBlur:function(n){return n===void 0&&(n=0),this.shadowBlur=n,this.update(!1)},setShadowStroke:function(n){return this.shadowStroke=n,this.update(!1)},setShadowFill:function(n){return this.shadowFill=n,this.update(!1)},setWordWrapWidth:function(n,l){return l===void 0&&(l=!1),this.wordWrapWidth=n,this.wordWrapUseAdvanced=l,this.update(!1)},setWordWrapCallback:function(n,l){return l===void 0&&(l=null),this.wordWrapCallback=n,this.wordWrapCallbackScope=l,this.update(!1)},setAlign:function(n){return n===void 0&&(n="left"),this.align=n,this.update(!1)},setMaxLines:function(n){return n===void 0&&(n=0),this.maxLines=n,this.update(!1)},getTextMetrics:function(){var n=this.metrics;return{ascent:n.ascent,descent:n.descent,fontSize:n.fontSize}},toJSON:function(){var n={};for(var l in r)n[l]=this[l];return n.metrics=this.getTextMetrics(),n},destroy:function(){this.parent=void 0}});d.exports=e},34397:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(70554),p=function(o,s,r,e){if(!(s.width===0||s.height===0)){r.addToRenderList(s);var n=s.frame,l=n.width,i=n.height,h=a.getTintAppendFloatAlpha,u=o.pipelines.set(s.pipeline,s),c=u.setTexture2D(n.glTexture,s);u.batchTexture(s,n.glTexture,l,i,s.x,s.y,l/s.style.resolution,i/s.style.resolution,s.scaleX,s.scaleY,s.rotation,s.flipX,s.flipY,s.scrollFactorX,s.scrollFactorY,s.displayOriginX,s.displayOriginY,0,0,l,i,h(s.tintTopLeft,r.alpha*s._alphaTL),h(s.tintTopRight,r.alpha*s._alphaTR),h(s.tintBottomLeft,r.alpha*s._alphaBL),h(s.tintBottomRight,r.alpha*s._alphaBR),s.tintFill,0,0,r,e,!1,c)}};d.exports=p},20839:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(27919),p=t(83419),o=t(31401),s=t(95643),r=t(98439),e=t(68703),n=t(56295),l=t(45650),i=t(26099),h=8,u=new p({Extends:s,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,n],initialize:function(v,m,T,C,S,P,A){var L=v.sys.renderer;s.call(this,v,"TileSprite");var F=v.sys.textures.get(P),I=F.get(A);I.source.compressionAlgorithm&&(console.warn("TileSprite cannot use compressed texture"),F=v.sys.textures.get("__MISSING"),I=F.get()),F.type==="DynamicTexture"&&(console.warn("TileSprite cannot use Dynamic Texture"),F=v.sys.textures.get("__MISSING"),I=F.get()),!C||!S?(C=I.width,S=I.height):(C=Math.floor(C),S=Math.floor(S)),this._tilePosition=new i,this._tileScale=new i(1,1),this.dirty=!1,this.renderer=L,this.canvas=a.create(this,C,S),this.context=this.canvas.getContext("2d",{willReadFrequently:!1}),this.displayTexture=F,this.displayFrame=I,this._crop=this.resetCropObject(),this._textureKey=l(),this.texture=v.sys.textures.addCanvas(this._textureKey,this.canvas),this.frame=this.texture.get(),this.potWidth=r(I.width),this.potHeight=r(I.height),this.fillCanvas=a.create2D(this,this.potWidth,this.potHeight),this.fillContext=this.fillCanvas.getContext("2d",{willReadFrequently:!1}),this.fillPattern=null,this.setPosition(m,T),this.setSize(C,S),this.setFrame(A),this.setOriginFromFrame(),this.initPipeline(),this.initPostPipeline(!0)},setTexture:function(c,v){return this.displayTexture=this.scene.sys.textures.get(c),this.setFrame(v)},setFrame:function(c){var v=this.displayTexture.get(c);return this.potWidth=r(v.width),this.potHeight=r(v.height),this.canvas.width=0,!v.cutWidth||!v.cutHeight?this.renderFlags&=~h:this.renderFlags|=h,this.displayFrame=v,this.dirty=!0,this.updateTileTexture(),this},setTilePosition:function(c,v){return c!==void 0&&(this.tilePositionX=c),v!==void 0&&(this.tilePositionY=v),this},setTileScale:function(c,v){return c===void 0&&(c=this.tileScaleX),v===void 0&&(v=c),this.tileScaleX=c,this.tileScaleY=v,this},updateTileTexture:function(){if(!(!this.dirty||!this.renderer)){var c=this.displayFrame;if(c.source.isRenderTexture||c.source.isGLTexture){console.warn("TileSprites can only use Image or Canvas based textures"),this.dirty=!1;return}var v=this.fillContext,m=this.fillCanvas,T=this.potWidth,C=this.potHeight;(!this.renderer||!this.renderer.gl)&&(T=c.cutWidth,C=c.cutHeight),v.clearRect(0,0,T,C),m.width=T,m.height=C,v.drawImage(c.source.image,c.cutX,c.cutY,c.cutWidth,c.cutHeight,0,0,T,C),this.renderer&&this.renderer.gl?this.fillPattern=this.renderer.canvasToTexture(m,this.fillPattern):this.fillPattern=v.createPattern(m,"repeat"),this.updateCanvas(),this.dirty=!1}},updateCanvas:function(){var c=this.canvas;if((c.width!==this.width||c.height!==this.height)&&(c.width=this.width,c.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 v=this.context;this.scene.sys.game.config.antialias||e.disable(v);var m=this._tileScale.x,T=this._tileScale.y,C=this._tilePosition.x,S=this._tilePosition.y;v.clearRect(0,0,this.width,this.height),v.save(),v.scale(m,T),v.translate(-C,-S),v.fillStyle=this.fillPattern,v.fillRect(C,S,this.width/m,this.height/T),v.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 c=this.texture;c&&c.destroy(),this.renderer=null},tilePositionX:{get:function(){return this._tilePosition.x},set:function(c){this._tilePosition.x=c,this.dirty=!0}},tilePositionY:{get:function(){return this._tilePosition.y},set:function(c){this._tilePosition.y=c,this.dirty=!0}},tileScaleX:{get:function(){return this._tileScale.x},set:function(c){this._tileScale.x=c,this.dirty=!0}},tileScaleY:{get:function(){return this._tileScale.y},set:function(c){this._tileScale.y=c,this.dirty=!0}}});d.exports=u},46992:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p,o){a.updateCanvas(),p.addToRenderList(a),t.batchSprite(a,a.frame,p,o)};d.exports=x},14167:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(25305),p=t(44603),o=t(23568),s=t(20839);p.register("tileSprite",function(r,e){r===void 0&&(r={});var n=o(r,"x",0),l=o(r,"y",0),i=o(r,"width",512),h=o(r,"height",512),u=o(r,"key",""),c=o(r,"frame",""),v=new s(this.scene,n,l,i,h,u,c);return e!==void 0&&(r.add=e),a(this.scene,v,r),v})},91681:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(20839),p=t(39429);p.register("tileSprite",function(o,s,r,e,n,l){return this.displayList.add(new a(this.scene,o,s,r,e,n,l))})},56295:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),p=a,o=a;p=t(18553),o=t(46992),d.exports={renderWebGL:p,renderCanvas:o}},18553:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(70554),p=function(o,s,r,e){s.updateCanvas();var n=s.width,l=s.height;if(!(n===0||l===0)){r.addToRenderList(s);var i=a.getTintAppendFloatAlpha,h=o.pipelines.set(s.pipeline,s),u=h.setTexture2D(s.fillPattern,s);h.batchTexture(s,s.fillPattern,s.displayFrame.width*s.tileScaleX,s.displayFrame.height*s.tileScaleY,s.x,s.y,n,l,s.scaleX,s.scaleY,s.rotation,s.flipX,s.flipY,s.scrollFactorX,s.scrollFactorY,s.originX*n,s.originY*l,0,0,n,l,i(s.tintTopLeft,r.alpha*s._alphaTL),i(s.tintTopRight,r.alpha*s._alphaTR),i(s.tintBottomLeft,r.alpha*s._alphaBL),i(s.tintBottomRight,r.alpha*s._alphaBR),s.tintFill,s.tilePositionX%s.displayFrame.width/s.displayFrame.width,s.tilePositionY%s.displayFrame.height/s.displayFrame.height,r,e,!1,u)}};d.exports=p},18471:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(45319),p=t(83419),o=t(31401),s=t(51708),r=t(8443),e=t(95643),n=t(36383),l=t(14463),i=t(45650),h=t(10247),u=new p({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,h],initialize:function(v,m,T,C){e.call(this,v,"Video"),this.video,this.videoTexture,this.videoTextureSource,this.snapshotTexture,this.flipY=!1,this._key=i(),this.touchLocked=!1,this.playWhenUnlocked=!1,this.frameReady=!1,this.isStalled=!1,this.failedPlayAttempts=0,this.metadata,this.retry=0,this.retryInterval=500,this._systemMuted=!1,this._codeMuted=!1,this._systemPaused=!1,this._codePaused=!1,this._callbacks={ended:this.completeHandler.bind(this),legacy:this.legacyPlayHandler.bind(this),playing:this.playingHandler.bind(this),seeked:this.seekedHandler.bind(this),seeking:this.seekingHandler.bind(this),stalled:this.stalledHandler.bind(this),suspend:this.stalledHandler.bind(this),waiting:this.stalledHandler.bind(this)},this._loadCallbackHandler=this.loadErrorHandler.bind(this),this._metadataCallbackHandler=this.metadataHandler.bind(this),this._crop=this.resetCropObject(),this.markers={},this._markerIn=0,this._markerOut=0,this._playingMarker=!1,this._lastUpdate=0,this.cacheKey="",this.isSeeking=!1,this._playCalled=!1,this._rfvCallbackId=0;var S=v.sys.game;this._device=S.device.video,this.setPosition(m,T),this.setSize(256,256),this.initPipeline(),this.initPostPipeline(!0),S.events.on(r.PAUSE,this.globalPause,this),S.events.on(r.RESUME,this.globalResume,this);var P=v.sys.sound;P&&P.on(l.GLOBAL_MUTE,this.globalMute,this),C&&this.load(C)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},load:function(c){var v=this.scene.sys.cache.video.get(c);return v?(this.cacheKey=c,this.loadHandler(v.url,v.noAudio,v.crossOrigin)):console.warn("No video in cache for key: "+c),this},changeSource:function(c,v,m,T,C){v===void 0&&(v=!0),m===void 0&&(m=!1),this.cacheKey!==c&&(this.load(c),v&&this.play(m,T,C))},getVideoKey:function(){return this.cacheKey},loadURL:function(c,v,m){v===void 0&&(v=!1);var T=this._device.getVideoURL(c);return T?(this.cacheKey="",this.loadHandler(T.url,v,m)):console.warn("No supported video format found for "+c),this},loadMediaStream:function(c,v,m){return this.loadHandler(null,v,m,c)},loadHandler:function(c,v,m,T){v||(v=!1);var C=this.video;if(C?(this.removeLoadEventHandlers(),this.stop()):(C=document.createElement("video"),C.controls=!1,C.setAttribute("playsinline","playsinline"),C.setAttribute("preload","auto"),C.setAttribute("disablePictureInPicture","true")),v?(C.muted=!0,C.defaultMuted=!0,C.setAttribute("autoplay","autoplay")):(C.muted=!1,C.defaultMuted=!1,C.removeAttribute("autoplay")),m?C.setAttribute("crossorigin",m):C.removeAttribute("crossorigin"),T)if("srcObject"in C)try{C.srcObject=T}catch(P){if(P.name!=="TypeError")throw P;C.src=URL.createObjectURL(T)}else C.src=URL.createObjectURL(T);else C.src=c;this.retry=0,this.video=C,this._playCalled=!1,C.load(),this.addLoadEventHandlers();var S=this.scene.sys.textures.get(this._key);return this.setTexture(S),this},requestVideoFrame:function(c,v){var m=this.video;if(m){var T=v.width,C=v.height,S=this.videoTexture,P=this.videoTextureSource,A=!S||P.source!==m;A?(this._codePaused=m.paused,this._codeMuted=m.muted,S?(P.source=m,P.width=T,P.height=C,S.get().setSize(T,C)):(S=this.scene.sys.textures.create(this._key,m,T,C),S.add("__BASE",0,0,0,T,C),this.setTexture(S),this.videoTexture=S,this.videoTextureSource=S.source[0],this.videoTextureSource.setFlipY(this.flipY),this.emit(s.VIDEO_TEXTURE,this,S)),this.setSizeToFrame(),this.updateDisplayOrigin()):P.update(),this.isStalled=!1,this.metadata=v;var L=v.mediaTime;A&&(this._lastUpdate=L,this.emit(s.VIDEO_CREATED,this,T,C),this.frameReady||(this.frameReady=!0,this.emit(s.VIDEO_PLAY,this))),this._playingMarker?L>=this._markerOut&&(m.loop?(m.currentTime=this._markerIn,this.emit(s.VIDEO_LOOP,this)):(this.stop(!1),this.emit(s.VIDEO_COMPLETE,this))):L-1&&m>v&&m=0&&!isNaN(m)&&m>v&&(this.markers[c]=[v,m]),this},playMarker:function(c,v){var m=this.markers[c];return m&&this.play(v,m[0],m[1]),this},removeMarker:function(c){return delete this.markers[c],this},snapshot:function(c,v){return c===void 0&&(c=this.width),v===void 0&&(v=this.height),this.snapshotArea(0,0,this.width,this.height,c,v)},snapshotArea:function(c,v,m,T,C,S){c===void 0&&(c=0),v===void 0&&(v=0),m===void 0&&(m=this.width),T===void 0&&(T=this.height),C===void 0&&(C=m),S===void 0&&(S=T);var P=this.video,A=this.snapshotTexture;return A?(A.setSize(C,S),P&&A.context.drawImage(P,c,v,m,T,0,0,C,S)):(A=this.scene.sys.textures.createCanvas(i(),C,S),this.snapshotTexture=A,P&&A.context.drawImage(P,c,v,m,T,0,0,C,S)),A.update()},saveSnapshotTexture:function(c){return this.snapshotTexture?this.scene.sys.textures.renameTexture(this.snapshotTexture.key,c):this.snapshotTexture=this.scene.sys.textures.createCanvas(c,this.width,this.height),this.snapshotTexture},playSuccess:function(){if(this._playCalled){this.addEventHandlers(),this._codePaused=!1,this.touchLocked&&(this.touchLocked=!1,this.emit(s.VIDEO_UNLOCKED,this));var c=this.scene.sys.sound;c&&c.mute&&this.setMute(!0),this._markerIn>-1&&(this.video.currentTime=this._markerIn)}},playError:function(c){var v=c.name;v==="NotAllowedError"?(this.touchLocked=!0,this.playWhenUnlocked=!0,this.failedPlayAttempts=1,this.emit(s.VIDEO_LOCKED,this)):v==="NotSupportedError"?(this.stop(!1),this.emit(s.VIDEO_UNSUPPORTED,this,c)):(this.stop(!1),this.emit(s.VIDEO_ERROR,this,c))},legacyPlayHandler:function(){var c=this.video;c&&(this.playSuccess(),c.removeEventListener("playing",this._callbacks.legacy))},playingHandler:function(){this.isStalled=!1,this.emit(s.VIDEO_PLAYING,this)},loadErrorHandler:function(c){this.stop(!1),this.emit(s.VIDEO_ERROR,this,c)},metadataHandler:function(c){this.emit(s.VIDEO_METADATA,this,c)},setSizeToFrame:function(c){c||(c=this.frame),this.width=c.realWidth,this.height=c.realHeight,this.scaleX!==1&&(this.scaleX=this.displayWidth/this.width),this.scaleY!==1&&(this.scaleY=this.displayHeight/this.height);var v=this.input;return v&&!v.customHitArea&&(v.hitArea.width=this.width,v.hitArea.height=this.height),this},stalledHandler:function(c){this.isStalled=!0,this.emit(s.VIDEO_STALLED,this,c)},completeHandler:function(){this._playCalled=!1,this.emit(s.VIDEO_COMPLETE,this)},preUpdate:function(c,v){var m=this.video;!m||!this._playCalled||this.touchLocked&&this.playWhenUnlocked&&(this.retry+=v,this.retry>=this.retryInterval&&(this.createPlayPromise(!1),this.retry=0))},seekTo:function(c){var v=this.video;if(v){var m=v.duration;if(m!==1/0&&!isNaN(m)){var T=m*c;this.setCurrentTime(T)}}return this},getCurrentTime:function(){return this.video?this.video.currentTime:0},setCurrentTime:function(c){var v=this.video;if(v){if(typeof c=="string"){var m=c[0],T=parseFloat(c.substr(1));m==="+"?c=v.currentTime+T:m==="-"&&(c=v.currentTime-T)}v.currentTime=c}return this},seekingHandler:function(){this.isSeeking=!0,this.emit(s.VIDEO_SEEKING,this)},seekedHandler:function(){this.isSeeking=!1,this.emit(s.VIDEO_SEEKED,this)},getProgress:function(){var c=this.video;if(c){var v=c.duration;if(v!==1/0&&!isNaN(v))return c.currentTime/v}return-1},getDuration:function(){return this.video?this.video.duration:0},setMute:function(c){c===void 0&&(c=!0),this._codeMuted=c;var v=this.video;return v&&(v.muted=this._systemMuted?!0:c),this},isMuted:function(){return this._codeMuted},globalMute:function(c,v){this._systemMuted=v;var m=this.video;m&&(m.muted=this._codeMuted?!0:v)},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(c){c===void 0&&(c=!0);var v=this.video;return this._codePaused=c,v&&!v.ended&&(c?v.paused||(this.removeEventHandlers(),v.pause()):c||(this._playCalled?v.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(c){return c===void 0&&(c=1),this.video&&(this.video.volume=a(c,0,1)),this},getPlaybackRate:function(){return this.video?this.video.playbackRate:1},setPlaybackRate:function(c){return this.video&&(this.video.playbackRate=c),this},getLoop:function(){return this.video?this.video.loop:!1},setLoop:function(c){return c===void 0&&(c=!0),this.video&&(this.video.loop=c),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(c,v){return v===void 0&&(v=!1),this.videoTexture&&(this.scene.sys.textures.renameTexture(this._key,c),this.videoTextureSource.setFlipY(v)),this._key=c,this.flipY=v,!!this.videoTexture},stop:function(c){c===void 0&&(c=!0);var v=this.video;return v&&(this.removeEventHandlers(),v.cancelVideoFrameCallback(this._rfvCallbackId),v.pause()),this.retry=0,this._playCalled=!1,c&&this.emit(s.VIDEO_STOP,this),this},removeVideoElement:function(){var c=this.video;if(c){for(c.parentNode&&c.parentNode.removeChild(c);c.hasChildNodes();)c.removeChild(c.firstChild);c.removeAttribute("autoplay"),c.removeAttribute("src"),this.video=null}},preDestroy:function(){this.stop(!1),this.removeLoadEventHandlers(),this.removeVideoElement();var c=this.scene.sys.game.events;c.off(r.PAUSE,this.globalPause,this),c.off(r.RESUME,this.globalResume,this);var v=this.scene.sys.sound;v&&v.off(l.GLOBAL_MUTE,this.globalMute,this)}});d.exports=u},58352:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p,o){a.videoTexture&&(p.addToRenderList(a),t.batchSprite(a,a.frame,p,o))};d.exports=x},11511:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(25305),p=t(44603),o=t(23568),s=t(18471);p.register("video",function(r,e){r===void 0&&(r={});var n=o(r,"key",null),l=new s(this.scene,0,0,n);return e!==void 0&&(r.add=e),a(this.scene,l,r),l})},89025:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(18471),p=t(39429);p.register("video",function(o,s,r){return this.displayList.add(new a(this.scene,o,s,r))})},10247:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),p=a,o=a;p=t(29849),o=t(58352),d.exports={renderWebGL:p,renderCanvas:o}},29849:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p,o){a.videoTexture&&(p.addToRenderList(a),a.pipeline.batchSprite(a,p,o))};d.exports=x},41481:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(10312),p=t(96503),o=t(87902),s=t(83419),r=t(31401),e=t(95643),n=t(87841),l=t(37303),i=new s({Extends:e,Mixins:[r.Depth,r.GetBounds,r.Origin,r.Transform,r.ScrollFactor,r.Visible],initialize:function(u,c,v,m,T){m===void 0&&(m=1),T===void 0&&(T=m),e.call(this,u,"Zone"),this.setPosition(c,v),this.width=m,this.height=T,this.blendMode=a.NORMAL,this.updateDisplayOrigin()},displayWidth:{get:function(){return this.scaleX*this.width},set:function(h){this.scaleX=h/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(h){this.scaleY=h/this.height}},setSize:function(h,u,c){c===void 0&&(c=!0),this.width=h,this.height=u,this.updateDisplayOrigin();var v=this.input;return c&&v&&!v.customHitArea&&(v.hitArea.width=h,v.hitArea.height=u),this},setDisplaySize:function(h,u){return this.displayWidth=h,this.displayHeight=u,this},setCircleDropZone:function(h){return this.setDropZone(new p(0,0,h),o)},setRectangleDropZone:function(h,u){return this.setDropZone(new n(0,0,h,u),l)},setDropZone:function(h,u){return this.input||this.setInteractive(h,u,!0),this},setAlpha:function(){},setBlendMode:function(){},renderCanvas:function(h,u,c){c.addToRenderList(u)},renderWebGL:function(h,u,c){c.addToRenderList(u)}});d.exports=i},95261:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(44603),p=t(23568),o=t(41481);a.register("zone",function(s){var r=p(s,"x",0),e=p(s,"y",0),n=p(s,"width",1),l=p(s,"height",n);return new o(this.scene,r,e,n,l)})},84175:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(41481),p=t(39429);p.register("zone",function(o,s,r,e){return this.displayList.add(new a(this.scene,o,s,r,e))})},95166:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return t.radius>0?Math.PI*t.radius*t.radius:0};d.exports=x},96503:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(87902),o=t(26241),s=t(79124),r=t(23777),e=t(28176),n=new a({initialize:function(i,h,u){i===void 0&&(i=0),h===void 0&&(h=0),u===void 0&&(u=0),this.type=r.CIRCLE,this.x=i,this.y=h,this._radius=u,this._diameter=u*2},contains:function(l,i){return p(this,l,i)},getPoint:function(l,i){return o(this,l,i)},getPoints:function(l,i,h){return s(this,l,i,h)},getRandomPoint:function(l){return e(this,l)},setTo:function(l,i,h){return this.x=l,this.y=i,this._radius=h,this._diameter=h*2,this},setEmpty:function(){return this._radius=0,this._diameter=0,this},setPosition:function(l,i){return i===void 0&&(i=l),this.x=l,this.y=i,this},isEmpty:function(){return this._radius<=0},radius:{get:function(){return this._radius},set:function(l){this._radius=l,this._diameter=l*2}},diameter:{get:function(){return this._diameter},set:function(l){this._diameter=l,this._radius=l*.5}},left:{get:function(){return this.x-this._radius},set:function(l){this.x=l+this._radius}},right:{get:function(){return this.x+this._radius},set:function(l){this.x=l-this._radius}},top:{get:function(){return this.y-this._radius},set:function(l){this.y=l+this._radius}},bottom:{get:function(){return this.y+this._radius},set:function(l){this.y=l-this._radius}}});d.exports=n},71562:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return 2*(Math.PI*t.radius)};d.exports=x},92110:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(2141),p=function(o,s,r){return r===void 0&&(r=new a),r.x=o.x+o.radius*Math.cos(s),r.y=o.y+o.radius*Math.sin(s),r};d.exports=p},42250:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(96503),p=function(o){return new a(o.x,o.y,o.radius)};d.exports=p},87902:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){if(t.radius>0&&a>=t.left&&a<=t.right&&p>=t.top&&p<=t.bottom){var o=(t.x-a)*(t.x-a),s=(t.y-p)*(t.y-p);return o+s<=t.radius*t.radius}else return!1};d.exports=x},5698:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(87902),p=function(o,s){return a(o,s.x,s.y)};d.exports=p},70588:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(87902),p=function(o,s){return a(o,s.x,s.y)&&a(o,s.right,s.y)&&a(o,s.x,s.bottom)&&a(o,s.right,s.bottom)};d.exports=p},26394:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){return a.setTo(t.x,t.y,t.radius)};d.exports=x},76278:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){return t.x===a.x&&t.y===a.y&&t.radius===a.radius};d.exports=x},2074:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(87841),p=function(o,s){return s===void 0&&(s=new a),s.x=o.left,s.y=o.top,s.width=o.diameter,s.height=o.diameter,s};d.exports=p},26241:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(92110),p=t(62945),o=t(36383),s=t(2141),r=function(e,n,l){l===void 0&&(l=new s);var i=p(n,0,o.PI2);return a(e,i,l)};d.exports=r},79124:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(71562),p=t(92110),o=t(62945),s=t(36383),r=function(e,n,l,i){i===void 0&&(i=[]),!n&&l>0&&(n=a(e)/l);for(var h=0;h{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){return t.x+=a,t.y+=p,t};d.exports=x},39212:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){return t.x+=a.x,t.y+=a.y,t};d.exports=x},28176:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(2141),p=function(o,s){s===void 0&&(s=new a);var r=2*Math.PI*Math.random(),e=Math.random()+Math.random(),n=e>1?2-e:e,l=n*Math.cos(r),i=n*Math.sin(r);return s.x=o.x+l*o.radius,s.y=o.y+i*o.radius,s};d.exports=p},88911:(d,x,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),d.exports=a},23777:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6};d.exports=x},78874:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return t.isEmpty()?0:t.getMajorRadius()*t.getMinorRadius()*Math.PI};d.exports=x},92990:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){var a=t.width/2,p=t.height/2,o=Math.pow(a-p,2)/Math.pow(a+p,2);return Math.PI*(a+p)*(1+3*o/(10+Math.sqrt(4-3*o)))};d.exports=x},79522:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(2141),p=function(o,s,r){r===void 0&&(r=new a);var e=o.width/2,n=o.height/2;return r.x=o.x+e*Math.cos(s),r.y=o.y+n*Math.sin(s),r};d.exports=p},58102:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(8497),p=function(o){return new a(o.x,o.y,o.width,o.height)};d.exports=p},81154:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){if(t.width<=0||t.height<=0)return!1;var o=(a-t.x)/t.width,s=(p-t.y)/t.height;return o*=o,s*=s,o+s<.25};d.exports=x},46662:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(81154),p=function(o,s){return a(o,s.x,s.y)};d.exports=p},1632:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(81154),p=function(o,s){return a(o,s.x,s.y)&&a(o,s.right,s.y)&&a(o,s.x,s.bottom)&&a(o,s.right,s.bottom)};d.exports=p},65534:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){return a.setTo(t.x,t.y,t.width,t.height)};d.exports=x},8497:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(81154),o=t(90549),s=t(48320),r=t(23777),e=t(24820),n=new a({initialize:function(i,h,u,c){i===void 0&&(i=0),h===void 0&&(h=0),u===void 0&&(u=0),c===void 0&&(c=0),this.type=r.ELLIPSE,this.x=i,this.y=h,this.width=u,this.height=c},contains:function(l,i){return p(this,l,i)},getPoint:function(l,i){return o(this,l,i)},getPoints:function(l,i,h){return s(this,l,i,h)},getRandomPoint:function(l){return e(this,l)},setTo:function(l,i,h,u){return this.x=l,this.y=i,this.width=h,this.height=u,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(l,i){return i===void 0&&(i=l),this.x=l,this.y=i,this},setSize:function(l,i){return i===void 0&&(i=l),this.width=l,this.height=i,this},isEmpty:function(){return this.width<=0||this.height<=0},getMinorRadius:function(){return Math.min(this.width,this.height)/2},getMajorRadius:function(){return Math.max(this.width,this.height)/2},left:{get:function(){return this.x-this.width/2},set:function(l){this.x=l+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(l){this.x=l-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(l){this.y=l+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(l){this.y=l-this.height/2}}});d.exports=n},36146:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){return t.x===a.x&&t.y===a.y&&t.width===a.width&&t.height===a.height};d.exports=x},23694:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(87841),p=function(o,s){return s===void 0&&(s=new a),s.x=o.left,s.y=o.top,s.width=o.width,s.height=o.height,s};d.exports=p},90549:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(79522),p=t(62945),o=t(36383),s=t(2141),r=function(e,n,l){l===void 0&&(l=new s);var i=p(n,0,o.PI2);return a(e,i,l)};d.exports=r},48320:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(92990),p=t(79522),o=t(62945),s=t(36383),r=function(e,n,l,i){i===void 0&&(i=[]),!n&&l>0&&(n=a(e)/l);for(var h=0;h{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){return t.x+=a,t.y+=p,t};d.exports=x},44808:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){return t.x+=a.x,t.y+=a.y,t};d.exports=x},24820:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(2141),p=function(o,s){s===void 0&&(s=new a);var r=Math.random()*Math.PI*2,e=Math.sqrt(Math.random());return s.x=o.x+e*Math.cos(r)*o.width/2,s.y=o.y+e*Math.sin(r)*o.height/2,s};d.exports=p},49203:(d,x,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),d.exports=a},55738:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(23777),p=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=p(!1,o,a),d.exports=o},2044:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(20339),p=function(o,s){return a(o.x,o.y,s.x,s.y)<=o.radius+s.radius};d.exports=p},81491:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){var p=a.width/2,o=a.height/2,s=Math.abs(t.x-a.x-p),r=Math.abs(t.y-a.y-o),e=p+t.radius,n=o+t.radius;if(s>e||r>n)return!1;if(s<=p||r<=o)return!0;var l=s-p,i=r-o,h=l*l,u=i*i,c=t.radius*t.radius;return h+u<=c};d.exports=x},63376:(d,x,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),p=t(2044),o=function(s,r,e){if(e===void 0&&(e=[]),p(s,r)){var n=s.x,l=s.y,i=s.radius,h=r.x,u=r.y,c=r.radius,v,m,T,C,S;if(l===u)S=(c*c-i*i-h*h+n*n)/(2*(n-h)),v=1,m=-2*u,T=h*h+S*S-2*h*S+u*u-c*c,C=m*m-4*v*T,C===0?e.push(new a(S,-m/(2*v))):C>0&&(e.push(new a(S,(-m+Math.sqrt(C))/(2*v))),e.push(new a(S,(-m-Math.sqrt(C))/(2*v))));else{var P=(n-h)/(l-u),A=(c*c-i*i-h*h+n*n-u*u+l*l)/(2*(l-u));v=P*P+1,m=2*l*P-2*A*P-2*n,T=n*n+l*l+A*A-i*i-2*l*A,C=m*m-4*v*T,C===0?(S=-m/(2*v),e.push(new a(S,A-S*P))):C>0&&(S=(-m+Math.sqrt(C))/(2*v),e.push(new a(S,A-S*P)),S=(-m-Math.sqrt(C))/(2*v),e.push(new a(S,A-S*P)))}}return e};d.exports=o},97439:(d,x,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),p=t(81491),o=function(s,r,e){if(e===void 0&&(e=[]),p(s,r)){var n=r.getLineA(),l=r.getLineB(),i=r.getLineC(),h=r.getLineD();a(n,s,e),a(l,s,e),a(i,s,e),a(h,s,e)}return e};d.exports=o},4042:(d,x,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),p=t(80462),o=function(s,r,e){if(e===void 0&&(e=[]),p(s,r)){var n=s.x1,l=s.y1,i=s.x2,h=s.y2,u=r.x,c=r.y,v=r.radius,m=i-n,T=h-l,C=n-u,S=l-c,P=m*m+T*T,A=2*(m*C+T*S),L=C*C+S*S-v*v,F=A*A-4*P*L,I,D;if(F===0){var B=-A/(2*P);I=n+B*m,D=l+B*T,B>=0&&B<=1&&e.push(new a(I,D))}else if(F>0){var G=(-A-Math.sqrt(F))/(2*P);I=n+G*m,D=l+G*T,G>=0&&G<=1&&e.push(new a(I,D));var z=(-A+Math.sqrt(F))/(2*P);I=n+z*m,D=l+z*T,z>=0&&z<=1&&e.push(new a(I,D))}}return e};d.exports=o},36100:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(25836),p=function(o,s,r,e){r===void 0&&(r=!1);var n=o.x1,l=o.y1,i=o.x2,h=o.y2,u=s.x1,c=s.y1,v=s.x2,m=s.y2,T=i-n,C=h-l,S=v-u,P=m-c,A=T*P-C*S;if(A===0)return null;var L,F,I;if(r){if(L=(T*(c-l)+C*(n-u))/(S*C-P*T),F=(u+S*L-n)/T,F<0||L<0||L>1)return null;I=F}else{if(L=((u-n)*P-(c-l)*S)/A,F=((l-c)*T-(n-u)*C)/A,L<0||L>1||F<0||F>1)return null;I=L}return e===void 0&&(e=new a),e.set(n+T*I,l+C*I,I)};d.exports=p},3073:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(36100),p=t(23031),o=t(25836),s=new p,r=new o,e=function(n,l,i,h){i===void 0&&(i=!1),h===void 0&&(h=new o);var u=!1;h.set(),r.set();for(var c=l[l.length-1],v=0;v{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(25836),p=t(61369),o=t(3073),s=new a,r=function(e,n,l,i){i===void 0&&(i=new p),Array.isArray(n)||(n=[n]);var h=!1;i.set(),s.set();for(var u=0;u{/** + * @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),p=t(76112),o=t(92773),s=function(r,e,n){if(n===void 0&&(n=[]),o(r,e))for(var l=e.getLineA(),i=e.getLineB(),h=e.getLineC(),u=e.getLineD(),c=[new a,new a,new a,new a],v=[p(l,r,c[0]),p(i,r,c[1]),p(h,r,c[2]),p(u,r,c[3])],m=0;m<4;m++)v[m]&&n.push(c[m]);return n};d.exports=s},71147:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(61369),p=t(56362),o=t(23031),s=new o;function r(l,i,h,u,c){var v=Math.cos(l),m=Math.sin(l);s.setTo(i,h,i+v,h+m);var T=p(s,u,!0);T&&c.push(new a(T.x,T.y,l,T.w))}function e(l,i){return l.z-i.z}var n=function(l,i,h){Array.isArray(h)||(h=[h]);for(var u=[],c=[],v=0;v{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(87841),p=t(59996),o=function(s,r,e){return e===void 0&&(e=new a),p(s,r)&&(e.x=Math.max(s.x,r.x),e.y=Math.max(s.y,r.y),e.width=Math.min(s.right,r.right)-e.x,e.height=Math.min(s.bottom,r.bottom)-e.y),e};d.exports=o},52784:(d,x,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),p=t(59996),o=function(s,r,e){if(e===void 0&&(e=[]),p(s,r)){var n=s.getLineA(),l=s.getLineB(),i=s.getLineC(),h=s.getLineD();a(n,r,e),a(l,r,e),a(i,r,e),a(h,r,e)}return e};d.exports=o},26341:(d,x,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),p=t(60646),o=function(s,r,e){if(e===void 0&&(e=[]),a(s,r)){var n=r.getLineA(),l=r.getLineB(),i=r.getLineC();p(n,s,e),p(l,s,e),p(i,s,e)}return e};d.exports=o},38720:(d,x,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),p=t(67636),o=function(s,r,e){if(e===void 0&&(e=[]),p(s,r)){var n=s.getLineA(),l=s.getLineB(),i=s.getLineC();a(n,r,e),a(l,r,e),a(i,r,e)}return e};d.exports=o},13882:(d,x,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),p=t(2822),o=t(76112),s=function(r,e,n){if(n===void 0&&(n=[]),p(r,e))for(var l=r.getLineA(),i=r.getLineB(),h=r.getLineC(),u=[new a,new a,new a],c=[o(l,e,u[0]),o(i,e,u[1]),o(h,e,u[2])],v=0;v<3;v++)c[v]&&n.push(u[v]);return n};d.exports=s},75636:(d,x,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),p=t(13882),o=function(s,r,e){if(e===void 0&&(e=[]),a(s,r)){var n=r.getLineA(),l=r.getLineB(),i=r.getLineC();p(s,n,e),p(s,l,e),p(s,i,e)}return e};d.exports=o},80462:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(87902),p=t(2141),o=new p,s=function(r,e,n){if(n===void 0&&(n=o),a(e,r.x1,r.y1))return n.x=r.x1,n.y=r.y1,!0;if(a(e,r.x2,r.y2))return n.x=r.x2,n.y=r.y2,!0;var l=r.x2-r.x1,i=r.y2-r.y1,h=e.x-r.x1,u=e.y-r.y1,c=l*l+i*i,v=l,m=i;if(c>0){var T=(h*l+u*i)/c;v*=T,m*=T}n.x=r.x1+v,n.y=r.y1+m;var C=v*v+m*m;return C<=c&&v*l+m*i>=0&&a(e,n.x,n.y)};d.exports=s},76112:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){var o=t.x1,s=t.y1,r=t.x2,e=t.y2,n=a.x1,l=a.y1,i=a.x2,h=a.y2;if(o===r&&s===e||n===i&&l===h)return!1;var u=(h-l)*(r-o)-(i-n)*(e-s);if(u===0)return!1;var c=((i-n)*(s-l)-(h-l)*(o-n))/u,v=((r-o)*(s-l)-(e-s)*(o-n))/u;return c<0||c>1||v<0||v>1?!1:(p&&(p.x=o+c*(r-o),p.y=s+c*(e-s)),!0)};d.exports=x},92773:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){var p=t.x1,o=t.y1,s=t.x2,r=t.y2,e=a.x,n=a.y,l=a.right,i=a.bottom,h=0;if(p>=e&&p<=l&&o>=n&&o<=i||s>=e&&s<=l&&r>=n&&r<=i)return!0;if(p=e){if(h=o+(r-o)*(e-p)/(s-p),h>n&&h<=i)return!0}else if(p>l&&s<=l&&(h=o+(r-o)*(l-p)/(s-p),h>=n&&h<=i))return!0;if(o=n){if(h=p+(s-p)*(n-o)/(r-o),h>=e&&h<=l)return!0}else if(o>i&&r<=i&&(h=p+(s-p)*(i-o)/(r-o),h>=e&&h<=l))return!0;return!1};d.exports=x},16204:d=>{/** + * @author Richard Davey + * @author Florian Mertens + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){p===void 0&&(p=1);var o=a.x1,s=a.y1,r=a.x2,e=a.y2,n=t.x,l=t.y,i=(r-o)*(r-o)+(e-s)*(e-s);if(i===0)return!1;var h=((n-o)*(r-o)+(l-s)*(e-s))/i;if(h<0)return Math.sqrt((o-n)*(o-n)+(s-l)*(s-l))<=p;if(h>=0&&h<=1){var u=((s-l)*(r-o)-(o-n)*(e-s))/i;return Math.abs(u)*Math.sqrt(i)<=p}else return Math.sqrt((r-n)*(r-n)+(e-l)*(e-l))<=p};d.exports=x},14199:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(16204),p=function(o,s){if(!a(o,s))return!1;var r=Math.min(s.x1,s.x2),e=Math.max(s.x1,s.x2),n=Math.min(s.y1,s.y2),l=Math.max(s.y1,s.y2);return o.x>=r&&o.x<=e&&o.y>=n&&o.y<=l};d.exports=p},59996:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){return t.width<=0||t.height<=0||a.width<=0||a.height<=0?!1:!(t.righta.right||t.y>a.bottom)};d.exports=x},89265:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(76112),p=t(37303),o=t(48653),s=t(77493),r=function(e,n){if(n.left>e.right||n.righte.bottom||n.bottom0};d.exports=r},84411:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p,o,s,r){return r===void 0&&(r=0),!(a>t.right+r||pt.bottom+r||s{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(80462),p=t(10690),o=function(s,r){return s.left>r.right||s.rightr.bottom||s.bottom{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(76112),p=function(o,s){return!!(o.contains(s.x1,s.y1)||o.contains(s.x2,s.y2)||a(o.getLineA(),s)||a(o.getLineB(),s)||a(o.getLineC(),s))};d.exports=p},82944:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(48653),p=t(71694),o=t(76112),s=function(r,e){if(r.left>e.right||r.righte.bottom||r.bottom0||(v=p(e),m=a(r,v,!0),m.length>0)};d.exports=s},91865:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.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:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return Math.atan2(t.y2-t.y1,t.x2-t.x1)};d.exports=x},84993:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){a===void 0&&(a=1),p===void 0&&(p=[]);var o=Math.round(t.x1),s=Math.round(t.y1),r=Math.round(t.x2),e=Math.round(t.y2),n=Math.abs(r-o),l=Math.abs(e-s),i=o-l&&(u-=l,o+=i),v{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){var o=a-(t.x1+t.x2)/2,s=p-(t.y1+t.y2)/2;return t.x1+=o,t.y1+=s,t.x2+=o,t.y2+=s,t};d.exports=x},31116:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(23031),p=function(o){return new a(o.x1,o.y1,o.x2,o.y2)};d.exports=p},59944:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){return a.setTo(t.x1,t.y1,t.x2,t.y2)};d.exports=x},59220:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){return t.x1===a.x1&&t.y1===a.y1&&t.x2===a.x2&&t.y2===a.y2};d.exports=x},78177:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(35001),p=function(o,s,r){r===void 0&&(r=s);var e=a(o),n=o.x2-o.x1,l=o.y2-o.y1;return s&&(o.x1=o.x1-n/e*s,o.y1=o.y1-l/e*s),r&&(o.x2=o.x2+n/e*r,o.y2=o.y2+l/e*r),o};d.exports=p},26708:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(52816),p=t(6113),o=t(2141),s=function(r,e,n,l,i){l===void 0&&(l=0),i===void 0&&(i=[]);var h=[],u=r.x1,c=r.y1,v=r.x2-u,m=r.y2-c,T=p(e,i),C,S,P=n-1;for(C=0;C0){var A=h[0],L=[A];for(C=1;C=l&&(L.push(F),A=F)}var I=h[h.length-1];return a(A,I){/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(2141),p=function(o,s){return s===void 0&&(s=new a),s.x=(o.x1+o.x2)/2,s.y=(o.y1+o.y2)/2,s};d.exports=p},99569:(d,x,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),p=function(o,s,r){r===void 0&&(r=new a);var e=o.x1,n=o.y1,l=o.x2,i=o.y2,h=(l-e)*(l-e)+(i-n)*(i-n);if(h===0)return r;var u=((s.x-e)*(l-e)+(s.y-n)*(i-n))/h;return r.x=e+u*(l-e),r.y=n+u*(i-n),r};d.exports=p},34638:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(36383),p=t(91938),o=t(2141),s=function(r,e){e===void 0&&(e=new o);var n=p(r)-a.TAU;return e.x=Math.cos(n),e.y=Math.sin(n),e};d.exports=s},13151:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(2141),p=function(o,s,r){return r===void 0&&(r=new a),r.x=o.x1+(o.x2-o.x1)*s,r.y=o.y1+(o.y2-o.y1)*s,r};d.exports=p},15258:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(35001),p=t(2141),o=function(s,r,e,n){n===void 0&&(n=[]),!r&&e>0&&(r=a(s)/e);for(var l=s.x1,i=s.y1,h=s.x2,u=s.y2,c=0;c{/** + * @author Richard Davey + * @author Florian Mertens + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){var p=t.x1,o=t.y1,s=t.x2,r=t.y2,e=(s-p)*(s-p)+(r-o)*(r-o);if(e===0)return!1;var n=((o-a.y)*(s-p)-(p-a.x)*(r-o))/e;return Math.abs(n)*Math.sqrt(e)};d.exports=x},98770:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return Math.abs(t.y1-t.y2)};d.exports=x},35001:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))};d.exports=x},23031:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(13151),o=t(15258),s=t(23777),r=t(65822),e=t(26099),n=new a({initialize:function(i,h,u,c){i===void 0&&(i=0),h===void 0&&(h=0),u===void 0&&(u=0),c===void 0&&(c=0),this.type=s.LINE,this.x1=i,this.y1=h,this.x2=u,this.y2=c},getPoint:function(l,i){return p(this,l,i)},getPoints:function(l,i,h){return o(this,l,i,h)},getRandomPoint:function(l){return r(this,l)},setTo:function(l,i,h,u){return l===void 0&&(l=0),i===void 0&&(i=0),h===void 0&&(h=0),u===void 0&&(u=0),this.x1=l,this.y1=i,this.x2=h,this.y2=u,this},setFromObjects:function(l,i){return this.x1=l.x,this.y1=l.y,this.x2=i.x,this.y2=i.y,this},getPointA:function(l){return l===void 0&&(l=new e),l.set(this.x1,this.y1),l},getPointB:function(l){return l===void 0&&(l=new e),l.set(this.x2,this.y2),l},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(l){this.x1<=this.x2?this.x1=l:this.x2=l}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(l){this.x1>this.x2?this.x1=l:this.x2=l}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(l){this.y1<=this.y2?this.y1=l:this.y2=l}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(l){this.y1>this.y2?this.y1=l:this.y2=l}}});d.exports=n},64795:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(36383),p=t(15994),o=t(91938),s=function(r){var e=o(r)-a.TAU;return p(e,-Math.PI,Math.PI)};d.exports=s},52616:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(36383),p=t(91938),o=function(s){return Math.cos(p(s)-a.TAU)};d.exports=o},87231:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(36383),p=t(91938),o=function(s){return Math.sin(p(s)-a.TAU)};d.exports=o},89662:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){return t.x1+=a,t.y1+=p,t.x2+=a,t.y2+=p,t};d.exports=x},71165:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return-((t.x2-t.x1)/(t.y2-t.y1))};d.exports=x},65822:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(2141),p=function(o,s){s===void 0&&(s=new a);var r=Math.random();return s.x=o.x1+r*(o.x2-o.x1),s.y=o.y1+r*(o.y2-o.y1),s};d.exports=p},69777:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(91938),p=t(64795),o=function(s,r){return 2*p(r)-Math.PI-a(s)};d.exports=o},39706:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(64400),p=function(o,s){var r=(o.x1+o.x2)/2,e=(o.y1+o.y2)/2;return a(o,r,e,s)};d.exports=p},82585:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(64400),p=function(o,s,r){return a(o,s.x,s.y,r)};d.exports=p},64400:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p,o){var s=Math.cos(o),r=Math.sin(o),e=t.x1-a,n=t.y1-p;return t.x1=e*s-n*r+a,t.y1=e*r+n*s+p,e=t.x2-a,n=t.y2-p,t.x2=e*s-n*r+a,t.y2=e*r+n*s+p,t};d.exports=x},62377:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p,o,s){return t.x1=a,t.y1=p,t.x2=a+Math.cos(o)*s,t.y2=p+Math.sin(o)*s,t};d.exports=x},71366:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return(t.y2-t.y1)/(t.x2-t.x1)};d.exports=x},10809:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return Math.abs(t.x1-t.x2)};d.exports=x},2529:(d,x,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),d.exports=a},83997:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(87841),o=t(26099);function s(e,n,l,i){var h=e-l,u=n-i,c=h*h+u*u;return Math.sqrt(c)}var r=new a({initialize:function(n,l,i){this.vertex1=n,this.vertex2=l,this.vertex3=i,this.bounds=new p,this._inCenter=new o},getInCenter:function(e){e===void 0&&(e=!0);var n=this.vertex1,l=this.vertex2,i=this.vertex3,h,u,c,v,m,T;e?(h=n.x,u=n.y,c=l.x,v=l.y,m=i.x,T=i.y):(h=n.vx,u=n.vy,c=l.vx,v=l.vy,m=i.vx,T=i.vy);var C=s(m,T,c,v),S=s(h,u,m,T),P=s(c,v,h,u),A=C+S+P;return this._inCenter.set((h*C+c*S+m*P)/A,(u*C+v*S+T*P)/A)},contains:function(e,n,l){var i=this.vertex1,h=this.vertex2,u=this.vertex3,c=i.vx,v=i.vy,m=h.vx,T=h.vy,C=u.vx,S=u.vy;if(l){var P=l.a,A=l.b,L=l.c,F=l.d,I=l.e,D=l.f;c=i.vx*P+i.vy*L+I,v=i.vx*A+i.vy*F+D,m=h.vx*P+h.vy*L+I,T=h.vx*A+h.vy*F+D,C=u.vx*P+u.vy*L+I,S=u.vx*A+u.vy*F+D}var B=C-c,G=S-v,z=m-c,W=T-v,Y=e-c,K=n-v,Z=B*B+G*G,V=B*z+G*W,H=B*Y+G*K,N=z*z+W*W,U=z*Y+W*K,X=Z*N-V*V,$=X===0?0:1/X,k=(N*H-V*U)*$,Q=(Z*U-V*H)*$;return k>=0&&Q>=0&&k+Q<1},isCounterClockwise:function(e){var n=this.vertex1,l=this.vertex2,i=this.vertex3,h=(l.vx-n.vx)*(i.vy-n.vy)-(l.vy-n.vy)*(i.vx-n.vx);return e<=0?h>=0:h<0},load:function(e,n,l,i,h){return l=this.vertex1.load(e,n,l,i,h),l=this.vertex2.load(e,n,l,i,h),l=this.vertex3.load(e,n,l,i,h),l},transformCoordinatesLocal:function(e,n,l,i){return this.vertex1.transformCoordinatesLocal(e,n,l,i),this.vertex2.transformCoordinatesLocal(e,n,l,i),this.vertex3.transformCoordinatesLocal(e,n,l,i),this},updateBounds:function(){var e=this.vertex1,n=this.vertex2,l=this.vertex3,i=this.bounds;return i.x=Math.min(e.vx,n.vx,l.vx),i.y=Math.min(e.vy,n.vy,l.vy),i.width=Math.max(e.vx,n.vx,l.vx)-i.x,i.height=Math.max(e.vy,n.vy,l.vy)-i.y,this},isInView:function(e,n,l,i,h,u,c,v,m,T,C){this.update(i,h,u,c,v,m,T,C);var S=this.vertex1,P=this.vertex2,A=this.vertex3;if(S.ta<=0&&P.ta<=0&&A.ta<=0||n&&!this.isCounterClockwise(l))return!1;var L=this.bounds;L.x=Math.min(S.tx,P.tx,A.tx),L.y=Math.min(S.ty,P.ty,A.ty),L.width=Math.max(S.tx,P.tx,A.tx)-L.x,L.height=Math.max(S.ty,P.ty,A.ty)-L.y;var F=e.x+e.width,I=e.y+e.height;return L.width<=0||L.height<=0||e.width<=0||e.height<=0?!1:!(L.rightF||L.y>I)},scrollUV:function(e,n){return this.vertex1.scrollUV(e,n),this.vertex2.scrollUV(e,n),this.vertex3.scrollUV(e,n),this},scaleUV:function(e,n){return this.vertex1.scaleUV(e,n),this.vertex2.scaleUV(e,n),this.vertex3.scaleUV(e,n),this},setColor:function(e){return this.vertex1.color=e,this.vertex2.color=e,this.vertex3.color=e,this},update:function(e,n,l,i,h,u,c,v){return this.vertex1.update(n,l,i,h,u,c,v,e),this.vertex2.update(n,l,i,h,u,c,v,e),this.vertex3.update(n,l,i,h,u,c,v,e),this},translate:function(e,n){n===void 0&&(n=0);var l=this.vertex1,i=this.vertex2,h=this.vertex3;return l.x+=e,l.y+=n,i.x+=e,i.y+=n,h.x+=e,h.y+=n,this},x:{get:function(){return this.getInCenter().x},set:function(e){var n=this.getInCenter();this.translate(e-n.x,0)}},y:{get:function(){return this.getInCenter().y},set:function(e){var n=this.getInCenter();this.translate(0,e-n.y)}},alpha:{get:function(){var e=this.vertex1,n=this.vertex2,l=this.vertex3;return(e.alpha+n.alpha+l.alpha)/3},set:function(e){this.vertex1.alpha=e,this.vertex2.alpha=e,this.vertex3.alpha=e}},depth:{get:function(){var e=this.vertex1,n=this.vertex2,l=this.vertex3;return(e.vz+n.vz+l.vz)/3}},destroy:function(){this.vertex1=null,this.vertex2=null,this.vertex3=null}});d.exports=r},48803:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83997),p=t(95540),o=t(37867),s=t(25836),r=t(39318),e=new s,n=new s,l=new o,i=function(h){var u=p(h,"mesh"),c=p(h,"texture",null),v=p(h,"frame"),m=p(h,"width",1),T=p(h,"height",m),C=p(h,"widthSegments",1),S=p(h,"heightSegments",C),P=p(h,"x",0),A=p(h,"y",0),L=p(h,"z",0),F=p(h,"rotateX",0),I=p(h,"rotateY",0),D=p(h,"rotateZ",0),B=p(h,"zIsUp",!0),G=p(h,"isOrtho",u?u.dirtyCache[11]:!1),z=p(h,"colors",[16777215]),W=p(h,"alphas",[1]),Y=p(h,"tile",!1),K=p(h,"flipY",!1),Z=p(h,"width",null),V={faces:[],verts:[]};e.set(P,A,L),n.set(F,I,D),l.fromRotationXYTranslation(n,e,B);var H;if(!c&&u)c=u.texture,v||(H=u.frame);else if(u&&typeof c=="string")c=u.scene.sys.textures.get(c);else if(!c)return V;H||(H=c.get(v)),!Z&&G&&c&&u&&(m=H.width/u.height,T=H.height/u.height);var N=m/2,U=T/2,X=Math.floor(C),$=Math.floor(S),k=X+1,Q=$+1,J=m/X,et=T/$,nt=[],st=[],ot,ut,at=0,ct=1,Et=0,St=1;H&&(at=H.u0,ct=H.u1,K?(Et=H.v1,St=H.v0):(Et=H.v0,St=H.v1));var Ct=ct-at,dt=St-Et;for(ut=0;ut{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83997),p=t(37867),o=t(25836),s=t(39318),r=new o,e=new o,n=new p,l=function(i,h,u,c,v,m,T,C,S,P){u===void 0&&(u=1),c===void 0&&(c=0),v===void 0&&(v=0),m===void 0&&(m=0),T===void 0&&(T=0),C===void 0&&(C=0),S===void 0&&(S=0),P===void 0&&(P=!0);var A={faces:[],verts:[]},L=i.materials;r.set(c,v,m),e.set(T,C,S),n.fromRotationXYTranslation(e,r,P);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(83997),p=t(39318),o=function(s,r,e,n,l,i,h,u){if(n===void 0&&(n=!1),i===void 0&&(i=16777215),h===void 0&&(h=1),u===void 0&&(u=!1),s.length!==r.length&&!n){console.warn("GenerateVerts: vertices and uvs count not equal");return}var c={faces:[],vertices:[]},v,m,T,C,S,P,A,L,F,I,D,B=n?3:2,G=Array.isArray(i),z=Array.isArray(h);if(Array.isArray(e)&&e.length>0)for(v=0;v{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=!0,t="untitled",a="",p="";function o(m){var T=m.indexOf("#");return T>-1?m.substring(0,T):m}function s(m){return m.models.length===0&&m.models.push({faces:[],name:t,textureCoords:[],vertexNormals:[],vertices:[]}),a="",m.models[m.models.length-1]}function r(m,T){var C=m.length>=2?m[1]:t;T.models.push({faces:[],name:C,textureCoords:[],vertexNormals:[],vertices:[]}),a=""}function e(m){m.length===2&&(a=m[1])}function n(m,T){var C=m.length,S=C>=2?parseFloat(m[1]):0,P=C>=3?parseFloat(m[2]):0,A=C>=4?parseFloat(m[3]):0;s(T).vertices.push({x:S,y:P,z:A})}function l(m,T){var C=m.length,S=C>=2?parseFloat(m[1]):0,P=C>=3?parseFloat(m[2]):0,A=C>=4?parseFloat(m[3]):0;isNaN(S)&&(S=0),isNaN(P)&&(P=0),isNaN(A)&&(A=0),x&&(P=1-P),s(T).textureCoords.push({u:S,v:P,w:A})}function i(m,T){var C=m.length,S=C>=2?parseFloat(m[1]):0,P=C>=3?parseFloat(m[2]):0,A=C>=4?parseFloat(m[3]):0;s(T).vertexNormals.push({x:S,y:P,z:A})}function h(m,T){var C=m.length-1;if(!(C<3)){for(var S={group:a,material:p,vertices:[]},P=0;P3)){var I=0,D=0,B=0;I=parseInt(L[0],10),F>1&&L[1]!==""&&(D=parseInt(L[1],10)),F>2&&(B=parseInt(L[2],10)),I!==0&&(I<0&&(I=s(T).vertices.length+1+I),D-=1,I-=1,B-=1,S.vertices.push({textureCoordsIndex:D,vertexIndex:I,vertexNormalIndex:B}))}}s(T).faces.push(S)}}function u(m,T){m.length>=2&&T.materialLibraries.push(m[1])}function c(m){m.length>=2&&(p=m[1])}var v=function(m,T){T===void 0&&(T=!0),x=T;var C={materials:{},materialLibraries:[],models:[]};a="",p="";for(var S=m.split(` +`),P=0;P{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(37589),p=function(o){for(var s={},r=o.split(` +`),e="",n=0;n=2?Math.floor(i[2]*255):h,c=i.length>=3?Math.floor(i[3]*255):h;s[e]=a(h,u,c);break}}}}return s};d.exports=p},92570:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p,o){var s,r;if(p===void 0&&o===void 0){var e=t.getInCenter();s=e.x,r=e.y}var n=Math.cos(a),l=Math.sin(a),i=t.vertex1,h=t.vertex2,u=t.vertex3,c=i.x-s,v=i.y-r;i.set(c*n-v*l+s,c*l+v*n+r),c=h.x-s,v=h.y-r,h.set(c*n-v*l+s,c*l+v*n+r),c=u.x-s,v=u.y-r,u.set(c*n-v*l+s,c*l+v*n+r)};d.exports=x},39318:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(70554),o=t(25836),s=new a({Extends:o,initialize:function(e,n,l,i,h,u,c,v,m,T){u===void 0&&(u=16777215),c===void 0&&(c=1),v===void 0&&(v=0),m===void 0&&(m=0),T===void 0&&(T=0),o.call(this,e,n,l),this.vx=0,this.vy=0,this.vz=0,this.nx=v,this.ny=m,this.nz=T,this.u=i,this.v=h,this.color=u,this.alpha=c,this.tx=0,this.ty=0,this.ta=0,this.tu=i,this.tv=h},setUVs:function(r,e){return this.u=r,this.v=e,this.tu=r,this.tv=e,this},scrollUV:function(r,e){return this.tu+=r,this.tv+=e,this},scaleUV:function(r,e){return this.tu=this.u*r,this.tv=this.v*e,this},transformCoordinatesLocal:function(r,e,n,l){var i=this.x,h=this.y,u=this.z,c=r.val,v=i*c[0]+h*c[4]+u*c[8]+c[12],m=i*c[1]+h*c[5]+u*c[9]+c[13],T=i*c[2]+h*c[6]+u*c[10]+c[14],C=i*c[3]+h*c[7]+u*c[11]+c[15];this.vx=v/C*e,this.vy=-(m/C)*n,l<=0?this.vz=T/C:this.vz=-(T/C)},resize:function(r,e,n,l,i,h){return this.x=r,this.y=e,this.vx=this.x*n,this.vy=-this.y*l,this.vz=0,i<.5?this.vx+=n*(.5-i):i>.5&&(this.vx-=n*(i-.5)),h<.5?this.vy+=l*(.5-h):h>.5&&(this.vy-=l*(h-.5)),this},update:function(r,e,n,l,i,h,u,c){var v=this.vx*r+this.vy*n+i,m=this.vx*e+this.vy*l+h;return u&&(v=Math.round(v),m=Math.round(m)),this.tx=v,this.ty=m,this.ta=this.alpha*c,this},load:function(r,e,n,l,i){return r[++n]=this.tx,r[++n]=this.ty,r[++n]=this.tu,r[++n]=this.tv,r[++n]=l,r[++n]=i,e[++n]=p.getTintAppendFloatAlpha(this.color,this.ta),n}});d.exports=s},73090:(d,x,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)};d.exports=a},96550:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return t.setTo(Math.ceil(t.x),Math.ceil(t.y))};d.exports=x},99706:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(2141),p=function(o){return new a(o.x,o.y)};d.exports=p},68010:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){return a.setTo(t.x,t.y)};d.exports=x},27814:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){return t.x===a.x&&t.y===a.y};d.exports=x},73565:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return t.setTo(Math.floor(t.x),Math.floor(t.y))};d.exports=x},87555:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(2141),p=function(o,s){if(s===void 0&&(s=new a),!Array.isArray(o))throw new Error("GetCentroid points argument must be an array");var r=o.length;if(r<1)throw new Error("GetCentroid points array must not be empty");if(r===1)s.x=o[0].x,s.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 x=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)};d.exports=x},44405:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return t.x*t.x+t.y*t.y};d.exports=x},20873:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(87841),p=function(o,s){s===void 0&&(s=new a);for(var r=Number.NEGATIVE_INFINITY,e=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,l=Number.POSITIVE_INFINITY,i=0;ir&&(r=h.x),h.xn&&(n=h.y),h.y{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(2141),p=function(o,s,r,e){return r===void 0&&(r=0),e===void 0&&(e=new a),e.x=o.x+(s.x-o.x)*r,e.y=o.y+(s.y-o.y)*r,e};d.exports=p},55767:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return t.setTo(t.y,t.x)};d.exports=x},79432:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(2141),p=function(o,s){return s===void 0&&(s=new a),s.setTo(-o.x,-o.y)};d.exports=p},2141:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(23777),o=new a({initialize:function(r,e){r===void 0&&(r=0),e===void 0&&(e=r),this.type=p.POINT,this.x=r,this.y=e},setTo:function(s,r){return s===void 0&&(s=0),r===void 0&&(r=s),this.x=s,this.y=r,this}});d.exports=o},72930:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(2141),p=t(44405),o=function(s,r,e){e===void 0&&(e=new a);var n=s.x*r.x+s.y*r.y,l=n/p(r);return l!==0&&(e.x=l*r.x,e.y=l*r.y),e};d.exports=o},62880:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(2141),p=function(o,s,r){r===void 0&&(r=new a);var e=o.x*s.x+o.y*s.y;return e!==0&&(r.x=e*s.x,r.y=e*s.y),r};d.exports=p},15093:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(28793),p=function(o,s){if(o.x!==0||o.y!==0){var r=a(o);o.x/=r,o.y/=r}return o.x*=s,o.y*=s,o};d.exports=p},43711:(d,x,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),d.exports=a},12306:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(25717),p=function(o){return new a(o.points)};d.exports=p},63814:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){for(var o=!1,s=-1,r=t.points.length-1;++s{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(63814),p=function(o,s){return a(o,s.x,s.y)};d.exports=p},94811:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */function x(V,H,N){N=N||2;var U=H&&H.length,X=U?H[0]*N:V.length,$=t(V,0,X,N,!0),k=[];if(!$||$.next===$.prev)return k;var Q,J,et,nt,st,ot,ut;if(U&&($=n(V,H,$,N)),V.length>80*N){Q=et=V[0],J=nt=V[1];for(var at=N;atet&&(et=st),ot>nt&&(nt=ot);ut=Math.max(et-Q,nt-J),ut=ut!==0?32767/ut:0}return p($,k,N,Q,J,ut,0),k}function t(V,H,N,U,X){var $,k;if(X===Z(V,H,N,U)>0)for($=H;$=H;$-=U)k=W($,V[$],V[$+1],k);return k&&A(k,k.next)&&(Y(k),k=k.next),k}function a(V,H){if(!V)return V;H||(H=V);var N=V,U;do if(U=!1,!N.steiner&&(A(N,N.next)||P(N.prev,N,N.next)===0)){if(Y(N),N=H=N.prev,N===N.next)break;U=!0}else N=N.next;while(U||N!==H);return H}function p(V,H,N,U,X,$,k){if(V){!k&&$&&c(V,U,X,$);for(var Q=V,J,et;V.prev!==V.next;){if(J=V.prev,et=V.next,$?s(V,U,X,$):o(V)){H.push(J.i/N|0),H.push(V.i/N|0),H.push(et.i/N|0),Y(V),V=et.next,Q=et.next;continue}if(V=et,V===Q){k?k===1?(V=r(a(V),H,N),p(V,H,N,U,X,$,2)):k===2&&e(V,H,N,U,X,$):p(a(V),H,N,U,X,$,1);break}}}}function o(V){var H=V.prev,N=V,U=V.next;if(P(H,N,U)>=0)return!1;for(var X=H.x,$=N.x,k=U.x,Q=H.y,J=N.y,et=U.y,nt=X<$?X$?X>k?X:k:$>k?$:k,ut=Q>J?Q>et?Q:et:J>et?J:et,at=U.next;at!==H;){if(at.x>=nt&&at.x<=ot&&at.y>=st&&at.y<=ut&&C(X,Q,$,J,k,et,at.x,at.y)&&P(at.prev,at,at.next)>=0)return!1;at=at.next}return!0}function s(V,H,N,U){var X=V.prev,$=V,k=V.next;if(P(X,$,k)>=0)return!1;for(var Q=X.x,J=$.x,et=k.x,nt=X.y,st=$.y,ot=k.y,ut=QJ?Q>et?Q:et:J>et?J:et,Et=nt>st?nt>ot?nt:ot:st>ot?st:ot,St=m(ut,at,H,N,U),Ct=m(ct,Et,H,N,U),dt=V.prevZ,Tt=V.nextZ;dt&&dt.z>=St&&Tt&&Tt.z<=Ct;){if(dt.x>=ut&&dt.x<=ct&&dt.y>=at&&dt.y<=Et&&dt!==X&&dt!==k&&C(Q,nt,J,st,et,ot,dt.x,dt.y)&&P(dt.prev,dt,dt.next)>=0||(dt=dt.prevZ,Tt.x>=ut&&Tt.x<=ct&&Tt.y>=at&&Tt.y<=Et&&Tt!==X&&Tt!==k&&C(Q,nt,J,st,et,ot,Tt.x,Tt.y)&&P(Tt.prev,Tt,Tt.next)>=0))return!1;Tt=Tt.nextZ}for(;dt&&dt.z>=St;){if(dt.x>=ut&&dt.x<=ct&&dt.y>=at&&dt.y<=Et&&dt!==X&&dt!==k&&C(Q,nt,J,st,et,ot,dt.x,dt.y)&&P(dt.prev,dt,dt.next)>=0)return!1;dt=dt.prevZ}for(;Tt&&Tt.z<=Ct;){if(Tt.x>=ut&&Tt.x<=ct&&Tt.y>=at&&Tt.y<=Et&&Tt!==X&&Tt!==k&&C(Q,nt,J,st,et,ot,Tt.x,Tt.y)&&P(Tt.prev,Tt,Tt.next)>=0)return!1;Tt=Tt.nextZ}return!0}function r(V,H,N){var U=V;do{var X=U.prev,$=U.next.next;!A(X,$)&&L(X,U,U.next,$)&&B(X,$)&&B($,X)&&(H.push(X.i/N|0),H.push(U.i/N|0),H.push($.i/N|0),Y(U),Y(U.next),U=V=$),U=U.next}while(U!==V);return a(U)}function e(V,H,N,U,X,$){var k=V;do{for(var Q=k.next.next;Q!==k.prev;){if(k.i!==Q.i&&S(k,Q)){var J=z(k,Q);k=a(k,k.next),J=a(J,J.next),p(k,H,N,U,X,$,0),p(J,H,N,U,X,$,0);return}Q=Q.next}k=k.next}while(k!==V)}function n(V,H,N,U){var X=[],$,k,Q,J,et;for($=0,k=H.length;$=N.next.y&&N.next.y!==N.y){var Q=N.x+(X-N.y)*(N.next.x-N.x)/(N.next.y-N.y);if(Q<=U&&Q>$&&($=Q,k=N.x=N.x&&N.x>=et&&U!==N.x&&C(Xk.x||N.x===k.x&&u(k,N)))&&(k=N,st=ot)),N=N.next;while(N!==J);return k}function u(V,H){return P(V.prev,V,H.prev)<0&&P(H.next,V,V.next)<0}function c(V,H,N,U){var X=V;do X.z===0&&(X.z=m(X.x,X.y,H,N,U)),X.prevZ=X.prev,X.nextZ=X.next,X=X.next;while(X!==V);X.prevZ.nextZ=null,X.prevZ=null,v(X)}function v(V){var H,N,U,X,$,k,Q,J,et=1;do{for(N=V,V=null,$=null,k=0;N;){for(k++,U=N,Q=0,H=0;H0||J>0&&U;)Q!==0&&(J===0||!U||N.z<=U.z)?(X=N,N=N.nextZ,Q--):(X=U,U=U.nextZ,J--),$?$.nextZ=X:V=X,X.prevZ=$,$=X;N=U}$.nextZ=null,et*=2}while(k>1);return V}function m(V,H,N,U,X){return V=(V-N)*X|0,H=(H-U)*X|0,V=(V|V<<8)&16711935,V=(V|V<<4)&252645135,V=(V|V<<2)&858993459,V=(V|V<<1)&1431655765,H=(H|H<<8)&16711935,H=(H|H<<4)&252645135,H=(H|H<<2)&858993459,H=(H|H<<1)&1431655765,V|H<<1}function T(V){var H=V,N=V;do(H.x=(V-k)*($-Q)&&(V-k)*(U-Q)>=(N-k)*(H-Q)&&(N-k)*($-Q)>=(X-k)*(U-Q)}function S(V,H){return V.next.i!==H.i&&V.prev.i!==H.i&&!D(V,H)&&(B(V,H)&&B(H,V)&&G(V,H)&&(P(V.prev,V,H.prev)||P(V,H.prev,H))||A(V,H)&&P(V.prev,V,V.next)>0&&P(H.prev,H,H.next)>0)}function P(V,H,N){return(H.y-V.y)*(N.x-H.x)-(H.x-V.x)*(N.y-H.y)}function A(V,H){return V.x===H.x&&V.y===H.y}function L(V,H,N,U){var X=I(P(V,H,N)),$=I(P(V,H,U)),k=I(P(N,U,V)),Q=I(P(N,U,H));return!!(X!==$&&k!==Q||X===0&&F(V,N,H)||$===0&&F(V,U,H)||k===0&&F(N,V,U)||Q===0&&F(N,H,U))}function F(V,H,N){return H.x<=Math.max(V.x,N.x)&&H.x>=Math.min(V.x,N.x)&&H.y<=Math.max(V.y,N.y)&&H.y>=Math.min(V.y,N.y)}function I(V){return V>0?1:V<0?-1:0}function D(V,H){var N=V;do{if(N.i!==V.i&&N.next.i!==V.i&&N.i!==H.i&&N.next.i!==H.i&&L(N,N.next,V,H))return!0;N=N.next}while(N!==V);return!1}function B(V,H){return P(V.prev,V,V.next)<0?P(V,H,V.next)>=0&&P(V,V.prev,H)>=0:P(V,H,V.prev)<0||P(V,V.next,H)<0}function G(V,H){var N=V,U=!1,X=(V.x+H.x)/2,$=(V.y+H.y)/2;do N.y>$!=N.next.y>$&&N.next.y!==N.y&&X<(N.next.x-N.x)*($-N.y)/(N.next.y-N.y)+N.x&&(U=!U),N=N.next;while(N!==V);return U}function z(V,H){var N=new K(V.i,V.x,V.y),U=new K(H.i,H.x,H.y),X=V.next,$=H.prev;return V.next=H,H.prev=V,N.next=X,X.prev=N,U.next=N,N.prev=U,$.next=U,U.prev=$,U}function W(V,H,N,U){var X=new K(V,H,N);return U?(X.next=U.next,X.prev=U,U.next.prev=X,U.next=X):(X.prev=X,X.next=X),X}function Y(V){V.next.prev=V.prev,V.prev.next=V.next,V.prevZ&&(V.prevZ.nextZ=V.nextZ),V.nextZ&&(V.nextZ.prevZ=V.prevZ)}function K(V,H,N){this.i=V,this.x=H,this.y=N,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}x.deviation=function(V,H,N,U){var X=H&&H.length,$=X?H[0]*N:V.length,k=Math.abs(Z(V,0,$,N));if(X)for(var Q=0,J=H.length;Q0&&(U+=V[X-1].length,N.holes.push(U))}return N},d.exports=x},13829:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(87841),p=function(o,s){s===void 0&&(s=new a);for(var r=1/0,e=1/0,n=-r,l=-e,i,h=0;h{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){a===void 0&&(a=[]);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(35001),p=t(23031),o=t(30052),s=function(r,e,n,l){l===void 0&&(l=[]);var i=r.points,h=o(r);!e&&n>0&&(e=h/n);for(var u=0;uv+P){v+=P;continue}var A=S.getPoint((c-v)/P);l.push(A);break}return l};d.exports=s},30052:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(35001),p=t(23031),o=function(s){for(var r=s.points,e=0,n=0;n{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(63814),o=t(9564),s=t(23777),r=new a({initialize:function(n){this.type=s.POLYGON,this.area=0,this.points=[],n&&this.setTo(n)},contains:function(e,n){return p(this,e,n)},setTo:function(e){if(this.area=0,this.points=[],typeof e=="string"&&(e=e.split(" ")),!Array.isArray(e))return this;for(var n,l=0;l{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return t.points.reverse(),t};d.exports=x},29524:d=>{function x(r,e){var n=r.x-e.x,l=r.y-e.y;return n*n+l*l}function t(r,e,n){var l=e.x,i=e.y,h=n.x-l,u=n.y-i;if(h!==0||u!==0){var c=((r.x-l)*h+(r.y-i)*u)/(h*h+u*u);c>1?(l=n.x,i=n.y):c>0&&(l+=h*c,i+=u*c)}return h=r.x-l,u=r.y-i,h*h+u*u}function a(r,e){for(var n=r[0],l=[n],i,h=1,u=r.length;he&&(l.push(i),n=i);return n!==i&&l.push(i),l}function p(r,e,n,l,i){for(var h=l,u,c=e+1;ch&&(u=c,h=v)}h>l&&(u-e>1&&p(r,e,u,l,i),i.push(r[u]),n-u>1&&p(r,u,n,l,i))}function o(r,e){var n=r.length-1,l=[r[0]];return p(r,0,n,e,l),l.push(r[n]),l}var s=function(r,e,n){e===void 0&&(e=1),n===void 0&&(n=!1);var l=r.points;if(l.length>2){var i=e*e;n||(l=a(l,i)),r.setTo(o(l,i))}return r};d.exports=s},5469:d=>{/** + * @author Richard Davey + * @author Igor Ognichenko + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(a,p){return a[0]=p[0],a[1]=p[1],a},t=function(a){var p,o=[],s=a.points;for(p=0;p0&&r.push(x([0,0],o[0])),p=0;p1&&r.push(x([0,0],o[o.length-1])),a.setTo(r)};d.exports=t},24709:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){for(var o=t.points,s=0;s{/** + * @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),d.exports=a},62224:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return t.width*t.height};d.exports=x},98615:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return t.x=Math.ceil(t.x),t.y=Math.ceil(t.y),t};d.exports=x},31688:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=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};d.exports=x},67502:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){return t.x=a-t.width/2,t.y=p-t.height/2,t};d.exports=x},65085:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(87841),p=function(o){return new a(o.x,o.y,o.width,o.height)};d.exports=p},37303:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){return t.width<=0||t.height<=0?!1:t.x<=a&&t.x+t.width>=a&&t.y<=p&&t.y+t.height>=p};d.exports=x},96553:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(37303),p=function(o,s){return a(o,s.x,s.y)};d.exports=p},70273:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=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 x=function(t,a){return a.setTo(t.x,t.y,t.width,t.height)};d.exports=x},77493:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=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};d.exports=x},9219:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){return t.x===a.x&&t.y===a.y&&t.width===a.width&&t.height===a.height};d.exports=x},53751:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(8249),p=function(o,s){var r=a(o);return r{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(8249),p=function(o,s){var r=a(o);return r>a(s)?o.setSize(s.height*r,s.height):o.setSize(s.width,s.width/r),o.setPosition(s.centerX-o.width/2,s.centerY-o.height/2)};d.exports=p},80774:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t};d.exports=x},83859:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=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};d.exports=x},19217:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(87841),p=t(36383),o=function(s,r){if(r===void 0&&(r=new a),s.length===0)return r;for(var e=Number.MAX_VALUE,n=Number.MAX_VALUE,l=p.MIN_SAFE_INTEGER,i=p.MIN_SAFE_INTEGER,h,u,c,v=0;v{/** + * @author samme + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(87841),p=function(o,s,r,e,n){return n===void 0&&(n=new a),n.setTo(Math.min(o,r),Math.min(s,e),Math.abs(o-r),Math.abs(s-e))};d.exports=p},8249:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return t.height===0?NaN:t.width/t.height};d.exports=x},27165:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(2141),p=function(o,s){return s===void 0&&(s=new a),s.x=o.centerX,s.y=o.centerY,s};d.exports=p},20812:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(13019),p=t(2141),o=function(s,r,e){if(e===void 0&&(e=new p),r<=0||r>=1)return e.x=s.x,e.y=s.y,e;var n=a(s)*r;return r>.5?(n-=s.width+s.height,n<=s.width?(e.x=s.right-n,e.y=s.bottom):(e.x=s.x,e.y=s.bottom-(n-s.width))):n<=s.width?(e.x=s.x+n,e.y=s.y):(e.x=s.right,e.y=s.y+(n-s.width)),e};d.exports=o},34819:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(20812),p=t(13019),o=function(s,r,e,n){n===void 0&&(n=[]),!r&&e>0&&(r=p(s)/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(2141),p=function(o,s){return s===void 0&&(s=new a),s.x=o.width,s.y=o.height,s};d.exports=p},86091:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(67502),p=function(o,s,r){var e=o.centerX,n=o.centerY;return o.setSize(o.width+s*2,o.height+r*2),a(o,e,n)};d.exports=p},53951:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(87841),p=t(59996),o=function(s,r,e){return e===void 0&&(e=new a),p(s,r)?(e.x=Math.max(s.x,r.x),e.y=Math.max(s.y,r.y),e.width=Math.min(s.right,r.right)-e.x,e.height=Math.min(s.bottom,r.bottom)-e.y):e.setEmpty(),e};d.exports=o},14649:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(13019),p=t(2141),o=function(s,r,e,n){if(n===void 0&&(n=[]),!r&&!e)return n;r?e=Math.round(a(s)/r):r=a(s)/e;for(var l=s.x,i=s.y,h=0,u=0;u=s.right&&(h=1,i+=l-s.right,l=s.right);break;case 1:i+=r,i>=s.bottom&&(h=2,l-=i-s.bottom,i=s.bottom);break;case 2:l-=r,l<=s.left&&(h=3,i-=s.left-l,l=s.left);break;case 3:i-=r,i<=s.top&&(h=0,i=s.top);break}return n};d.exports=o},33595:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){for(var p=t.x,o=t.right,s=t.y,r=t.bottom,e=0;e{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){var p=Math.min(t.x,a.x),o=Math.max(t.right,a.right);t.x=p,t.width=o-p;var s=Math.min(t.y,a.y),r=Math.max(t.bottom,a.bottom);return t.y=s,t.height=r-s,t};d.exports=x},92171:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){var o=Math.min(t.x,a),s=Math.max(t.right,a);t.x=o,t.width=s-o;var r=Math.min(t.y,p),e=Math.max(t.bottom,p);return t.y=r,t.height=e-r,t};d.exports=x},42981:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){return t.x+=a,t.y+=p,t};d.exports=x},46907:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){return t.x+=a.x,t.y+=a.y,t};d.exports=x},60170:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){return t.xa.x&&t.ya.y};d.exports=x},13019:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return 2*(t.width+t.height)};d.exports=x},85133:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(2141),p=t(39506),o=function(s,r,e){e===void 0&&(e=new a),r=p(r);var n=Math.sin(r),l=Math.cos(r),i=l>0?s.width/2:s.width/-2,h=n>0?s.height/2:s.height/-2;return Math.abs(i*n){/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(2141),p=function(o,s){return s===void 0&&(s=new a),s.x=o.x+Math.random()*o.width,s.y=o.y+Math.random()*o.height,s};d.exports=p},86470:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(30976),p=t(70273),o=t(2141),s=function(r,e,n){if(n===void 0&&(n=new o),p(r,e))switch(a(0,3)){case 0:n.x=r.x+Math.random()*(e.right-r.x),n.y=r.y+Math.random()*(e.top-r.y);break;case 1:n.x=e.x+Math.random()*(r.right-e.x),n.y=e.bottom+Math.random()*(r.bottom-e.bottom);break;case 2:n.x=r.x+Math.random()*(e.x-r.x),n.y=e.y+Math.random()*(r.bottom-e.y);break;case 3:n.x=e.right+Math.random()*(r.right-e.right),n.y=r.y+Math.random()*(e.bottom-r.y);break}return n};d.exports=s},87841:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(37303),o=t(20812),s=t(34819),r=t(23777),e=t(23031),n=t(26597),l=new a({initialize:function(h,u,c,v){h===void 0&&(h=0),u===void 0&&(u=0),c===void 0&&(c=0),v===void 0&&(v=0),this.type=r.RECTANGLE,this.x=h,this.y=u,this.width=c,this.height=v},contains:function(i,h){return p(this,i,h)},getPoint:function(i,h){return o(this,i,h)},getPoints:function(i,h,u){return s(this,i,h,u)},getRandomPoint:function(i){return n(this,i)},setTo:function(i,h,u,c){return this.x=i,this.y=h,this.width=u,this.height=c,this},setEmpty:function(){return this.setTo(0,0,0,0)},setPosition:function(i,h){return h===void 0&&(h=i),this.x=i,this.y=h,this},setSize:function(i,h){return h===void 0&&(h=i),this.width=i,this.height=h,this},isEmpty:function(){return this.width<=0||this.height<=0},getLineA:function(i){return i===void 0&&(i=new e),i.setTo(this.x,this.y,this.right,this.y),i},getLineB:function(i){return i===void 0&&(i=new e),i.setTo(this.right,this.y,this.right,this.bottom),i},getLineC:function(i){return i===void 0&&(i=new e),i.setTo(this.right,this.bottom,this.x,this.bottom),i},getLineD:function(i){return i===void 0&&(i=new e),i.setTo(this.x,this.bottom,this.x,this.y),i},left:{get:function(){return this.x},set:function(i){i>=this.right?this.width=0:this.width=this.right-i,this.x=i}},right:{get:function(){return this.x+this.width},set:function(i){i<=this.x?this.width=0:this.width=i-this.x}},top:{get:function(){return this.y},set:function(i){i>=this.bottom?this.height=0:this.height=this.bottom-i,this.y=i}},bottom:{get:function(){return this.y+this.height},set:function(i){i<=this.y?this.height=0:this.height=i-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(i){this.x=i-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(i){this.y=i-this.height/2}}});d.exports=l},94845:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){return t.width===a.width&&t.height===a.height};d.exports=x},31730:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){return p===void 0&&(p=a),t.width*=a,t.height*=p,t};d.exports=x},36899:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(87841),p=function(o,s,r){r===void 0&&(r=new a);var e=Math.min(o.x,s.x),n=Math.min(o.y,s.y),l=Math.max(o.right,s.right)-e,i=Math.max(o.bottom,s.bottom)-n;return r.setTo(e,n,l,i)};d.exports=p},93232:(d,x,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),d.exports=a},41658:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){var a=t.x1,p=t.y1,o=t.x2,s=t.y2,r=t.x3,e=t.y3;return Math.abs(((r-a)*(s-p)-(o-a)*(e-p))/2)};d.exports=x},39208:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(16483),p=function(o,s,r){var e=r*(Math.sqrt(3)/2),n=o,l=s,i=o+r/2,h=s+e,u=o-r/2,c=s+e;return new a(n,l,i,h,u,c)};d.exports=p},39545:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(94811),p=t(16483),o=function(s,r,e,n,l){r===void 0&&(r=null),e===void 0&&(e=1),n===void 0&&(n=1),l===void 0&&(l=[]);for(var i=a(s,r),h,u,c,v,m,T,C,S,P,A=0;A{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(16483),p=function(o,s,r,e){e===void 0&&(e=r);var n=o,l=s,i=o,h=s-e,u=o+r,c=s;return new a(n,l,i,h,u,c)};d.exports=p},23707:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(97523),p=t(13584),o=function(s,r,e,n){n===void 0&&(n=a);var l=n(s),i=r-l.x,h=e-l.y;return p(s,i,h)};d.exports=o},97523:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(2141),p=function(o,s){return s===void 0&&(s=new a),s.x=(o.x1+o.x2+o.x3)/3,s.y=(o.y1+o.y2+o.y3)/3,s};d.exports=p},24951:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(26099);function p(s,r,e,n){return s*n-r*e}var o=function(s,r){r===void 0&&(r=new a);var e=s.x3,n=s.y3,l=s.x1-e,i=s.y1-n,h=s.x2-e,u=s.y2-n,c=2*p(l,i,h,u),v=p(i,l*l+i*i,u,h*h+u*u),m=p(l,l*l+i*i,h,h*h+u*u);return r.x=e-v/c,r.y=n+m/c,r};d.exports=o},85614:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(96503),p=function(o,s){s===void 0&&(s=new a);var r=o.x1,e=o.y1,n=o.x2,l=o.y2,i=o.x3,h=o.y3,u=n-r,c=l-e,v=i-r,m=h-e,T=u*(r+n)+c*(e+l),C=v*(r+i)+m*(e+h),S=2*(u*(h-l)-c*(i-n)),P,A;if(Math.abs(S)<1e-6){var L=Math.min(r,n,i),F=Math.min(e,l,h);P=(Math.max(r,n,i)-L)*.5,A=(Math.max(e,l,h)-F)*.5,s.x=L+P,s.y=F+A,s.radius=Math.sqrt(P*P+A*A)}else s.x=(m*T-c*C)/S,s.y=(u*C-v*T)/S,P=s.x-r,A=s.y-e,s.radius=Math.sqrt(P*P+A*A);return s};d.exports=p},74422:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(16483),p=function(o){return new a(o.x1,o.y1,o.x2,o.y2,o.x3,o.y3)};d.exports=p},10690:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){var o=t.x3-t.x1,s=t.y3-t.y1,r=t.x2-t.x1,e=t.y2-t.y1,n=a-t.x1,l=p-t.y1,i=o*o+s*s,h=o*r+s*e,u=o*n+s*l,c=r*r+e*e,v=r*n+e*l,m=i*c-h*h,T=m===0?0:1/m,C=(c*u-h*v)*T,S=(i*v-h*u)*T;return C>=0&&S>=0&&C+S<1};d.exports=x},48653:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p,o){p===void 0&&(p=!1),o===void 0&&(o=[]);for(var s=t.x3-t.x1,r=t.y3-t.y1,e=t.x2-t.x1,n=t.y2-t.y1,l=s*s+r*r,i=s*e+r*n,h=e*e+n*n,u=l*h-i*i,c=u===0?0:1/u,v,m,T,C,S,P,A=t.x1,L=t.y1,F=0;F=0&&m>=0&&v+m<1&&(o.push({x:a[F].x,y:a[F].y}),p)));F++);return o};d.exports=x},96006:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(10690),p=function(o,s){return a(o,s.x,s.y)};d.exports=p},71326:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){return a.setTo(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)};d.exports=x},71694:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=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};d.exports=x},33522:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=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};d.exports=x},20437:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(2141),p=t(35001),o=function(s,r,e){e===void 0&&(e=new a);var n=s.getLineA(),l=s.getLineB(),i=s.getLineC();if(r<=0||r>=1)return e.x=n.x1,e.y=n.y1,e;var h=p(n),u=p(l),c=p(i),v=h+u+c,m=v*r,T=0;return mh+u?(m-=h+u,T=m/c,e.x=i.x1+(i.x2-i.x1)*T,e.y=i.y1+(i.y2-i.y1)*T):(m-=h,T=m/u,e.x=l.x1+(l.x2-l.x1)*T,e.y=l.y1+(l.y2-l.y1)*T),e};d.exports=o},80672:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(35001),p=t(2141),o=function(s,r,e,n){n===void 0&&(n=[]);var l=s.getLineA(),i=s.getLineB(),h=s.getLineC(),u=a(l),c=a(i),v=a(h),m=u+c+v;!r&&e>0&&(r=m/e);for(var T=0;Tu+c?(C-=u+c,S=C/v,P.x=h.x1+(h.x2-h.x1)*S,P.y=h.y1+(h.y2-h.y1)*S):(C-=u,S=C/c,P.x=i.x1+(i.x2-i.x1)*S,P.y=i.y1+(i.y2-i.y1)*S),n.push(P)}return n};d.exports=o},39757:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(2141);function p(s,r,e,n){var l=s-e,i=r-n,h=l*l+i*i;return Math.sqrt(h)}var o=function(s,r){r===void 0&&(r=new a);var e=s.x1,n=s.y1,l=s.x2,i=s.y2,h=s.x3,u=s.y3,c=p(h,u,l,i),v=p(e,n,h,u),m=p(l,i,e,n),T=c+v+m;return r.x=(e*c+l*v+h*m)/T,r.y=(n*c+i*v+u*m)/T,r};d.exports=o},13584:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){return t.x1+=a,t.y1+=p,t.x2+=a,t.y2+=p,t.x3+=a,t.y3+=p,t};d.exports=x},1376:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(35001),p=function(o){var s=o.getLineA(),r=o.getLineB(),e=o.getLineC();return a(s)+a(r)+a(e)};d.exports=p},90260:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(2141),p=function(o,s){s===void 0&&(s=new a);var r=o.x2-o.x1,e=o.y2-o.y1,n=o.x3-o.x1,l=o.y3-o.y1,i=Math.random(),h=Math.random();return i+h>=1&&(i=1-i,h=1-h),s.x=o.x1+(r*i+n*h),s.y=o.y1+(e*i+l*h),s};d.exports=p},52172:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(99614),p=t(39757),o=function(s,r){var e=p(s);return a(s,e.x,e.y,r)};d.exports=o},49907:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(99614),p=function(o,s,r){return a(o,s.x,s.y,r)};d.exports=p},99614:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p,o){var s=Math.cos(o),r=Math.sin(o),e=t.x1-a,n=t.y1-p;return t.x1=e*s-n*r+a,t.y1=e*r+n*s+p,e=t.x2-a,n=t.y2-p,t.x2=e*s-n*r+a,t.y2=e*r+n*s+p,e=t.x3-a,n=t.y3-p,t.x3=e*s-n*r+a,t.y3=e*r+n*s+p,t};d.exports=x},16483:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(10690),o=t(20437),s=t(80672),r=t(23777),e=t(23031),n=t(90260),l=new a({initialize:function(h,u,c,v,m,T){h===void 0&&(h=0),u===void 0&&(u=0),c===void 0&&(c=0),v===void 0&&(v=0),m===void 0&&(m=0),T===void 0&&(T=0),this.type=r.TRIANGLE,this.x1=h,this.y1=u,this.x2=c,this.y2=v,this.x3=m,this.y3=T},contains:function(i,h){return p(this,i,h)},getPoint:function(i,h){return o(this,i,h)},getPoints:function(i,h,u){return s(this,i,h,u)},getRandomPoint:function(i){return n(this,i)},setTo:function(i,h,u,c,v,m){return i===void 0&&(i=0),h===void 0&&(h=0),u===void 0&&(u=0),c===void 0&&(c=0),v===void 0&&(v=0),m===void 0&&(m=0),this.x1=i,this.y1=h,this.x2=u,this.y2=c,this.x3=v,this.y3=m,this},getLineA:function(i){return i===void 0&&(i=new e),i.setTo(this.x1,this.y1,this.x2,this.y2),i},getLineB:function(i){return i===void 0&&(i=new e),i.setTo(this.x2,this.y2,this.x3,this.y3),i},getLineC:function(i){return i===void 0&&(i=new e),i.setTo(this.x3,this.y3,this.x1,this.y1),i},left:{get:function(){return Math.min(this.x1,this.x2,this.x3)},set:function(i){var h=0;this.x1<=this.x2&&this.x1<=this.x3?h=this.x1-i:this.x2<=this.x1&&this.x2<=this.x3?h=this.x2-i:h=this.x3-i,this.x1-=h,this.x2-=h,this.x3-=h}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(i){var h=0;this.x1>=this.x2&&this.x1>=this.x3?h=this.x1-i:this.x2>=this.x1&&this.x2>=this.x3?h=this.x2-i:h=this.x3-i,this.x1-=h,this.x2-=h,this.x3-=h}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(i){var h=0;this.y1<=this.y2&&this.y1<=this.y3?h=this.y1-i:this.y2<=this.y1&&this.y2<=this.y3?h=this.y2-i:h=this.y3-i,this.y1-=h,this.y2-=h,this.y3-=h}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(i){var h=0;this.y1>=this.y2&&this.y1>=this.y3?h=this.y1-i:this.y2>=this.y1&&this.y2>=this.y3?h=this.y2-i:h=this.y3-i,this.y1-=h,this.y2-=h,this.y3-=h}}});d.exports=l},84435:(d,x,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),d.exports=a},74457:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){return{gameObject:t,enabled:!0,draggable:!1,dropZone:!1,cursor:!1,target:null,camera:null,hitArea:a,hitAreaCallback:p,hitAreaDebug:null,customHitArea:!1,localX:0,localY:0,dragState:0,dragStartX:0,dragStartY:0,dragStartXGlobal:0,dragStartYGlobal:0,dragX:0,dragY:0}};d.exports=x},84409:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){return function(p,o,s,r){var e=t.getPixelAlpha(o,s,r.texture.key,r.frame.name);return e&&e>=a}};d.exports=x},7003:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(93301),o=t(50792),s=t(8214),r=t(8443),e=t(78970),n=t(85098),l=t(42515),i=t(36210),h=t(61340),u=t(85955),c=new a({initialize:function(m,T){this.game=m,this.scaleManager,this.canvas,this.config=T,this.enabled=!0,this.events=new o,this.isOver=!0,this.defaultCursor="",this.keyboard=T.inputKeyboard?new e(this):null,this.mouse=T.inputMouse?new n(this):null,this.touch=T.inputTouch?new i(this):null,this.pointers=[],this.pointersTotal=T.inputActivePointers,T.inputTouch&&this.pointersTotal===1&&(this.pointersTotal=2);for(var C=0;C<=this.pointersTotal;C++){var S=new l(this,C);S.smoothFactor=T.inputSmoothFactor,this.pointers.push(S)}this.mousePointer=T.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 h,this._tempMatrix2=new h,this._tempSkip=!1,this.mousePointerContainer=[this.mousePointer],m.events.once(r.BOOT,this.boot,this)},boot:function(){var v=this.game,m=v.events;this.canvas=v.canvas,this.scaleManager=v.scale,this.events.emit(s.MANAGER_BOOT),m.on(r.PRE_RENDER,this.preRender,this),m.once(r.DESTROY,this.destroy,this)},setCanvasOver:function(v){this.isOver=!0,this.events.emit(s.GAME_OVER,v)},setCanvasOut:function(v){this.isOver=!1,this.events.emit(s.GAME_OUT,v)},preRender:function(){var v=this.game.loop.now,m=this.game.loop.delta,T=this.game.scene.getScenes(!0,!0);this.time=v,this.events.emit(s.MANAGER_UPDATE);for(var C=0;C10&&(v=10-this.pointersTotal);for(var T=0;T{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(96503),p=t(87902),o=t(83419),s=t(93301),r=t(74457),e=t(84409),n=t(20339),l=t(8497),i=t(81154),h=t(8214),u=t(50792),c=t(95540),v=t(23777),m=t(89639),T=t(41212),C=t(37277),S=t(87841),P=t(37303),A=t(44594),L=t(16483),F=t(10690),I=new o({Extends:u,initialize:function(B){u.call(this),this.scene=B,this.systems=B.sys,this.settings=B.sys.settings,this.manager=B.sys.game.input,this.pluginEvents=new u,this.enabled=!0,this.displayList,this.cameras,m.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(A.BOOT,this.boot,this),B.sys.events.on(A.START,this.start,this)},boot:function(){this.cameras=this.systems.cameras,this.displayList=this.systems.displayList,this.systems.events.once(A.DESTROY,this.destroy,this),this.pluginEvents.emit(h.BOOT)},start:function(){var D=this.systems.events;D.on(A.TRANSITION_START,this.transitionIn,this),D.on(A.TRANSITION_OUT,this.transitionOut,this),D.on(A.TRANSITION_COMPLETE,this.transitionComplete,this),D.on(A.PRE_UPDATE,this.preUpdate,this),D.once(A.SHUTDOWN,this.shutdown,this),this.manager.events.on(h.GAME_OUT,this.onGameOut,this),this.manager.events.on(h.GAME_OVER,this.onGameOver,this),this.enabled=!0,this._dragState=[0,0,0,0,0,0,0,0,0,0],this.pluginEvents.emit(h.START)},onGameOver:function(D){this.isActive()&&this.emit(h.GAME_OVER,D.timeStamp,D)},onGameOut:function(D){this.isActive()&&this.emit(h.GAME_OUT,D.timeStamp,D)},preUpdate:function(){this.pluginEvents.emit(h.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,Y=0;Y-1&&(W.splice(Z,1),this.clear(K,!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(h.UPDATE,D,B),this._updatedThisFrame)return this._updatedThisFrame=!1,!1;var G,z=this.manager,W=z.pointers,Y=z.pointersTotal;for(G=0;G0)if(this._pollTimer-=B,this._pollTimer<0)this._pollTimer=this.pollRate;else return!1;var Z=!1;for(G=0;G0&&(Z=!0)}return Z},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,Y=0,K;Y-1&&G[Y].splice(K,1),K=z[Y].indexOf(D),K>-1&&z[Y].splice(K,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 Y=!1,K=0;K0&&n(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(h.GAMEOBJECT_DRAG_LEAVE,D,K),this.emit(h.DRAG_LEAVE,D,W,K),Y.target=B[0],K=Y.target,W.emit(h.GAMEOBJECT_DRAG_ENTER,D,K),this.emit(h.DRAG_ENTER,D,W,K)):(W.emit(h.GAMEOBJECT_DRAG_LEAVE,D,K),this.emit(h.DRAG_LEAVE,D,W,K),B[0]?(Y.target=B[0],K=Y.target,W.emit(h.GAMEOBJECT_DRAG_ENTER,D,K),this.emit(h.DRAG_ENTER,D,W,K)):Y.target=null)}else!K&&B[0]&&(Y.target=B[0],K=Y.target,W.emit(h.GAMEOBJECT_DRAG_ENTER,D,K),this.emit(h.DRAG_ENTER,D,W,K));var V,H;if(!W.parentContainer)V=D.worldX-Y.dragX,H=D.worldY-Y.dragY;else{var N=D.worldX-Y.dragStartXGlobal,U=D.worldY-Y.dragStartYGlobal,X=W.getParentRotation(),$=N*Math.cos(X)+U*Math.sin(X),k=U*Math.cos(X)-N*Math.sin(X);$*=1/W.parentContainer.scaleX,k*=1/W.parentContainer.scaleY,V=$+Y.dragStartX,H=k+Y.dragStartY}W.emit(h.GAMEOBJECT_DRAG,D,V,H),this.emit(h.DRAG,D,W,V,H)}return G.length},processDragUpEvent:function(D){for(var B=this._drag[D.id],G=0;G0){var Y=this.manager,K=this._eventData,Z=this._eventContainer;K.cancelled=!1;for(var V=!1,H=0;H0){var W=this.manager,Y=this._eventData,K=this._eventContainer;Y.cancelled=!1;var Z=!1;this.sortGameObjects(B,D);for(var V=0;V0){for(this.sortGameObjects(W,D),G=0;G0){for(this.sortGameObjects(Y,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 e(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,Y=!1,K=!1,Z=!1,V=!0;if(T(B)&&Object.keys(B).length){var H=B,N=D.some(function(Q){return Q.hasOwnProperty("faces")});if(!N){B=c(H,"hitArea",null),G=c(H,"hitAreaCallback",null),Z=c(H,"pixelPerfect",!1);var U=c(H,"alphaTolerance",1);Z&&(B={},G=this.makePixelPerfect(U))}z=c(H,"draggable",!1),W=c(H,"dropZone",!1),Y=c(H,"cursor",!1),K=c(H,"useHandCursor",!1),(!B||!G)&&(this.setHitAreaFromTexture(D),V=!1)}else typeof B=="function"&&!G&&(G=B,B={});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(35154),p={},o={};o.register=function(s,r,e,n,l){p[s]={plugin:r,mapping:e,settingsKey:n,configKey:l}},o.getPlugin=function(s){return p[s]},o.install=function(s){var r=s.scene.sys,e=r.settings.input,n=r.game.config;for(var l in p){var i=p[l].plugin,h=p[l].mapping,u=p[l].settingsKey,c=p[l].configKey;a(e,u,n[c])&&(s[h]=new i(s))}},o.remove=function(s){p.hasOwnProperty(s)&&delete p[s]},d.exports=o},42515:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(31040),p=t(83419),o=t(20339),s=t(43855),r=t(47235),e=t(26099),n=t(25892),l=new p({initialize:function(h,u){this.manager=h,this.id=u,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=u===0,this.locked=!1,this.deltaX=0,this.deltaY=0,this.deltaZ=0},updateWorldPoint:function(i){var h=i.getWorldPoint(this.x,this.y);return this.worldX=h.x,this.worldY=h.y,this},positionToCamera:function(i,h){return i.getWorldPoint(this.x,this.y,h)},updateMotion:function(){var i=this.position.x,h=this.position.y,u=this.midPoint.x,c=this.midPoint.y;if(!(i===u&&h===c)){var v=r(this.motionFactor,u,i),m=r(this.motionFactor,c,h);s(v,i,.1)&&(v=i),s(m,h,.1)&&(m=h),this.midPoint.set(v,m);var T=i-v,C=h-m;this.velocity.set(T,C),this.angle=a(v,m,i,h),this.distance=Math.sqrt(T*T+C*C)}},up:function(i){"buttons"in i&&(this.buttons=i.buttons),this.event=i,this.button=i.button,this.upElement=i.target,this.manager.transformPointer(this,i.pageX,i.pageY,!1),i.button===0&&(this.primaryDown=!1,this.upX=this.x,this.upY=this.y),this.buttons===0&&(this.isDown=!1,this.upTime=i.timeStamp,this.wasTouch=!1)},down:function(i){"buttons"in i&&(this.buttons=i.buttons),this.event=i,this.button=i.button,this.downElement=i.target,this.manager.transformPointer(this,i.pageX,i.pageY,!1),i.button===0&&(this.primaryDown=!0,this.downX=this.x,this.downY=this.y),n.macOS&&i.ctrlKey&&(this.buttons=2,this.primaryDown=!1),this.isDown||(this.isDown=!0,this.downTime=i.timeStamp),this.wasTouch=!1},move:function(i){"buttons"in i&&(this.buttons=i.buttons),this.event=i,this.manager.transformPointer(this,i.pageX,i.pageY,!0),this.locked&&(this.movementX=i.movementX||i.mozMovementX||i.webkitMovementX||0,this.movementY=i.movementY||i.mozMovementY||i.webkitMovementY||0),this.moveTime=i.timeStamp,this.wasTouch=!1},wheel:function(i){"buttons"in i&&(this.buttons=i.buttons),this.event=i,this.manager.transformPointer(this,i.pageX,i.pageY,!1),this.deltaX=i.deltaX,this.deltaY=i.deltaY,this.deltaZ=i.deltaZ,this.wasTouch=!1},touchstart:function(i,h){i.pointerId&&(this.pointerId=i.pointerId),this.identifier=i.identifier,this.target=i.target,this.active=!0,this.buttons=1,this.event=h,this.downElement=i.target,this.manager.transformPointer(this,i.pageX,i.pageY,!1),this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=h.timeStamp,this.isDown=!0,this.wasTouch=!0,this.wasCanceled=!1,this.updateMotion()},touchmove:function(i,h){this.event=h,this.manager.transformPointer(this,i.pageX,i.pageY,!0),this.moveTime=h.timeStamp,this.wasTouch=!0,this.updateMotion()},touchend:function(i,h){this.buttons=0,this.event=h,this.upElement=i.target,this.manager.transformPointer(this,i.pageX,i.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=h.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!1,this.active=!1,this.updateMotion()},touchcancel:function(i,h){this.buttons=0,this.event=h,this.upElement=i.target,this.manager.transformPointer(this,i.pageX,i.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=h.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(i,h){i===void 0&&(i=10),h===void 0&&(h=[]);for(var u=this.prevPosition.x,c=this.prevPosition.y,v=this.position.x,m=this.position.y,T=0;T{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x={MOUSE_DOWN:0,MOUSE_MOVE:1,MOUSE_UP:2,TOUCH_START:3,TOUCH_MOVE:4,TOUCH_END:5,POINTER_LOCK_CHANGE:6,TOUCH_CANCEL:7,MOUSE_WHEEL:8};d.exports=x},7179:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="boot"},85375:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="destroy"},39843:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="dragend"},23388:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="dragenter"},16133:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="drag"},27829:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="dragleave"},53904:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="dragover"},56058:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="dragstart"},2642:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="drop"},88171:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="gameobjectdown"},36147:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="dragend"},71692:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="dragenter"},96149:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="drag"},81285:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="dragleave"},74048:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="dragover"},21322:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="dragstart"},49378:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="drop"},86754:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="gameobjectmove"},86433:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="gameobjectout"},60709:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="gameobjectover"},24081:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="pointerdown"},11172:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="pointermove"},18907:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="pointerout"},95579:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="pointerover"},35368:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="pointerup"},26972:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="wheel"},47078:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="gameobjectup"},73802:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="gameobjectwheel"},56718:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="gameout"},25936:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="gameover"},27503:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="boot"},50852:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="process"},96438:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="update"},59152:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="pointerlockchange"},47777:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="pointerdown"},27957:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="pointerdownoutside"},19444:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="pointermove"},54251:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="pointerout"},18667:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="pointerover"},27192:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="pointerup"},24652:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="pointerupoutside"},45132:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="wheel"},44512:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="preupdate"},15757:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="shutdown"},41637:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="start"},93802:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="update"},8214:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.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:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=new a({initialize:function(s,r){this.pad=s,this.events=s.events,this.index=r,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),p=t(92734),o=new a({initialize:function(r,e){this.pad=r,this.events=r.manager,this.index=e,this.value=0,this.threshold=1,this.pressed=!1},update:function(s){this.value=s;var r=this.pad,e=this.index;s>=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(p.BUTTON_DOWN,r,this,s),this.pad.emit(p.GAMEPAD_BUTTON_DOWN,e,s,this)):this.pressed&&(this.pressed=!1,this.events.emit(p.BUTTON_UP,r,this,s),this.pad.emit(p.GAMEPAD_BUTTON_UP,e,s,this))},destroy:function(){this.pad=null,this.events=null}});d.exports=o},99125:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(97421),p=t(28884),o=t(83419),s=t(50792),r=t(26099),e=new o({Extends:s,initialize:function(l,i){s.call(this),this.manager=l,this.pad=i,this.id=i.id,this.index=i.index;for(var h=[],u=0;u=2&&(this.leftStick.set(c[0].getValue(),c[1].getValue()),u>=4&&this.rightStick.set(c[2].getValue(),c[3].getValue()))}},destroy:function(){this.removeAllListeners(),this.manager=null,this.pad=null;var n;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(83419),p=t(50792),o=t(92734),s=t(99125),r=t(35154),e=t(89639),n=t(8214),l=new a({Extends:p,initialize:function(h){p.call(this),this.scene=h.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=h,this.enabled=!0,this.target,this.gamepads=[],this.queue=[],this.onGamepadHandler,this._pad1,this._pad2,this._pad3,this._pad4,h.pluginEvents.once(n.BOOT,this.boot,this),h.pluginEvents.on(n.START,this.start,this)},boot:function(){var i=this.scene.sys.game,h=this.settings.input,u=i.config;this.enabled=r(h,"gamepad",u.inputGamepad)&&i.device.input.gamepads,this.target=r(h,"gamepad.target",u.inputGamepadEventTarget),this.sceneInputPlugin.pluginEvents.once(n.DESTROY,this.destroy,this)},start:function(){this.enabled&&(this.startListeners(),this.refreshPads()),this.sceneInputPlugin.pluginEvents.once(n.SHUTDOWN,this.shutdown,this)},isActive:function(){return this.enabled&&this.scene.sys.isActive()},startListeners:function(){var i=this,h=this.target,u=function(c){c.defaultPrevented||!i.isActive()||(i.refreshPads(),i.queue.push(c))};this.onGamepadHandler=u,h.addEventListener("gamepadconnected",u,!1),h.addEventListener("gamepaddisconnected",u,!1),this.sceneInputPlugin.pluginEvents.on(n.UPDATE,this.update,this)},stopListeners:function(){this.target.removeEventListener("gamepadconnected",this.onGamepadHandler),this.target.removeEventListener("gamepaddisconnected",this.onGamepadHandler),this.sceneInputPlugin.pluginEvents.off(n.UPDATE,this.update);for(var i=0;i{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.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:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.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:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.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:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports={DUALSHOCK_4:t(65294),SNES_USB:t(89651),XBOX_360:t(90089)}},46008:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="down"},7629:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="up"},42206:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="connected"},86544:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="disconnected"},94784:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="down"},14325:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="up"},92734:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.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:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports={Axis:t(97421),Button:t(28884),Events:t(92734),Gamepad:t(99125),GamepadPlugin:t(56654),Configs:t(64894)}},14350:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(93301),p=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=p(!1,o,a),d.exports=o},78970:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(72905),p=t(83419),o=t(8443),s=t(8214),r=t(46032),e=t(29747),n=new p({initialize:function(i){this.manager=i,this.queue=[],this.preventDefault=!0,this.captures=[],this.enabled=!1,this.target,this.onKeyDown=e,this.onKeyUp=e,i.events.once(s.MANAGER_BOOT,this.boot,this)},boot:function(){var l=this.manager.config;this.enabled=l.inputKeyboard,this.target=l.inputKeyboardEventTarget,this.addCapture(l.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 l=this;this.onKeyDown=function(h){if(!(h.defaultPrevented||!l.enabled||!l.manager)){l.queue.push(h),l.manager.events.emit(s.MANAGER_PROCESS);var u=h.altKey||h.ctrlKey||h.shiftKey||h.metaKey;l.preventDefault&&!u&&l.captures.indexOf(h.keyCode)>-1&&h.preventDefault()}},this.onKeyUp=function(h){if(!(h.defaultPrevented||!l.enabled||!l.manager)){l.queue.push(h),l.manager.events.emit(s.MANAGER_PROCESS);var u=h.altKey||h.ctrlKey||h.shiftKey||h.metaKey;l.preventDefault&&!u&&l.captures.indexOf(h.keyCode)>-1&&h.preventDefault()}};var i=this.target;i&&(i.addEventListener("keydown",this.onKeyDown,!1),i.addEventListener("keyup",this.onKeyUp,!1),this.enabled=!0)},stopListeners:function(){var l=this.target;l.removeEventListener("keydown",this.onKeyDown,!1),l.removeEventListener("keyup",this.onKeyUp,!1),this.enabled=!1},postUpdate:function(){this.queue=[]},addCapture:function(l){typeof l=="string"&&(l=l.split(",")),Array.isArray(l)||(l=[l]);for(var i=this.captures,h=0;h0},removeCapture:function(l){typeof l=="string"&&(l=l.split(",")),Array.isArray(l)||(l=[l]);for(var i=this.captures,h=0;h0},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}});d.exports=n},28846:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(50792),o=t(95922),s=t(8443),r=t(35154),e=t(8214),n=t(89639),l=t(30472),i=t(46032),h=t(87960),u=t(74600),c=t(44594),v=t(56583),m=new a({Extends:p,initialize:function(C){p.call(this),this.game=C.systems.game,this.scene=C.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=C,this.manager=C.manager.keyboard,this.enabled=!0,this.keys=[],this.combos=[],this.prevCode=null,this.prevTime=0,this.prevType=null,C.pluginEvents.once(e.BOOT,this.boot,this),C.pluginEvents.on(e.START,this.start,this)},boot:function(){var T=this.settings.input;this.enabled=r(T,"keyboard",!0);var C=r(T,"keyboard.capture",null);C&&this.addCaptures(C),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(s.BLUR,this.resetKeys,this),this.scene.sys.events.on(c.PAUSE,this.resetKeys,this),this.scene.sys.events.on(c.SLEEP,this.resetKeys,this)},isActive:function(){return this.enabled&&this.scene.sys.canInput()},addCapture:function(T){return this.manager.addCapture(T),this},removeCapture:function(T){return this.manager.removeCapture(T),this},getCaptures:function(){return this.manager.captures},enableGlobalCapture:function(){return this.manager.preventDefault=!0,this},disableGlobalCapture:function(){return this.manager.preventDefault=!1,this},clearCaptures:function(){return this.manager.clearCaptures(),this},createCursorKeys:function(){return this.addKeys({up:i.UP,down:i.DOWN,left:i.LEFT,right:i.RIGHT,space:i.SPACE,shift:i.SHIFT})},addKeys:function(T,C,S){C===void 0&&(C=!0),S===void 0&&(S=!1);var P={};if(typeof T=="string"){T=T.split(",");for(var A=0;A-1?P[A]=T:P[T.keyCode]=T,C&&this.addCapture(T.keyCode),T.setEmitOnRepeat(S),T}return typeof T=="string"&&(T=i[T.toUpperCase()]),P[T]||(P[T]=new l(this,T),C&&this.addCapture(T),P[T].setEmitOnRepeat(S)),P[T]},removeKey:function(T,C,S){C===void 0&&(C=!1),S===void 0&&(S=!1);var P=this.keys,A;if(T instanceof l){var L=P.indexOf(T);L>-1&&(A=this.keys[L],this.keys[L]=void 0)}else typeof T=="string"&&(T=i[T.toUpperCase()]);return P[T]&&(A=P[T],P[T]=void 0),A&&(A.plugin=null,S&&this.removeCapture(A.keyCode),C&&A.destroy()),this},removeAllKeys:function(T,C){T===void 0&&(T=!1),C===void 0&&(C=!1);for(var S=this.keys,P=0;PT._tick)return T._tick=S,!0}return!1},update:function(){var T=this.manager.queue,C=T.length;if(!(!this.isActive()||C===0))for(var S=this.keys,P=0;P{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){return a.timeLastMatched=t.timeStamp,a.index++,a.index===a.size?!0:(a.current=a.keyCodes[a.index],!1)};d.exports=x},87960:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(95922),o=t(95540),s=t(68769),r=t(92803),e=new a({initialize:function(l,i,h){if(h===void 0&&(h={}),i.length<2)return!1;this.manager=l,this.enabled=!0,this.keyCodes=[];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(66970),p=function(o,s){if(s.matched)return!0;var r=!1,e=!1;if(o.keyCode===s.current)if(s.index>0&&s.maxKeyDelay>0){var n=s.timeLastMatched+s.maxKeyDelay;o.timeStamp<=n&&(e=!0,r=a(o,s))}else e=!0,r=a(o,s);return!e&&s.resetOnWrongKey&&(s.index=0,s.current=s.keyCodes[0]),r&&(s.timeLastMatched=o.timeStamp,s.matched=!0,s.timeMatched=o.timeStamp),r};d.exports=p},92803:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return t.current=t.keyCodes[0],t.index=0,t.timeLastMatched=0,t.matched=!1,t.timeMatched=0,t};d.exports=x},92612:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="keydown"},23345:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="keyup"},21957:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="keycombomatch"},44743:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="down"},3771:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="keydown-"},46358:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="keyup-"},75674:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="up"},95922:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.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:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.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:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){a===void 0&&(a=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 x=function(t){return t._justDown?(t._justDown=!1,!0):!1};d.exports=x},38796:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return t._justUp?(t._justUp=!1,!0):!1};d.exports=x},30472:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(50792),o=t(95922),s=new a({Extends:p,initialize:function(e,n){p.call(this),this.plugin=e,this.keyCode=n,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(r){return this.emitOnRepeat=r,this},onDown:function(r){this.originalEvent=r,this.enabled&&(this.altKey=r.altKey,this.ctrlKey=r.ctrlKey,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.location=r.location,this.repeats++,this.isDown?this.emitOnRepeat&&this.emit(o.DOWN,this,r):(this.isDown=!0,this.isUp=!1,this.timeDown=r.timeStamp,this.duration=0,this._justDown=!0,this._justUp=!1,this.emit(o.DOWN,this,r)))},onUp:function(r){this.originalEvent=r,this.enabled&&(this.isDown=!1,this.isUp=!0,this.timeUp=r.timeStamp,this.duration=this.timeUp-this.timeDown,this.repeats=0,this._justDown=!1,this._justUp=!0,this._tick=-1,this.emit(o.UP,this,r))},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}});d.exports=s},46032:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:42,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,NUMPAD_ZERO:96,NUMPAD_ONE:97,NUMPAD_TWO:98,NUMPAD_THREE:99,NUMPAD_FOUR:100,NUMPAD_FIVE:101,NUMPAD_SIX:102,NUMPAD_SEVEN:103,NUMPAD_EIGHT:104,NUMPAD_NINE:105,NUMPAD_ADD:107,NUMPAD_SUBTRACT:109,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,PLUS:187,COMMA:188,MINUS:189,PERIOD:190,FORWARD_SLASH:191,BACK_SLASH:220,QUOTES:222,BACKTICK:192,OPEN_BRACKET:219,CLOSED_BRACKET:221,SEMICOLON_FIREFOX:59,COLON:58,COMMA_FIREFOX_WINDOWS:60,COMMA_FIREFOX:62,BRACKET_RIGHT_FIREFOX:174,BRACKET_LEFT_FIREFOX:175};d.exports=x},74600:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(46032),p={};for(var o in a)p[a[o]]=o;d.exports=p},41170:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){a===void 0&&(a=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 a=t(83419),p=t(89357),o=t(8214),s=t(29747),r=new a({initialize:function(n){this.manager=n,this.preventDefaultDown=!0,this.preventDefaultUp=!0,this.preventDefaultMove=!0,this.preventDefaultWheel=!1,this.enabled=!1,this.target,this.locked=!1,this.onMouseMove=s,this.onMouseDown=s,this.onMouseUp=s,this.onMouseDownWindow=s,this.onMouseUpWindow=s,this.onMouseOver=s,this.onMouseOut=s,this.onMouseWheel=s,this.pointerLockChange=s,this.isTop=!0,n.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(p.pointerLock){var e=this.target;e.requestPointerLock=e.requestPointerLock||e.mozRequestPointerLock||e.webkitRequestPointerLock,e.requestPointerLock()}},releasePointerLock:function(){p.pointerLock&&(document.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock,document.exitPointerLock())},startListeners:function(){var e=this.target;if(e){var n=this,l=this.manager,i=l.canvas,h=window&&window.focus&&l.game.config.autoFocus;this.onMouseMove=function(c){!c.defaultPrevented&&n.enabled&&l&&l.enabled&&(l.onMouseMove(c),n.preventDefaultMove&&c.preventDefault())},this.onMouseDown=function(c){h&&window.focus(),!c.defaultPrevented&&n.enabled&&l&&l.enabled&&(l.onMouseDown(c),n.preventDefaultDown&&c.target===i&&c.preventDefault())},this.onMouseDownWindow=function(c){c.sourceCapabilities&&c.sourceCapabilities.firesTouchEvents||!c.defaultPrevented&&n.enabled&&l&&l.enabled&&c.target!==i&&l.onMouseDown(c)},this.onMouseUp=function(c){!c.defaultPrevented&&n.enabled&&l&&l.enabled&&(l.onMouseUp(c),n.preventDefaultUp&&c.target===i&&c.preventDefault())},this.onMouseUpWindow=function(c){c.sourceCapabilities&&c.sourceCapabilities.firesTouchEvents||!c.defaultPrevented&&n.enabled&&l&&l.enabled&&c.target!==i&&l.onMouseUp(c)},this.onMouseOver=function(c){!c.defaultPrevented&&n.enabled&&l&&l.enabled&&l.setCanvasOver(c)},this.onMouseOut=function(c){!c.defaultPrevented&&n.enabled&&l&&l.enabled&&l.setCanvasOut(c)},this.onMouseWheel=function(c){!c.defaultPrevented&&n.enabled&&l&&l.enabled&&l.onMouseWheel(c),n.preventDefaultWheel&&c.target===i&&c.preventDefault()};var u={passive:!0};if(e.addEventListener("mousemove",this.onMouseMove),e.addEventListener("mousedown",this.onMouseDown),e.addEventListener("mouseup",this.onMouseUp),e.addEventListener("mouseover",this.onMouseOver,u),e.addEventListener("mouseout",this.onMouseOut,u),this.preventDefaultWheel?e.addEventListener("wheel",this.onMouseWheel,{passive:!1}):e.addEventListener("wheel",this.onMouseWheel,u),window&&l.game.config.inputWindowEvents)try{window.top.addEventListener("mousedown",this.onMouseDownWindow,u),window.top.addEventListener("mouseup",this.onMouseUpWindow,u)}catch{window.addEventListener("mousedown",this.onMouseDownWindow,u),window.addEventListener("mouseup",this.onMouseUpWindow,u),this.isTop=!1}p.pointerLock&&(this.pointerLockChange=function(c){var v=n.target;n.locked=document.pointerLockElement===v||document.mozPointerLockElement===v||document.webkitPointerLockElement===v,l.onPointerLockChange(c)},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)),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}});d.exports=r},87078:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports={MouseManager:t(85098)}},36210:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(8214),o=t(29747),s=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(p.MANAGER_BOOT,this.boot,this)},boot:function(){var r=this.manager.config;this.enabled=r.inputTouch,this.target=r.inputTouchEventTarget,this.capture=r.inputTouchCapture,this.target?typeof this.target=="string"&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,r.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return this.target.addEventListener("contextmenu",function(r){return r.preventDefault(),!1}),this},startListeners:function(){var r=this.target;if(r){var e=this,n=this.manager,l=n.canvas,i=window&&window.focus&&n.game.config.autoFocus;this.onTouchMove=function(v){!v.defaultPrevented&&e.enabled&&n&&n.enabled&&(n.onTouchMove(v),e.capture&&v.cancelable&&v.preventDefault())},this.onTouchStart=function(v){i&&window.focus(),!v.defaultPrevented&&e.enabled&&n&&n.enabled&&(n.onTouchStart(v),e.capture&&v.cancelable&&v.target===l&&v.preventDefault())},this.onTouchStartWindow=function(v){!v.defaultPrevented&&e.enabled&&n&&n.enabled&&v.target!==l&&n.onTouchStart(v)},this.onTouchEnd=function(v){!v.defaultPrevented&&e.enabled&&n&&n.enabled&&(n.onTouchEnd(v),e.capture&&v.cancelable&&v.target===l&&v.preventDefault())},this.onTouchEndWindow=function(v){!v.defaultPrevented&&e.enabled&&n&&n.enabled&&v.target!==l&&n.onTouchEnd(v)},this.onTouchCancel=function(v){!v.defaultPrevented&&e.enabled&&n&&n.enabled&&(n.onTouchCancel(v),e.capture&&v.preventDefault())},this.onTouchCancelWindow=function(v){!v.defaultPrevented&&e.enabled&&n&&n.enabled&&n.onTouchCancel(v)};var h=this.capture,u={passive:!0},c={passive:!1};if(r.addEventListener("touchstart",this.onTouchStart,h?c:u),r.addEventListener("touchmove",this.onTouchMove,h?c:u),r.addEventListener("touchend",this.onTouchEnd,h?c:u),r.addEventListener("touchcancel",this.onTouchCancel,h?c:u),window&&n.game.config.inputWindowEvents)try{window.top.addEventListener("touchstart",this.onTouchStartWindow,c),window.top.addEventListener("touchend",this.onTouchEndWindow,c),window.top.addEventListener("touchcancel",this.onTouchCancelWindow,c)}catch{window.addEventListener("touchstart",this.onTouchStartWindow,c),window.addEventListener("touchend",this.onTouchEndWindow,c),window.addEventListener("touchcancel",this.onTouchCancelWindow,c),this.isTop=!1}this.enabled=!0}},stopListeners:function(){var r=this.target;r.removeEventListener("touchstart",this.onTouchStart),r.removeEventListener("touchmove",this.onTouchMove),r.removeEventListener("touchend",this.onTouchEnd),r.removeEventListener("touchcancel",this.onTouchCancel),window&&(r=this.isTop?window.top:window,r.removeEventListener("touchstart",this.onTouchStartWindow),r.removeEventListener("touchend",this.onTouchEndWindow),r.removeEventListener("touchcancel",this.onTouchCancelWindow))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});d.exports=s},95618:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports={TouchManager:t(36210)}},41299:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(23906),o=t(54899),s=t(95540),r=t(98356),e=t(3374),n=t(84376),l=t(92638),i=new a({initialize:function(u,c){if(this.loader=u,this.cache=s(c,"cache",!1),this.type=s(c,"type",!1),!this.type)throw new Error("Invalid File type: "+this.type);this.key=s(c,"key",!1);var v=this.key;if(u.prefix&&u.prefix!==""&&(this.key=u.prefix+v),!this.key)throw new Error("Invalid File key: "+this.key);var m=s(c,"url");m===void 0?m=u.path+v+"."+s(c,"extension",""):typeof m=="string"&&!m.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)&&(m=u.path+m),this.url=m,this.src="",this.xhrSettings=l(s(c,"responseType",void 0)),s(c,"xhrSettings",!1)&&(this.xhrSettings=e(this.xhrSettings,s(c,"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=s(c,"config",{}),this.multiFile,this.linkFile,this.base64=typeof m=="string"&&m.indexOf("data:")===0},setLink:function(h){this.linkFile=h,h.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=r(this,this.loader.baseURL),this.src.indexOf("data:")===0&&(this.base64=!0),this.xhrLoader=n(this,this.loader.xhr))},onLoad:function(h,u){var c=h.responseURL&&this.loader.localSchemes.some(function(T){return h.responseURL.indexOf(T)===0}),v=c&&u.target.status===0,m=!(u.target&&u.target.status!==200)||v;h.readyState===4&&h.status>=400&&h.status<=599&&(m=!1),this.state=p.FILE_LOADED,this.resetXHR(),this.loader.nextFile(this,m)},onBase64Load:function(h){this.xhrLoader=h,this.state=p.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(h){h.lengthComputable&&(this.bytesLoaded=h.loaded,this.bytesTotal=h.total,this.percentComplete=Math.min(this.bytesLoaded/this.bytesTotal,1),this.loader.emit(o.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(h){if(this.state!==p.FILE_PENDING_DESTROY){h===void 0&&(h=this.data);var u=this.key,c=this.type;this.loader.emit(o.FILE_COMPLETE,u,c,h),this.loader.emit(o.FILE_KEY_COMPLETE+c+"-"+u,u,c,h),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}});i.createObjectURL=function(h,u,c){if(typeof URL=="function")h.src=URL.createObjectURL(u);else{var v=new FileReader;v.onload=function(){h.removeAttribute("crossOrigin"),h.src="data:"+(u.type||c)+";base64,"+v.result.split(",")[1]},v.onerror=h.onerror,v.readAsDataURL(u)}},i.revokeObjectURL=function(h){typeof URL=="function"&&URL.revokeObjectURL(h.src)},d.exports=i},74099:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x={},t={install:function(a){for(var p in x)a[p]=x[p]},register:function(a,p){x[a]=p},destroy:function(){x={}}};d.exports=t},98356:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){return t.url?t.url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)?t.url:a+t.url:!1};d.exports=x},74261:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(23906),o=t(35072),s=t(50792),r=t(54899),e=t(74099),n=t(95540),l=t(35154),i=t(37277),h=t(44594),u=t(92638),c=new a({Extends:s,initialize:function(m){s.call(this);var T=m.sys.game.config,C=m.sys.settings.loader;this.scene=m,this.systems=m.sys,this.cacheManager=m.sys.cache,this.textureManager=m.sys.textures,this.sceneManager=m.sys.game.scene,e.install(this),this.prefix="",this.path="",this.baseURL="",this.setBaseURL(n(C,"baseURL",T.loaderBaseURL)),this.setPath(n(C,"path",T.loaderPath)),this.setPrefix(n(C,"prefix",T.loaderPrefix)),this.maxParallelDownloads=n(C,"maxParallelDownloads",T.loaderMaxParallelDownloads),this.xhr=u(n(C,"responseType",T.loaderResponseType),n(C,"async",T.loaderAsync),n(C,"user",T.loaderUser),n(C,"password",T.loaderPassword),n(C,"timeout",T.loaderTimeout),n(C,"withCredentials",T.loaderWithCredentials)),this.crossOrigin=n(C,"crossOrigin",T.loaderCrossOrigin),this.imageLoadType=n(C,"imageLoadType",T.loaderImageLoadType),this.localSchemes=n(C,"localScheme",T.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=p.LOADER_IDLE,this.multiKeyIndex=0,m.sys.events.once(h.BOOT,this.boot,this),m.sys.events.on(h.START,this.pluginStart,this)},boot:function(){this.systems.events.once(h.DESTROY,this.destroy,this)},pluginStart:function(){this.systems.events.once(h.SHUTDOWN,this.shutdown,this)},setBaseURL:function(v){return v===void 0&&(v=""),v!==""&&v.substr(-1)!=="/"&&(v=v.concat("/")),this.baseURL=v,this},setPath:function(v){return v===void 0&&(v=""),v!==""&&v.substr(-1)!=="/"&&(v=v.concat("/")),this.path=v,this},setPrefix:function(v){return v===void 0&&(v=""),this.prefix=v,this},setCORS:function(v){return this.crossOrigin=v,this},addFile:function(v){Array.isArray(v)||(v=[v]);for(var m=0;m0},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(r.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(h.UPDATE,this.update,this)))},updateProgress:function(){this.progress=1-(this.list.size+this.inflight.size)/this.totalToLoad,this.emit(r.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 a=t(79291),p=t(92638),o=function(s,r){var e=s===void 0?p():a({},s);if(r)for(var n in r)r[n]!==void 0&&(e[n]=r[n]);return e};d.exports=o},26430:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(23906),o=t(54899),s=new a({initialize:function(e,n,l,i){var h=[];i.forEach(function(v){v&&h.push(v)}),this.loader=e,this.type=n,this.key=l;var u=this.key;e.prefix&&e.prefix!==""&&(this.key=e.prefix+u),this.multiKeyIndex=e.multiKeyIndex++,this.files=h,this.state=p.FILE_PENDING,this.complete=!1,this.pending=h.length,this.failed=0,this.config={},this.baseURL=e.baseURL,this.path=e.path,this.prefix=e.prefix;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(3374),p=function(o,s){var r=a(s,o.xhrSettings);if(o.base64){var e=o.url.split(";base64,").pop()||o.url.split(",").pop(),n={responseText:atob(e)};o.onBase64Load(n);return}var l=new XMLHttpRequest;if(l.open("GET",o.src,r.async,r.user,r.password),l.responseType=o.xhrSettings.responseType,l.timeout=r.timeout,r.headers)for(var i in r.headers)l.setRequestHeader(i,r.headers[i]);return r.header&&r.headerValue&&l.setRequestHeader(r.header,r.headerValue),r.requestedWith&&l.setRequestHeader("X-Requested-With",r.requestedWith),r.overrideMimeType&&l.overrideMimeType(r.overrideMimeType),r.withCredentials&&(l.withCredentials=!0),l.onload=o.onLoad.bind(o,l),l.onerror=o.onError.bind(o,l),l.onprogress=o.onProgress.bind(o),l.ontimeout=o.onError.bind(o,l),l.send(),l};d.exports=p},92638:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p,o,s,r){return t===void 0&&(t=""),a===void 0&&(a=!0),p===void 0&&(p=""),o===void 0&&(o=""),s===void 0&&(s=0),r===void 0&&(r=!1),{responseType:t,async:a,user:p,password:o,timeout:s,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:r}};d.exports=x},23906:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x={LOADER_IDLE:0,LOADER_LOADING:1,LOADER_PROCESSING:2,LOADER_COMPLETE:3,LOADER_SHUTDOWN:4,LOADER_DESTROYED:5,FILE_PENDING:10,FILE_LOADING:11,FILE_LOADED:12,FILE_FAILED:13,FILE_PROCESSING:14,FILE_ERRORED:16,FILE_COMPLETE:17,FILE_DESTROYED:18,FILE_POPULATED:19,FILE_PENDING_DESTROY:20};d.exports=x},42155:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="addfile"},38991:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="complete"},27540:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="filecomplete"},87464:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="filecomplete-"},94486:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="loaderror"},13035:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="load"},38144:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="fileprogress"},97520:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="postprocess"},85595:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="progress"},55680:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="start"},54899:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.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:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(74099),o=t(518),s=t(54899),r=new a({Extends:o,initialize:function(n,l,i,h,u){o.call(this,n,l,i,h,u),this.type="animationJSON"},onProcess:function(){this.loader.once(s.POST_PROCESS,this.onLoadComplete,this),o.prototype.onProcess.call(this)},onLoadComplete:function(){this.loader.systems.anims.fromJSON(this.data)}});p.register("animation",function(e,n,l,i){if(Array.isArray(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(83419),p=t(74099),o=t(95540),s=t(19550),r=t(41212),e=t(518),n=t(26430),l=new a({Extends:n,initialize:function(h,u,c,v,m,T){var C,S;if(r(u)){var P=u;u=o(P,"key"),C=new s(h,{key:u,url:o(P,"textureURL"),extension:o(P,"textureExtension","png"),normalMap:o(P,"normalMap"),xhrSettings:o(P,"textureXhrSettings")}),S=new e(h,{key:u,url:o(P,"atlasURL"),extension:o(P,"atlasExtension","json"),xhrSettings:o(P,"atlasXhrSettings")})}else C=new s(h,u,c,m),S=new e(h,u,v,T);C.linkFile?n.call(this,h,"atlasjson",u,[C,S,C.linkFile]):n.call(this,h,"atlasjson",u,[C,S])},addToCache:function(){if(this.isReadyToProcess()){var i=this.files[0],h=this.files[1],u=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(i.key,i.data,h.data,u),h.addToCache(),this.complete=!0}}});p.register("aseprite",function(i,h,u,c,v){var m;if(Array.isArray(i))for(var T=0;T{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(74099),o=t(95540),s=t(19550),r=t(41212),e=t(518),n=t(26430),l=new a({Extends:n,initialize:function(h,u,c,v,m,T){var C,S;if(r(u)){var P=u;u=o(P,"key"),C=new s(h,{key:u,url:o(P,"textureURL"),extension:o(P,"textureExtension","png"),normalMap:o(P,"normalMap"),xhrSettings:o(P,"textureXhrSettings")}),S=new e(h,{key:u,url:o(P,"atlasURL"),extension:o(P,"atlasExtension","json"),xhrSettings:o(P,"atlasXhrSettings")})}else C=new s(h,u,c,m),S=new e(h,u,v,T);C.linkFile?n.call(this,h,"atlasjson",u,[C,S,C.linkFile]):n.call(this,h,"atlasjson",u,[C,S])},addToCache:function(){if(this.isReadyToProcess()){var i=this.files[0],h=this.files[1],u=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(i.key,i.data,h.data,u),this.complete=!0}}});p.register("atlas",function(i,h,u,c,v){var m;if(Array.isArray(i))for(var T=0;T{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(74099),o=t(95540),s=t(19550),r=t(41212),e=t(26430),n=t(57318),l=new a({Extends:e,initialize:function(h,u,c,v,m,T){var C,S;if(r(u)){var P=u;u=o(P,"key"),C=new s(h,{key:u,url:o(P,"textureURL"),extension:o(P,"textureExtension","png"),normalMap:o(P,"normalMap"),xhrSettings:o(P,"textureXhrSettings")}),S=new n(h,{key:u,url:o(P,"atlasURL"),extension:o(P,"atlasExtension","xml"),xhrSettings:o(P,"atlasXhrSettings")})}else C=new s(h,u,c,m),S=new n(h,u,v,T);C.linkFile?e.call(this,h,"atlasxml",u,[C,S,C.linkFile]):e.call(this,h,"atlasxml",u,[C,S])},addToCache:function(){if(this.isReadyToProcess()){var i=this.files[0],h=this.files[1],u=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlasXML(i.key,i.data,h.data,u),this.complete=!0}}});p.register("atlasXML",function(i,h,u,c,v){var m;if(Array.isArray(i))for(var T=0;T{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(23906),o=t(41299),s=t(74099),r=t(95540),e=t(89749),n=t(41212),l=new a({Extends:o,initialize:function(h,u,c,v,m){if(n(u)){var T=u;u=r(T,"key"),v=r(T,"xhrSettings"),m=r(T,"context",m)}var C={type:"audio",cache:h.cacheManager.audio,extension:c.type,responseType:"arraybuffer",key:u,url:c.url,xhrSettings:v,config:{context:m}};o.call(this,h,C)},onProcess:function(){this.state=p.FILE_PROCESSING;var i=this;this.config.context.decodeAudioData(this.xhrLoader.response,function(h){i.data=h,i.onProcessComplete()},function(h){console.error("Error decoding audio: "+i.key+" - ",h?h.message:null),i.onProcessError()}),this.config.context=null}});l.create=function(i,h,u,c,v){var m=i.systems.game,T=m.config.audio,C=m.device.audio;n(h)&&(u=r(h,"url",[]),c=r(h,"config",{}));var S=l.getAudioURL(m,u);return S?C.webAudio&&!T.disableWebAudio?new l(i,h,S,v,m.sound.context):new e(i,h,S,c):(console.warn('No audio URLs for "%s" matched this device',h),null)},l.getAudioURL=function(i,h){Array.isArray(h)||(h=[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(21097),p=t(83419),o=t(74099),s=t(95540),r=t(41212),e=t(518),n=t(26430),l=new p({Extends:n,initialize:function(h,u,c,v,m,T,C){if(r(u)){var S=u;u=s(S,"key"),c=s(S,"jsonURL"),v=s(S,"audioURL"),m=s(S,"audioConfig"),T=s(S,"audioXhrSettings"),C=s(S,"jsonXhrSettings")}var P;if(!v)P=new e(h,u,c,C),n.call(this,h,"audiosprite",u,[P]),this.config.resourceLoad=!0,this.config.audioConfig=m,this.config.audioXhrSettings=T;else{var A=a.create(h,u,v,m,T);A&&(P=new e(h,u,c,C),n.call(this,h,"audiosprite",u,[A,P]),this.config.resourceLoad=!1)}},onFileComplete:function(i){var h=this.files.indexOf(i);if(h!==-1&&(this.pending--,this.config.resourceLoad&&i.type==="json"&&i.data.hasOwnProperty("resources"))){var u=i.data.resources,c=s(this.config,"audioConfig"),v=s(this.config,"audioXhrSettings"),m=a.create(this.loader,i.key,u,c,v);m&&(this.addToMultiFile(m),this.loader.addFile(m))}},addToCache:function(){if(this.isReadyToProcess()){var i=this.files[0],h=this.files[1];i.addToCache(),h.addToCache(),this.complete=!0}}});o.register("audioSprite",function(i,h,u,c,v,m){var T=this.systems.game,C=T.config.audio,S=T.device.audio;if(C&&C.noAudio||!S.webAudio&&!S.audioData)return this;var P;if(Array.isArray(i))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(83419),p=t(23906),o=t(41299),s=t(74099),r=t(95540),e=t(41212),n=new a({Extends:o,initialize:function(i,h,u,c,v){var m="bin";if(e(h)){var T=h;h=r(T,"key"),u=r(T,"url"),c=r(T,"xhrSettings"),m=r(T,"extension",m),v=r(T,"dataType",v)}var C={type:"binary",cache:i.cacheManager.binary,extension:m,responseType:"arraybuffer",key:h,url:u,xhrSettings:c,config:{dataType:v}};o.call(this,i,C)},onProcess:function(){this.state=p.FILE_PROCESSING;var l=this.config.dataType;this.data=l?new l(this.xhrLoader.response):this.xhrLoader.response,this.onProcessComplete()}});s.register("binary",function(l,i,h,u){if(Array.isArray(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 a=t(83419),p=t(74099),o=t(95540),s=t(19550),r=t(41212),e=t(26430),n=t(21859),l=t(57318),i=new a({Extends:e,initialize:function(u,c,v,m,T,C){var S,P;if(r(c)){var A=c;c=o(A,"key"),S=new s(u,{key:c,url:o(A,"textureURL"),extension:o(A,"textureExtension","png"),normalMap:o(A,"normalMap"),xhrSettings:o(A,"textureXhrSettings")}),P=new l(u,{key:c,url:o(A,"fontDataURL"),extension:o(A,"fontDataExtension","xml"),xhrSettings:o(A,"fontDataXhrSettings")})}else S=new s(u,c,v,T),P=new l(u,c,m,C);S.linkFile?e.call(this,u,"bitmapfont",c,[S,P,S.linkFile]):e.call(this,u,"bitmapfont",c,[S,P])},addToCache:function(){if(this.isReadyToProcess()){var h=this.files[0],u=this.files[1];h.addToCache();var c=h.cache.get(h.key),v=n(u.data,h.cache.getFrame(h.key),0,0,c);this.loader.cacheManager.bitmapFont.add(h.key,{data:v,texture:h.key,frame:null}),this.complete=!0}}});p.register("bitmapFont",function(h,u,c,v,m){var T;if(Array.isArray(h))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),p=t(23906),o=t(41299),s=t(74099),r=t(95540),e=t(41212),n=new a({Extends:o,initialize:function(i,h,u,c){var v="css";if(e(h)){var m=h;h=r(m,"key"),u=r(m,"url"),c=r(m,"xhrSettings"),v=r(m,"extension",v)}var T={type:"script",cache:!1,extension:v,responseType:"text",key:h,url:u,xhrSettings:c};o.call(this,i,T)},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()}});s.register("css",function(l,i,h){if(Array.isArray(l))for(var u=0;u{/** + * @author Richard Davey + * @copyright 2021 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(38734),p=t(85722),o=t(83419),s=t(74099),r=t(95540),e=t(19550),n=t(41212),l=t(518),i=t(31403),h=t(46975),u=t(59327),c=t(26430),v=t(82038),m=t(55222),T=new o({Extends:c,initialize:function(S,P,A,L){if(A.multiAtlasURL){var F=new l(S,{key:P,url:A.multiAtlasURL,xhrSettings:L,config:A});c.call(this,S,"texture",P,[F])}else{var I=A.textureURL.substr(A.textureURL.length-3);A.type||(A.type=I.toLowerCase()==="ktx"?"KTX":"PVR");var D=new p(S,{key:P,url:A.textureURL,extension:I,xhrSettings:L,config:A});if(A.atlasURL){var B=new l(S,{key:P,url:A.atlasURL,xhrSettings:L,config:A});c.call(this,S,"texture",P,[D,B])}else c.call(this,S,"texture",P,[D])}this.config=A},onFileComplete:function(C){var S=this.files.indexOf(C);if(S!==-1){if(this.pending--,!this.config.multiAtlasURL)return;if(C.type==="json"&&C.data.hasOwnProperty("textures")){var P=C.data.textures,A=this.config,L=this.loader,F=L.baseURL,I=L.path,D=L.prefix,B=r(A,"multiBaseURL",this.baseURL),G=r(A,"multiPath",this.path),z=r(A,"prefix",this.prefix),W=r(A,"textureXhrSettings");B&&L.setBaseURL(B),G&&L.setPath(G),z&&L.setPrefix(z);for(var Y=0;Y{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(23906),o=t(41299),s=t(74099),r=t(95540),e=t(41212),n=t(73894),l=new a({Extends:o,initialize:function(h,u,c,v,m){var T="glsl";if(e(u)){var C=u;u=r(C,"key"),c=r(C,"url"),v=r(C,"shaderType","fragment"),m=r(C,"xhrSettings"),T=r(C,"extension",T)}else v===void 0&&(v="fragment");var S={type:"glsl",cache:h.cacheManager.shader,extension:T,responseType:"text",key:u,url:c,config:{shaderType:v},xhrSettings:m};o.call(this,h,S)},onProcess:function(){this.state=p.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var i=this.data.split(` +`),h=this.extractBlock(i,0);if(h)for(;h;){var u=this.getShaderName(h.header),c=this.getShaderType(h.header),v=this.getShaderUniforms(h.header),m=h.shader;if(this.cache.has(u)){var T=this.cache.get(u);c==="fragment"?T.fragmentSrc=m:T.vertexSrc=m,T.uniforms||(T.uniforms=v)}else c==="fragment"?this.cache.add(u,new n(u,m,"",v)):this.cache.add(u,new n(u,"",m,v));h=this.extractBlock(i,h.offset)}else this.config.shaderType==="fragment"?this.cache.add(this.key,new n(this.key,this.data)):this.cache.add(this.key,new n(this.key,"",this.data))},getShaderName:function(i){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),p=t(54899),o=t(41299),s=t(95540),r=t(98356),e=t(41212),n=new a({Extends:o,initialize:function(i,h,u,c){if(e(h)){var v=h;h=s(v,"key"),c=s(v,"config",c)}var m={type:"audio",cache:i.cacheManager.audio,extension:u.type,key:h,url:u.url,config:c};o.call(this,i,m),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 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),p=t(23906),o=t(41299),s=t(74099),r=t(95540),e=t(41212),n=new a({Extends:o,initialize:function(i,h,u,c){var v="html";if(e(h)){var m=h;h=r(m,"key"),u=r(m,"url"),c=r(m,"xhrSettings"),v=r(m,"extension",v)}var T={type:"text",cache:i.cacheManager.html,extension:v,responseType:"text",key:h,url:u,xhrSettings:c};o.call(this,i,T)},onProcess:function(){this.state=p.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});s.register("html",function(l,i,h){if(Array.isArray(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 a=t(83419),p=t(23906),o=t(41299),s=t(74099),r=t(95540),e=t(41212),n=new a({Extends:o,initialize:function(i,h,u,c,v,m){c===void 0&&(c=512),v===void 0&&(v=512);var T="html";if(e(h)){var C=h;h=r(C,"key"),u=r(C,"url"),m=r(C,"xhrSettings"),T=r(C,"extension",T),c=r(C,"width",c),v=r(C,"height",v)}var S={type:"html",cache:i.textureManager,extension:T,responseType:"text",key:h,url:u,xhrSettings:m,config:{width:c,height:v}};o.call(this,i,S)},onProcess:function(){this.state=p.FILE_PROCESSING;var l=this.config.width,i=this.config.height,h=[];h.push(''),h.push(''),h.push(''),h.push(this.xhrLoader.responseText),h.push(""),h.push(""),h.push("");var u=[h.join(` +`)],c=this;try{var v=new window.Blob(u,{type:"image/svg+xml;charset=utf-8"})}catch{c.state=p.FILE_ERRORED,c.onProcessComplete();return}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){o.revokeObjectURL(c.data),c.onProcessComplete()},this.data.onerror=function(){o.revokeObjectURL(c.data),c.onProcessError()},o.createObjectURL(this.data,v,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});s.register("htmlTexture",function(l,i,h,u,c){if(Array.isArray(l))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(83419),p=t(23906),o=t(41299),s=t(74099),r=t(95540),e=t(41212),n=t(98356),l=new a({Extends:o,initialize:function i(h,u,c,v,m){var T="png",C;if(e(u)){var S=u;u=r(S,"key"),c=r(S,"url"),C=r(S,"normalMap"),v=r(S,"xhrSettings"),T=r(S,"extension",T),m=r(S,"frameConfig")}Array.isArray(c)&&(C=c[1],c=c[0]);var P={type:"image",cache:h.textureManager,extension:T,responseType:"blob",key:u,url:c,xhrSettings:v,config:m};if(o.call(this,h,P),C){var A=new i(h,this.key,C,v,m);A.type="normalMap",this.setLink(A),h.addFile(A)}this.useImageElementLoad=h.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 i=this;this.data.onload=function(){o.revokeObjectURL(i.data),i.onProcessComplete()},this.data.onerror=function(){o.revokeObjectURL(i.data),i.onProcessError()},o.createObjectURL(this.data,this.xhrLoader.response,"image/png")},onProcessImage:function(){var i=this.state;this.state=p.FILE_PROCESSING,i===p.FILE_LOADED?this.onProcessComplete():this.onProcessError()},loadImage:function(){this.state=p.FILE_LOADING,this.src=n(this,this.loader.baseURL),this.data=new Image,this.data.crossOrigin=this.crossOrigin;var i=this;this.data.onload=function(){i.state=p.FILE_LOADED,i.loader.nextFile(i,!0)},this.data.onerror=function(){i.loader.nextFile(i,!1)},this.data.src=this.src},addToCache:function(){var i=this.linkFile;i?i.state>=p.FILE_COMPLETE&&(i.type==="spritesheet"?i.addToCache():this.type==="normalMap"?this.cache.addImage(this.key,i.data,this.data):this.cache.addImage(this.key,this.data,i.data)):this.cache.addImage(this.key,this.data)}});s.register("image",function(i,h,u){if(Array.isArray(i))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),p=t(23906),o=t(41299),s=t(74099),r=t(95540),e=t(35154),n=t(41212),l=new a({Extends:o,initialize:function(h,u,c,v,m){var T="json";if(n(u)){var C=u;u=r(C,"key"),c=r(C,"url"),v=r(C,"xhrSettings"),T=r(C,"extension",T),m=r(C,"dataKey",m)}var S={type:"json",cache:h.cacheManager.json,extension:T,responseType:"text",key:u,url:c,xhrSettings:v,config:m};o.call(this,h,S),n(c)&&(m?this.data=e(c,m):this.data=c,this.state=p.FILE_POPULATED)},onProcess:function(){if(this.state!==p.FILE_POPULATED){this.state=p.FILE_PROCESSING;try{var i=JSON.parse(this.xhrLoader.responseText)}catch(u){throw this.onProcessError(),u}var h=this.config;typeof h=="string"?this.data=e(i,h,i):this.data=i}this.onProcessComplete()}});s.register("json",function(i,h,u,c){if(Array.isArray(i))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(83419),p=t(74099),o=t(95540),s=t(19550),r=t(41212),e=t(518),n=t(26430),l=new a({Extends:n,initialize:function(h,u,c,v,m,T,C){if(r(u)){var S=u;u=o(S,"key"),o(S,"url",!1)?c=o(S,"url"):c=o(S,"atlasURL"),T=o(S,"xhrSettings"),v=o(S,"path"),m=o(S,"baseURL"),C=o(S,"textureXhrSettings")}var P=new e(h,u,c,T);n.call(this,h,"multiatlas",u,[P]),this.config.path=v,this.config.baseURL=m,this.config.textureXhrSettings=C},onFileComplete:function(i){var h=this.files.indexOf(i);if(h!==-1&&(this.pending--,i.type==="json"&&i.data.hasOwnProperty("textures"))){var u=i.data.textures,c=this.config,v=this.loader,m=v.baseURL,T=v.path,C=v.prefix,S=o(c,"baseURL",this.baseURL),P=o(c,"path",this.path),A=o(c,"prefix",this.prefix),L=o(c,"textureXhrSettings");v.setBaseURL(S),v.setPath(P),v.setPrefix(A);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),p=t(74099),o=t(95540),s=t(41212),r=t(26430),e=t(34328),n=new a({Extends:r,initialize:function(i,h,u,c){var v="js",m=[];if(s(h)){var T=h;h=o(T,"key"),u=o(T,"url"),c=o(T,"xhrSettings"),v=o(T,"extension",v)}Array.isArray(u)||(u=[u]);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),p=t(74099),o=t(95540),s=t(41212),r=t(26430),e=t(85048),n=t(61485),l=t(78776),i=new a({Extends:r,initialize:function(u,c,v,m,T,C){var S,P,A=u.cacheManager.obj;if(s(c)){var L=c;c=o(L,"key"),S=new l(u,{key:c,type:"obj",cache:A,url:o(L,"url"),extension:o(L,"extension","obj"),xhrSettings:o(L,"xhrSettings"),config:{flipUV:o(L,"flipUV",T)}}),m=o(L,"matURL"),m&&(P=new l(u,{key:c,type:"mat",cache:A,url:m,extension:o(L,"matExtension","mat"),xhrSettings:o(L,"xhrSettings")}))}else S=new l(u,{key:c,url:v,type:"obj",cache:A,extension:"obj",xhrSettings:C,config:{flipUV:T}}),m&&(P=new l(u,{key:c,url:m,type:"mat",cache:A,extension:"mat",xhrSettings:C}));r.call(this,u,"obj",c,[S,P])},addToCache:function(){if(this.isReadyToProcess()){var h=this.files[0],u=this.files[1],c=e(h.data,h.config.flipUV);u&&(c.materials=n(u.data)),h.cache.add(h.key,c),this.complete=!0}}});p.register("obj",function(h,u,c,v,m){var T;if(Array.isArray(h))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),p=t(23906),o=t(74099),s=t(518),r=new a({Extends:s,initialize:function(n,l,i,h,u){s.call(this,n,l,i,h,u),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 e={};e[this.config]=this.data,this.data=e}this.loader.addPack(this.data,this.config),this.onProcessComplete()}});o.register("pack",function(e,n,l,i){if(Array.isArray(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(83419),p=t(23906),o=t(41299),s=t(74099),r=t(95540),e=t(41212),n=new a({Extends:o,initialize:function(i,h,u,c,v,m){var T="js";if(e(h)){var C=h;h=r(C,"key"),u=r(C,"url"),m=r(C,"xhrSettings"),T=r(C,"extension",T),c=r(C,"start"),v=r(C,"mapping")}var S={type:"plugin",cache:!1,extension:T,responseType:"text",key:h,url:u,xhrSettings:m,config:{start:c,mapping:v}};o.call(this,i,S),typeof u=="function"&&(this.data=u,this.state=p.FILE_POPULATED)},onProcess:function(){var l=this.loader.systems.plugins,i=this.config,h=r(i,"start",!1),u=r(i,"mapping",null);if(this.state===p.FILE_POPULATED)l.install(this.key,this.data,h,u);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 c=l.install(this.key,window[this.key],h,u);(h||u)&&(this.loader.systems[u]=c,this.loader.scene[u]=c)}this.onProcessComplete()}});s.register("plugin",function(l,i,h,u,c){if(Array.isArray(l))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(83419),p=t(23906),o=t(41299),s=t(74099),r=t(95540),e=t(41212),n=new a({Extends:o,initialize:function(i,h,u,c,v){var m="svg";if(e(h)){var T=h;h=r(T,"key"),u=r(T,"url"),c=r(T,"svgConfig",{}),v=r(T,"xhrSettings"),m=r(T,"extension",m)}var C={type:"svg",cache:i.textureManager,extension:m,responseType:"text",key:h,url:u,xhrSettings:v,config:{width:r(c,"width"),height:r(c,"height"),scale:r(c,"scale")}};o.call(this,i,C)},onProcess:function(){this.state=p.FILE_PROCESSING;var l=this.xhrLoader.responseText,i=[l],h=this.config.width,u=this.config.height,c=this.config.scale;t:if(h&&u||c){var v=null,m=new DOMParser;v=m.parseFromString(l,"text/xml");var T=v.getElementsByTagName("svg")[0],C=T.hasAttribute("viewBox"),S=parseFloat(T.getAttribute("width")),P=parseFloat(T.getAttribute("height"));if(!C&&S&&P)T.setAttribute("viewBox","0 0 "+S+" "+P);else if(C&&!S&&!P){var A=T.getAttribute("viewBox").split(/\s+|,/);S=A[2],P=A[3]}if(c)if(S&&P)h=S*c,u=P*c;else break t;T.setAttribute("width",h.toString()+"px"),T.setAttribute("height",u.toString()+"px"),i=[new XMLSerializer().serializeToString(T)]}try{var L=new window.Blob(i,{type:"image/svg+xml;charset=utf-8"})}catch{this.onProcessError();return}this.data=new Image,this.data.crossOrigin=this.crossOrigin;var F=this,I=!1;this.data.onload=function(){I||o.revokeObjectURL(F.data),F.onProcessComplete()},this.data.onerror=function(){I?F.onProcessError():(I=!0,o.revokeObjectURL(F.data),F.data.src="data:image/svg+xml,"+encodeURIComponent(i.join("")))},o.createObjectURL(this.data,L,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});s.register("svg",function(l,i,h,u){if(Array.isArray(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 a=t(83419),p=t(23906),o=t(41299),s=t(74099),r=t(95540),e=t(41212),n=new a({Extends:o,initialize:function(i,h,u,c){var v="js";if(e(h)){var m=h;h=r(m,"key"),u=r(m,"url"),c=r(m,"xhrSettings"),v=r(m,"extension",v)}var T={type:"text",extension:v,responseType:"text",key:h,url:u,xhrSettings:c};o.call(this,i,T)},onProcess:function(){this.state=p.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var l=this.data.concat(`(function(){ +return new `+this.key+`(); +}).call(this);`),i=eval;this.loader.sceneManager.add(this.key,i(l)),this.complete=!0}});s.register("sceneFile",function(l,i,h){if(Array.isArray(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 a=t(83419),p=t(23906),o=t(41299),s=t(74099),r=t(95540),e=t(41212),n=new a({Extends:o,initialize:function(i,h,u,c,v,m){var T="js";if(e(h)){var C=h;h=r(C,"key"),u=r(C,"url"),m=r(C,"xhrSettings"),T=r(C,"extension",T),c=r(C,"systemKey"),v=r(C,"sceneKey")}var S={type:"scenePlugin",cache:!1,extension:T,responseType:"text",key:h,url:u,xhrSettings:m,config:{systemKey:c,sceneKey:v}};o.call(this,i,S),typeof u=="function"&&(this.data=u,this.state=p.FILE_POPULATED)},onProcess:function(){var l=this.loader.systems.plugins,i=this.config,h=this.key,u=r(i,"systemKey",h),c=r(i,"sceneKey",h);this.state===p.FILE_POPULATED?l.installScenePlugin(u,this.data,c,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),l.installScenePlugin(u,window[this.key],c,this.loader.scene,!0)),this.onProcessComplete()}});s.register("scenePlugin",function(l,i,h,u,c){if(Array.isArray(l))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(83419),p=t(23906),o=t(41299),s=t(74099),r=t(95540),e=t(41212),n=new a({Extends:o,initialize:function(i,h,u,c,v){var m="js";if(e(h)){var T=h;h=r(T,"key"),u=r(T,"url"),c=r(T,"type","script"),v=r(T,"xhrSettings"),m=r(T,"extension",m)}else c===void 0&&(c="script");var C={type:c,cache:!1,extension:m,responseType:"text",key:h,url:u,xhrSettings:v};o.call(this,i,C)},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()}});s.register("script",function(l,i,h,u){if(Array.isArray(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 a=t(83419),p=t(23906),o=t(74099),s=t(19550),r=new a({Extends:s,initialize:function(n,l,i,h,u){s.call(this,n,l,i,u,h),this.type="spritesheet"},addToCache:function(){var e=this.linkFile;e?e.state>=p.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,n,l,i){if(Array.isArray(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(83419),p=t(23906),o=t(41299),s=t(74099),r=t(95540),e=t(41212),n=new a({Extends:o,initialize:function(i,h,u,c){var v="text",m="txt",T=i.cacheManager.text;if(e(h)){var C=h;h=r(C,"key"),u=r(C,"url"),c=r(C,"xhrSettings"),m=r(C,"extension",m),v=r(C,"type",v),T=r(C,"cache",T)}var S={type:v,cache:T,extension:m,responseType:"text",key:h,url:u,xhrSettings:c};o.call(this,i,S)},onProcess:function(){this.state=p.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});s.register("text",function(l,i,h){if(Array.isArray(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 a=t(83419),p=t(23906),o=t(41299),s=t(74099),r=t(95540),e=t(41212),n=t(80341),l=new a({Extends:o,initialize:function(h,u,c,v){var m="csv";if(e(u)){var T=u;u=r(T,"key"),c=r(T,"url"),v=r(T,"xhrSettings"),m=r(T,"extension",m)}var C={type:"tilemapCSV",cache:h.cacheManager.tilemap,extension:m,responseType:"text",key:u,url:c,xhrSettings:v};o.call(this,h,C),this.tilemapFormat=n.CSV},onProcess:function(){this.state=p.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var i={format:this.tilemapFormat,data:this.data};this.cache.add(this.key,i)}});s.register("tilemapCSV",function(i,h,u){if(Array.isArray(i))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),p=t(74099),o=t(518),s=t(80341),r=new a({Extends:o,initialize:function(n,l,i,h){o.call(this,n,l,i,h),this.type="tilemapJSON",this.cache=n.cacheManager.tilemap},addToCache:function(){var e={format:s.WELTMEISTER,data:this.data};this.cache.add(this.key,e)}});p.register("tilemapImpact",function(e,n,l){if(Array.isArray(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(83419),p=t(74099),o=t(518),s=t(80341),r=new a({Extends:o,initialize:function(n,l,i,h){o.call(this,n,l,i,h),this.type="tilemapJSON",this.cache=n.cacheManager.tilemap},addToCache:function(){var e={format:s.TILED_JSON,data:this.data};this.cache.add(this.key,e)}});p.register("tilemapTiledJSON",function(e,n,l){if(Array.isArray(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(83419),p=t(74099),o=t(95540),s=t(19550),r=t(41212),e=t(26430),n=t(78776),l=new a({Extends:e,initialize:function(h,u,c,v,m,T){var C,S;if(r(u)){var P=u;u=o(P,"key"),C=new s(h,{key:u,url:o(P,"textureURL"),extension:o(P,"textureExtension","png"),normalMap:o(P,"normalMap"),xhrSettings:o(P,"textureXhrSettings")}),S=new n(h,{key:u,url:o(P,"atlasURL"),extension:o(P,"atlasExtension","txt"),xhrSettings:o(P,"atlasXhrSettings")})}else C=new s(h,u,c,m),S=new n(h,u,v,T);C.linkFile?e.call(this,h,"unityatlas",u,[C,S,C.linkFile]):e.call(this,h,"unityatlas",u,[C,S])},addToCache:function(){if(this.isReadyToProcess()){var i=this.files[0],h=this.files[1],u=this.files[2]?this.files[2].data:null;this.loader.textureManager.addUnityAtlas(i.key,i.data,h.data,u),this.complete=!0}}});p.register("unityAtlas",function(i,h,u,c,v){var m;if(Array.isArray(i))for(var T=0;T{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(23906),o=t(41299),s=t(74099),r=t(98356),e=t(95540),n=t(41212),l=new a({Extends:o,initialize:function(h,u,c,v){if(v===void 0&&(v=!1),n(u)){var m=u;u=e(m,"key"),c=e(m,"url",[]),v=e(m,"noAudio",!1)}var T=h.systems.game.device.video.getVideoURL(c);T||console.warn("VideoFile: No supported format for "+u);var C={type:"video",cache:h.cacheManager.video,extension:T.type,key:u,url:T.url,config:{noAudio:v}};o.call(this,h,C)},onProcess:function(){this.data={url:this.src,noAudio:this.config.noAudio,crossOrigin:this.crossOrigin},this.onProcessComplete()},load:function(){this.src=r(this,this.loader.baseURL),this.state=p.FILE_LOADED,this.loader.nextFile(this,!0)}});s.register("video",function(i,h,u){if(Array.isArray(i))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),p=t(23906),o=t(41299),s=t(74099),r=t(95540),e=t(41212),n=t(56836),l=new a({Extends:o,initialize:function(h,u,c,v){var m="xml";if(e(u)){var T=u;u=r(T,"key"),c=r(T,"url"),v=r(T,"xhrSettings"),m=r(T,"extension",m)}var C={type:"xml",cache:h.cacheManager.xml,extension:m,responseType:"text",key:u,url:c,xhrSettings:v};o.call(this,h,C)},onProcess:function(){this.state=p.FILE_PROCESSING,this.data=n(this.xhrLoader.responseText),this.data?this.onProcessComplete():this.onProcessError()}});s.register("xml",function(i,h,u){if(Array.isArray(i))for(var c=0;c{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.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:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(23906),p=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=p(!1,o,a),d.exports=o},53307:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){for(var a=0,p=0;p{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(6411),p=function(o,s){return a(o)/a(s)/a(o-s)};d.exports=p},30976:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){return Math.floor(Math.random()*(a-t+1)+t)};d.exports=x},87842:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p,o,s){var r=(o-a)*.5,e=(s-p)*.5,n=t*t,l=t*n;return(2*p-2*o+r+e)*l+(-3*p+3*o-2*r-e)*n+r*t+p};d.exports=x},26302:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){a===void 0&&(a=0),p===void 0&&(p=10);var o=Math.pow(p,-a);return Math.ceil(t*o)/o};d.exports=x},45319:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){return Math.max(a,Math.min(p,t))};d.exports=x},39506:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(36383),p=function(o){return o*a.DEG_TO_RAD};d.exports=p},61241:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){return Math.abs(t-a)};d.exports=x},38857:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(45319),p=t(83419),o=t(37867),s=t(29747),r=new o,e=new p({initialize:function n(l,i,h,u){l===void 0&&(l=0),i===void 0&&(i=0),h===void 0&&(h=0),u===void 0&&(u=n.DefaultOrder),this._x=l,this._y=i,this._z=h,this._order=u,this.onChangeCallback=s},x:{get:function(){return this._x},set:function(n){this._x=n,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(n){this._y=n,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(n){this._z=n,this.onChangeCallback(this)}},order:{get:function(){return this._order},set:function(n){this._order=n,this.onChangeCallback(this)}},set:function(n,l,i,h){return h===void 0&&(h=this._order),this._x=n,this._y=l,this._z=i,this._order=h,this.onChangeCallback(this),this},copy:function(n){return this.set(n.x,n.y,n.z,n.order)},setFromQuaternion:function(n,l,i){return l===void 0&&(l=this._order),i===void 0&&(i=!1),r.fromQuat(n),this.setFromRotationMatrix(r,l,i)},setFromRotationMatrix:function(n,l,i){l===void 0&&(l=this._order),i===void 0&&(i=!1);var h=n.val,u=h[0],c=h[4],v=h[8],m=h[1],T=h[5],C=h[9],S=h[2],P=h[6],A=h[10],L=0,F=0,I=0,D=.99999;switch(l){case"XYZ":{F=Math.asin(a(v,-1,1)),Math.abs(v){/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){if(t===0)return 1;for(var a=t;--t;)a*=t;return a};d.exports=x},99472:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){return Math.random()*(a-t)+t};d.exports=x},77623:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){a===void 0&&(a=0),p===void 0&&(p=10);var o=Math.pow(p,-a);return Math.floor(t*o)/o};d.exports=x},62945:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(45319),p=function(o,s,r){return o=a(o,0,1),(r-s)*o+s};d.exports=p},38265:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){return t/a/1e3};d.exports=x},78702:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return t==parseFloat(t)?!(t%2):void 0};d.exports=x},94883:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return t===parseFloat(t)?!(t%2):void 0};d.exports=x},28915:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){return(a-t)*p+t};d.exports=x},94908:d=>{/** + * @author Greg McLean + * @copyright 2021 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){return p===void 0&&(p=0),t.clone().lerp(a,p)};d.exports=x},94434:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=new a({initialize:function(s){this.val=new Float32Array(9),s?this.copy(s):this.identity()},clone:function(){return new p(this)},set:function(o){return this.copy(o)},copy:function(o){var s=this.val,r=o.val;return s[0]=r[0],s[1]=r[1],s[2]=r[2],s[3]=r[3],s[4]=r[4],s[5]=r[5],s[6]=r[6],s[7]=r[7],s[8]=r[8],this},fromMat4:function(o){var s=o.val,r=this.val;return r[0]=s[0],r[1]=s[1],r[2]=s[2],r[3]=s[4],r[4]=s[5],r[5]=s[6],r[6]=s[8],r[7]=s[9],r[8]=s[10],this},fromArray:function(o){var s=this.val;return s[0]=o[0],s[1]=o[1],s[2]=o[2],s[3]=o[3],s[4]=o[4],s[5]=o[5],s[6]=o[6],s[7]=o[7],s[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,s=o[1],r=o[2],e=o[5];return o[1]=o[3],o[2]=o[6],o[3]=s,o[5]=o[7],o[6]=r,o[7]=e,this},invert:function(){var o=this.val,s=o[0],r=o[1],e=o[2],n=o[3],l=o[4],i=o[5],h=o[6],u=o[7],c=o[8],v=c*l-i*u,m=-c*n+i*h,T=u*n-l*h,C=s*v+r*m+e*T;return C?(C=1/C,o[0]=v*C,o[1]=(-c*r+e*u)*C,o[2]=(i*r-e*l)*C,o[3]=m*C,o[4]=(c*s-e*h)*C,o[5]=(-i*s+e*n)*C,o[6]=T*C,o[7]=(-u*s+r*h)*C,o[8]=(l*s-r*n)*C,this):null},adjoint:function(){var o=this.val,s=o[0],r=o[1],e=o[2],n=o[3],l=o[4],i=o[5],h=o[6],u=o[7],c=o[8];return o[0]=l*c-i*u,o[1]=e*u-r*c,o[2]=r*i-e*l,o[3]=i*h-n*c,o[4]=s*c-e*h,o[5]=e*n-s*i,o[6]=n*u-l*h,o[7]=r*h-s*u,o[8]=s*l-r*n,this},determinant:function(){var o=this.val,s=o[0],r=o[1],e=o[2],n=o[3],l=o[4],i=o[5],h=o[6],u=o[7],c=o[8];return s*(c*l-i*u)+r*(-c*n+i*h)+e*(u*n-l*h)},multiply:function(o){var s=this.val,r=s[0],e=s[1],n=s[2],l=s[3],i=s[4],h=s[5],u=s[6],c=s[7],v=s[8],m=o.val,T=m[0],C=m[1],S=m[2],P=m[3],A=m[4],L=m[5],F=m[6],I=m[7],D=m[8];return s[0]=T*r+C*l+S*u,s[1]=T*e+C*i+S*c,s[2]=T*n+C*h+S*v,s[3]=P*r+A*l+L*u,s[4]=P*e+A*i+L*c,s[5]=P*n+A*h+L*v,s[6]=F*r+I*l+D*u,s[7]=F*e+I*i+D*c,s[8]=F*n+I*h+D*v,this},translate:function(o){var s=this.val,r=o.x,e=o.y;return s[6]=r*s[0]+e*s[3]+s[6],s[7]=r*s[1]+e*s[4]+s[7],s[8]=r*s[2]+e*s[5]+s[8],this},rotate:function(o){var s=this.val,r=s[0],e=s[1],n=s[2],l=s[3],i=s[4],h=s[5],u=Math.sin(o),c=Math.cos(o);return s[0]=c*r+u*l,s[1]=c*e+u*i,s[2]=c*n+u*h,s[3]=c*l-u*r,s[4]=c*i-u*e,s[5]=c*h-u*n,this},scale:function(o){var s=this.val,r=o.x,e=o.y;return s[0]=r*s[0],s[1]=r*s[1],s[2]=r*s[2],s[3]=e*s[3],s[4]=e*s[4],s[5]=e*s[5],this},fromQuat:function(o){var s=o.x,r=o.y,e=o.z,n=o.w,l=s+s,i=r+r,h=e+e,u=s*l,c=s*i,v=s*h,m=r*i,T=r*h,C=e*h,S=n*l,P=n*i,A=n*h,L=this.val;return L[0]=1-(m+C),L[3]=c+A,L[6]=v-P,L[1]=c-A,L[4]=1-(u+C),L[7]=T+S,L[2]=v+P,L[5]=T-S,L[8]=1-(u+m),this},normalFromMat4:function(o){var s=o.val,r=this.val,e=s[0],n=s[1],l=s[2],i=s[3],h=s[4],u=s[5],c=s[6],v=s[7],m=s[8],T=s[9],C=s[10],S=s[11],P=s[12],A=s[13],L=s[14],F=s[15],I=e*u-n*h,D=e*c-l*h,B=e*v-i*h,G=n*c-l*u,z=n*v-i*u,W=l*v-i*c,Y=m*A-T*P,K=m*L-C*P,Z=m*F-S*P,V=T*L-C*A,H=T*F-S*A,N=C*F-S*L,U=I*N-D*H+B*V+G*Z-z*K+W*Y;return U?(U=1/U,r[0]=(u*N-c*H+v*V)*U,r[1]=(c*Z-h*N-v*K)*U,r[2]=(h*H-u*Z+v*Y)*U,r[3]=(l*H-n*N-i*V)*U,r[4]=(e*N-l*Z+i*K)*U,r[5]=(n*Z-e*H-i*Y)*U,r[6]=(A*W-L*z+F*G)*U,r[7]=(L*B-P*W-F*D)*U,r[8]=(P*z-A*B+F*I)*U,this):null}});d.exports=p},37867:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(25836),o=1e-6,s=new a({initialize:function(u){this.val=new Float32Array(16),u?this.copy(u):this.identity()},clone:function(){return new s(this)},set:function(h){return this.copy(h)},setValues:function(h,u,c,v,m,T,C,S,P,A,L,F,I,D,B,G){var z=this.val;return z[0]=h,z[1]=u,z[2]=c,z[3]=v,z[4]=m,z[5]=T,z[6]=C,z[7]=S,z[8]=P,z[9]=A,z[10]=L,z[11]=F,z[12]=I,z[13]=D,z[14]=B,z[15]=G,this},copy:function(h){var u=h.val;return this.setValues(u[0],u[1],u[2],u[3],u[4],u[5],u[6],u[7],u[8],u[9],u[10],u[11],u[12],u[13],u[14],u[15])},fromArray:function(h){return this.setValues(h[0],h[1],h[2],h[3],h[4],h[5],h[6],h[7],h[8],h[9],h[10],h[11],h[12],h[13],h[14],h[15])},zero:function(){return this.setValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)},transform:function(h,u,c){var v=r.fromQuat(c),m=v.val,T=u.x,C=u.y,S=u.z;return this.setValues(m[0]*T,m[1]*T,m[2]*T,0,m[4]*C,m[5]*C,m[6]*C,0,m[8]*S,m[9]*S,m[10]*S,0,h.x,h.y,h.z,1)},xyz:function(h,u,c){this.identity();var v=this.val;return v[12]=h,v[13]=u,v[14]=c,this},scaling:function(h,u,c){this.zero();var v=this.val;return v[0]=h,v[5]=u,v[10]=c,v[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 h=this.val,u=h[1],c=h[2],v=h[3],m=h[6],T=h[7],C=h[11];return h[1]=h[4],h[2]=h[8],h[3]=h[12],h[4]=u,h[6]=h[9],h[7]=h[13],h[8]=c,h[9]=m,h[11]=h[14],h[12]=v,h[13]=T,h[14]=C,this},getInverse:function(h){return this.copy(h),this.invert()},invert:function(){var h=this.val,u=h[0],c=h[1],v=h[2],m=h[3],T=h[4],C=h[5],S=h[6],P=h[7],A=h[8],L=h[9],F=h[10],I=h[11],D=h[12],B=h[13],G=h[14],z=h[15],W=u*C-c*T,Y=u*S-v*T,K=u*P-m*T,Z=c*S-v*C,V=c*P-m*C,H=v*P-m*S,N=A*B-L*D,U=A*G-F*D,X=A*z-I*D,$=L*G-F*B,k=L*z-I*B,Q=F*z-I*G,J=W*Q-Y*k+K*$+Z*X-V*U+H*N;return J?(J=1/J,this.setValues((C*Q-S*k+P*$)*J,(v*k-c*Q-m*$)*J,(B*H-G*V+z*Z)*J,(F*V-L*H-I*Z)*J,(S*X-T*Q-P*U)*J,(u*Q-v*X+m*U)*J,(G*K-D*H-z*Y)*J,(A*H-F*K+I*Y)*J,(T*k-C*X+P*N)*J,(c*X-u*k-m*N)*J,(D*V-B*K+z*W)*J,(L*K-A*V-I*W)*J,(C*U-T*$-S*N)*J,(u*$-c*U+v*N)*J,(B*Y-D*Z-G*W)*J,(A*Z-L*Y+F*W)*J)):this},adjoint:function(){var h=this.val,u=h[0],c=h[1],v=h[2],m=h[3],T=h[4],C=h[5],S=h[6],P=h[7],A=h[8],L=h[9],F=h[10],I=h[11],D=h[12],B=h[13],G=h[14],z=h[15];return this.setValues(C*(F*z-I*G)-L*(S*z-P*G)+B*(S*I-P*F),-(c*(F*z-I*G)-L*(v*z-m*G)+B*(v*I-m*F)),c*(S*z-P*G)-C*(v*z-m*G)+B*(v*P-m*S),-(c*(S*I-P*F)-C*(v*I-m*F)+L*(v*P-m*S)),-(T*(F*z-I*G)-A*(S*z-P*G)+D*(S*I-P*F)),u*(F*z-I*G)-A*(v*z-m*G)+D*(v*I-m*F),-(u*(S*z-P*G)-T*(v*z-m*G)+D*(v*P-m*S)),u*(S*I-P*F)-T*(v*I-m*F)+A*(v*P-m*S),T*(L*z-I*B)-A*(C*z-P*B)+D*(C*I-P*L),-(u*(L*z-I*B)-A*(c*z-m*B)+D*(c*I-m*L)),u*(C*z-P*B)-T*(c*z-m*B)+D*(c*P-m*C),-(u*(C*I-P*L)-T*(c*I-m*L)+A*(c*P-m*C)),-(T*(L*G-F*B)-A*(C*G-S*B)+D*(C*F-S*L)),u*(L*G-F*B)-A*(c*G-v*B)+D*(c*F-v*L),-(u*(C*G-S*B)-T*(c*G-v*B)+D*(c*S-v*C)),u*(C*F-S*L)-T*(c*F-v*L)+A*(c*S-v*C))},determinant:function(){var h=this.val,u=h[0],c=h[1],v=h[2],m=h[3],T=h[4],C=h[5],S=h[6],P=h[7],A=h[8],L=h[9],F=h[10],I=h[11],D=h[12],B=h[13],G=h[14],z=h[15],W=u*C-c*T,Y=u*S-v*T,K=u*P-m*T,Z=c*S-v*C,V=c*P-m*C,H=v*P-m*S,N=A*B-L*D,U=A*G-F*D,X=A*z-I*D,$=L*G-F*B,k=L*z-I*B,Q=F*z-I*G;return W*Q-Y*k+K*$+Z*X-V*U+H*N},multiply:function(h){var u=this.val,c=u[0],v=u[1],m=u[2],T=u[3],C=u[4],S=u[5],P=u[6],A=u[7],L=u[8],F=u[9],I=u[10],D=u[11],B=u[12],G=u[13],z=u[14],W=u[15],Y=h.val,K=Y[0],Z=Y[1],V=Y[2],H=Y[3];return u[0]=K*c+Z*C+V*L+H*B,u[1]=K*v+Z*S+V*F+H*G,u[2]=K*m+Z*P+V*I+H*z,u[3]=K*T+Z*A+V*D+H*W,K=Y[4],Z=Y[5],V=Y[6],H=Y[7],u[4]=K*c+Z*C+V*L+H*B,u[5]=K*v+Z*S+V*F+H*G,u[6]=K*m+Z*P+V*I+H*z,u[7]=K*T+Z*A+V*D+H*W,K=Y[8],Z=Y[9],V=Y[10],H=Y[11],u[8]=K*c+Z*C+V*L+H*B,u[9]=K*v+Z*S+V*F+H*G,u[10]=K*m+Z*P+V*I+H*z,u[11]=K*T+Z*A+V*D+H*W,K=Y[12],Z=Y[13],V=Y[14],H=Y[15],u[12]=K*c+Z*C+V*L+H*B,u[13]=K*v+Z*S+V*F+H*G,u[14]=K*m+Z*P+V*I+H*z,u[15]=K*T+Z*A+V*D+H*W,this},multiplyLocal:function(h){var u=this.val,c=h.val;return this.setValues(u[0]*c[0]+u[1]*c[4]+u[2]*c[8]+u[3]*c[12],u[0]*c[1]+u[1]*c[5]+u[2]*c[9]+u[3]*c[13],u[0]*c[2]+u[1]*c[6]+u[2]*c[10]+u[3]*c[14],u[0]*c[3]+u[1]*c[7]+u[2]*c[11]+u[3]*c[15],u[4]*c[0]+u[5]*c[4]+u[6]*c[8]+u[7]*c[12],u[4]*c[1]+u[5]*c[5]+u[6]*c[9]+u[7]*c[13],u[4]*c[2]+u[5]*c[6]+u[6]*c[10]+u[7]*c[14],u[4]*c[3]+u[5]*c[7]+u[6]*c[11]+u[7]*c[15],u[8]*c[0]+u[9]*c[4]+u[10]*c[8]+u[11]*c[12],u[8]*c[1]+u[9]*c[5]+u[10]*c[9]+u[11]*c[13],u[8]*c[2]+u[9]*c[6]+u[10]*c[10]+u[11]*c[14],u[8]*c[3]+u[9]*c[7]+u[10]*c[11]+u[11]*c[15],u[12]*c[0]+u[13]*c[4]+u[14]*c[8]+u[15]*c[12],u[12]*c[1]+u[13]*c[5]+u[14]*c[9]+u[15]*c[13],u[12]*c[2]+u[13]*c[6]+u[14]*c[10]+u[15]*c[14],u[12]*c[3]+u[13]*c[7]+u[14]*c[11]+u[15]*c[15])},premultiply:function(h){return this.multiplyMatrices(h,this)},multiplyMatrices:function(h,u){var c=h.val,v=u.val,m=c[0],T=c[4],C=c[8],S=c[12],P=c[1],A=c[5],L=c[9],F=c[13],I=c[2],D=c[6],B=c[10],G=c[14],z=c[3],W=c[7],Y=c[11],K=c[15],Z=v[0],V=v[4],H=v[8],N=v[12],U=v[1],X=v[5],$=v[9],k=v[13],Q=v[2],J=v[6],et=v[10],nt=v[14],st=v[3],ot=v[7],ut=v[11],at=v[15];return this.setValues(m*Z+T*U+C*Q+S*st,P*Z+A*U+L*Q+F*st,I*Z+D*U+B*Q+G*st,z*Z+W*U+Y*Q+K*st,m*V+T*X+C*J+S*ot,P*V+A*X+L*J+F*ot,I*V+D*X+B*J+G*ot,z*V+W*X+Y*J+K*ot,m*H+T*$+C*et+S*ut,P*H+A*$+L*et+F*ut,I*H+D*$+B*et+G*ut,z*H+W*$+Y*et+K*ut,m*N+T*k+C*nt+S*at,P*N+A*k+L*nt+F*at,I*N+D*k+B*nt+G*at,z*N+W*k+Y*nt+K*at)},translate:function(h){return this.translateXYZ(h.x,h.y,h.z)},translateXYZ:function(h,u,c){var v=this.val;return v[12]=v[0]*h+v[4]*u+v[8]*c+v[12],v[13]=v[1]*h+v[5]*u+v[9]*c+v[13],v[14]=v[2]*h+v[6]*u+v[10]*c+v[14],v[15]=v[3]*h+v[7]*u+v[11]*c+v[15],this},scale:function(h){return this.scaleXYZ(h.x,h.y,h.z)},scaleXYZ:function(h,u,c){var v=this.val;return v[0]=v[0]*h,v[1]=v[1]*h,v[2]=v[2]*h,v[3]=v[3]*h,v[4]=v[4]*u,v[5]=v[5]*u,v[6]=v[6]*u,v[7]=v[7]*u,v[8]=v[8]*c,v[9]=v[9]*c,v[10]=v[10]*c,v[11]=v[11]*c,this},makeRotationAxis:function(h,u){var c=Math.cos(u),v=Math.sin(u),m=1-c,T=h.x,C=h.y,S=h.z,P=m*T,A=m*C;return this.setValues(P*T+c,P*C-v*S,P*S+v*C,0,P*C+v*S,A*C+c,A*S-v*T,0,P*S-v*C,A*S+v*T,m*S*S+c,0,0,0,0,1)},rotate:function(h,u){var c=this.val,v=u.x,m=u.y,T=u.z,C=Math.sqrt(v*v+m*m+T*T);if(Math.abs(C){/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){return Math.min(t+a,p)};d.exports=x},50040:d=>{/** + * @author Vladislav Forsh + * @copyright 2021 RoboWhale + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){var a=t.length;if(a===0)return 0;t.sort(function(o,s){return o-s});var p=Math.floor(a/2);return a%2===0?(t[p]+t[p-1])/2:t[p]};d.exports=x},37204:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){return Math.max(t-a,p)};d.exports=x},65201:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p,o){p===void 0&&(p=a+1);var s=(t-a)/(p-a);return s>1?o!==void 0?(s=(o-t)/(o-p),s<0&&(s=0)):s=1:s<0&&(s=0),s};d.exports=x},15746:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(94434),o=t(29747),s=t(25836),r=1e-6,e=new Int8Array([1,2,0]),n=new Float32Array([0,0,0]),l=new s(1,0,0),i=new s(0,1,0),h=new s,u=new p,c=new a({initialize:function(m,T,C,S){this.onChangeCallback=o,this.set(m,T,C,S)},x:{get:function(){return this._x},set:function(v){this._x=v,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(v){this._y=v,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(v){this._z=v,this.onChangeCallback(this)}},w:{get:function(){return this._w},set:function(v){this._w=v,this.onChangeCallback(this)}},copy:function(v){return this.set(v)},set:function(v,m,T,C,S){return S===void 0&&(S=!0),typeof v=="object"?(this._x=v.x||0,this._y=v.y||0,this._z=v.z||0,this._w=v.w||0):(this._x=v||0,this._y=m||0,this._z=T||0,this._w=C||0),S&&this.onChangeCallback(this),this},add:function(v){return this._x+=v.x,this._y+=v.y,this._z+=v.z,this._w+=v.w,this.onChangeCallback(this),this},subtract:function(v){return this._x-=v.x,this._y-=v.y,this._z-=v.z,this._w-=v.w,this.onChangeCallback(this),this},scale:function(v){return this._x*=v,this._y*=v,this._z*=v,this._w*=v,this.onChangeCallback(this),this},length:function(){var v=this.x,m=this.y,T=this.z,C=this.w;return Math.sqrt(v*v+m*m+T*T+C*C)},lengthSq:function(){var v=this.x,m=this.y,T=this.z,C=this.w;return v*v+m*m+T*T+C*C},normalize:function(){var v=this.x,m=this.y,T=this.z,C=this.w,S=v*v+m*m+T*T+C*C;return S>0&&(S=1/Math.sqrt(S),this._x=v*S,this._y=m*S,this._z=T*S,this._w=C*S),this.onChangeCallback(this),this},dot:function(v){return this.x*v.x+this.y*v.y+this.z*v.z+this.w*v.w},lerp:function(v,m){m===void 0&&(m=0);var T=this.x,C=this.y,S=this.z,P=this.w;return this.set(T+m*(v.x-T),C+m*(v.y-C),S+m*(v.z-S),P+m*(v.w-P))},rotationTo:function(v,m){var T=v.x*m.x+v.y*m.y+v.z*m.z;return T<-.999999?(h.copy(l).cross(v).length().999999?this.set(0,0,0,1):(h.copy(v).cross(m),this._x=h.x,this._y=h.y,this._z=h.z,this._w=1+T,this.normalize())},setAxes:function(v,m,T){var C=u.val;return C[0]=m.x,C[3]=m.y,C[6]=m.z,C[1]=T.x,C[4]=T.y,C[7]=T.z,C[2]=-v.x,C[5]=-v.y,C[8]=-v.z,this.fromMat3(u).normalize()},identity:function(){return this.set(0,0,0,1)},setAxisAngle:function(v,m){m=m*.5;var T=Math.sin(m);return this.set(T*v.x,T*v.y,T*v.z,Math.cos(m))},multiply:function(v){var m=this.x,T=this.y,C=this.z,S=this.w,P=v.x,A=v.y,L=v.z,F=v.w;return this.set(m*F+S*P+T*L-C*A,T*F+S*A+C*P-m*L,C*F+S*L+m*A-T*P,S*F-m*P-T*A-C*L)},slerp:function(v,m){var T=this.x,C=this.y,S=this.z,P=this.w,A=v.x,L=v.y,F=v.z,I=v.w,D=T*A+C*L+S*F+P*I;D<0&&(D=-D,A=-A,L=-L,F=-F,I=-I);var B=1-m,G=m;if(1-D>r){var z=Math.acos(D),W=Math.sin(z);B=Math.sin((1-m)*z)/W,G=Math.sin(m*z)/W}return this.set(B*T+G*A,B*C+G*L,B*S+G*F,B*P+G*I)},invert:function(){var v=this.x,m=this.y,T=this.z,C=this.w,S=v*v+m*m+T*T+C*C,P=S?1/S:0;return this.set(-v*P,-m*P,-T*P,C*P)},conjugate:function(){return this._x=-this.x,this._y=-this.y,this._z=-this.z,this.onChangeCallback(this),this},rotateX:function(v){v*=.5;var m=this.x,T=this.y,C=this.z,S=this.w,P=Math.sin(v),A=Math.cos(v);return this.set(m*A+S*P,T*A+C*P,C*A-T*P,S*A-m*P)},rotateY:function(v){v*=.5;var m=this.x,T=this.y,C=this.z,S=this.w,P=Math.sin(v),A=Math.cos(v);return this.set(m*A-C*P,T*A+S*P,C*A+m*P,S*A-T*P)},rotateZ:function(v){v*=.5;var m=this.x,T=this.y,C=this.z,S=this.w,P=Math.sin(v),A=Math.cos(v);return this.set(m*A+T*P,T*A-m*P,C*A+S*P,S*A-C*P)},calculateW:function(){var v=this.x,m=this.y,T=this.z;return this.w=-Math.sqrt(1-v*v-m*m-T*T),this},setFromEuler:function(v,m){var T=v.x/2,C=v.y/2,S=v.z/2,P=Math.cos(T),A=Math.cos(C),L=Math.cos(S),F=Math.sin(T),I=Math.sin(C),D=Math.sin(S);switch(v.order){case"XYZ":{this.set(F*A*L+P*I*D,P*I*L-F*A*D,P*A*D+F*I*L,P*A*L-F*I*D,m);break}case"YXZ":{this.set(F*A*L+P*I*D,P*I*L-F*A*D,P*A*D-F*I*L,P*A*L+F*I*D,m);break}case"ZXY":{this.set(F*A*L-P*I*D,P*I*L+F*A*D,P*A*D+F*I*L,P*A*L-F*I*D,m);break}case"ZYX":{this.set(F*A*L-P*I*D,P*I*L+F*A*D,P*A*D-F*I*L,P*A*L+F*I*D,m);break}case"YZX":{this.set(F*A*L+P*I*D,P*I*L+F*A*D,P*A*D-F*I*L,P*A*L-F*I*D,m);break}case"XZY":{this.set(F*A*L-P*I*D,P*I*L-F*A*D,P*A*D+F*I*L,P*A*L+F*I*D,m);break}}return this},setFromRotationMatrix:function(v){var m=v.val,T=m[0],C=m[4],S=m[8],P=m[1],A=m[5],L=m[9],F=m[2],I=m[6],D=m[10],B=T+A+D,G;return B>0?(G=.5/Math.sqrt(B+1),this.set((I-L)*G,(S-F)*G,(P-C)*G,.25/G)):T>A&&T>D?(G=2*Math.sqrt(1+T-A-D),this.set(.25*G,(C+P)/G,(S+F)/G,(I-L)/G)):A>D?(G=2*Math.sqrt(1+A-T-D),this.set((C+P)/G,.25*G,(L+I)/G,(S-F)/G)):(G=2*Math.sqrt(1+D-T-A),this.set((S+F)/G,(L+I)/G,.25*G,(P-C)/G)),this},fromMat3:function(v){var m=v.val,T=m[0]+m[4]+m[8],C;if(T>0)C=Math.sqrt(T+1),this.w=.5*C,C=.5/C,this._x=(m[7]-m[5])*C,this._y=(m[2]-m[6])*C,this._z=(m[3]-m[1])*C;else{var S=0;m[4]>m[0]&&(S=1),m[8]>m[S*3+S]&&(S=2);var P=e[S],A=e[P];C=Math.sqrt(m[S*3+S]-m[P*3+P]-m[A*3+A]+1),n[S]=.5*C,C=.5/C,n[P]=(m[P*3+S]+m[S*3+P])*C,n[A]=(m[A*3+S]+m[S*3+A])*C,this._x=n[0],this._y=n[1],this._z=n[2],this._w=(m[A*3+P]-m[P*3+A])*C}return this.onChangeCallback(this),this}});d.exports=c},43396:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(36383),p=function(o){return o*a.RAD_TO_DEG};d.exports=p},74362:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){a===void 0&&(a=1);var p=Math.random()*2*Math.PI;return t.x=Math.cos(p)*a,t.y=Math.sin(p)*a,t};d.exports=x},60706:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){a===void 0&&(a=1);var p=Math.random()*2*Math.PI,o=Math.random()*2-1,s=Math.sqrt(1-o*o)*a;return t.x=Math.cos(p)*s,t.y=Math.sin(p)*s,t.z=o*a,t};d.exports=x},67421:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=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};d.exports=x},36305:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){var p=t.x,o=t.y;return t.x=p*Math.cos(a)-o*Math.sin(a),t.y=p*Math.sin(a)+o*Math.cos(a),t};d.exports=x},11520:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p,o){var s=Math.cos(o),r=Math.sin(o),e=t.x-a,n=t.y-p;return t.x=e*s-n*r+a,t.y=e*r+n*s+p,t};d.exports=x},1163:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p,o,s){var r=o+Math.atan2(t.y-p,t.x-a);return t.x=a+s*Math.cos(r),t.y=p+s*Math.sin(r),t};d.exports=x},70336:d=>{/** + * @author samme + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p,o,s){return t.x=a+s*Math.cos(o),t.y=p+s*Math.sin(o),t};d.exports=x},72678:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(25836),p=t(37867),o=t(15746),s=new p,r=new o,e=new a,n=function(l,i,h){return r.setAxisAngle(i,h),s.fromRotationTranslation(r,e.set(0,0,0)),l.transformMat4(s)};d.exports=n},2284:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return t>0?Math.ceil(t):Math.floor(t)};d.exports=x},41013:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){a===void 0&&(a=0),p===void 0&&(p=10);var o=Math.pow(p,-a);return Math.round(t*o)/o};d.exports=x},16922:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p,o){a===void 0&&(a=1),p===void 0&&(p=1),o===void 0&&(o=1),o*=Math.PI/t;for(var s=[],r=[],e=0;e{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){return t<=a?0:t>=p?1:(t=(t-a)/(p-a),t*t*(3-2*t))};d.exports=x},54261:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){return t=Math.max(0,Math.min(1,(t-a)/(p-a))),t*t*t*(t*(t*6-15)+10)};d.exports=x},44408:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(26099),p=function(o,s,r,e){e===void 0&&(e=new a);var n=0,l=0,i=s*r;return o>0&&o<=i&&(o>s-1?(l=Math.floor(o/s),n=o-l*s):n=o),e.set(n,l)};d.exports=p},85955:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(26099),p=function(o,s,r,e,n,l,i,h){h===void 0&&(h=new a);var u=Math.sin(n),c=Math.cos(n),v=c*l,m=u*l,T=-u*i,C=c*i,S=1/(v*C+T*-m);return h.x=C*S*o+-T*S*s+(e*T-r*C)*S,h.y=v*S*s+-m*S*o+(-e*v+r*m)*S,h};d.exports=p},26099:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(43855),o=new a({initialize:function(r,e){this.x=0,this.y=0,typeof r=="object"?(this.x=r.x||0,this.y=r.y||0):(e===void 0&&(e=r),this.x=r||0,this.y=e||0)},clone:function(){return new o(this.x,this.y)},copy:function(s){return this.x=s.x||0,this.y=s.y||0,this},setFromObject:function(s){return this.x=s.x||0,this.y=s.y||0,this},set:function(s,r){return r===void 0&&(r=s),this.x=s,this.y=r,this},setTo:function(s,r){return this.set(s,r)},setToPolar:function(s,r){return r==null&&(r=1),this.x=Math.cos(s)*r,this.y=Math.sin(s)*r,this},equals:function(s){return this.x===s.x&&this.y===s.y},fuzzyEquals:function(s,r){return p(this.x,s.x,r)&&p(this.y,s.y,r)},angle:function(){var s=Math.atan2(this.y,this.x);return s<0&&(s+=2*Math.PI),s},setAngle:function(s){return this.setToPolar(s,this.length())},add:function(s){return this.x+=s.x,this.y+=s.y,this},subtract:function(s){return this.x-=s.x,this.y-=s.y,this},multiply:function(s){return this.x*=s.x,this.y*=s.y,this},scale:function(s){return isFinite(s)?(this.x*=s,this.y*=s):(this.x=0,this.y=0),this},divide:function(s){return this.x/=s.x,this.y/=s.y,this},negate:function(){return this.x=-this.x,this.y=-this.y,this},distance:function(s){var r=s.x-this.x,e=s.y-this.y;return Math.sqrt(r*r+e*e)},distanceSq:function(s){var r=s.x-this.x,e=s.y-this.y;return r*r+e*e},length:function(){var s=this.x,r=this.y;return Math.sqrt(s*s+r*r)},setLength:function(s){return this.normalize().scale(s)},lengthSq:function(){var s=this.x,r=this.y;return s*s+r*r},normalize:function(){var s=this.x,r=this.y,e=s*s+r*r;return e>0&&(e=1/Math.sqrt(e),this.x=s*e,this.y=r*e),this},normalizeRightHand:function(){var s=this.x;return this.x=this.y*-1,this.y=s,this},normalizeLeftHand:function(){var s=this.x;return this.x=this.y,this.y=s*-1,this},dot:function(s){return this.x*s.x+this.y*s.y},cross:function(s){return this.x*s.y-this.y*s.x},lerp:function(s,r){r===void 0&&(r=0);var e=this.x,n=this.y;return this.x=e+r*(s.x-e),this.y=n+r*(s.y-n),this},transformMat3:function(s){var r=this.x,e=this.y,n=s.val;return this.x=n[0]*r+n[3]*e+n[6],this.y=n[1]*r+n[4]*e+n[7],this},transformMat4:function(s){var r=this.x,e=this.y,n=s.val;return this.x=n[0]*r+n[4]*e+n[12],this.y=n[1]*r+n[5]*e+n[13],this},reset:function(){return this.x=0,this.y=0,this},limit:function(s){var r=this.length();return r&&r>s&&this.scale(s/r),this},reflect:function(s){return s=s.clone().normalize(),this.subtract(s.scale(2*this.dot(s)))},mirror:function(s){return this.reflect(s).negate()},rotate:function(s){var r=Math.cos(s),e=Math.sin(s);return this.set(r*this.x-e*this.y,e*this.x+r*this.y)},project:function(s){var r=this.dot(s)/s.dot(s);return this.copy(s).scale(r)}});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),d.exports=o},25836:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=new a({initialize:function(s,r,e){this.x=0,this.y=0,this.z=0,typeof s=="object"?(this.x=s.x||0,this.y=s.y||0,this.z=s.z||0):(this.x=s||0,this.y=r||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 p(this.x,this.y,this.z)},addVectors:function(o,s){return this.x=o.x+s.x,this.y=o.y+s.y,this.z=o.z+s.z,this},crossVectors:function(o,s){var r=o.x,e=o.y,n=o.z,l=s.x,i=s.y,h=s.z;return this.x=e*h-n*i,this.y=n*l-r*h,this.z=r*i-e*l,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,s,r){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=s||0,this.z=r||0),this},setFromMatrixPosition:function(o){return this.fromArray(o.val,12)},setFromMatrixColumn:function(o,s){return this.fromArray(o.val,s*4)},fromArray:function(o,s){return s===void 0&&(s=0),this.x=o[s],this.y=o[s+1],this.z=o[s+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,s){return this.x+=o.x*s,this.y+=o.y*s,this.z+=o.z*s||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 s=o.x-this.x,r=o.y-this.y,e=o.z-this.z||0;return Math.sqrt(s*s+r*r+e*e)},distanceSq:function(o){var s=o.x-this.x,r=o.y-this.y,e=o.z-this.z||0;return s*s+r*r+e*e},length:function(){var o=this.x,s=this.y,r=this.z;return Math.sqrt(o*o+s*s+r*r)},lengthSq:function(){var o=this.x,s=this.y,r=this.z;return o*o+s*s+r*r},normalize:function(){var o=this.x,s=this.y,r=this.z,e=o*o+s*s+r*r;return e>0&&(e=1/Math.sqrt(e),this.x=o*e,this.y=s*e,this.z=r*e),this},dot:function(o){return this.x*o.x+this.y*o.y+this.z*o.z},cross:function(o){var s=this.x,r=this.y,e=this.z,n=o.x,l=o.y,i=o.z;return this.x=r*i-e*l,this.y=e*n-s*i,this.z=s*l-r*n,this},lerp:function(o,s){s===void 0&&(s=0);var r=this.x,e=this.y,n=this.z;return this.x=r+s*(o.x-r),this.y=e+s*(o.y-e),this.z=n+s*(o.z-n),this},applyMatrix3:function(o){var s=this.x,r=this.y,e=this.z,n=o.val;return this.x=n[0]*s+n[3]*r+n[6]*e,this.y=n[1]*s+n[4]*r+n[7]*e,this.z=n[2]*s+n[5]*r+n[8]*e,this},applyMatrix4:function(o){var s=this.x,r=this.y,e=this.z,n=o.val,l=1/(n[3]*s+n[7]*r+n[11]*e+n[15]);return this.x=(n[0]*s+n[4]*r+n[8]*e+n[12])*l,this.y=(n[1]*s+n[5]*r+n[9]*e+n[13])*l,this.z=(n[2]*s+n[6]*r+n[10]*e+n[14])*l,this},transformMat3:function(o){var s=this.x,r=this.y,e=this.z,n=o.val;return this.x=s*n[0]+r*n[3]+e*n[6],this.y=s*n[1]+r*n[4]+e*n[7],this.z=s*n[2]+r*n[5]+e*n[8],this},transformMat4:function(o){var s=this.x,r=this.y,e=this.z,n=o.val;return this.x=n[0]*s+n[4]*r+n[8]*e+n[12],this.y=n[1]*s+n[5]*r+n[9]*e+n[13],this.z=n[2]*s+n[6]*r+n[10]*e+n[14],this},transformCoordinates:function(o){var s=this.x,r=this.y,e=this.z,n=o.val,l=s*n[0]+r*n[4]+e*n[8]+n[12],i=s*n[1]+r*n[5]+e*n[9]+n[13],h=s*n[2]+r*n[6]+e*n[10]+n[14],u=s*n[3]+r*n[7]+e*n[11]+n[15];return this.x=l/u,this.y=i/u,this.z=h/u,this},transformQuat:function(o){var s=this.x,r=this.y,e=this.z,n=o.x,l=o.y,i=o.z,h=o.w,u=h*s+l*e-i*r,c=h*r+i*s-n*e,v=h*e+n*r-l*s,m=-n*s-l*r-i*e;return this.x=u*h+m*-n+c*-i-v*-l,this.y=c*h+m*-l+v*-n-u*-i,this.z=v*h+m*-i+u*-l-c*-n,this},project:function(o){var s=this.x,r=this.y,e=this.z,n=o.val,l=n[0],i=n[1],h=n[2],u=n[3],c=n[4],v=n[5],m=n[6],T=n[7],C=n[8],S=n[9],P=n[10],A=n[11],L=n[12],F=n[13],I=n[14],D=n[15],B=1/(s*u+r*T+e*A+D);return this.x=(s*l+r*c+e*C+L)*B,this.y=(s*i+r*v+e*S+F)*B,this.z=(s*h+r*m+e*P+I)*B,this},projectViewMatrix:function(o,s){return this.applyMatrix4(o).applyMatrix4(s)},unprojectViewMatrix:function(o,s){return this.applyMatrix4(o).applyMatrix4(s)},unproject:function(o,s){var r=o.x,e=o.y,n=o.z,l=o.w,i=this.x-r,h=l-this.y-1-e,u=this.z;return this.x=2*i/n-1,this.y=2*h/l-1,this.z=2*u-1,this.project(s)},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),d.exports=p},61369:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=new a({initialize:function(s,r,e,n){this.x=0,this.y=0,this.z=0,this.w=0,typeof s=="object"?(this.x=s.x||0,this.y=s.y||0,this.z=s.z||0,this.w=s.w||0):(this.x=s||0,this.y=r||0,this.z=e||0,this.w=n||0)},clone:function(){return new p(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,s,r,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=s||0,this.z=r||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,s=this.y,r=this.z,e=this.w;return Math.sqrt(o*o+s*s+r*r+e*e)},lengthSq:function(){var o=this.x,s=this.y,r=this.z,e=this.w;return o*o+s*s+r*r+e*e},normalize:function(){var o=this.x,s=this.y,r=this.z,e=this.w,n=o*o+s*s+r*r+e*e;return n>0&&(n=1/Math.sqrt(n),this.x=o*n,this.y=s*n,this.z=r*n,this.w=e*n),this},dot:function(o){return this.x*o.x+this.y*o.y+this.z*o.z+this.w*o.w},lerp:function(o,s){s===void 0&&(s=0);var r=this.x,e=this.y,n=this.z,l=this.w;return this.x=r+s*(o.x-r),this.y=e+s*(o.y-e),this.z=n+s*(o.z-n),this.w=l+s*(o.w-l),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 s=o.x-this.x,r=o.y-this.y,e=o.z-this.z||0,n=o.w-this.w||0;return Math.sqrt(s*s+r*r+e*e+n*n)},distanceSq:function(o){var s=o.x-this.x,r=o.y-this.y,e=o.z-this.z||0,n=o.w-this.w||0;return s*s+r*r+e*e+n*n},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(o){var s=this.x,r=this.y,e=this.z,n=this.w,l=o.val;return this.x=l[0]*s+l[4]*r+l[8]*e+l[12]*n,this.y=l[1]*s+l[5]*r+l[9]*e+l[13]*n,this.z=l[2]*s+l[6]*r+l[10]*e+l[14]*n,this.w=l[3]*s+l[7]*r+l[11]*e+l[15]*n,this},transformQuat:function(o){var s=this.x,r=this.y,e=this.z,n=o.x,l=o.y,i=o.z,h=o.w,u=h*s+l*e-i*r,c=h*r+i*s-n*e,v=h*e+n*r-l*s,m=-n*s-l*r-i*e;return this.x=u*h+m*-n+c*-i-v*-l,this.y=c*h+m*-l+v*-n-u*-i,this.z=v*h+m*-i+u*-l-c*-n,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,d.exports=p},60417:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){return Math.abs(t-a)<=p};d.exports=x},15994:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){var o=p-a;return a+((t-a)%o+o)%o};d.exports=x},31040:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p,o){return Math.atan2(o-a,p-t)};d.exports=x},55495:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){return Math.atan2(a.y-t.y,a.x-t.x)};d.exports=x},128:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){return Math.atan2(a.x-t.x,a.y-t.y)};d.exports=x},41273:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p,o){return Math.atan2(p-t,o-a)};d.exports=x},1432:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(36383),p=function(o){return o>Math.PI&&(o-=a.PI2),Math.abs(((o+a.TAU)%a.PI2-a.PI2)%a.PI2)};d.exports=p},12407:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return t=t%(2*Math.PI),t>=0?t:t+2*Math.PI};d.exports=x},53993:(d,x,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),p=function(){return a(-Math.PI,Math.PI)};d.exports=p},86564:(d,x,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),p=function(){return a(-180,180)};d.exports=p},90154:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(12407),p=function(o){return a(o+Math.PI)};d.exports=p},48736:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(36383),p=function(o,s,r){return r===void 0&&(r=.05),o===s||(Math.abs(s-o)<=r||Math.abs(s-o)>=a.PI2-r?o=s:(Math.abs(s-o)>Math.PI&&(so?o+=r:s{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){var p=a-t;if(p===0)return 0;var o=Math.floor((p- -180)/360);return p-o*360};d.exports=x},86554:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(15994),p=function(o){return a(o,-Math.PI,Math.PI)};d.exports=p},30954:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(15994),p=function(o){return a(o,-180,180)};d.exports=p},25588:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.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:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x={PI2:Math.PI*2,TAU:Math.PI*.5,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:null,MIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER||-9007199254740991,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991};d.exports=x},20339:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p,o){var s=t-p,r=a-o;return Math.sqrt(s*s+r*r)};d.exports=x},52816:d=>{/** + * @author samme + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){var p=t.x-a.x,o=t.y-a.y;return Math.sqrt(p*p+o*o)};d.exports=x},64559:d=>{/** + * @author samme + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){var p=t.x-a.x,o=t.y-a.y;return p*p+o*o};d.exports=x},82340:d=>{/** + * @author samme + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p,o){return Math.max(Math.abs(t-p),Math.abs(a-o))};d.exports=x},14390:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p,o,s){return s===void 0&&(s=2),Math.sqrt(Math.pow(p-t,s)+Math.pow(o-a,s))};d.exports=x},2243:d=>{/** + * @author samme + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p,o){return Math.abs(t-p)+Math.abs(a-o)};d.exports=x},89774:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p,o){var s=t-p,r=a-o;return s*s+r*r};d.exports=x},50994:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports={Between:t(20339),BetweenPoints:t(52816),BetweenPointsSquared:t(64559),Chebyshev:t(82340),Power:t(14390),Snake:t(2243),Squared:t(89774)}},62640:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(54178),p=t(41521),o=t(79980),s=t(85433),r=t(99140),e=t(48857),n=t(81596),l=t(59133),i=t(98516),h=t(35248),u=t(82500),c=t(49752);d.exports={Power0:n,Power1:l.Out,Power2:s.Out,Power3:i.Out,Power4:h.Out,Linear:n,Quad:l.Out,Cubic:s.Out,Quart:i.Out,Quint:h.Out,Sine:u.Out,Expo:e.Out,Circ:o.Out,Elastic:r.Out,Back:a.Out,Bounce:p.Out,Stepped:c,"Quad.easeIn":l.In,"Cubic.easeIn":s.In,"Quart.easeIn":i.In,"Quint.easeIn":h.In,"Sine.easeIn":u.In,"Expo.easeIn":e.In,"Circ.easeIn":o.In,"Elastic.easeIn":r.In,"Back.easeIn":a.In,"Bounce.easeIn":p.In,"Quad.easeOut":l.Out,"Cubic.easeOut":s.Out,"Quart.easeOut":i.Out,"Quint.easeOut":h.Out,"Sine.easeOut":u.Out,"Expo.easeOut":e.Out,"Circ.easeOut":o.Out,"Elastic.easeOut":r.Out,"Back.easeOut":a.Out,"Bounce.easeOut":p.Out,"Quad.easeInOut":l.InOut,"Cubic.easeInOut":s.InOut,"Quart.easeInOut":i.InOut,"Quint.easeInOut":h.InOut,"Sine.easeInOut":u.InOut,"Expo.easeInOut":e.InOut,"Circ.easeInOut":o.InOut,"Elastic.easeInOut":r.InOut,"Back.easeInOut":a.InOut,"Bounce.easeInOut":p.InOut}},1639:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){return a===void 0&&(a=1.70158),t*t*((a+1)*t-a)};d.exports=x},50099:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){a===void 0&&(a=1.70158);var p=a*1.525;return(t*=2)<1?.5*(t*t*((p+1)*t-p)):.5*((t-=2)*t*((p+1)*t+p)+2)};d.exports=x},41286:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){return a===void 0&&(a=1.70158),--t*t*((a+1)*t+a)+1};d.exports=x},54178:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports={In:t(1639),Out:t(41286),InOut:t(50099)}},59590:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=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)};d.exports=x},41788:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=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};d.exports=x},69905:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=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};d.exports=x},41521:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports={In:t(59590),Out:t(69905),InOut:t(41788)}},91861:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return 1-Math.sqrt(1-t*t)};d.exports=x},4177:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)};d.exports=x},57512:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return Math.sqrt(1- --t*t)};d.exports=x},79980:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports={In:t(91861),Out:t(57512),InOut:t(4177)}},51150:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return t*t*t};d.exports=x},82820:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)};d.exports=x},35033:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return--t*t*t+1};d.exports=x},85433:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports={In:t(51150),Out:t(35033),InOut:t(82820)}},69965:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){if(a===void 0&&(a=.1),p===void 0&&(p=.1),t===0)return 0;if(t===1)return 1;var o=p/4;return a<1?a=1:o=p*Math.asin(1/a)/(2*Math.PI),-(a*Math.pow(2,10*(t-=1))*Math.sin((t-o)*(2*Math.PI)/p))};d.exports=x},50665:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){if(a===void 0&&(a=.1),p===void 0&&(p=.1),t===0)return 0;if(t===1)return 1;var o=p/4;return a<1?a=1:o=p*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)/p)):a*Math.pow(2,-10*(t-=1))*Math.sin((t-o)*(2*Math.PI)/p)*.5+1};d.exports=x},7744:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){if(a===void 0&&(a=.1),p===void 0&&(p=.1),t===0)return 0;if(t===1)return 1;var o=p/4;return a<1?a=1:o=p*Math.asin(1/a)/(2*Math.PI),a*Math.pow(2,-10*t)*Math.sin((t-o)*(2*Math.PI)/p)+1};d.exports=x},99140:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports={In:t(69965),Out:t(7744),InOut:t(50665)}},24590:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return Math.pow(2,10*(t-1))-.001};d.exports=x},87844:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))};d.exports=x},89433:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return 1-Math.pow(2,-10*t)};d.exports=x},48857:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports={In:t(24590),Out:t(89433),InOut:t(87844)}},48820:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.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:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return t};d.exports=x},81596:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports=t(7147)},34826:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return t*t};d.exports=x},20544:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)};d.exports=x},92029:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return t*(2-t)};d.exports=x},59133:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports={In:t(34826),Out:t(92029),InOut:t(20544)}},64413:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return t*t*t*t};d.exports=x},78137:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)};d.exports=x},45840:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return 1- --t*t*t*t};d.exports=x},98516:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports={In:t(64413),Out:t(45840),InOut:t(78137)}},87745:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return t*t*t*t*t};d.exports=x},16509:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)};d.exports=x},17868:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return--t*t*t*t*t+1};d.exports=x},35248:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports={In:t(87745),Out:t(17868),InOut:t(16509)}},80461:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return t===0?0:t===1?1:1-Math.cos(t*Math.PI/2)};d.exports=x},34025:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return t===0?0:t===1?1:.5*(1-Math.cos(Math.PI*t))};d.exports=x},52768:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return t===0?0:t===1?1:Math.sin(t*Math.PI/2)};d.exports=x},82500:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports={In:t(80461),Out:t(52768),InOut:t(34025)}},72251:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){return a===void 0&&(a=1),t<=0?0:t>=1?1:((a*t|0)+1)*(1/a)};d.exports=x},49752:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports=t(72251)},75698:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){return a===void 0&&(a=1e-4),Math.ceil(t-a)};d.exports=x},43855:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){return p===void 0&&(p=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 x=function(t,a){return a===void 0&&(a=1e-4),Math.floor(t+a)};d.exports=x},5470:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){return p===void 0&&(p=1e-4),t>a-p};d.exports=x},94977:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,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} + */d.exports={Ceil:t(75698),Equal:t(43855),Floor:t(25777),GreaterThan:t(5470),LessThan:t(94977)}},75508:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(36383),p=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=p(!1,o,a),d.exports=o},89318:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(85710),p=function(o,s){for(var r=0,e=o.length-1,n=0;n<=e;n++)r+=Math.pow(1-s,e-n)*Math.pow(s,n)*o[n]*a(e,n);return r};d.exports=p},77259:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(87842),p=function(o,s){var r=o.length-1,e=r*s,n=Math.floor(e);return o[0]===o[r]?(s<0&&(n=Math.floor(e=r*(1+s))),a(e-n,o[(n-1+r)%r],o[n],o[(n+1)%r],o[(n+2)%r])):s<0?o[0]-(a(-e,o[0],o[0],o[1],o[1])-o[0]):s>1?o[r]-(a(e-r,o[r],o[r],o[r-1],o[r-1])-o[r]):a(e-n,o[n?n-1:0],o[n],o[r{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */function x(s,r){var e=1-s;return e*e*e*r}function t(s,r){var e=1-s;return 3*e*e*s*r}function a(s,r){return 3*(1-s)*s*s*r}function p(s,r){return s*s*s*r}var o=function(s,r,e,n,l){return x(s,r)+t(s,e)+a(s,n)+p(s,l)};d.exports=o},28392:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(28915),p=function(o,s){var r=o.length-1,e=r*s,n=Math.floor(e);return s<0?a(o[0],o[1],e):s>1?a(o[r],o[r-1],r-e):a(o[n],o[n+1>r?r:n+1],e-n)};d.exports=p},32112:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */function x(o,s){var r=1-o;return r*r*s}function t(o,s){return 2*(1-o)*o*s}function a(o,s){return o*o*s}var p=function(o,s,r,e){return x(o,s)+t(o,r)+a(o,e)};d.exports=p},47235:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(7602),p=function(o,s,r){return s+(r-s)*a(o,0,1)};d.exports=p},50178:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(54261),p=function(o,s,r){return s+(r-s)*a(o,0,1)};d.exports=p},38289:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports={Bezier:t(89318),CatmullRom:t(77259),CubicBezier:t(36316),Linear:t(28392),QuadraticBezier:t(32112),SmoothStep:t(47235),SmootherStep:t(50178)}},98439:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=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 x=function(t,a){return t>0&&(t&t-1)===0&&a>0&&(a&a-1)===0};d.exports=x},81230:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return t>0&&(t&t-1)===0};d.exports=x},49001:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports={GetNext:t(98439),IsSize:t(50030),IsValue:t(81230)}},28453:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=new a({initialize:function(s){s===void 0&&(s=[(Date.now()*Math.random()).toString()]),this.c=1,this.s0=0,this.s1=0,this.s2=0,this.n=0,this.signs=[-1,1],s&&this.init(s)},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 s,r=this.n;o=o.toString();for(var e=0;e>>0,s-=r,s*=r,r=s>>>0,s-=r,r+=s*4294967296;return this.n=r,(r>>>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 s=0;s0;r--){var e=Math.floor(this.frac()*(r+1)),n=o[e];o[e]=o[r],o[r]=n}return o}});d.exports=p},63448:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p,o){return p===void 0&&(p=0),a===0?t:(t-=p,t=a*Math.ceil(t/a),o?(p+t)/a:p+t)};d.exports=x},56583:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p,o){return p===void 0&&(p=0),a===0?t:(t-=p,t=a*Math.floor(t/a),o?(p+t)/a:p+t)};d.exports=x},77720:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p,o){return p===void 0&&(p=0),a===0?t:(t-=p,t=a*Math.round(t/a),o?(p+t)/a:p+t)};d.exports=x},73697:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports={Ceil:t(63448),Floor:t(56583),To:t(77720)}},85454:(d,x,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),p=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=p(!1,o,a),d.exports=o,t.g.Phaser=o},71289:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(92209),o=t(88571),s=new a({Extends:o,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(e,n,l,i,h){o.call(this,e,n,l,i,h),this.body=null}});d.exports=s},86689:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(39506),o=t(20339),s=t(89774),r=t(66022),e=t(95540),n=t(46975),l=t(72441),i=t(47956),h=t(37277),u=t(44594),c=t(26099),v=t(82248),m=new a({initialize:function(C){this.scene=C,this.systems=C.sys,this.config=this.getConfig(),this.world,this.add,this._category=1,C.sys.events.once(u.BOOT,this.boot,this),C.sys.events.on(u.START,this.start,this)},boot:function(){this.world=new v(this.scene,this.config),this.add=new r(this.world),this.systems.events.once(u.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new v(this.scene,this.config),this.add=new r(this.world));var T=this.systems.events;e(this.config,"customUpdate",!1)||T.on(u.UPDATE,this.world.update,this.world),T.on(u.POST_UPDATE,this.world.postUpdate,this.world),T.once(u.SHUTDOWN,this.shutdown,this)},enableUpdate:function(){this.systems.events.on(u.UPDATE,this.world.update,this.world)},disableUpdate:function(){this.systems.events.off(u.UPDATE,this.world.update,this.world)},getConfig:function(){var T=this.systems.game.config.physics,C=this.systems.settings.physics,S=n(e(C,"arcade",{}),e(T,"arcade",{}));return S},nextCategory:function(){return this._category=this._category<<1,this._category},overlap:function(T,C,S,P,A){return S===void 0&&(S=null),P===void 0&&(P=null),A===void 0&&(A=S),this.world.collideObjects(T,C,S,P,A,!0)},collide:function(T,C,S,P,A){return S===void 0&&(S=null),P===void 0&&(P=null),A===void 0&&(A=S),this.world.collideObjects(T,C,S,P,A,!1)},collideTiles:function(T,C,S,P,A){return this.world.collideTiles(T,C,S,P,A)},overlapTiles:function(T,C,S,P,A){return this.world.overlapTiles(T,C,S,P,A)},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},accelerateTo:function(T,C,S,P,A,L){P===void 0&&(P=60);var F=Math.atan2(S-T.y,C-T.x);return T.body.acceleration.setToPolar(F,P),A!==void 0&&L!==void 0&&T.body.maxVelocity.set(A,L),F},accelerateToObject:function(T,C,S,P,A){return this.accelerateTo(T,C.x,C.y,S,P,A)},closest:function(T,C){C||(C=this.world.bodies.entries);for(var S=Number.MAX_VALUE,P=null,A=T.x,L=T.y,F=C.length,I=0;IS&&(P=D,S=G)}}return P},moveTo:function(T,C,S,P,A){P===void 0&&(P=60),A===void 0&&(A=0);var L=Math.atan2(S-T.y,C-T.x);return A>0&&(P=o(T.x,T.y,C,S)/(A/1e3)),T.body.velocity.setToPolar(L,P),L},moveToObject:function(T,C,S,P){return this.moveTo(T,C.x,C.y,S,P)},velocityFromAngle:function(T,C,S){return C===void 0&&(C=60),S===void 0&&(S=new c),S.setToPolar(p(T),C)},velocityFromRotation:function(T,C,S){return C===void 0&&(C=60),S===void 0&&(S=new c),S.setToPolar(T,C)},overlapRect:function(T,C,S,P,A,L){return i(this.world,T,C,S,P,A,L)},overlapCirc:function(T,C,S,P,A){return l(this.world,T,C,S,P,A)},shutdown:function(){if(this.world){var T=this.systems.events;T.off(u.UPDATE,this.world.update,this.world),T.off(u.POST_UPDATE,this.world.postUpdate,this.world),T.off(u.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(u.START,this.start,this),this.scene=null,this.systems=null}});h.register("ArcadePhysics",m,"arcadePhysics"),d.exports=m},13759:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(92209),o=t(68287),s=new a({Extends:o,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(e,n,l,i,h){o.call(this,e,n,l,i,h),this.body=null}});d.exports=s},37742:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(78389),o=t(37747),s=t(63012),r=t(43396),e=t(87841),n=t(37303),l=t(95829),i=t(26099),h=new a({Mixins:[p],initialize:function(c,v){var m=64,T=64,C={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0},S=v!==void 0;S&&v.displayWidth&&(m=v.displayWidth,T=v.displayHeight),S||(v=C),this.world=c,this.gameObject=S?v:void 0,this.isBody=!0,this.transform={x:v.x,y:v.y,rotation:v.angle,scaleX:v.scaleX,scaleY:v.scaleY,displayOriginX:v.displayOriginX,displayOriginY:v.displayOriginY},this.debugShowBody=c.defaults.debugShowBody,this.debugShowVelocity=c.defaults.debugShowVelocity,this.debugBodyColor=c.defaults.bodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new i,this.position=new i(v.x-v.scaleX*v.displayOriginX,v.y-v.scaleY*v.displayOriginY),this.prev=this.position.clone(),this.prevFrame=this.position.clone(),this.allowRotation=!0,this.rotation=v.angle,this.preRotation=v.angle,this.width=m,this.height=T,this.sourceWidth=m,this.sourceHeight=T,v.frame&&(this.sourceWidth=v.frame.realWidth,this.sourceHeight=v.frame.realHeight),this.halfWidth=Math.abs(m/2),this.halfHeight=Math.abs(T/2),this.center=new i(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=new i,this.newVelocity=new i,this.deltaMax=new i,this.acceleration=new i,this.allowDrag=!0,this.drag=new i,this.allowGravity=!0,this.gravity=new i,this.bounce=new i,this.worldBounce=null,this.customBoundsRectangle=c.bounds,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.maxVelocity=new i(1e4,1e4),this.maxSpeed=-1,this.friction=new i(1,0),this.useDamping=!1,this.angularVelocity=0,this.angularAcceleration=0,this.angularDrag=0,this.maxAngular=1e3,this.mass=1,this.angle=0,this.speed=0,this.facing=o.FACING_NONE,this.immovable=!1,this.pushable=!0,this.slideFactor=new i(1,1),this.moves=!0,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision=l(!1),this.touching=l(!0),this.wasTouching=l(!0),this.blocked=l(!0),this.syncBounds=!1,this.physicsType=o.DYNAMIC_BODY,this.collisionCategory=1,this.collisionMask=1,this._sx=v.scaleX,this._sy=v.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 u=this.gameObject,c=this.transform;if(u.parentContainer){var v=u.getWorldTransformMatrix(this.world._tempMatrix,this.world._tempMatrix2);c.x=v.tx,c.y=v.ty,c.rotation=r(v.rotation),c.scaleX=v.scaleX,c.scaleY=v.scaleY,c.displayOriginX=u.displayOriginX,c.displayOriginY=u.displayOriginY}else c.x=u.x,c.y=u.y,c.rotation=u.angle,c.scaleX=u.scaleX,c.scaleY=u.scaleY,c.displayOriginX=u.displayOriginX,c.displayOriginY=u.displayOriginY;var m=!1;if(this.syncBounds){var T=u.getBounds(this._bounds);this.width=T.width,this.height=T.height,m=!0}else{var C=Math.abs(c.scaleX),S=Math.abs(c.scaleY);(this._sx!==C||this._sy!==S)&&(this.width=this.sourceWidth*C,this.height=this.sourceHeight*S,this._sx=C,this._sy=S,m=!0)}m&&(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 u=this.transform;this.position.x=u.x+u.scaleX*(this.offset.x-u.displayOriginX),this.position.y=u.y+u.scaleY*(this.offset.y-u.displayOriginY),this.updateCenter()},resetFlags:function(u){u===void 0&&(u=!1);var c=this.wasTouching,v=this.touching,m=this.blocked;u?l(!0,c):(c.none=v.none,c.up=v.up,c.down=v.down,c.left=v.left,c.right=v.right),l(!0,v),l(!0,m),this.overlapR=0,this.overlapX=0,this.overlapY=0,this.embedded=!1},preUpdate:function(u,c){if(u&&this.resetFlags(),this.gameObject&&this.updateFromGameObject(),this.rotation=this.transform.rotation,this.preRotation=this.rotation,this.moves){var v=this.position;this.prev.x=v.x,this.prev.y=v.y,this.prevFrame.x=v.x,this.prevFrame.y=v.y}u&&this.update(c)},update:function(u){var c=this.prev,v=this.position,m=this.velocity;if(c.set(v.x,v.y),!this.moves){this._dx=v.x-c.x,this._dy=v.y-c.y;return}if(this.directControl){var T=this.autoFrame;m.set((v.x-T.x)/u,(v.y-T.y)/u),this.world.updateMotion(this,u),this._dx=v.x-T.x,this._dy=v.y-T.y}else this.world.updateMotion(this,u),this.newVelocity.set(m.x*u,m.y*u),v.add(this.newVelocity),this._dx=v.x-c.x,this._dy=v.y-c.y;var C=m.x,S=m.y;if(this.updateCenter(),this.angle=Math.atan2(S,C),this.speed=Math.sqrt(C*C+S*S),this.collideWorldBounds&&this.checkWorldBounds()&&this.onWorldBounds){var P=this.blocked;this.world.emit(s.WORLD_BOUNDS,this,P.up,P.down,P.left,P.right)}},postUpdate:function(){var u=this.position,c=u.x-this.prevFrame.x,v=u.y-this.prevFrame.y,m=this.gameObject;if(this.moves){var T=this.deltaMax.x,C=this.deltaMax.y;T!==0&&c!==0&&(c<0&&c<-T?c=-T:c>0&&c>T&&(c=T)),C!==0&&v!==0&&(v<0&&v<-C?v=-C:v>0&&v>C&&(v=C)),m&&(m.x+=c,m.y+=v)}c<0?this.facing=o.FACING_LEFT:c>0&&(this.facing=o.FACING_RIGHT),v<0?this.facing=o.FACING_UP:v>0&&(this.facing=o.FACING_DOWN),this.allowRotation&&m&&(m.angle+=this.deltaZ()),this._tx=c,this._ty=v,this.autoFrame.set(u.x,u.y)},setBoundsRectangle:function(u){return this.customBoundsRectangle=u||this.world.bounds,this},checkWorldBounds:function(){var u=this.position,c=this.velocity,v=this.blocked,m=this.customBoundsRectangle,T=this.world.checkCollision,C=this.worldBounce?-this.worldBounce.x:-this.bounce.x,S=this.worldBounce?-this.worldBounce.y:-this.bounce.y,P=!1;return u.xm.right&&T.right&&(u.x=m.right-this.width,c.x*=C,v.right=!0,P=!0),u.ym.bottom&&T.down&&(u.y=m.bottom-this.height,c.y*=S,v.down=!0,P=!0),P&&(this.blocked.none=!1,this.updateCenter()),P},setOffset:function(u,c){return c===void 0&&(c=u),this.offset.set(u,c),this},setGameObject:function(u,c){return c===void 0&&(c=!0),this.world.remove(this),this.gameObject&&this.gameObject.body&&(this.gameObject.body=null),this.gameObject=u,u.body&&(u.body=this),this.setSize(),this.world.add(this),this.enable=c,this},setSize:function(u,c,v){v===void 0&&(v=!0);var m=this.gameObject;if(m&&(!u&&m.frame&&(u=m.frame.realWidth),!c&&m.frame&&(c=m.frame.realHeight)),this.sourceWidth=u,this.sourceHeight=c,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(),v&&m&&m.getCenter){var T=(m.width-u)/2,C=(m.height-c)/2;this.offset.set(T,C)}return this.isCircle=!1,this.radius=0,this},setCircle:function(u,c,v){return c===void 0&&(c=this.offset.x),v===void 0&&(v=this.offset.y),u>0?(this.isCircle=!0,this.radius=u,this.sourceWidth=u*2,this.sourceHeight=u*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(c,v),this.updateCenter()):this.isCircle=!1,this},reset:function(u,c){this.stop();var v=this.gameObject;v&&(v.setPosition(u,c),this.rotation=v.angle,this.preRotation=v.angle);var m=this.position;v&&v.getTopLeft?v.getTopLeft(m):m.set(u,c),this.prev.copy(m),this.prevFrame.copy(m),this.autoFrame.copy(m),v&&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(u){return u.x=this.x,u.y=this.y,u.right=this.right,u.bottom=this.bottom,u},hitTest:function(u,c){if(!this.isCircle)return n(this,u,c);if(this.radius>0&&u>=this.left&&u<=this.right&&c>=this.top&&c<=this.bottom){var v=(this.center.x-u)*(this.center.x-u),m=(this.center.y-c)*(this.center.y-c);return v+m<=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(u){var c=this.position,v=c.x+this.halfWidth,m=c.y+this.halfHeight;this.debugShowBody&&(u.lineStyle(u.defaultStrokeWidth,this.debugBodyColor),this.isCircle?u.strokeCircle(v,m,this.width/2):(this.checkCollision.up&&u.lineBetween(c.x,c.y,c.x+this.width,c.y),this.checkCollision.right&&u.lineBetween(c.x+this.width,c.y,c.x+this.width,c.y+this.height),this.checkCollision.down&&u.lineBetween(c.x,c.y+this.height,c.x+this.width,c.y+this.height),this.checkCollision.left&&u.lineBetween(c.x,c.y,c.x,c.y+this.height))),this.debugShowVelocity&&(u.lineStyle(u.defaultStrokeWidth,this.world.defaults.velocityDebugColor,1),u.lineBetween(v,m,v+this.velocity.x/2,m+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setDirectControl:function(u){return u===void 0&&(u=!0),this.directControl=u,this},setCollideWorldBounds:function(u,c,v,m){u===void 0&&(u=!0),this.collideWorldBounds=u;var T=c!==void 0,C=v!==void 0;return(T||C)&&(this.worldBounce||(this.worldBounce=new i),T&&(this.worldBounce.x=c),C&&(this.worldBounce.y=v)),m!==void 0&&(this.onWorldBounds=m),this},setVelocity:function(u,c){return this.velocity.set(u,c),u=this.velocity.x,c=this.velocity.y,this.speed=Math.sqrt(u*u+c*c),this},setVelocityX:function(u){return this.setVelocity(u,this.velocity.y)},setVelocityY:function(u){return this.setVelocity(this.velocity.x,u)},setMaxVelocity:function(u,c){return this.maxVelocity.set(u,c),this},setMaxVelocityX:function(u){return this.maxVelocity.x=u,this},setMaxVelocityY:function(u){return this.maxVelocity.y=u,this},setMaxSpeed:function(u){return this.maxSpeed=u,this},setSlideFactor:function(u,c){return this.slideFactor.set(u,c),this},setBounce:function(u,c){return this.bounce.set(u,c),this},setBounceX:function(u){return this.bounce.x=u,this},setBounceY:function(u){return this.bounce.y=u,this},setAcceleration:function(u,c){return this.acceleration.set(u,c),this},setAccelerationX:function(u){return this.acceleration.x=u,this},setAccelerationY:function(u){return this.acceleration.y=u,this},setAllowDrag:function(u){return u===void 0&&(u=!0),this.allowDrag=u,this},setAllowGravity:function(u){return u===void 0&&(u=!0),this.allowGravity=u,this},setAllowRotation:function(u){return u===void 0&&(u=!0),this.allowRotation=u,this},setDrag:function(u,c){return this.drag.set(u,c),this},setDamping:function(u){return this.useDamping=u,this},setDragX:function(u){return this.drag.x=u,this},setDragY:function(u){return this.drag.y=u,this},setGravity:function(u,c){return this.gravity.set(u,c),this},setGravityX:function(u){return this.gravity.x=u,this},setGravityY:function(u){return this.gravity.y=u,this},setFriction:function(u,c){return this.friction.set(u,c),this},setFrictionX:function(u){return this.friction.x=u,this},setFrictionY:function(u){return this.friction.y=u,this},setAngularVelocity:function(u){return this.angularVelocity=u,this},setAngularAcceleration:function(u){return this.angularAcceleration=u,this},setAngularDrag:function(u){return this.angularDrag=u,this},setMass:function(u){return this.mass=u,this},setImmovable:function(u){return u===void 0&&(u=!0),this.immovable=u,this},setEnable:function(u){return u===void 0&&(u=!0),this.enable=u,this},processX:function(u,c,v,m){this.x+=u,this.updateCenter(),c!==null&&(this.velocity.x=c*this.slideFactor.x);var T=this.blocked;v&&(T.left=!0,T.none=!1),m&&(T.right=!0,T.none=!1)},processY:function(u,c,v,m){this.y+=u,this.updateCenter(),c!==null&&(this.velocity.y=c*this.slideFactor.y);var T=this.blocked;v&&(T.up=!0,T.none=!1),m&&(T.down=!0,T.none=!1)},x:{get:function(){return this.position.x},set:function(u){this.position.x=u}},y:{get:function(){return this.position.y},set:function(u){this.position.y=u}},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}}});d.exports=h},79342:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=new a({initialize:function(s,r,e,n,l,i,h){this.world=s,this.name="",this.active=!0,this.overlapOnly=r,this.object1=e,this.object2=n,this.collideCallback=l,this.processCallback=i,this.callbackContext=h},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}});d.exports=p},66022:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(71289),p=t(13759),o=t(37742),s=t(83419),r=t(37747),e=t(60758),n=t(72624),l=t(71464),i=new s({initialize:function(u){this.world=u,this.scene=u.scene,this.sys=u.scene.sys},collider:function(h,u,c,v,m){return this.world.addCollider(h,u,c,v,m)},overlap:function(h,u,c,v,m){return this.world.addOverlap(h,u,c,v,m)},existing:function(h,u){var c=u?r.STATIC_BODY:r.DYNAMIC_BODY;return this.world.enableBody(h,c),h},staticImage:function(h,u,c,v){var m=new a(this.scene,h,u,c,v);return this.sys.displayList.add(m),this.world.enableBody(m,r.STATIC_BODY),m},image:function(h,u,c,v){var m=new a(this.scene,h,u,c,v);return this.sys.displayList.add(m),this.world.enableBody(m,r.DYNAMIC_BODY),m},staticSprite:function(h,u,c,v){var m=new p(this.scene,h,u,c,v);return this.sys.displayList.add(m),this.sys.updateList.add(m),this.world.enableBody(m,r.STATIC_BODY),m},sprite:function(h,u,c,v){var m=new p(this.scene,h,u,c,v);return this.sys.displayList.add(m),this.sys.updateList.add(m),this.world.enableBody(m,r.DYNAMIC_BODY),m},staticGroup:function(h,u){return this.sys.updateList.add(new l(this.world,this.world.scene,h,u))},group:function(h,u){return this.sys.updateList.add(new e(this.world,this.world.scene,h,u))},body:function(h,u,c,v){var m=new o(this.world);return m.position.set(h,u),c&&v&&m.setSize(c,v),this.world.add(m,r.DYNAMIC_BODY),m},staticBody:function(h,u,c,v){var m=new n(this.world);return m.position.set(h,u),c&&v&&m.setSize(c,v),this.world.add(m,r.STATIC_BODY),m},destroy:function(){this.world=null,this.scene=null,this.sys=null}});d.exports=i},79599:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){var a=0;if(!Array.isArray(t))a=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 a=t(37747),p=function(o,s,r,e){var n=0,l=o.deltaAbsX()+s.deltaAbsX()+e;return o._dx===0&&s._dx===0?(o.embedded=!0,s.embedded=!0):o._dx>s._dx?(n=o.right-s.x,n>l&&!r||o.checkCollision.right===!1||s.checkCollision.left===!1?n=0:(o.touching.none=!1,o.touching.right=!0,s.touching.none=!1,s.touching.left=!0,s.physicsType===a.STATIC_BODY&&!r&&(o.blocked.none=!1,o.blocked.right=!0),o.physicsType===a.STATIC_BODY&&!r&&(s.blocked.none=!1,s.blocked.left=!0))):o._dxl&&!r||o.checkCollision.left===!1||s.checkCollision.right===!1?n=0:(o.touching.none=!1,o.touching.left=!0,s.touching.none=!1,s.touching.right=!0,s.physicsType===a.STATIC_BODY&&!r&&(o.blocked.none=!1,o.blocked.left=!0),o.physicsType===a.STATIC_BODY&&!r&&(s.blocked.none=!1,s.blocked.right=!0))),o.overlapX=n,s.overlapX=n,n};d.exports=p},45170:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(37747),p=function(o,s,r,e){var n=0,l=o.deltaAbsY()+s.deltaAbsY()+e;return o._dy===0&&s._dy===0?(o.embedded=!0,s.embedded=!0):o._dy>s._dy?(n=o.bottom-s.y,n>l&&!r||o.checkCollision.down===!1||s.checkCollision.up===!1?n=0:(o.touching.none=!1,o.touching.down=!0,s.touching.none=!1,s.touching.up=!0,s.physicsType===a.STATIC_BODY&&!r&&(o.blocked.none=!1,o.blocked.down=!0),o.physicsType===a.STATIC_BODY&&!r&&(s.blocked.none=!1,s.blocked.up=!0))):o._dyl&&!r||o.checkCollision.up===!1||s.checkCollision.down===!1?n=0:(o.touching.none=!1,o.touching.up=!0,s.touching.none=!1,s.touching.down=!0,s.physicsType===a.STATIC_BODY&&!r&&(o.blocked.none=!1,o.blocked.up=!0),o.physicsType===a.STATIC_BODY&&!r&&(s.blocked.none=!1,s.blocked.down=!0))),o.overlapY=n,s.overlapY=n,n};d.exports=p},60758:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(13759),p=t(83419),o=t(78389),s=t(37747),r=t(95540),e=t(26479),n=t(41212),l=new p({Extends:e,Mixins:[o],initialize:function(h,u,c,v){if(!c&&!v)v={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};else if(n(c))v=c,c=null,v.internalCreateCallback=this.createCallbackHandler,v.internalRemoveCallback=this.removeCallbackHandler;else if(Array.isArray(c)&&n(c[0])){var m=this;c.forEach(function(T){T.internalCreateCallback=m.createCallbackHandler,T.internalRemoveCallback=m.removeCallbackHandler,T.classType=r(T,"classType",a)}),v=null}else v={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};this.world=h,v&&(v.classType=r(v,"classType",a)),this.physicsType=s.DYNAMIC_BODY,this.collisionCategory=1,this.collisionMask=1,this.defaults={setCollideWorldBounds:r(v,"collideWorldBounds",!1),setBoundsRectangle:r(v,"customBoundsRectangle",null),setAccelerationX:r(v,"accelerationX",0),setAccelerationY:r(v,"accelerationY",0),setAllowDrag:r(v,"allowDrag",!0),setAllowGravity:r(v,"allowGravity",!0),setAllowRotation:r(v,"allowRotation",!0),setDamping:r(v,"useDamping",!1),setBounceX:r(v,"bounceX",0),setBounceY:r(v,"bounceY",0),setDragX:r(v,"dragX",0),setDragY:r(v,"dragY",0),setEnable:r(v,"enable",!0),setGravityX:r(v,"gravityX",0),setGravityY:r(v,"gravityY",0),setFrictionX:r(v,"frictionX",0),setFrictionY:r(v,"frictionY",0),setMaxSpeed:r(v,"maxSpeed",-1),setMaxVelocityX:r(v,"maxVelocityX",1e4),setMaxVelocityY:r(v,"maxVelocityY",1e4),setVelocityX:r(v,"velocityX",0),setVelocityY:r(v,"velocityY",0),setAngularVelocity:r(v,"angularVelocity",0),setAngularAcceleration:r(v,"angularAcceleration",0),setAngularDrag:r(v,"angularDrag",0),setMass:r(v,"mass",1),setImmovable:r(v,"immovable",!1)},e.call(this,u,c,v),this.type="PhysicsGroup"},createCallbackHandler:function(i){i.body||this.world.enableBody(i,s.DYNAMIC_BODY);var h=i.body;for(var u in this.defaults)h[u](this.defaults[u])},removeCallbackHandler:function(i){i.body&&this.world.disableBody(i)},setVelocity:function(i,h,u){u===void 0&&(u=0);for(var c=this.getChildren(),v=0;v{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x,t,a,p,o,s,r,e,n,l,i,h,u,c,v,m,T,C=function(I,D,B){x=I,t=D;var G=x.velocity.x,z=t.velocity.x;return a=x.pushable,n=x._dx<0,l=x._dx>0,i=x._dx===0,v=Math.abs(x.right-t.x)<=Math.abs(t.right-x.x),r=z-G*x.bounce.x,p=t.pushable,h=t._dx<0,u=t._dx>0,c=t._dx===0,m=!v,e=G-z*t.bounce.x,T=Math.abs(B),S()},S=function(){return l&&v&&t.blocked.right?(x.processX(-T,r,!1,!0),1):n&&m&&t.blocked.left?(x.processX(T,r,!0),1):u&&m&&x.blocked.right?(t.processX(-T,e,!1,!0),2):h&&v&&x.blocked.left?(t.processX(T,e,!0),2):0},P=function(){var I=x.velocity.x,D=t.velocity.x,B=Math.sqrt(D*D*t.mass/x.mass)*(D>0?1:-1),G=Math.sqrt(I*I*x.mass/t.mass)*(I>0?1:-1),z=(B+G)*.5;return B-=z,G-=z,o=z+B*x.bounce.x,s=z+G*t.bounce.x,n&&m?A(0):h&&v?A(1):l&&v?A(2):u&&m?A(3):!1},A=function(I){if(a&&p)T*=.5,I===0||I===3?(x.processX(T,o),t.processX(-T,s)):(x.processX(-T,o),t.processX(T,s));else if(a&&!p)I===0||I===3?x.processX(T,r,!0):x.processX(-T,r,!1,!0);else if(!a&&p)I===0||I===3?t.processX(-T,e,!1,!0):t.processX(T,e,!0);else{var D=T*.5;I===0?c?(x.processX(T,0,!0),t.processX(0,null,!1,!0)):u?(x.processX(D,0,!0),t.processX(-D,0,!1,!0)):(x.processX(D,t.velocity.x,!0),t.processX(-D,null,!1,!0)):I===1?i?(x.processX(0,null,!1,!0),t.processX(T,0,!0)):l?(x.processX(-D,0,!1,!0),t.processX(D,0,!0)):(x.processX(-D,null,!1,!0),t.processX(D,x.velocity.x,!0)):I===2?c?(x.processX(-T,0,!1,!0),t.processX(0,null,!0)):h?(x.processX(-D,0,!1,!0),t.processX(D,0,!0)):(x.processX(-D,t.velocity.x,!1,!0),t.processX(D,null,!0)):I===3&&(i?(x.processX(0,null,!0),t.processX(-T,0,!1,!0)):n?(x.processX(D,0,!0),t.processX(-D,0,!1,!0)):(x.processX(D,t.velocity.y,!0),t.processX(-D,null,!1,!0)))}return!0},L=function(I){I===1?t.velocity.x=0:v?t.processX(T,e,!0):t.processX(-T,e,!1,!0),x.moves&&(t.y+=(x.y-x.prev.y)*x.friction.y,t._dy=t.y-t.prev.y)},F=function(I){I===2?x.velocity.x=0:m?x.processX(T,r,!0):x.processX(-T,r,!1,!0),t.moves&&(x.y+=(t.y-t.prev.y)*t.friction.y,x._dy=x.y-x.prev.y)};d.exports={BlockCheck:S,Check:P,Set:C,Run:A,RunImmovableBody1:L,RunImmovableBody2:F}},47962:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x,t,a,p,o,s,r,e,n,l,i,h,u,c,v,m,T,C=function(I,D,B){x=I,t=D;var G=x.velocity.y,z=t.velocity.y;return a=x.pushable,n=x._dy<0,l=x._dy>0,i=x._dy===0,v=Math.abs(x.bottom-t.y)<=Math.abs(t.bottom-x.y),r=z-G*x.bounce.y,p=t.pushable,h=t._dy<0,u=t._dy>0,c=t._dy===0,m=!v,e=G-z*t.bounce.y,T=Math.abs(B),S()},S=function(){return l&&v&&t.blocked.down?(x.processY(-T,r,!1,!0),1):n&&m&&t.blocked.up?(x.processY(T,r,!0),1):u&&m&&x.blocked.down?(t.processY(-T,e,!1,!0),2):h&&v&&x.blocked.up?(t.processY(T,e,!0),2):0},P=function(){var I=x.velocity.y,D=t.velocity.y,B=Math.sqrt(D*D*t.mass/x.mass)*(D>0?1:-1),G=Math.sqrt(I*I*x.mass/t.mass)*(I>0?1:-1),z=(B+G)*.5;return B-=z,G-=z,o=z+B*x.bounce.y,s=z+G*t.bounce.y,n&&m?A(0):h&&v?A(1):l&&v?A(2):u&&m?A(3):!1},A=function(I){if(a&&p)T*=.5,I===0||I===3?(x.processY(T,o),t.processY(-T,s)):(x.processY(-T,o),t.processY(T,s));else if(a&&!p)I===0||I===3?x.processY(T,r,!0):x.processY(-T,r,!1,!0);else if(!a&&p)I===0||I===3?t.processY(-T,e,!1,!0):t.processY(T,e,!0);else{var D=T*.5;I===0?c?(x.processY(T,0,!0),t.processY(0,null,!1,!0)):u?(x.processY(D,0,!0),t.processY(-D,0,!1,!0)):(x.processY(D,t.velocity.y,!0),t.processY(-D,null,!1,!0)):I===1?i?(x.processY(0,null,!1,!0),t.processY(T,0,!0)):l?(x.processY(-D,0,!1,!0),t.processY(D,0,!0)):(x.processY(-D,null,!1,!0),t.processY(D,x.velocity.y,!0)):I===2?c?(x.processY(-T,0,!1,!0),t.processY(0,null,!0)):h?(x.processY(-D,0,!1,!0),t.processY(D,0,!0)):(x.processY(-D,t.velocity.y,!1,!0),t.processY(D,null,!0)):I===3&&(i?(x.processY(0,null,!0),t.processY(-T,0,!1,!0)):n?(x.processY(D,0,!0),t.processY(-D,0,!1,!0)):(x.processY(D,t.velocity.y,!0),t.processY(-D,null,!1,!0)))}return!0},L=function(I){I===1?t.velocity.y=0:v?t.processY(T,e,!0):t.processY(-T,e,!1,!0),x.moves&&(t.x+=(x.x-x.prev.x)*x.friction.x,t._dx=t.x-t.prev.x)},F=function(I){I===2?x.velocity.y=0:m?x.processY(T,r,!0):x.processY(-T,r,!1,!0),t.moves&&(x.x+=(t.x-t.prev.x)*t.friction.x,x._dx=x.x-x.prev.x)};d.exports={BlockCheck:S,Check:P,Set:C,Run:A,RunImmovableBody1:L,RunImmovableBody2:F}},14087:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(64897),p=t(3017),o=function(s,r,e,n,l){l===void 0&&(l=a(s,r,e,n));var i=s.immovable,h=r.immovable;if(e||l===0||i&&h||s.customSeparateX||r.customSeparateX)return l!==0||s.embedded&&r.embedded;var u=p.Set(s,r,l);return!i&&!h?u>0?!0:p.Check():(i?p.RunImmovableBody1(u):h&&p.RunImmovableBody2(u),!0)};d.exports=o},89936:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(45170),p=t(47962),o=function(s,r,e,n,l){l===void 0&&(l=a(s,r,e,n));var i=s.immovable,h=r.immovable;if(e||l===0||i&&h||s.customSeparateY||r.customSeparateY)return l!==0||s.embedded&&r.embedded;var u=p.Set(s,r,l);return!i&&!h?u>0?!0:p.Check():(i?p.RunImmovableBody1(u):h&&p.RunImmovableBody2(u),!0)};d.exports=o},95829:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=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};d.exports=x},72624:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(87902),p=t(83419),o=t(78389),s=t(37747),r=t(37303),e=t(95829),n=t(26099),l=new p({Mixins:[o],initialize:function(h,u){var c=64,v=64,m={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0},T=u!==void 0;T&&u.displayWidth&&(c=u.displayWidth,v=u.displayHeight),T||(u=m),this.world=h,this.gameObject=T?u:void 0,this.isBody=!0,this.debugShowBody=h.defaults.debugShowStaticBody,this.debugBodyColor=h.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new n,this.position=new n(u.x-c*u.originX,u.y-v*u.originY),this.width=c,this.height=v,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center=new n(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=n.ZERO,this.allowGravity=!1,this.gravity=n.ZERO,this.bounce=n.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=s.STATIC_BODY,this.collisionCategory=1,this.collisionMask=1,this._dx=0,this._dy=0},setGameObject:function(i,h){return i&&i!==this.gameObject&&(this.gameObject.body=null,i.body=this,this.gameObject=i),h&&this.updateFromGameObject(),this},updateFromGameObject:function(){this.world.staticTree.remove(this);var i=this.gameObject;return i.getTopLeft(this.position),this.width=i.displayWidth,this.height=i.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.world.staticTree.insert(this),this},setOffset:function(i,h){return h===void 0&&(h=i),this.world.staticTree.remove(this),this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(i,h),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this),this},setSize:function(i,h,u){u===void 0&&(u=!0);var c=this.gameObject;if(c&&c.frame&&(i||(i=c.frame.realWidth),h||(h=c.frame.realHeight)),this.world.staticTree.remove(this),this.width=i,this.height=h,this.halfWidth=Math.floor(i/2),this.halfHeight=Math.floor(h/2),u&&c&&c.getCenter){var v=c.displayWidth/2,m=c.displayHeight/2;this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(v-this.halfWidth,m-this.halfHeight),this.position.x+=this.offset.x,this.position.y+=this.offset.y}return this.updateCenter(),this.isCircle=!1,this.radius=0,this.world.staticTree.insert(this),this},setCircle:function(i,h,u){return h===void 0&&(h=this.offset.x),u===void 0&&(u=this.offset.y),i>0?(this.world.staticTree.remove(this),this.isCircle=!0,this.radius=i,this.width=i*2,this.height=i*2,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(h,u),this.updateCenter(),this.world.staticTree.insert(this)):this.isCircle=!1,this},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},reset:function(i,h){var u=this.gameObject;i===void 0&&(i=u.x),h===void 0&&(h=u.y),this.world.staticTree.remove(this),u.setPosition(i,h),u.getTopLeft(this.position),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this)},stop:function(){return this},getBounds:function(i){return i.x=this.x,i.y=this.y,i.right=this.right,i.bottom=this.bottom,i},hitTest:function(i,h){return this.isCircle?a(this,i,h):r(this,i,h)},postUpdate:function(){},deltaAbsX:function(){return 0},deltaAbsY:function(){return 0},deltaX:function(){return 0},deltaY:function(){return 0},deltaZ:function(){return 0},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(i){var h=this.position,u=h.x+this.halfWidth,c=h.y+this.halfHeight;this.debugShowBody&&(i.lineStyle(i.defaultStrokeWidth,this.debugBodyColor,1),this.isCircle?i.strokeCircle(u,c,this.width/2):i.strokeRect(h.x,h.y,this.width,this.height))},willDrawDebug:function(){return this.debugShowBody},setMass:function(i){return i<=0&&(i=.1),this.mass=i,this},x:{get:function(){return this.position.x},set:function(i){this.world.staticTree.remove(this),this.position.x=i,this.world.staticTree.insert(this)}},y:{get:function(){return this.position.y},set:function(i){this.world.staticTree.remove(this),this.position.y=i,this.world.staticTree.insert(this)}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});d.exports=l},71464:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(13759),p=t(83419),o=t(78389),s=t(37747),r=t(95540),e=t(26479),n=t(41212),l=new p({Extends:e,Mixins:[o],initialize:function(h,u,c,v){!c&&!v?v={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler,createMultipleCallback:this.createMultipleCallbackHandler,classType:a}:n(c)?(v=c,c=null,v.internalCreateCallback=this.createCallbackHandler,v.internalRemoveCallback=this.removeCallbackHandler,v.createMultipleCallback=this.createMultipleCallbackHandler,v.classType=r(v,"classType",a)):Array.isArray(c)&&n(c[0])?(v=c,c=null,v.forEach(function(m){m.internalCreateCallback=this.createCallbackHandler,m.internalRemoveCallback=this.removeCallbackHandler,m.createMultipleCallback=this.createMultipleCallbackHandler,m.classType=r(m,"classType",a)})):v={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler},this.world=h,this.physicsType=s.STATIC_BODY,this.collisionCategory=1,this.collisionMask=1,e.call(this,u,c,v),this.type="StaticPhysicsGroup"},createCallbackHandler:function(i){i.body||this.world.enableBody(i,s.STATIC_BODY)},removeCallbackHandler:function(i){i.body&&this.world.disableBody(i)},createMultipleCallbackHandler:function(){this.refresh()},refresh:function(){for(var i=this.children.entries,h=0;h{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(55495),p=t(37742),o=t(45319),s=t(83419),r=t(79342),e=t(37747),n=t(20339),l=t(52816),i=t(50792),h=t(63012),u=t(43855),c=t(5470),v=t(94977),m=t(64897),T=t(45170),C=t(96523),S=t(35154),P=t(36383),A=t(25774),L=t(96602),F=t(87841),I=t(59542),D=t(40012),B=t(14087),G=t(89936),z=t(35072),W=t(72624),Y=t(2483),K=t(61340),Z=t(26099),V=t(15994),H=new s({Extends:i,initialize:function(U,X){i.call(this),this.scene=U,this.bodies=new z,this.staticBodies=new z,this.pendingDestroy=new z,this.colliders=new A,this.gravity=new Z(S(X,"gravity.x",0),S(X,"gravity.y",0)),this.bounds=new F(S(X,"x",0),S(X,"y",0),S(X,"width",U.sys.scale.width),S(X,"height",U.sys.scale.height)),this.checkCollision={up:S(X,"checkCollision.up",!0),down:S(X,"checkCollision.down",!0),left:S(X,"checkCollision.left",!0),right:S(X,"checkCollision.right",!0)},this.fps=S(X,"fps",60),this.fixedStep=S(X,"fixedStep",!0),this._elapsed=0,this._frameTime=1/this.fps,this._frameTimeMS=1e3*this._frameTime,this.stepsLastFrame=0,this.timeScale=S(X,"timeScale",1),this.OVERLAP_BIAS=S(X,"overlapBias",4),this.TILE_BIAS=S(X,"tileBias",16),this.forceX=S(X,"forceX",!1),this.isPaused=S(X,"isPaused",!1),this._total=0,this.drawDebug=S(X,"debug",!1),this.debugGraphic,this.defaults={debugShowBody:S(X,"debugShowBody",!0),debugShowStaticBody:S(X,"debugShowStaticBody",!0),debugShowVelocity:S(X,"debugShowVelocity",!0),bodyDebugColor:S(X,"debugBodyColor",16711935),staticBodyDebugColor:S(X,"debugStaticBodyColor",255),velocityDebugColor:S(X,"debugVelocityColor",65280)},this.maxEntries=S(X,"maxEntries",16),this.useTree=S(X,"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 K,this._tempMatrix2=new K,this.tileFilterOptions={isColliding:!0,isNotEmpty:!0,hasInterestingFace:!0},this.drawDebug&&this.createDebugGraphic()},enable:function(N,U){U===void 0&&(U=e.DYNAMIC_BODY),Array.isArray(N)||(N=[N]);for(var X=0;X=k;for(this.fixedStep||($=U*.001,et=!0,this._elapsed=0),X=0;X=k;)this._elapsed-=k,this.step($)}},step:function(N){var U,X,$=this.bodies.entries,k=$.length;for(U=0;U0){var nt=this.tree,st=this.staticTree;for(X=et.entries,$=X.length,N=0;N<$;N++)U=X[N],U.physicsType===e.DYNAMIC_BODY?(nt.remove(U),k.delete(U)):U.physicsType===e.STATIC_BODY&&(st.remove(U),Q.delete(U)),U.world=void 0,U.gameObject=void 0;et.clear()}},updateMotion:function(N,U){N.allowRotation&&this.computeAngularVelocity(N,U),this.computeVelocity(N,U)},computeAngularVelocity:function(N,U){var X=N.angularVelocity,$=N.angularAcceleration,k=N.angularDrag,Q=N.maxAngular;$?X+=$*U:N.allowDrag&&k&&(k*=U,c(X-k,0,.1)?X-=k:v(X+k,0,.1)?X+=k:X=0),X=o(X,-Q,Q);var J=X-N.angularVelocity;N.angularVelocity+=J,N.rotation+=N.angularVelocity*U},computeVelocity:function(N,U){var X=N.velocity.x,$=N.acceleration.x,k=N.drag.x,Q=N.maxVelocity.x,J=N.velocity.y,et=N.acceleration.y,nt=N.drag.y,st=N.maxVelocity.y,ot=N.speed,ut=N.maxSpeed,at=N.allowDrag,ct=N.useDamping;N.allowGravity&&(X+=(this.gravity.x+N.gravity.x)*U,J+=(this.gravity.y+N.gravity.y)*U),$?X+=$*U:at&&k&&(ct?(k=Math.pow(k,U),X*=k,ot=Math.sqrt(X*X+J*J),u(ot,0,.001)&&(X=0)):(k*=U,c(X-k,0,.01)?X-=k:v(X+k,0,.01)?X+=k:X=0)),et?J+=et*U:at&&nt&&(ct?(nt=Math.pow(nt,U),J*=nt,ot=Math.sqrt(X*X+J*J),u(ot,0,.001)&&(J=0)):(nt*=U,c(J-nt,0,.01)?J-=nt:v(J+nt,0,.01)?J+=nt:J=0)),X=o(X,-Q,Q),J=o(J,-st,st),N.velocity.set(X,J),ut>-1&&N.velocity.length()>ut&&(N.velocity.normalize().scale(ut),ot=ut),N.speed=ot},separate:function(N,U,X,$,k){var Q,J,et=!1,nt=!0;if(!N.enable||!U.enable||N.checkCollision.none||U.checkCollision.none||!this.intersects(N,U)||X&&X.call($,N.gameObject,U.gameObject)===!1)return et;if(N.isCircle||U.isCircle){var st=this.separateCircle(N,U,k);st.result?(et=!0,nt=!1):(Q=st.x,J=st.y,nt=!0)}if(nt){var ot=!1,ut=!1,at=this.OVERLAP_BIAS;k?(ot=B(N,U,k,at,Q),ut=G(N,U,k,at,J)):this.forceX||Math.abs(this.gravity.y+N.gravity.y)Tt&&(ut=n(ct,Et,Tt,dt)-St):Et>vt&&(ctTt&&(ut=n(ct,Et,Tt,vt)-St)),ut*=-1}else ut=N.halfWidth+U.halfWidth-l(Q,J);N.overlapR=ut,U.overlapR=ut;var wt=a(Q,J),Bt=(ut+P.EPSILON)*Math.cos(wt),jt=(ut+P.EPSILON)*Math.sin(wt),Ut={overlap:ut,result:!1,x:Bt,y:jt};if(X&&(!at||at&&ut!==0))return Ut.result=!0,Ut;if(!at&&ut===0||et&&nt||N.customSeparateX||U.customSeparateX)return Ut.x=void 0,Ut.y=void 0,Ut;var Yt=!N.pushable&&!U.pushable;if(at){var Nt=Q.x-J.x,ae=Q.y-J.y,Qt=Math.sqrt(Math.pow(Nt,2)+Math.pow(ae,2)),xe=(J.x-Q.x)/Qt||0,Ce=(J.y-Q.y)/Qt||0,Ue=2*(st.x*xe+st.y*Ce-ot.x*xe-ot.y*Ce)/(N.mass+U.mass);(et||nt)&&(Ue*=2),et||(st.x=st.x-Ue/N.mass*xe,st.y=st.y-Ue/N.mass*Ce,st.multiply(N.bounce)),nt||(ot.x=ot.x+Ue/U.mass*xe,ot.y=ot.y+Ue/U.mass*Ce,ot.multiply(U.bounce)),!et&&!nt&&(Bt*=.5,jt*=.5),et||(N.x-=Bt,N.y-=jt,N.updateCenter()),nt||(U.x+=Bt,U.y+=jt,U.updateCenter()),Ut.result=!0}else!et||N.pushable||Yt?(N.x-=Bt,N.y-=jt,N.updateCenter()):(!nt||U.pushable||Yt)&&(U.x+=Bt,U.y+=jt,U.updateCenter()),Ut.x=void 0,Ut.y=void 0;return Ut},intersects:function(N,U){return N===U?!1:!N.isCircle&&!U.isCircle?!(N.right<=U.left||N.bottom<=U.top||N.left>=U.right||N.top>=U.bottom):N.isCircle?U.isCircle?l(N.center,U.center)<=N.halfWidth+U.halfWidth:this.circleBodyIntersects(N,U):this.circleBodyIntersects(U,N)},circleBodyIntersects:function(N,U){var X=o(N.center.x,U.left,U.right),$=o(N.center.y,U.top,U.bottom),k=(N.center.x-X)*(N.center.x-X),Q=(N.center.y-$)*(N.center.y-$);return k+Q<=N.halfWidth*N.halfWidth},overlap:function(N,U,X,$,k){return X===void 0&&(X=null),$===void 0&&($=null),k===void 0&&(k=X),this.collideObjects(N,U,X,$,k,!0)},collide:function(N,U,X,$,k){return X===void 0&&(X=null),$===void 0&&($=null),k===void 0&&(k=X),this.collideObjects(N,U,X,$,k,!1)},collideObjects:function(N,U,X,$,k,Q){var J,et;N.isParent&&(N.physicsType===void 0||U===void 0||N===U)&&(N=N.children.entries),U&&U.isParent&&U.physicsType===void 0&&(U=U.children.entries);var nt=Array.isArray(N),st=Array.isArray(U);if(this._total=0,!nt&&!st)this.collideHandler(N,U,X,$,k,Q);else if(!nt&&st)for(J=0;J0},collideHandler:function(N,U,X,$,k,Q){if(U===void 0&&N.isParent)return this.collideGroupVsGroup(N,N,X,$,k,Q);if(!N||!U)return!1;if(N.body||N.isBody){if(U.body||U.isBody)return this.collideSpriteVsSprite(N,U,X,$,k,Q);if(U.isParent)return this.collideSpriteVsGroup(N,U,X,$,k,Q);if(U.isTilemap)return this.collideSpriteVsTilemapLayer(N,U,X,$,k,Q)}else if(N.isParent){if(U.body||U.isBody)return this.collideSpriteVsGroup(U,N,X,$,k,Q);if(U.isParent)return this.collideGroupVsGroup(N,U,X,$,k,Q);if(U.isTilemap)return this.collideGroupVsTilemapLayer(N,U,X,$,k,Q)}else if(N.isTilemap){if(U.body||U.isBody)return this.collideSpriteVsTilemapLayer(U,N,X,$,k,Q);if(U.isParent)return this.collideGroupVsTilemapLayer(U,N,X,$,k,Q)}},canCollide:function(N,U){return N&&U&&(N.collisionMask&U.collisionCategory)!==0&&(U.collisionMask&N.collisionCategory)!==0},collideSpriteVsSprite:function(N,U,X,$,k,Q){var J=N.isBody?N:N.body,et=U.isBody?U:U.body;return this.canCollide(J,et)?(this.separate(J,et,$,k,Q)&&(X&&X.call(k,N,U),this._total++),!0):!1},collideSpriteVsGroup:function(N,U,X,$,k,Q){var J=N.isBody?N:N.body;if(!(U.length===0||!J||!J.enable||J.checkCollision.none||!this.canCollide(J,U))){var et,nt,st;if(this.useTree||U.physicsType===e.STATIC_BODY){var ot=this.treeMinMax;ot.minX=J.left,ot.minY=J.top,ot.maxX=J.right,ot.maxY=J.bottom;var ut=U.physicsType===e.DYNAMIC_BODY?this.tree.search(ot):this.staticTree.search(ot);for(nt=ut.length,et=0;et{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x={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}};d.exports=x},59023:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x={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}};d.exports=x},62069:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x={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,p,o){return this.body.setCollideWorldBounds(t,a,p,o),this}};d.exports=x},78389:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(79599),p={setCollisionCategory:function(o){var s=this.body?this.body:this;return s.collisionCategory=o,this},willCollideWith:function(o){var s=this.body?this.body:this;return(s.collisionMask&o)!==0},addCollidesWith:function(o){var s=this.body?this.body:this;return s.collisionMask=s.collisionMask|o,this},removeCollidesWith:function(o){var s=this.body?this.body:this;return s.collisionMask=s.collisionMask&~o,this},setCollidesWith:function(o){var s=this.body?this.body:this;return s.collisionMask=a(o),this},resetCollisionCategory:function(){var o=this.body?this.body:this;return o.collisionCategory=1,o.collisionMask=1,this}};d.exports=p},87118:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x={setDebug:function(t,a,p){return this.debugShowBody=t,this.debugShowVelocity=a,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}}};d.exports=x},52819:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x={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}};d.exports=x},4074:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x={setDirectControl:function(t){return this.body.setDirectControl(t),this},enableBody:function(t,a,p,o,s){return t&&this.body.reset(a,p),o&&(this.body.gameObject.active=!0),s&&(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}};d.exports=x},40831:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x={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}};d.exports=x},26775:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x={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}};d.exports=x},9437:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x={setImmovable:function(t){return t===void 0&&(t=!0),this.body.immovable=t,this}};d.exports=x},30621:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x={setMass:function(t){return this.body.mass=t,this}};d.exports=x},72441:(d,x,t)=>{var a=t(47956),p=t(96503),o=t(2044),s=t(81491),r=function(e,n,l,i,h,u){var c=a(e,n-i,l-i,2*i,2*i,h,u);if(c.length===0)return c;for(var v=new p(n,l,i),m=new p,T=[],C=0;C{var x=function(t,a,p,o,s,r,e){r===void 0&&(r=!0),e===void 0&&(e=!1);var n=[],l=[],i=t.treeMinMax;if(i.minX=a,i.minY=p,i.maxX=a+o,i.maxY=p+s,e&&(l=t.staticTree.search(i)),r&&t.useTree)n=t.tree.search(i);else if(r){var h=t.bodies,u={position:{x:a,y:p},left:a,top:p,right:a+o,bottom:p+s,isCircle:!1},c=t.intersects;h.iterate(function(v){c(v,u)&&n.push(v)})}return l.concat(n)};d.exports=x},62121:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x={setPushable:function(t){return t===void 0&&(t=!0),this.body.pushable=t,this}};d.exports=x},29384:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x={setOffset:function(t,a){return this.body.setOffset(t,a),this},setSize:function(t,a,p){return this.body.setSize(t,a,p),this},setBodySize:function(t,a,p){return this.body.setSize(t,a,p),this},setCircle:function(t,a,p){return this.body.setCircle(t,a,p),this}};d.exports=x},15098:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x={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}};d.exports=x},92209:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.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:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x={DYNAMIC_BODY:0,STATIC_BODY:1,GROUP:2,TILEMAPLAYER:3,FACING_NONE:10,FACING_UP:11,FACING_DOWN:12,FACING_LEFT:13,FACING_RIGHT:14};d.exports=x},20009:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="collide"},36768:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="overlap"},60473:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="pause"},89954:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="resume"},61804:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="tilecollide"},7161:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="tileoverlap"},34689:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="worldbounds"},16006:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="worldstep"},63012:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.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:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(37747),p=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=p(!1,o,a),d.exports=o},96602:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=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};d.exports=x},36294:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=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};d.exports=x},67013:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=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};d.exports=x},40012:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(21329),p=t(53442),o=t(2483),s=function(r,e,n,l,i,h,u){var c=l.left,v=l.top,m=l.right,T=l.bottom,C=n.faceLeft||n.faceRight,S=n.faceTop||n.faceBottom;if(u||(C=!0,S=!0),!C&&!S)return!1;var P=0,A=0,L=0,F=1;if(e.deltaAbsX()>e.deltaAbsY()?L=-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),p=function(o,s,r,e,n,l){var i=0,h=s.faceLeft,u=s.faceRight,c=s.collideLeft,v=s.collideRight;return l||(h=!0,u=!0,c=!0,v=!0),o.deltaX()<0&&v&&o.checkCollision.left?u&&o.x0&&c&&o.checkCollision.right&&h&&o.right>r&&(i=o.right-r,i>n&&(i=0)),i!==0&&(o.customSeparateX?o.overlapX=i:a(o,i)),i};d.exports=p},53442:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(67013),p=function(o,s,r,e,n,l){var i=0,h=s.faceTop,u=s.faceBottom,c=s.collideUp,v=s.collideDown;return l||(h=!0,u=!0,c=!0,v=!0),o.deltaY()<0&&v&&o.checkCollision.up?u&&o.y0&&c&&o.checkCollision.down&&h&&o.bottom>r&&(i=o.bottom-r,i>n&&(i=0)),i!==0&&(o.customSeparateY?o.overlapY=i:a(o,i)),i};d.exports=p},2483:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){return!(a.right<=t.left||a.bottom<=t.top||a.position.x>=t.right||a.position.y>=t.bottom)};d.exports=x},55173:(d,x,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)};d.exports=a},44563:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports={Arcade:t(27064),Matter:t(3875)}},68174:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(26099),o=new a({initialize:function(){this.boundsCenter=new p,this.centerDiff=new p},parseBody:function(s){if(s=s.hasOwnProperty("body")?s.body:s,!s.hasOwnProperty("bounds")||!s.hasOwnProperty("centerOfMass"))return!1;var r=this.boundsCenter,e=this.centerDiff,n=s.bounds.max.x-s.bounds.min.x,l=s.bounds.max.y-s.bounds.min.y,i=n*s.centerOfMass.x,h=l*s.centerOfMass.y;return r.set(n/2,l/2),e.set(i-r.x,h-r.y),!0},getTopLeft:function(s,r,e){if(r===void 0&&(r=0),e===void 0&&(e=0),this.parseBody(s)){var n=this.boundsCenter,l=this.centerDiff;return new p(r+n.x+l.x,e+n.y+l.y)}return!1},getTopCenter:function(s,r,e){if(r===void 0&&(r=0),e===void 0&&(e=0),this.parseBody(s)){var n=this.boundsCenter,l=this.centerDiff;return new p(r+l.x,e+n.y+l.y)}return!1},getTopRight:function(s,r,e){if(r===void 0&&(r=0),e===void 0&&(e=0),this.parseBody(s)){var n=this.boundsCenter,l=this.centerDiff;return new p(r-(n.x-l.x),e+n.y+l.y)}return!1},getLeftCenter:function(s,r,e){if(r===void 0&&(r=0),e===void 0&&(e=0),this.parseBody(s)){var n=this.boundsCenter,l=this.centerDiff;return new p(r+n.x+l.x,e+l.y)}return!1},getCenter:function(s,r,e){if(r===void 0&&(r=0),e===void 0&&(e=0),this.parseBody(s)){var n=this.centerDiff;return new p(r+n.x,e+n.y)}return!1},getRightCenter:function(s,r,e){if(r===void 0&&(r=0),e===void 0&&(e=0),this.parseBody(s)){var n=this.boundsCenter,l=this.centerDiff;return new p(r-(n.x-l.x),e+l.y)}return!1},getBottomLeft:function(s,r,e){if(r===void 0&&(r=0),e===void 0&&(e=0),this.parseBody(s)){var n=this.boundsCenter,l=this.centerDiff;return new p(r+n.x+l.x,e-(n.y-l.y))}return!1},getBottomCenter:function(s,r,e){if(r===void 0&&(r=0),e===void 0&&(e=0),this.parseBody(s)){var n=this.boundsCenter,l=this.centerDiff;return new p(r+l.x,e-(n.y-l.y))}return!1},getBottomRight:function(s,r,e){if(r===void 0&&(r=0),e===void 0&&(e=0),this.parseBody(s)){var n=this.boundsCenter,l=this.centerDiff;return new p(r-(n.x-l.x),e-(n.y-l.y))}return!1}});d.exports=o},19933:(d,x,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,d.exports=a},28137:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(66280),p=t(83419),o=t(74116),s=t(48140),r=t(74058),e=t(75803),n=t(23181),l=t(34803),i=t(73834),h=t(19496),u=t(85791),c=t(98713),v=t(41598),m=new p({initialize:function(C){this.world=C,this.scene=C.scene,this.sys=C.scene.sys},rectangle:function(T,C,S,P,A){var L=a.rectangle(T,C,S,P,A);return this.world.add(L),L},trapezoid:function(T,C,S,P,A,L){var F=a.trapezoid(T,C,S,P,A,L);return this.world.add(F),F},circle:function(T,C,S,P,A){var L=a.circle(T,C,S,P,A);return this.world.add(L),L},polygon:function(T,C,S,P,A){var L=a.polygon(T,C,S,P,A);return this.world.add(L),L},fromVertices:function(T,C,S,P,A,L,F){typeof S=="string"&&(S=v.fromPath(S));var I=a.fromVertices(T,C,S,P,A,L,F);return this.world.add(I),I},fromPhysicsEditor:function(T,C,S,P,A){A===void 0&&(A=!0);var L=h.parseBody(T,C,S,P);return A&&!this.world.has(L)&&this.world.add(L),L},fromSVG:function(T,C,S,P,A,L){P===void 0&&(P=1),A===void 0&&(A={}),L===void 0&&(L=!0);for(var F=S.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 a=t(31884),p=t(95540),o=t(26099);function s(e){return!!e.get&&typeof e.get=="function"||!!e.set&&typeof e.set=="function"}var r=function(e,n,l,i){l===void 0&&(l={}),i===void 0&&(i=!0);var h=n.x,u=n.y;n.body={temp:!0,position:{x:h,y:u}};var c=[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(c.forEach(function(m){for(var T in m)s(m[T])?Object.defineProperty(n,T,{get:m[T].get,set:m[T].set}):Object.defineProperty(n,T,{value:m[T]})}),n.world=e,n._tempVec2=new o(h,u),l.hasOwnProperty("type")&&l.type==="body")n.setExistingBody(l,i);else{var v=p(l,"shape",null);v||(v="rectangle"),l.addToWorld=i,n.setBody(v,l)}return n};d.exports=r},23181:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(31884),o=t(95643),s=t(95540),r=t(88571),e=t(72699),n=t(26099),l=new a({Extends:r,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,e],initialize:function(h,u,c,v,m,T){o.call(this,h.scene,"Image"),this._crop=this.resetCropObject(),this.setTexture(v,m),this.setSizeToFrame(),this.setOrigin(),this.world=h,this._tempVec2=new n(u,c);var C=s(T,"shape",null);C?this.setBody(C,T):this.setRectangle(this.width,this.height,T),this.setPosition(u,c),this.initPipeline(),this.initPostPipeline(!0)}});d.exports=l},42045:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(60461),p=t(66615),o=t(66280),s=t(22562),r=t(68174),e=t(15647),n=t(83419),l=t(52284),i=t(53402),h=t(69351),u=t(74116),c=t(48140),v=t(81388),m=t(20339),T=t(28137),C=t(95540),S=t(35154),P=t(18210),A=t(40178),L=t(6790),F=t(74507),I=t(46975),D=t(4506),B=t(99561),G=t(73832),z=t(37277),W=t(73296),Y=t(66272),K=t(44594),Z=t(74058),V=t(31725),H=t(41598),N=t(68243);i.setDecomp(t(55973));var U=new n({initialize:function($){this.scene=$,this.systems=$.sys,this.config=this.getConfig(),this.world,this.add,this.bodyBounds,this.body=s,this.composite=h,this.collision=l,this.detector=v,this.pair=D,this.pairs=B,this.query=W,this.resolver=Y,this.constraint=c,this.bodies=o,this.composites=u,this.axes=p,this.bounds=e,this.svg=Z,this.vector=V,this.vertices=H,this.verts=H,this._tempVec2=V.create(),S(this.config,"plugins.collisionevents",!0)&&this.enableCollisionEventsPlugin(),S(this.config,"plugins.attractors",!1)&&this.enableAttractorPlugin(),S(this.config,"plugins.wrap",!1)&&this.enableWrapPlugin(),Y._restingThresh=S(this.config,"restingThresh",4),Y._restingThreshTangent=S(this.config,"restingThreshTangent",6),Y._positionDampen=S(this.config,"positionDampen",.9),Y._positionWarming=S(this.config,"positionWarming",.8),Y._frictionNormalMultiplier=S(this.config,"frictionNormalMultiplier",5),$.sys.events.once(K.BOOT,this.boot,this),$.sys.events.on(K.START,this.start,this)},boot:function(){this.world=new N(this.scene,this.config),this.add=new T(this.world),this.bodyBounds=new r,this.systems.events.once(K.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new N(this.scene,this.config),this.add=new T(this.world));var X=this.systems.events;X.on(K.UPDATE,this.world.update,this.world),X.on(K.POST_UPDATE,this.world.postUpdate,this.world),X.once(K.SHUTDOWN,this.shutdown,this)},getConfig:function(){var X=this.systems.game.config.physics,$=this.systems.settings.physics,k=I(C($,"matter",{}),C(X,"matter",{}));return k},enableAttractorPlugin:function(){return G.register(P),G.use(L,P),this},enableWrapPlugin:function(){return G.register(F),G.use(L,F),this},enableCollisionEventsPlugin:function(){return G.register(A),G.use(L,A),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(X,$){this.world.step(X,$)},containsPoint:function(X,$,k){X=this.getMatterBodies(X);var Q=V.create($,k),J=W.point(X,Q);return J.length>0},intersectPoint:function(X,$,k){k=this.getMatterBodies(k);var Q=V.create(X,$),J=[],et=W.point(k,Q);return et.forEach(function(nt){J.indexOf(nt)===-1&&J.push(nt)}),J},intersectRect:function(X,$,k,Q,J,et){J===void 0&&(J=!1),et=this.getMatterBodies(et);var nt={min:{x:X,y:$},max:{x:X+k,y:$+Q}},st=[],ot=W.region(et,nt,J);return ot.forEach(function(ut){st.indexOf(ut)===-1&&st.push(ut)}),st},intersectRay:function(X,$,k,Q,J,et){J===void 0&&(J=1),et=this.getMatterBodies(et);for(var nt=[],st=W.ray(et,V.create(X,$),V.create(k,Q),J),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),p=t(83419),o=t(31884),s=t(95643),r=t(95540),e=t(72699),n=t(68287),l=t(26099),i=new p({Extends:n,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(u,c,v,m,T,C){s.call(this,u.scene,"Sprite"),this._crop=this.resetCropObject(),this.anims=new a(this),this.setTexture(m,T),this.setSizeToFrame(),this.setOrigin(),this.world=u,this._tempVec2=new l(c,v);var S=r(C,"shape",null);S?this.setBody(S,C):this.setRectangle(this.width,this.height,C),this.setPosition(c,v),this.initPipeline(),this.initPostPipeline(!0)}});d.exports=i},73834:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(66280),p=t(22562),o=t(83419),s=t(31884),r=t(62644),e=t(50792),n=t(95540),l=t(97022),i=t(41598),h=new o({Extends:e,Mixins:[s.Bounce,s.Collision,s.Friction,s.Gravity,s.Mass,s.Sensor,s.Sleep,s.Static],initialize:function(c,v,m){e.call(this),this.tile=v,this.world=c,v.physics.matterBody&&v.physics.matterBody.destroy(),v.physics.matterBody=this;var T=n(m,"body",null),C=n(m,"addToWorld",!0);if(T)this.setBody(T,C);else{var S=v.getCollisionGroup(),P=n(S,"objects",[]);P.length>0?this.setFromTileCollision(m):this.setFromTileRectangle(m)}if(v.flipX||v.flipY){var A={x:v.getCenterX(),y:v.getCenterY()},L=v.flipX?-1:1,F=v.flipY?-1:1;p.scale(T,L,F,A)}},setFromTileRectangle:function(u){u===void 0&&(u={}),l(u,"isStatic")||(u.isStatic=!0),l(u,"addToWorld")||(u.addToWorld=!0);var c=this.tile.getBounds(),v=c.x+c.width/2,m=c.y+c.height/2,T=a.rectangle(v,m,c.width,c.height,u);return this.setBody(T,u.addToWorld),this},setFromTileCollision:function(u){u===void 0&&(u={}),l(u,"isStatic")||(u.isStatic=!0),l(u,"addToWorld")||(u.addToWorld=!0);for(var c=this.tile.tilemapLayer.scaleX,v=this.tile.tilemapLayer.scaleY,m=this.tile.getLeft(),T=this.tile.getTop(),C=this.tile.getCollisionGroup(),S=n(C,"objects",[]),P=[],A=0;A1){var Z=r(u);Z.parts=P,this.setBody(p.create(Z),Z.addToWorld)}return this},setBody:function(u,c){return c===void 0&&(c=!0),this.body&&this.removeBody(),this.body=u,this.body.gameObject=this,c&&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()}});d.exports=h},19496:(d,x,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),p=t(22562),o=t(53402),s=t(95540),r=t(41598),e={parseBody:function(n,l,i,h){h===void 0&&(h={});for(var u=s(i,"fixtures",[]),c=[],v=0;v{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(66280),p=t(22562),o={parseBody:function(s,r,e,n){n===void 0&&(n={});var l,i=e.vertices;if(i.length===1)n.vertices=i[0],l=p.create(n),a.flagCoincidentParts(l.parts);else{for(var h=[],u=0;u{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(15647),p=t(83419),o=t(69351),s=t(48140),r=t(81388),e=t(1121),n=t(8214),l=t(46975),i=t(53614),h=t(26099),u=t(41598),c=new p({initialize:function(m,T,C){C===void 0&&(C={});var S={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=m,this.world=T,this.camera=null,this.pointer=null,this.active=!0,this.position=new h,this.body=null,this.part=null,this.constraint=s.create(l(C,S)),this.world.on(e.BEFORE_UPDATE,this.update,this),m.sys.input.on(n.POINTER_DOWN,this.onDown,this),m.sys.input.on(n.POINTER_UP,this.onUp,this)},onDown:function(v){this.pointer||(this.pointer=v,this.camera=v.camera)},onUp:function(v){v===this.pointer&&(this.pointer=null)},getBody:function(v){var m=this.position,T=this.constraint;this.camera.getWorldPoint(v.x,v.y,m);for(var C=o.allBodies(this.world.localWorld),S=0;S1?1:0,P=S;P{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(66280),p=t(22562),o=t(83419),s=t(53402),r=t(69351),e=t(48413),n=t(50792),l=t(1121),i=t(95540),h=t(35154),u=t(22562),c=t(35810),v=t(73834),m=t(4372),T=t(31725),C=new o({Extends:n,initialize:function(P,A){n.call(this),this.scene=P,this.engine=e.create(A),this.localWorld=this.engine.world;var L=h(A,"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=h(A,"enabled",!0),this.getDelta=h(A,"getDelta",this.update60Hz);var F=i(A,"runner",{}),I=i(F,"fps",!1),D=i(F,"fps",60),B=i(F,"delta",1e3/D),G=i(F,"deltaMin",1e3/D),z=i(F,"deltaMax",1e3/(D*.5));I||(D=1e3/B),this.runner={fps:D,deltaSampleSize:i(F,"deltaSampleSize",60),counterTimestamp:0,frameCounter:0,deltaHistory:[],timePrev:null,timeScalePrev:1,frameRequestId:null,isFixed:i(F,"isFixed",!1),delta:B,deltaMin:G,deltaMax:z},this.autoUpdate=h(A,"autoUpdate",!0);var W=h(A,"debug",!1);if(this.drawDebug=typeof W=="object"?!0:W,this.debugGraphic,this.debugConfig={showAxes:i(W,"showAxes",!1),showAngleIndicator:i(W,"showAngleIndicator",!1),angleColor:i(W,"angleColor",15208787),showBroadphase:i(W,"showBroadphase",!1),broadphaseColor:i(W,"broadphaseColor",16757760),showBounds:i(W,"showBounds",!1),boundsColor:i(W,"boundsColor",16777215),showVelocity:i(W,"showVelocity",!1),velocityColor:i(W,"velocityColor",44783),showCollisions:i(W,"showCollisions",!1),collisionColor:i(W,"collisionColor",16094476),showSeparations:i(W,"showSeparations",!1),separationColor:i(W,"separationColor",16753920),showBody:i(W,"showBody",!0),showStaticBody:i(W,"showStaticBody",!0),showInternalEdges:i(W,"showInternalEdges",!1),renderFill:i(W,"renderFill",!1),renderLine:i(W,"renderLine",!0),fillColor:i(W,"fillColor",1075465),fillOpacity:i(W,"fillOpacity",1),lineColor:i(W,"lineColor",2678297),lineOpacity:i(W,"lineOpacity",1),lineThickness:i(W,"lineThickness",1),staticFillColor:i(W,"staticFillColor",857979),staticLineColor:i(W,"staticLineColor",1255396),showSleeping:i(W,"showSleeping",!1),staticBodySleepOpacity:i(W,"staticBodySleepOpacity",.7),sleepFillColor:i(W,"sleepFillColor",4605510),sleepLineColor:i(W,"sleepLineColor",10066585),showSensors:i(W,"showSensors",!0),sensorFillColor:i(W,"sensorFillColor",857979),sensorLineColor:i(W,"sensorLineColor",1255396),showPositions:i(W,"showPositions",!0),positionSize:i(W,"positionSize",4),positionColor:i(W,"positionColor",14697178),showJoint:i(W,"showJoint",!0),jointColor:i(W,"jointColor",14737474),jointLineOpacity:i(W,"jointLineOpacity",1),jointLineThickness:i(W,"jointLineThickness",2),pinSize:i(W,"pinSize",4),pinColor:i(W,"pinColor",4382944),springColor:i(W,"springColor",14697184),anchorColor:i(W,"anchorColor",15724527),anchorSize:i(W,"anchorSize",4),showConvexHulls:i(W,"showConvexHulls",!1),hullColor:i(W,"hullColor",14091216)},this.drawDebug&&this.createDebugGraphic(),this.setEventsProxy(),i(A,"setBounds",!1)){var Y=A.setBounds;if(typeof Y=="boolean")this.setBounds();else{var K=i(Y,"x",0),Z=i(Y,"y",0),V=i(Y,"width",P.sys.scale.width),H=i(Y,"height",P.sys.scale.height),N=i(Y,"thickness",64),U=i(Y,"left",!0),X=i(Y,"right",!0),$=i(Y,"top",!0),k=i(Y,"bottom",!0);this.setBounds(K,Z,V,H,N,U,X,$,k)}}},setCompositeRenderStyle:function(S){var P=S.bodies,A=S.constraints,L=S.composites,F,I,D;for(F=0;F0&&(I=F[0].bodyA,D=F[0].bodyB),S.emit(l.COLLISION_START,L,I,D)}),c.on(P,"collisionActive",function(L){var F=L.pairs,I,D;F.length>0&&(I=F[0].bodyA,D=F[0].bodyB),S.emit(l.COLLISION_ACTIVE,L,I,D)}),c.on(P,"collisionEnd",function(L){var F=L.pairs,I,D;F.length>0&&(I=F[0].bodyA,D=F[0].bodyB),S.emit(l.COLLISION_END,L,I,D)})},setBounds:function(S,P,A,L,F,I,D,B,G){return S===void 0&&(S=0),P===void 0&&(P=0),A===void 0&&(A=this.scene.sys.scale.width),L===void 0&&(L=this.scene.sys.scale.height),F===void 0&&(F=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",S-F,P-F,F,L+F*2),this.updateWall(D,"right",S+A,P-F,F,L+F*2),this.updateWall(B,"top",S,P-F,A,F),this.updateWall(G,"bottom",S,P+L,A,F),this},updateWall:function(S,P,A,L,F,I){var D=this.walls[P];S?(D&&m.remove(this.localWorld,D),A+=F/2,L+=I/2,this.walls[P]=this.create(A,L,F,I,{isStatic:!0,friction:0,frictionStatic:0})):(D&&m.remove(this.localWorld,D),this.walls[P]=null)},createDebugGraphic:function(){var S=this.scene.sys.add.graphics({x:0,y:0});return S.setDepth(Number.MAX_VALUE),this.debugGraphic=S,this.drawDebug=!0,S},disableGravity:function(){return this.localWorld.gravity.x=0,this.localWorld.gravity.y=0,this.localWorld.gravity.scale=0,this},setGravity:function(S,P,A){return S===void 0&&(S=0),P===void 0&&(P=1),A===void 0&&(A=.001),this.localWorld.gravity.x=S,this.localWorld.gravity.y=P,this.localWorld.gravity.scale=A,this},create:function(S,P,A,L,F){var I=a.rectangle(S,P,A,L,F);return m.add(this.localWorld,I),I},add:function(S){return m.add(this.localWorld,S),this},remove:function(S,P){Array.isArray(S)||(S=[S]);for(var A=0;AL.deltaMax?L.deltaMax:P,L.delta=P),L.timeScalePrev=F.timeScale,L.frameCounter+=1,S-L.counterTimestamp>=1e3&&(L.fps=L.frameCounter*((S-L.counterTimestamp)/1e3),L.counterTimestamp=S,L.frameCounter=0),e.update(A,P)}},step:function(S){e.update(this.engine,S)},update60Hz:function(){return 1e3/60},update30Hz:function(){return 1e3/30},has:function(S){var P=S.hasOwnProperty("body")?S.body:S;return r.get(this.localWorld,P.id,P.type)!==null},getAllBodies:function(){return r.allBodies(this.localWorld)},getAllConstraints:function(){return r.allConstraints(this.localWorld)},getAllComposites:function(){return r.allComposites(this.localWorld)},postUpdate:function(){if(this.drawDebug){var S=this.debugConfig,P=this.engine,A=this.debugGraphic,L=r.allBodies(this.localWorld);this.debugGraphic.clear(),S.showBroadphase&&P.broadphase.controller&&this.renderGrid(P.broadphase,A,S.broadphaseColor,.5),S.showBounds&&this.renderBodyBounds(L,A,S.boundsColor,.5),(S.showBody||S.showStaticBody)&&this.renderBodies(L),S.showJoint&&this.renderJoints(),(S.showAxes||S.showAngleIndicator)&&this.renderBodyAxes(L,A,S.showAxes,S.angleColor,.5),S.showVelocity&&this.renderBodyVelocity(L,A,S.velocityColor,1,2),S.showSeparations&&this.renderSeparations(P.pairs.list,A,S.separationColor),S.showCollisions&&this.renderCollisions(P.pairs.list,A,S.collisionColor)}},renderGrid:function(S,P,A,L){P.lineStyle(1,A,L);for(var F=s.keys(S.buckets),I=0;I0){var W=z[0].vertex.x,Y=z[0].vertex.y;z.length===2&&(W=(z[0].vertex.x+z[1].vertex.x)/2,Y=(z[0].vertex.y+z[1].vertex.y)/2),G.bodyB===G.supports[0].body||G.bodyA.isStatic?P.lineBetween(W-G.normal.x*8,Y-G.normal.y*8,W,Y):P.lineBetween(W+G.normal.x*8,Y+G.normal.y*8,W,Y)}}return this},renderBodyBounds:function(S,P,A,L){P.lineStyle(1,A,L);for(var F=0;F1?1:0;G1?1:0;z1?1:0;z1&&this.renderConvexHull(H,P,Z,X)}}},renderBody:function(S,P,A,L,F,I,D,B){L===void 0&&(L=null),F===void 0&&(F=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,Y=S.parts,K=Y.length,Z=K>1?1:0;Z1){var D=S.vertices;P.lineStyle(L,A),P.beginPath(),P.moveTo(D[0].x,D[0].y);for(var B=1;B0&&(P.fillStyle(D),P.fillCircle(Y.x,Y.y,B),P.fillCircle(K.x,K.y,B)),this},resetCollisionIDs:function(){return p._nextCollidingGroupId=1,p._nextNonCollidingGroupId=-1,p._nextCategory=1,this},shutdown:function(){c.off(this.engine),this.removeAllListeners(),m.clear(this.localWorld,!1),e.clear(this.engine),this.drawDebug&&this.debugGraphic.destroy()},destroy:function(){this.shutdown()}});d.exports=C},70410:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x={setBounce:function(t){return this.body.restitution=t,this}};d.exports=x},66968:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x={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 p=0;p{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(22562),p={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,s){return a.applyForce(this.body,o,s),this},thrust:function(o){var s=this.body.angle;return this._tempVec2.set(o*Math.cos(s),o*Math.sin(s)),a.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustLeft:function(o){var s=this.body.angle-Math.PI/2;return this._tempVec2.set(o*Math.cos(s),o*Math.sin(s)),a.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustRight:function(o){var s=this.body.angle+Math.PI/2;return this._tempVec2.set(o*Math.cos(s),o*Math.sin(s)),a.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustBack:function(o){var s=this.body.angle-Math.PI;return this._tempVec2.set(o*Math.cos(s),o*Math.sin(s)),a.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this}};d.exports=p},5436:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x={setFriction:function(t,a,p){return this.body.friction=t,a!==void 0&&(this.body.frictionAir=a),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}};d.exports=x},39858:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x={setIgnoreGravity:function(t){return this.body.ignoreGravity=t,this}};d.exports=x},37302:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(22562),p=t(26099),o={setMass:function(s){return a.setMass(this.body,s),this},setDensity:function(s){return a.setDensity(this.body,s),this},centerOfMass:{get:function(){return new p(this.body.centerOfMass.x,this.body.centerOfMass.y)}}};d.exports=o},39132:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x={setSensor:function(t){return this.body.isSensor=t,this},isSensor:function(){return this.body.isSensor}};d.exports=x},57772:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(66280),p=t(22562),o=t(43855),s=t(95540),r=t(19496),e=t(85791),n=t(41598),l={setRectangle:function(i,h,u){return this.setBody({type:"rectangle",width:i,height:h},u)},setCircle:function(i,h){return this.setBody({type:"circle",radius:i},h)},setPolygon:function(i,h,u){return this.setBody({type:"polygon",sides:h,radius:i},u)},setTrapezoid:function(i,h,u,c){return this.setBody({type:"trapezoid",width:i,height:h,slope:u},c)},setExistingBody:function(i,h){h===void 0&&(h=!0),this.body&&this.world.remove(this.body,!0),this.body=i;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(1121),p=t(53614),o=t(35810),s={setToSleep:function(){return p.set(this.body,!0),this},setAwake:function(){return p.set(this.body,!1),this},setSleepThreshold:function(r){return r===void 0&&(r=60),this.body.sleepThreshold=r,this},setSleepEvents:function(r,e){return this.setSleepStartEvent(r),this.setSleepEndEvent(e),this},setSleepStartEvent:function(r){if(r){var e=this.world;o.on(this.body,"sleepStart",function(n){e.emit(a.SLEEP_START,n,this)})}else o.off(this.body,"sleepStart");return this},setSleepEndEvent:function(r){if(r){var e=this.world;o.on(this.body,"sleepEnd",function(n){e.emit(a.SLEEP_END,n,this)})}else o.off(this.body,"sleepEnd");return this}};d.exports=s},90556:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(22562),p={setStatic:function(o){return a.setStatic(this.body,o),this},isStatic:function(){return this.body.isStatic}};d.exports=p},85436:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(22562),p=t(36383),o=t(86554),s=t(30954),r=4,e={x:{get:function(){return this.body.position.x},set:function(n){this._tempVec2.set(n,this.y),a.setPosition(this.body,this._tempVec2)}},y:{get:function(){return this.body.position.y},set:function(n){this._tempVec2.set(this.x,n),a.setPosition(this.body,this._tempVec2)}},scaleX:{get:function(){return this._scaleX},set:function(n){var l=1/this._scaleX,i=1/this._scaleY;this._scaleX=n,this._scaleX===0?this.renderFlags&=~r:this.renderFlags|=r,a.scale(this.body,l,i),a.scale(this.body,n,this._scaleY)}},scaleY:{get:function(){return this._scaleY},set:function(n){var l=1/this._scaleX,i=1/this._scaleY;this._scaleY=n,this._scaleY===0?this.renderFlags&=~r:this.renderFlags|=r,a.scale(this.body,l,i),a.scale(this.body,this._scaleX,n)}},angle:{get:function(){return s(this.body.angle*p.RAD_TO_DEG)},set:function(n){this.rotation=s(n)*p.DEG_TO_RAD}},rotation:{get:function(){return this.body.angle},set:function(n){this._rotation=o(n),a.setAngle(this.body,this._rotation)}},setPosition:function(n,l){return n===void 0&&(n=0),l===void 0&&(l=n),this._tempVec2.set(n,l),a.setPosition(this.body,this._tempVec2),this},setRotation:function(n){return n===void 0&&(n=0),this._rotation=o(n),a.setAngle(this.body,n),this},setFixedRotation:function(){return a.setInertia(this.body,1/0),this},setAngle:function(n){return n===void 0&&(n=0),this.angle=n,a.setAngle(this.body,this.rotation),this},setScale:function(n,l,i){n===void 0&&(n=1),l===void 0&&(l=n);var h=1/this._scaleX,u=1/this._scaleY;return this._scaleX=n,this._scaleY=l,a.scale(this.body,h,u,i),a.scale(this.body,n,l,i),this}};d.exports=e},42081:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(22562),p={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,s){return this._tempVec2.set(o,s),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)}};d.exports=p},31884:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.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:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="afteradd"},1213:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="afterremove"},25968:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="afterupdate"},67205:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="beforeadd"},39438:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="beforeremove"},44823:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="beforeupdate"},92593:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="collisionactive"},60128:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="collisionend"},76861:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="collisionstart"},92362:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="dragend"},76408:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="drag"},93971:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="dragstart"},5656:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="pause"},47861:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="resume"},79099:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="sleepend"},35906:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="sleepstart"},1121:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.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:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.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:(d,x,t)=>{var a={};d.exports=a;var p=t(41598),o=t(31725),s=t(53614),r=t(53402),e=t(15647),n=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(i){var h={id:r.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:{}};!i.hasOwnProperty("position")&&i.hasOwnProperty("vertices")?i.position=p.centre(i.vertices):i.hasOwnProperty("vertices")||(h.vertices=p.fromPath("L 0 0 L 40 0 L 40 40 L 0 40"));var u=r.extend(h,i);return l(u,i),u.setOnCollideWith=function(c,v){return v?this.onCollideWith[c.id]=v:delete this.onCollideWith[c.id],this},u},a.nextGroup=function(i){return i?a._nextNonCollidingGroupId--:a._nextCollidingGroupId++},a.nextCategory=function(){return a._nextCategory=a._nextCategory<<1,a._nextCategory};var l=function(i,h){if(h=h||{},a.set(i,{bounds:i.bounds||e.create(i.vertices),positionPrev:i.positionPrev||o.clone(i.position),anglePrev:i.anglePrev||i.angle,vertices:i.vertices,parts:i.parts||[i],isStatic:i.isStatic,isSleeping:i.isSleeping,parent:i.parent||i}),p.rotate(i.vertices,i.angle,i.position),n.rotate(i.axes,i.angle),e.update(i.bounds,i.vertices,i.velocity),a.set(i,{axes:h.axes||i.axes,area:h.area||i.area,mass:h.mass||i.mass,inertia:h.inertia||i.inertia}),i.parts.length===1){var u=i.bounds,c=i.centerOfMass,v=i.centerOffset,m=u.max.x-u.min.x,T=u.max.y-u.min.y;c.x=-(u.min.x-i.position.x)/m,c.y=-(u.min.y-i.position.y)/T,v.x=m*c.x,v.y=T*c.y}};a.set=function(i,h,u){var c;typeof h=="string"&&(c=h,h={},h[c]=u);for(c in h)if(Object.prototype.hasOwnProperty.call(h,c))switch(u=h[c],c){case"isStatic":a.setStatic(i,u);break;case"isSleeping":s.set(i,u);break;case"mass":a.setMass(i,u);break;case"density":a.setDensity(i,u);break;case"inertia":a.setInertia(i,u);break;case"vertices":a.setVertices(i,u);break;case"position":a.setPosition(i,u);break;case"angle":a.setAngle(i,u);break;case"velocity":a.setVelocity(i,u);break;case"angularVelocity":a.setAngularVelocity(i,u);break;case"speed":a.setSpeed(i,u);break;case"angularSpeed":a.setAngularSpeed(i,u);break;case"parts":a.setParts(i,u);break;case"centre":a.setCentre(i,u);break;default:i[c]=u}},a.setStatic=function(i,h){for(var u=0;u0&&o.rotateAbout(m.position,c,i.position,m.position)}},a.setVelocity=function(i,h){var u=i.deltaTime/a._baseDelta;i.positionPrev.x=i.position.x-h.x*u,i.positionPrev.y=i.position.y-h.y*u,i.velocity.x=(i.position.x-i.positionPrev.x)/u,i.velocity.y=(i.position.y-i.positionPrev.y)/u,i.speed=o.magnitude(i.velocity)},a.getVelocity=function(i){var h=a._baseDelta/i.deltaTime;return{x:(i.position.x-i.positionPrev.x)*h,y:(i.position.y-i.positionPrev.y)*h}},a.getSpeed=function(i){return o.magnitude(a.getVelocity(i))},a.setSpeed=function(i,h){a.setVelocity(i,o.mult(o.normalise(a.getVelocity(i)),h))},a.setAngularVelocity=function(i,h){var u=i.deltaTime/a._baseDelta;i.anglePrev=i.angle-h*u,i.angularVelocity=(i.angle-i.anglePrev)/u,i.angularSpeed=Math.abs(i.angularVelocity)},a.getAngularVelocity=function(i){return(i.angle-i.anglePrev)*a._baseDelta/i.deltaTime},a.getAngularSpeed=function(i){return Math.abs(a.getAngularVelocity(i))},a.setAngularSpeed=function(i,h){a.setAngularVelocity(i,r.sign(a.getAngularVelocity(i))*h)},a.translate=function(i,h,u){a.setPosition(i,o.add(i.position,h),u)},a.rotate=function(i,h,u,c){if(!u)a.setAngle(i,i.angle+h,c);else{var v=Math.cos(h),m=Math.sin(h),T=i.position.x-u.x,C=i.position.y-u.y;a.setPosition(i,{x:u.x+(T*v-C*m),y:u.y+(T*m+C*v)},c),a.setAngle(i,i.angle+h,c)}},a.scale=function(i,h,u,c){var v=0,m=0;c=c||i.position;for(var T=i.inertia===1/0,C=0;C0&&(v+=S.area,m+=S.inertia),S.position.x=c.x+(S.position.x-c.x)*h,S.position.y=c.y+(S.position.y-c.y)*u,e.update(S.bounds,S.vertices,i.velocity)}i.parts.length>1&&(i.area=v,i.isStatic||(a.setMass(i,i.density*v),a.setInertia(i,m))),i.circleRadius&&(h===u?i.circleRadius*=h:i.circleRadius=null),T&&a.setInertia(i,1/0)},a.update=function(i,h){h=(typeof h<"u"?h:16.666666666666668)*i.timeScale;var u=h*h,c=a._timeCorrection?h/(i.deltaTime||h):1,v=1-i.frictionAir*(h/r._baseDelta),m=(i.position.x-i.positionPrev.x)*c,T=(i.position.y-i.positionPrev.y)*c;i.velocity.x=m*v+i.force.x/i.mass*u,i.velocity.y=T*v+i.force.y/i.mass*u,i.positionPrev.x=i.position.x,i.positionPrev.y=i.position.y,i.position.x+=i.velocity.x,i.position.y+=i.velocity.y,i.deltaTime=h,i.angularVelocity=(i.angle-i.anglePrev)*v*c+i.torque/i.inertia*u,i.anglePrev=i.angle,i.angle+=i.angularVelocity,i.speed=o.magnitude(i.velocity),i.angularSpeed=Math.abs(i.angularVelocity);for(var C=0;C0&&(S.position.x+=i.velocity.x,S.position.y+=i.velocity.y),i.angularVelocity!==0&&(p.rotate(S.vertices,i.angularVelocity,i.position),n.rotate(S.axes,i.angularVelocity),C>0&&o.rotateAbout(S.position,i.angularVelocity,i.position,S.position)),e.update(S.bounds,S.vertices,i.velocity)}},a.updateVelocities=function(i){var h=a._baseDelta/i.deltaTime,u=i.velocity;u.x=(i.position.x-i.positionPrev.x)*h,u.y=(i.position.y-i.positionPrev.y)*h,i.speed=Math.sqrt(u.x*u.x+u.y*u.y),i.angularVelocity=(i.angle-i.anglePrev)*h,i.angularSpeed=Math.abs(i.angularVelocity)},a.applyForce=function(i,h,u){var c={x:h.x-i.position.x,y:h.y-i.position.y};i.force.x+=u.x,i.force.y+=u.y,i.torque+=c.x*u.y-c.y*u.x},a._totalProperties=function(i){for(var h={mass:0,area:0,inertia:0,centre:{x:0,y:0}},u=i.parts.length===1?0:1;u{var a={};d.exports=a;var p=t(35810),o=t(53402),s=t(15647),r=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,n,l,i){if(p.trigger(e,"compositeModified",e),e.isModified=n,n&&e.cache&&(e.cache.allBodies=null,e.cache.allConstraints=null,e.cache.allComposites=null),l&&e.parent&&a.setModified(e.parent,n,l,i),i)for(var h=0;h{var a={};d.exports=a;var p=t(69351);(function(){a.create=p.create,a.add=p.add,a.remove=p.remove,a.clear=p.clear,a.addComposite=p.addComposite,a.addBody=p.addBody,a.addConstraint=p.addConstraint})()},52284:(d,x,t)=>{var a={};d.exports=a;var p=t(41598),o=t(4506);(function(){var s=[],r={overlap:0,axis:null},e={overlap:0,axis:null};a.create=function(n,l){return{pair:null,collided:!1,bodyA:n,bodyB:l,parentA:n.parent,parentB:l.parent,depth:0,normal:{x:0,y:0},tangent:{x:0,y:0},penetration:{x:0,y:0},supports:[]}},a.collides=function(n,l,i){if(a._overlapAxes(r,n.vertices,l.vertices,n.axes),r.overlap<=0||(a._overlapAxes(e,l.vertices,n.vertices,l.axes),e.overlap<=0))return null;var h=i&&i.table[o.id(n,l)],u;h?u=h.collision:(u=a.create(n,l),u.collided=!0,u.bodyA=n.idV?V=D:DH?H=D:Du?u=v:v{var x={};d.exports=x,function(){x.create=function(t){return{vertex:t,normalImpulse:0,tangentImpulse:0}}}()},81388:(d,x,t)=>{var a={};d.exports=a;var p=t(53402),o=t(52284);(function(){a.create=function(s){var r={bodies:[],pairs:null};return p.extend(r,s)},a.setBodies=function(s,r){s.bodies=r.slice(0)},a.clear=function(s){s.bodies=[]},a.collisions=function(s){var r=[],e=s.pairs,n=s.bodies,l=n.length,i=a.canCollide,h=o.collides,u,c;for(n.sort(a._compareBoundsX),u=0;uT)break;if(!(CI.max.y)&&!(P&&(F.isStatic||F.isSleeping))&&i(v.collisionFilter,F.collisionFilter)){var D=F.parts.length;if(L&&D===1){var B=h(v,F,e);B&&r.push(B)}else for(var G=A>1?1:0,z=D>1?1:0,W=G;WI.max.x||m.max.xI.max.y)){var B=h(Y,Z,e);B&&r.push(B)}}}}}return r},a.canCollide=function(s,r){return s.group===r.group&&s.group!==0?s.group>0:(s.mask&r.category)!==0&&(r.mask&s.category)!==0},a._compareBoundsX=function(s,r){return s.bounds.min.x-r.bounds.min.x}})()},4506:(d,x,t)=>{var a={};d.exports=a;var p=t(43424);(function(){a.create=function(o,s){var r=o.bodyA,e=o.bodyB,n={id:a.id(r,e),bodyA:r,bodyB:e,collision:o,contacts:[],activeContacts:[],separation:0,isActive:!0,confirmedActive:!0,isSensor:r.isSensor||e.isSensor,timeCreated:s,timeUpdated:s,inverseMass:0,friction:0,frictionStatic:0,restitution:0,slop:0};return a.update(n,o,s),n},a.update=function(o,s,r){var e=o.contacts,n=s.supports,l=o.activeContacts,i=s.parentA,h=s.parentB,u=i.vertices.length;o.isActive=!0,o.timeUpdated=r,o.collision=s,o.separation=s.depth,o.inverseMass=i.inverseMass+h.inverseMass,o.friction=i.frictionh.frictionStatic?i.frictionStatic:h.frictionStatic,o.restitution=i.restitution>h.restitution?i.restitution:h.restitution,o.slop=i.slop>h.slop?i.slop:h.slop,s.pair=o,l.length=0;for(var c=0;c{var a={};d.exports=a;var p=t(4506),o=t(53402);(function(){a.create=function(s){return o.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},s)},a.update=function(s,r,e){var n=s.list,l=n.length,i=s.table,h=r.length,u=s.collisionStart,c=s.collisionEnd,v=s.collisionActive,m,T,C,S;for(u.length=0,c.length=0,v.length=0,S=0;S{var a={};d.exports=a;var p=t(31725),o=t(52284),s=t(15647),r=t(66280),e=t(41598);(function(){a.collides=function(n,l){for(var i=[],h=l.length,u=n.bounds,c=o.collides,v=s.overlaps,m=0;m{var a={};d.exports=a;var p=t(41598),o=t(53402),s=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(r){var e,n,l,i=r.length;for(e=0;edt?(C=Et>0?Et:-Et,T=A.friction*(Et>0?1:-1)*i,T<-C?T=-C:T>C&&(T=C)):(T=Et,C=v);var Tt=$*z-k*G,vt=Q*z-J*G,wt=V/(H+F.inverseInertia*Tt*Tt+I.inverseInertia*vt*vt),Bt=(1+A.restitution)*ct*wt;if(T*=wt,ct0&&(U.normalImpulse=0),Bt=U.normalImpulse-jt}if(Et<-u||Et>u)U.tangentImpulse=0;else{var Ut=U.tangentImpulse;U.tangentImpulse+=T,U.tangentImpulse<-C&&(U.tangentImpulse=-C),U.tangentImpulse>C&&(U.tangentImpulse=C),T=U.tangentImpulse-Ut}var Yt=G*Bt+W*T,Nt=z*Bt+Y*T;F.isStatic||F.isSleeping||(F.positionPrev.x+=Yt*F.inverseMass,F.positionPrev.y+=Nt*F.inverseMass,F.anglePrev+=($*Nt-k*Yt)*F.inverseInertia),I.isStatic||I.isSleeping||(I.positionPrev.x-=Yt*I.inverseMass,I.positionPrev.y-=Nt*I.inverseMass,I.anglePrev-=(Q*Nt-J*Yt)*I.inverseInertia)}}}}})()},48140:(d,x,t)=>{var a={};d.exports=a;var p=t(41598),o=t(31725),s=t(53614),r=t(15647),e=t(66615),n=t(53402);(function(){a._warming=.4,a._torqueDampen=1,a._minLength=1e-6,a.create=function(l){var i=l;i.bodyA&&!i.pointA&&(i.pointA={x:0,y:0}),i.bodyB&&!i.pointB&&(i.pointB={x:0,y:0});var h=i.bodyA?o.add(i.bodyA.position,i.pointA):i.pointA,u=i.bodyB?o.add(i.bodyB.position,i.pointB):i.pointB,c=o.magnitude(o.sub(h,u));i.length=typeof i.length<"u"?i.length:c,i.id=i.id||n.nextId(),i.label=i.label||"Constraint",i.type="constraint",i.stiffness=i.stiffness||(i.length>0?1:.7),i.damping=i.damping||0,i.angularStiffness=i.angularStiffness||0,i.angleA=i.bodyA?i.bodyA.angle:i.angleA,i.angleB=i.bodyB?i.bodyB.angle:i.angleB,i.plugin={};var v={visible:!0,type:"line",anchors:!0,lineColor:null,lineOpacity:null,lineThickness:null,pinSize:null,anchorColor:null,anchorSize:null};return i.length===0&&i.stiffness>.1?(v.type="pin",v.anchors=!1):i.stiffness<.9&&(v.type="spring"),i.render=n.extend(v,i.render),i},a.preSolveAll=function(l){for(var i=0;i=1||l.length===0,L=A?l.stiffness*i:l.stiffness*i*i,F=l.damping*i,I=o.mult(C,P*L),D=(h?h.inverseMass:0)+(u?u.inverseMass:0),B=(h?h.inverseInertia:0)+(u?u.inverseInertia:0),G=D+B,z,W,Y,K,Z;if(F>0){var V=o.create();Y=o.div(C,S),Z=o.sub(u&&o.sub(u.position,u.positionPrev)||V,h&&o.sub(h.position,h.positionPrev)||V),K=o.dot(Y,Z)}h&&!h.isStatic&&(W=h.inverseMass/D,h.constraintImpulse.x-=I.x*W,h.constraintImpulse.y-=I.y*W,h.position.x-=I.x*W,h.position.y-=I.y*W,F>0&&(h.positionPrev.x-=F*Y.x*K*W,h.positionPrev.y-=F*Y.y*K*W),z=o.cross(c,I)/G*a._torqueDampen*h.inverseInertia*(1-l.angularStiffness),h.constraintImpulse.angle-=z,h.angle-=z),u&&!u.isStatic&&(W=u.inverseMass/D,u.constraintImpulse.x+=I.x*W,u.constraintImpulse.y+=I.y*W,u.position.x+=I.x*W,u.position.y+=I.y*W,F>0&&(u.positionPrev.x+=F*Y.x*K*W,u.positionPrev.y+=F*Y.y*K*W),z=o.cross(v,I)/G*a._torqueDampen*u.inverseInertia*(1-l.angularStiffness),u.constraintImpulse.angle+=z,u.angle+=z)}}},a.postSolveAll=function(l){for(var i=0;i0&&(v.position.x+=u.x,v.position.y+=u.y),u.angle!==0&&(p.rotate(v.vertices,u.angle,h.position),e.rotate(v.axes,u.angle),c>0&&o.rotateAbout(v.position,u.angle,h.position,v.position)),r.update(v.bounds,v.vertices,h.velocity)}u.angle*=a._warming,u.x*=a._warming,u.y*=a._warming}}},a.pointAWorld=function(l){return{x:(l.bodyA?l.bodyA.position.x:0)+(l.pointA?l.pointA.x:0),y:(l.bodyA?l.bodyA.position.y:0)+(l.pointA?l.pointA.y:0)}},a.pointBWorld=function(l){return{x:(l.bodyB?l.bodyB.position.x:0)+(l.pointB?l.pointB.x:0),y:(l.bodyB?l.bodyB.position.y:0)+(l.pointB?l.pointB.y:0)}},a.currentLength=function(l){var i=(l.bodyA?l.bodyA.position.x:0)+(l.pointA?l.pointA.x:0),h=(l.bodyA?l.bodyA.position.y:0)+(l.pointA?l.pointA.y:0),u=(l.bodyB?l.bodyB.position.x:0)+(l.pointB?l.pointB.x:0),c=(l.bodyB?l.bodyB.position.y:0)+(l.pointB?l.pointB.y:0),v=i-u,m=h-c;return Math.sqrt(v*v+m*m)}})()},53402:(d,x,t)=>{var a={};d.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,s){var r,e;typeof s=="boolean"?(r=2,e=s):(r=1,e=!0);for(var n=r;n0;s--){var r=Math.floor(a.random()*(s+1)),e=o[s];o[s]=o[r],o[r]=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,s,r){return or?r: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,s){return o=typeof o<"u"?o:0,s=typeof s<"u"?s:1,o+p()*(s-o)};var p=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,s,r){o[s]=a.chain(function(){a.warnOnce("🔅 deprecated 🔅",r)},o[s])},a.nextId=function(){return a._nextId++},a.indexOf=function(o,s){if(o.indexOf)return o.indexOf(s);for(var r=0;r{var a={};d.exports=a;var p=t(53614),o=t(66272),s=t(81388),r=t(99561),e=t(35810),n=t(69351),l=t(48140),i=t(53402),h=t(22562);(function(){a.create=function(u){u=u||{};var c={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}},v=i.extend(c,u);return v.world=u.world||n.create({label:"World"}),v.pairs=u.pairs||r.create(),v.detector=u.detector||s.create(),v.grid={buckets:[]},v.world.gravity=v.gravity,v.broadphase=v.grid,v.metrics={},v},a.update=function(u,c){var v=i.now(),m=u.world,T=u.detector,C=u.pairs,S=u.timing,P=S.timestamp,A;c=typeof c<"u"?c:i._baseDelta,c*=S.timeScale,S.timestamp+=c,S.lastDelta=c;var L={timestamp:S.timestamp,delta:c};e.trigger(u,"beforeUpdate",L);var F=n.allBodies(m),I=n.allConstraints(m);for(m.isModified&&(s.setBodies(T,F),n.setModified(m,!1,!1,!0)),u.enableSleeping&&p.update(F,c),a._bodiesApplyGravity(F,u.gravity),c>0&&a._bodiesUpdate(F,c),e.trigger(u,"beforeSolve",L),l.preSolveAll(F),A=0;A0&&e.trigger(u,"collisionStart",{pairs:C.collisionStart,timestamp:S.timestamp,delta:c});var B=i.clamp(20/u.positionIterations,0,1);for(o.preSolvePosition(C.list),A=0;A0&&e.trigger(u,"collisionActive",{pairs:C.collisionActive,timestamp:S.timestamp,delta:c}),C.collisionEnd.length>0&&e.trigger(u,"collisionEnd",{pairs:C.collisionEnd,timestamp:S.timestamp,delta:c}),a._bodiesClearForces(F),e.trigger(u,"afterUpdate",L),u.timing.lastElapsed=i.now()-v,u},a.merge=function(u,c){if(i.extend(u,c),c.world){u.world=c.world,a.clear(u);for(var v=n.allBodies(u.world),m=0;m{var a={};d.exports=a;var p=t(53402);(function(){a.on=function(o,s,r){for(var e=s.split(" "),n,l=0;l0){r||(r={}),e=s.split(" ");for(var u=0;u{var a={};d.exports=a;var p=t(73832),o=t(53402);(function(){a.name="matter-js",a.version="0.19.0",a.uses=[],a.used=[],a.use=function(){p.use(a,Array.prototype.slice.call(arguments))},a.before=function(s,r){return s=s.replace(/^Matter./,""),o.chainPathBefore(a,s,r)},a.after=function(s,r){return s=s.replace(/^Matter./,""),o.chainPathAfter(a,s,r)}})()},73832:(d,x,t)=>{var a={};d.exports=a;var p=t(53402);(function(){a._registry={},a.register=function(o){if(a.isPlugin(o)||p.warn("Plugin.register:",a.toString(o),"does not implement all required fields."),o.name in a._registry){var s=a._registry[o.name],r=a.versionParse(o.version).number,e=a.versionParse(s.version).number;r>e?(p.warn("Plugin.register:",a.toString(s),"was upgraded to",a.toString(o)),a._registry[o.name]=o):r-1},a.isFor=function(o,s){var r=o.for&&a.dependencyParse(o.for);return!o.for||s.name===r.name&&a.versionSatisfies(s.version,r.range)},a.use=function(o,s){if(o.uses=(o.uses||[]).concat(s||[]),o.uses.length===0){p.warn("Plugin.use:",a.toString(o),"does not specify any dependencies to install.");return}for(var r=a.dependencies(o),e=p.topologicalSort(r),n=[],l=0;l0&&!i.silent&&p.info(n.join(" "))},a.dependencies=function(o,s){var r=a.dependencyParse(o),e=r.name;if(s=s||{},!(e in s)){o=a.resolve(o)||o,s[e]=p.map(o.uses||[],function(l){a.isPlugin(l)&&a.register(l);var i=a.dependencyParse(l),h=a.resolve(l);return h&&!a.versionSatisfies(h.version,i.range)?(p.warn("Plugin.dependencies:",a.toString(h),"does not satisfy",a.toString(i),"used by",a.toString(r)+"."),h._warned=!0,o._warned=!0):h||(p.warn("Plugin.dependencies:",a.toString(l),"used by",a.toString(r),"could not be resolved."),o._warned=!0),i.name});for(var n=0;n=|>)?\s*((\d+)\.(\d+)\.(\d+))(-[0-9A-Za-z-+]+)?$/;s.test(o)||p.warn("Plugin.versionParse:",o,"is not a valid version or range.");var r=s.exec(o),e=Number(r[4]),n=Number(r[5]),l=Number(r[6]);return{isRange:!!(r[1]||r[2]),version:r[3],range:o,operator:r[1]||r[2]||"",major:e,minor:n,patch:l,parts:[e,n,l],prerelease:r[7],number:e*1e8+n*1e4+l}},a.versionSatisfies=function(o,s){s=s||"*";var r=a.versionParse(s),e=a.versionParse(o);if(r.isRange){if(r.operator==="*"||o==="*")return!0;if(r.operator===">")return e.number>r.number;if(r.operator===">=")return e.number>=r.number;if(r.operator==="~")return e.major===r.major&&e.minor===r.minor&&e.patch>=r.patch;if(r.operator==="^")return r.major>0?e.major===r.major&&e.number>=r.number:r.minor>0?e.minor===r.minor&&e.patch>=r.patch:e.patch===r.patch}return o===s||o==="*"}})()},53614:(d,x,t)=>{var a={};d.exports=a;var p=t(22562),o=t(35810),s=t(53402);(function(){a._motionWakeThreshold=.18,a._motionSleepThreshold=.08,a._minBias=.9,a.update=function(r,e){for(var n=e/s._baseDelta,l=a._motionSleepThreshold,i=0;i0&&h.motion=h.sleepThreshold/n&&a.set(h,!0)):h.sleepCounter>0&&(h.sleepCounter-=1)}},a.afterCollisions=function(r){for(var e=a._motionSleepThreshold,n=0;ne&&a.set(c,!1)}}}},a.set=function(r,e){var n=r.isSleeping;e?(r.isSleeping=!0,r.sleepCounter=r.sleepThreshold,r.positionImpulse.x=0,r.positionImpulse.y=0,r.positionPrev.x=r.position.x,r.positionPrev.y=r.position.y,r.anglePrev=r.angle,r.speed=0,r.angularSpeed=0,r.motion=0,n||o.trigger(r,"sleepStart")):(r.isSleeping=!1,r.sleepCounter=0,n&&o.trigger(r,"sleepEnd"))}})()},66280:(d,x,t)=>{var a={};d.exports=a;var p=t(41598),o=t(53402),s=t(22562),r=t(15647),e=t(31725);(function(){a.rectangle=function(n,l,i,h,u){u=u||{};var c={label:"Rectangle Body",position:{x:n,y:l},vertices:p.fromPath("L 0 0 L "+i+" 0 L "+i+" "+h+" L 0 "+h)};if(u.chamfer){var v=u.chamfer;c.vertices=p.chamfer(c.vertices,v.radius,v.quality,v.qualityMin,v.qualityMax),delete u.chamfer}return s.create(o.extend({},c,u))},a.trapezoid=function(n,l,i,h,u,c){c=c||{},u*=.5;var v=(1-u*2)*i,m=i*u,T=m+v,C=T+m,S;u<.5?S="L 0 0 L "+m+" "+-h+" L "+T+" "+-h+" L "+C+" 0":S="L 0 0 L "+T+" "+-h+" L "+C+" 0";var P={label:"Trapezoid Body",position:{x:n,y:l},vertices:p.fromPath(S)};if(c.chamfer){var A=c.chamfer;P.vertices=p.chamfer(P.vertices,A.radius,A.quality,A.qualityMin,A.qualityMax),delete c.chamfer}return s.create(o.extend({},P,c))},a.circle=function(n,l,i,h,u){h=h||{};var c={label:"Circle Body",circleRadius:i};u=u||25;var v=Math.ceil(Math.max(10,Math.min(u,i)));return v%2===1&&(v+=1),a.polygon(n,l,v,i,o.extend({},c,h))},a.polygon=function(n,l,i,h,u){if(u=u||{},i<3)return a.circle(n,l,h,u);for(var c=2*Math.PI/i,v="",m=c*.5,T=0;T0&&p.area(Z)1?(S=s.create(o.extend({parts:P.slice(0)},h)),s.setPosition(S,{x:n,y:l}),S):P[0]},a.flagCoincidentParts=function(n,l){l===void 0&&(l=5);for(var i=0;i{var a={};d.exports=a;var p=t(69351),o=t(48140),s=t(53402),r=t(22562),e=t(66280);(function(){a.stack=function(n,l,i,h,u,c,v){for(var m=p.create({label:"Stack"}),T=n,C=l,S,P=0,A=0;AL&&(L=D),r.translate(I,{x:B*.5,y:D*.5}),T=I.bounds.max.x+u,p.addBody(m,I),S=I,P+=1}else T+=u}C+=L+c,T=n}return m},a.chain=function(n,l,i,h,u,c){for(var v=n.bodies,m=1;m0)for(m=0;m0&&(S=c[m-1+(v-1)*l],p.addConstraint(n,o.create(s.extend({bodyA:S,bodyB:C},u)))),h&&mL)){S=L-S;var I=S,D=i-1-S;if(!(CD)){A===1&&r.translate(P,{x:(C+(i%2===1?1:-1))*F,y:0});var B=P?C*F:0;return v(n+B+C*u,T,C,S,P,A)}}})},a.newtonsCradle=function(n,l,i,h,u){for(var c=p.create({label:"Newtons Cradle"}),v=0;v{var a={};d.exports=a;var p=t(31725),o=t(53402);(function(){a.fromVertices=function(s){for(var r={},e=0;e{var x={};d.exports=x,function(){x.create=function(t){var a={min:{x:0,y:0},max:{x:0,y:0}};return t&&x.update(a,t),a},x.update=function(t,a,p){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=s.x),s.xt.max.y&&(t.max.y=s.y),s.y0?t.max.x+=p.x:t.min.x+=p.x,p.y>0?t.max.y+=p.y:t.min.y+=p.y)},x.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},x.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},x.translate=function(t,a){t.min.x+=a.x,t.max.x+=a.x,t.min.y+=a.y,t.max.y+=a.y},x.shift=function(t,a){var p=t.max.x-t.min.x,o=t.max.y-t.min.y;t.min.x=a.x,t.max.x=a.x+p,t.min.y=a.y,t.max.y=a.y+o}}()},74058:(d,x,t)=>{var a={};d.exports=a,t(15647);var p=t(53402);(function(){a.pathToVertices=function(o,s){typeof window<"u"&&!("SVGPathSeg"in window)&&p.warn("Svg.pathToVertices: SVGPathSeg not defined, a polyfill is required.");var r,e,n,l,i,h,u,c,v,m,T=[],C,S,P=0,A=0,L=0;s=s||15;var F=function(D,B,G){var z=G%2===1&&G>1;if(!v||D!=v.x||B!=v.y){v&&z?(C=v.x,S=v.y):(C=0,S=0);var W={x:C+D,y:S+B};(z||!v)&&(v=W),T.push(W),A=C+D,L=S+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":A=D.x,L=D.y;break;case"H":A=D.x;break;case"V":L=D.y;break}F(A,L,D.pathSegType)}};for(a._svgPathToAbsolute(o),n=o.getTotalLength(),h=[],r=0;r{var x={};d.exports=x,function(){x.create=function(t,a){return{x:t||0,y:a||0}},x.clone=function(t){return{x:t.x,y:t.y}},x.magnitude=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},x.magnitudeSquared=function(t){return t.x*t.x+t.y*t.y},x.rotate=function(t,a,p){var o=Math.cos(a),s=Math.sin(a);p||(p={});var r=t.x*o-t.y*s;return p.y=t.x*s+t.y*o,p.x=r,p},x.rotateAbout=function(t,a,p,o){var s=Math.cos(a),r=Math.sin(a);o||(o={});var e=p.x+((t.x-p.x)*s-(t.y-p.y)*r);return o.y=p.y+((t.x-p.x)*r+(t.y-p.y)*s),o.x=e,o},x.normalise=function(t){var a=x.magnitude(t);return a===0?{x:0,y:0}:{x:t.x/a,y:t.y/a}},x.dot=function(t,a){return t.x*a.x+t.y*a.y},x.cross=function(t,a){return t.x*a.y-t.y*a.x},x.cross3=function(t,a,p){return(a.x-t.x)*(p.y-t.y)-(a.y-t.y)*(p.x-t.x)},x.add=function(t,a,p){return p||(p={}),p.x=t.x+a.x,p.y=t.y+a.y,p},x.sub=function(t,a,p){return p||(p={}),p.x=t.x-a.x,p.y=t.y-a.y,p},x.mult=function(t,a){return{x:t.x*a,y:t.y*a}},x.div=function(t,a){return{x:t.x/a,y:t.y/a}},x.perp=function(t,a){return a=a===!0?-1:1,{x:a*-t.y,y:a*t.x}},x.neg=function(t){return{x:-t.x,y:-t.y}},x.angle=function(t,a){return Math.atan2(a.y-t.y,a.x-t.x)},x._temp=[x.create(),x.create(),x.create(),x.create(),x.create(),x.create()]}()},41598:(d,x,t)=>{var a={};d.exports=a;var p=t(31725),o=t(53402);(function(){a.create=function(s,r){for(var e=[],n=0;n0)return!1;i=h}return!0},a.scale=function(s,r,e,n){if(r===1&&e===1)return s;n=n||a.centre(s);for(var l,i,h=0;h=0?h-1:s.length-1],c=s[h],v=s[(h+1)%s.length],m=r[h0&&(r|=2),r===3)return!1;return r!==0?!0:null},a.hull=function(s){var r=[],e=[],n,l;for(s=s.slice(0),s.sort(function(i,h){var u=i.x-h.x;return u!==0?u:i.y-h.y}),l=0;l=2&&p.cross3(e[e.length-2],e[e.length-1],n)<=0;)e.pop();e.push(n)}for(l=s.length-1;l>=0;l-=1){for(n=s[l];r.length>=2&&p.cross3(r[r.length-2],r[r.length-1],n)<=0;)r.pop();r.push(n)}return r.pop(),e.pop(),r.concat(e)}})()},18210:(d,x,t)=>{var a=t(19933),p={name:"matter-attractors",version:"0.1.7",for:"matter-js@^0.19.0",silent:!0,install:function(o){o.after("Body.create",function(){p.Body.init(this)}),o.before("Engine.update",function(s){p.Engine.update(s)})},Body:{init:function(o){o.plugin.attractors=o.plugin.attractors||[]}},Engine:{update:function(o){for(var s=a.Composite.allBodies(o.world),r=0;r0)for(var l=0;l{/** + * @author @dxu https://github.com/dxu/matter-collision-events + * @author Richard Davey + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x={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(p){var o=p.bodyA,s=p.bodyB;o.gameObject&&o.gameObject.emit("collide",o,s,p),s.gameObject&&s.gameObject.emit("collide",s,o,p),t.Events.trigger(o,"onCollide",{pair:p}),t.Events.trigger(s,"onCollide",{pair:p}),o.onCollideCallback&&o.onCollideCallback(p),s.onCollideCallback&&s.onCollideCallback(p),o.onCollideWith[s.id]&&o.onCollideWith[s.id](s,p),s.onCollideWith[o.id]&&s.onCollideWith[o.id](o,p)})}),t.Events.on(this,"collisionActive",function(a){a.pairs.map(function(p){var o=p.bodyA,s=p.bodyB;o.gameObject&&o.gameObject.emit("collideActive",o,s,p),s.gameObject&&s.gameObject.emit("collideActive",s,o,p),t.Events.trigger(o,"onCollideActive",{pair:p}),t.Events.trigger(s,"onCollideActive",{pair:p}),o.onCollideActiveCallback&&o.onCollideActiveCallback(p),s.onCollideActiveCallback&&s.onCollideActiveCallback(p)})}),t.Events.on(this,"collisionEnd",function(a){a.pairs.map(function(p){var o=p.bodyA,s=p.bodyB;o.gameObject&&o.gameObject.emit("collideEnd",o,s,p),s.gameObject&&s.gameObject.emit("collideEnd",s,o,p),t.Events.trigger(o,"onCollideEnd",{pair:p}),t.Events.trigger(s,"onCollideEnd",{pair:p}),o.onCollideEndCallback&&o.onCollideEndCallback(p),s.onCollideEndCallback&&s.onCollideEndCallback(p)})})})}};d.exports=x},74507:(d,x,t)=>{var a=t(19933),p={name:"matter-wrap",version:"0.1.4",for:"matter-js@^0.19.0",silent:!0,install:function(o){o.after("Engine.update",function(){p.Engine.update(this)})},Engine:{update:function(o){for(var s=o.world,r=a.Composite.allBodies(s),e=a.Composite.allComposites(s),n=0;ns.max.x?r=s.min.x-o.max.x:o.max.xs.max.y?e=s.min.y-o.max.y:o.max.y{/** + * @author Stefan Hedman (http://steffe.se) + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports={decomp:I,quickDecomp:z,isSimple:B,removeCollinearPoints:W,removeDuplicatePoints:Y,makeCCW:v};function x(V,H,N){N=N||0;var U=[0,0],X,$,k,Q,J,et,nt;return X=V[1][1]-V[0][1],$=V[0][0]-V[1][0],k=X*V[0][0]+$*V[0][1],Q=H[1][1]-H[0][1],J=H[0][0]-H[1][0],et=Q*H[0][0]+J*H[0][1],nt=X*J-Q*$,K(nt,0,N)||(U[0]=(J*k-$*et)/nt,U[1]=(X*et-Q*k)/nt),U}function t(V,H,N,U){var X=H[0]-V[0],$=H[1]-V[1],k=U[0]-N[0],Q=U[1]-N[1];if(k*$-Q*X===0)return!1;var J=(X*(N[1]-V[1])+$*(V[0]-N[0]))/(k*$-Q*X),et=(k*(V[1]-N[1])+Q*(N[0]-V[0]))/(Q*X-k*$);return J>=0&&J<=1&&et>=0&&et<=1}function a(V,H,N){return(H[0]-V[0])*(N[1]-V[1])-(N[0]-V[0])*(H[1]-V[1])}function p(V,H,N){return a(V,H,N)>0}function o(V,H,N){return a(V,H,N)>=0}function s(V,H,N){return a(V,H,N)<0}function r(V,H,N){return a(V,H,N)<=0}var e=[],n=[];function l(V,H,N,U){if(U){var X=e,$=n;X[0]=H[0]-V[0],X[1]=H[1]-V[1],$[0]=N[0]-H[0],$[1]=N[1]-H[1];var k=X[0]*$[0]+X[1]*$[1],Q=Math.sqrt(X[0]*X[0]+X[1]*X[1]),J=Math.sqrt($[0]*$[0]+$[1]*$[1]),et=Math.acos(k/(Q*J));return etN[H][0])&&(H=U);return p(h(V,H-1),h(V,H),h(V,H+1))?!1:(m(V),!0)}function m(V){for(var H=[],N=V.length,U=0;U!==N;U++)H.push(V.pop());for(var U=0;U!==N;U++)V[U]=H[U]}function T(V,H){return s(h(V,H-1),h(V,H),h(V,H+1))}var C=[],S=[];function P(V,H,N){var U,X,$=C,k=S;if(o(h(V,H+1),h(V,H),h(V,N))&&r(h(V,H-1),h(V,H),h(V,N)))return!1;X=i(h(V,H),h(V,N));for(var Q=0;Q!==V.length;++Q)if(!((Q+1)%V.length===H||Q===H)&&o(h(V,H),h(V,N),h(V,Q+1))&&r(h(V,H),h(V,N),h(V,Q))&&($[0]=h(V,H),$[1]=h(V,N),k[0]=h(V,Q),k[1]=h(V,Q+1),U=x($,k),i(h(V,H),U)0?D(V,H):[V]}function D(V,H){if(H.length===0)return[V];if(H instanceof Array&&H.length&&H[0]instanceof Array&&H[0].length===2&&H[0][0]instanceof Array){for(var N=[V],U=0;U$)return console.warn("quickDecomp: max level ("+$+") reached."),H;for(var vt=0;vtat&&(at+=V.length),ut=Number.MAX_VALUE,at3&&U>=0;--U)l(h(V,U-1),h(V,U),h(V,U+1),H)&&(V.splice(U%V.length,1),N++);return N}function Y(V,H){for(var N=V.length-1;N>=1;--N)for(var U=V[N],X=N-1;X>=0;--X)if(Z(U,V[X],H)){V.splice(N,1);continue}}function K(V,H,N){return N=N||0,Math.abs(V-H)<=N}function Z(V,H,N){return K(V[0],H[0],N)&&K(V[1],H[1],N)}},52018:(d,x,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),p=new a({initialize:function(s){this.pluginManager=s,this.game=s.game},init:function(){},start:function(){},stop:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});d.exports=p},42363:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x={Global:["game","anims","cache","plugins","registry","scale","sound","textures","renderer"],CoreScene:["EventEmitter","CameraManager","GameObjectCreator","GameObjectFactory","ScenePlugin","DisplayList","UpdateList"],DefaultScene:["Clock","DataManagerPlugin","InputPlugin","Loader","TweenManager","LightsPlugin"]};d.exports=x},37277:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x={},t={},a={};a.register=function(p,o,s,r){r===void 0&&(r=!1),x[p]={plugin:o,mapping:s,custom:r}},a.registerCustom=function(p,o,s,r){t[p]={plugin:o,mapping:s,data:r}},a.hasCore=function(p){return x.hasOwnProperty(p)},a.hasCustom=function(p){return t.hasOwnProperty(p)},a.getCore=function(p){return x[p]},a.getCustom=function(p){return t[p]},a.getCustomClass=function(p){return t.hasOwnProperty(p)?t[p].plugin:null},a.remove=function(p){x.hasOwnProperty(p)&&delete x[p]},a.removeCustom=function(p){t.hasOwnProperty(p)&&delete t[p]},a.destroyCorePlugins=function(){for(var p in x)x.hasOwnProperty(p)&&delete x[p]},a.destroyCustomPlugins=function(){for(var p in t)t.hasOwnProperty(p)&&delete t[p]},d.exports=a},77332:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(8443),o=t(50792),s=t(74099),r=t(44603),e=t(39429),n=t(95540),l=t(37277),i=t(72905),h=new a({Extends:o,initialize:function(c){o.call(this),this.game=c,this.plugins=[],this.scenePlugins=[],this._pendingGlobal=[],this._pendingScene=[],c.isBooted?this.boot():c.events.once(p.BOOT,this.boot,this)},boot:function(){var u,c,v,m,T,C,S,P=this.game.config,A=P.installGlobalPlugins;for(A=A.concat(this._pendingGlobal),u=0;u{/** +* @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),p=t(83419),o=t(44594),s=new p({Extends:a,initialize:function(e,n,l){a.call(this,n),this.scene=e,this.systems=e.sys,this.pluginKey=l,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}});d.exports=s},18922:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.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(d){const x=performance.now(),t=this.getVideoPlaybackQuality(),a=this.mozPresentedFrames||this.mozPaintedFrames||t.totalVideoFrames-t.droppedVideoFrames,p=(o,s)=>{const r=this.getVideoPlaybackQuality(),e=this.mozPresentedFrames||this.mozPaintedFrames||r.totalVideoFrames-r.droppedVideoFrames;if(e>a){const n=this.mozFrameDelay||r.totalFrameDelay-t.totalFrameDelay||0,l=s-o;d(s,{presentationTime:s+n*1e3,expectedDisplayTime:s+l,width:this.videoWidth,height:this.videoHeight,mediaTime:Math.max(0,this.currentTime||0)+l/1e3,presentedFrames:e,processingDuration:n}),delete this._rvfcpolyfillmap[x]}else this._rvfcpolyfillmap[x]=requestAnimationFrame(n=>p(s,n))};return this._rvfcpolyfillmap[x]=requestAnimationFrame(o=>p(x,o)),x},HTMLVideoElement.prototype.cancelVideoFrameCallback=function(d){cancelAnimationFrame(this._rvfcpolyfillmap[d]),delete this._rvfcpolyfillmap[d]})},10312:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.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:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x={DEFAULT:0,LINEAR:0,NEAREST:1};d.exports=x},68627:(d,x,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),p=t(32880),o=t(83419),s=t(8054),r=t(50792),e=t(92503),n=t(56373),l=t(97480),i=t(69442),h=t(61340),u=new o({Extends:r,initialize:function(v){r.call(this);var m=v.config;this.config={clearBeforeRender:m.clearBeforeRender,backgroundColor:m.backgroundColor,antialias:m.antialias,roundPixels:m.roundPixels},this.game=v,this.type=s.CANVAS,this.drawCount=0,this.width=0,this.height=0,this.gameCanvas=v.canvas;var T={alpha:v.config.transparent,desynchronized:v.config.desynchronized,willReadFrequently:!1};this.gameContext=m.context?m.context:this.gameCanvas.getContext("2d",T),this.currentContext=this.gameContext,this.antialias=v.config.antialias,this.blendModes=n(),this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92},this._tempMatrix1=new h,this._tempMatrix2=new h,this._tempMatrix3=new h,this.isBooted=!1,this.init()},init:function(){this.game.textures.once(i.READY,this.boot,this)},boot:function(){var c=this.game,v=c.scale.baseSize;this.width=v.width,this.height=v.height,this.isBooted=!0,c.scale.on(l.RESIZE,this.onResize,this),this.resize(v.width,v.height)},onResize:function(c,v){(v.width!==this.width||v.height!==this.height)&&this.resize(v.width,v.height)},resize:function(c,v){this.width=c,this.height=v,this.emit(e.RESIZE,c,v)},resetTransform:function(){this.currentContext.setTransform(1,0,0,1,0,0)},setBlendMode:function(c){return this.currentContext.globalCompositeOperation=c,this},setContext:function(c){return this.currentContext=c||this.gameContext,this},setAlpha:function(c){return this.currentContext.globalAlpha=c,this},preRender:function(){var c=this.gameContext,v=this.config,m=this.width,T=this.height;c.globalAlpha=1,c.globalCompositeOperation="source-over",c.setTransform(1,0,0,1,0,0),v.clearBeforeRender&&(c.clearRect(0,0,m,T),v.transparent||(c.fillStyle=v.backgroundColor.rgba,c.fillRect(0,0,m,T))),c.save(),this.drawCount=0,this.emit(e.PRE_RENDER)},render:function(c,v,m){var T=v.length;this.emit(e.RENDER,c,m);var C=m.x,S=m.y,P=m.width,A=m.height,L=m.renderToTexture?m.context:c.sys.context;L.save(),this.game.scene.customViewports&&(L.beginPath(),L.rect(C,S,P,A),L.clip()),m.emit(a.PRE_RENDER,m),this.currentContext=L;var F=m.mask;F&&F.preRenderCanvas(this,null,m._maskCamera),m.transparent||(L.fillStyle=m.backgroundColor.rgba,L.fillRect(C,S,P,A)),L.globalAlpha=m.alpha,L.globalCompositeOperation="source-over",this.drawCount+=T,m.renderToTexture&&m.emit(a.PRE_RENDER,m),m.matrix.copyToContext(L);for(var I=0;I=0?K=-(K+D):K<0&&(K=Math.abs(K)-D)),c.flipY&&(Z>=0?Z=-(Z+B):Z<0&&(Z=Math.abs(Z)-B))}var H=1,N=1;c.flipX&&(G||(K+=-v.realWidth+W*2),H=-1),c.flipY&&(G||(Z+=-v.realHeight+Y*2),N=-1);var U=c.x,X=c.y;A.applyITRS(U,X,c.rotation,c.scaleX*H,c.scaleY*N),P.copyFrom(m.matrix),T?(P.multiplyWithOffset(T,-m.scrollX*c.scrollFactorX,-m.scrollY*c.scrollFactorY),A.e=U,A.f=X):(A.e-=m.scrollX*c.scrollFactorX,A.f-=m.scrollY*c.scrollFactorY),P.multiply(A),m.roundPixels&&(P.e=Math.round(P.e),P.f=Math.round(P.f)),S.save(),P.setToContext(S),S.globalCompositeOperation=this.blendModes[c.blendMode],S.globalAlpha=C,S.imageSmoothingEnabled=!v.source.scaleMode,c.mask&&c.mask.preRenderCanvas(this,c,m),D>0&&B>0&&(m.roundPixels?S.drawImage(v.source.image,F,I,D,B,Math.round(K),Math.round(Z),Math.round(D/z),Math.round(B/z)):S.drawImage(v.source.image,F,I,D,B,K,Z,D/z,B/z)),c.mask&&c.mask.postRenderCanvas(this,c,m),S.restore()}},destroy:function(){this.removeAllListeners(),this.game=null,this.gameCanvas=null,this.gameContext=null}});d.exports=u},55830:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports={CanvasRenderer:t(68627),GetBlendModes:t(56373),SetTransform:t(20926)}},56373:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(10312),p=t(89289),o=function(){var s=[],r=p.supportNewBlendModes,e="source-over";return s[a.NORMAL]=e,s[a.ADD]="lighter",s[a.MULTIPLY]=r?"multiply":e,s[a.SCREEN]=r?"screen":e,s[a.OVERLAY]=r?"overlay":e,s[a.DARKEN]=r?"darken":e,s[a.LIGHTEN]=r?"lighten":e,s[a.COLOR_DODGE]=r?"color-dodge":e,s[a.COLOR_BURN]=r?"color-burn":e,s[a.HARD_LIGHT]=r?"hard-light":e,s[a.SOFT_LIGHT]=r?"soft-light":e,s[a.DIFFERENCE]=r?"difference":e,s[a.EXCLUSION]=r?"exclusion":e,s[a.HUE]=r?"hue":e,s[a.SATURATION]=r?"saturation":e,s[a.COLOR]=r?"color":e,s[a.LUMINOSITY]=r?"luminosity":e,s[a.ERASE]="destination-out",s[a.SOURCE_IN]="source-in",s[a.SOURCE_OUT]="source-out",s[a.SOURCE_ATOP]="source-atop",s[a.DESTINATION_OVER]="destination-over",s[a.DESTINATION_IN]="destination-in",s[a.DESTINATION_OUT]="destination-out",s[a.DESTINATION_ATOP]="destination-atop",s[a.LIGHTER]="lighter",s[a.COPY]="copy",s[a.XOR]="xor",s};d.exports=o},20926:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(91296),p=function(o,s,r,e,n){var l=e.alpha*r.alpha;if(l<=0)return!1;var i=a(r,e,n).calc;return s.globalCompositeOperation=o.blendModes[r.blendMode],s.globalAlpha=l,s.save(),i.setToContext(s),s.imageSmoothingEnabled=r.frame?!r.frame.source.scaleMode:o.antialias,!0};d.exports=p},63899:d=>{/** + * @author Benjamin D. Richards + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="losewebgl"},6119:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="postrender"},48070:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="prerender"},15640:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="render"},8912:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="resize"},87124:d=>{/** + * @author Benjamin D. Richards + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="restorewebgl"},92503:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports={LOSE_WEBGL:t(63899),POST_RENDER:t(6119),PRE_RENDER:t(48070),RENDER:t(15640),RESIZE:t(8912),RESTORE_WEBGL:t(87124)}},36909:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports={Events:t(92503),Snapshot:t(89966)},d.exports.Canvas=t(55830),d.exports.WebGL=t(4159)},32880:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(27919),p=t(40987),o=t(95540),s=function(r,e){var n=o(e,"callback"),l=o(e,"type","image/png"),i=o(e,"encoder",.92),h=Math.abs(Math.round(o(e,"x",0))),u=Math.abs(Math.round(o(e,"y",0))),c=Math.floor(o(e,"width",r.width)),v=Math.floor(o(e,"height",r.height)),m=o(e,"getPixel",!1);if(m){var T=r.getContext("2d",{willReadFrequently:!1}),C=T.getImageData(h,u,1,1),S=C.data;n.call(null,new p(S[0],S[1],S[2],S[3]))}else if(h!==0||u!==0||c!==r.width||v!==r.height){var P=a.createWebGL(this,c,v),A=P.getContext("2d",{willReadFrequently:!0});c>0&&v>0&&A.drawImage(r,h,u,c,v,0,0,c,v);var L=new Image;L.onerror=function(){n.call(null),a.remove(P)},L.onload=function(){n.call(null,L),a.remove(P)},L.src=P.toDataURL(l,i)}else{var F=new Image;F.onerror=function(){n.call(null)},F.onload=function(){n.call(null,F)},F.src=r.toDataURL(l,i)}};d.exports=s},88815:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(27919),p=t(40987),o=t(95540),s=function(r,e){var n=r,l=o(e,"callback"),i=o(e,"type","image/png"),h=o(e,"encoder",.92),u=Math.abs(Math.round(o(e,"x",0))),c=Math.abs(Math.round(o(e,"y",0))),v=o(e,"getPixel",!1),m=o(e,"isFramebuffer",!1),T=m?o(e,"bufferWidth",1):n.drawingBufferWidth,C=m?o(e,"bufferHeight",1):n.drawingBufferHeight;if(v){var S=new Uint8Array(4),P=m?c:C-c;n.readPixels(u,P,1,1,n.RGBA,n.UNSIGNED_BYTE,S),l.call(null,new p(S[0],S[1],S[2],S[3]))}else{var A=Math.floor(o(e,"width",T)),L=Math.floor(o(e,"height",C)),F=A*L*4,I=new Uint8Array(F);n.readPixels(u,C-c-L,A,L,n.RGBA,n.UNSIGNED_BYTE,I);for(var D=a.createWebGL(this,A,L),B=D.getContext("2d",{willReadFrequently:!0}),G=B.getImageData(0,0,A,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} + */d.exports={Canvas:t(32880),WebGL:t(88815)}},7530:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(36060),o=t(90330),s=t(82264),r=t(95540),e=t(32302),n=t(63448),l=t(31302),i=t(58918),h=t(14811),u=t(92651),c=t(96569),v=t(56527),m=t(57516),T=t(43439),C=t(81041),S=t(12385),P=t(7589),A=t(95428),L=t(72905),F=new a({initialize:function(D){this.game=D.game,this.renderer=D,this.classes=new o([[p.UTILITY_PIPELINE,P],[p.MULTI_PIPELINE,m],[p.BITMAPMASK_PIPELINE,l],[p.SINGLE_PIPELINE,S],[p.ROPE_PIPELINE,C],[p.LIGHT_PIPELINE,c],[p.POINTLIGHT_PIPELINE,T],[p.MOBILE_PIPELINE,v]]),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,D,B){var G=this.renderer,z=this.renderTargets;this.frameInc=Math.floor(r(I,"frameInc",32));var W=G.width,Y=G.height,K=this.game.config.disablePreFX,Z=this.game.config.disablePostFX;if(Z||this.postPipelineClasses.setAll([[String(h.BARREL),i.Barrel],[String(h.BLOOM),i.Bloom],[String(h.BLUR),i.Blur],[String(h.BOKEH),i.Bokeh],[String(h.CIRCLE),i.Circle],[String(h.COLOR_MATRIX),i.ColorMatrix],[String(h.DISPLACEMENT),i.Displacement],[String(h.GLOW),i.Glow],[String(h.GRADIENT),i.Gradient],[String(h.PIXELATE),i.Pixelate],[String(h.SHADOW),i.Shadow],[String(h.SHINE),i.Shine],[String(h.VIGNETTE),i.Vignette],[String(h.WIPE),i.Wipe]]),!K){this.classes.set(p.FX_PIPELINE,u);for(var V=Math.min(W,Y),H=Math.ceil(V/this.frameInc),N=1;N=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=(n(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}});d.exports=F},32302:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(92503),o=new a({initialize:function(r,e,n,l,i,h,u,c,v){l===void 0&&(l=1),i===void 0&&(i=0),h===void 0&&(h=!0),u===void 0&&(u=!1),c===void 0&&(c=!0),v===void 0&&(v=!0),this.renderer=r,this.framebuffer=null,this.texture=null,this.width=0,this.height=0,this.scale=l,this.minFilter=i,this.autoClear=h,this.autoResize=!0,this.hasDepthBuffer=c,this.forceClamp=v,this.resize(e,n),u?this.setAutoResize(!0):this.autoResize=!1},setAutoResize:function(s){return s&&!this.autoResize?(this.renderer.on(p.RESIZE,this.resize,this),this.autoResize=!0):!s&&this.autoResize&&(this.renderer.off(p.RESIZE,this.resize,this),this.autoResize=!1),this},resize:function(s,r){if(s=Math.round(s*this.scale),r=Math.round(r*this.scale),s<=0&&(s=1),r<=0&&(r=1),this.autoResize&&(s!==this.width||r!==this.height)){var e=this.renderer;e.deleteFramebuffer(this.framebuffer),e.deleteTexture(this.texture),this.texture=e.createTextureFromSource(null,s,r,this.minFilter,this.forceClamp),this.framebuffer=e.createFramebuffer(s,r,this.texture,this.hasDepthBuffer),this.width=s,this.height=r}return this},willResize:function(s,r){return s=Math.round(s*this.scale),r=Math.round(r*this.scale),s<=0&&(s=1),r<=0&&(r=1),s!==this.width||r!==this.height},bind:function(s,r,e){s===void 0&&(s=!1);var n=this.renderer;if(s&&n.flush(),r&&e&&this.resize(r,e),n.pushFramebuffer(this.framebuffer,!1,!1),s&&this.adjustViewport(),this.autoClear){var l=this.renderer.gl;l.clearColor(0,0,0,0),l.clear(l.COLOR_BUFFER_BIT)}n.clearStencilMask()},adjustViewport:function(){var s=this.renderer.gl;s.viewport(0,0,this.width,this.height),s.disable(s.SCISSOR_TEST)},clear:function(){var s=this.renderer,r=s.gl;s.pushFramebuffer(this.framebuffer),r.disable(r.SCISSOR_TEST),r.clearColor(0,0,0,0),r.clear(r.COLOR_BUFFER_BIT),s.popFramebuffer(),s.resetScissor()},unbind:function(s){s===void 0&&(s=!1);var r=this.renderer;return s&&r.flush(),r.popFramebuffer()},destroy:function(){var s=this.renderer;s.off(p.RESIZE,this.resize,this),s.deleteFramebuffer(this.framebuffer),s.deleteTexture(this.texture),this.renderer=null,this.framebuffer=null,this.texture=null}});d.exports=o},70554:d=>{/** + * @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} + */d.exports={getTintFromFloats:function(x,t,a,p){var o=(x*255|0)&255,s=(t*255|0)&255,r=(a*255|0)&255,e=(p*255|0)&255;return(e<<24|o<<16|s<<8|r)>>>0},getTintAppendFloatAlpha:function(x,t){var a=(t*255|0)&255;return(a<<24|x)>>>0},getTintAppendFloatAlphaAndSwap:function(x,t){var a=(x>>16|0)&255,p=(x>>8|0)&255,o=(x|0)&255,s=(t*255|0)&255;return(s<<24|o<<16|p<<8|a)>>>0},getFloatsFromUintRGB:function(x){var t=(x>>16|0)&255,a=(x>>8|0)&255,p=(x|0)&255;return[t/255,a/255,p/255]},checkShaderMax:function(x,t){var a=Math.min(16,x.getParameter(x.MAX_TEXTURE_IMAGE_UNITS));return!t||t===-1?a:Math.min(a,t)},parseFragmentShaderMaxTextures:function(x,t){if(!x)return"";for(var a="",p=0;p0&&(a+=` + else `),p{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(62644),o=t(50792),s=t(77085),r=t(95540),e=t(37867),n=t(92503),l=t(32302),i=t(70554),h=t(38683),u=new a({Extends:o,initialize:function(v){o.call(this);var m=v.game,T=m.renderer,C=T.gl;this.name=r(v,"name","WebGLPipeline"),this.game=m,this.renderer=T,this.manager,this.gl=C,this.view=m.canvas,this.width=0,this.height=0,this.vertexCount=0,this.vertexCapacity=0,this.vertexData,this.vertexBuffer,this.activeBuffer,this.topology=r(v,"topology",C.TRIANGLES),this.bytes,this.vertexViewF32,this.vertexViewU32,this.active=!0,this.forceZero=r(v,"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=v,this.glReset=!1,this.batch=[],this.currentBatch=null,this.currentTexture=null,this.currentUnit=0,this.activeTextures=[],this.resizeUniform=r(v,"resizeUniform","")},boot:function(){var c,v=this.gl,m=this.config,T=this.renderer;this.isPostFX||(this.projectionMatrix=new e().identity());var C=this.renderTargets,S=r(m,"renderTarget",!1);typeof S=="boolean"&&S&&(S=1);var P=T.width,A=T.height;if(typeof S=="number")for(c=0;cW&&(W=z[c].vertexSize);var Y=r(m,"batchSize",T.config.batchSize);this.vertexCapacity=Y*6;var K=new ArrayBuffer(this.vertexCapacity*W);this.vertexData=K,this.bytes=new Uint8Array(K),this.vertexViewF32=new Float32Array(K),this.vertexViewU32=new Uint32Array(K);var Z=r(m,"vertices",null);for(Z?(this.vertexViewF32.set(Z),this.vertexBuffer=T.createVertexBuffer(K,v.STATIC_DRAW)):this.vertexBuffer=T.createVertexBuffer(K.byteLength,v.DYNAMIC_DRAW),this.setVertexBuffer(),c=z.length-1;c>=0;c--)z[c].rebind();this.hasBooted=!0,T.on(n.RESIZE,this.resize,this),T.on(n.PRE_RENDER,this.onPreRender,this),T.on(n.RENDER,this.onRender,this),T.on(n.POST_RENDER,this.onPostRender,this),this.emit(s.BOOT,this),this.onBoot()},onBoot:function(){},onResize:function(){},setShader:function(c,v,m){var T=this.renderer;if(c!==this.currentShader||T.currentProgram!==this.currentShader.program){this.flush();var C=this.setVertexBuffer(m);C&&!v&&(v=!0),c.bind(v,!1),this.currentShader=c}return this},getShaderByName:function(c){for(var v=this.shaders,m=0;m-1&&(z=V.substring(20))}W&&Y&&B.push(new h(this,z,W,Y,p(K)))}this.shaders=B}return this.shaders.length===0?console.warn("Pipeline: "+this.name+" - Invalid shader config"):this.currentShader=this.shaders[0],this},createBatch:function(c){return this.currentBatch={start:this.vertexCount,count:0,texture:[c],unit:0,maxUnit:0},this.currentUnit=0,this.currentTexture=c,this.batch.push(this.currentBatch),0},addTextureToBatch:function(c){var v=this.currentBatch;v&&(v.texture.push(c),v.unit++,v.maxUnit++)},pushBatch:function(c){if(!this.currentBatch||this.forceZero&&c!==this.currentTexture)return this.createBatch(c);if(c===this.currentTexture)return this.currentUnit;var v=this.currentBatch,m=v.texture.indexOf(c);return m===-1?v.texture.length===this.renderer.maxTextures?this.createBatch(c):(v.unit++,v.maxUnit++,v.texture.push(c),this.currentUnit=v.unit,this.currentTexture=c,v.unit):(this.currentUnit=m,this.currentTexture=c,m)},setGameObject:function(c,v){return v===void 0&&(v=c.frame),this.pushBatch(v.source.glTexture)},shouldFlush:function(c){return c===void 0&&(c=0),this.vertexCount+c>this.vertexCapacity},vertexAvailable:function(){return this.vertexCapacity-this.vertexCount},resize:function(c,v){(c!==this.width||v!==this.height)&&this.flush(),this.width=c,this.height=v;for(var m=this.renderTargets,T=0;T=0;m--){var T=v[m].rebind();(!c||T===c)&&(this.currentShader=T)}return this.activeTextures.length=0,this.emit(s.REBIND,this.currentShader),this.onActive(this.currentShader),this.onRebind(),this.glReset=!1,this},restoreContext:function(){var c=this.shaders,v=!!this.vertexBuffer;this.activeBuffer=null,this.activeTextures.length=0,this.batch.length=0,this.currentBatch=null,this.currentTexture=null,this.currentUnit=0,v&&this.setVertexBuffer();for(var m=0;m0){this.emit(s.BEFORE_FLUSH,this,c),this.onBeforeFlush(c);var v=this.gl,m=this.vertexCount,T=this.currentShader.vertexSize,C=this.topology;if(this.active){this.setVertexBuffer(),m===this.vertexCapacity?v.bufferData(v.ARRAY_BUFFER,this.vertexData,v.DYNAMIC_DRAW):v.bufferSubData(v.ARRAY_BUFFER,0,this.bytes.subarray(0,m*T));var S,P,A,L=this.batch,F=this.activeTextures;if(this.forceZero)for(F[0]||v.activeTexture(v.TEXTURE0),S=0;S{/** + * @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),p=t(72905),o=t(19715),s=t(83419),r=t(8054),e=t(50792),n=t(92503),l=t(50030),i=t(37867),h=t(29747),u=t(7530),c=t(32302),v=t(97480),m=t(69442),T=t(70554),C=t(88815),S=t(26128),P=t(1482),A=t(82751),L=t(84387),F=t(93567),I=t(57183),D=new s({Extends:e,initialize:function(G){e.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=r.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=h,this.contextRestoredHandler=h,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,Y=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 K=this,Z=function(){var N=G.getSupportedExtensions();K.supportedExtensions=N;var U="ANGLE_instanced_arrays";K.instancedArraysExtension=N.indexOf(U)>-1?G.getExtension(U):null;var X="OES_vertex_array_object";K.vaoExtension=N.indexOf(X)>-1?G.getExtension(X):null};Z(),this.contextLostHandler=function(N){K.contextLost=!0,console&&console.warn("WebGL Context lost. Renderer disabled"),K.emit(n.LOSE_WEBGL,K),N.preventDefault()},W.addEventListener("webglcontextlost",this.contextLostHandler,!1),this.contextRestoredHandler=function(N){if(G.isContextLost()){console&&console.log("WebGL Context restored, but context is still lost");return}K.currentProgram=null,K.currentFramebuffer=null,K.setBlendMode(r.BlendModes.NORMAL),G.disable(G.BLEND),G.disable(G.DEPTH_TEST),G.enable(G.CULL_FACE),K.compression=K.getCompressedTextures();var U=function(X){X.createResource()};a(K.glTextureWrappers,U),a(K.glBufferWrappers,U),a(K.glFramebufferWrappers,U),a(K.glProgramWrappers,U),a(K.glAttribLocationWrappers,U),a(K.glUniformLocationWrappers,U),K.createTemporaryTextures(),K.pipelines.restoreContext(),K.resize(K.game.scale.baseSize.width,K.game.scale.baseSize.height),Z(),K.contextLost=!1,console&&console.warn("WebGL Context restored. Renderer running again."),K.emit(n.RESTORE_WEBGL,K),N.preventDefault()},W.addEventListener("webglcontextrestored",this.contextRestoredHandler,!1),z.context=G;for(var V=0;V<=27;V++)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(Y.redGL,Y.greenGL,Y.blueGL,Y.alphaGL);var H=["NEAREST","LINEAR","NEAREST_MIPMAP_NEAREST","LINEAR_MIPMAP_NEAREST","NEAREST_MIPMAP_LINEAR","LINEAR_MIPMAP_LINEAR"];return H.indexOf(B.mipmapFilter)!==-1&&(this.mipmapFilter=G[B.mipmapFilter]),this.maxTextures=T.checkShaderMax(G,B.maxTextures),this.textureIndexes=[],this.createTemporaryTextures(),this.pipelines=new u(this),this.setBlendMode(r.BlendModes.NORMAL),this.projectionMatrix=new i().identity(),z.textures.once(m.READY,this.boot,this),this},boot:function(){var B=this.game,G=this.pipelines,z=B.scale.baseSize,W=z.width,Y=z.height;this.width=W,this.height=Y,this.isBooted=!0,this.renderTarget=new c(this,W,Y,1,0,!0,!0),this.maskTarget=new c(this,W,Y,1,0,!0,!0),this.maskSource=new c(this,W,Y,1,0,!0,!0);var K=B.config;G.boot(K.pipeline,K.defaultPipeline,K.autoMobilePipeline),this.blankTexture=B.textures.getFrame("__DEFAULT").glTexture,this.normalTexture=B.textures.getFrame("__NORMAL").glTexture,this.whiteTexture=B.textures.getFrame("__WHITE").glTexture;var Z=this.gl;Z.bindFramebuffer(Z.FRAMEBUFFER,null),Z.enable(Z.SCISSOR_TEST),B.scale.on(v.RESIZE,this.onResize,this),this.resize(W,Y)},createTemporaryTextures:function(){for(var B=this.gl,G=0;G0&&W>0;if(Z&&V){var H=Z[0],N=Z[1],U=Z[2],X=Z[3];V=H!==B||N!==G||U!==z||X!==W}V&&(this.flush(),K.scissor(B,Y-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],Y=G[2],K=G[3];Y>0&&K>0&&B.scissor(z,this.drawingBufferHeight-W-K,Y,K)}},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!==r.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,Y){return B===this.currentFramebuffer?this:(this.fboStack.push(B),this.setFramebuffer(B,G,z,W,Y))},setFramebuffer:function(B,G,z,W,Y){if(G===void 0&&(G=!1),z===void 0&&(z=!0),W===void 0&&(W=null),Y===void 0&&(Y=!1),B===this.currentFramebuffer)return this;var K=this.gl,Z=this.width,V=this.height;return B&&B.renderTexture&&z?(Z=B.renderTexture.width,V=B.renderTexture.height):this.flush(),B?K.bindFramebuffer(K.FRAMEBUFFER,B.webGLFramebuffer):K.bindFramebuffer(K.FRAMEBUFFER,null),z&&K.viewport(0,0,Z,V),W&&K.framebufferTexture2D(K.FRAMEBUFFER,K.COLOR_ATTACHMENT0,K.TEXTURE_2D,W.webGLTexture,0),Y&&(K.clearColor(0,0,0,0),K.clear(K.COLOR_BUFFER_BIT)),G&&(B?(this.drawingBufferHeight=V,this.pushScissor(0,0,Z,V)):(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,Y){Y===void 0&&(Y=!1);var K=this.gl,Z=K.NEAREST,V=K.NEAREST,H=K.CLAMP_TO_EDGE,N=null;G=B?B.width:G,z=B?B.height:z;var U=l(G,z);if(U&&!Y&&(H=K.REPEAT),W===r.ScaleModes.LINEAR&&this.config.antialias){var X=B&&B.compressed,$=!X&&U||X&&B.mipmaps.length>1;Z=this.mipmapFilter&&$?this.mipmapFilter:K.LINEAR,V=K.LINEAR}return!B&&typeof G=="number"&&typeof z=="number"?N=this.createTexture2D(0,Z,V,H,H,K.RGBA,null,G,z):N=this.createTexture2D(0,Z,V,H,H,K.RGBA,B),N},createTexture2D:function(B,G,z,W,Y,K,Z,V,H,N,U,X){typeof V!="number"&&(V=Z?Z.width:1),typeof H!="number"&&(H=Z?Z.height:1);var $=new A(this.gl,B,G,z,W,Y,K,Z,V,H,N,U,X);return this.glTextureWrappers.push($),$},createFramebuffer:function(B,G,z,W){this.currentFramebuffer=null;var Y=new L(this.gl,B,G,z,W);return this.glFramebufferWrappers.push(Y),Y},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,Y=this.getCurrentStencilMask();Y?(W.enable(W.STENCIL_TEST),Y.mask.applyStencil(this,Y.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 P(this.gl,B,G);return this.glProgramWrappers.push(z),z},createVertexBuffer:function(B,G){var z=this.gl,W=new S(z,B,z.ARRAY_BUFFER,G);return this.glBufferWrappers.push(W),W},createAttribLocation:function(B,G){var z=new F(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 S(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,Y=B.height,K=B.backgroundColor;if(B.emit(o.PRE_RENDER,B),this.pipelines.preBatchCamera(B),this.pushScissor(G,z,W,Y),B.mask&&(this.currentCameraMask.mask=B.mask,this.currentCameraMask.camera=B._maskCamera,B.mask.preRenderWebGL(this,B,B._maskCamera)),K.alphaGL>0){var Z=this.pipelines.setMulti();Z.drawFillRect(G,z,W,Y,T.getTintFromFloats(K.blueGL,K.greenGL,K.redGL,1),K.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,T.getTintFromFloats),z.postRenderWebGL(W,T.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 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(n.PRE_RENDER)}},render:function(B,G,z){if(!this.contextLost){var W=G.length;if(this.emit(n.RENDER,B,z),this.preRenderCamera(z),W===0){this.setBlendMode(r.BlendModes.NORMAL),this.postRenderCamera(z);return}this.currentType="";for(var Y=this.currentMask,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),p=t(95428),o=t(95540),s=t(14500),r=new a({initialize:function(n,l,i,h,u){this.pipeline=n,this.name=l,this.renderer=n.renderer,this.gl=this.renderer.gl,this.fragSrc=h,this.vertSrc=i,this.program=this.renderer.createProgram(i,h),this.attributes,this.vertexComponentCount=0,this.vertexSize=0,this.uniforms={},this.createAttributes(u),this.createUniforms()},createAttributes:function(e){var n=0,l=0,i=[];this.vertexComponentCount=0;for(var h=0;h=0?(n.enableVertexAttribArray(L.webGLAttribLocation),n.vertexAttribPointer(L.webGLAttribLocation,m,T,A,i,C),v.enabled=!0,v.location=L):L.webGLAttribLocation!==-1&&n.disableVertexAttribArray(L.webGLAttribLocation)}else S?n.vertexAttribPointer(P.webGLAttribLocation,m,T,A,i,C):!S&&P!==-1&&P.webGLAttribLocation>-1&&(n.disableVertexAttribArray(P.webGLAttribLocation),v.location=-1)}return this},createUniforms:function(){var e=this.gl,n=this.program,l=this.uniforms,i,h,u,c=e.getProgramParameter(n.webGLProgram,e.ACTIVE_UNIFORMS);for(i=0;i0&&(h=h.substr(0,m),l.hasOwnProperty(h)||(u=this.renderer.createUniformLocation(n,h),u!==null&&(l[h]={name:h,location:u,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 n in this.uniforms){var l=this.uniforms[n];l.setter&&l.setter.call(e,l.location.webGLUniformLocation,l.value1,l.value2,l.value3,l.value4)}},hasUniform:function(e){return this.uniforms.hasOwnProperty(e)},resetUniform:function(e){var n=this.uniforms[e];return n&&(n.value1=null,n.value2=null,n.value3=null,n.value4=null),this},setUniform1:function(e,n,l,i){var h=this.uniforms[n];return h?((i||h.value1!==l)&&(h.setter||(h.setter=e),h.value1=l,this.renderer.setProgram(this.program),e.call(this.gl,h.location.webGLUniformLocation,l),this.pipeline.currentShader=this),this):this},setUniform2:function(e,n,l,i,h){var u=this.uniforms[n];return u?((h||u.value1!==l||u.value2!==i)&&(u.setter||(u.setter=e),u.value1=l,u.value2=i,this.renderer.setProgram(this.program),e.call(this.gl,u.location.webGLUniformLocation,l,i),this.pipeline.currentShader=this),this):this},setUniform3:function(e,n,l,i,h,u){var c=this.uniforms[n];return c?((u||c.value1!==l||c.value2!==i||c.value3!==h)&&(c.setter||(c.setter=e),c.value1=l,c.value2=i,c.value3=h,this.renderer.setProgram(this.program),e.call(this.gl,c.location.webGLUniformLocation,l,i,h),this.pipeline.currentShader=this),this):this},setUniform4:function(e,n,l,i,h,u,c){var v=this.uniforms[n];return v?((c||v.value1!==l||v.value2!==i||v.value3!==h||v.value4!==u)&&(v.setter||(v.setter=e),v.value1=l,v.value2=i,v.value3=h,v.value4=u,this.renderer.setProgram(this.program),e.call(this.gl,v.location.webGLUniformLocation,l,i,h,u),this.pipeline.currentShader=this),this):this},setBoolean:function(e,n){return this.setUniform1(this.gl.uniform1i,e,Number(n))},set1f:function(e,n){return this.setUniform1(this.gl.uniform1f,e,n)},set2f:function(e,n,l){return this.setUniform2(this.gl.uniform2f,e,n,l)},set3f:function(e,n,l,i){return this.setUniform3(this.gl.uniform3f,e,n,l,i)},set4f:function(e,n,l,i,h){return this.setUniform4(this.gl.uniform4f,e,n,l,i,h)},set1fv:function(e,n){return this.setUniform1(this.gl.uniform1fv,e,n,!0)},set2fv:function(e,n){return this.setUniform1(this.gl.uniform2fv,e,n,!0)},set3fv:function(e,n){return this.setUniform1(this.gl.uniform3fv,e,n,!0)},set4fv:function(e,n){return this.setUniform1(this.gl.uniform4fv,e,n,!0)},set1iv:function(e,n){return this.setUniform1(this.gl.uniform1iv,e,n,!0)},set2iv:function(e,n){return this.setUniform1(this.gl.uniform2iv,e,n,!0)},set3iv:function(e,n){return this.setUniform1(this.gl.uniform3iv,e,n,!0)},set4iv:function(e,n){return this.setUniform1(this.gl.uniform4iv,e,n,!0)},set1i:function(e,n){return this.setUniform1(this.gl.uniform1i,e,n)},set2i:function(e,n,l){return this.setUniform2(this.gl.uniform2i,e,n,l)},set3i:function(e,n,l,i){return this.setUniform3(this.gl.uniform3i,e,n,l,i)},set4i:function(e,n,l,i,h){return this.setUniform4(this.gl.uniform4i,e,n,l,i,h)},setMatrix2fv:function(e,n,l){return this.setUniform2(this.gl.uniformMatrix2fv,e,n,l,!0)},setMatrix3fv:function(e,n,l){return this.setUniform2(this.gl.uniformMatrix3fv,e,n,l,!0)},setMatrix4fv:function(e,n,l){return this.setUniform2(this.gl.uniformMatrix4fv,e,n,l,!0)},createProgram:function(e,n){return e===void 0&&(e=this.vertSrc),n===void 0&&(n=this.fragSrc),this.program&&this.renderer.deleteProgram(this.program),this.vertSrc=e,this.fragSrc=n,this.program=this.renderer.createProgram(e,n),this.createUniforms(),this.rebind()},destroy:function(){var e=this.renderer;p(this.uniforms,function(n){e.deleteUniformLocation(n.location)}),this.uniforms=null,p(this.attributes,function(n){e.deleteAttribLocation(n.location)}),this.attributes=null,e.deleteProgram(this.program),this.pipeline=null,this.renderer=null,this.gl=null,this.program=null}});d.exports=r},14500:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x={BYTE:{enum:5120,size:1},UNSIGNED_BYTE:{enum:5121,size:1},SHORT:{enum:5122,size:2},UNSIGNED_SHORT:{enum:5123,size:2},INT:{enum:5124,size:4},UNSIGNED_INT:{enum:5125,size:4},FLOAT:{enum:5126,size:4}};d.exports=x},4159:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(14500),p=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=p(!1,o,a),d.exports=o},31302:(d,x,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),p=t(95540),o=t(78908),s=t(85191),r=t(14500),e=t(29100),n=new a({Extends:e,initialize:function(i){i.fragShader=p(i,"fragShader",o),i.vertShader=p(i,"vertShader",s),i.batchSize=p(i,"batchSize",1),i.vertices=p(i,"vertices",[-1,1,-1,-7,7,1]),i.attributes=p(i,"attributes",[{name:"inPosition",size:2,type:r.FLOAT}]),e.call(this,i)},boot:function(){e.prototype.boot.call(this),this.set1i("uMainSampler",0),this.set1i("uMaskSampler",1)},resize:function(l,i){e.prototype.resize.call(this,l,i),this.set2f("uResolution",l,i)},beginMask:function(l,i,h){this.renderer.beginBitmapMask(l,h)},endMask:function(l,i,h){var u=this.gl,c=this.renderer,v=l.bitmapMask;v&&u&&(c.drawBitmapMask(v,i,this),h&&this.set2f("uResolution",h.width,h.height),this.set1i("uInvertMaskAlpha",l.invertAlpha),u.drawArrays(this.topology,0,3),h&&this.set2f("uResolution",this.width,this.height),u.bindTexture(u.TEXTURE_2D,null))}});d.exports=n},92651:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(58918),o=t(14811),s=t(95540),r=t(43558),e=t(89350),n=t(70554),l=new a({Extends:r,initialize:function(h){h.shaders=[n.setGlowQuality(e.FXGlowFrag,h.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],r.call(this,h);var u=this.game;this.glow=new p.Glow(u),this.shadow=new p.Shadow(u),this.pixelate=new p.Pixelate(u),this.vignette=new p.Vignette(u),this.shine=new p.Shine(u),this.gradient=new p.Gradient(u),this.circle=new p.Circle(u),this.barrel=new p.Barrel(u),this.wipe=new p.Wipe(u),this.bokeh=new p.Bokeh(u);var c=[];c[o.GLOW]=this.onGlow,c[o.SHADOW]=this.onShadow,c[o.PIXELATE]=this.onPixelate,c[o.VIGNETTE]=this.onVignette,c[o.SHINE]=this.onShine,c[o.BLUR]=this.onBlur,c[o.GRADIENT]=this.onGradient,c[o.BLOOM]=this.onBloom,c[o.COLOR_MATRIX]=this.onColorMatrix,c[o.CIRCLE]=this.onCircle,c[o.BARREL]=this.onBarrel,c[o.DISPLACEMENT]=this.onDisplacement,c[o.WIPE]=this.onWipe,c[o.BOKEH]=this.onBokeh,this.fxHandlers=c,this.source,this.target,this.swap},onDraw:function(i,h,u){this.source=i,this.target=h,this.swap=u;var c=i.width,v=i.height,m=this.tempSprite,T=this.fxHandlers;if(m&&m.preFX)for(var C=m.preFX.list,S=0;S{/** + * @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),p=t(95540),o=t(31063),s=t(57516),r=t(61340),e=t(26099),n=t(29100),l=new a({Extends:s,initialize:function(h){var u=p(h,"fragShader",o);h.fragShader=u.replace("%LIGHT_COUNT%",h.game.renderer.config.maxLights),s.call(this,h),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 r,this._tempMatrix2=new r},boot:function(){n.prototype.boot.call(this)},onRender:function(i,h){var u=i.sys.lights;if(this.lightsActive=!1,!(!u||!u.active)){var c=u.getLights(h),v=c.length;this.lightsActive=!0;var m,T=this.renderer,C=T.height,S=h.matrix,P=this.tempVec2;for(this.set1i("uMainSampler",0),this.set1i("uNormSampler",1),this.set2f("uResolution",this.width/2,this.height/2),this.set4f("uCamera",h.x,h.y,h.rotation,h.zoom),this.set3f("uAmbientLightColor",u.ambientColor.r,u.ambientColor.g,u.ambientColor.b),this.set1i("uLightCount",v),m=0;m0&&this.flush();var h=this.inverseRotationMatrix;if(i){var u=-i,c=Math.cos(u),v=Math.sin(u);h[1]=v,h[3]=-v,h[0]=h[4]=c}else h[0]=h[4]=1,h[1]=h[3]=0;this.setMatrix3fv("uInverseRotationMatrix",!1,h),this.currentNormalMapRotation=i}},setTexture2D:function(i,h){var u=this.renderer;i===void 0&&(i=u.whiteTexture);var c=this.getNormalMap(h);this.isNewNormalMap(i,c)&&(this.flush(),this.createBatch(i),this.addTextureToBatch(c),this.currentNormalMap=c);var v=0;if(h&&h.parentContainer){var m=h.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2);v=m.rotationNormalized}else h&&(v=h.rotation);return this.setNormalMapRotation(v),0},setGameObject:function(i,h){h===void 0&&(h=i.frame);var u=h.glTexture,c=this.getNormalMap(i);if(this.isNewNormalMap(u,c)&&(this.flush(),this.createBatch(u),this.addTextureToBatch(c),this.currentNormalMap=c),i.parentContainer){var v=i.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2);this.setNormalMapRotation(v.rotationNormalized)}else this.setNormalMapRotation(i.rotation);return 0},isNewNormalMap:function(i,h){return this.currentTexture!==i||this.currentNormalMap!==h},getNormalMap:function(i){var h;if(i)i.displayTexture?h=i.displayTexture.dataSource[i.displayFrame.sourceIndex]:i.texture?h=i.texture.dataSource[i.frame.sourceIndex]:i.tileset&&(Array.isArray(i.tileset)?h=i.tileset[0].image.dataSource[0]:h=i.tileset.image.dataSource[0]);else return this.renderer.normalTexture;return h?h.glTexture:this.renderer.normalTexture},batchSprite:function(i,h,u){this.lightsActive&&s.prototype.batchSprite.call(this,i,h,u)},batchTexture:function(i,h,u,c,v,m,T,C,S,P,A,L,F,I,D,B,G,z,W,Y,K,Z,V,H,N,U,X,$,k,Q,J,et){this.lightsActive&&s.prototype.batchTexture.call(this,i,h,u,c,v,m,T,C,S,P,A,L,F,I,D,B,G,z,W,Y,K,Z,V,H,N,U,X,$,k,Q,J,et)},batchTextureFrame:function(i,h,u,c,v,m,T){this.lightsActive&&s.prototype.batchTextureFrame.call(this,i,h,u,c,v,m,T)}});d.exports=l},56527:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(95540),o=t(57516),s=t(45561),r=t(60722),e=t(14500),n=t(29100),l=new a({Extends:o,initialize:function(h){h.fragShader=p(h,"fragShader",s),h.vertShader=p(h,"vertShader",r),h.attributes=p(h,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:e.UNSIGNED_BYTE,normalized:!0}]),h.forceZero=!0,h.resizeUniform="uResolution",o.call(this,h)},boot:function(){n.prototype.boot.call(this);var i=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",i.width,i.height),this.set1i("uRoundPixels",i.config.roundPixels)}});d.exports=l},57516:(d,x,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),p=t(94811),o=t(95540),s=t(98840),r=t(44667),e=t(61340),n=t(70554),l=t(14500),i=t(29100),h=new a({Extends:i,initialize:function(c){var v=c.game.renderer,m=o(c,"fragShader",s);c.fragShader=n.parseFragmentShaderMaxTextures(m,v.maxTextures),c.vertShader=o(c,"vertShader",r),c.attributes=o(c,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:l.UNSIGNED_BYTE,normalized:!0}]),c.resizeUniform="uResolution",i.call(this,c),this._tempMatrix1=new e,this._tempMatrix2=new e,this._tempMatrix3=new e,this.calcMatrix=new e,this.tempTriangle=[{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0}],this.strokeTint={TL:0,TR:0,BL:0,BR:0},this.fillTint={TL:0,TR:0,BL:0,BR:0},this.currentFrame={u0:0,v0:0,u1:1,v1:1},this.firstQuad=[0,0,0,0,0],this.prevQuad=[0,0,0,0,0],this.polygonCache=[]},boot:function(){i.prototype.boot.call(this);var u=this.renderer;this.set1iv("uMainSampler",u.textureIndexes),this.set2f("uResolution",u.width,u.height),this.set1i("uRoundPixels",u.config.roundPixels)},batchSprite:function(u,c,v){this.manager.set(this,u);var m=this._tempMatrix1,T=this._tempMatrix2,C=this._tempMatrix3,S=u.frame,P=S.glTexture,A=S.u0,L=S.v0,F=S.u1,I=S.v1,D=S.x,B=S.y,G=S.cutWidth,z=S.cutHeight,W=S.customPivot,Y=u.displayOriginX,K=u.displayOriginY,Z=-Y+D,V=-K+B;if(u.isCropped){var H=u._crop;(H.flipX!==u.flipX||H.flipY!==u.flipY)&&S.updateCropUVs(H,u.flipX,u.flipY),A=H.u0,L=H.v0,F=H.u1,I=H.v1,G=H.width,z=H.height,D=H.x,B=H.y,Z=-Y+D,V=-K+B}var N=1,U=1;u.flipX&&(W||(Z+=-S.realWidth+Y*2),N=-1),u.flipY&&(W||(V+=-S.realHeight+K*2),U=-1);var X=u.x,$=u.y;T.applyITRS(X,$,u.rotation,u.scaleX*N,u.scaleY*U),m.copyFrom(c.matrix),v?(m.multiplyWithOffset(v,-c.scrollX*u.scrollFactorX,-c.scrollY*u.scrollFactorY),T.e=X,T.f=$):(T.e-=c.scrollX*u.scrollFactorX,T.f-=c.scrollY*u.scrollFactorY),m.multiply(T,C);var k=C.setQuad(Z,V,Z+G,V+z),Q=n.getTintAppendFloatAlpha,J=c.alpha,et=Q(u.tintTopLeft,J*u._alphaTL),nt=Q(u.tintTopRight,J*u._alphaTR),st=Q(u.tintBottomLeft,J*u._alphaBL),ot=Q(u.tintBottomRight,J*u._alphaBR);this.shouldFlush(6)&&this.flush();var ut=this.setGameObject(u,S);this.manager.preBatch(u),this.currentShader.set1i("uRoundPixels",c.roundPixels),this.batchQuad(u,k[0],k[1],k[2],k[3],k[4],k[5],k[6],k[7],A,L,F,I,et,nt,st,ot,u.tintFill,P,ut),this.manager.postBatch(u)},batchTexture:function(u,c,v,m,T,C,S,P,A,L,F,I,D,B,G,z,W,Y,K,Z,V,H,N,U,X,$,k,Q,J,et,nt,st,ot){ot===void 0&&(ot=!1),this.manager.set(this,u);var ut=this._tempMatrix1,at=this._tempMatrix2,ct=this._tempMatrix3,Et=Y/v+k,St=K/m+Q,Ct=(Y+Z)/v+k,dt=(K+V)/m+Q,Tt=S,vt=P,wt=-z,Bt=-W;if(u.isCropped){var jt=u._crop,Ut=jt.width,Yt=jt.height;Tt=Ut,vt=Yt,S=Ut,P=Yt,Y=jt.x,K=jt.y;var Nt=Y,ae=K;I&&(Nt=Z-jt.x-Ut),D&&(ae=V-jt.y-Yt),Et=Nt/v+k,St=ae/m+Q,Ct=(Nt+Ut)/v+k,dt=(ae+Yt)/m+Q,wt=-z+Y,Bt=-W+K}D=D^(!nt&&c.isRenderTexture?1:0),I&&(Tt*=-1,wt+=S),D&&(vt*=-1,Bt+=P),at.applyITRS(T,C,F,A,L),ut.copyFrom(J.matrix),et?(ut.multiplyWithOffset(et,-J.scrollX*B,-J.scrollY*G),at.e=T,at.f=C):(at.e-=J.scrollX*B,at.f-=J.scrollY*G),ut.multiply(at,ct);var Qt=ct.setQuad(wt,Bt,wt+Tt,Bt+vt);st==null&&(st=this.setTexture2D(c)),u&&!ot&&this.manager.preBatch(u),this.currentShader.set1i("uRoundPixels",J.roundPixels),this.batchQuad(u,Qt[0],Qt[1],Qt[2],Qt[3],Qt[4],Qt[5],Qt[6],Qt[7],Et,St,Ct,dt,H,N,U,X,$,c,st),u&&!ot&&this.manager.postBatch(u)},batchTextureFrame:function(u,c,v,m,T,C,S){this.manager.set(this);var P=this._tempMatrix1.copyFrom(C),A=this._tempMatrix2;S?P.multiply(S,A):A=P;var L=A.setQuad(c,v,c+u.width,v+u.height),F=this.setTexture2D(u.source.glTexture);m=n.getTintAppendFloatAlpha(m,T),this.batchQuad(null,L[0],L[1],L[2],L[3],L[4],L[5],L[6],L[7],u.u0,u.v0,u.u1,u.v1,m,m,m,m,0,u.glTexture,F)},batchFillRect:function(u,c,v,m,T,C){this.renderer.pipelines.set(this);var S=this.calcMatrix;C&&C.multiply(T,S);var P=S.setQuad(u,c,u+v,c+m),A=this.fillTint;this.batchQuad(null,P[0],P[1],P[2],P[3],P[4],P[5],P[6],P[7],0,0,1,1,A.TL,A.TR,A.BL,A.BR,2)},batchFillTriangle:function(u,c,v,m,T,C,S,P){this.renderer.pipelines.set(this);var A=this.calcMatrix;P&&P.multiply(S,A);var L=A.getX(u,c),F=A.getY(u,c),I=A.getX(v,m),D=A.getY(v,m),B=A.getX(T,C),G=A.getY(T,C),z=this.fillTint;this.currentShader.set1i("uRoundPixels",!1),this.batchTri(null,L,F,I,D,B,G,0,0,1,1,z.TL,z.TR,z.BL,2)},batchStrokeTriangle:function(u,c,v,m,T,C,S,P,A){var L=this.tempTriangle;L[0].x=u,L[0].y=c,L[0].width=S,L[1].x=v,L[1].y=m,L[1].width=S,L[2].x=T,L[2].y=C,L[2].width=S,L[3].x=u,L[3].y=c,L[3].width=S,this.batchStrokePath(L,S,!1,P,A)},batchFillPath:function(u,c,v){this.renderer.pipelines.set(this);var m=this.calcMatrix;v&&v.multiply(c,m);for(var T=u.length,C=this.polygonCache,S,P,A=this.fillTint.TL,L=this.fillTint.TR,F=this.fillTint.BL,I=0;I0&&Tt[4]?this.batchQuad(null,ut,at,et,nt,Tt[0],Tt[1],Tt[2],Tt[3],0,0,1,1,Et,St,Ct,dt,2):(vt[0]=ut,vt[1]=at,vt[2]=et,vt[3]=nt,vt[4]=1),A&&vt[4]?this.batchQuad(null,Q,J,st,ot,vt[0],vt[1],vt[2],vt[3],0,0,1,1,Et,St,Ct,dt,2):(Tt[0]=Q,Tt[1]=J,Tt[2]=st,Tt[3]=ot,Tt[4]=1)}}},destroy:function(){return this._tempMatrix1.destroy(),this._tempMatrix2.destroy(),this._tempMatrix3.destroy(),this._tempMatrix1=null,this._tempMatrix1=null,this._tempMatrix1=null,i.prototype.destroy.call(this),this}});d.exports=h},43439:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(95540),o=t(4127),s=t(89924),r=t(29100),e=new a({Extends:r,initialize:function(l){l.vertShader=p(l,"vertShader",s),l.fragShader=p(l,"fragShader",o),l.attributes=p(l,"attributes",[{name:"inPosition",size:2},{name:"inLightPosition",size:2},{name:"inLightRadius"},{name:"inLightAttenuation"},{name:"inLightColor",size:4}]),r.call(this,l)},onRender:function(n,l){this.set2f("uResolution",this.width,this.height),this.set1f("uCameraZoom",l.zoom)},batchPointLight:function(n,l,i,h,u,c,v,m,T,C,S,P){var A=n.color,L=n.intensity,F=n.radius,I=n.attenuation,D=A.r*L,B=A.g*L,G=A.b*L,z=l.alpha*n.alpha;this.shouldFlush(6)&&this.flush(),this.currentBatch||this.setTexture2D(),this.batchLightVert(i,h,S,P,F,I,D,B,G,z),this.batchLightVert(u,c,S,P,F,I,D,B,G,z),this.batchLightVert(v,m,S,P,F,I,D,B,G,z),this.batchLightVert(i,h,S,P,F,I,D,B,G,z),this.batchLightVert(v,m,S,P,F,I,D,B,G,z),this.batchLightVert(T,C,S,P,F,I,D,B,G,z),this.currentBatch.count=this.vertexCount-this.currentBatch.start},batchLightVert:function(n,l,i,h,u,c,v,m,T,C){var S=this.vertexViewF32,P=this.vertexCount*this.currentShader.vertexComponentCount-1;S[++P]=n,S[++P]=l,S[++P]=i,S[++P]=h,S[++P]=u,S[++P]=c,S[++P]=v,S[++P]=m,S[++P]=T,S[++P]=C,this.vertexCount++}});d.exports=e},84057:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(89422),o=t(95540),s=t(27681),r=t(49627),e=t(29100),n=new a({Extends:e,initialize:function(i){i.renderTarget=o(i,"renderTarget",1),i.fragShader=o(i,"fragShader",s),i.vertShader=o(i,"vertShader",r),i.attributes=o(i,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),i.batchSize=1,i.vertices=[-1,-1,0,0,-1,1,0,1,1,1,1,1,-1,-1,0,0,1,1,1,1,1,-1,1,0],e.call(this,i),this.isPostFX=!0,this.gameObject,this.controller,this.colorMatrix=new p,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2,this.renderer.isBooted&&(this.manager=this.renderer.pipelines)},bootFX:function(){e.prototype.boot.call(this);var l=this.manager.UTILITY_PIPELINE;this.fullFrame1=l.fullFrame1,this.fullFrame2=l.fullFrame2,this.halfFrame1=l.halfFrame1,this.halfFrame2=l.halfFrame2;var i=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",i.width,i.height),this.set1i("uRoundPixels",i.config.roundPixels);for(var h=this.renderTargets,u=0;u{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(10312),p=t(67502),o=t(83419),s=t(96293),r=t(95540),e=t(57516),n=t(27681),l=t(87841),i=t(32302),h=t(45561),u=t(60722),c=t(29100),v=new o({Extends:e,initialize:function(T){var C=r(T,"fragShader",n),S=r(T,"vertShader",u),P=r(T,"drawShader",n),A=[{name:"DrawSprite",fragShader:h,vertShader:u},{name:"CopySprite",fragShader:C,vertShader:S},{name:"DrawGame",fragShader:P,vertShader:u},{name:"ColorMatrix",fragShader:s}],L=r(T,"shaders",[]);T.shaders=A.concat(L),T.vertShader||(T.vertShader=S),T.batchSize=1,e.call(this,T),this.isPreFX=!0,this.customMainSampler=null,this.drawSpriteShader,this.copyShader,this.gameShader,this.colorMatrixShader,this.quadVertexData,this.quadVertexBuffer,this.quadVertexViewF32,this.spriteBounds=new l,this.targetBounds=new l,this.fsTarget,this.tempSprite,this.renderer.isBooted&&(this.manager=this.renderer.pipelines,this.boot())},boot:function(){c.prototype.boot.call(this);var m=this.shaders,T=this.renderer;this.drawSpriteShader=m[0],this.copyShader=m[1],this.gameShader=m[2],this.colorMatrixShader=m[3],this.fsTarget=new i(T,T.width,T.height,1,0,!0,!0),this.renderTargets=this.manager.renderTargets.concat(this.fsTarget);var C=new ArrayBuffer(168);this.quadVertexData=C,this.quadVertexViewF32=new Float32Array(C),this.quadVertexBuffer=T.createVertexBuffer(C,this.gl.STATIC_DRAW),this.onResize(T.width,T.height),this.currentShader=this.copyShader,this.set2f("uResolution",T.width,T.height),this.set1i("uRoundPixels",T.config.roundPixels)},onResize:function(m,T){var C=this.quadVertexViewF32;C[1]=T,C[22]=T,C[14]=m,C[28]=m,C[35]=m,C[36]=T},batchQuad:function(m,T,C,S,P,A,L,F,I,D,B,G,z,W,Y,K,Z,V,H){var N=Math.min(T,S,A,F),U=Math.min(C,P,L,I),X=Math.max(T,S,A,F),$=Math.max(C,P,L,I),k=X-N,Q=$-U,J=this.spriteBounds.setTo(N,U,k,Q),et=m?m.preFX.padding:0,nt=k+et*2,st=Q+et*2,ot=Math.abs(Math.max(nt,st)),ut=this.manager.getRenderTarget(ot),at=this.targetBounds.setTo(0,0,ut.width,ut.height);p(at,J.centerX,J.centerY),this.tempSprite=m;var ct=this.gl,Et=this.renderer;Et.clearStencilMask(),this.setShader(this.drawSpriteShader),this.set1i("uMainSampler",0),this.set2f("uResolution",Et.width,Et.height),this.set1i("uRoundPixels",Et.config.roundPixels),this.flipProjectionMatrix(!0),m&&(this.onDrawSprite(m,ut),m.preFX.onFX(this));var St=this.fsTarget;return this.flush(),ct.viewport(0,0,Et.width,Et.height),ct.bindFramebuffer(ct.FRAMEBUFFER,St.framebuffer.webGLFramebuffer),ct.framebufferTexture2D(ct.FRAMEBUFFER,ct.COLOR_ATTACHMENT0,ct.TEXTURE_2D,St.texture.webGLTexture,0),ct.clearColor(0,0,0,0),ct.clear(ct.COLOR_BUFFER_BIT),this.setTexture2D(H),this.batchVert(T,C,D,B,0,V,W),this.batchVert(S,P,D,z,0,V,K),this.batchVert(A,L,G,z,0,V,Z),this.batchVert(T,C,D,B,0,V,W),this.batchVert(A,L,G,z,0,V,Z),this.batchVert(F,I,G,B,0,V,Y),this.flush(),this.flipProjectionMatrix(!1),ct.activeTexture(ct.TEXTURE0),ct.bindTexture(ct.TEXTURE_2D,ut.texture.webGLTexture),ct.copyTexSubImage2D(ct.TEXTURE_2D,0,0,0,at.x,at.y,at.width,at.height),ct.bindFramebuffer(ct.FRAMEBUFFER,null),ct.bindTexture(ct.TEXTURE_2D,null),this.onBatch(m),this.currentShader=this.copyShader,this.onDraw(ut,this.manager.getSwapRenderTarget(),this.manager.getAltSwapRenderTarget()),!0},onDrawSprite:function(){},onCopySprite:function(){},copySprite:function(m,T,C,S,P,A,L){C===void 0&&(C=!0),S===void 0&&(S=!0),P===void 0&&(P=!1),L===void 0&&(L=this.copyShader);var F=this.gl,I=this.tempSprite;A&&(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(m,T,I),A&&(this.set1fv("uColorMatrix",A.getData()),this.set1f("uAlpha",A.alpha)),F.activeTexture(F.TEXTURE0),F.bindTexture(F.TEXTURE_2D,m.texture.webGLTexture),m.height>T.height)F.viewport(0,0,m.width,m.height),this.setTargetUVs(m,T);else{var G=T.height-m.height;F.viewport(0,G,m.width,m.height),this.resetUVs()}if(F.bindFramebuffer(F.FRAMEBUFFER,T.framebuffer.webGLFramebuffer),F.framebufferTexture2D(F.FRAMEBUFFER,F.COLOR_ATTACHMENT0,F.TEXTURE_2D,T.texture.webGLTexture,0),C&&(F.clearColor(0,0,0,+!S),F.clear(F.COLOR_BUFFER_BIT)),P){var z=this.renderer.currentBlendMode;this.renderer.setBlendMode(a.ERASE)}F.bufferData(F.ARRAY_BUFFER,this.quadVertexData,F.STATIC_DRAW),F.drawArrays(F.TRIANGLES,0,6),P&&this.renderer.setBlendMode(z),F.bindFramebuffer(F.FRAMEBUFFER,null)},copy:function(m,T){var C=this.gl;this.set1i("uMainSampler",0),C.activeTexture(C.TEXTURE0),C.bindTexture(C.TEXTURE_2D,m.texture.webGLTexture),C.viewport(0,0,m.width,m.height),this.setUVs(0,0,0,1,1,1,1,0),C.bindFramebuffer(C.FRAMEBUFFER,T.framebuffer.webGLFramebuffer),C.framebufferTexture2D(C.FRAMEBUFFER,C.COLOR_ATTACHMENT0,C.TEXTURE_2D,T.texture.webGLTexture,0),C.clearColor(0,0,0,0),C.clear(C.COLOR_BUFFER_BIT),C.bufferData(C.ARRAY_BUFFER,this.quadVertexData,C.STATIC_DRAW),C.drawArrays(C.TRIANGLES,0,6),C.bindFramebuffer(C.FRAMEBUFFER,null)},blendFrames:function(m,T,C,S,P){this.manager.blendFrames(m,T,C,S,P)},blendFramesAdditive:function(m,T,C,S,P){this.manager.blendFramesAdditive(m,T,C,S,P)},drawToGame:function(m){this.currentShader=null,this.setShader(this.copyShader),this.bindAndDraw(m)},copyToGame:function(m){this.currentShader=null,this.setShader(this.gameShader),this.bindAndDraw(m)},bindAndDraw:function(m){var T=this.gl,C=this.renderer;this.set1i("uMainSampler",0),this.customMainSampler?this.setTexture2D(this.customMainSampler):this.setTexture2D(m.texture);var S=this._tempMatrix1.loadIdentity(),P=this.targetBounds.x,A=this.targetBounds.y,L=P+m.width,F=A+m.height,I=S.getX(P,A),D=S.getX(P,F),B=S.getX(L,F),G=S.getX(L,A),z=S.getY(P,A),W=S.getY(P,F),Y=S.getY(L,F),K=S.getY(L,A),Z=16777215;this.batchVert(I,z,0,0,0,0,Z),this.batchVert(D,W,0,1,0,0,Z),this.batchVert(B,Y,1,1,0,0,Z),this.batchVert(I,z,0,0,0,0,Z),this.batchVert(B,Y,1,1,0,0,Z),this.batchVert(G,K,1,0,0,0,Z),C.restoreFramebuffer(!1,!0),C.currentFramebuffer||T.viewport(0,0,C.width,C.height),C.restoreStencilMask(),this.flush(),this.tempSprite=null},onDraw:function(m){this.drawToGame(m)},setUVs:function(m,T,C,S,P,A,L,F){var I=this.quadVertexViewF32;I[2]=m,I[3]=T,I[9]=C,I[10]=S,I[16]=P,I[17]=A,I[23]=m,I[24]=T,I[30]=P,I[31]=A,I[37]=L,I[38]=F},setTargetUVs:function(m,T){var C=T.height/m.height;C>.5?C=.5-(C-.5):C=.5+(.5-C),this.setUVs(0,C,0,1+C,1,1+C,1,C)},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}});d.exports=v},81041:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(95540),o=t(57516),s=new a({Extends:o,initialize:function(e){e.topology=5,e.batchSize=p(e,"batchSize",256),o.call(this,e)}});d.exports=s},12385:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(95540),o=t(57516),s=t(45561),r=t(60722),e=t(29100),n=new a({Extends:o,initialize:function(i){i.fragShader=p(i,"fragShader",s),i.vertShader=p(i,"vertShader",r),i.forceZero=!0,o.call(this,i)},boot:function(){e.prototype.boot.call(this);var l=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",l.width,l.height),this.set1i("uRoundPixels",l.config.roundPixels)}});d.exports=n},7589:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(35407),p=t(10312),o=t(83419),s=t(89422),r=t(96293),e=t(36682),n=t(95540),l=t(48247),i=t(49627),h=t(29100),u=new o({Extends:h,initialize:function(v){v.renderTarget=n(v,"renderTarget",[{scale:1,autoResize:!0},{scale:1,autoResize:!0},{scale:.5,autoResize:!0},{scale:.5,autoResize:!0}]),v.vertShader=n(v,"vertShader",i),v.shaders=n(v,"shaders",[{name:"Copy",fragShader:e},{name:"AddBlend",fragShader:a},{name:"LinearBlend",fragShader:l},{name:"ColorMatrix",fragShader:r}]),v.attributes=n(v,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),v.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],v.batchSize=1,h.call(this,v),this.colorMatrix=new s,this.copyShader,this.addShader,this.linearShader,this.colorMatrixShader,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2},boot:function(){h.prototype.boot.call(this);var c=this.shaders,v=this.renderTargets;this.copyShader=c[0],this.addShader=c[1],this.linearShader=c[2],this.colorMatrixShader=c[3],this.fullFrame1=v[0],this.fullFrame2=v[1],this.halfFrame1=v[2],this.halfFrame2=v[3]},copyFrame:function(c,v,m,T,C){m===void 0&&(m=1),T===void 0&&(T=!0),C===void 0&&(C=!0);var S=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",m),S.activeTexture(S.TEXTURE0),S.bindTexture(S.TEXTURE_2D,c.texture.webGLTexture),v?(S.viewport(0,0,v.width,v.height),S.bindFramebuffer(S.FRAMEBUFFER,v.framebuffer.webGLFramebuffer),S.framebufferTexture2D(S.FRAMEBUFFER,S.COLOR_ATTACHMENT0,S.TEXTURE_2D,v.texture.webGLTexture,0)):S.viewport(0,0,c.width,c.height),T&&(C?S.clearColor(0,0,0,0):S.clearColor(0,0,0,1),S.clear(S.COLOR_BUFFER_BIT)),S.bufferData(S.ARRAY_BUFFER,this.vertexData,S.STATIC_DRAW),S.drawArrays(S.TRIANGLES,0,6),S.bindFramebuffer(S.FRAMEBUFFER,null),S.bindTexture(S.TEXTURE_2D,null)},blitFrame:function(c,v,m,T,C,S,P){m===void 0&&(m=1),T===void 0&&(T=!0),C===void 0&&(C=!0),S===void 0&&(S=!1),P===void 0&&(P=!1);var A=this.gl;if(this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",m),A.activeTexture(A.TEXTURE0),A.bindTexture(A.TEXTURE_2D,c.texture.webGLTexture),c.height>v.height)A.viewport(0,0,c.width,c.height),this.setTargetUVs(c,v);else{var L=v.height-c.height;A.viewport(0,L,c.width,c.height)}if(A.bindFramebuffer(A.FRAMEBUFFER,v.framebuffer.webGLFramebuffer),A.framebufferTexture2D(A.FRAMEBUFFER,A.COLOR_ATTACHMENT0,A.TEXTURE_2D,v.texture.webGLTexture,0),T&&(C?A.clearColor(0,0,0,0):A.clearColor(0,0,0,1),A.clear(A.COLOR_BUFFER_BIT)),S){var F=this.renderer.currentBlendMode;this.renderer.setBlendMode(p.ERASE)}P&&this.flipY(),A.bufferData(A.ARRAY_BUFFER,this.vertexData,A.STATIC_DRAW),A.drawArrays(A.TRIANGLES,0,6),S&&this.renderer.setBlendMode(F),A.bindFramebuffer(A.FRAMEBUFFER,null),A.bindTexture(A.TEXTURE_2D,null),this.resetUVs()},copyFrameRect:function(c,v,m,T,C,S,P,A){P===void 0&&(P=!0),A===void 0&&(A=!0);var L=this.gl;L.bindFramebuffer(L.FRAMEBUFFER,c.framebuffer.webGLFramebuffer),L.framebufferTexture2D(L.FRAMEBUFFER,L.COLOR_ATTACHMENT0,L.TEXTURE_2D,c.texture.webGLTexture,0),P&&(A?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,v.texture.webGLTexture),L.copyTexSubImage2D(L.TEXTURE_2D,0,0,0,m,T,C,S),L.bindFramebuffer(L.FRAMEBUFFER,null),L.bindTexture(L.TEXTURE_2D,null)},copyToGame:function(c){var v=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",1),this.renderer.popFramebuffer(),v.activeTexture(v.TEXTURE0),v.bindTexture(v.TEXTURE_2D,c.texture.webGLTexture),v.bufferData(v.ARRAY_BUFFER,this.vertexData,v.STATIC_DRAW),v.drawArrays(v.TRIANGLES,0,6)},drawFrame:function(c,v,m,T){m===void 0&&(m=!0),T===void 0&&(T=this.colorMatrix);var C=this.gl;this.setShader(this.colorMatrixShader),this.set1i("uMainSampler",0),this.set1fv("uColorMatrix",T.getData()),this.set1f("uAlpha",T.alpha),C.activeTexture(C.TEXTURE0),C.bindTexture(C.TEXTURE_2D,c.texture.webGLTexture),v?(C.viewport(0,0,v.width,v.height),C.bindFramebuffer(C.FRAMEBUFFER,v.framebuffer.webGLFramebuffer),C.framebufferTexture2D(C.FRAMEBUFFER,C.COLOR_ATTACHMENT0,C.TEXTURE_2D,v.texture.webGLTexture,0)):C.viewport(0,0,c.width,c.height),m?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)},blendFrames:function(c,v,m,T,C,S){T===void 0&&(T=1),C===void 0&&(C=!0),S===void 0&&(S=this.linearShader);var P=this.gl;this.setShader(S),this.set1i("uMainSampler1",0),this.set1i("uMainSampler2",1),this.set1f("uStrength",T),P.activeTexture(P.TEXTURE0),P.bindTexture(P.TEXTURE_2D,c.texture.webGLTexture),P.activeTexture(P.TEXTURE1),P.bindTexture(P.TEXTURE_2D,v.texture.webGLTexture),m?(P.bindFramebuffer(P.FRAMEBUFFER,m.framebuffer.webGLFramebuffer),P.framebufferTexture2D(P.FRAMEBUFFER,P.COLOR_ATTACHMENT0,P.TEXTURE_2D,m.texture.webGLTexture,0),P.viewport(0,0,m.width,m.height)):P.viewport(0,0,c.width,c.height),C?P.clearColor(0,0,0,0):P.clearColor(0,0,0,1),P.clear(P.COLOR_BUFFER_BIT),P.bufferData(P.ARRAY_BUFFER,this.vertexData,P.STATIC_DRAW),P.drawArrays(P.TRIANGLES,0,6),P.bindFramebuffer(P.FRAMEBUFFER,null),P.bindTexture(P.TEXTURE_2D,null)},blendFramesAdditive:function(c,v,m,T,C){this.blendFrames(c,v,m,T,C,this.addShader)},clearFrame:function(c,v){v===void 0&&(v=!0);var m=this.gl;m.viewport(0,0,c.width,c.height),m.bindFramebuffer(m.FRAMEBUFFER,c.framebuffer.webGLFramebuffer),v?m.clearColor(0,0,0,0):m.clearColor(0,0,0,1),m.clear(m.COLOR_BUFFER_BIT);var T=this.renderer.currentFramebuffer;m.bindFramebuffer(m.FRAMEBUFFER,T.webGLFramebuffer)},setUVs:function(c,v,m,T,C,S,P,A){var L=this.vertexViewF32;L[2]=c,L[3]=v,L[6]=m,L[7]=T,L[10]=C,L[11]=S,L[14]=c,L[15]=v,L[18]=C,L[19]=S,L[22]=P,L[23]=A},setTargetUVs:function(c,v){var m=v.height/c.height;m>.5?m=.5-(m-.5):m=.5+(.5-m),this.setUVs(0,m,0,1+m,1,1+m,1,m)},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)}});d.exports=u},36060:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x={BITMAPMASK_PIPELINE:"BitmapMaskPipeline",LIGHT_PIPELINE:"Light2D",POINTLIGHT_PIPELINE:"PointLightPipeline",SINGLE_PIPELINE:"SinglePipeline",MULTI_PIPELINE:"MultiPipeline",ROPE_PIPELINE:"RopePipeline",GRAPHICS_PIPELINE:"GraphicsPipeline",POSTFX_PIPELINE:"PostFXPipeline",UTILITY_PIPELINE:"UtilityPipeline",MOBILE_PIPELINE:"MobilePipeline",FX_PIPELINE:"FxPipeline"};d.exports=x},84817:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="pipelineafterflush"},36712:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="pipelinebeforeflush"},40285:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="pipelinebind"},65918:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="pipelineboot"},92852:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="pipelinedestroy"},56072:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="pipelinerebind"},57566:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="pipelineresize"},77085:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.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:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(99155),o=t(84057),s=new a({Extends:o,initialize:function(e){o.call(this,{game:e,fragShader:p}),this.amount=1},onPreRender:function(r,e){r=this.getController(r),this.set1f("amount",r.amount,e)}});d.exports=s},67329:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(24400),o=t(84057),s=new a({Extends:o,initialize:function(e){o.call(this,{game:e,fragShader:p}),this.steps=4,this.offsetX=1,this.offsetY=1,this.blurStrength=1,this.strength=1,this.glcolor=[1,1,1]},onPreRender:function(r){r=this.getController(r),this.set1f("strength",r.blurStrength),this.set3fv("color",r.glcolor)},onDraw:function(r){var e=this.getController(),n=this.fullFrame1,l=this.fullFrame2;this.copyFrame(r,l);for(var i=2/r.width*e.offsetX,h=2/r.height*e.offsetY,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),p=t(41514),o=t(51078),s=t(94328),r=t(84057),e=new a({Extends:r,initialize:function(l){r.call(this,{game:l,shaders:[{name:"Gaussian5",fragShader:p},{name:"Gaussian9",fragShader:o},{name:"Gaussian13",fragShader:s}]}),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(n){var l=this.getController(),i=this.gl,h=this.fullFrame1,u=i.getParameter(i.FRAMEBUFFER_BINDING);this.bind(this.shaders[l.quality]),i.activeTexture(i.TEXTURE0),i.viewport(0,0,n.width,n.height),this.set1i("uMainSampler",0),this.set2f("resolution",n.width,n.height),this.set1f("strength",l.strength),this.set3fv("color",l.glcolor);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),p=t(90610),o=t(84057),s=new a({Extends:o,initialize:function(e){o.call(this,{game:e,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(r,e,n,l){r=this.getController(r),this.set1f("radius",r.radius,e),this.set1f("amount",r.amount,e),this.set1f("contrast",r.contrast,e),this.set1f("strength",r.strength,e),this.set2f("blur",r.blurX,r.blurY,e),this.setBoolean("isTiltShift",r.isTiltShift,e),n&&l&&this.set2f("resolution",n,l,e)},onDraw:function(r){this.set2f("resolution",r.width,r.height),this.bindAndDraw(r)}});d.exports=s},89428:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(91899),o=t(84057),s=new a({Extends:o,initialize:function(e){o.call(this,{game:e,fragShader:p}),this.scale=1,this.feather=.005,this.thickness=8,this.glcolor=[1,.2,.7],this.glcolor2=[1,0,0,.4]},onPreRender:function(r,e,n,l){r=this.getController(r),this.set1f("scale",r.scale,e),this.set1f("feather",r.feather,e),this.set1f("thickness",r.thickness,e),this.set3fv("color",r.glcolor,e),this.set4fv("backgroundColor",r.glcolor2,e),n&&l&&this.set2f("resolution",n,l,e)},onDraw:function(r){this.set2f("resolution",r.width,r.height),this.bindAndDraw(r)}});d.exports=s},88904:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(84057),o=new a({Extends:p,initialize:function(r){p.call(this,{game:r})},onDraw:function(s){var r=this.fullFrame1;this.controller?this.manager.drawFrame(s,r,!0,this.controller):this.drawFrame(s,r),this.copyToGame(r)}});d.exports=o},63563:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(47838),o=t(84057),s=new a({Extends:o,initialize:function(e){o.call(this,{game:e,fragShader:p}),this.x=.005,this.y=.005,this.glTexture},onBoot:function(){this.setTexture("__WHITE")},setTexture:function(r){var e=this.game.textures.getFrame(r);e&&(this.glTexture=e.glTexture)},onDraw:function(r){var e=this.getController(),n=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(r,n),this.copyToGame(n)}});d.exports=s},94045:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(95540),o=t(98656),s=t(84057),r=t(70554),e=new a({Extends:s,initialize:function(l,i){var h=p(i,"quality",.1),u=p(i,"distance",10);s.call(this,{game:l,fragShader:r.setGlowQuality(o,l,h,u)}),this.outerStrength=4,this.innerStrength=0,this.knockout=!1,this.glcolor=[1,1,1,1]},onPreRender:function(n,l,i,h){n=this.getController(n),this.set1f("outerStrength",n.outerStrength,l),this.set1f("innerStrength",n.innerStrength,l),this.set4fv("glowColor",n.glcolor,l),this.setBoolean("knockout",n.knockout,l),i&&h&&this.set2f("resolution",i,h,l)},onDraw:function(n){this.set2f("resolution",n.width,n.height),this.bindAndDraw(n)}});d.exports=e},74088:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(70463),o=t(84057),s=new a({Extends:o,initialize:function(e){o.call(this,{game:e,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(r,e){r=this.getController(r),this.set1f("alpha",r.alpha,e),this.set1i("size",r.size,e),this.set3fv("color1",r.glcolor1,e),this.set3fv("color2",r.glcolor2,e),this.set2f("positionFrom",r.fromX,r.fromY,e),this.set2f("positionTo",r.toX,r.toY,e)}});d.exports=s},99636:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(50831),o=t(84057),s=new a({Extends:o,initialize:function(e){o.call(this,{game:e,fragShader:p}),this.amount=1},onPreRender:function(r,e,n,l){r=this.getController(r),this.set1f("amount",r.amount,e),n&&l&&this.set2f("resolution",n,l,e)},onDraw:function(r){this.set2f("resolution",r.width,r.height),this.bindAndDraw(r)}});d.exports=s},34700:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(92595),o=t(84057),s=new a({Extends:o,initialize:function(e){o.call(this,{game:e,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(r,e){r=this.getController(r);var n=r.samples;this.set1i("samples",n,e),this.set1f("intensity",r.intensity,e),this.set1f("decay",r.decay,e),this.set1f("power",r.power/n,e),this.set2f("lightPosition",r.x,r.y,e),this.set4fv("color",r.glcolor,e)}});d.exports=s},91157:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(72464),o=t(84057),s=new a({Extends:o,initialize:function(e){o.call(this,{game:e,fragShader:p}),this.speed=.5,this.lineWidth=.5,this.gradient=3,this.reveal=!1},onPreRender:function(r,e,n,l){r=this.getController(r),this.setTime("time",e),this.set1f("speed",r.speed,e),this.set1f("lineWidth",r.lineWidth,e),this.set1f("gradient",r.gradient,e),this.setBoolean("reveal",r.reveal,e),n&&l&&this.set2f("resolution",n,l,e)},onDraw:function(r){this.set2f("resolution",r.width,r.height),this.bindAndDraw(r)}});d.exports=s},27797:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(39249),o=t(84057),s=new a({Extends:o,initialize:function(e){o.call(this,{game:e,fragShader:p}),this.x=.5,this.y=.5,this.radius=.5,this.strength=.5},onPreRender:function(r,e){r=this.getController(r),this.set1f("radius",r.radius,e),this.set1f("strength",r.strength,e),this.set2f("position",r.x,r.y,e)}});d.exports=s},67603:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(2878),o=t(84057),s=new a({Extends:o,initialize:function(e){o.call(this,{game:e,fragShader:p}),this.progress=0,this.wipeWidth=.1,this.direction=0,this.axis=0,this.reveal=!1},onPreRender:function(r,e){r=this.getController(r);var n=r.progress,l=r.wipeWidth,i=r.direction,h=r.axis;this.set4f("config",n,l,i,h,e),this.setBoolean("reveal",r.reveal,e)}});d.exports=s},58918:(d,x,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)};d.exports=a},96615:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(36060),p=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=p(!1,o,a),d.exports=o},35407:d=>{d.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:d=>{d.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:d=>{d.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:d=>{d.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:d=>{d.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:d=>{d.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:d=>{d.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:d=>{d.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:d=>{d.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:d=>{d.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:d=>{d.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:d=>{d.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:d=>{d.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:d=>{d.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:d=>{d.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:d=>{d.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:d=>{d.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:d=>{d.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:d=>{d.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:d=>{d.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:d=>{d.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:d=>{d.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:d=>{d.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:d=>{d.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:d=>{d.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:d=>{d.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:d=>{d.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:d=>{d.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:d=>{d.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:d=>{d.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:d=>{d.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:d=>{d.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:d=>{d.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:d=>{d.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:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.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:(d,x,t)=>{/** + * @author Benjamin D. Richards + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=new a({initialize:function(s,r,e){this.webGLAttribLocation=-1,this.gl=s,this.program=r,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}});d.exports=p},26128:(d,x,t)=>{/** + * @author Benjamin D. Richards + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=new a({initialize:function(s,r,e,n){this.webGLBuffer=null,this.gl=s,this.initialDataOrSize=r,this.bufferType=e,this.bufferUsage=n,this.createResource()},createResource:function(){if(this.initialDataOrSize!==null){var o=this.gl;if(!o.isContextLost()){var s=this.bufferType,r=o.createBuffer();this.webGLBuffer=r,o.bindBuffer(s,this.webGLBuffer),o.bufferData(s,this.initialDataOrSize,this.bufferUsage),o.bindBuffer(s,null)}}},destroy:function(){var o=this.gl;o.isContextLost()||o.deleteBuffer(this.webGLBuffer),this.webGLBuffer=null,this.initialDataOrSize=null,this.gl=null}});d.exports=p},84387:(d,x,t)=>{/** + * @author Benjamin D. Richards + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p={36054:"Incomplete Attachment",36055:"Missing Attachment",36057:"Incomplete Dimensions",36061:"Framebuffer Unsupported"},o=new a({initialize:function(r,e,n,l,i){this.webGLFramebuffer=null,this.gl=r,this.width=e,this.height=n,this.renderTexture=l,this.addDepthStencilBuffer=!!i,this.createResource()},createResource:function(){var s=this.gl;if(!s.isContextLost()){var r=this.renderTexture,e=0,n=s.createFramebuffer();if(this.webGLFramebuffer=n,s.bindFramebuffer(s.FRAMEBUFFER,n),r.isRenderTexture=!0,r.isAlphaPremultiplied=!1,s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,r.webGLTexture,0),e=s.checkFramebufferStatus(s.FRAMEBUFFER),e!==s.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer status: "+(p[e]||e));if(this.addDepthStencilBuffer){var l=s.createRenderbuffer();s.bindRenderbuffer(s.RENDERBUFFER,l),s.renderbufferStorage(s.RENDERBUFFER,s.DEPTH_STENCIL,this.width,this.height),s.framebufferRenderbuffer(s.FRAMEBUFFER,s.DEPTH_STENCIL_ATTACHMENT,s.RENDERBUFFER,l)}s.bindFramebuffer(s.FRAMEBUFFER,null)}},destroy:function(){if(this.webGLFramebuffer!==null){var s=this.gl;if(!s.isContextLost()){s.bindFramebuffer(s.FRAMEBUFFER,this.webGLFramebuffer);var r=s.getFramebufferAttachmentParameter(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME);r!==null&&(s.framebufferTexture2D(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,null,0),s.deleteTexture(r));var e=s.getFramebufferAttachmentParameter(s.FRAMEBUFFER,s.DEPTH_STENCIL_ATTACHMENT,s.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME);e!==null&&s.deleteRenderbuffer(e),s.bindFramebuffer(s.FRAMEBUFFER,null),s.deleteFramebuffer(this.webGLFramebuffer)}this.renderTexture=null,this.webGLFramebuffer=null,this.gl=null}}});d.exports=o},1482:(d,x,t)=>{/** + * @author Benjamin D. Richards + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=new a({initialize:function(s,r,e){this.webGLProgram=null,this.gl=s,this.vertexSource=r,this.fragmentSource=e,this.createResource()},createResource:function(){var o=this.gl;if(!o.isContextLost()){var s=o.createProgram(),r=o.createShader(o.VERTEX_SHADER),e=o.createShader(o.FRAGMENT_SHADER);o.shaderSource(r,this.vertexSource),o.shaderSource(e,this.fragmentSource),o.compileShader(r),o.compileShader(e);var n=`Shader failed: +`;if(!o.getShaderParameter(r,o.COMPILE_STATUS))throw new Error("Vertex "+n+o.getShaderInfoLog(r));if(!o.getShaderParameter(e,o.COMPILE_STATUS))throw new Error("Fragment "+n+o.getShaderInfoLog(e));if(o.attachShader(s,r),o.attachShader(s,e),o.linkProgram(s),!o.getProgramParameter(s,o.LINK_STATUS))throw new Error("Link "+n+o.getProgramInfoLog(s));o.useProgram(s),this.webGLProgram=s}},destroy:function(){this.webGLProgram&&(this.gl.isContextLost()||this.gl.deleteProgram(this.webGLProgram),this.webGLProgram=null,this.gl=null)}});d.exports=p},82751:(d,x,t)=>{/** + * @author Benjamin D. Richards + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(50030),o=new a({initialize:function(r,e,n,l,i,h,u,c,v,m,T,C,S){this.webGLTexture=null,this.isRenderTexture=!1,this.gl=r,this.mipLevel=e,this.minFilter=n,this.magFilter=l,this.wrapT=i,this.wrapS=h,this.format=u,this.pixels=c,this.width=v,this.height=m,this.pma=T??!0,this.forceSize=!!C,this.flipY=!!S,this.__SPECTOR_Metadata={},this.createResource()},createResource:function(){var s=this.gl;if(!s.isContextLost()){if(this.pixels instanceof o){this.webGLTexture=this.pixels.webGLTexture;return}var r=s.createTexture();r.__SPECTOR_Metadata=this.__SPECTOR_Metadata,this.webGLTexture=r,this._processTexture()}},update:function(s,r,e,n,l,i,h,u,c){if(!(r===0||e===0)){this.pixels=s,this.width=r,this.height=e,this.flipY=n,this.wrapS=l,this.wrapT=i,this.minFilter=h,this.magFilter=u,this.format=c;var v=this.gl;v.isContextLost()||this._processTexture()}},_processTexture:function(){var s=this.gl;s.activeTexture(s.TEXTURE0);var r=s.getParameter(s.TEXTURE_BINDING_2D);s.bindTexture(s.TEXTURE_2D,this.webGLTexture),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MIN_FILTER,this.minFilter),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_MAG_FILTER,this.magFilter),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_S,this.wrapS),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_T,this.wrapT),s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.pma),s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,this.flipY);var e=this.pixels,n=this.mipLevel,l=this.width,i=this.height,h=this.format,u=!1;if(e==null)s.texImage2D(s.TEXTURE_2D,n,h,l,i,0,h,s.UNSIGNED_BYTE,null),u=p(l,i);else if(e.compressed){l=e.width,i=e.height,u=e.generateMipmap;for(var c=0;c{/** + * @author Benjamin D. Richards + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=new a({initialize:function(s,r,e){this.webGLUniformLocation=null,this.gl=s,this.program=r,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}});d.exports=p},9503:(d,x,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)};d.exports=a},76531:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(13560),p=t(83419),o=t(50792),s=t(97480),r=t(8443),e=t(57811),n=t(74403),l=t(45818),i=t(29747),h=t(87841),u=t(86555),c=t(56583),v=t(26099),m=t(38058),T=new p({Extends:o,initialize:function(S){o.call(this),this.game=S,this.canvas,this.canvasBounds=new h,this.parent=null,this.parentIsWindow=!1,this.parentSize=new u,this.gameSize=new u,this.baseSize=new u,this.displaySize=new u,this.scaleMode=a.SCALE_MODE.NONE,this.zoom=1,this._resetZoom=!1,this.displayScale=new v(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:i,windowResize:i,fullScreenChange:i,fullScreenError:i}},preBoot:function(){this.parseConfig(this.game.config),this.game.events.once(r.BOOT,this.boot,this)},boot:function(){var C=this.game;this.canvas=C.canvas,this.fullscreen=C.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()),C.events.on(r.PRE_STEP,this.step,this),C.events.once(r.READY,this.refresh,this),C.events.once(r.DESTROY,this.destroy,this),this.startListeners()},parseConfig:function(C){this.getParent(C),this.getParentBounds();var S=C.width,P=C.height,A=C.scaleMode,L=C.zoom,F=C.autoRound;if(typeof S=="string")if(S.substr(-1)!=="%")S=parseInt(S,10);else{var I=this.parentSize.width;I===0&&(I=window.innerWidth);var D=parseInt(S,10)/100;S=Math.floor(I*D)}if(typeof P=="string")if(P.substr(-1)!=="%")P=parseInt(P,10);else{var B=this.parentSize.height;B===0&&(B=window.innerHeight);var G=parseInt(P,10)/100;P=Math.floor(B*G)}this.scaleMode=A,this.autoRound=F,this.autoCenter=C.autoCenter,this.resizeInterval=C.resizeInterval,F&&(S=Math.floor(S),P=Math.floor(P)),this.gameSize.setSize(S,P),L===a.ZOOM.MAX_ZOOM&&(L=this.getMaxZoom()),this.zoom=L,L!==1&&(this._resetZoom=!0),this.baseSize.setSize(S,P),F&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),C.minWidth>0&&this.displaySize.setMin(C.minWidth*L,C.minHeight*L),C.maxWidth>0&&this.displaySize.setMax(C.maxWidth*L,C.maxHeight*L),this.displaySize.setSize(S,P),(C.snapWidth>0||C.snapHeight>0)&&this.displaySize.setSnap(C.snapWidth,C.snapHeight),this.orientation=l(S,P)},getParent:function(C){var S=C.parent;if(S!==null){if(this.parent=n(S),this.parentIsWindow=this.parent===document.body,C.expandParent&&C.scaleMode!==a.SCALE_MODE.NONE){var P=this.parent.getBoundingClientRect();(this.parentIsWindow||P.height===0)&&(document.documentElement.style.height="100%",document.body.style.height="100%",P=this.parent.getBoundingClientRect(),!this.parentIsWindow&&P.height===0&&(this.parent.style.overflow="hidden",this.parent.style.width="100%",this.parent.style.height="100%"))}C.fullscreenTarget&&!this.fullscreenTarget&&(this.fullscreenTarget=n(C.fullscreenTarget))}},getParentBounds:function(){if(!this.parent)return!1;var C=this.parentSize,S=this.parent.getBoundingClientRect();this.parentIsWindow&&this.game.device.os.iOS&&(S.height=e(!0));var P=S.width,A=S.height;if(C.width!==P||C.height!==A)return C.setSize(P,A),!0;if(this.canvas){var L=this.canvasBounds,F=this.canvas.getBoundingClientRect();if(F.x!==L.x||F.y!==L.y)return!0}return!1},lockOrientation:function(C){var S=screen.lockOrientation||screen.mozLockOrientation||screen.msLockOrientation;return S?S.call(screen,C):!1},setParentSize:function(C,S){return this.parentSize.setSize(C,S),this.refresh()},setGameSize:function(C,S){var P=this.autoRound;P&&(C=Math.floor(C),S=Math.floor(S));var A=this.width,L=this.height;return this.gameSize.resize(C,S),this.baseSize.resize(C,S),P&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setAspectRatio(C/S),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height,this.refresh(A,L)},resize:function(C,S){var P=this.zoom,A=this.autoRound;A&&(C=Math.floor(C),S=Math.floor(S));var L=this.width,F=this.height;this.gameSize.resize(C,S),this.baseSize.resize(C,S),A&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setSize(C*P,S*P),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height;var I=this.canvas.style,D=C*P,B=S*P;return A&&(D=Math.floor(D),B=Math.floor(B)),(D!==C||B!==S)&&(I.width=D+"px",I.height=B+"px"),this.refresh(L,F)},setZoom:function(C){return this.zoom=C,this._resetZoom=!0,this.refresh()},setMaxZoom:function(){return this.zoom=this.getMaxZoom(),this._resetZoom=!0,this.refresh()},setSnap:function(C,S){return C===void 0&&(C=0),S===void 0&&(S=C),this.displaySize.setSnap(C,S),this.refresh()},refresh:function(C,S){C===void 0&&(C=this.width),S===void 0&&(S=this.height),this.updateScale(),this.updateBounds(),this.updateOrientation(),this.displayScale.set(this.baseSize.width/this.canvasBounds.width,this.baseSize.height/this.canvasBounds.height);var P=this.game.domContainer;if(P){this.baseSize.setCSS(P);var A=this.canvas.style,L=P.style;L.transform="scale("+this.displaySize.width/this.baseSize.width+","+this.displaySize.height/this.baseSize.height+")",L.marginLeft=A.marginLeft,L.marginTop=A.marginTop}return this.emit(s.RESIZE,this.gameSize,this.baseSize,this.displaySize,C,S),this},updateOrientation:function(){if(this._checkOrientation){this._checkOrientation=!1;var C=l(this.width,this.height);C!==this.orientation&&(this.orientation=C,this.emit(s.ORIENTATION_CHANGE,C))}},updateScale:function(){var C=this.canvas.style,S=this.gameSize.width,P=this.gameSize.height,A,L,F=this.zoom,I=this.autoRound;if(this.scaleMode===a.SCALE_MODE.NONE)this.displaySize.setSize(S*F,P*F),A=this.displaySize.width,L=this.displaySize.height,I&&(A=Math.floor(A),L=Math.floor(L)),this._resetZoom&&(C.width=A+"px",C.height=L+"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),A=this.displaySize.width,L=this.displaySize.height,I&&(A=Math.floor(A),L=Math.floor(L)),this.canvas.width=A,this.canvas.height=L;else if(this.scaleMode===a.SCALE_MODE.EXPAND){this.displaySize.setSize(this.parentSize.width,this.parentSize.height),A=this.displaySize.width,L=this.displaySize.height,I&&(A=Math.floor(A),L=Math.floor(L)),C.width=A+"px",C.height=L+"px";var D=this.parentSize.width/this.gameSize.width,B=this.parentSize.height/this.gameSize.height;D=0?0:-(L.x*F.x),D=L.y>=0?0:-(L.y*F.y),B;A.width>=L.width?B=P.width:B=P.width-(L.width-A.width)*F.x;var G;return A.height>=L.height?G=P.height:G=P.height-(L.height-A.height)*F.y,S.setTo(I,D,B,G),C&&(S.width/=C.zoomX,S.height/=C.zoomY,S.centerX=C.centerX+C.scrollX,S.centerY=C.centerY+C.scrollY),S},step:function(C,S){this.parent&&(this._lastCheck+=S,(this.dirty||this._lastCheck>this.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0))},stopListeners:function(){var C=this.domlisteners;window.removeEventListener("orientationchange",C.orientationChange,!1),window.removeEventListener("resize",C.windowResize,!1);var S=["webkit","moz",""];S.forEach(function(P){document.removeEventListener(P+"fullscreenchange",C.fullScreenChange,!1),document.removeEventListener(P+"fullscreenerror",C.fullScreenError,!1)}),document.removeEventListener("MSFullscreenChange",C.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",C.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}}});d.exports=T},64743:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports={NO_CENTER:0,CENTER_BOTH:1,CENTER_HORIZONTALLY:2,CENTER_VERTICALLY:3}},39218:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports={LANDSCAPE:"landscape-primary",PORTRAIT:"portrait-primary"}},81050:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports={NONE:0,WIDTH_CONTROLS_HEIGHT:1,HEIGHT_CONTROLS_WIDTH:2,FIT:3,ENVELOP:4,RESIZE:5,EXPAND:6}},80805:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports={NO_ZOOM:1,ZOOM_2X:2,ZOOM_4X:4,MAX_ZOOM:-1}},13560:(d,x,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)};d.exports=a},56139:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="enterfullscreen"},2336:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="fullscreenfailed"},47412:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="fullscreenunsupported"},51452:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="leavefullscreen"},20666:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="orientationchange"},47945:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="resize"},97480:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.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:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(79291),p=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,p.CENTER),o=a(!1,o,p.ORIENTATION),o=a(!1,o,p.SCALE_MODE),o=a(!1,o,p.ZOOM),d.exports=o},27397:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(95540),p=t(35355),o=function(s){var r=s.game.config.defaultPhysicsSystem,e=a(s.settings,"physics",!1);if(!(!r&&!e)){var n=[];if(r&&n.push(p(r+"Physics")),e)for(var l in e)l=p(l.concat("Physics")),n.indexOf(l)===-1&&n.push(l);return n}};d.exports=o},52106:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(95540),p=function(o){var s=o.plugins.getDefaultScenePlugins(),r=a(o.settings,"plugins",!1);return Array.isArray(r)?r:s||[]};d.exports=p},87033:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x={game:"game",renderer:"renderer",anims:"anims",cache:"cache",plugins:"plugins",registry:"registry",scale:"scale",sound:"sound",textures:"textures",events:"events",cameras:"cameras",add:"add",make:"make",scenePlugin:"scene",displayList:"children",lights:"lights",data:"data",input:"input",load:"load",time:"time",tweens:"tweens",arcadePhysics:"physics",impactPhysics:"impact",matterPhysics:"matter"};d.exports=x},97482:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(2368),o=new a({initialize:function(r){this.sys=new p(this,r),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(){}});d.exports=o},60903:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(89993),o=t(44594),s=t(8443),r=t(35154),e=t(54899),n=t(29747),l=t(97482),i=t(2368),h=new a({initialize:function(c,v){if(this.game=c,this.keys={},this.scenes=[],this._pending=[],this._start=[],this._queue=[],this._data={},this.isProcessing=!1,this.isBooted=!1,this.customViewports=0,this.systemScene,v){Array.isArray(v)||(v=[v]);for(var m=0;m-1&&(delete this.keys[m],this.scenes.splice(v,1),this._start.indexOf(m)>-1&&(v=this._start.indexOf(m),this._start.splice(v,1)),c.sys.destroy())}return this},bootScene:function(u){var c=u.sys,v=c.settings;c.sceneUpdate=n,u.init&&(u.init.call(u,v.data),v.status=p.INIT,v.isTransition&&c.events.emit(o.TRANSITION_INIT,v.transitionFrom,v.transitionDuration));var m;c.load&&(m=c.load,m.reset()),m&&u.preload?(u.preload.call(u),v.status=p.LOADING,m.once(e.COMPLETE,this.loadComplete,this),m.start()):this.create(u)},loadComplete:function(u){this.game.sound&&this.game.sound.onBlurPausedSounds&&this.game.sound.unlock(),this.create(u.scene)},payloadComplete:function(u){this.bootScene(u.scene)},update:function(u,c){this.processQueue(),this.isProcessing=!0;for(var v=this.scenes.length-1;v>=0;v--){var m=this.scenes[v].sys;m.settings.status>p.START&&m.settings.status<=p.RUNNING&&m.step(u,c),m.scenePlugin&&m.scenePlugin._target&&m.scenePlugin.step(u,c)}},render:function(u){for(var c=0;c=p.LOADING&&v.settings.status=p.START&&T<=p.CREATING)return this;if(T>=p.RUNNING&&T<=p.SLEEPING)m.shutdown(),m.sceneUpdate=n,m.start(c);else{m.sceneUpdate=n,m.start(c);var C;if(m.load&&(C=m.load),C&&m.settings.hasOwnProperty("pack")&&(C.reset(),C.addPack({payload:m.settings.pack})))return m.settings.status=p.LOADING,C.once(e.COMPLETE,this.payloadComplete,this),C.start(),this}return this.bootScene(v),this},stop:function(u,c){var v=this.getScene(u);if(v&&!v.sys.isTransitioning()&&v.sys.settings.status!==p.SHUTDOWN){var m=v.sys.load;m&&(m.off(e.COMPLETE,this.loadComplete,this),m.off(e.COMPLETE,this.payloadComplete,this)),v.sys.shutdown(c)}return this},switch:function(u,c){var v=this.getScene(u),m=this.getScene(c);return v&&m&&v!==m&&(this.sleep(u),this.isSleeping(c)?this.wake(c):this.start(c)),this},getAt:function(u){return this.scenes[u]},getIndex:function(u){var c=this.getScene(u);return this.scenes.indexOf(c)},bringToTop:function(u){if(this.isProcessing)this._queue.push({op:"bringToTop",keyA:u,keyB:null});else{var c=this.getIndex(u);if(c!==-1&&c0){var v=this.getScene(u);this.scenes.splice(c,1),this.scenes.unshift(v)}}return this},moveDown:function(u){if(this.isProcessing)this._queue.push({op:"moveDown",keyA:u,keyB:null});else{var c=this.getIndex(u);if(c>0){var v=c-1,m=this.getScene(u),T=this.getAt(v);this.scenes[c]=T,this.scenes[v]=m}}return this},moveUp:function(u){if(this.isProcessing)this._queue.push({op:"moveUp",keyA:u,keyB:null});else{var c=this.getIndex(u);if(cv),0,T)}}return this},moveBelow:function(u,c){if(u===c)return this;if(this.isProcessing)this._queue.push({op:"moveBelow",keyA:u,keyB:c});else{var v=this.getIndex(u),m=this.getIndex(c);if(v!==-1&&m!==-1&&m>v){var T=this.getAt(m);this.scenes.splice(m,1),v===0?this.scenes.unshift(T):this.scenes.splice(v-(m{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(45319),p=t(83419),o=t(44594),s=t(95540),r=t(37277),e=new p({initialize:function(l){this.scene=l,this.systems=l.sys,this.settings=l.sys.settings,this.key=l.sys.settings.key,this.manager=l.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,l.sys.events.once(o.BOOT,this.boot,this),l.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(n,l){return n===void 0&&(n=this.key),this.manager.queueOp("stop",this.key),this.manager.queueOp("start",n,l),this},restart:function(n){var l=this.key;return this.manager.queueOp("stop",l),this.manager.queueOp("start",l,n),this},transition:function(n){n===void 0&&(n={});var l=s(n,"target",!1),i=this.manager.getScene(l);if(!l||!this.checkValidTransition(i))return!1;var h=s(n,"duration",1e3);this._elapsed=0,this._target=i,this._duration=h,this._willSleep=s(n,"sleep",!1),this._willRemove=s(n,"remove",!1);var u=s(n,"onUpdate",null);u&&(this._onUpdate=u,this._onUpdateScope=s(n,"onUpdateScope",this.scene));var c=s(n,"allowInput",!1);this.settings.transitionAllowInput=c;var v=i.sys.settings;v.isTransition=!0,v.transitionFrom=this.scene,v.transitionDuration=h,v.transitionAllowInput=c,s(n,"moveAbove",!1)?this.manager.moveAbove(this.key,l):s(n,"moveBelow",!1)&&this.manager.moveBelow(this.key,l),i.sys.isSleeping()?i.sys.wake(s(n,"data")):this.manager.start(l,s(n,"data"));var m=s(n,"onStart",null),T=s(n,"onStartScope",this.scene);return m&&m.call(T,this.scene,i,h),this.systems.events.emit(o.TRANSITION_OUT,i,h),!0},checkValidTransition:function(n){return!(!n||n.sys.isActive()||n.sys.isTransitioning()||n===this.scene||this.systems.isTransitioning())},step:function(n,l){this._elapsed+=l,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 n=this._target.sys,l=this._target.sys.settings;n.events.emit(o.TRANSITION_COMPLETE,this.scene),l.isTransition=!1,l.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(n,l,i,h){return this.manager.add(n,l,i,h)},launch:function(n,l){return n&&n!==this.key&&this.manager.queueOp("start",n,l),this},run:function(n,l){return n&&n!==this.key&&this.manager.queueOp("run",n,l),this},pause:function(n,l){return n===void 0&&(n=this.key),this.manager.queueOp("pause",n,l),this},resume:function(n,l){return n===void 0&&(n=this.key),this.manager.queueOp("resume",n,l),this},sleep:function(n,l){return n===void 0&&(n=this.key),this.manager.queueOp("sleep",n,l),this},wake:function(n,l){return n===void 0&&(n=this.key),this.manager.queueOp("wake",n,l),this},switch:function(n){return n!==this.key&&this.manager.queueOp("switch",this.key,n),this},stop:function(n,l){return n===void 0&&(n=this.key),this.manager.queueOp("stop",n,l),this},setActive:function(n,l,i){l===void 0&&(l=this.key);var h=this.manager.getScene(l);return h&&h.sys.setActive(n,i),this},setVisible:function(n,l){l===void 0&&(l=this.key);var i=this.manager.getScene(l);return i&&i.sys.setVisible(n),this},isSleeping:function(n){return n===void 0&&(n=this.key),this.manager.isSleeping(n)},isActive:function(n){return n===void 0&&(n=this.key),this.manager.isActive(n)},isPaused:function(n){return n===void 0&&(n=this.key),this.manager.isPaused(n)},isVisible:function(n){return n===void 0&&(n=this.key),this.manager.isVisible(n)},swapPosition:function(n,l){return l===void 0&&(l=this.key),n!==l&&this.manager.swapPosition(n,l),this},moveAbove:function(n,l){return l===void 0&&(l=this.key),n!==l&&this.manager.moveAbove(n,l),this},moveBelow:function(n,l){return l===void 0&&(l=this.key),n!==l&&this.manager.moveBelow(n,l),this},remove:function(n){return n===void 0&&(n=this.key),this.manager.remove(n),this},moveUp:function(n){return n===void 0&&(n=this.key),this.manager.moveUp(n),this},moveDown:function(n){return n===void 0&&(n=this.key),this.manager.moveDown(n),this},bringToTop:function(n){return n===void 0&&(n=this.key),this.manager.bringToTop(n),this},sendToBack:function(n){return n===void 0&&(n=this.key),this.manager.sendToBack(n),this},get:function(n){return this.manager.getScene(n)},getStatus:function(n){var l=this.manager.getScene(n);if(l)return l.sys.getStatus()},getIndex:function(n){return n===void 0&&(n=this.key),this.manager.getIndex(n)},shutdown:function(){var n=this.systems.events;n.off(o.SHUTDOWN,this.shutdown,this),n.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}});r.register("ScenePlugin",e,"scenePlugin"),d.exports=e},55681:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(89993),p=t(35154),o=t(46975),s=t(87033),r={create:function(e){return typeof e=="string"?e={key:e}:e===void 0&&(e={}),{status:a.PENDING,key:p(e,"key",""),active:p(e,"active",!1),visible:p(e,"visible",!0),isBooted:!1,isTransition:!1,transitionFrom:null,transitionDuration:0,transitionAllowInput:!0,data:{},pack:p(e,"pack",!1),cameras:p(e,"cameras",null),map:p(e,"map",o(s,p(e,"mapAdd",{}))),physics:p(e,"physics",{}),loader:p(e,"loader",{}),plugins:p(e,"plugins",!1),input:p(e,"input",{})}}};d.exports=r},2368:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(89993),o=t(42363),s=t(44594),r=t(27397),e=t(52106),n=t(29747),l=t(55681),i=new a({initialize:function(u,c){this.scene=u,this.game,this.renderer,this.config=c,this.settings=l.create(c),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=n},init:function(h){this.settings.status=p.INIT,this.sceneUpdate=n,this.game=h,this.renderer=h.renderer,this.canvas=h.canvas,this.context=h.context;var u=h.plugins;this.plugins=u,u.addToScene(this,o.Global,[o.CoreScene,e(this),r(this)]),this.events.emit(s.BOOT,this),this.settings.isBooted=!0},step:function(h,u){var c=this.events;c.emit(s.PRE_UPDATE,h,u),c.emit(s.UPDATE,h,u),this.sceneUpdate.call(this.scene,h,u),c.emit(s.POST_UPDATE,h,u)},render:function(h){var u=this.displayList;u.depthSort(),this.events.emit(s.PRE_RENDER,h),this.cameras.render(h,u),this.events.emit(s.RENDER,h)},queueDepthSort:function(){this.displayList.queueDepthSort()},depthSort:function(){this.displayList.depthSort()},pause:function(h){var u=this.settings,c=this.getStatus();return c!==p.CREATING&&c!==p.RUNNING?console.warn("Cannot pause non-running Scene",u.key):this.settings.active&&(u.status=p.PAUSED,u.active=!1,this.events.emit(s.PAUSE,this,h)),this},resume:function(h){var u=this.events,c=this.settings;return this.settings.active||(c.status=p.RUNNING,c.active=!0,u.emit(s.RESUME,this,h)),this},sleep:function(h){var u=this.settings,c=this.getStatus();return c!==p.CREATING&&c!==p.RUNNING?console.warn("Cannot sleep non-running Scene",u.key):(u.status=p.SLEEPING,u.active=!1,u.visible=!1,this.events.emit(s.SLEEP,this,h)),this},wake:function(h){var u=this.events,c=this.settings;return c.status=p.RUNNING,c.active=!0,c.visible=!0,u.emit(s.WAKE,this,h),c.isTransition&&u.emit(s.TRANSITION_WAKE,c.transitionFrom,c.transitionDuration),this},getData:function(){return this.settings.data},getStatus:function(){return this.settings.status},canInput:function(){var h=this.settings.status;return h>p.PENDING&&h<=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(h){return this.settings.visible=h,this},setActive:function(h,u){return h?this.resume(u):this.pause(u)},start:function(h){var u=this.events,c=this.settings;h&&(c.data=h),c.status=p.START,c.active=!0,c.visible=!0,u.emit(s.START,this),u.emit(s.READY,this,h)},shutdown:function(h){var u=this.events,c=this.settings;u.off(s.TRANSITION_INIT),u.off(s.TRANSITION_START),u.off(s.TRANSITION_COMPLETE),u.off(s.TRANSITION_OUT),c.status=p.SHUTDOWN,c.active=!1,c.visible=!1,u.emit(s.SHUTDOWN,this,h)},destroy:function(){var h=this.events,u=this.settings;u.status=p.DESTROYED,u.active=!1,u.visible=!1,h.emit(s.DESTROY,this),h.removeAllListeners();for(var c=["scene","game","anims","cache","plugins","registry","sound","textures","add","camera","displayList","events","make","scenePlugin","updateList"],v=0;v{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9};d.exports=x},69830:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="addedtoscene"},7919:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="boot"},46763:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="create"},11763:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="destroy"},71555:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="pause"},36735:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="postupdate"},3809:d=>{/** + * @author samme + * @copyright 2021 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="prerender"},90716:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="preupdate"},58262:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="ready"},91633:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="removedfromscene"},10319:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="render"},87132:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="resume"},81961:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="shutdown"},90194:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="sleep"},6265:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="start"},33178:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="transitioncomplete"},43063:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="transitioninit"},11259:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="transitionout"},61611:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="transitionstart"},45209:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="transitionwake"},22966:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="update"},21747:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="wake"},44594:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.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:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(89993),p=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=p(!1,o,a),d.exports=o},30341:(d,x,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),p=t(50792),o=t(14463),s=t(79291),r=t(29747),e=new a({Extends:p,initialize:function(l,i,h){p.call(this),this.manager=l,this.key=i,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=this.duration||0,this.totalDuration=this.totalDuration||0,this.config={mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0},this.currentConfig=this.config,this.config=s(this.config,h),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(n){return!n||!n.name||typeof n.name!="string"?!1:this.markers[n.name]?(console.error("addMarker "+n.name+" already exists in Sound"),!1):(n=s(!0,{name:"",start:0,duration:this.totalDuration-(n.start||0),config:{mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0}},n),this.markers[n.name]=n,!0)},updateMarker:function(n){return!n||!n.name||typeof n.name!="string"?!1:this.markers[n.name]?(this.markers[n.name]=s(!0,this.markers[n.name],n),!0):(console.warn("Audio Marker: "+n.name+" missing in Sound: "+this.key),!1)},removeMarker:function(n){var l=this.markers[n];return l?(this.markers[n]=null,l):null},play:function(n,l){if(n===void 0&&(n=""),typeof n=="object"&&(l=n,n=""),typeof n!="string")return!1;if(!n)this.currentMarker=null,this.currentConfig=this.config,this.duration=this.totalDuration;else{if(!this.markers[n])return console.warn("Marker: "+n+" missing in Sound: "+this.key),!1;this.currentMarker=this.markers[n],this.currentConfig=this.currentMarker.config,this.duration=this.currentMarker.duration}return this.resetConfig(),this.currentConfig=s(this.currentConfig,l),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:r,calculateRate:function(){var n=1.0005777895065548,l=this.currentConfig.detune+this.manager.detune,i=Math.pow(n,l);this.totalRate=this.currentConfig.rate*this.manager.rate*i},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)}});d.exports=e},85034:(d,x,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),p=t(41786),o=t(50792),s=t(14463),r=t(8443),e=t(46710),n=t(58731),l=t(29747),i=t(26099),h=new a({Extends:o,initialize:function(c){o.call(this),this.game=c,this.jsonCache=c.cache.json,this.sounds=[],this.mute=!1,this.volume=1,this.pauseOnBlur=!0,this._rate=1,this._detune=0,this.locked=this.locked||!1,this.unlocked=!1,this.gameLostFocus=!1,this.listenerPosition=new i,c.events.on(r.BLUR,this.onGameBlur,this),c.events.on(r.FOCUS,this.onGameFocus,this),c.events.on(r.PRE_STEP,this.update,this),c.events.once(r.DESTROY,this.destroy,this)},add:l,addAudioSprite:function(u,c){c===void 0&&(c={});var v=this.add(u,c);v.spritemap=this.jsonCache.get(u).spritemap;for(var m in v.spritemap)if(v.spritemap.hasOwnProperty(m)){var T=p(c),C=v.spritemap[m];T.loop=C.hasOwnProperty("loop")?C.loop:!1,v.addMarker({name:m,start:C.start,duration:C.end-C.start,config:T})}return v},get:function(u){return n(this.sounds,"key",u)},getAll:function(u){return u?e(this.sounds,"key",u):e(this.sounds)},getAllPlaying:function(){return e(this.sounds,"isPlaying",!0)},play:function(u,c){var v=this.add(u);return v.once(s.COMPLETE,v.destroy,v),c?c.name?(v.addMarker(c),v.play(c.name)):v.play(c):v.play()},playAudioSprite:function(u,c,v){var m=this.addAudioSprite(u);return m.once(s.COMPLETE,m.destroy,m),m.play(c,v)},remove:function(u){var c=this.sounds.indexOf(u);return c!==-1?(u.destroy(),this.sounds.splice(c,1),!0):!1},removeAll:function(){this.sounds.forEach(function(u){u.destroy()}),this.sounds.length=0},removeByKey:function(u){for(var c=0,v=this.sounds.length-1;v>=0;v--){var m=this.sounds[v];m.key===u&&(m.destroy(),this.sounds.splice(v,1),c++)}return c},pauseAll:function(){this.forEachActiveSound(function(u){u.pause()}),this.emit(s.PAUSE_ALL,this)},resumeAll:function(){this.forEachActiveSound(function(u){u.resume()}),this.emit(s.RESUME_ALL,this)},setListenerPosition:l,stopAll:function(){this.forEachActiveSound(function(u){u.stop()}),this.emit(s.STOP_ALL,this)},stopByKey:function(u){var c=0;return this.getAll(u).forEach(function(v){v.stop()&&c++}),c},unlock:l,onBlur:l,onFocus:l,onGameBlur:function(){this.gameLostFocus=!0,this.pauseOnBlur&&this.onBlur()},onGameFocus:function(){this.gameLostFocus=!1,this.pauseOnBlur&&this.onFocus()},update:function(u,c){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit(s.UNLOCKED,this));for(var v=this.sounds.length-1;v>=0;v--)this.sounds[v].pendingRemove&&this.sounds.splice(v,1);this.sounds.forEach(function(m){m.update(u,c)})},destroy:function(){this.game.events.off(r.BLUR,this.onGameBlur,this),this.game.events.off(r.FOCUS,this.onGameFocus,this),this.game.events.off(r.PRE_STEP,this.update,this),this.removeAllListeners(),this.removeAll(),this.sounds.length=0,this.sounds=null,this.listenerPosition=null,this.game=null},forEachActiveSound:function(u,c){var v=this;this.sounds.forEach(function(m,T){m&&!m.pendingRemove&&u.call(c||v,m,T,v.sounds)})},setRate:function(u){return this.rate=u,this},rate:{get:function(){return this._rate},set:function(u){this._rate=u,this.forEachActiveSound(function(c){c.calculateRate()}),this.emit(s.GLOBAL_RATE,this,u)}},setDetune:function(u){return this.detune=u,this},detune:{get:function(){return this._detune},set:function(u){this._detune=u,this.forEachActiveSound(function(c){c.calculateRate()}),this.emit(s.GLOBAL_DETUNE,this,u)}}});d.exports=h},14747:(d,x,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),p=t(25960),o=t(57490),s={create:function(r){var e=r.config.audio,n=r.device.audio;return e.noAudio||!n.webAudio&&!n.audioData?new p(r):n.webAudio&&!e.disableWebAudio?new o(r):new a(r)}};d.exports=s},19723:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="complete"},98882:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="decodedall"},57506:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="decoded"},73146:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="destroy"},11305:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="detune"},40577:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="detune"},30333:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="mute"},20394:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="rate"},21802:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="volume"},1299:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="looped"},99190:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="loop"},97125:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="mute"},89259:d=>{/** + * @author pi-kei + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="pan"},79986:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="pauseall"},17586:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="pause"},19618:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="play"},42306:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="rate"},10387:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="resumeall"},48959:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="resume"},9960:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="seek"},19180:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="stopall"},98328:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="stop"},50401:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="unlocked"},52498:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="volume"},14463:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.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:(d,x,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),p=t(83419),o=t(14463),s=t(45319),r=new p({Extends:a,initialize:function(n,l,i){if(i===void 0&&(i={}),this.tags=n.game.cache.audio.get(l),!this.tags)throw new Error('No cached audio asset with key "'+l);this.audio=null,this.startTime=0,this.previousTime=0,this.duration=this.tags[0].duration,this.totalDuration=this.tags[0].duration,a.call(this,n,l,i)},play:function(e,n){return this.manager.isLocked(this,"play",[e,n])||!a.prototype.play.call(this,e,n)||!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,n=this.currentConfig.delay,l=(this.currentMarker?this.currentMarker.start:0)+e;return this.previousTime=l,this.audio.currentTime=l,this.applyConfig(),n===0?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+n*1e3,this.audio.paused||this.audio.pause()),this.resetConfig(),!0},pickAudioTag:function(){if(this.audio)return!0;for(var e=0;e0){this.startTime=l-this.manager.loopEndOffset?(this.audio.currentTime=n+Math.max(0,i-l),i=this.audio.currentTime):i=l){this.reset(),this.stopAndReleaseAudioTag(),this.emit(o.COMPLETE,this);return}this.previousTime=i}},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=s(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}});d.exports=r},33684:(d,x,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),p=t(83419),o=t(14463),s=t(64895),r=new p({Extends:a,initialize:function(n){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,n)},add:function(e,n){var l=new s(this,e,n);return this.sounds.push(l),l},unlock:function(){this.locked=!1;var e=this;if(this.game.cache.audio.entries.each(function(h,u){for(var c=0;c{/** + * @author Richard Davey + * @author Pavle Goloskokovic (http://prunegames.com) + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.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:(d,x,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),p=t(83419),o=t(50792),s=t(79291),r=t(29747),e=function(){return!1},n=function(){return null},l=function(){return this},i=new p({Extends:o,initialize:function(u,c,v){v===void 0&&(v={}),o.call(this),this.manager=u,this.key=c,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=0,this.totalDuration=0,this.config=s({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0},v),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:n,play:e,pause:e,resume:e,stop:e,setMute:l,setVolume:l,setRate:l,setDetune:l,setSeek:l,setLoop:l,setPan:l,applyConfig:n,resetConfig:n,update:r,calculateRate:n,destroy:function(){a.prototype.destroy.call(this)}});d.exports=i},25960:(d,x,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),p=t(83419),o=t(50792),s=t(4603),r=t(29747),e=new p({Extends:o,initialize:function(l){o.call(this),this.game=l,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(n,l){var i=new s(this,n,l);return this.sounds.push(i),i},addAudioSprite:function(n,l){var i=this.add(n,l);return i.spritemap={},i},get:function(n){return a.prototype.get.call(this,n)},getAll:function(n){return a.prototype.getAll.call(this,n)},play:function(n,l){return!1},playAudioSprite:function(n,l,i){return!1},remove:function(n){return a.prototype.remove.call(this,n)},removeAll:function(){return a.prototype.removeAll.call(this)},removeByKey:function(n){return a.prototype.removeByKey.call(this,n)},stopByKey:function(n){return a.prototype.stopByKey.call(this,n)},onBlur:r,onFocus:r,onGameBlur:r,onGameFocus:r,pauseAll:r,resumeAll:r,stopAll:r,update:r,setRate:r,setDetune:r,setMute:r,setVolume:r,unlock:r,forEachActiveSound:function(n,l){a.prototype.forEachActiveSound.call(this,n,l)},destroy:function(){a.prototype.destroy.call(this)}});d.exports=e},71741:(d,x,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),p=t(83419),o=t(14463),s=t(95540),r=new p({Extends:a,initialize:function(n,l,i){if(i===void 0&&(i={}),this.audioBuffer=n.game.cache.audio.get(l),!this.audioBuffer)throw new Error('Audio key "'+l+'" missing from cache');this.source=null,this.loopSource=null,this.muteNode=n.context.createGain(),this.volumeNode=n.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),n.context.createPanner&&(this.spatialNode=n.context.createPanner(),this.volumeNode.connect(this.spatialNode)),n.context.createStereoPanner?(this.pannerNode=n.context.createStereoPanner(),n.context.createPanner?this.spatialNode.connect(this.pannerNode):this.volumeNode.connect(this.pannerNode),this.pannerNode.connect(n.destination)):n.context.createPanner?this.spatialNode.connect(n.destination):this.volumeNode.connect(n.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,a.call(this,n,l,i)},play:function(e,n){return a.prototype.play.call(this,e,n)?(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),p=t(85034),o=t(83419),s=t(14463),r=t(8443),e=t(71741),n=t(95540),l=new o({Extends:p,initialize:function(h){this.context=this.createAudioContext(h),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,h),this.locked&&h.isBooted?this.unlock():h.events.once(r.BOOT,this.unlock,this)},createAudioContext:function(i){var h=i.config.audio;if(h.context)return h.context.resume(),h.context;if(window.hasOwnProperty("AudioContext"))return new AudioContext;if(window.hasOwnProperty("webkitAudioContext"))return new window.webkitAudioContext},setAudioContext:function(i){return this.context&&this.context.close(),this.masterMuteNode&&this.masterMuteNode.disconnect(),this.masterVolumeNode&&this.masterVolumeNode.disconnect(),this.context=i,this.masterMuteNode=i.createGain(),this.masterVolumeNode=i.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(i.destination),this.destination=this.masterMuteNode,this},add:function(i,h){var u=new e(this,i,h);return this.sounds.push(u),u},decodeAudio:function(i,h){var u;Array.isArray(i)?u=i:u=[{key:i,data:h}];for(var c=this.game.cache.audio,v=u.length,m=0;m{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(37105),p=t(83419),o=t(29747),s=t(19186),r=new p({initialize:function(n){this.parent=n,this.list=[],this.position=0,this.addCallback=o,this.removeCallback=o,this._sortKey=""},add:function(e,n){return n?a.Add(this.list,e):a.Add(this.list,e,0,this.addCallback,this)},addAt:function(e,n,l){return l?a.AddAt(this.list,e,n):a.AddAt(this.list,e,n,0,this.addCallback,this)},getAt:function(e){return this.list[e]},getIndex:function(e){return this.list.indexOf(e)},sort:function(e,n){return e?(n===void 0&&(n=function(l,i){return l[e]-i[e]}),s(this.list,n),this):this},getByName:function(e){return a.GetFirst(this.list,"name",e)},getRandom:function(e,n){return a.GetRandom(this.list,e,n)},getFirst:function(e,n,l,i){return a.GetFirst(this.list,e,n,l,i)},getAll:function(e,n,l,i){return a.GetAll(this.list,e,n,l,i)},count:function(e,n){return a.CountAllMatching(this.list,e,n)},swap:function(e,n){a.Swap(this.list,e,n)},moveTo:function(e,n){return a.MoveTo(this.list,e,n)},moveAbove:function(e,n){return a.MoveAbove(this.list,e,n)},moveBelow:function(e,n){return a.MoveBelow(this.list,e,n)},remove:function(e,n){return n?a.Remove(this.list,e):a.Remove(this.list,e,this.removeCallback,this)},removeAt:function(e,n){return n?a.RemoveAt(this.list,e):a.RemoveAt(this.list,e,this.removeCallback,this)},removeBetween:function(e,n,l){return l?a.RemoveBetween(this.list,e,n):a.RemoveBetween(this.list,e,n,this.removeCallback,this)},removeAll:function(e){for(var n=this.list.length;n--;)this.remove(this.list[n],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,n){return a.Replace(this.list,e,n)},exists:function(e){return this.list.indexOf(e)>-1},setAll:function(e,n,l,i){return a.SetAll(this.list,e,n,l,i),this},each:function(e,n){for(var l=[null],i=2;i0?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}}});d.exports=r},90330:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=new a({initialize:function(s){this.entries={},this.size=0,this.setAll(s)},setAll:function(o){if(Array.isArray(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(83419),p=t(50792),o=t(82348),s=new a({Extends:p,initialize:function(){p.call(this),this._pending=[],this._active=[],this._destroy=[],this._toProcess=0,this.checkQueue=!1},isActive:function(r){return this._active.indexOf(r)>-1},isPending:function(r){return this._toProcess>0&&this._pending.indexOf(r)>-1},isDestroying:function(r){return this._destroy.indexOf(r)>-1},add:function(r){return this.checkQueue&&this.isActive(r)&&!this.isDestroying(r)||this.isPending(r)||(this._pending.push(r),this._toProcess++),r},remove:function(r){if(this.isPending(r)){var e=this._pending,n=e.indexOf(r);n!==-1&&e.splice(n,1)}else this.isActive(r)&&(this._destroy.push(r),this._toProcess++);return r},removeAll:function(){for(var r=this._active,e=this._destroy,n=r.length;n--;)e.push(r[n]),this._toProcess++;return this},update:function(){if(this._toProcess===0)return this._active;var r=this._destroy,e=this._active,n,l;for(n=0;n{/** + * @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 p(S){if(!(this instanceof p))return new p(S);this._maxEntries=Math.max(4,S||9),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}p.prototype={all:function(){return this._all(this.data,[])},search:function(S){var P=this.data,A=[],L=this.toBBox;if(!m(S,P))return A;for(var F=[],I,D,B,G;P;){for(I=0,D=P.children.length;I=0&&I[P].children.length>this._maxEntries;)this._split(I,P),P--;this._adjustParentBBoxes(F,I,P)},_split:function(S,P){var A=S[P],L=A.children.length,F=this._minEntries;this._chooseSplitAxis(A,F,L);var I=this._chooseSplitIndex(A,F,L),D=T(A.children.splice(I,A.children.length-I));D.height=A.height,D.leaf=A.leaf,s(A,this.toBBox),s(D,this.toBBox),P?S[P-1].children.push(D):this._splitRoot(A,D)},_splitRoot:function(S,P){this.data=T([S,P]),this.data.height=S.height+1,this.data.leaf=!1,s(this.data,this.toBBox)},_chooseSplitIndex:function(S,P,A){var L,F,I,D,B,G,z,W;for(G=z=1/0,L=P;L<=A-P;L++)F=r(S,0,L,this.toBBox),I=r(S,L,A,this.toBBox),D=c(F,I),B=i(F)+i(I),D=P;G--)z=S.children[G],e(D,S.leaf?F(z):z),B+=h(D);return B},_adjustParentBBoxes:function(S,P,A){for(var L=A;L>=0;L--)e(P[L],S)},_condense:function(S){for(var P=S.length-1,A;P>=0;P--)S[P].children.length===0?P>0?(A=S[P-1].children,A.splice(A.indexOf(S[P]),1)):this.clear():s(S[P],this.toBBox)},compareMinX:function(S,P){return S.left-P.left},compareMinY:function(S,P){return S.top-P.top},toBBox:function(S){return{minX:S.left,minY:S.top,maxX:S.right,maxY:S.bottom}}};function o(S,P,A){if(!A)return P.indexOf(S);for(var L=0;L=S.minX&&P.maxY>=S.minY}function T(S){return{children:S,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function C(S,P,A,L,F){for(var I=[P,A],D;I.length;)A=I.pop(),P=I.pop(),!(A-P<=L)&&(D=P+Math.ceil((A-P)/L/2)*L,a(S,D,P,A,F),I.push(P,D,D,A))}d.exports=p},35072:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=new a({initialize:function(s){if(this.entries=[],Array.isArray(s))for(var r=0;r-1&&this.entries.splice(s,1),this},dump:function(){console.group("Set");for(var o=0;o-1},union:function(o){var s=new p;return o.entries.forEach(function(r){s.set(r)}),this.entries.forEach(function(r){s.set(r)}),s},intersect:function(o){var s=new p;return this.entries.forEach(function(r){o.contains(r)&&s.set(r)}),s},difference:function(o){var s=new p;return this.entries.forEach(function(r){o.contains(r)||s.set(r)}),s},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),p=t(83419),o=t(56583),s=t(26099),r=new p({initialize:function(n,l,i,h){n===void 0&&(n=0),l===void 0&&(l=n),i===void 0&&(i=0),h===void 0&&(h=null),this._width=n,this._height=l,this._parent=h,this.aspectMode=i,this.aspectRatio=l===0?1:n/l,this.minWidth=0,this.minHeight=0,this.maxWidth=Number.MAX_VALUE,this.maxHeight=Number.MAX_VALUE,this.snapTo=new s},setAspectMode:function(e){return e===void 0&&(e=0),this.aspectMode=e,this.setSize(this._width,this._height)},setSnap:function(e,n){return e===void 0&&(e=0),n===void 0&&(n=e),this.snapTo.set(e,n),this.setSize(this._width,this._height)},setParent:function(e){return this._parent=e,this.setSize(this._width,this._height)},setMin:function(e,n){return e===void 0&&(e=0),n===void 0&&(n=e),this.minWidth=a(e,0,this.maxWidth),this.minHeight=a(n,0,this.maxHeight),this.setSize(this._width,this._height)},setMax:function(e,n){return e===void 0&&(e=Number.MAX_VALUE),n===void 0&&(n=e),this.maxWidth=a(e,this.minWidth,Number.MAX_VALUE),this.maxHeight=a(n,this.minHeight,Number.MAX_VALUE),this.setSize(this._width,this._height)},setSize:function(e,n){switch(e===void 0&&(e=0),n===void 0&&(n=e),this.aspectMode){case r.NONE:this._width=this.getNewWidth(o(e,this.snapTo.x)),this._height=this.getNewHeight(o(n,this.snapTo.y)),this.aspectRatio=this._height===0?1:this._width/this._height;break;case r.WIDTH_CONTROLS_HEIGHT:this._width=this.getNewWidth(o(e,this.snapTo.x)),this._height=this.getNewHeight(this._width*(1/this.aspectRatio),!1);break;case r.HEIGHT_CONTROLS_WIDTH:this._height=this.getNewHeight(o(n,this.snapTo.y)),this._width=this.getNewWidth(this._height*this.aspectRatio,!1);break;case r.FIT:this.constrain(e,n,!0);break;case r.ENVELOP:this.constrain(e,n,!1);break}return this},setAspectRatio:function(e){return this.aspectRatio=e,this.setSize(this._width,this._height)},resize:function(e,n){return this._width=this.getNewWidth(o(e,this.snapTo.x)),this._height=this.getNewHeight(o(n,this.snapTo.y)),this.aspectRatio=this._height===0?1:this._width/this._height,this},getNewWidth:function(e,n){return n===void 0&&(n=!0),e=a(e,this.minWidth,this.maxWidth),n&&this._parent&&e>this._parent.width&&(e=Math.max(this.minWidth,this._parent.width)),e},getNewHeight:function(e,n){return n===void 0&&(n=!0),e=a(e,this.minHeight,this.maxHeight),n&&this._parent&&e>this._parent.height&&(e=Math.max(this.minHeight,this._parent.height)),e},constrain:function(e,n,l){e===void 0&&(e=0),n===void 0&&(n=e),l===void 0&&(l=!0),e=this.getNewWidth(e),n=this.getNewHeight(n);var i=this.snapTo,h=n===0?1:e/n;return l&&this.aspectRatio>h||!l&&this.aspectRatio0&&(n=o(n,i.y),e=n*this.aspectRatio)):(l&&this.aspectRatioh)&&(n=o(n,i.y),e=n*this.aspectRatio,i.x>0&&(e=o(e,i.x),n=e*(1/this.aspectRatio))),this._width=e,this._height=n,this},fitTo:function(e,n){return this.constrain(e,n,!0)},envelop:function(e,n){return this.constrain(e,n,!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)}}});r.NONE=0,r.WIDTH_CONTROLS_HEIGHT=1,r.HEIGHT_CONTROLS_WIDTH=2,r.FIT=3,r.ENVELOP=4,d.exports=r},15238:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="add"},56187:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="remove"},82348:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports={PROCESS_QUEUE_ADD:t(15238),PROCESS_QUEUE_REMOVE:t(56187)}},41392:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports={Events:t(82348),List:t(73162),Map:t(90330),ProcessQueue:t(25774),RTree:t(59542),Set:t(35072),Size:t(86555)}},57382:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(45319),o=t(40987),s=t(8054),r=t(50030),e=t(79237),n=new a({Extends:e,initialize:function(i,h,u,c,v){e.call(this,i,h,u,c,v),this.add("__BASE",0,0,0,c,v),this._source=this.frames.__BASE.source,this.canvas=this._source.image,this.context=this.canvas.getContext("2d",{willReadFrequently:!0}),this.width=c,this.height=v,this.imageData=this.context.getImageData(0,0,c,v),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===s.WEBGL&&this.refresh(),this},draw:function(l,i,h,u){return u===void 0&&(u=!0),this.context.drawImage(h,l,i),u&&this.update(),this},drawFrame:function(l,i,h,u,c){h===void 0&&(h=0),u===void 0&&(u=0),c===void 0&&(c=!0);var v=this.manager.getFrame(l,i);if(v){var m=v.canvasData,T=v.cutWidth,C=v.cutHeight,S=v.source.resolution;this.context.drawImage(v.source.image,m.x,m.y,T,C,h,u,T/S,C/S),c&&this.update()}return this},setPixel:function(l,i,h,u,c,v){v===void 0&&(v=255),l=Math.abs(Math.floor(l)),i=Math.abs(Math.floor(i));var m=this.getIndex(l,i);if(m>-1){var T=this.context.getImageData(l,i,1,1);T.data[0]=h,T.data[1]=u,T.data[2]=c,T.data[3]=v,this.context.putImageData(T,l,i)}return this},putData:function(l,i,h,u,c,v,m){return u===void 0&&(u=0),c===void 0&&(c=0),v===void 0&&(v=l.width),m===void 0&&(m=l.height),this.context.putImageData(l,i,h,u,c,v,m),this},getData:function(l,i,h,u){l=p(Math.floor(l),0,this.width-1),i=p(Math.floor(i),0,this.height-1),h=p(h,1,this.width-l),u=p(u,1,this.height-i);var c=this.context.getImageData(l,i,h,u);return c},getPixel:function(l,i,h){h||(h=new o);var u=this.getIndex(l,i);if(u>-1){var c=this.data,v=c[u+0],m=c[u+1],T=c[u+2],C=c[u+3];h.setTo(v,m,T,C)}return h},getPixels:function(l,i,h,u){l===void 0&&(l=0),i===void 0&&(i=0),h===void 0&&(h=this.width),u===void 0&&(u=h),l=Math.abs(Math.round(l)),i=Math.abs(Math.round(i));for(var c=p(l,0,this.width),v=p(l+h,0,this.width),m=p(i,0,this.height),T=p(i+u,0,this.height),C=new o,S=[],P=m;P{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(10312),p=t(71911),o=t(27919),s=t(83419),r=t(8054),e=t(4327),n=t(95540),l=t(36060),i=t(32302),h=t(79237),u=t(70554),c=new s({Extends:h,initialize:function(m,T,C,S){C===void 0&&(C=256),S===void 0&&(S=256),this.type="DynamicTexture";var P=m.game.renderer,A=P&&P.type===r.CANVAS,L=A?o.create2D(this,C,S):[this];h.call(this,m,T,L,C,S),this.add("__BASE",0,0,0,C,S),this.renderer=P,this.width=-1,this.height=-1,this.isDrawing=!1,this.canvas=A?L:null,this.context=A?L.getContext("2d",{willReadFrequently:!0}):null,this.dirty=!1,this.isSpriteTexture=!0,this._eraseMode=!1,this.camera=new p(0,0,C,S).setScene(m.game.scene.systemScene,!1),this.renderTarget=A?null:new i(P,C,S,1,0,!1,!0,!0,!1),this.pipeline=A?null:P.pipelines.get(l.SINGLE_PIPELINE),this.setSize(C,S)},setSize:function(v,m){m===void 0&&(m=v);var T=this.get(),C=T.source;if(v!==this.width||m!==this.height){this.canvas&&(this.canvas.width=v,this.canvas.height=m);var S=this.renderTarget;S&&(S.willResize(v,m)&&S.resize(v,m),S.texture!==C.glTexture&&this.renderer.deleteTexture(C.glTexture),this.setFromRenderTarget()),this.camera.setSize(v,m),C.width=v,C.height=m,T.setSize(v,m),this.width=v,this.height=m}else{var P=this.getSourceImage();T.cutX+v>P.width&&(v=P.width-T.cutX),T.cutY+m>P.height&&(m=P.height-T.cutY),T.setSize(v,m,T.cutX,T.cutY)}return this},setFromRenderTarget:function(){var v=this.get(),m=v.source,T=this.renderTarget;return m.isRenderTexture=!0,m.isGLTexture=!0,m.glTexture=T.texture,this},setIsSpriteTexture:function(v){return this.isSpriteTexture=v,this},fill:function(v,m,T,C,S,P){var A=this.camera,L=this.renderer;m===void 0&&(m=1),T===void 0&&(T=0),C===void 0&&(C=0),S===void 0&&(S=this.width),P===void 0&&(P=this.height);var F=v>>16&255,I=v>>8&255,D=v&255,B=this.renderTarget;if(A.preRender(),B){B.bind(!0);var G=this.pipeline.manager.set(this.pipeline),z=L.width/B.width,W=L.height/B.height,Y=B.height-(C+P);G.drawFillRect(T*z,Y*W,S*z,P*W,u.getTintFromFloats(D/255,I/255,F/255,1),m),B.unbind(!0)}else{var K=this.context;L.setContext(K),K.globalCompositeOperation="source-over",K.fillStyle="rgba("+F+","+I+","+D+","+m+")",K.fillRect(T,C,S,P),L.setContext()}return this.dirty=!0,this},clear:function(){if(this.dirty){var v=this.context,m=this.renderTarget;m?m.clear():v&&(v.save(),v.setTransform(1,0,0,1,0,0),v.clearRect(0,0,this.width,this.height),v.restore()),this.dirty=!1}return this},stamp:function(v,m,T,C,S){T===void 0&&(T=0),C===void 0&&(C=0);var P=n(S,"alpha",1),A=n(S,"tint",16777215),L=n(S,"angle",0),F=n(S,"rotation",0),I=n(S,"scale",1),D=n(S,"scaleX",I),B=n(S,"scaleY",I),G=n(S,"originX",.5),z=n(S,"originY",.5),W=n(S,"blendMode",0),Y=n(S,"erase",!1),K=n(S,"skipBatch",!1),Z=this.manager.resetStamp(P,A);return Z.setAngle(0),L!==0?Z.setAngle(L):F!==0&&Z.setRotation(F),Z.setScale(D,B),Z.setTexture(v,m),Z.setOrigin(G,z),Z.setBlendMode(W),Y&&(this._eraseMode=!0),K?this.batchGameObject(Z,T,C):this.draw(Z,T,C),Y&&(this._eraseMode=!1),this},erase:function(v,m,T){return this._eraseMode=!0,this.draw(v,m,T),this._eraseMode=!1,this},draw:function(v,m,T,C,S){return this.beginDraw(),this.batchDraw(v,m,T,C,S),this.endDraw(),this},drawFrame:function(v,m,T,C,S,P){return this.beginDraw(),this.batchDrawFrame(v,m,T,C,S,P),this.endDraw(),this},repeat:function(v,m,T,C,S,P,A,L,F){if(T===void 0&&(T=0),C===void 0&&(C=0),S===void 0&&(S=this.width),P===void 0&&(P=this.height),A===void 0&&(A=1),L===void 0&&(L=16777215),F===void 0&&(F=!1),v instanceof e?m=v:m=this.manager.getFrame(v,m),!m)return this;var I=this.manager.resetStamp(A,L);I.setFrame(m),I.setOrigin(0);var D=m.width,B=m.height;S=Math.floor(S),P=Math.floor(P);var G=Math.ceil(S/D),z=Math.ceil(P/B),W=G*D-S,Y=z*B-P;W>0&&(W=D-W),Y>0&&(Y=B-Y),T<0&&(G+=Math.ceil(Math.abs(T)/D)),C<0&&(z+=Math.ceil(Math.abs(C)/B));var K=T,Z=C,V=!1,H=this.manager.stampCrop.setTo(0,0,D,B);F||this.beginDraw();for(var N=0;N0&&U===G-1&&(V=!0,H.width=W),Y>0&&N===z-1&&(V=!0,H.height=Y),V&&I.setCrop(H),this.batchGameObject(I,K,Z),I.isCropped=!1,H.setTo(0,0,D,B),K+=D}K=T,Z+=B}return F||this.endDraw(),this},beginDraw:function(){if(!this.isDrawing){var v=this.camera,m=this.renderer,T=this.renderTarget;v.preRender(),T?m.beginCapture(T.width,T.height):m.setContext(this.context),this.isDrawing=!0}return this},batchDraw:function(v,m,T,C,S){return Array.isArray(v)||(v=[v]),this.batchList(v,m,T,C,S),this},batchDrawFrame:function(v,m,T,C,S,P){T===void 0&&(T=0),C===void 0&&(C=0),S===void 0&&(S=1),P===void 0&&(P=16777215);var A=this.manager.getFrame(v,m);return A&&(this.renderTarget?this.pipeline.batchTextureFrame(A,T,C,P,S,this.camera.matrix,null):this.batchTextureFrame(A,T,C,S,P)),this},endDraw:function(v){if(v===void 0&&(v=this._eraseMode),this.isDrawing){var m=this.renderer,T=this.renderTarget;if(T){var C=m.endCapture(),S=m.pipelines.setUtility();S.blitFrame(C,T,1,!1,!1,v,this.isSpriteTexture),m.resetScissor(),m.resetViewport()}else m.setContext();this.dirty=!0,this.isDrawing=!1}return this},batchList:function(v,m,T,C,S){var P=v.length;if(P!==0)for(var A=0;A0&&F.height>0&&L.drawImage(I,F.x,F.y,F.width,F.height,m,T,F.width,F.height),L.restore()}},snapshotArea:function(v,m,T,C,S,P,A){return this.renderTarget?this.renderer.snapshotFramebuffer(this.renderTarget.framebuffer,this.width,this.height,S,!1,v,m,T,C,P,A):this.renderer.snapshotCanvas(this.canvas,S,!1,v,m,T,C,P,A),this},snapshot:function(v,m,T){return this.snapshotArea(0,0,this.width,this.height,v,m,T)},snapshotPixel:function(v,m,T){return this.snapshotArea(v,m,1,1,T,"pixel")},getWebGLTexture:function(){if(this.renderTarget)return this.renderTarget.texture},renderWebGL:function(v,m,T,C){var S=this.manager.resetStamp();S.setTexture(this),S.setOrigin(0),S.renderWebGL(v,S,T,C)},renderCanvas:function(){},destroy:function(){var v=this.manager.stamp;v&&v.texture===this&&this.manager.resetStamp(),h.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}});d.exports=c},4327:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(45319),o=t(79291),s=new a({initialize:function(e,n,l,i,h,u,c){this.texture=e,this.name=n,this.source=e.source[l],this.sourceIndex=l,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(u,c,i,h)},setSize:function(r,e,n,l){n===void 0&&(n=0),l===void 0&&(l=0),this.cutX=n,this.cutY=l,this.cutWidth=r,this.cutHeight=e,this.width=r,this.height=e,this.halfWidth=Math.floor(r*.5),this.halfHeight=Math.floor(e*.5),this.centerX=Math.floor(r/2),this.centerY=Math.floor(e/2);var i=this.data,h=i.cut;h.x=n,h.y=l,h.w=r,h.h=e,h.r=n+r,h.b=l+e,i.sourceSize.w=r,i.sourceSize.h=e,i.spriteSourceSize.w=r,i.spriteSourceSize.h=e,i.radius=.5*Math.sqrt(r*r+e*e);var u=i.drawImage;return u.x=n,u.y=l,u.width=r,u.height=e,this.updateUVs()},setTrim:function(r,e,n,l,i,h){var u=this.data,c=u.spriteSourceSize;return u.trim=!0,u.sourceSize.w=r,u.sourceSize.h=e,c.x=n,c.y=l,c.w=i,c.h=h,c.r=n+i,c.b=l+h,this.x=n,this.y=l,this.width=i,this.height=h,this.halfWidth=i*.5,this.halfHeight=h*.5,this.centerX=Math.floor(i/2),this.centerY=Math.floor(h/2),this.updateUVs()},setScale9:function(r,e,n,l){var i=this.data;return i.scale9=!0,i.is3Slice=e===0&&l===this.height,i.scale9Borders.x=r,i.scale9Borders.y=e,i.scale9Borders.w=n,i.scale9Borders.h=l,this},setCropUVs:function(r,e,n,l,i,h,u){var c=this.cutX,v=this.cutY,m=this.cutWidth,T=this.cutHeight,C=this.realWidth,S=this.realHeight;e=p(e,0,C),n=p(n,0,S),l=p(l,0,C-e),i=p(i,0,S-n);var P=c+e,A=v+n,L=l,F=i,I=this.data;if(I.trim){var D=I.spriteSourceSize;l=p(l,0,m-e),i=p(i,0,T-n);var B=e+l,G=n+i,z=!(D.rB||D.y>G);if(z){var W=Math.max(D.x,e),Y=Math.max(D.y,n),K=Math.min(D.r,B)-W,Z=Math.min(D.b,G)-Y;L=K,F=Z,h?P=c+(m-(W-D.x)-K):P=c+(W-D.x),u?A=v+(T-(Y-D.y)-Z):A=v+(Y-D.y),e=W,n=Y,l=K,i=Z}else P=0,A=0,L=0,F=0}else h&&(P=c+(m-e-l)),u&&(A=v+(T-n-i));var V=this.source.width,H=this.source.height;return r.u0=Math.max(0,P/V),r.v0=Math.max(0,A/H),r.u1=Math.min(1,(P+L)/V),r.v1=Math.min(1,(A+F)/H),r.x=e,r.y=n,r.cx=P,r.cy=A,r.cw=L,r.ch=F,r.width=l,r.height=i,r.flipX=h,r.flipY=u,r},updateCropUVs:function(r,e,n){return this.setCropUVs(r,r.x,r.y,r.width,r.height,e,n)},setUVs:function(r,e,n,l,i,h){var u=this.data.drawImage;return u.width=r,u.height=e,this.u0=n,this.v0=l,this.u1=i,this.v1=h,this},updateUVs:function(){var r=this.cutX,e=this.cutY,n=this.cutWidth,l=this.cutHeight,i=this.data.drawImage;i.width=n,i.height=l;var h=this.source.width,u=this.source.height;return this.u0=r/h,this.v0=e/u,this.u1=(r+n)/h,this.v1=(e+l)/u,this},updateUVsInverted:function(){var r=this.source.width,e=this.source.height;return this.u0=(this.cutX+this.cutHeight)/r,this.v0=this.cutY/e,this.u1=this.cutX/r,this.v1=(this.cutY+this.cutWidth)/e,this},clone:function(){var r=new s(this.texture,this.name,this.sourceIndex);return r.cutX=this.cutX,r.cutY=this.cutY,r.cutWidth=this.cutWidth,r.cutHeight=this.cutHeight,r.x=this.x,r.y=this.y,r.width=this.width,r.height=this.height,r.halfWidth=this.halfWidth,r.halfHeight=this.halfHeight,r.centerX=this.centerX,r.centerY=this.centerY,r.rotated=this.rotated,r.data=o(!0,r.data,this.data),r.updateUVs(),r},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}}});d.exports=s},79237:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(4327),o=t(11876),s='Texture "%s" has no frame "%s"',r=new a({initialize:function(n,l,i,h,u){Array.isArray(i)||(i=[i]),this.manager=n,this.key=l,this.source=[],this.dataSource=[],this.frames={},this.customData={},this.firstFrame="__BASE",this.frameTotal=0;for(var c=0;ch&&(h=v.cutX+v.cutWidth),v.cutY+v.cutHeight>u&&(u=v.cutY+v.cutHeight)}return{x:l,y:i,width:h-l,height:u-i}},getFrameNames:function(e){e===void 0&&(e=!1);var n=Object.keys(this.frames);if(!e){var l=n.indexOf("__BASE");l!==-1&&n.splice(l,1)}return n},getSourceImage:function(e){(e==null||this.frameTotal===1)&&(e="__BASE");var n=this.frames[e];return n?n.source.image:(console.warn(s,this.key,e),this.frames.__BASE.source.image)},getDataSourceImage:function(e){(e==null||this.frameTotal===1)&&(e="__BASE");var n=this.frames[e],l;return n?l=n.sourceIndex:(console.warn(s,this.key,e),l=this.frames.__BASE.sourceIndex),this.dataSource[l].image},setDataSource:function(e){Array.isArray(e)||(e=[e]);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(27919),p=t(57382),o=t(83419),s=t(40987),r=t(8054),e=t(81320),n=t(50792),l=t(69442),i=t(4327),h=t(8443),u=t(99584),c=t(35154),v=t(88571),m=t(41212),T=t(61309),C=t(87841),S=t(79237),P=new o({Extends:n,initialize:function(L){n.call(this),this.game=L,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 C,this.silentWarnings=!1,L.events.once(h.BOOT,this.boot,this)},boot:function(){this._pending=3,this.on(l.LOAD,this.updatePending,this),this.on(l.ERROR,this.updatePending,this);var A=this.game.config;this.addBase64("__DEFAULT",A.defaultImage),this.addBase64("__MISSING",A.missingImage),this.addBase64("__WHITE",A.whiteImage),this.game.renderer&&this.game.renderer.gl&&this.addUint8Array("__NORMAL",new Uint8Array([127,127,255,255]),1,1),this.game.events.once(h.DESTROY,this.destroy,this),this.game.events.once(h.SYSTEM_READY,function(L){this.stamp=new v(L).setOrigin(0)},this)},updatePending:function(){this._pending--,this._pending===0&&(this.off(l.LOAD),this.off(l.ERROR),this.emit(l.READY))},checkKey:function(A){return this.exists(A)?(this.silentWarnings||console.error("Texture key already in use: "+A),!1):!0},remove:function(A){if(typeof A=="string")if(this.exists(A))A=this.get(A);else return this.silentWarnings||console.warn("No texture found matching key: "+A),this;var L=A.key;return this.list.hasOwnProperty(L)&&(A.destroy(),this.emit(l.REMOVE,L),this.emit(l.REMOVE_KEY+L)),this},removeKey:function(A){return this.list.hasOwnProperty(A)&&delete this.list[A],this},addBase64:function(A,L){if(this.checkKey(A)){var F=this,I=new Image;I.onerror=function(){F.emit(l.ERROR,A)},I.onload=function(){var D=F.create(A,I);T.Image(D,0),F.emit(l.ADD,A,D),F.emit(l.ADD_KEY+A,D),F.emit(l.LOAD,A,D)},I.src=L}return this},getBase64:function(A,L,F,I){F===void 0&&(F="image/png"),I===void 0&&(I=.92);var D="",B=this.getFrame(A,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=a.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(F,I),a.remove(z)}return D},addImage:function(A,L,F){var I=null;return this.checkKey(A)&&(I=this.create(A,L),T.Image(I,0),F&&I.setDataSource(F),this.emit(l.ADD,A,I),this.emit(l.ADD_KEY+A,I)),I},addGLTexture:function(A,L){var F=null;if(this.checkKey(A)){var I=L.width,D=L.height;F=this.create(A,L,I,D),F.add("__BASE",0,0,0,I,D),this.emit(l.ADD,A,F),this.emit(l.ADD_KEY+A,F)}return F},addCompressedTexture:function(A,L,F){var I=null;if(this.checkKey(A)){if(I=this.create(A,L),I.add("__BASE",0,0,0,L.width,L.height),F){var D=function(G,z,W){Array.isArray(W.textures)||Array.isArray(W.frames)?T.JSONArray(G,z,W):T.JSONHash(G,z,W)};if(Array.isArray(F))for(var B=0;B=B.x&&A=B.y&&L=B.x&&A=B.y&&L{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(27919),p=t(83419),o=t(50030),s=t(29795),r=t(82751),e=new p({initialize:function(l,i,h,u,c){c===void 0&&(c=!1);var v=l.manager.game;this.renderer=v.renderer,this.texture=l,this.source=i,this.image=i.compressed?null:i,this.compressionAlgorithm=i.compressed?i.format:null,this.resolution=1,this.width=h||i.naturalWidth||i.videoWidth||i.width||0,this.height=u||i.naturalHeight||i.videoHeight||i.height||0,this.scaleMode=s.DEFAULT,this.isCanvas=i instanceof HTMLCanvasElement,this.isVideo=window.hasOwnProperty("HTMLVideoElement")&&i instanceof HTMLVideoElement,this.isRenderTexture=i.type==="RenderTexture"||i.type==="DynamicTexture",this.isGLTexture=i instanceof r,this.isPowerOf2=o(this.width,this.height),this.glTexture=null,this.flipY=c,this.init(v)},init:function(n){var l=this.renderer;if(l){var i=this.source;if(l.gl){var h=this.image,u=this.flipY,c=this.width,v=this.height,m=this.scaleMode;this.isCanvas?this.glTexture=l.createCanvasTexture(h,!1,u):this.isVideo?this.glTexture=l.createVideoTexture(h,!1,u):this.isRenderTexture?this.glTexture=l.createTextureFromSource(null,c,v,m):this.isGLTexture?this.glTexture=i:this.compressionAlgorithm?this.glTexture=l.createTextureFromSource(i,void 0,void 0,m):i instanceof Uint8Array?this.glTexture=l.createUint8ArrayTexture(i,c,v,m):this.glTexture=l.createTextureFromSource(h,c,v,m)}else this.isRenderTexture&&(this.image=i.canvas)}n.config.antialias||this.setFilter(1)},setFilter:function(n){this.renderer&&this.renderer.gl&&this.renderer.setTextureFilter(this.glTexture,n),this.scaleMode=n},setFlipY:function(n){return n===void 0&&(n=!0),n===this.flipY?this:(this.flipY=n,this.update(),this)},update:function(){var n=this.renderer,l=this.image,i=this.flipY,h=n.gl;h&&this.isCanvas?n.updateCanvasTexture(l,this.glTexture,i):h&&this.isVideo&&n.updateVideoTexture(l,this.glTexture,i)},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}});d.exports=e},19673:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x={LINEAR:0,NEAREST:1};d.exports=x},44538:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="addtexture"},63486:d=>{/** + * @author samme + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="addtexture-"},94851:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="onerror"},29099:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="onload"},8678:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="ready"},86415:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="removetexture"},30879:d=>{/** + * @author samme + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="removetexture-"},69442:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.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:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(79291),p=t(19673),o={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)};o=a(!1,o,p),d.exports=o},89905:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){if(!p.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 s=p.getElementsByTagName("SubTexture"),r,e=0;e{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){var p=t.source[a];return t.add("__BASE",a,0,0,p.width,p.height),t};d.exports=x},4832:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){var p=t.source[a];return t.add("__BASE",a,0,0,p.width,p.height),t};d.exports=x},78566:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(41786),p=function(o,s,r){if(!r.frames&&!r.textures){console.warn("Invalid Texture Atlas JSON Array");return}var e=o.source[s];o.add("__BASE",s,0,0,e.width,e.height);for(var n=Array.isArray(r.textures)?r.textures[s].frames:r.frames,l,i=0;i{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(41786),p=function(o,s,r){if(!r.frames){console.warn("Invalid Texture Atlas JSON Hash given, missing 'frames' Object");return}var e=o.source[s];o.add("__BASE",s,0,0,e.width,e.height);var n=r.frames,l;for(var i in n)if(n.hasOwnProperty(i)){var h=n[i];if(l=o.add(i,s,h.frame.x,h.frame.y,h.frame.w,h.frame.h),!l){console.warn("Invalid atlas json, frame already exists: "+i);continue}h.trimmed&&l.setTrim(h.sourceSize.w,h.sourceSize.h,h.spriteSourceSize.x,h.spriteSourceSize.y,h.spriteSourceSize.w,h.spriteSourceSize.h),h.rotated&&(l.rotated=!0,l.updateUVsInverted());var u=h.anchor||h.pivot;u&&(l.customPivot=!0,l.pivotX=u.x,l.pivotY=u.y),h.scale9Borders&&l.setScale9(h.scale9Borders.x,h.scale9Borders.y,h.scale9Borders.w,h.scale9Borders.h),l.customData=a(h)}for(var c in r)c!=="frames"&&(Array.isArray(r[c])?o.customData[c]=r[c].slice(0):o.customData[c]=r[c]);return o};d.exports=p},31403:d=>{/** + * @author Richard Davey + * @copyright 2021 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){var a=[171,75,84,88,32,49,49,187,13,10,26,10],p,o=new Uint8Array(t,0,12);for(p=0;p>1),C=Math.max(1,C>>1),m+=S}return{mipmaps:v,width:i,height:h,internalFormat:l,compressed:!0,generateMipmap:!1}};d.exports=x},82038:d=>{/** + * @author Richard Davey + * @copyright 2021 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */function x(L,F,I,D,B,G,z){return z===void 0&&(z=16),Math.floor((L+I)/B)*Math.floor((F+D)/G)*z}function t(L,F){return L=Math.max(L,16),F=Math.max(F,8),L*F/4}function a(L,F){return L=Math.max(L,8),F=Math.max(F,8),L*F/2}function p(L,F){return Math.ceil(L/4)*Math.ceil(F/4)*16}function o(L,F){return x(L,F,3,3,4,4,8)}function s(L,F){return x(L,F,3,3,4,4)}function r(L,F){return x(L,F,4,3,5,4)}function e(L,F){return x(L,F,4,4,5,5)}function n(L,F){return x(L,F,5,4,6,5)}function l(L,F){return x(L,F,5,5,6,6)}function i(L,F){return x(L,F,7,4,8,5)}function h(L,F){return x(L,F,7,5,8,6)}function u(L,F){return x(L,F,7,7,8,8)}function c(L,F){return x(L,F,9,4,10,5)}function v(L,F){return x(L,F,9,5,10,6)}function m(L,F){return x(L,F,9,7,10,8)}function T(L,F){return x(L,F,9,9,10,10)}function C(L,F){return x(L,F,11,9,12,10)}function S(L,F){return x(L,F,11,11,12,12)}var P={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:s,glFormat:[33777,35917]},9:{sizeFunc:s,glFormat:[33778,35918]},11:{sizeFunc:s,glFormat:[33779,35919]},14:{sizeFunc:p,glFormat:[36494,36495]},15:{sizeFunc:p,glFormat:[36492,36493]},22:{sizeFunc:o,glFormat:[37492,37493]},23:{sizeFunc:s,glFormat:[37496,37497]},24:{sizeFunc:o,glFormat:[37494,37495]},25:{sizeFunc:o,glFormat:[37488]},26:{sizeFunc:s,glFormat:[37490]},27:{sizeFunc:s,glFormat:[37808,37840]},28:{sizeFunc:r,glFormat:[37809,37841]},29:{sizeFunc:e,glFormat:[37810,37842]},30:{sizeFunc:n,glFormat:[37811,37843]},31:{sizeFunc:l,glFormat:[37812,37844]},32:{sizeFunc:i,glFormat:[37813,37845]},33:{sizeFunc:h,glFormat:[37814,37846]},34:{sizeFunc:u,glFormat:[37815,37847]},35:{sizeFunc:c,glFormat:[37816,37848]},36:{sizeFunc:v,glFormat:[37817,37849]},37:{sizeFunc:m,glFormat:[37818,37850]},38:{sizeFunc:T,glFormat:[37819,37851]},39:{sizeFunc:C,glFormat:[37820,37852]},40:{sizeFunc:S,glFormat:[37821,37853]}},A=function(L){for(var F=new Uint32Array(L,0,13),I=F[0],D=I===55727696,B=D?F[2]:F[3],G=F[4],z=P[B].glFormat[G],W=P[B].sizeFunc,Y=F[11],K=F[7],Z=F[6],V=52+F[12],H=new Uint8Array(L,V),N=new Array(Y),U=0,X=K,$=Z,k=0;k>1),$=Math.max(1,$>>1),U+=Q}return{mipmaps:N,width:K,height:Z,internalFormat:z,compressed:!0,generateMipmap:!1}};d.exports=A},75549:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(95540),p=function(o,s,r,e,n,l,i){var h=a(i,"frameWidth",null),u=a(i,"frameHeight",h);if(h===null)throw new Error("TextureManager.SpriteSheet: Invalid frameWidth given.");var c=o.source[s];o.add("__BASE",s,0,0,c.width,c.height);var v=a(i,"startFrame",0),m=a(i,"endFrame",-1),T=a(i,"margin",0),C=a(i,"spacing",0),S=Math.floor((n-T+C)/(h+C)),P=Math.floor((l-T+C)/(u+C)),A=S*P;A===0&&console.warn("SpriteSheet frame dimensions will result in zero frames for texture:",o.key),(v>A||v<-A)&&(v=0),v<0&&(v=A+v),(m===-1||m>A||mn&&(I=z-n),W>l&&(D=W-l),G>=v&&G<=m&&(o.add(B,s,r+L,e+F,h-I,u-D),B++),L+=h+C,L+h>n&&(L=T,F+=u+C)}return o};d.exports=p},47534:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(95540),p=function(o,s,r){var e=a(r,"frameWidth",null),n=a(r,"frameHeight",e);if(!e)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var l=o.source[0];o.add("__BASE",0,0,0,l.width,l.height),a(r,"startFrame",0),a(r,"endFrame",-1);for(var i=a(r,"margin",0),h=a(r,"spacing",0),u=s.cutX,c=s.cutY,v=s.cutWidth,m=s.cutHeight,T=s.realWidth,C=s.realHeight,S=Math.floor((T-i+h)/(e+h)),P=Math.floor((C-i+h)/(n+h)),A=s.x,L=e-A,F=e-(T-v-A),I=s.y,D=n-I,B=n-(C-m-I),G,z=i,W=i,Y=0,K=0,Z=0;Z{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=0,t=function(p,o,s,r){var e=x-r.y-r.height;p.add(s,o,r.x,e,r.width,r.height)},a=function(p,o,s){var r=p.source[o];p.add("__BASE",o,0,0,r.width,r.height),x=r.height;for(var e=s.split(` +`),n=/^[ ]*(- )*(\w+)+[: ]+(.*)/,l="",i="",h={x:0,y:0,width:0,height:0},u=0;u{/** + * @author Ben Richards + * @copyright 2024 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(50030),p=function(l){for(var i=l.mipmaps,h=1;h{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.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:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports={CSV:0,TILED_JSON:1,ARRAY_2D:2,WELTMEISTER:3}},16536:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=new a({initialize:function(s,r,e,n,l,i,h){(e===void 0||e<=0)&&(e=32),(n===void 0||n<=0)&&(n=32),l===void 0&&(l=0),i===void 0&&(i=0),this.name=s,this.firstgid=r|0,this.imageWidth=e|0,this.imageHeight=n|0,this.imageMargin=l|0,this.imageSpacing=i|0,this.properties=h||{},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),p=new a({initialize:function(s){if(this.gids=[],s!==void 0)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(80341),p=t(87010),o=t(46177),s=t(49075),r=function(e,n,l,i,h,u,c,v){l===void 0&&(l=32),i===void 0&&(i=32),h===void 0&&(h=10),u===void 0&&(u=10),v===void 0&&(v=!1);var m=null;if(Array.isArray(c)){var T=n!==void 0?n:"map";m=o(T,a.ARRAY_2D,c,l,i,v)}else if(n!==void 0){var C=e.cache.tilemap.get(n);C?m=o(n,C.format,C.data,l,i,v):console.warn("No map data found for key "+n)}return m===null&&(m=new p({tileWidth:l,tileHeight:i,width:h,height:u})),new s(e,m)};d.exports=r},23029:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(31401),o=t(91907),s=t(62644),r=t(93232),e=new a({Mixins:[p.AlphaSingle,p.Flip,p.Visible],initialize:function(l,i,h,u,c,v,m,T){this.layer=l,this.index=i,this.x=h,this.y=u,this.width=c,this.height=v,this.right,this.bottom,this.baseWidth=m!==void 0?m:c,this.baseHeight=T!==void 0?T:v,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(n,l){return!(nthis.right||l>this.bottom)},copy:function(n){return this.index=n.index,this.alpha=n.alpha,this.properties=s(n.properties),this.visible=n.visible,this.setFlip(n.flipX,n.flipY),this.tint=n.tint,this.rotation=n.rotation,this.collideUp=n.collideUp,this.collideDown=n.collideDown,this.collideLeft=n.collideLeft,this.collideRight=n.collideRight,this.collisionCallback=n.collisionCallback,this.collisionCallbackContext=n.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(n){var l=this.tilemapLayer;if(l){var i=l.tileToWorldXY(this.x,this.y,void 0,n);return i.x}return this.x*this.baseWidth},getRight:function(n){var l=this.tilemapLayer;return l?this.getLeft(n)+this.width*l.scaleX:this.getLeft(n)+this.width},getTop:function(n){var l=this.tilemapLayer;if(l){var i=l.tileToWorldXY(this.x,this.y,void 0,n);return i.y}return this.y*this.baseWidth-(this.height-this.baseHeight)},getBottom:function(n){var l=this.tilemapLayer;return l?this.getTop(n)+this.height*l.scaleY:this.getTop(n)+this.height},getBounds:function(n,l){return l===void 0&&(l=new r),l.x=this.getLeft(n),l.y=this.getTop(n),l.width=this.getRight(n)-l.x,l.height=this.getBottom(n)-l.y,l},getCenterX:function(n){return(this.getLeft(n)+this.getRight(n))/2},getCenterY:function(n){return(this.getTop(n)+this.getBottom(n))/2},intersects:function(n,l,i,h){return!(i<=this.pixelX||h<=this.pixelY||n>=this.right||l>=this.bottom)},isInteresting:function(n,l){return n&&l?this.canCollide||this.hasInterestingFace:n?this.collides:l?this.hasInterestingFace:!1},resetCollision:function(n){if(n===void 0&&(n=!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,n){var l=this.tilemapLayer;l&&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(n,l,i,h,u){if(l===void 0&&(l=n),i===void 0&&(i=n),h===void 0&&(h=n),u===void 0&&(u=!0),this.collideLeft=n,this.collideRight=l,this.collideUp=i,this.collideDown=h,this.faceLeft=n,this.faceRight=l,this.faceTop=i,this.faceBottom=h,u){var c=this.tilemapLayer;c&&this.tilemapLayer.calculateFacesAt(this.x,this.y)}return this},setCollisionCallback:function(n,l){return n===null?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=n,this.collisionCallbackContext=l),this},setSize:function(n,l,i,h){return n!==void 0&&(this.width=n),l!==void 0&&(this.height=l),i!==void 0&&(this.baseWidth=i),h!==void 0&&(this.baseHeight=h),this.updatePixelXY(),this},updatePixelXY:function(){var n=this.layer.orientation;if(n===o.ORTHOGONAL)this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight;else if(n===o.ISOMETRIC)this.pixelX=(this.x-this.y)*this.baseWidth*.5,this.pixelY=(this.x+this.y)*this.baseHeight*.5;else if(n===o.STAGGERED)this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2),this.pixelY=this.y*(this.baseHeight/2);else if(n===o.HEXAGONAL){var l=this.layer.staggerAxis,i=this.layer.staggerIndex,h=this.layer.hexSideLength,u,c;l==="y"?(c=(this.baseHeight-h)/2+h,i==="odd"?this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2):this.pixelX=this.x*this.baseWidth-this.y%2*(this.baseWidth/2),this.pixelY=this.y*c):l==="x"&&(u=(this.baseWidth-h)/2+h,this.pixelX=this.x*u,i==="odd"?this.pixelY=this.y*this.baseHeight+this.x%2*(this.baseHeight/2):this.pixelY=this.y*this.baseHeight-this.x%2*(this.baseHeight/2))}return this.right=this.pixelX+this.baseWidth,this.bottom=this.pixelY+this.baseHeight,this},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||this.collisionCallback!==void 0}},collides:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}},hasInterestingFace:{get:function(){return this.faceTop||this.faceBottom||this.faceLeft||this.faceRight}},tileset:{get:function(){var n=this.layer.tilemapLayer;if(n){var l=n.gidMap[this.index];if(l)return l}return null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var n=this.tilemapLayer;return n?n.tilemap:null}}});d.exports=e},49075:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(84101),p=t(83419),o=t(39506),s=t(80341),r=t(95540),e=t(14977),n=t(27462),l=t(91907),i=t(36305),h=t(19133),u=t(68287),c=t(23029),v=t(81086),m=t(20442),T=t(33629),C=new p({initialize:function(P,A){this.scene=P,this.tileWidth=A.tileWidth,this.tileHeight=A.tileHeight,this.width=A.width,this.height=A.height,this.orientation=A.orientation,this.renderOrder=A.renderOrder,this.format=A.format,this.version=A.version,this.properties=A.properties,this.widthInPixels=A.widthInPixels,this.heightInPixels=A.heightInPixels,this.imageCollections=A.imageCollections,this.images=A.images,this.layers=A.layers,this.tiles=A.tiles,this.tilesets=A.tilesets,this.objects=A.objects,this.currentLayerIndex=0,this.hexSideLength=A.hexSideLength;var L=this.orientation;this._convert={WorldToTileXY:v.GetWorldToTileXYFunction(L),WorldToTileX:v.GetWorldToTileXFunction(L),WorldToTileY:v.GetWorldToTileYFunction(L),TileToWorldXY:v.GetTileToWorldXYFunction(L),TileToWorldX:v.GetTileToWorldXFunction(L),TileToWorldY:v.GetTileToWorldYFunction(L),GetTileCorners:v.GetTileCornersFunction(L)}},setRenderOrder:function(S){var P=["right-down","left-down","right-up","left-up"];return typeof S=="number"&&(S=P[S]),P.indexOf(S)>-1&&(this.renderOrder=S),this},addTilesetImage:function(S,P,A,L,F,I,D,B){if(S===void 0)return null;P==null&&(P=S);var G=this.scene.sys.textures;if(!G.exists(P))return console.warn('Texture key "%s" not found',P),null;var z=G.get(P),W=this.getTilesetIndex(S);if(W===null&&this.format===s.TILED_JSON)return console.warn('Tilemap has no tileset "%s". Its tilesets are %o',S,this.tilesets),null;var Y=this.tilesets[W];return Y?(Y.setTileSize(A,L),Y.setSpacing(F,I),Y.setImage(z),Y):(A===void 0&&(A=this.tileWidth),L===void 0&&(L=this.tileHeight),F===void 0&&(F=0),I===void 0&&(I=0),D===void 0&&(D=0),B===void 0&&(B={x:0,y:0}),Y=new T(S,D,A,L,F,I,void 0,void 0,B),Y.setImage(z),this.tilesets.push(Y),this.tiles=a(this),Y)},copy:function(S,P,A,L,F,I,D,B){return B=this.getLayer(B),B!==null?(v.Copy(S,P,A,L,F,I,D,B),this):null},createBlankLayer:function(S,P,A,L,F,I,D,B){A===void 0&&(A=0),L===void 0&&(L=0),F===void 0&&(F=this.width),I===void 0&&(I=this.height),D===void 0&&(D=this.tileWidth),B===void 0&&(B=this.tileHeight);var G=this.getLayerIndex(S);if(G!==null)return console.warn("Invalid Tilemap Layer ID: "+S),null;for(var z=new e({name:S,tileWidth:D,tileHeight:B,width:F,height:I,orientation:this.orientation}),W,Y=0;Y-1&&this.putTileAt(P,I.x,I.y,A,I.tilemapLayer)}return L},removeTileAt:function(S,P,A,L,F){return A===void 0&&(A=!0),L===void 0&&(L=!0),F=this.getLayer(F),F===null?null:v.RemoveTileAt(S,P,A,L,F)},removeTileAtWorldXY:function(S,P,A,L,F,I){return A===void 0&&(A=!0),L===void 0&&(L=!0),I=this.getLayer(I),I===null?null:v.RemoveTileAtWorldXY(S,P,A,L,F,I)},renderDebug:function(S,P,A){return A=this.getLayer(A),A===null?null:(this.orientation===l.ORTHOGONAL&&v.RenderDebug(S,P,A),this)},renderDebugFull:function(S,P){for(var A=this.layers,L=0;L{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(44603),p=t(31989);a.register("tilemap",function(o){var s=o!==void 0?o:{};return p(this.scene,s.key,s.tileWidth,s.tileHeight,s.width,s.height,s.data,s.insertNull)})},46029:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(39429),p=t(31989);a.register("tilemap",function(o,s,r,e,n,l,i){return o===null&&(o=void 0),s===null&&(s=void 0),r===null&&(r=void 0),e===null&&(e=void 0),n===null&&(n=void 0),p(this.scene,o,s,r,e,n,l,i)})},20442:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(78389),o=t(31401),s=t(95643),r=t(81086),e=t(19218),n=t(26099),l=new a({Extends:s,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,p,e],initialize:function(h,u,c,v,m,T){s.call(this,h,"TilemapLayer"),this.isTilemap=!0,this.tilemap=u,this.layerIndex=c,this.layer=u.layers[c],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=r.GetCullTilesFunction(this.layer.orientation),this._renderOrder=0,this.gidMap=[],this.tempVec=new n,this.collisionCategory=1,this.collisionMask=1,this.setTilesets(v),this.setAlpha(this.layer.alpha),this.setPosition(m,T),this.setOrigin(0,0),this.setSize(u.tileWidth*this.layer.width,u.tileHeight*this.layer.height),this.initPipeline(),this.initPostPipeline(!1)},setTilesets:function(i){var h=[],u=[],c=this.tilemap;Array.isArray(i)||(i=[i]);for(var v=0;v=0&&i<4&&(this._renderOrder=i),this},calculateFacesAt:function(i,h){return r.CalculateFacesAt(i,h,this.layer),this},calculateFacesWithin:function(i,h,u,c){return r.CalculateFacesWithin(i,h,u,c,this.layer),this},createFromTiles:function(i,h,u,c,v){return r.CreateFromTiles(i,h,u,c,v,this.layer)},cull:function(i){return this.cullCallback(this.layer,i,this.culledTiles,this._renderOrder)},copy:function(i,h,u,c,v,m,T){return r.Copy(i,h,u,c,v,m,T,this.layer),this},fill:function(i,h,u,c,v,m){return r.Fill(i,h,u,c,v,m,this.layer),this},filterTiles:function(i,h,u,c,v,m,T){return r.FilterTiles(i,h,u,c,v,m,T,this.layer)},findByIndex:function(i,h,u){return r.FindByIndex(i,h,u,this.layer)},findTile:function(i,h,u,c,v,m,T){return r.FindTile(i,h,u,c,v,m,T,this.layer)},forEachTile:function(i,h,u,c,v,m,T){return r.ForEachTile(i,h,u,c,v,m,T,this.layer),this},setTint:function(i,h,u,c,v,m){i===void 0&&(i=16777215);var T=function(C){C.tint=i,C.tintFill=!1};return this.forEachTile(T,this,h,u,c,v,m)},setTintFill:function(i,h,u,c,v,m){i===void 0&&(i=16777215);var T=function(C){C.tint=i,C.tintFill=!0};return this.forEachTile(T,this,h,u,c,v,m)},getTileAt:function(i,h,u){return r.GetTileAt(i,h,u,this.layer)},getTileAtWorldXY:function(i,h,u,c){return r.GetTileAtWorldXY(i,h,u,c,this.layer)},getIsoTileAtWorldXY:function(i,h,u,c,v){u===void 0&&(u=!0);var m=this.tempVec;return r.IsometricWorldToTileXY(i,h,!0,m,v,this.layer,u),this.getTileAt(m.x,m.y,c)},getTilesWithin:function(i,h,u,c,v){return r.GetTilesWithin(i,h,u,c,v,this.layer)},getTilesWithinShape:function(i,h,u){return r.GetTilesWithinShape(i,h,u,this.layer)},getTilesWithinWorldXY:function(i,h,u,c,v,m){return r.GetTilesWithinWorldXY(i,h,u,c,v,m,this.layer)},hasTileAt:function(i,h){return r.HasTileAt(i,h,this.layer)},hasTileAtWorldXY:function(i,h,u){return r.HasTileAtWorldXY(i,h,u,this.layer)},putTileAt:function(i,h,u,c){return r.PutTileAt(i,h,u,c,this.layer)},putTileAtWorldXY:function(i,h,u,c,v){return r.PutTileAtWorldXY(i,h,u,c,v,this.layer)},putTilesAt:function(i,h,u,c){return r.PutTilesAt(i,h,u,c,this.layer),this},randomize:function(i,h,u,c,v){return r.Randomize(i,h,u,c,v,this.layer),this},removeTileAt:function(i,h,u,c){return r.RemoveTileAt(i,h,u,c,this.layer)},removeTileAtWorldXY:function(i,h,u,c,v){return r.RemoveTileAtWorldXY(i,h,u,c,v,this.layer)},renderDebug:function(i,h){return r.RenderDebug(i,h,this.layer),this},replaceByIndex:function(i,h,u,c,v,m){return r.ReplaceByIndex(i,h,u,c,v,m,this.layer),this},setSkipCull:function(i){return i===void 0&&(i=!0),this.skipCull=i,this},setCullPadding:function(i,h){return i===void 0&&(i=1),h===void 0&&(h=1),this.cullPaddingX=i,this.cullPaddingY=h,this},setCollision:function(i,h,u,c){return r.SetCollision(i,h,u,this.layer,c),this},setCollisionBetween:function(i,h,u,c){return r.SetCollisionBetween(i,h,u,c,this.layer),this},setCollisionByProperty:function(i,h,u){return r.SetCollisionByProperty(i,h,u,this.layer),this},setCollisionByExclusion:function(i,h,u){return r.SetCollisionByExclusion(i,h,u,this.layer),this},setCollisionFromCollisionGroup:function(i,h){return r.SetCollisionFromCollisionGroup(i,h,this.layer),this},setTileIndexCallback:function(i,h,u){return r.SetTileIndexCallback(i,h,u,this.layer),this},setTileLocationCallback:function(i,h,u,c,v,m){return r.SetTileLocationCallback(i,h,u,c,v,m,this.layer),this},shuffle:function(i,h,u,c){return r.Shuffle(i,h,u,c,this.layer),this},swapByIndex:function(i,h,u,c,v,m){return r.SwapByIndex(i,h,u,c,v,m,this.layer),this},tileToWorldX:function(i,h){return this.tilemap.tileToWorldX(i,h,this)},tileToWorldY:function(i,h){return this.tilemap.tileToWorldY(i,h,this)},tileToWorldXY:function(i,h,u,c){return this.tilemap.tileToWorldXY(i,h,u,c,this)},getTileCorners:function(i,h,u){return this.tilemap.getTileCorners(i,h,u,this)},weightedRandomize:function(i,h,u,c,v){return r.WeightedRandomize(h,u,c,v,i,this.layer),this},worldToTileX:function(i,h,u){return this.tilemap.worldToTileX(i,h,u,this)},worldToTileY:function(i,h,u){return this.tilemap.worldToTileY(i,h,u,this)},worldToTileXY:function(i,h,u,c,v){return this.tilemap.worldToTileXY(i,h,u,c,v,this)},destroy:function(i){i===void 0&&(i=!0),this.tilemap&&(this.layer.tilemapLayer===this&&(this.layer.tilemapLayer=void 0),i&&this.tilemap.removeLayer(this),this.tilemap=void 0,this.layer=void 0,this.culledTiles.length=0,this.cullCallback=null,this.gidMap=[],this.tileset=[],s.prototype.destroy.call(this))}});d.exports=l},16153:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(61340),p=new a,o=new a,s=new a,r=function(e,n,l,i){var h=n.cull(l),u=h.length,c=l.alpha*n.alpha;if(!(u===0||c<=0)){var v=p,m=o,T=s;m.applyITRS(n.x,n.y,n.rotation,n.scaleX,n.scaleY),v.copyFrom(l.matrix);var C=e.currentContext,S=n.gidMap;C.save(),i?(v.multiplyWithOffset(i,-l.scrollX*n.scrollFactorX,-l.scrollY*n.scrollFactorY),m.e=n.x,m.f=n.y,v.multiply(m,T),T.copyToContext(C)):(m.e-=l.scrollX*n.scrollFactorX,m.f-=l.scrollY*n.scrollFactorY,m.copyToContext(C)),(!e.antialias||n.scaleX>1||n.scaleY>1)&&(C.imageSmoothingEnabled=!1);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(29747),p=a,o=a;p=t(99558),o=t(16153),d.exports={renderWebGL:p,renderCanvas:o}},99558:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(70554),p=function(o,s,r){var e=s.cull(r),n=e.length,l=r.alpha*s.alpha;if(!(n===0||l<=0)){var i=s.gidMap,h=o.pipelines.set(s.pipeline,s),u=a.getTintAppendFloatAlpha,c=s.scrollFactorX,v=s.scrollFactorY,m=s.x,T=s.y,C=s.scaleX,S=s.scaleY;o.pipelines.preBatch(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),p=t(26099),o=new a({initialize:function(r,e,n,l,i,h,u,c,v){(n===void 0||n<=0)&&(n=32),(l===void 0||l<=0)&&(l=32),i===void 0&&(i=0),h===void 0&&(h=0),u===void 0&&(u={}),c===void 0&&(c={}),this.name=r,this.firstgid=e,this.tileWidth=n,this.tileHeight=l,this.tileMargin=i,this.tileSpacing=h,this.tileProperties=u,this.tileData=c,this.tileOffset=new p,v!==void 0&&this.tileOffset.set(v.x,v.y),this.image=null,this.glTexture=null,this.rows=0,this.columns=0,this.total=0,this.texCoordinates=[]},getTileProperties:function(s){return this.containsTileIndex(s)?this.tileProperties[s-this.firstgid]:null},getTileData:function(s){return this.containsTileIndex(s)?this.tileData[s-this.firstgid]:null},getTileCollisionGroup:function(s){var r=this.getTileData(s);return r&&r.objectgroup?r.objectgroup:null},containsTileIndex:function(s){return s>=this.firstgid&&se.width||r.height>e.height?this.updateTileData(r.width,r.height):this.updateTileData(e.width,e.height,e.x,e.y),this},setTileSize:function(s,r){return s!==void 0&&(this.tileWidth=s),r!==void 0&&(this.tileHeight=r),this.image&&this.updateTileData(this.image.source[0].width,this.image.source[0].height),this},setSpacing:function(s,r){return s!==void 0&&(this.tileMargin=s),r!==void 0&&(this.tileSpacing=r),this.image&&this.updateTileData(this.image.source[0].width,this.image.source[0].height),this},updateTileData:function(s,r,e,n){e===void 0&&(e=0),n===void 0&&(n=0);var l=(r-this.tileMargin*2+this.tileSpacing)/(this.tileHeight+this.tileSpacing),i=(s-this.tileMargin*2+this.tileSpacing)/(this.tileWidth+this.tileSpacing);(l%1!==0||i%1!==0)&&console.warn("Image tile area not tile size multiple in: "+this.name),l=Math.floor(l),i=Math.floor(i),this.rows=l,this.columns=i,this.total=l*i,this.texCoordinates.length=0;for(var h=this.tileMargin+e,u=this.tileMargin+n,c=0;c{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(7423),p=function(o,s,r){var e=a(o,s,!0,r),n=a(o,s-1,!0,r),l=a(o,s+1,!0,r),i=a(o-1,s,!0,r),h=a(o+1,s,!0,r),u=e&&e.collides;return u&&(e.faceTop=!0,e.faceBottom=!0,e.faceLeft=!0,e.faceRight=!0),n&&n.collides&&(u&&(e.faceTop=!1),n.faceBottom=!u),l&&l.collides&&(u&&(e.faceBottom=!1),l.faceTop=!u),i&&i.collides&&(u&&(e.faceLeft=!1),i.faceRight=!u),h&&h.collides&&(u&&(e.faceRight=!1),h.faceLeft=!u),e&&!e.collides&&e.resetFaces(),e};d.exports=p},42573:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(7423),p=t(7386),o=function(s,r,e,n,l){for(var i=null,h=null,u=null,c=null,v=p(s,r,e,n,null,l),m=0;m{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(26099),p=new a,o=function(s,r,e,n){var l=e.tilemapLayer,i=l.cullPaddingX,h=l.cullPaddingY,u=l.tilemap.tileToWorldXY(s,r,p,n,l);return u.x>n.worldView.x+l.scaleX*e.tileWidth*(-i-.5)&&u.xn.worldView.y+l.scaleY*e.tileHeight*(-h-1)&&u.y{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(42573),p=t(7386),o=t(62991),s=t(23029),r=function(e,n,l,i,h,u,c,v){c===void 0&&(c=!0);var m=p(e,n,l,i,null,v),T=[];m.forEach(function(I){var D=new s(I.layer,I.index,I.x,I.y,I.width,I.height,I.baseWidth,I.baseHeight);D.copy(I),T.push(D)});for(var C=h-e,S=u-n,P=0;P{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(62644),p=t(7386),o=t(27987),s=function(r,e,n,l,i,h){n||(n={}),Array.isArray(r)||(r=[r]);var u=h.tilemapLayer;l||(l=u.scene),i||(i=l.cameras.main);var c=h.width,v=h.height,m=p(0,0,c,v,null,h),T=[],C,S=function(F,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 a=t(87841),p=t(63448),o=t(56583),s=new a,r=function(e,n){var l=e.tilemapLayer.tilemap,i=e.tilemapLayer,h=Math.floor(l.tileWidth*i.scaleX),u=Math.floor(l.tileHeight*i.scaleY),c=o(n.worldView.x-i.x,h,0,!0)-i.cullPaddingX,v=p(n.worldView.right-i.x,h,0,!0)+i.cullPaddingX,m=o(n.worldView.y-i.y,u,0,!0)-i.cullPaddingY,T=p(n.worldView.bottom-i.y,u,0,!0)+i.cullPaddingY;return s.setTo(c,m,v-c,T-m)};d.exports=r},30003:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(19545),p=t(32483),o=function(s,r,e,n){e===void 0&&(e=[]),n===void 0&&(n=0),e.length=0;var l=s.tilemapLayer,i=a(s,r);return(l.skipCull||l.scrollFactorX!==1||l.scrollFactorY!==1)&&(i.left=0,i.right=s.width,i.top=0,i.bottom=s.height),p(s,i,n,e),e};d.exports=o},35137:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(7386),p=t(42573),o=t(20576),s=function(r,e,n,l,i,h,u){for(var c=u.collideIndexes.indexOf(r)!==-1,v=a(e,n,l,i,null,u),m=0;m{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(7386),p=function(o,s,r,e,n,l,i,h){var u=a(r,e,n,l,i,h);return u.filter(o,s)};d.exports=p},52692:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p,o){a===void 0&&(a=0),p===void 0&&(p=!1);var s=0,r,e,n;if(p){for(e=o.height-1;e>=0;e--)for(r=o.width-1;r>=0;r--)if(n=o.data[e][r],n&&n.index===t){if(s===a)return n;s+=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),p=function(o,s,r,e,n,l,i,h){var u=a(r,e,n,l,i,h);return u.find(o,s)||null};d.exports=p},97560:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(7386),p=function(o,s,r,e,n,l,i,h){var u=a(r,e,n,l,i,h);u.forEach(o,s)};d.exports=p},43305:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(91907),p=t(30003),o=t(9474),s=t(14018),r=t(29747),e=t(54503),n=function(l){return l===a.ORTHOGONAL?p:l===a.HEXAGONAL?o:l===a.STAGGERED?e:l===a.ISOMETRIC?s:r};d.exports=n},7423:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(62991),p=function(o,s,r,e){if(r===void 0&&(r=!1),a(o,s,e)){var n=e.data[s][o]||null;return n?n.index===-1?r?n:null:n:null}else return null};d.exports=p},60540:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(7423),p=t(26099),o=new p,s=function(r,e,n,l,i){return i.tilemapLayer.worldToTileXY(r,e,!0,o,l),a(o.x,o.y,n,i)};d.exports=s},55826:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(26099),p=function(o,s,r,e){var n=e.baseTileWidth,l=e.baseTileHeight,i=e.tilemapLayer,h=0,u=0;i&&(r||(r=i.scene.cameras.main),h=i.x+r.scrollX*(1-i.scrollFactorX),u=i.y+r.scrollY*(1-i.scrollFactorY),n*=i.scaleX,l*=i.scaleY);var c=h+o*n,v=u+s*l;return[new a(c,v),new a(c+n,v),new a(c+n,v+l),new a(c,v+l)]};d.exports=p},11758:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(91907),p=t(27229),o=t(29747),s=t(55826),r=function(e){return e===a.ORTHOGONAL?s:e===a.ISOMETRIC?o:e===a.HEXAGONAL?p:(e===a.STAGGERED,o)};d.exports=r},39167:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(91907),p=t(29747),o=t(97281),s=function(r){return r===a.ORTHOGONAL?o:p};d.exports=s},62e3:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(91907),p=t(19951),o=t(14127),s=t(29747),r=t(97202),e=t(70326),n=function(l){return l===a.ORTHOGONAL?e:l===a.ISOMETRIC?o:l===a.HEXAGONAL?p:l===a.STAGGERED?r:s};d.exports=n},5984:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(91907),p=t(29747),o=t(28054),s=t(29650),r=function(e){return e===a.ORTHOGONAL?s:e===a.STAGGERED?o:p};d.exports=r},7386:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(95540),p=function(o,s,r,e,n,l){o===void 0&&(o=0),s===void 0&&(s=0),r===void 0&&(r=l.width),e===void 0&&(e=l.height),n||(n={});var i=a(n,"isNotEmpty",!1),h=a(n,"isColliding",!1),u=a(n,"hasInterestingFace",!1);o<0&&(r+=o,o=0),s<0&&(e+=s,s=0),o+r>l.width&&(r=Math.max(l.width-o,0)),s+e>l.height&&(e=Math.max(l.height-s,0));for(var c=[],v=s;v{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(55738),p=t(7386),o=t(91865),s=t(29747),r=t(26099),e=function(u,c){return o.RectangleToTriangle(c,u)},n=new r,l=new r,i=new r,h=function(u,c,v,m){if(u===void 0)return[];var T=s;u instanceof a.Circle?T=o.CircleToRectangle:u instanceof a.Rectangle?T=o.RectangleToRectangle:u instanceof a.Triangle?T=e:u instanceof a.Line&&(T=o.LineToRectangle),m.tilemapLayer.worldToTileXY(u.left,u.top,!0,l,v);var C=l.x,S=l.y;m.tilemapLayer.worldToTileXY(u.right,u.bottom,!1,i,v);var P=Math.ceil(i.x),A=Math.ceil(i.y),L=Math.max(P-C,1),F=Math.max(A-S,1),I=p(C,S,L,F,c,m),D=m.tileWidth,B=m.tileHeight;m.tilemapLayer&&(D*=m.tilemapLayer.scaleX,B*=m.tilemapLayer.scaleY);for(var G=[],z=new a.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 a=t(7386),p=t(26099),o=new p,s=new p,r=function(e,n,l,i,h,u,c){var v=c.tilemapLayer.tilemap._convert.WorldToTileXY;v(e,n,!0,o,u,c);var m=o.x,T=o.y;v(e+l,n+i,!1,s,u,c);var C=Math.ceil(s.x),S=Math.ceil(s.y);return a(m,T,C-m,S-T,h,c)};d.exports=r},96113:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(91907),p=t(20242),o=t(10095),s=function(r){return r===a.ORTHOGONAL?o:p};d.exports=s},16926:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(91907),p=t(86625),o=t(96897),s=t(29747),r=t(15108),e=t(85896),n=function(l){return l===a.ORTHOGONAL?e:l===a.ISOMETRIC?o:l===a.HEXAGONAL?p:l===a.STAGGERED?r:s};d.exports=n},55762:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(91907),p=t(20242),o=t(51900),s=t(63288),r=function(e){return e===a.ORTHOGONAL?s:e===a.STAGGERED?o:p};d.exports=r},45091:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(62991),p=function(o,s,r){if(a(o,s,r)){var e=r.data[s][o];return e!==null&&e.index>-1}else return!1};d.exports=p},24152:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(45091),p=t(26099),o=new p,s=function(r,e,n,l){l.tilemapLayer.worldToTileXY(r,e,!0,o,n);var i=o.x,h=o.y;return a(i,h,l)};d.exports=s},90454:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(63448),p=t(56583),o=function(s,r){var e=s.tilemapLayer.tilemap,n=s.tilemapLayer,l=Math.floor(e.tileWidth*n.scaleX),i=Math.floor(e.tileHeight*n.scaleY),h=s.hexSideLength,u,c,v,m;if(s.staggerAxis==="y"){var T=(i-h)/2+h;u=p(r.worldView.x-n.x,l,0,!0)-n.cullPaddingX,c=a(r.worldView.right-n.x,l,0,!0)+n.cullPaddingX,v=p(r.worldView.y-n.y,T,0,!0)-n.cullPaddingY,m=a(r.worldView.bottom-n.y,T,0,!0)+n.cullPaddingY}else{var C=(l-h)/2+h;u=p(r.worldView.x-n.x,C,0,!0)-n.cullPaddingX,c=a(r.worldView.right-n.x,C,0,!0)+n.cullPaddingX,v=p(r.worldView.y-n.y,i,0,!0)-n.cullPaddingY,m=a(r.worldView.bottom-n.y,i,0,!0)+n.cullPaddingY}return{left:u,right:c,top:v,bottom:m}};d.exports=o},9474:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(90454),p=t(32483),o=function(s,r,e,n){e===void 0&&(e=[]),n===void 0&&(n=0),e.length=0;var l=s.tilemapLayer,i=a(s,r);return l.skipCull&&l.scrollFactorX===1&&l.scrollFactorY===1&&(i.left=0,i.right=s.width,i.top=0,i.bottom=s.height),p(s,i,n,e),e};d.exports=o},27229:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(19951),p=t(26099),o=new p,s=function(r,e,n,l){var i=l.baseTileWidth,h=l.baseTileHeight,u=l.tilemapLayer;u&&(i*=u.scaleX,h*=u.scaleY);var c=a(r,e,o,n,l),v=[],m=.5773502691896257,T,C;l.staggerAxis==="y"?(T=m*i,C=h/2):(T=i/2,C=m*h);for(var S=0;S<6;S++){var P=2*Math.PI*(.5-S)/6;v.push(new p(c.x+T*Math.cos(P),c.y+C*Math.sin(P)))}return v};d.exports=s},19951:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(26099),p=function(o,s,r,e,n){r||(r=new a);var l=n.baseTileWidth,i=n.baseTileHeight,h=n.tilemapLayer,u=0,c=0;h&&(e||(e=h.scene.cameras.main),u=h.x+e.scrollX*(1-h.scrollFactorX),c=h.y+e.scrollY*(1-h.scrollFactorY),l*=h.scaleX,i*=h.scaleY);var v=l/2,m=i/2,T,C;return n.staggerAxis==="y"?(T=u+l*o+l,C=c+1.5*s*m+m,s%2===0&&(this.staggerIndex==="odd"?T-=v:T+=v)):this.staggerAxis==="x"&&this.staggerIndex==="odd"&&(T=u+1.5*o*v+v,C=c+i*o+i,o%2===0&&(this.staggerIndex==="odd"?C-=m:C+=m)),r.set(T,C)};d.exports=p},86625:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(26099),p=function(o,s,r,e,n,l){e||(e=new a);var i=l.baseTileWidth,h=l.baseTileHeight,u=l.tilemapLayer;u&&(n||(n=u.scene.cameras.main),o=o-(u.x+n.scrollX*(1-u.scrollFactorX)),s=s-(u.y+n.scrollY*(1-u.scrollFactorY)),i*=u.scaleX,h*=u.scaleY);var c=.5773502691896257,v=-.3333333333333333,m=0,T=.6666666666666666,C=i/2,S=h/2,P,A,L,F,I;l.staggerAxis==="y"?(P=(o-C)/(c*i),A=(s-S)/S,L=c*P+v*A,F=m*P+T*A):(P=(o-C)/C,A=(s-S)/(c*h),L=v*P+c*A,F=T*P+m*A),I=-L-F;var D=Math.round(L),B=Math.round(F),G=Math.round(I),z=Math.abs(D-L),W=Math.abs(B-F),Y=Math.abs(G-I);z>W&&z>Y?D=-B-G:W>Y&&(B=-D-G);var K,Z=B;return l.staggerIndex==="odd"?K=Z%2===0?B/2+D:B/2+D-.5:K=Z%2===0?B/2+D:B/2+D+.5,e.set(K,Z)};d.exports=p},62991:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){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),p=function(o,s,r,e){r===void 0&&(r=[]),e===void 0&&(e=0),r.length=0;var n=o.tilemapLayer,l=o.data,i=o.width,h=o.height,u=n.skipCull,c=0,v=i,m=0,T=h,C,S,P;if(e===0)for(S=m;S=c;C--)P=l[S][C],!(!P||P.index===-1||!P.visible||P.alpha===0)&&(!u&&!a(C,S,o,s)||r.push(P));else if(e===2)for(S=T;S>=m;S--)for(C=c;C=m;S--)for(C=v;C>=c;C--)P=l[S][C],!(!P||P.index===-1||!P.visible||P.alpha===0)&&(!u&&!a(C,S,o,s)||r.push(P));return n.tilesDrawn=r.length,n.tilesTotal=i*h,r};d.exports=p},14127:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(26099),p=function(o,s,r,e,n){r||(r=new a);var l=n.baseTileWidth,i=n.baseTileHeight,h=n.tilemapLayer,u=0,c=0;h&&(e||(e=h.scene.cameras.main),u=h.x+e.scrollX*(1-h.scrollFactorX),l*=h.scaleX,c=h.y+e.scrollY*(1-h.scrollFactorY),i*=h.scaleY);var v=u+(o-s)*(l/2),m=c+(o+s)*(i/2);return r.set(v,m)};d.exports=p},96897:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(26099),p=function(o,s,r,e,n,l,i){e||(e=new a);var h=l.baseTileWidth,u=l.baseTileHeight,c=l.tilemapLayer;c&&(n||(n=c.scene.cameras.main),s=s-(c.y+n.scrollY*(1-c.scrollFactorY)),u*=c.scaleY,o=o-(c.x+n.scrollX*(1-c.scrollFactorX)),h*=c.scaleX);var v=h/2,m=u/2;o=o-v,i||(s=s-u);var T=.5*(o/v+s/m),C=.5*(-o/v+s/m);return r&&(T=Math.floor(T),C=Math.floor(C)),e.set(T,C)};d.exports=p},71558:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(23029),p=t(62991),o=t(72023),s=t(20576),r=function(e,n,l,i,h){if(i===void 0&&(i=!0),!p(n,l,h))return null;var u,c=h.data[l][n],v=c&&c.collides;e instanceof a?(h.data[l][n]===null&&(h.data[l][n]=new a(h,e.index,n,l,h.tileWidth,h.tileHeight)),h.data[l][n].copy(e)):(u=e,h.data[l][n]===null?h.data[l][n]=new a(h,u,n,l,h.tileWidth,h.tileHeight):h.data[l][n].index=u);var m=h.data[l][n],T=h.collideIndexes.indexOf(m.index)!==-1;if(u=e instanceof a?e.index:e,u===-1)m.width=h.tileWidth,m.height=h.tileHeight;else{var C=h.tilemapLayer.tilemap,S=C.tiles,P=S[u][2],A=C.tilesets[P];m.width=A.tileWidth,m.height=A.tileHeight}return s(m,T),i&&v!==m.collides&&o(n,l,h),m};d.exports=r},26303:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(71558),p=t(26099),o=new p,s=function(r,e,n,l,i,h){return h.tilemapLayer.worldToTileXY(e,n,!0,o,i,h),a(r,o.x,o.y,l,h)};d.exports=s},14051:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(42573),p=t(71558),o=function(s,r,e,n,l){if(n===void 0&&(n=!0),!Array.isArray(s))return null;Array.isArray(s[0])||(s=[s]);for(var i=s.length,h=s[0].length,u=0;u{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(7386),p=t(26546),o=function(s,r,e,n,l,i){var h,u=a(s,r,e,n,{},i);if(!l)for(l=[],h=0;h{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(23029),p=t(62991),o=t(72023),s=function(r,e,n,l,i){if(n===void 0&&(n=!0),l===void 0&&(l=!0),!p(r,e,i))return null;var h=i.data[e][r];if(h)i.data[e][r]=n?null:new a(i,-1,r,e,i.tileWidth,i.tileHeight);else return null;return l&&h&&h.collides&&o(r,e,i),h};d.exports=s},94178:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(63557),p=t(26099),o=new p,s=function(r,e,n,l,i,h){return h.tilemapLayer.worldToTileXY(r,e,!0,o,i,h),a(o.x,o.y,n,l,h)};d.exports=s},15533:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(7386),p=t(3956),o=new p(105,210,231,150),s=new p(243,134,48,200),r=new p(40,39,37,150),e=function(n,l,i){l===void 0&&(l={});var h=l.tileColor!==void 0?l.tileColor:o,u=l.collidingTileColor!==void 0?l.collidingTileColor:s,c=l.faceColor!==void 0?l.faceColor:r,v=a(0,0,i.width,i.height,null,i);n.translateCanvas(i.tilemapLayer.x,i.tilemapLayer.y),n.scaleCanvas(i.tilemapLayer.scaleX,i.tilemapLayer.scaleY);for(var m=0;m{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(7386),p=function(o,s,r,e,n,l,i){for(var h=a(r,e,n,l,null,i),u=0;u{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p,o){var s=t.data,r=t.width,e=t.height,n=t.tilemapLayer,l=Math.max(0,a.left),i=Math.min(r,a.right),h=Math.max(0,a.top),u=Math.min(e,a.bottom),c,v,m;if(p===0)for(v=h;v=l;c--)m=s[v][c],!(!m||m.index===-1||!m.visible||m.alpha===0)&&o.push(m);else if(p===2)for(v=u;v>=h;v--)for(c=l;s[v]&&c=h;v--)for(c=i;s[v]&&c>=l;c--)m=s[v][c],!(!m||m.index===-1||!m.visible||m.alpha===0)&&o.push(m);return n.tilesDrawn=o.length,n.tilesTotal=r*e,o};d.exports=x},57068:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(20576),p=t(42573),o=t(9589),s=function(r,e,n,l,i){e===void 0&&(e=!0),n===void 0&&(n=!0),i===void 0&&(i=!0),Array.isArray(r)||(r=[r]);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(20576),p=t(42573),o=t(9589),s=function(r,e,n,l,i,h){if(n===void 0&&(n=!0),l===void 0&&(l=!0),h===void 0&&(h=!0),!(r>e)){for(var u=r;u<=e;u++)o(u,n,i);if(h)for(var c=0;c=r&&m.index<=e&&a(m,n)}l&&p(0,0,i.width,i.height,i)}};d.exports=s},75661:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(20576),p=t(42573),o=t(9589),s=function(r,e,n,l){e===void 0&&(e=!0),n===void 0&&(n=!0),Array.isArray(r)||(r=[r]);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(20576),p=t(42573),o=t(97022),s=function(r,e,n,l){e===void 0&&(e=!0),n===void 0&&(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 a=t(20576),p=t(42573),o=function(s,r,e){s===void 0&&(s=!0),r===void 0&&(r=!0);for(var n=0;n0&&a(i,s)}}r&&p(0,0,e.width,e.height,e)};d.exports=o},9589:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){var o=p.collideIndexes.indexOf(t);a&&o===-1?p.collideIndexes.push(t):!a&&o!==-1&&p.collideIndexes.splice(o,1)};d.exports=x},20576:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){a?t.setCollision(!0,!0,!0,!0,!1):t.resetCollision(!1)};d.exports=x},79583:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p,o){if(typeof t=="number")o.callbacks[t]=a!==null?{callback:a,callbackContext:p}:void 0;else for(var s=0,r=t.length;s{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(7386),p=function(o,s,r,e,n,l,i){for(var h=a(o,s,r,e,null,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(7386),p=t(33680),o=function(s,r,e,n,l){var i=a(s,r,e,n,null,l),h=i.map(function(c){return c.index});p(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(63448),p=t(56583),o=function(s,r){var e=s.tilemapLayer.tilemap,n=s.tilemapLayer,l=Math.floor(e.tileWidth*n.scaleX),i=Math.floor(e.tileHeight*n.scaleY),h=p(r.worldView.x-n.x,l,0,!0)-n.cullPaddingX,u=a(r.worldView.right-n.x,l,0,!0)+n.cullPaddingX,c=p(r.worldView.y-n.y,i/2,0,!0)-n.cullPaddingY,v=a(r.worldView.bottom-n.y,i/2,0,!0)+n.cullPaddingY;return{left:h,right:u,top:c,bottom:v}};d.exports=o},54503:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(61325),p=t(32483),o=function(s,r,e,n){e===void 0&&(e=[]),n===void 0&&(n=0),e.length=0;var l=s.tilemapLayer,i=a(s,r);return l.skipCull&&l.scrollFactorX===1&&l.scrollFactorY===1&&(i.left=0,i.right=s.width,i.top=0,i.bottom=s.height),p(s,i,n,e),e};d.exports=o},97202:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(26099),p=function(o,s,r,e,n){r||(r=new a);var l=n.baseTileWidth,i=n.baseTileHeight,h=n.tilemapLayer,u=0,c=0;h&&(e||(e=h.scene.cameras.main),u=h.x+e.scrollX*(1-h.scrollFactorX),l*=h.scaleX,c=h.y+e.scrollY*(1-h.scrollFactorY),i*=h.scaleY);var v=u+o*l+s%2*(l/2),m=c+s*(i/2);return r.set(v,m)};d.exports=p},28054:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){var o=p.baseTileHeight,s=p.tilemapLayer,r=0;return s&&(a===void 0&&(a=s.scene.cameras.main),r=s.y+a.scrollY*(1-s.scrollFactorY),o*=s.scaleY),r+t*(o/2)+o};d.exports=x},15108:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(26099),p=function(o,s,r,e,n,l){e||(e=new a);var i=l.baseTileWidth,h=l.baseTileHeight,u=l.tilemapLayer;u&&(n||(n=u.scene.cameras.main),s=s-(u.y+n.scrollY*(1-u.scrollFactorY)),h*=u.scaleY,o=o-(u.x+n.scrollX*(1-u.scrollFactorX)),i*=u.scaleX);var c=r?Math.floor(s/(h/2)):s/(h/2),v=r?Math.floor((o+c%2*.5*i)/i):(o+c%2*.5*i)/i;return e.set(v,c)};d.exports=p},51900:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p,o){var s=o.baseTileHeight,r=o.tilemapLayer;return r&&(p||(p=r.scene.cameras.main),t=t-(r.y+p.scrollY*(1-r.scrollFactorY)),s*=r.scaleY),a?Math.floor(t/(s/2)):t/(s/2)};d.exports=x},86560:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(7386),p=function(o,s,r,e,n,l,i){for(var h=a(r,e,n,l,null,i),u=0;u{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){var o=p.baseTileWidth,s=p.tilemapLayer,r=0;return s&&(a||(a=s.scene.cameras.main),r=s.x+a.scrollX*(1-s.scrollFactorX),o*=s.scaleX),r+t*o};d.exports=x},70326:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(97281),p=t(29650),o=t(26099),s=function(r,e,n,l,i){return n||(n=new o(0,0)),n.x=a(r,l,i),n.y=p(e,l,i),n};d.exports=s},29650:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){var o=p.baseTileHeight,s=p.tilemapLayer,r=0;return s&&(a||(a=s.scene.cameras.main),r=s.y+a.scrollY*(1-s.scrollFactorY),o*=s.scaleY),r+t*o};d.exports=x},77366:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(7386),p=t(75508),o=function(s,r,e,n,l,i){if(l){var h,u=a(s,r,e,n,null,i),c=0;for(h=0;h{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(85896),p=t(26099),o=new p,s=function(r,e,n,l){return a(r,0,e,o,n,l),o.x};d.exports=s},85896:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(26099),p=function(o,s,r,e,n,l){r===void 0&&(r=!0),e||(e=new a);var i=l.baseTileWidth,h=l.baseTileHeight,u=l.tilemapLayer;u&&(n||(n=u.scene.cameras.main),o=o-(u.x+n.scrollX*(1-u.scrollFactorX)),s=s-(u.y+n.scrollY*(1-u.scrollFactorY)),i*=u.scaleX,h*=u.scaleY);var c=o/i,v=s/h;return r&&(c=Math.floor(c),v=Math.floor(v)),e.set(c,v)};d.exports=p},63288:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(85896),p=t(26099),o=new p,s=function(r,e,n,l){return a(0,r,e,o,n,l),o.y};d.exports=s},81086:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.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:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports={ORTHOGONAL:0,ISOMETRIC:1,STAGGERED:2,HEXAGONAL:3}},21829:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a={ORIENTATION:t(91907)};d.exports=a},62501:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(79291),p=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,p.ORIENTATION),d.exports=o},14977:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(91907),o=t(95540),s=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",p.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")}});d.exports=s},87010:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(91907),o=t(95540),s=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",p.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")}});d.exports=s},48700:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(95540),o=new a({initialize:function(r){r===void 0&&(r={}),this.name=p(r,"name","object layer"),this.id=p(r,"id",0),this.opacity=p(r,"opacity",1),this.properties=p(r,"properties",{}),this.propertyTypes=p(r,"propertytypes",{}),this.type=p(r,"type","objectgroup"),this.visible=p(r,"visible",!0),this.objects=p(r,"objects",[]),Array.isArray(this.objects)||(this.objects=[])}});d.exports=o},6641:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(91907),p=function(o){return o=o.toLowerCase(),o==="isometric"?a.ISOMETRIC:o==="staggered"?a.STAGGERED:o==="hexagonal"?a.HEXAGONAL:a.ORTHOGONAL};d.exports=p},46177:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(80341),p=t(2342),o=t(82593),s=t(46594),r=t(87021),e=function(n,l,i,h,u,c){var v;switch(l){case a.ARRAY_2D:v=p(n,i,h,u,c);break;case a.CSV:v=o(n,i,h,u,c);break;case a.TILED_JSON:v=s(n,i,c);break;case a.WELTMEISTER:v=r(n,i,c);break;default:console.warn("Unrecognized tilemap data format: "+l),v=null}return v};d.exports=e},2342:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(80341),p=t(14977),o=t(87010),s=t(23029),r=function(e,n,l,i,h){for(var u=new p({tileWidth:l,tileHeight:i}),c=new o({name:e,tileWidth:l,tileHeight:i,format:a.ARRAY_2D,layers:[u]}),v=[],m=n.length,T=0,C=0;C{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(80341),p=t(2342),o=function(s,r,e,n,l){var i=r.trim().split(` +`).map(function(u){return u.split(",")}),h=p(s,i,e,n,l);return h.format=a.CSV,h};d.exports=o},6656:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(14977),p=t(23029),o=function(s,r){for(var e=[],n=0;n-1?T=new p(i,m,v,c,l.tilesize,l.tilesize):T=r?null:new p(i,-1,v,c,l.tilesize,l.tilesize),h.push(T)}u.push(h),h=[]}i.data=u,e.push(i)}return e};d.exports=o},96483:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(33629),p=function(o){for(var s=[],r=[],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),p=t(87010),o=t(6656),s=t(96483),r=function(e,n,l){if(n.layer.length===0)return console.warn("No layers found in the Weltmeister map: "+e),null;for(var i=0,h=0,u=0;ui&&(i=n.layer[u].width),n.layer[u].height>h&&(h=n.layer[u].height);var c=new p({width:i,height:h,name:e,tileWidth:n.layer[0].tilesize,tileHeight:n.layer[0].tilesize,format:a.WELTMEISTER});return c.layers=o(n,l),c.tilesets=s(n),c};d.exports=r},52833:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports={ParseTileLayers:t(6656),ParseTilesets:t(96483),ParseWeltmeister:t(87021)}},57442:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports={FromOrientationString:t(6641),Parse:t(46177),Parse2DArray:t(2342),ParseCSV:t(82593),Impact:t(52833),Tiled:t(96761)}},51233:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(79291),p=function(o){for(var s,r,e,n,l,i=0;i{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){for(var a=window.atob(t),p=a.length,o=new Array(p/4),s=0;s>>0;return o};d.exports=x},84101:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(33629),p=function(o){var s,r,e=[];for(s=0;s{/** + * @author Seth Berrier + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(95540),p=function(o,s,r){if(!s)return{i:0,layers:o.layers,name:"",opacity:1,visible:!0,x:0,y:0};var e=s.x+a(s,"startx",0)*o.tilewidth+a(s,"offsetx",0),n=s.y+a(s,"starty",0)*o.tileheight+a(s,"offsety",0);return{i:0,layers:s.layers,name:r.name+s.name+"/",opacity:r.opacity*s.opacity,visible:r.visible&&s.visible,x:r.x+e,y:r.y+n}};d.exports=p},29920:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=2147483648,t=1073741824,a=536870912,p=function(o){var s=!!(o&x),r=!!(o&t),e=!!(o&a);o=o&~(x|t|a);var n=0,l=!1;return s&&r&&e?(n=Math.PI/2,l=!0):s&&r&&!e?(n=Math.PI,l=!1):s&&!r&&e?(n=Math.PI/2,l=!1):s&&!r&&!e?(n=0,l=!0):!s&&r&&e?(n=3*Math.PI/2,l=!1):!s&&r&&!e?(n=Math.PI,l=!0):!s&&!r&&e?(n=3*Math.PI/2,l=!0):!s&&!r&&!e&&(n=0,l=!1),{gid:o,flippedHorizontal:s,flippedVertical:r,flippedAntiDiagonal:e,rotation:n,flipped:l}};d.exports=p},12635:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(95540),p=t(79677),o=function(s){for(var r=[],e=[],n=p(s);n.i0;){if(n.i>=n.layers.length){if(e.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}n=e.pop();continue}var l=n.layers[n.i];if(n.i++,l.type!=="imagelayer"){if(l.type==="group"){var i=p(s,l,n);e.push(n),n=i}continue}var h=a(l,"offsetx",0)+a(l,"startx",0),u=a(l,"offsety",0)+a(l,"starty",0);r.push({name:n.name+l.name,image:l.image,x:n.x+h+l.x,y:n.y+u+l.y,alpha:n.opacity*l.opacity,visible:n.visible&&l.visible,properties:a(l,"properties",{})})}return r};d.exports=o},46594:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(51233),p=t(84101),o=t(91907),s=t(62644),r=t(80341),e=t(6641),n=t(87010),l=t(12635),i=t(22611),h=t(28200),u=t(24619),c=function(v,m,T){var C=s(m),S=new n({width:C.width,height:C.height,name:v,tileWidth:C.tilewidth,tileHeight:C.tileheight,orientation:e(C.orientation),format:r.TILED_JSON,version:C.version,properties:C.properties,renderOrder:C.renderorder,infinite:C.infinite});S.orientation===o.HEXAGONAL&&(S.hexSideLength=C.hexsidelength,S.staggerAxis=C.staggeraxis,S.staggerIndex=C.staggerindex),S.layers=h(C,T),S.images=l(C);var P=u(C);return S.tilesets=P.tilesets,S.imageCollections=P.imageCollections,S.objects=i(C),S.tiles=p(S),a(S),S};d.exports=c},52205:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(18254),p=t(29920),o=function(e){return{x:e.x,y:e.y}},s=["id","name","type","rotation","properties","visible","x","y","width","height"],r=function(e,n,l){n===void 0&&(n=0),l===void 0&&(l=0);var i=a(e,s);if(i.x+=n,i.y+=l,e.gid){var h=p(e.gid);i.gid=h.gid,i.flippedHorizontal=h.flippedHorizontal,i.flippedVertical=h.flippedVertical,i.flippedAntiDiagonal=h.flippedAntiDiagonal}else e.polyline?i.polyline=e.polyline.map(o):e.polygon?i.polygon=e.polygon.map(o):e.ellipse?i.ellipse=e.ellipse:e.text?i.text=e.text:e.point?i.point=!0:i.rectangle=!0;return i};d.exports=r},22611:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(95540),p=t(52205),o=t(48700),s=t(79677),r=function(e){for(var n=[],l=[],i=s(e);i.i0;){if(i.i>=i.layers.length){if(l.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}i=l.pop();continue}var h=i.layers[i.i];if(i.i++,h.opacity*=i.opacity,h.visible=i.visible&&h.visible,h.type!=="objectgroup"){if(h.type==="group"){var u=s(e,h,i);l.push(i),i=u}continue}h.name=i.name+h.name;for(var c=i.x+a(h,"startx",0)+a(h,"offsetx",0),v=i.y+a(h,"starty",0)+a(h,"offsety",0),m=[],T=0;T{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(41868),p=t(91907),o=t(79677),s=t(6641),r=t(95540),e=t(14977),n=t(29920),l=t(23029),i=function(h,u){for(var c=r(h,"infinite",!1),v=[],m=[],T=o(h);T.i0;){if(T.i>=T.layers.length){if(m.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}T=m.pop();continue}var C=T.layers[T.i];if(T.i++,C.type!=="tilelayer"){if(C.type==="group"){var S=o(h,C,T);m.push(T),T=S}continue}if(C.compression){console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+C.name+"'");continue}else if(C.encoding&&C.encoding==="base64"){if(C.chunks)for(var P=0;P0?(F=new l(A,L.gid,X,$,h.tilewidth,h.tileheight),F.rotation=L.rotation,F.flipX=L.flipped,D[$][X]=F):(I=u?null:new l(A,-1,X,$,h.tilewidth,h.tileheight),D[$][X]=I),B++,B===K.width&&(H++,B=0)}}else{A=new e({name:T.name+C.name,id:C.id,x:T.x+r(C,"offsetx",0)+C.x,y:T.y+r(C,"offsety",0)+C.y,width:C.width,height:C.height,tileWidth:h.tilewidth,tileHeight:h.tileheight,alpha:T.opacity*C.opacity,visible:T.visible&&C.visible,properties:r(C,"properties",[]),orientation:s(h.orientation)}),A.orientation===p.HEXAGONAL&&(A.hexSideLength=h.hexsidelength,A.staggerAxis=h.staggeraxis,A.staggerIndex=h.staggerindex);for(var k=[],Q=0,J=C.data.length;Q0?(F=new l(A,L.gid,B,D.length,h.tilewidth,h.tileheight),F.rotation=L.rotation,F.flipX=L.flipped,k.push(F)):(I=u?null:new l(A,-1,B,D.length,h.tilewidth,h.tileheight),k.push(I)),B++,B===C.width&&(D.push(k),B=0,k=[])}A.data=D,v.push(A)}return v};d.exports=i},24619:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(33629),p=t(16536),o=t(52205),s=t(57880),r=function(e){for(var n=[],l=[],i=null,h,u=0;u1){var m=void 0,T=void 0;if(Array.isArray(c.tiles)){m=m||{},T=T||{};for(var C=0;C{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){for(var p=0;p0){var r={},e={},n,l,i;if(Array.isArray(o.edgecolors))for(n=0;n{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.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:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(37277),o=t(44594),s=t(94880),r=t(72905),e=new a({initialize:function(l){this.scene=l,this.systems=l.sys,this.now=0,this.startTime=0,this.timeScale=1,this.paused=!1,this._active=[],this._pendingInsertion=[],this._pendingRemoval=[],l.sys.events.once(o.BOOT,this.boot,this),l.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 n=this.systems.events;n.on(o.PRE_UPDATE,this.preUpdate,this),n.on(o.UPDATE,this.update,this),n.once(o.SHUTDOWN,this.shutdown,this)},addEvent:function(n){var l;return n instanceof s?(l=n,this.removeEvent(l),l.elapsed=l.startAt,l.hasDispatched=!1,l.repeatCount=l.repeat===-1||l.loop?999999999999:l.repeat):l=new s(n),this._pendingInsertion.push(l),l},delayedCall:function(n,l,i,h){return this.addEvent({delay:n,callback:l,args:i,callbackScope:h})},clearPendingEvents:function(){return this._pendingInsertion=[],this},removeEvent:function(n){Array.isArray(n)||(n=[n]);for(var l=0;l-1&&this._active.splice(u,1),h.destroy()}for(i=0;i=h.delay)){var u=h.elapsed-h.delay;if(h.elapsed=h.delay,!h.hasDispatched&&h.callback&&(h.hasDispatched=!0,h.callback.apply(h.callbackScope,h.args)),h.repeatCount>0){if(h.repeatCount--,u>=h.delay)for(;u>=h.delay&&h.repeatCount>0;)h.callback&&h.callback.apply(h.callbackScope,h.args),u-=h.delay,h.repeatCount--;h.elapsed=u,h.hasDispatched=!1}else h.hasDispatched&&this._pendingRemoval.push(h)}}}},shutdown:function(){var n;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(83419),p=t(50792),o=t(39429),s=t(95540),r=t(44594),e=t(89809),n=new a({Extends:p,initialize:function(i,h){p.call(this),this.scene=i,this.systems=i.sys,this.elapsed=0,this.paused=!0,this.complete=!1,this.totalComplete=0,this.loop=0,this.iteration=0,this.events=[];var u=this.systems.events;u.on(r.PRE_UPDATE,this.preUpdate,this),u.on(r.UPDATE,this.update,this),u.once(r.SHUTDOWN,this.destroy,this),h&&this.add(h)},preUpdate:function(l,i){this.paused||(this.elapsed+=i)},update:function(){if(!(this.paused||this.complete)){var l,i=this.events,h=!1,u=this.systems,c;for(l=0;l=i.length&&(this.loop!==0&&(this.loop===-1||this.loop>this.iteration)?(this.iteration++,this.reset(!0)):this.complete=!0),this.complete&&this.emit(e.COMPLETE,this)}},play:function(l){return l===void 0&&(l=!0),this.paused=!1,this.complete=!1,this.totalComplete=0,l&&this.reset(),this},pause:function(){return this.paused=!0,this},repeat:function(l){return(l===void 0||l===!0)&&(l=-1),l===!1&&(l=0),this.loop=l,this},resume:function(){return this.paused=!1,this},stop:function(){return this.paused=!0,this.complete=!0,this},reset:function(l){l===void 0&&(l=!1),this.elapsed=0,l||(this.iteration=0);for(var i=0;i0&&(h=i[i.length-1].time);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),p=t(95540),o=new a({initialize:function(r){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(r)},reset:function(s){if(this.delay=p(s,"delay",0),this.repeat=p(s,"repeat",0),this.loop=p(s,"loop",!1),this.callback=p(s,"callback",void 0),this.callbackScope=p(s,"callbackScope",this),this.args=p(s,"args",[]),this.timeScale=p(s,"timeScale",1),this.startAt=p(s,"startAt",0),this.paused=p(s,"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 s=this.delay+this.delay*this.repeat,r=this.elapsed+this.delay*(this.repeat-this.repeatCount);return r/s}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(s){s===void 0&&(s=!1),this.elapsed=this.delay,this.hasDispatched=!s,this.repeatCount=0},destroy:function(){this.callback=void 0,this.callbackScope=void 0,this.args=[]}});d.exports=o},35945:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="complete"},89809:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports={COMPLETE:t(35945)}},90291:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports={Clock:t(33385),Events:t(89809),Timeline:t(96120),TimerEvent:t(94880)}},40382:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(72905),p=t(83419),o=t(43491),s=t(88032),r=t(37277),e=t(44594),n=t(93109),l=t(86081),i=t(8357),h=t(43960),u=t(26012),c=new p({initialize:function(m){this.scene=m,this.events=m.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(v){Array.isArray(v)||(v=[v]);for(var m=[],T=0;T-1},existing:function(v){return this.has(v)||this.tweens.push(v.reset()),this},addCounter:function(v){var m=s(this,v);return this.tweens.push(m.reset()),m},stagger:function(v,m){return n(v,m)},setLagSmooth:function(v,m){return v===void 0&&(v=1/1e-8),m===void 0&&(m=0),this.maxLag=v,this.lagSkip=Math.min(m,this.maxLag),this},setFps:function(v){return v===void 0&&(v=240),this.gap=1e3/v,this.nextTime=this.time*1e3+this.gap,this},getDelta:function(v){var m=Date.now()-this.prevTime;m>this.maxLag&&(this.startTime+=m-this.lagSkip),this.prevTime+=m;var T=this.prevTime-this.startTime,C=T-this.nextTime,S=T-this.time*1e3;return C>0||v?(T/=1e3,this.time=T,this.nextTime+=C+(C>=this.gap?4:this.gap-C)):S=0,S},tick:function(){return this.step(!0),this},update:function(){this.paused||this.step(!1)},step:function(v){v===void 0&&(v=!1);var m=this.getDelta(v);if(!(m<=0)){this.processing=!0;var T,C,S=[],P=this.tweens;for(T=0;T0){for(T=0;T-1&&(C.isPendingRemove()||C.isDestroyed())&&(P.splice(L,1),C.destroy())}S.length=0}this.processing=!1}},remove:function(v){return this.processing?v.setPendingRemoveState():(a(this.tweens,v),v.setRemovedState()),this},reset:function(v){return this.existing(v),v.seek(),v.setActiveState(),this},makeActive:function(v){return this.existing(v),v.setActiveState(),this},each:function(v,m){var T,C=[null];for(T=1;T{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){return t&&t.hasOwnProperty(a)?t[a]:p};d.exports=x},6113:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(62640),p=t(35355),o=function(s,r){var e=a.Power0;if(typeof s=="string")if(a.hasOwnProperty(s))e=a[s];else{var n="";if(s.indexOf(".")){n=s.substring(s.indexOf(".")+1);var l=n.toLowerCase();l==="in"?n="easeIn":l==="out"?n="easeOut":l==="inout"&&(n="easeInOut")}s=p(s.substring(0,s.indexOf(".")+1)+n),a.hasOwnProperty(s)&&(e=a[s])}else typeof s=="function"&&(e=s);if(!r)return e;var i=r.slice(0);return i.unshift(0),function(h){return i[0]=h,e.apply(this,i)}};d.exports=o},91389:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(89318),p=t(77259),o=t(28392),s={bezier:a,catmull:p,catmullrom:p,linear:o},r=function(e){if(e===null)return null;var n=s.linear;return typeof e=="string"?s.hasOwnProperty(e)&&(n=s[e]):typeof e=="function"&&(n=e),n};d.exports=r},55292:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){var o;if(t.hasOwnProperty(a)){var s=typeof t[a];s==="function"?o=function(r,e,n,l,i,h){return t[a](r,e,n,l,i,h)}:o=function(){return t[a]}}else typeof p=="function"?o=p:o=function(){return p};return o};d.exports=x},82985:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(81076),p=function(o){var s,r=[];if(o.hasOwnProperty("props"))for(s in o.props)s.substring(0,1)!=="_"&&r.push({key:s,value:o.props[s]});else for(s in o)a.indexOf(s)===-1&&s.substring(0,1)!=="_"&&r.push({key:s,value:o[s]});return r};d.exports=p},62329:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(35154),p=function(o){var s=a(o,"targets",null);return s===null||(typeof s=="function"&&(s=s.call()),Array.isArray(s)||(s=[s])),s};d.exports=p},17777:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(30976),p=t(99472);function o(l){return!!l.getActive&&typeof l.getActive=="function"}function s(l){return!!l.getStart&&typeof l.getStart=="function"}function r(l){return!!l.getEnd&&typeof l.getEnd=="function"}function e(l){return s(l)||r(l)||o(l)}var n=function(l,i){var h,u=function(K,Z,V){return V},c=function(K,Z,V){return V},v=null,m=typeof i;if(m==="number")u=function(){return i};else if(Array.isArray(i))c=function(){return i[0]},u=function(){return i[i.length-1]};else if(m==="string"){var T=i.toLowerCase(),C=T.substring(0,6)==="random",S=T.substring(0,3)==="int";if(C||S){var P=T.indexOf("("),A=T.indexOf(")"),L=T.indexOf(",");if(P&&A&&L){var F=parseFloat(T.substring(P+1,L)),I=parseFloat(T.substring(L+1,A));C?u=function(){return p(F,I)}:u=function(){return a(F,I)}}else throw new Error("invalid random() format")}else{T=T[0];var D=parseFloat(i.substr(2));switch(T){case"+":u=function(K,Z,V){return V+D};break;case"-":u=function(K,Z,V){return V-D};break;case"*":u=function(K,Z,V){return V*D};break;case"/":u=function(K,Z,V){return V/D};break;default:u=function(){return parseFloat(i)}}}}else if(m==="function")u=i;else if(m==="object")if(e(i))o(i)&&(v=i.getActive),r(i)&&(u=i.getEnd),s(i)&&(c=i.getStart);else if(i.hasOwnProperty("value"))h=n(l,i.value);else{var B=i.hasOwnProperty("to"),G=i.hasOwnProperty("from"),z=i.hasOwnProperty("start");if(B&&(G||z)){if(h=n(l,i.to),z){var W=n(l,i.start);h.getActive=W.getEnd}if(G){var Y=n(l,i.from);h.getStart=Y.getEnd}}}return h||(h={getActive:v,getEnd:u,getStart:c}),h};d.exports=n},88032:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(70402),p=t(69902),o=t(23568),s=t(57355),r=t(6113),e=t(55292),n=t(35154),l=t(17777),i=t(269),h=t(86081),u=function(c,v,m){if(v instanceof h)return v.parent=c,v;m===void 0?m=p:m=i(p,m);var T=n(v,"from",0),C=n(v,"to",1),S=[{value:T}],P=n(v,"delay",m.delay),A=n(v,"easeParams",m.easeParams),L=n(v,"ease",m.ease),F=l("value",C),I=new h(c,S),D=I.add(0,"value",F.getEnd,F.getStart,F.getActive,r(n(v,"ease",L),n(v,"easeParams",A)),e(v,"delay",P),n(v,"duration",m.duration),s(v,"yoyo",m.yoyo),n(v,"hold",m.hold),n(v,"repeat",m.repeat),n(v,"repeatDelay",m.repeatDelay),!1,!1);D.start=T,D.current=T,I.completeDelay=o(v,"completeDelay",0),I.loop=Math.round(o(v,"loop",0)),I.loopDelay=Math.round(o(v,"loopDelay",0)),I.paused=s(v,"paused",!1),I.persist=s(v,"persist",!1),I.callbackScope=n(v,"callbackScope",I);for(var B=a.TYPES,G=0;G{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(6113),p=t(35154),o=t(36383),s=function(r,e){e===void 0&&(e={});var n,l=p(e,"start",0),i=p(e,"ease",null),h=p(e,"grid",null),u=p(e,"from",0),c=u==="first",v=u==="center",m=u==="last",T=typeof u=="number",C=Array.isArray(r),S=parseFloat(C?r[0]:r),P=C?parseFloat(r[1]):0,A=Math.max(S,P);if(C&&(l+=S),h){var L=h[0],F=h[1],I=0,D=0,B=0,G=0,z=[];m?(I=L-1,D=F-1):T?(I=u%L,D=Math.floor(u/L)):v&&(I=(L-1)/2,D=(F-1)/2);for(var W=o.MIN_SAFE_INTEGER,Y=0;YW&&(W=Z),z[Y][K]=Z}}}var V=i?a(i):null;return h?n=function(H,N,U,X){var $=0,k=X%L,Q=Math.floor(X/L);k>=0&&k=0&&Q{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(70402),p=t(69902),o=t(23568),s=t(57355),r=t(6113),e=t(91389),n=t(55292),l=t(82985),i=t(62329),h=t(35154),u=t(17777),c=t(269),v=t(86081),m=function(T,C,S){if(C instanceof v)return C.parent=T,C;S===void 0?S=p:S=c(p,S);var P=i(C);!P&&S.targets&&(P=S.targets);for(var A=l(C),L=h(C,"delay",S.delay),F=h(C,"duration",S.duration),I=h(C,"easeParams",S.easeParams),D=h(C,"ease",S.ease),B=h(C,"hold",S.hold),G=h(C,"repeat",S.repeat),z=h(C,"repeatDelay",S.repeatDelay),W=s(C,"yoyo",S.yoyo),Y=s(C,"flipX",S.flipX),K=s(C,"flipY",S.flipY),Z=h(C,"interpolation",S.interpolation),V=function(st,ot,ut,at){if(ut==="texture"){var ct=at,Et=void 0;Array.isArray(at)?(ct=at[0],Et=at[1]):at.hasOwnProperty("value")?(ct=at.value,Array.isArray(at.value)?(ct=at.value[0],Et=at.value[1]):typeof at.value=="string"&&(ct=at.value)):typeof at=="string"&&(ct=at),st.addFrame(ot,ct,Et,n(at,"delay",L),h(at,"duration",F),h(at,"hold",B),h(at,"repeat",G),h(at,"repeatDelay",z),s(at,"flipX",Y),s(at,"flipY",K))}else{var St=u(ut,at),Ct=e(h(at,"interpolation",Z));st.add(ot,ut,St.getEnd,St.getStart,St.getActive,r(h(at,"ease",D),h(at,"easeParams",I)),n(at,"delay",L),h(at,"duration",F),s(at,"yoyo",W),h(at,"hold",B),h(at,"repeat",G),h(at,"repeatDelay",z),s(at,"flipX",Y),s(at,"flipY",K),Ct,Ct?at:null)}},H=new v(T,P),N=0;N{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(70402),p=t(23568),o=t(57355),s=t(62329),r=t(35154),e=t(8357),n=t(43960),l=function(i,h){if(h instanceof n)return h.parent=i,h;var u=new n(i);u.startDelay=r(h,"delay",0),u.completeDelay=p(h,"completeDelay",0),u.loop=Math.round(p(h,"loop",r(h,"repeat",0))),u.loopDelay=Math.round(p(h,"loopDelay",r(h,"repeatDelay",0))),u.paused=o(h,"paused",!1),u.persist=o(h,"persist",!1),u.callbackScope=r(h,"callbackScope",u);var c,v=a.TYPES;for(c=0;c{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.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:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="active"},98540:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="complete"},67233:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="loop"},2859:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="pause"},98336:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="repeat"},25764:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="resume"},32193:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="start"},84371:d=>{/** + * @author samme + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="stop"},70766:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="update"},55659:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports="yoyo"},842:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.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:(d,x,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)};d.exports=a},70402:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(50792),o=t(842),s=t(86353),r=new a({Extends:p,initialize:function(n){p.call(this),this.parent=n,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=s.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,n,l){return l===void 0&&(l=[]),this.callbacks.hasOwnProperty(e)&&(this.callbacks[e]={func:n,params:l}),this},setPendingState:function(){this.state=s.PENDING},setActiveState:function(){this.state=s.ACTIVE},setLoopDelayState:function(){this.state=s.LOOP_DELAY},setCompleteDelayState:function(){this.state=s.COMPLETE_DELAY},setStartDelayState:function(){this.state=s.START_DELAY,this.countdown=this.startDelay,this.hasStarted=!1},setPendingRemoveState:function(){this.state=s.PENDING_REMOVE},setRemovedState:function(){this.state=s.REMOVED},setFinishedState:function(){this.state=s.FINISHED},setDestroyedState:function(){this.state=s.DESTROYED},isPending:function(){return this.state===s.PENDING},isActive:function(){return this.state===s.ACTIVE},isLoopDelayed:function(){return this.state===s.LOOP_DELAY},isCompleteDelayed:function(){return this.state===s.COMPLETE_DELAY},isStartDelayed:function(){return this.state===s.START_DELAY},isPendingRemove:function(){return this.state===s.PENDING_REMOVE},isRemoved:function(){return this.state===s.REMOVED},isFinished:function(){return this.state===s.FINISHED},isDestroyed:function(){return this.state===s.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()}});r.TYPES=["onActive","onComplete","onLoop","onPause","onRepeat","onResume","onStart","onStop","onUpdate","onYoyo"],d.exports=r},95042:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),p=t(842),o=t(86353),s=new a({initialize:function(e,n,l,i,h,u,c,v,m,T){this.tween=e,this.targetIndex=n,this.duration=i,this.totalDuration=0,this.delay=0,this.getDelay=l,this.yoyo=h,this.hold=u,this.repeat=c,this.repeatDelay=v,this.repeatCounter=0,this.flipX=m,this.flipY=T,this.progress=0,this.elapsed=0,this.state=0,this.isCountdown=!1},getTarget:function(){return this.tween.targets[this.targetIndex]},setTargetValue:function(r){r===void 0&&(r=this.current),this.tween.targets[this.targetIndex][this.key]=r},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(r){this.yoyo?this.onRepeat(r,!0,!0):this.repeatCounter>0?this.onRepeat(r,!0,!1):this.setCompleteState()},setStateFromStart:function(r){this.repeatCounter>0?this.onRepeat(r,!1):this.setCompleteState()},reset:function(){var r=this.tween,e=r.totalTargets,n=this.targetIndex,l=r.targets[n],i=this.key;this.progress=0,this.elapsed=0,this.delay=this.getDelay(l,i,0,n,e,r),this.repeatCounter=this.repeat===-1?o.MAX:this.repeat,this.setPendingRenderState();var h=this.duration+this.hold;this.yoyo&&(h+=this.duration);var u=h+this.repeatDelay;this.totalDuration=this.delay+h,this.repeat===-1?(this.totalDuration+=u*o.MAX,r.isInfinite=!0):this.repeat>0&&(this.totalDuration+=u*this.repeat),this.totalDuration>r.duration&&(r.duration=this.totalDuration),this.delay0&&(this.elapsed=this.delay,this.setDelayState())},onRepeat:function(r,e,n){var l=this.tween,i=l.totalTargets,h=this.targetIndex,u=l.targets[h],c=this.key,v=c!=="texture";if(this.elapsed=r,this.progress=r/this.duration,this.flipX&&u.toggleFlipX(),this.flipY&&u.toggleFlipY(),v&&(e||n)&&(this.start=this.getStartValue(u,c,this.start,h,i,l)),n){this.setPlayingBackwardState(),this.dispatchEvent(p.TWEEN_YOYO,"onYoyo");return}this.repeatCounter--,v&&(this.end=this.getEndValue(u,c,this.start,h,i,l)),this.repeatDelay>0?(this.elapsed=this.repeatDelay-r,v&&(this.current=this.start,u[c]=this.current),this.setRepeatState()):(this.setPlayingForwardState(),this.dispatchEvent(p.TWEEN_REPEAT,"onRepeat"))},destroy:function(){this.tween=null,this.getDelay=null,this.setCompleteState()}});d.exports=s},69902:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x={targets:null,delay:0,duration:1e3,ease:"Power0",easeParams:null,hold:0,repeat:0,repeatDelay:0,yoyo:!1,flipX:!1,flipY:!1,persist:!1,interpolation:null};d.exports=x},81076:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.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:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(70402),p=t(83419),o=t(842),s=t(44603),r=t(39429),e=t(36383),n=t(86353),l=t(48177),i=t(42220),h=new p({Extends:a,initialize:function(c,v){a.call(this,c),this.targets=v,this.totalTargets=v.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(u,c,v,m,T,C,S,P,A,L,F,I,D,B,G,z){var W=new l(this,u,c,v,m,T,C,S,P,A,L,F,I,D,B,G,z);return this.totalData=this.data.push(W),W},addFrame:function(u,c,v,m,T,C,S,P,A,L){var F=new i(this,u,c,v,m,T,C,S,P,A,L);return this.totalData=this.data.push(F),F},getValue:function(u){u===void 0&&(u=0);var c=null;return this.data&&(c=this.data[u].current),c},hasTarget:function(u){return this.targets&&this.targets.indexOf(u)!==-1},updateTo:function(u,c,v){if(v===void 0&&(v=!1),u!=="texture")for(var m=0;m0)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(u,c,v){if(u===void 0&&(u=0),c===void 0&&(c=16.6),v===void 0&&(v=!1),this.isDestroyed())return console.warn("Cannot seek destroyed Tween",this),this;v||(this.isSeeking=!0),this.reset(!0),this.initTweenData(!0),this.setActiveState(),this.dispatchEvent(o.TWEEN_ACTIVE,"onActive");var m=this.paused;if(this.paused=!1,u>0){for(var T=Math.floor(u/c),C=u-T*c,S=0;S0&&this.update(C)}return this.paused=m,this.isSeeking=!1,this},initTweenData:function(u){u===void 0&&(u=!1),this.duration=0,this.startDelay=e.MAX_SAFE_INTEGER;for(var c=this.data,v=0;v0?this.totalDuration=m+T+(m+S)*C:this.totalDuration=m+T},reset:function(u){return u===void 0&&(u=!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=n.MAX),u||(this.initTweenData(),this.setActiveState(),this.dispatchEvent(o.TWEEN_ACTIVE,"onActive")),this},update:function(u){if(this.isPendingRemove()||this.isDestroyed())return!0;if(this.paused||this.isFinished())return!1;if(u*=this.timeScale*this.parent.timeScale,this.isLoopDelayed())return this.updateLoopCountdown(u),!1;if(this.isCompleteDelayed())return this.updateCompleteDelay(u),!1;this.hasStarted||(this.startDelay-=u,this.startDelay<=0&&(this.hasStarted=!0,this.dispatchEvent(o.TWEEN_START,"onStart"),u=0));var c=!1;if(this.isActive())for(var v=this.data,m=0;m{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(72905),p=t(70402),o=t(83419),s=t(842),r=t(44603),e=t(39429),n=t(86353),l=new o({Extends:p,initialize:function(h){p.call(this,h),this.currentTween=null,this.currentIndex=0},init:function(){return this.loopCounter=this.loop===-1?n.MAX:this.loop,this.setCurrentTween(0),this.startDelay>0&&!this.isStartDelayed()?this.setStartDelayState():this.setActiveState(),this.dispatchEvent(s.TWEEN_ACTIVE,"onActive"),this},add:function(i){var h=this.parent.create(i);Array.isArray(h)||(h=[h]);for(var u=this.data,c=0;c0)this.loopCounter--,this.resetTweens(),this.loopDelay>0?(this.countdown=this.loopDelay,this.setLoopDelayState()):(this.setActiveState(),this.dispatchEvent(s.TWEEN_LOOP,"onLoop"));else if(this.completeDelay>0)this.countdown=this.completeDelay,this.setCompleteDelayState();else return this.onCompleteHandler(),!0;return!1},play:function(){return this.isDestroyed()?(console.warn("Cannot play destroyed TweenChain",this),this):((this.isPendingRemove()||this.isPending())&&this.resetTweens(),this.paused=!1,this.startDelay>0&&!this.isStartDelayed()?this.setStartDelayState():this.setActiveState(),this)},resetTweens:function(){for(var i=this.data,h=this.totalData,u=0;u{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(95042),p=t(45319),o=t(83419),s=t(842),r=new o({Extends:a,initialize:function(n,l,i,h,u,c,v,m,T,C,S,P,A,L,F,I,D){a.call(this,n,l,m,T,C,S,P,A,L,F),this.key=i,this.getActiveValue=c,this.getEndValue=h,this.getStartValue=u,this.ease=v,this.start=0,this.previous=0,this.current=0,this.end=0,this.interpolation=I,this.interpolationData=D},reset:function(e){a.prototype.reset.call(this);var n=this.tween.targets[this.targetIndex],l=this.key;e&&(n[l]=this.start),this.start=0,this.previous=0,this.current=0,this.end=0,this.getActiveValue&&(n[l]=this.getActiveValue(n,l,0))},update:function(e){var n=this.tween,l=n.totalTargets,i=this.targetIndex,h=n.targets[i],u=this.key;if(!h)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(s.TWEEN_REPEAT,"onRepeat")):this.isHolding()&&this.setStateFromEnd(0))),this.isPendingRender())return this.start=this.getStartValue(h,u,h[u],i,l,n),this.end=this.getEndValue(h,u,this.start,i,l,n),this.current=this.start,h[u]=this.start,this.setPlayingForwardState(),!0;var c=this.isPlayingForward(),v=this.isPlayingBackward();if(c||v){var m=this.elapsed,T=this.duration,C=0,S=!1;m+=e,m>=T?(C=m-T,m=T,S=!0):m<0&&(m=0);var P=p(m/T,0,1);if(this.elapsed=m,this.progress=P,this.previous=this.current,S)c?(this.current=this.end,h[u]=this.end,this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(C)):(this.current=this.start,h[u]=this.start,this.setStateFromStart(C));else{c||(P=1-P);var A=this.ease(P);this.interpolation?this.current=this.interpolation(this.interpolationData,A):this.current=this.start+(this.end-this.start)*A,h[u]=this.current}this.dispatchEvent(s.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(e,n){var l=this.tween;if(!l.isSeeking){var i=l.targets[this.targetIndex],h=this.key,u=this.current,c=this.previous;l.emit(e,l,h,i,u,c);var v=l.callbacks[n];v&&v.func.apply(l.callbackScope,[l,i,h,u,c].concat(v.params))}},destroy:function(){a.prototype.destroy.call(this),this.getActiveValue=null,this.getEndValue=null,this.getStartValue=null,this.ease=null}});d.exports=r},42220:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(95042),p=t(45319),o=t(83419),s=t(842),r=new o({Extends:a,initialize:function(n,l,i,h,u,c,v,m,T,C,S){a.call(this,n,l,u,c,!1,v,m,T,C,S),this.key="texture",this.startTexture=null,this.endTexture=i,this.startFrame=null,this.endFrame=h,this.yoyo=m!==0},reset:function(e){a.prototype.reset.call(this);var n=this.tween.targets[this.targetIndex];this.startTexture||(this.startTexture=n.texture.key,this.startFrame=n.frame.name),e&&n.setTexture(this.startTexture,this.startFrame)},update:function(e){var n=this.tween,l=this.targetIndex,i=n.targets[l];if(!i)return this.setCompleteState(),!1;if(this.isCountdown&&(this.elapsed-=e,this.elapsed<=0&&(this.elapsed=0,e=0,this.isDelayed()?this.setPendingRenderState():this.isRepeating()?(this.setPlayingForwardState(),this.dispatchEvent(s.TWEEN_REPEAT,"onRepeat")):this.isHolding()&&this.setStateFromEnd(0))),this.isPendingRender())return this.startTexture&&i.setTexture(this.startTexture,this.startFrame),this.setPlayingForwardState(),!0;var h=this.isPlayingForward(),u=this.isPlayingBackward();if(h||u){var c=this.elapsed,v=this.duration,m=0,T=!1;c+=e,c>=v?(m=c-v,c=v,T=!0):c<0&&(c=0);var C=p(c/v,0,1);this.elapsed=c,this.progress=C,T&&(h?(i.setTexture(this.endTexture,this.endFrame),this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(m)):(i.setTexture(this.startTexture,this.startFrame),this.setStateFromStart(m))),this.dispatchEvent(s.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(e,n){var l=this.tween;if(!l.isSeeking){var i=l.targets[this.targetIndex],h=this.key;l.emit(e,l,h,i);var u=l.callbacks[n];u&&u.func.apply(l.callbackScope,[l,i,h].concat(u.params))}},destroy:function(){a.prototype.destroy.call(this),this.startTexture=null,this.endTexture=null,this.startFrame=null,this.endFrame=null}});d.exports=r},86353:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x={CREATED:0,DELAY:2,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING:20,ACTIVE:21,LOOP_DELAY:22,COMPLETE_DELAY:23,START_DELAY:24,PENDING_REMOVE:25,REMOVED:26,FINISHED:27,DESTROYED:28,MAX:999999999999};d.exports=x},83419:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */function x(r){return!!r.get&&typeof r.get=="function"||!!r.set&&typeof r.set=="function"}function t(r,e,n){var l=n?r[e]:Object.getOwnPropertyDescriptor(r,e);return!n&&l.value&&typeof l.value=="object"&&(l=l.value),l&&x(l)?(typeof l.enumerable>"u"&&(l.enumerable=!0),typeof l.configurable>"u"&&(l.configurable=!0),l):!1}function a(r,e){var n=Object.getOwnPropertyDescriptor(r,e);return n?(n.value&&typeof n.value=="object"&&(n=n.value),n.configurable===!1):!1}function p(r,e,n,l){for(var i in e)if(e.hasOwnProperty(i)){var h=t(e,i,n);if(h!==!1){var u=l||r;if(a(u.prototype,i)){if(s.ignoreFinals)continue;throw new Error("cannot override final property '"+i+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(r.prototype,i,h)}else r.prototype[i]=e[i]}}function o(r,e){if(e){Array.isArray(e)||(e=[e]);for(var n=0;n{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(){};d.exports=x},20242:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(){return null};d.exports=x},71146:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p,o,s){if(s===void 0&&(s=t),p>0){var r=p-t.length;if(r<=0)return null}if(!Array.isArray(a))return t.indexOf(a)===-1?(t.push(a),o&&o.call(s,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;p>0&&e>r&&(a.splice(r),e=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 x=function(t,a,p,o,s,r){if(p===void 0&&(p=0),r===void 0&&(r=t),o>0){var e=o-t.length;if(e<=0)return null}if(!Array.isArray(a))return t.indexOf(a)===-1?(t.splice(p,0,a),s&&s.call(r,a),a):null;for(var n=a.length-1;n>=0;)t.indexOf(a[n])!==-1&&a.pop(),n--;if(n=a.length,n===0)return null;o>0&&n>e&&(a.splice(e),n=e);for(var l=n-1;l>=0;l--){var i=a[l];t.splice(p,0,i),s&&s.call(r,i)}return a};d.exports=x},66905:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){var p=t.indexOf(a);return p!==-1&&p{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(82011),p=function(o,s,r,e,n){e===void 0&&(e=0),n===void 0&&(n=o.length);var l=0;if(a(o,e,n))for(var i=e;i{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){var o,s=[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),p=function(o,s,r,e,n){if(e===void 0&&(e=0),n===void 0&&(n=o.length),a(o,e,n)){var l,i=[null];for(l=5;l{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){if(a.length){if(a.length===1)return a[0]}else return NaN;var o=1,s,r;if(p){if(ta.length&&(o=a.length),p?(s=a[o-1][p],r=a[o][p],r-t<=t-s?a[o]:a[o-1]):(s=a[o-1],r=a[o],r-t<=t-s?r:s)};d.exports=x},43491:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){a===void 0&&(a=[]);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(82011),p=function(o,s,r,e,n){e===void 0&&(e=0),n===void 0&&(n=o.length);var l=[];if(a(o,e,n))for(var i=e;i{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(82011),p=function(o,s,r,e,n){if(e===void 0&&(e=0),n===void 0&&(n=o.length),a(o,e,n))for(var l=e;l{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){a===void 0&&(a=0),p===void 0&&(p=t.length);var o=a+Math.floor(Math.random()*p);return t[o]===void 0?null:t[o]};d.exports=x},85835:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){if(a===p)return t;var o=t.indexOf(a),s=t.indexOf(p);if(o<0||s<0)throw new Error("Supplied items must be elements of the same array");return o>s||(t.splice(o,1),s===t.length-1?t.push(a):t.splice(s,0,a)),t};d.exports=x},83371:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){if(a===p)return t;var o=t.indexOf(a),s=t.indexOf(p);if(o<0||s<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 x=function(t,a){var p=t.indexOf(a);if(p>0){var o=t[p-1],s=t.indexOf(o);t[p]=o,t[s]=a}return t};d.exports=x},69693:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){var o=t.indexOf(a);if(o===-1||p<0||p>=t.length)throw new Error("Supplied index out of bounds");return o!==p&&(t.splice(o,1),t.splice(p,0,a)),a};d.exports=x},40853:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){var p=t.indexOf(a);if(p!==-1&&p{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p,o){var s=[],r,e=!1;if((p||o)&&(e=!0,p||(p=""),o||(o="")),a=a;r--)e?s.push(p+r.toString()+o):s.push(r);else for(r=t;r<=a;r++)e?s.push(p+r.toString()+o):s.push(r);return s};d.exports=x},593:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(2284),p=function(o,s,r){o===void 0&&(o=0),s===void 0&&(s=null),r===void 0&&(r=1),s===null&&(s=o,o=0);for(var e=[],n=Math.max(a((s-o)/(r||1)),0),l=0;l{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */function x(p,o,s){var r=p[o];p[o]=p[s],p[s]=r}function t(p,o){return po?1:0}var a=function(p,o,s,r,e){for(s===void 0&&(s=0),r===void 0&&(r=p.length-1),e===void 0&&(e=t);r>s;){if(r-s>600){var n=r-s+1,l=o-s+1,i=Math.log(n),h=.5*Math.exp(2*i/3),u=.5*Math.sqrt(i*h*(n-h)/n)*(l-n/2<0?-1:1),c=Math.max(s,Math.floor(o-l*h/n+u)),v=Math.min(r,Math.floor(o+(n-l)*h/n+u));a(p,o,c,v,e)}var m=p[o],T=s,C=r;for(x(p,s,o),e(p[r],m)>0&&x(p,s,r);T0;)C--}e(p[s],m)===0?x(p,s,C):(C++,x(p,C,r)),C<=o&&(s=C+1),o<=C&&(r=C-1)}};d.exports=a},88492:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(35154),p=t(33680),o=function(r,e,n){for(var l=[],i=0;i{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(19133),p=function(o,s,r,e){e===void 0&&(e=o);var n;if(!Array.isArray(s))return n=o.indexOf(s),n!==-1?(a(o,n),r&&r.call(e,s),s):null;for(var l=s.length-1,i=[];l>=0;){var h=s[l];n=o.indexOf(h),n!==-1&&(a(o,n),i.push(h),r&&r.call(e,h)),l--}return i};d.exports=p},60248:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(19133),p=function(o,s,r,e){if(e===void 0&&(e=o),s<0||s>o.length-1)throw new Error("Index out of bounds");var n=a(o,s);return r&&r.call(e,n),n};d.exports=p},81409:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(82011),p=function(o,s,r,e,n){if(s===void 0&&(s=0),r===void 0&&(r=o.length),n===void 0&&(n=o),a(o,s,r)){var l=r-s,i=o.splice(s,l);if(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(19133),p=function(o,s,r){s===void 0&&(s=0),r===void 0&&(r=o.length);var e=s+Math.floor(Math.random()*r);return a(o,e)};d.exports=p},42169:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){var o=t.indexOf(a),s=t.indexOf(p);return o!==-1&&s===-1?(t[o]=p,!0):!1};d.exports=x},86003:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){a===void 0&&(a=1);for(var p=null,o=0;o{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){a===void 0&&(a=1);for(var p=null,o=0;o{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p,o){var s=t.length;if(a<0||a>s||a>=p||p>s){if(o)throw new Error("Range Error: Values outside acceptable range");return!1}else return!0};d.exports=x},89545:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){var p=t.indexOf(a);return p!==-1&&p>0&&(t.splice(p,1),t.unshift(a)),a};d.exports=x},17810:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(82011),p=function(o,s,r,e,n){if(e===void 0&&(e=0),n===void 0&&(n=o.length),a(o,e,n))for(var l=e;l{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){for(var a=t.length-1;a>0;a--){var p=Math.floor(Math.random()*(a+1)),o=t[a];t[a]=t[p],t[p]=o}return t};d.exports=x},90126:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){var a=/\D/g;return t.sort(function(p,o){return parseInt(p.replace(a,""),10)-parseInt(o.replace(a,""),10)}),t};d.exports=x},19133:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){if(!(a>=t.length)){for(var p=t.length-1,o=t[a],s=a;s{/** + * @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 p(e,n){return String(e).localeCompare(n)}function o(e,n){var l=e.length;if(l<=1)return e;for(var i=new Array(l),h=1;hh&&(m=h),T>h&&(T=h),C=v,S=m;;)if(C{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){if(a===p)return t;var o=t.indexOf(a),s=t.indexOf(p);if(o<0||s<0)throw new Error("Supplied items must be elements of the same array");return t[o]=p,t[s]=a,t};d.exports=x},37105:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.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:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){if(!Array.isArray(t)||!Array.isArray(t[0]))return!1;for(var a=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 a=t(41836),p=t(86922),o=function(s){var r="";if(!p(s))return r;for(var e=0;e{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return t.reverse()};d.exports=x},21224:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=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),p=function(o){return a(o,180)};d.exports=p},44657:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(37829),p=function(o,s){s===void 0&&(s=1);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(86922),p=t(2429),o=function(s,r){if(r===void 0&&(r=90),!a(s))return null;if(typeof r!="string"&&(r=(r%360+360)%360),r===90||r===-270||r==="rotateLeft")s=p(s),s.reverse();else if(r===-90||r===270||r==="rotateRight")s.reverse(),s=p(s);else if(Math.abs(r)===180||r==="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),p=function(o,s){s===void 0&&(s=1);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(86003),p=t(49498),o=function(s,r,e){if(r===void 0&&(r=0),e===void 0&&(e=0),e!==0&&(e<0?a(s,Math.abs(e)):p(s,e)),r!==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 x=function(t){for(var a=t.length,p=t[0].length,o=new Array(p),s=0;s-1;r--)o[s][r]=t[r][s]}return o};d.exports=x},54915:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.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:d=>{/** + * @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 x="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=function(a,p){for(var o=new Uint8Array(a),s=o.length,r=p?"data:"+p+";base64,":"",e=0;e>2],r+=x[(o[e]&3)<<4|o[e+1]>>4],r+=x[(o[e+1]&15)<<2|o[e+2]>>6],r+=x[o[e+2]&63];return s%3===2?r=r.substring(0,r.length-1)+"=":s%3===1&&(r=r.substring(0,r.length-2)+"=="),r};d.exports=t},53134:d=>{/** + * @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 x="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=new Uint8Array(256),a=0;a>4,c[e++]=(l&15)<<4|i>>2,c[e++]=(i&3)<<6|h&63;return u};d.exports=p},65839:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports={ArrayBufferToBase64:t(71334),Base64ToArrayBuffer:t(53134)}},91799:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports={Array:t(37105),Base64:t(65839),Objects:t(1183),String:t(31749),NOOP:t(29747),NULL:t(20242)}},41786:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){var a={};for(var p in t)Array.isArray(t[p])?a[p]=t[p].slice(0):a[p]=t[p];return a};d.exports=x},62644:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){var a,p,o;if(typeof t!="object"||t===null)return t;a=Array.isArray(t)?[]:{};for(o in t)p=t[o],a[o]=x(p);return a};d.exports=x},79291:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(41212),p=function(){var o,s,r,e,n,l,i=arguments[0]||{},h=1,u=arguments.length,c=!1;for(typeof i=="boolean"&&(c=i,i=arguments[1]||{},h=2),u===h&&(i=this,--h);h{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(75508),p=t(35154),o=function(s,r,e){var n=p(s,r,null);if(n===null)return e;if(Array.isArray(n))return a.RND.pick(n);if(typeof n=="object"){if(n.hasOwnProperty("randInt"))return a.RND.integerInRange(n.randInt[0],n.randInt[1]);if(n.hasOwnProperty("randFloat"))return a.RND.realInRange(n.randFloat[0],n.randFloat[1])}else if(typeof n=="function")return n(r);return n};d.exports=o},95540:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){var o=typeof t;return!t||o==="number"||o==="string"?p:t.hasOwnProperty(a)&&t[a]!==void 0?t[a]:p};d.exports=x},82840:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(35154),p=t(45319),o=function(s,r,e,n,l){l===void 0&&(l=e);var i=a(s,r,l);return p(i,e,n)};d.exports=o},35154:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p,o){if(!t&&!o||typeof t=="number")return p;if(t&&t.hasOwnProperty(a))return t[a];if(o&&o.hasOwnProperty(a))return o[a];if(a.indexOf(".")!==-1){for(var s=a.split("."),r=t,e=o,n=p,l=p,i=!0,h=!0,u=0;u{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){for(var p=0;p{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){for(var p=0;p{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){return t.hasOwnProperty(a)};d.exports=x},41212:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=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};d.exports=x},46975:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(41786),p=function(o,s){var r=a(o);for(var e in s)r.hasOwnProperty(e)||(r[e]=s[e]);return r};d.exports=p},269:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(41786),p=function(o,s){var r=a(o);for(var e in s)r.hasOwnProperty(e)&&(r[e]=s[e]);return r};d.exports=p},18254:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(97022),p=function(o,s){for(var r={},e=0;e{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p){if(!t||typeof t=="number")return!1;if(t.hasOwnProperty(a))return t[a]=p,!0;if(a.indexOf(".")!==-1){for(var o=a.split("."),s=t,r=t,e=0;e{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.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:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){return t.replace(/%([0-9]+)/g,function(p,o){return a[Number(o)-1]})};d.exports=x},41836:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a,p,o){a===void 0&&(a=0),p===void 0&&(p=" "),o===void 0&&(o=3),t=t.toString();var s=0;if(a+1>=t.length)switch(o){case 1:t=new Array(a+1-t.length).join(p)+t;break;case 3:var r=Math.ceil((s=a-t.length)/2),e=s-r;t=new Array(e+1).join(p)+t+new Array(r+1).join(p);break;default:t=t+new Array(a+1-t.length).join(p);break}return t};d.exports=x},33628:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t,a){return a===0?t.slice(1):t.slice(0,a-1)+t.slice(a)};d.exports=x},27671:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return t.split("").reverse().join("")};d.exports=x},45650:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var a=Math.random()*16|0,p=t==="x"?a:a&3|8;return p.toString(16)})};d.exports=x},35355:d=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var x=function(t){return t&&t[0].toUpperCase()+t.slice(1)};d.exports=x},31749:(d,x,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */d.exports={Format:t(27902),Pad:t(41836),RemoveAt:t(33628),Reverse:t(27671),UppercaseFirst:t(35355),UUID:t(45650)}}},E={};function w(d){var x=E[d];if(x!==void 0)return x.exports;var t=E[d]={exports:{}};return y[d](t,t.exports,w),t.exports}w.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}();var R=w(85454);return R})())})(Ux);var es=Ux.exports;const hr=ta(es);var x9=Object.create,Pv=Object.defineProperty,T9=Object.defineProperties,S9=Object.getOwnPropertyDescriptor,C9=Object.getOwnPropertyDescriptors,E9=Object.getOwnPropertyNames,Gm=Object.getOwnPropertySymbols,P9=Object.getPrototypeOf,bx=Object.prototype.hasOwnProperty,A9=Object.prototype.propertyIsEnumerable,zm=(f,g,y)=>g in f?Pv(f,g,{enumerable:!0,configurable:!0,writable:!0,value:y}):f[g]=y,fe=(f,g)=>{for(var y in g||(g={}))bx.call(g,y)&&zm(f,y,g[y]);if(Gm)for(var y of Gm(g))A9.call(g,y)&&zm(f,y,g[y]);return f},Sr=(f,g)=>T9(f,C9(g)),Ft=(f,g)=>()=>(g||f((g={exports:{}}).exports,g),g.exports),w9=(f,g,y,E)=>{if(g&&typeof g=="object"||typeof g=="function")for(let w of E9(g))!bx.call(f,w)&&w!==y&&Pv(f,w,{get:()=>g[w],enumerable:!(E=S9(g,w))||E.enumerable});return f},Vx=(f,g,y)=>(y=f!=null?x9(P9(f)):{},w9(g||!f||!f.__esModule?Pv(y,"default",{value:f,enumerable:!0}):y,f)),uu=Ft(f=>{var g=function(R,d){return Rd?1:0},y=function(R,d){return Rd?-1:0};function E(R){return function(d,x){return R(x,d)}}function w(R){return R===2?function(d,x){return d[0]x[0]?1:d[1]x[1]?1:0}:function(d,x){for(var t=0;tx[t])return 1;t++}return 0}}f.DEFAULT_COMPARATOR=g,f.DEFAULT_REVERSE_COMPARATOR=y,f.reverseComparator=E,f.createTupleComparator=w}),M9=Ft(f=>{f.ARRAY_BUFFER_SUPPORT=typeof ArrayBuffer<"u",f.SYMBOL_SUPPORT=typeof Symbol<"u"}),ye=Ft((f,g)=>{var y=M9(),E=y.ARRAY_BUFFER_SUPPORT,w=y.SYMBOL_SUPPORT;g.exports=function(R,d){var x,t,a,p,o;if(!R)throw new Error("obliterator/forEach: invalid iterable.");if(typeof d!="function")throw new Error("obliterator/forEach: expecting a callback.");if(Array.isArray(R)||E&&ArrayBuffer.isView(R)||typeof R=="string"||R.toString()==="[object Arguments]"){for(a=0,p=R.length;a{var y=uu(),E=ye(),w=y.DEFAULT_COMPARATOR,R=y.reverseComparator;function d(n){if(this.clear(),this.comparator=n||w,typeof this.comparator!="function")throw new Error("mnemonist/FibonacciHeap.constructor: given comparator should be a function.")}d.prototype.clear=function(){this.root=null,this.min=null,this.size=0};function x(n){return{item:n,degree:0}}function t(n,l){n.root?(l.right=n.root.right,l.left=n.root,n.root.right.left=l,n.root.right=l):n.root=l}d.prototype.push=function(n){var l=x(n);return l.left=l,l.right=l,t(this,l),(!this.min||this.comparator(l.item,this.min.item)<=0)&&(this.min=l),++this.size},d.prototype.peek=function(){return this.min?this.min.item:void 0};function a(n){for(var l=[],i=n,h=!1;!(i===n&&h);)i===n&&(h=!0),l.push(i),i=i.right;return l}function p(n,l){n.root===l&&(n.root=l.right),l.left.right=l.right,l.right.left=l.left}function o(n,l){n.child?(l.right=n.child.right,l.left=n.child,n.child.right.left=l,n.child.right=l):n.child=l}function s(n,l,i){p(n,l),l.left=l,l.right=l,o(i,l),i.degree++,l.parent=i}function r(n){var l=new Array(n.size),i=a(n.root),h,u,c,v,m,T;for(h=0,u=i.length;h0&&(T=c,c=v,v=T),s(n,v,c),l[m]=null,m++;l[m]=c}for(h=0;h{var g=Math.pow(2,8)-1,y=Math.pow(2,16)-1,E=Math.pow(2,32)-1,w=Math.pow(2,7)-1,R=Math.pow(2,15)-1,d=Math.pow(2,31)-1;f.getPointerArray=function(t){var a=t-1;if(a<=g)return Uint8Array;if(a<=y)return Uint16Array;if(a<=E)return Uint32Array;throw new Error("mnemonist: Pointer Array of size > 4294967295 is not supported.")},f.getSignedPointerArray=function(t){var a=t-1;return a<=w?Int8Array:a<=R?Int16Array:a<=d?Int32Array:Float64Array},f.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 x={Uint8Array:1,Int8Array:2,Uint16Array:3,Int16Array:4,Uint32Array:5,Int32Array:6,Float32Array:7,Float64Array:8};f.getMinimalRepresentation=function(t,a){var p=null,o=0,s,r,e,n,l;for(n=0,l=t.length;no&&(o=s,p=r);return p},f.isTypedArray=function(t){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView(t)},f.concat=function(){var t=0,a,p,o;for(a=0,o=arguments.length;a{var g=ye(),y=ci();function E(x){return Array.isArray(x)||y.isTypedArray(x)}function w(x){if(typeof x.length=="number")return x.length;if(typeof x.size=="number")return x.size}function R(x){var t=w(x),a=typeof t=="number"?new Array(t):[],p=0;return g(x,function(o){a[p++]=o}),a}function d(x){var t=w(x),a=typeof t=="number"?y.getPointerArray(t):Array,p=typeof t=="number"?new Array(t):[],o=typeof t=="number"?new a(t):[],s=0;return g(x,function(r){p[s]=r,o[s]=s++}),[p,o]}f.isArrayLike=E,f.guessLength=w,f.toArray=R,f.toArrayWithIndices=d}),wv=Ft((f,g)=>{var y=ye(),E=uu(),w=Ri(),R=E.DEFAULT_COMPARATOR,d=E.reverseComparator;function x(u,c,v,m){for(var T=c[m],C,S;m>v;){if(C=m-1>>1,S=c[C],u(T,S)<0){c[m]=S,m=C;continue}break}c[m]=T}function t(u,c,v){for(var m=c.length,T=v,C=c[v],S=2*v+1,P;S=0&&(S=P),c[v]=c[S],v=S,S=2*v+1;c[v]=C,x(u,c,T,v)}function a(u,c,v){c.push(v),x(u,c,0,c.length-1)}function p(u,c){var v=c.pop();if(c.length!==0){var m=c[0];return c[0]=v,t(u,c,0),m}return v}function o(u,c,v){if(c.length===0)throw new Error("mnemonist/heap.replace: cannot pop an empty heap.");var m=c[0];return c[0]=v,t(u,c,0),m}function s(u,c,v){var m;return c.length!==0&&u(c[0],v)<0&&(m=c[0],c[0]=v,v=m,t(u,c,0)),v}function r(u,c){for(var v=c.length,m=v>>1,T=m;--T>=0;)t(u,c,T)}function e(u,c){for(var v=c.length,m=0,T=new Array(v);m=v.length)return v.slice().sort(u);for(A=v.slice(0,c),r(m,A),T=c,C=v.length;T0&&o(m,A,v[T]);return A.sort(u)}var L=w.guessLength(v);return L!==null&&L0&&o(m,A,F)),T++}),A.length>T&&(A.length=T),A.sort(u)}function l(u,c,v){arguments.length===2&&(v=c,c=u,u=R);var m=d(u),T,C,S,P=-1/0,A;if(c===1){if(w.isArrayLike(v)){for(T=0,C=v.length;T0)&&(P=S);return A=new v.constructor(1),A[0]=P,A}return y(v,function(F){(P===-1/0||u(F,P)>0)&&(P=F)}),[P]}if(w.isArrayLike(v)){if(c>=v.length)return v.slice().sort(m);for(A=v.slice(0,c),r(u,A),T=c,C=v.length;T0&&o(u,A,v[T]);return A.sort(m)}var L=w.guessLength(v);return L!==null&&L0&&o(u,A,F)),T++}),A.length>T&&(A.length=T),A.sort(m)}function i(u){if(this.clear(),this.comparator=u||R,typeof this.comparator!="function")throw new Error("mnemonist/Heap.constructor: given comparator should be a function.")}i.prototype.clear=function(){this.items=[],this.size=0},i.prototype.push=function(u){return a(this.comparator,this.items,u),++this.size},i.prototype.peek=function(){return this.items[0]},i.prototype.pop=function(){return this.size!==0&&this.size--,p(this.comparator,this.items)},i.prototype.replace=function(u){return o(this.comparator,this.items,u)},i.prototype.pushpop=function(u){return s(this.comparator,this.items,u)},i.prototype.consume=function(){return this.size=0,e(this.comparator,this.items)},i.prototype.toArray=function(){return e(this.comparator,this.items.slice())},i.prototype.inspect=function(){var u=this.toArray();return Object.defineProperty(u,"constructor",{value:i,enumerable:!1}),u},typeof Symbol<"u"&&(i.prototype[Symbol.for("nodejs.util.inspect.custom")]=i.prototype.inspect);function h(u){if(this.clear(),this.comparator=u||R,typeof this.comparator!="function")throw new Error("mnemonist/MaxHeap.constructor: given comparator should be a function.");this.comparator=d(this.comparator)}h.prototype=i.prototype,i.from=function(u,c){var v=new i(c),m;return w.isArrayLike(u)?m=u.slice():m=w.toArray(u),r(v.comparator,m),v.items=m,v.size=m.length,v},h.from=function(u,c){var v=new h(c),m;return w.isArrayLike(u)?m=u.slice():m=w.toArray(u),r(v.comparator,m),v.items=m,v.size=m.length,v},i.siftUp=t,i.siftDown=x,i.push=a,i.pop=p,i.replace=o,i.pushpop=s,i.heapify=r,i.consume=e,i.nsmallest=n,i.nlargest=l,i.MinHeap=i,i.MaxHeap=h,g.exports=i}),R9=Ft((f,g)=>{var y="";function E(a,p,o){for(var s=p.length,r=[],e=s,n=-1,l,i=0,h;e--;)n=Math.max(a[p[e]+o],n);for(h=n>>24&&32||n>>16&&24||n>>8&&16||8;i>i&15].push(p[e]);for(l=0;l<16;l++)for(n=r[l].length;n--;)p[++e]=r[l][n]}}function w(a,p,o,s){return a[o]-a[s]||(o%3===2?a[o+1]-a[s+1]||p[o+2]-p[s+2]:p[o+1]-p[s+1])}function R(a,p){var o=[],s=[],r=2*p/3|0,e=p-r,n=r+1>>1,l=r,i=0,h,u=[],c=[];if(p===1)return[0];for(;l--;)o[l]=(l*3>>1)+1;for(l=3;l--;)E(a,o,l);for(i=s[(o[0]/3|0)+(o[0]%3===1?0:n)]=1,l=1;lthis.firstLength&&e>this.firstLength)){for(p=Math.min(this.length-r,this.length-e),s=0;sa.length&&(a=this.text.slice(r,r+p))}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),p=0;p{var y=ye();function E(a){this.size=0,this.items=new Map,this.inverse=a}function w(){this.size=0,this.items=new Map,this.inverse=new E(this)}function R(){this.size=0,this.items.clear(),this.inverse.items.clear()}w.prototype.clear=R,E.prototype.clear=R;function d(a,p){if(this.items.has(a)){var o=this.items.get(a);if(o===p)return this;this.inverse.items.delete(o)}if(this.inverse.items.has(p)){var s=this.inverse.items.get(p);if(s===a)return this;this.items.delete(s)}return this.items.set(a,p),this.inverse.items.set(p,a),this.size=this.items.size,this.inverse.size=this.inverse.items.size,this}w.prototype.set=d,E.prototype.set=d;function x(a){if(this.items.has(a)){var p=this.items.get(a);return this.items.delete(a),this.inverse.items.delete(p),this.size=this.items.size,this.inverse.size=this.inverse.items.size,!0}return!1}w.prototype.delete=x,E.prototype.delete=x;var t=["has","get","forEach","keys","values","entries"];t.forEach(function(a){w.prototype[a]=E.prototype[a]=function(){return Map.prototype[a].apply(this.items,arguments)}}),typeof Symbol<"u"&&(w.prototype[Symbol.iterator]=w.prototype.entries,E.prototype[Symbol.iterator]=E.prototype.entries),w.prototype.inspect=function(){var a={left:this.items,right:this.inverse.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),E.prototype.inspect=function(){var a={left:this.inverse.items,right:this.items};return Object.defineProperty(a,"constructor",{value:E,enumerable:!1}),a},typeof Symbol<"u"&&(E.prototype[Symbol.for("nodejs.util.inspect.custom")]=E.prototype.inspect),w.from=function(a){var p=new w;return y(a,function(o,s){p.set(s,o)}),p},g.exports=w}),Ye=Ft((f,g)=>{function y(E){if(typeof E!="function")throw new Error("obliterator/iterator: expecting a function!");this.next=E}typeof Symbol<"u"&&(y.prototype[Symbol.iterator]=function(){return this}),y.of=function(){var E=arguments,w=E.length,R=0;return new y(function(){return R>=w?{done:!0}:{done:!1,value:E[R++]}})},y.empty=function(){var E=new y(function(){return{done:!0}});return E},y.fromSequence=function(E){var w=0,R=E.length;return new y(function(){return w>=R?{done:!0}:{done:!1,value:E[w++]}})},y.is=function(E){return E instanceof y?!0:typeof E=="object"&&E!==null&&typeof E.next=="function"},g.exports=y}),Wx=Ft(f=>{function g(d){return d|=d>>1,d|=d>>2,d|=d>>4,d|=d>>8,d|=d>>16,d&~(d>>1)}f.msb32=g;function y(d){return d|=d>>1,d|=d>>2,d|=d>>4,d&~(d>>1)}f.msb8=y,f.test=function(d,x){return d>>x&1},f.criticalBit8=function(d,x){return y(d^x)},f.criticalBit8Mask=function(d,x){return~y(d^x)>>>0&255},f.testCriticalBit8=function(d,x){return 1+(d|x)>>8},f.criticalBit32Mask=function(d,x){return~g(d^x)>>>0&4294967295},f.popcount=function(d){return d-=d>>1&1431655765,d=(d&858993459)+(d>>2&858993459),d=d+(d>>4)&252645135,d+=d>>8,d+=d>>16,d&127};var E=new Uint8Array(Math.pow(2,8));for(w=0,R=E.length;w>8&255]+E[d>>16&255]+E[d>>24&255]}}),F9=Ft((f,g)=>{var y=Ye(),E=Wx();function w(R){this.length=R,this.clear()}w.prototype.clear=function(){this.size=0,this.array=new Uint32Array(Math.ceil(this.length/32))},w.prototype.set=function(R,d){var x=R>>5,t=R&31,a=this.array[x],p;return d===0||d===!1?p=this.array[x]&=~(1<>>0,p>a?this.size++:p>5,x=R&31,t=this.array[d],a;return a=this.array[d]&=~(1<>5,x=R&31,t=this.array[d],a=this.array[d]^=1<>>0,a>t?this.size++:a>5,x=R&31;return this.array[d]>>x&1},w.prototype.test=function(R){return!!this.get(R)},w.prototype.rank=function(R){if(this.size===0)return 0;for(var d=R>>5,x=R&31,t=0,a=0;a=this.length)return-1;for(var d,x=32,t=0,a=0,p=0,o=this.array.length;p>s&1,a===R)return t}},w.prototype.forEach=function(R,d){d=arguments.length>1?d:this;for(var x=this.length,t,a,p=32,o=0,s=this.array.length;o>r&1,R.call(d,a,o*32+r)}},w.prototype.values=function(){var R=this.length,d=!1,x,t,a=this.array,p=a.length,o=0,s=-1,r=32;return new y(function e(){if(!d){if(o>=p)return{done:!0};o===p-1&&(r=R%32||32),x=a[o++],d=!0,s=-1}return s++,s>=r?(d=!1,e()):(t=x>>s&1,{value:t})})},w.prototype.entries=function(){var R=this.length,d=!1,x,t,a=this.array,p,o=a.length,s=0,r=-1,e=32;return new y(function n(){if(!d){if(s>=o)return{done:!0};s===o-1&&(e=R%32||32),x=a[s++],d=!0,r=-1}return r++,p=~-s*32+r,r>=e?(d=!1,n()):(t=x>>r&1,{value:[p,t]})})},typeof Symbol<"u"&&(w.prototype[Symbol.iterator]=w.prototype.values),w.prototype.inspect=function(){var R=new Uint8Array(this.length);return this.forEach(function(d,x){R[x]=d}),Object.defineProperty(R,"constructor",{value:w,enumerable:!1}),R},typeof Symbol<"u"&&(w.prototype[Symbol.for("nodejs.util.inspect.custom")]=w.prototype.inspect),w.prototype.toJSON=function(){return Array.from(this.array)},g.exports=w}),O9=Ft((f,g)=>{var y=Ye(),E=Wx(),w=function(x){return Math.max(1,Math.ceil(x*1.5))};function R(x){return new Uint32Array(Math.ceil(x/32))}function d(x){var t=x||0,a=w;typeof x=="object"&&(t=x.initialLength||x.initialCapacity||0,a=x.policy||a),this.size=0,this.length=t,this.capacity=Math.ceil(this.length/32)*32,this.policy=a,this.array=R(this.capacity)}d.prototype.set=function(x,t){if(this.length>5,p=x&31,o=this.array[a],s;return t===0||t===!1?s=this.array[a]&=~(1<>>0,s>o?this.size++:s>5,a=x&31,p=this.array[t],o;return o=this.array[t]&=~(1<>5,a=x&31,p=this.array[t],o=this.array[t]^=1<>>0,o>p?this.size++:othis.array.length?(this.array=new Uint32Array(p),this.array.set(a,0)):this.array=a.slice(0,p),this.capacity=x,this)},d.prototype.grow=function(x){var t;if(typeof x=="number"){if(this.capacity>=x)return this;for(t=this.capacity;t>5,p=t&31;return this.array[a]|=1<>5,a=x&31;return this.array[t]>>a&1}},d.prototype.get=function(x){if(!(this.length>5,a=x&31;return this.array[t]>>a&1}},d.prototype.test=function(x){return this.length>5,a=x&31,p=0,o=0;o=this.length)return-1;for(var t,a=32,p=0,o=0,s=0,r=this.array.length;s>e&1,o===x)return p}},d.prototype.forEach=function(x,t){t=arguments.length>1?t:this;for(var a=this.length,p,o,s=32,r=0,e=this.array.length;r>n&1,x.call(t,o,r*32+n)}},d.prototype.values=function(){var x=this.length,t=!1,a,p,o=this.array,s=o.length,r=0,e=-1,n=32;return new y(function l(){if(!t){if(r>=s)return{done:!0};r===s-1&&(n=x%32||32),a=o[r++],t=!0,e=-1}return e++,e>=n?(t=!1,l()):(p=a>>e&1,{value:p})})},d.prototype.entries=function(){var x=this.length,t=!1,a,p,o=this.array,s,r=o.length,e=0,n=-1,l=32;return new y(function i(){if(!t){if(e>=r)return{done:!0};e===r-1&&(l=x%32||32),a=o[e++],t=!0,n=-1}return n++,s=~-e*32+n,n>=l?(t=!1,i()):(p=a>>n&1,{value:[s,p]})})},typeof Symbol<"u"&&(d.prototype[Symbol.iterator]=d.prototype.values),d.prototype.inspect=function(){var x=new Uint8Array(this.length);return this.forEach(function(t,a){x[a]=t}),Object.defineProperty(x,"constructor",{value:d,enumerable:!1}),x},typeof Symbol<"u"&&(d.prototype[Symbol.for("nodejs.util.inspect.custom")]=d.prototype.inspect),d.prototype.toJSON=function(){return Array.from(this.array.slice(0,(this.length>>5)+1))},g.exports=d}),D9=Ft((f,g)=>{function y(R,d){return(R&65535)*d+(((R>>>16)*d&65535)<<16)&4294967295}function E(R,d){return(R&65535)+(d>>>16)+(((R>>>16)+d&65535)<<16)&4294967295}function w(R,d){return R<>>32-d}g.exports=function(R,d){var x=3432918353,t=461845907,a=15,p=13,o=5,s=1801774676,r=R,e,n,l;for(n=0,l=d.length-4;n<=l;n+=4)e=d[n]|d[n+1]<<8|d[n+2]<<16|d[n+3]<<24,e=y(e,x),e=w(e,a),e=y(e,t),r^=e,r=w(r,p),r=y(r,o),r=E(r,s);switch(e=0,d.length&3){case 3:e^=d[n+2]<<16;case 2:e^=d[n+1]<<8;case 1:e^=d[n],e=y(e,x),e=w(e,a),e=y(e,t),r^=e}return r^=d.length,r^=r>>>16,r=y(r,2246822507),r^=r>>>13,r=y(r,3266489909),r^=r>>>16,r>>>0}}),I9=Ft((f,g)=>{var y=D9(),E=ye(),w=Math.LN2*Math.LN2,R={errorRate:.005};function d(a){var p=new Uint16Array(a.length),o,s;for(o=0,s=a.length;o>3]|=e}return this},t.prototype.test=function(a){for(var p=d(a),o=0,s=this.hashFunctions;o>3]&1<<(7&r)))return!1}return!0},t.prototype.toJSON=function(){return this.data},t.from=function(a,p){if(!p&&(p=a.length||a.size,typeof p!="number"))throw new Error("BloomFilter.from: could not infer the filter's capacity. Try passing it as second argument.");var o=new t(p);return E(a,function(s){o.add(s)}),o},g.exports=t}),B9=Ft((f,g)=>{var y=ye();function E(w){if(typeof w!="function")throw new Error("mnemonist/BKTree.constructor: given `distance` should be a function.");this.distance=w,this.clear()}E.prototype.add=function(w){if(!this.root)return this.root={item:w,children:{}},this.size++,this;for(var R=this.root,d;d=this.distance(w,R.item),!!R.children[d];)R=R.children[d];return R.children[d]={item:w,children:{}},this.size++,this},E.prototype.search=function(w,R){if(!this.root)return[];for(var d=[],x=[this.root],t,a,p,o,s;x.length;)for(t=x.pop(),p=this.distance(R,t.item),p<=w&&d.push({item:t.item,distance:p}),o=p-w,s=p+w+1;o{var y=Ri(),E=Ye();function w(R,d){if(arguments.length<2)throw new Error("mnemonist/fixed-deque: expecting an Array class and a capacity.");if(typeof d!="number"||d<=0)throw new Error("mnemonist/fixed-deque: `capacity` should be a positive number.");this.ArrayClass=R,this.capacity=d,this.items=new R(this.capacity),this.clear()}w.prototype.clear=function(){this.start=0,this.size=0},w.prototype.push=function(R){if(this.size===this.capacity)throw new Error("mnemonist/fixed-deque.push: deque capacity ("+this.capacity+") exceeded!");var d=(this.start+this.size)%this.capacity;return this.items[d]=R,++this.size},w.prototype.unshift=function(R){if(this.size===this.capacity)throw new Error("mnemonist/fixed-deque.unshift: deque capacity ("+this.capacity+") exceeded!");var d=this.start-1;return this.start===0&&(d=this.capacity-1),this.items[d]=R,this.start=d,++this.size},w.prototype.pop=function(){if(this.size===0)return;let R=(this.start+this.size-1)%this.capacity;return this.size--,this.items[R]},w.prototype.shift=function(){if(this.size!==0){var R=this.start;return this.size--,this.start++,this.start===this.capacity&&(this.start=0),this.items[R]}},w.prototype.peekFirst=function(){if(this.size!==0)return this.items[this.start]},w.prototype.peekLast=function(){if(this.size!==0){var R=this.start+this.size-1;return R>this.capacity&&(R-=this.capacity),this.items[R]}},w.prototype.get=function(R){if(this.size!==0)return R=this.start+R,R>this.capacity&&(R-=this.capacity),this.items[R]},w.prototype.forEach=function(R,d){d=arguments.length>1?d:this;for(var x=this.capacity,t=this.size,a=this.start,p=0;p=x)return{done:!0};var p=R[t];return t++,a++,t===d&&(t=0),{value:p,done:!1}})},w.prototype.entries=function(){var R=this.items,d=this.capacity,x=this.size,t=this.start,a=0;return new E(function(){if(a>=x)return{done:!0};var p=R[t];return t++,t===d&&(t=0),{value:[a++,p],done:!1}})},typeof Symbol<"u"&&(w.prototype[Symbol.iterator]=w.prototype.values),w.prototype.inspect=function(){var R=this.toArray();return R.type=this.ArrayClass.name,R.capacity=this.capacity,Object.defineProperty(R,"constructor",{value:w,enumerable:!1}),R},typeof Symbol<"u"&&(w.prototype[Symbol.for("nodejs.util.inspect.custom")]=w.prototype.inspect),w.from=function(R,d,x){if(arguments.length<3&&(x=y.guessLength(R),typeof x!="number"))throw new Error("mnemonist/fixed-deque.from: could not guess iterable length. Please provide desired capacity as last argument.");var t=new w(d,x);if(y.isArrayLike(R)){var a,p;for(a=0,p=R.length;a{var y=Ri(),E=Xx();function w(d,x){if(arguments.length<2)throw new Error("mnemonist/circular-buffer: expecting an Array class and a capacity.");if(typeof x!="number"||x<=0)throw new Error("mnemonist/circular-buffer: `capacity` should be a positive number.");this.ArrayClass=d,this.capacity=x,this.items=new d(this.capacity),this.clear()}function R(d){w.prototype[d]=E.prototype[d]}Object.keys(E.prototype).forEach(R),typeof Symbol<"u"&&Object.getOwnPropertySymbols(E.prototype).forEach(R),w.prototype.push=function(d){var x=(this.start+this.size)%this.capacity;return this.items[x]=d,this.size===this.capacity?(this.start=(x+1)%this.capacity,this.size):++this.size},w.prototype.unshift=function(d){var x=this.start-1;return this.start===0&&(x=this.capacity-1),this.items[x]=d,this.size===this.capacity?(this.start=x,this.size):(this.start=x,++this.size)},w.from=function(d,x,t){if(arguments.length<3&&(t=y.guessLength(d),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 w(x,t);if(y.isArrayLike(d)){var p,o;for(p=0,o=d.length;p{function y(E){if(typeof E!="function")throw new Error("mnemonist/DefaultMap.constructor: expecting a function.");this.items=new Map,this.factory=E,this.size=0}y.prototype.clear=function(){this.items.clear(),this.size=0},y.prototype.get=function(E){var w=this.items.get(E);return typeof w>"u"&&(w=this.factory(E,this.size),this.items.set(E,w),this.size++),w},y.prototype.peek=function(E){return this.items.get(E)},y.prototype.set=function(E,w){return this.items.set(E,w),this.size=this.items.size,this},y.prototype.has=function(E){return this.items.has(E)},y.prototype.delete=function(E){var w=this.items.delete(E);return this.size=this.items.size,w},y.prototype.forEach=function(E,w){w=arguments.length>1?w:this,this.items.forEach(E,w)},y.prototype.entries=function(){return this.items.entries()},y.prototype.keys=function(){return this.items.keys()},y.prototype.values=function(){return this.items.values()},typeof Symbol<"u"&&(y.prototype[Symbol.iterator]=y.prototype.entries),y.prototype.inspect=function(){return this.items},typeof Symbol<"u"&&(y.prototype[Symbol.for("nodejs.util.inspect.custom")]=y.prototype.inspect),y.autoIncrement=function(){var E=0;return function(){return E++}},g.exports=y}),z9=Ft((f,g)=>{function y(E){if(typeof E!="function")throw new Error("mnemonist/DefaultWeakMap.constructor: expecting a function.");this.items=new WeakMap,this.factory=E}y.prototype.clear=function(){this.items=new WeakMap},y.prototype.get=function(E){var w=this.items.get(E);return typeof w>"u"&&(w=this.factory(E),this.items.set(E,w)),w},y.prototype.peek=function(E){return this.items.get(E)},y.prototype.set=function(E,w){return this.items.set(E,w),this},y.prototype.has=function(E){return this.items.has(E)},y.prototype.delete=function(E){return this.items.delete(E)},y.prototype.inspect=function(){return this.items},typeof Symbol<"u"&&(y.prototype[Symbol.for("nodejs.util.inspect.custom")]=y.prototype.inspect),g.exports=y}),U9=Ft((f,g)=>{var y=ci();function E(w){var R=y.getPointerArray(w),d=y.getPointerArray(Math.log2(w));this.size=w,this.dimension=w,this.parents=new R(w),this.ranks=new d(w);for(var x=0;xa?this.parents[x]=d:(this.parents[x]=d,this.ranks[d]++),this},E.prototype.connected=function(w,R){var d=this.find(w);return d===this.find(R)},E.prototype.mapping=function(){for(var w=y.getPointerArray(this.dimension),R={},d=new w(this.size),x=0,t,a=0,p=this.parents.length;a"u"?(d[a]=x,R[t]=x++):d[a]=R[t];return d},E.prototype.compile=function(){for(var w={},R=new Array(this.dimension),d=0,x,t=0,a=this.parents.length;t"u"?(R[d]=[t],w[x]=d++):R[w[x]].push(t);return R},E.prototype.inspect=function(){var w=this.compile();return Object.defineProperty(w,"constructor",{value:E,enumerable:!1}),w},typeof Symbol<"u"&&(E.prototype[Symbol.for("nodejs.util.inspect.custom")]=E.prototype.inspect),g.exports=E}),Mv=Ft((f,g)=>{var y=uu(),E=wv(),w=y.DEFAULT_COMPARATOR,R=y.reverseComparator;function d(a,p,o,s){for(var r=o,e=s,n=p[s],l=2*s+1,i;l=0&&(l=i),p[s]=p[l],s=l,l=2*s+1;p[s]=n,E.siftDown(a,p,e,s)}function x(a,p,o,s){for(var r=s,e=r,n=new a(s),l,i;e>0;)l=o[--e],e!==0&&(i=o[0],o[0]=l,d(p,o,--s,0),l=i),n[e]=l;return n}function t(a,p,o){if(arguments.length===2&&(o=p,p=null),this.ArrayClass=a,this.capacity=o,this.items=new a(o),this.clear(),this.comparator=p||w,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=R(this.comparator)}t.prototype.clear=function(){this.size=0},t.prototype.push=function(a){return this.size0&&E.replace(this.comparator,this.items,a),this.size},t.prototype.peek=function(){return this.items[0]},t.prototype.consume=function(){var a=x(this.ArrayClass,this.comparator,this.items,this.size);return this.size=0,a},t.prototype.toArray=function(){return x(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),g.exports=t}),b9=Ft((f,g)=>{var y=ye(),E=function(R){return R};function w(R){if(this.items=new Map,this.clear(),Array.isArray(R)?(this.writeHashFunction=R[0],this.readHashFunction=R[1]):(this.writeHashFunction=R,this.readHashFunction=R),this.writeHashFunction||(this.writeHashFunction=E),this.readHashFunction||(this.readHashFunction=E),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.")}w.prototype.clear=function(){this.items.clear(),this.size=0},w.prototype.add=function(R){var d=this.writeHashFunction(R);return this.items.set(d,R),this.size=this.items.size,this},w.prototype.set=function(R,d){return R=this.writeHashFunction(R),this.items.set(R,d),this.size=this.items.size,this},w.prototype.get=function(R){return R=this.readHashFunction(R),this.items.get(R)},w.prototype.has=function(R){return R=this.readHashFunction(R),this.items.has(R)},w.prototype.forEach=function(R,d){d=arguments.length>1?d:this,this.items.forEach(function(x){R.call(d,x,x)})},w.prototype.values=function(){return this.items.values()},typeof Symbol<"u"&&(w.prototype[Symbol.iterator]=w.prototype.values),w.prototype.inspect=function(){var R=Array.from(this.items.values());return Object.defineProperty(R,"constructor",{value:w,enumerable:!1}),R},typeof Symbol<"u"&&(w.prototype[Symbol.for("nodejs.util.inspect.custom")]=w.prototype.inspect),w.from=function(R,d,x){var t=new w(d);return y(R,function(a,p){x?t.set(p,a):t.add(a)}),t},g.exports=w}),Yx=Ft((f,g)=>{var y=Ye(),E=ye();function w(R){this.Container=R||Array,this.items=new Map,this.clear(),Object.defineProperty(this.items,"constructor",{value:w,enumerable:!1})}w.prototype.clear=function(){this.size=0,this.dimension=0,this.items.clear()},w.prototype.set=function(R,d){var x=this.items.get(R),t;return x||(this.dimension++,x=new this.Container,this.items.set(R,x)),this.Container===Set?(t=x.size,x.add(d),t"u"?0:this.Container===Set?d.size:d.length},w.prototype.count=w.prototype.multiplicity,w.prototype.forEach=function(R,d){d=arguments.length>1?d:this;var x;function t(a){R.call(d,a,x)}this.items.forEach(function(a,p){x=p,a.forEach(t)})},w.prototype.forEachAssociation=function(R,d){d=arguments.length>1?d:this,this.items.forEach(R,d)},w.prototype.keys=function(){return this.items.keys()},w.prototype.values=function(){var R=this.items.values(),d=!1,x,t,a,p;return this.Container===Set?new y(function o(){if(!d){if(t=R.next(),t.done)return{done:!0};d=!0,x=t.value.values()}return t=x.next(),t.done?(d=!1,o()):{done:!1,value:t.value}}):new y(function o(){if(!d){if(t=R.next(),t.done)return{done:!0};d=!0,x=t.value,a=0,p=x.length}return a>=p?(d=!1,o()):{done:!1,value:x[a++]}})},w.prototype.entries=function(){var R=this.items.entries(),d=!1,x,t,a,p,o;return this.Container===Set?new y(function s(){if(!d){if(t=R.next(),t.done)return{done:!0};d=!0,a=t.value[0],x=t.value[1].values()}return t=x.next(),t.done?(d=!1,s()):{done:!1,value:[a,t.value]}}):new y(function s(){if(!d){if(t=R.next(),t.done)return{done:!0};d=!0,a=t.value[0],x=t.value[1],p=0,o=x.length}return p>=o?(d=!1,s()):{done:!1,value:[a,x[p++]]}})},w.prototype.containers=function(){return this.items.values()},w.prototype.associations=function(){return this.items.entries()},typeof Symbol<"u"&&(w.prototype[Symbol.iterator]=w.prototype.entries),w.prototype.inspect=function(){return this.items},typeof Symbol<"u"&&(w.prototype[Symbol.for("nodejs.util.inspect.custom")]=w.prototype.inspect),w.prototype.toJSON=function(){return this.items},w.from=function(R,d){var x=new w(d);return E(R,function(t,a){x.set(a,t)}),x},g.exports=w}),V9=Ft((f,g)=>{var y=Yx(),E=ye(),w=function(d){return d};function R(d,x){if(this.items=new y(x),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/FuzzyMultiMap.constructor: invalid hash function given.");if(typeof this.readHashFunction!="function")throw new Error("mnemonist/FuzzyMultiMap.constructor: invalid hash function given.")}R.prototype.clear=function(){this.items.clear(),this.size=0,this.dimension=0},R.prototype.add=function(d){var x=this.writeHashFunction(d);return this.items.set(x,d),this.size=this.items.size,this.dimension=this.items.dimension,this},R.prototype.set=function(d,x){return d=this.writeHashFunction(d),this.items.set(d,x),this.size=this.items.size,this.dimension=this.items.dimension,this},R.prototype.get=function(d){return d=this.readHashFunction(d),this.items.get(d)},R.prototype.has=function(d){return d=this.readHashFunction(d),this.items.has(d)},R.prototype.forEach=function(d,x){x=arguments.length>1?x:this,this.items.forEach(function(t){d.call(x,t,t)})},R.prototype.values=function(){return this.items.values()},typeof Symbol<"u"&&(R.prototype[Symbol.iterator]=R.prototype.values),R.prototype.inspect=function(){var d=Array.from(this);return Object.defineProperty(d,"constructor",{value:R,enumerable:!1}),d},typeof Symbol<"u"&&(R.prototype[Symbol.for("nodejs.util.inspect.custom")]=R.prototype.inspect),R.from=function(d,x,t,a){arguments.length===3&&typeof t=="boolean"&&(a=t,t=Array);var p=new R(x,t);return E(d,function(o,s){a?p.set(s,o):p.add(o)}),p},g.exports=R}),W9=Ft((f,g)=>{var y=1024;function E(R){return(R&R-1)===0}function w(R,d){if(arguments.length<1)throw new Error("mnemonist/hashed-array-tree: expecting at least a byte array constructor.");var x=d||0,t=y,a=0;if(typeof d=="object"&&(x=d.initialCapacity||0,a=d.initialLength||0,t=d.blockSize||y),!t||!E(t))throw new Error("mnemonist/hashed-array-tree: block size should be a power of two.");var p=Math.max(a,x),o=Math.ceil(p/t);this.ArrayClass=R,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 s=0;s>this.blockMask,t=R&this.offsetMask;return this.blocks[x][t]=d,this},w.prototype.get=function(R){if(!(this.length>this.blockMask,x=R&this.offsetMask;return this.blocks[d][x]}},w.prototype.grow=function(R){if(typeof R!="number"&&(R=this.capacity+this.blockSize),this.capacity>=R)return this;for(;this.capacity>this.blockMask,t=d&this.offsetMask;return this.blocks[x][t]=R,++this.length},w.prototype.pop=function(){if(this.length!==0){var R=this.blocks[this.blocks.length-1],d=--this.length&this.offsetMask;return R[d]}},w.prototype.inspect=function(){for(var R=new this.ArrayClass(this.length),d,x=0,t=this.length;x>this.blockMask,R[x]=this.blocks[d][x&this.offsetMask];return R.type=this.ArrayClass.name,R.items=this.length,R.capacity=this.capacity,R.blockSize=this.blockSize,Object.defineProperty(R,"constructor",{value:w,enumerable:!1}),R},typeof Symbol<"u"&&(w.prototype[Symbol.for("nodejs.util.inspect.custom")]=w.prototype.inspect),g.exports=w}),Hx=Ft((f,g)=>{var y=Ye(),E=Ri();function w(R,d){if(arguments.length<2)throw new Error("mnemonist/fixed-stack: expecting an Array class and a capacity.");if(typeof d!="number"||d<=0)throw new Error("mnemonist/fixed-stack: `capacity` should be a positive number.");this.capacity=d,this.ArrayClass=R,this.items=new this.ArrayClass(this.capacity),this.clear()}w.prototype.clear=function(){this.size=0},w.prototype.push=function(R){if(this.size===this.capacity)throw new Error("mnemonist/fixed-stack.push: stack capacity ("+this.capacity+") exceeded!");return this.items[this.size++]=R,this.size},w.prototype.pop=function(){if(this.size!==0)return this.items[--this.size]},w.prototype.peek=function(){return this.items[this.size-1]},w.prototype.forEach=function(R,d){d=arguments.length>1?d:this;for(var x=0,t=this.items.length;x=d)return{done:!0};var t=R[d-x-1];return x++,{value:t,done:!1}})},w.prototype.entries=function(){var R=this.items,d=this.size,x=0;return new y(function(){if(x>=d)return{done:!0};var t=R[d-x-1];return{value:[x++,t],done:!1}})},typeof Symbol<"u"&&(w.prototype[Symbol.iterator]=w.prototype.values),w.prototype.toString=function(){return this.toArray().join(",")},w.prototype.toJSON=function(){return this.toArray()},w.prototype.inspect=function(){var R=this.toArray();return R.type=this.ArrayClass.name,R.capacity=this.capacity,Object.defineProperty(R,"constructor",{value:w,enumerable:!1}),R},typeof Symbol<"u"&&(w.prototype[Symbol.for("nodejs.util.inspect.custom")]=w.prototype.inspect),w.from=function(R,d,x){if(arguments.length<3&&(x=E.guessLength(R),typeof x!="number"))throw new Error("mnemonist/fixed-stack.from: could not guess iterable length. Please provide desired capacity as last argument.");var t=new w(d,x);if(E.isArrayLike(R)){var a,p;for(a=0,p=R.length;a{var y=Ri(),E=ci(),w=Hx();function R(x,t,a,p,o,s,r,e){var n=r+(e-r)/2|0,l=~-n,i=-~n,h=a[n];p[s]=h+1;var u=t?t(x[h]):x[h][1],c=s*2+1,v=s*2+2,m=-1/0,T=-1/0;r<=l&&(m=R(x,t,a,p,o,c,r,l)),i<=e&&(T=R(x,t,a,p,o,v,i,e));var C=Math.max(u,m,T),S=h;return C===m?S=o[p[c]-1]:C===T&&(S=o[p[v]-1]),o[h]=S,C}function d(x,t){this.size=x.length,this.intervals=x;var a=null,p=null;Array.isArray(t)&&(a=t[0],p=t[1]);var o=x.length,s=E.getPointerArray(o+1),r=new s(o),e;for(e=1;ec?1:0});var n=Math.ceil(Math.log2(o+1)),l=Math.pow(2,n)-1,i=new s(l),h=new s(o);R(x,p,r,i,h,0,0,o-1),r=null,this.height=n,this.tree=i,this.augmentations=h,this.startGetter=a,this.endGetter=p,this.stack=new w(s,this.height)}d.prototype.intervalsContainingPoint=function(x){var t=[],a=this.stack;a.clear(),a.push(0);for(var p=this.tree.length,o,s,r,e,n,l,i,h,u;a.size;)o=a.pop(),s=this.tree[o]-1,r=this.intervals[s],e=this.intervals[this.augmentations[s]],i=this.endGetter?this.endGetter(e):e[1],!(x>i)&&(h=o*2+1,h=n&&x<=l&&t.push(r),!(xu)&&(c=r*2+1,c=i&&t<=h&&p.push(n),!(a{f.search=function(g,y,E,w){var R=0;E=typeof E<"u"?E:0,w=typeof w<"u"?w:g.length,w--;for(var d;E<=w;)if(R=E+w>>>1,d=g[R],d>y)w=~-R;else if(d>>1,x=g(y[w],E),x>0)d=~-w;else if(x<0)R=-~w;else return w;return-1},f.lowerBound=function(g,y,E,w){var R=0;for(E=typeof E<"u"?E:0,w=typeof w<"u"?w:g.length;E>>1,y<=g[R]?w=R:E=-~R;return E},f.lowerBoundWithComparator=function(g,y,E){for(var w=0,R=0,d=y.length;R>>1,g(E,y[w])<=0?d=w:R=-~w;return R},f.lowerBoundIndices=function(g,y,E,w,R){var d=0;for(w=typeof w<"u"?w:0,R=typeof R<"u"?R:g.length;w>>1,E<=g[y[d]]?R=d:w=-~d;return w},f.upperBound=function(g,y,E,w){var R=0;for(E=typeof E<"u"?E:0,w=typeof w<"u"?w:g.length;E>>1,y>=g[R]?E=-~R:w=R;return E},f.upperBoundWithComparator=function(g,y,E){for(var w=0,R=0,d=y.length;R>>1,g(E,y[w])>=0?R=-~w:d=w;return R}}),Y9=Ft(f=>{var g=ci(),y=Ri().isArrayLike,E=$x(),w=Av();function R(a,p){if(a.length===0)return p.slice();if(p.length===0)return a.slice();var o;a[0]>p[0]&&(o=a,a=p,p=o);var s=a[a.length-1],r=p[0];if(s<=r)return g.isTypedArray(a)?g.concat(a,p):a.concat(p);var e=new a.constructor(a.length+p.length),n,l,i;for(n=0,l=a.length;np[0]&&(o=a,a=p,p=o);var s=a[a.length-1],r=p[0];if(sp[0]&&(o=a,a=p,p=o);var s=a[a.length-1],r=p[0];if(sc?i=E.lowerBound(p,u,i+1):(e.push(u),n++,i++);return e};function x(a){var p=0,o=-1/0,s,r,e,n=[];for(r=0,e=a.length;ro&&(o=s));if(n.length===0)return new a[0].constructor(0);if(n.length===1)return n[0].slice();if(n.length===2)return R(n[0],n[1]);a=n;var l=new a[0].constructor(p),i=g.getPointerArray(o),h=new i(a.length),u=new w(function(m,T){return m=a[m][h[m]],T=a[T][h[T]],mT?1:0});for(r=0;rp&&(p=o));if(e.length===0)return new a[0].constructor(0);if(e.length===1)return e[0].slice();if(e.length===2)return d(e[0],e[1]);a=e;var n=new a[0].constructor,l=g.getPointerArray(p),i=new l(a.length),h=new w(function(v,m){return v=a[v][i[v]],m=a[m][i[m]],vm?1:0});for(s=0;sp&&(p=s),ro)return[];if(p===o)return[p];var i,h,u=a[0],c,v,m,T,C,S,P=p;for(n=1;nS?v=E.lowerBound(h,C,v+1):(u.push(C),c++,v++);if(u.length===0)return u;P=u[0]}return u},f.merge=function(){if(arguments.length===2){if(y(arguments[0]))return R(arguments[0],arguments[1])}else if(y(arguments[0]))return x(arguments);return null},f.unionUnique=function(){if(arguments.length===2){if(y(arguments[0]))return d(arguments[0],arguments[1])}else if(y(arguments[0]))return t(arguments);return null},f.intersectionUnique=function(){if(arguments.length===2){if(y(arguments[0]))return f.intersectionUniqueArrays(arguments[0],arguments[1])}else if(y(arguments[0]))return f.kWayIntersectionUniqueArrays(arguments);return null}}),H9=Ft((f,g)=>{var y=Ye(),E=ye(),w=Y9();function R(x){return x}function d(x){if(this.clear(),Array.isArray(x)?(this.documentTokenizer=x[0],this.queryTokenizer=x[1]):(this.documentTokenizer=x,this.queryTokenizer=x),this.documentTokenizer||(this.documentTokenizer=R),this.queryTokenizer||(this.queryTokenizer=R),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.")}d.prototype.clear=function(){this.items=[],this.mapping=new Map,this.size=0,this.dimension=0},d.prototype.add=function(x){this.size++;var t=this.items.length;this.items.push(x);var a=this.documentTokenizer(x);if(!Array.isArray(a))throw new Error("mnemonist/InvertedIndex.add: tokenizer function should return an array of tokens.");for(var p=new Set,o,s,r=0,e=a.length;r"u"||a.length===0)return[];if(t.length>1)for(o=1,s=t.length;o"u"||p.length===0)return[];a=w.intersectionUniqueArrays(a,p)}var r=new Array(a.length);for(o=0,s=r.length;o1?t:this;for(var a=0,p=this.documents.length;a=t)return{done:!0};var p=x[a++];return{value:p,done:!1}})},d.prototype.tokens=function(){return this.mapping.keys()},typeof Symbol<"u"&&(d.prototype[Symbol.iterator]=d.prototype.documents),d.prototype.inspect=function(){var x=this.items.slice();return Object.defineProperty(x,"constructor",{value:d,enumerable:!1}),x},typeof Symbol<"u"&&(d.prototype[Symbol.for("nodejs.util.inspect.custom")]=d.prototype.inspect),d.from=function(x,t){var a=new d(t);return E(x,function(p){a.add(p)}),a},g.exports=d}),Kx=Ft(f=>{var g=new Float64Array(64),y=new Float64Array(64);function E(R,d,x){var t,a,p,o,s;for(g[0]=d,y[0]=x,a=0;a>=0;)if(p=g[a],o=y[a]-1,p=t&&py[a-1]-g[a-1]&&(s=g[a],g[a]=g[a-1],g[a-1]=s,s=y[a],y[a]=y[a-1],y[a-1]=s)}else a--;return R}f.inplaceQuickSort=E;function w(R,d,x,t){var a,p,o,s,r,e;for(g[0]=x,y[0]=t,p=0;p>=0;)if(o=g[p],s=y[p]-1,o=a&&oy[p-1]-g[p-1]&&(e=g[p],g[p]=g[p-1],g[p-1]=e,e=y[p],y[p]=y[p-1],y[p-1]=e)}else p--;return d}f.inplaceQuickSortIndices=w}),$9=Ft((f,g)=>{var y=Ri(),E=ci(),w=uu().createTupleComparator,R=Mv(),d=Kx().inplaceQuickSortIndices;function x(r,e,n,l){var i,h=0,u;for(i=0;i>>1),A=n[P],u[D]=A,C>-1&&(S===0?c[C]=D+1:v[C]=D+1),I=(I+1)%r,P!==L&&P!==F-1&&m.push([I,P+1,F,D,1]),P!==L&&m.push([I,L,P,D,0]),D++;return{axes:e,labels:l,pivots:u,lefts:c,rights:v}}function p(r,e){this.dimensions=r,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}p.prototype.nearestNeighbor=function(r){var e=1/0,n=null,l=this.dimensions,i=this.axes,h=this.pivots,u=this.lefts,c=this.rights,v=0;function m(T,C){v++;var S=u[C],P=c[C],A=h[C],L=x(l,i,A,r);if(!(L0?S!==0&&m(T,S-1):P!==0&&m(T,P-1),F*F0?P!==0&&m(T,P-1):S!==0&&m(T,S-1))}}return m(0,0),this.visited=v,this.labels[n]};var o=w(3),s=w(2);p.prototype.kNearestNeighbors=function(r,e){if(r<=0)throw new Error("mnemonist/kd-tree.kNearestNeighbors: k should be a positive number.");if(r=Math.min(r,this.size),r===1)return[this.nearestNeighbor(e)];var n=new R(Array,o,r),l=this.dimensions,i=this.axes,h=this.pivots,u=this.lefts,c=this.rights,v=0;function m(S,P){var A=u[P],L=c[P],F=h[P],I=x(l,i,F,e);n.push([I,v++,F]);var D=e[S],B=i[S][F],G=D-B;S=(S+1)%l,D{var y=Ye(),E=ye();function w(){this.clear()}w.prototype.clear=function(){this.head=null,this.tail=null,this.size=0},w.prototype.first=function(){return this.head?this.head.item:void 0},w.prototype.peek=w.prototype.first,w.prototype.last=function(){return this.tail?this.tail.item:void 0},w.prototype.push=function(R){var d={item:R,next:null};return this.head?(this.tail.next=d,this.tail=d):(this.head=d,this.tail=d),this.size++,this.size},w.prototype.unshift=function(R){var d={item:R,next:null};return this.head?(this.head.next||(this.tail=this.head),d.next=this.head,this.head=d):(this.head=d,this.tail=d),this.size++,this.size},w.prototype.shift=function(){if(this.size){var R=this.head;return this.head=R.next,this.size--,R.item}},w.prototype.forEach=function(R,d){if(this.size){d=arguments.length>1?d:this;for(var x=this.head,t=0;x;)R.call(d,x.item,t,this),x=x.next,t++}},w.prototype.toArray=function(){if(!this.size)return[];for(var R=new Array(this.size),d=0,x=this.size,t=this.head;d{var y=Ye(),E=ye(),w=ci(),R=Ri();function d(x,t,a){if(arguments.length<2&&(a=x,x=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 p=w.getPointerArray(a);this.forward=new p(a),this.backward=new p(a),this.K=typeof x=="function"?new x(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={}}d.prototype.clear=function(){this.size=0,this.head=0,this.tail=0,this.items={}},d.prototype.splayOnTop=function(x){var t=this.head;if(this.head===x)return this;var a=this.backward[x],p=this.forward[x];return this.tail===x?this.tail=a:this.backward[p]=a,this.forward[a]=p,this.backward[t]=x,this.head=x,this.forward[x]=t,this},d.prototype.set=function(x,t){var a=this.items[x];if(typeof a<"u"){this.splayOnTop(a),this.V[a]=t;return}this.size1?t:this;for(var a=0,p=this.size,o=this.head,s=this.K,r=this.V,e=this.forward;a=t)return{done:!0};var s=p[a];return x++,x=t)return{done:!0};var s=p[a];return x++,x=t)return{done:!0};var r=p[a],e=o[a];return x++,x{var y=Rv(),E=ye(),w=ci(),R=Ri();function d(t,a,p){arguments.length<2?y.call(this,t):y.call(this,t,a,p);var o=w.getPointerArray(this.capacity);this.deleted=new o(this.capacity),this.deletedSize=0}for(x in y.prototype)d.prototype[x]=y.prototype[x];var x;typeof Symbol<"u"&&(d.prototype[Symbol.iterator]=y.prototype[Symbol.iterator]),d.prototype.clear=function(){y.prototype.clear.call(this),this.deletedSize=0},d.prototype.set=function(t,a){var p=this.items[t];if(typeof p<"u"){this.splayOnTop(p),this.V[p]=a;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]=a,this.forward[p]=this.head,this.backward[this.head]=p,this.head=p},d.prototype.setpop=function(t,a){var p=null,o=null,s=this.items[t];return typeof s<"u"?(this.splayOnTop(s),p=this.V[s],this.V[s]=a,{evicted:!1,key:t,value:p}):(this.size0?s=this.deleted[--this.deletedSize]:s=this.size,this.size++):(s=this.tail,this.tail=this.backward[s],p=this.V[s],o=this.K[s],delete this.items[this.K[s]]),this.items[t]=s,this.K[s]=t,this.V[s]=a,this.forward[s]=this.head,this.backward[this.head]=s,this.head=s,o?{evicted:!0,key:o,value:p}:null)},d.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 p=this.backward[a],o=this.forward[a];return this.head===a&&(this.head=o),this.tail===a&&(this.tail=p),this.forward[p]=o,this.backward[o]=p,this.size--,this.deleted[this.deletedSize++]=a,!0},d.prototype.remove=function(t,a=void 0){var p=this.items[t];if(typeof p>"u")return a;var o=this.V[p];if(delete this.items[t],this.size===1)return this.size=0,this.head=0,this.tail=0,this.deletedSize=0,o;var s=this.backward[p],r=this.forward[p];return this.head===p&&(this.head=r),this.tail===p&&(this.tail=s),this.forward[s]=r,this.backward[r]=s,this.size--,this.deleted[this.deletedSize++]=p,o},d.from=function(t,a,p,o){if(arguments.length<2){if(o=R.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,p=null);var s=new d(a,p,o);return E(t,function(r,e){s.set(e,r)}),s},g.exports=d}),jx=Ft((f,g)=>{var y=Rv(),E=ye(),w=ci(),R=Ri();function d(x,t,a){if(arguments.length<2&&(a=x,x=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 p=w.getPointerArray(a);this.forward=new p(a),this.backward=new p(a),this.K=typeof x=="function"?new x(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}d.prototype.clear=function(){this.size=0,this.head=0,this.tail=0,this.items.clear()},d.prototype.set=function(x,t){var a=this.items.get(x);if(typeof a<"u"){this.splayOnTop(a),this.V[a]=t;return}this.size{var y=jx(),E=ye(),w=ci(),R=Ri();function d(t,a,p){arguments.length<2?y.call(this,t):y.call(this,t,a,p);var o=w.getPointerArray(this.capacity);this.deleted=new o(this.capacity),this.deletedSize=0}for(x in y.prototype)d.prototype[x]=y.prototype[x];var x;typeof Symbol<"u"&&(d.prototype[Symbol.iterator]=y.prototype[Symbol.iterator]),d.prototype.clear=function(){y.prototype.clear.call(this),this.deletedSize=0},d.prototype.set=function(t,a){var p=this.items.get(t);if(typeof p<"u"){this.splayOnTop(p),this.V[p]=a;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]=a,this.forward[p]=this.head,this.backward[this.head]=p,this.head=p},d.prototype.setpop=function(t,a){var p=null,o=null,s=this.items.get(t);return typeof s<"u"?(this.splayOnTop(s),p=this.V[s],this.V[s]=a,{evicted:!1,key:t,value:p}):(this.size0?s=this.deleted[--this.deletedSize]:s=this.size,this.size++):(s=this.tail,this.tail=this.backward[s],p=this.V[s],o=this.K[s],this.items.delete(this.K[s])),this.items.set(t,s),this.K[s]=t,this.V[s]=a,this.forward[s]=this.head,this.backward[this.head]=s,this.head=s,o?{evicted:!0,key:o,value:p}:null)},d.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 p=this.backward[a],o=this.forward[a];return this.head===a&&(this.head=o),this.tail===a&&(this.tail=p),this.forward[p]=o,this.backward[o]=p,this.size--,this.deleted[this.deletedSize++]=a,!0},d.prototype.remove=function(t,a=void 0){var p=this.items.get(t);if(typeof p>"u")return a;var o=this.V[p];if(this.items.delete(t),this.size===1)return this.size=0,this.head=0,this.tail=0,this.deletedSize=0,o;var s=this.backward[p],r=this.forward[p];return this.head===p&&(this.head=r),this.tail===p&&(this.tail=s),this.forward[s]=r,this.backward[r]=s,this.size--,this.deleted[this.deletedSize++]=p,o},d.from=function(t,a,p,o){if(arguments.length<2){if(o=R.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,p=null);var s=new d(a,p,o);return E(t,function(r,e){s.set(e,r)}),s},g.exports=d}),k9=Ft((f,g)=>{var y=Ye(),E=ye(),w=Mv(),R=function(x,t){return x[1]>t[1]?-1:x[1]"u"?0:t},d.prototype.get=d.prototype.multiplicity,d.prototype.count=d.prototype.multiplicity,d.prototype.frequency=function(x){if(this.size===0)return 0;var t=this.multiplicity(x);return t/this.size},d.prototype.top=function(x){if(typeof x!="number"||x<=0)throw new Error("mnemonist/multi-set.top: n must be a number > 0.");for(var t=new w(Array,R,x),a=this.items.entries(),p;p=a.next(),!p.done;)t.push(p.value);return t.consume()},d.prototype.forEach=function(x,t){t=arguments.length>1?t:this;var a;this.items.forEach(function(p,o){for(a=0;a1?t:this,this.items.forEach(x,t)},d.prototype.keys=function(){return this.items.keys()},d.prototype.values=function(){var x=this.items.entries(),t=!1,a,p,o,s;return new y(function r(){if(!t){if(a=x.next(),a.done)return{done:!0};t=!0,p=a.value[0],o=a.value[1],s=0}return s>=o?(t=!1,r()):(s++,{done:!1,value:p})})},d.prototype.multiplicities=function(){return this.items.entries()},typeof Symbol<"u"&&(d.prototype[Symbol.iterator]=d.prototype.values),d.prototype.inspect=function(){return this.items},typeof Symbol<"u"&&(d.prototype[Symbol.for("nodejs.util.inspect.custom")]=d.prototype.inspect),d.prototype.toJSON=function(){return this.items},d.from=function(x){var t=new d;return E(x,function(a){t.add(a)}),t},d.isSubset=function(x,t){var a=x.multiplicities(),p,o,s;if(x===t)return!0;if(x.dimension>t.dimension)return!1;for(;p=a.next(),!p.done;)if(o=p.value[0],s=p.value[1],t.multiplicity(o){var y=Ye(),E=ye();function w(r,e,n){return((Math.pow(r,2)-Math.pow(Math.abs(e-n),2))/2|0)+r+1}function R(r,e){for(var n=0,l=0,i=e+1;le.length?-1:r.lengthe?1:0}function x(r,e){var n=r+1,l=e/n|0,i=l+1,h,u,c=e-l*n,v=n-c,m=new Array(r+1);for(h=0;h 0");this.levenshtein=r,this.k=e,this.clear()}s.prototype.clear=function(){this.size=0,this.strings=[],this.invertedIndices={}},s.prototype.add=function(r){var e=r.length,n=this.size;this.strings.push(r),this.size++;var l=t(this.k,r),i=this.invertedIndices[e];typeof i>"u"&&(i={},this.invertedIndices[e]=i);var h,u,c,v,m;for(v=0,m=l.length;v"u"?(u=[n],i[c]=u):u.push(n);return this},s.prototype.search=function(r){var e=r.length,n=this.k,l=new Set,i,h,u,c,v,m,T,C,S,P,A,L,F,I,D;for(C=Math.max(0,e-n),S=e+n+1;C1?e:this;for(var n=0,l=this.strings.length;n=e)return{done:!0};var l=r[n];return n++,{value:l,done:!1}})},typeof Symbol<"u"&&(s.prototype[Symbol.iterator]=s.prototype.values),s.prototype.inspect=function(){var r=this.strings.slice();return Object.defineProperty(r,"constructor",{value:s,enumerable:!1}),r},typeof Symbol<"u"&&(s.prototype[Symbol.for("nodejs.util.inspect.custom")]=s.prototype.inspect),s.from=function(r,e,n){var l=new s(e,n);return E(r,function(i){l.add(i)}),l},s.countKeys=R,s.comparator=d,s.partition=x,s.segments=t,s.segmentPos=a,s.multiMatchAwareInterval=p,s.multiMatchAwareSubstrings=o,g.exports=s}),J9=Ft((f,g)=>{var y=Ye(),E=ye();function w(){this.clear()}w.prototype.clear=function(){this.items=[],this.offset=0,this.size=0},w.prototype.enqueue=function(R){return this.items.push(R),++this.size},w.prototype.dequeue=function(){if(this.size){var R=this.items[this.offset];return++this.offset*2>=this.items.length&&(this.items=this.items.slice(this.offset),this.offset=0),this.size--,R}},w.prototype.peek=function(){if(this.size)return this.items[this.offset]},w.prototype.forEach=function(R,d){d=arguments.length>1?d:this;for(var x=this.offset,t=0,a=this.items.length;x=R.length)return{done:!0};var x=R[d];return d++,{value:x,done:!1}})},w.prototype.entries=function(){var R=this.items,d=this.offset,x=0;return new y(function(){if(d>=R.length)return{done:!0};var t=R[d];return d++,{value:[x++,t],done:!1}})},typeof Symbol<"u"&&(w.prototype[Symbol.iterator]=w.prototype.values),w.prototype.toString=function(){return this.toArray().join(",")},w.prototype.toJSON=function(){return this.toArray()},w.prototype.inspect=function(){var R=this.toArray();return Object.defineProperty(R,"constructor",{value:w,enumerable:!1}),R},typeof Symbol<"u"&&(w.prototype[Symbol.for("nodejs.util.inspect.custom")]=w.prototype.inspect),w.from=function(R){var d=new w;return E(R,function(x){d.enqueue(x)}),d},w.of=function(){return w.from(arguments)},g.exports=w}),q9=Ft((f,g)=>{var y=Ye(),E=ye();function w(){this.clear()}w.prototype.clear=function(){this.items=[],this.size=0},w.prototype.push=function(R){return this.items.push(R),++this.size},w.prototype.pop=function(){if(this.size!==0)return this.size--,this.items.pop()},w.prototype.peek=function(){return this.items[this.size-1]},w.prototype.forEach=function(R,d){d=arguments.length>1?d:this;for(var x=0,t=this.items.length;x=d)return{done:!0};var t=R[d-x-1];return x++,{value:t,done:!1}})},w.prototype.entries=function(){var R=this.items,d=R.length,x=0;return new y(function(){if(x>=d)return{done:!0};var t=R[d-x-1];return{value:[x++,t],done:!1}})},typeof Symbol<"u"&&(w.prototype[Symbol.iterator]=w.prototype.values),w.prototype.toString=function(){return this.toArray().join(",")},w.prototype.toJSON=function(){return this.toArray()},w.prototype.inspect=function(){var R=this.toArray();return Object.defineProperty(R,"constructor",{value:w,enumerable:!1}),R},typeof Symbol<"u"&&(w.prototype[Symbol.for("nodejs.util.inspect.custom")]=w.prototype.inspect),w.from=function(R){var d=new w;return E(R,function(x){d.push(x)}),d},w.of=function(){return w.from(arguments)},g.exports=w}),_9=Ft(f=>{f.intersection=function(){if(arguments.length<2)throw new Error("mnemonist/Set.intersection: needs at least two arguments.");var g=new Set,y=1/0,E=null,w,R,d=arguments.length;for(R=0;Ry.size)return!1;for(;w=E.next(),!w.done;)if(!y.has(w.value))return!1;return!0},f.isSuperset=function(g,y){return f.isSubset(y,g)},f.add=function(g,y){for(var E=y.values(),w;w=E.next(),!w.done;)g.add(w.value)},f.subtract=function(g,y){for(var E=y.values(),w;w=E.next(),!w.done;)g.delete(w.value)},f.intersect=function(g,y){for(var E=g.values(),w;w=E.next(),!w.done;)y.has(w.value)||g.delete(w.value)},f.disjunct=function(g,y){for(var E=g.values(),w,R=[];w=E.next(),!w.done;)y.has(w.value)&&R.push(w.value);for(E=y.values();w=E.next(),!w.done;)g.has(w.value)||g.add(w.value);for(var d=0,x=R.length;dy.size&&(E=g,g=y,y=E),g.size===0)return 0;if(g===y)return g.size;for(var w=g.values(),R,d=0;R=w.next(),!R.done;)y.has(R.value)&&d++;return d},f.unionSize=function(g,y){var E=f.intersectionSize(g,y);return g.size+y.size-E},f.jaccard=function(g,y){var E=f.intersectionSize(g,y);if(E===0)return 0;var w=g.size+y.size-E;return E/w},f.overlap=function(g,y){var E=f.intersectionSize(g,y);return E===0?0:E/Math.min(g.size,y.size)}}),tR=Ft((f,g)=>{var y=Ye(),E=ci().getPointerArray;function w(R){var d=E(R);this.start=0,this.size=0,this.capacity=R,this.dense=new d(R),this.sparse=new d(R)}w.prototype.clear=function(){this.start=0,this.size=0},w.prototype.has=function(R){if(this.size===0)return!1;var d=this.sparse[R],x=d=this.start&&d=this.start&&d1?d:this;for(var x=this.capacity,t=this.size,a=this.start,p=0;p=x)return{done:!0};var p=R[t];return t++,a++,t===d&&(t=0),{value:p,done:!1}})},typeof Symbol<"u"&&(w.prototype[Symbol.iterator]=w.prototype.values),w.prototype.inspect=function(){var R=[];return this.forEach(function(d){R.push(d)}),Object.defineProperty(R,"constructor",{value:w,enumerable:!1}),R.capacity=this.capacity,R},typeof Symbol<"u"&&(w.prototype[Symbol.for("nodejs.util.inspect.custom")]=w.prototype.inspect),g.exports=w}),eR=Ft((f,g)=>{var y=Ye(),E=ci().getPointerArray;function w(R,d){arguments.length<2&&(d=R,R=Array);var x=E(d);this.size=0,this.length=d,this.dense=new x(d),this.sparse=new x(d),this.vals=new R(d)}w.prototype.clear=function(){this.size=0},w.prototype.has=function(R){var d=this.sparse[R];return d=this.size||this.dense[d]!==R?!1:(d=this.dense[this.size-1],this.dense[this.sparse[R]]=d,this.sparse[d]=this.sparse[R],this.size--,!0)},w.prototype.forEach=function(R,d){d=arguments.length>1?d:this;for(var x=0;x{var y=Ye(),E=ci().getPointerArray;function w(R){var d=E(R);this.size=0,this.length=R,this.dense=new d(R),this.sparse=new d(R)}w.prototype.clear=function(){this.size=0},w.prototype.has=function(R){var d=this.sparse[R];return d=this.size||this.dense[d]!==R?!1:(d=this.dense[this.size-1],this.dense[this.sparse[R]]=d,this.sparse[d]=this.sparse[R],this.size--,!0)},w.prototype.forEach=function(R,d){d=arguments.length>1?d:this;for(var x,t=0;t{var y=ye(),E=2,w=2,R=new Set([0,1,2]),d={0:"Returns only the top suggestion",1:"Returns suggestions with the smallest edit distance",2:"Returns every suggestion (no early termination)"};function x(e){var n=new Set;return typeof e=="number"&&n.add(e),{suggestions:n,count:0}}function t(e,n,l){return{term:e||"",distance:n||0,count:l||0}}function a(e,n,l,i){i=i||new Set,n++;var h,u=e.length,c;if(u>1)for(c=0;c0&&e[c].length-u.length>i.length-u.length&&(l.suggestions=new Set,l.count=0),(n===2||!l.suggestions.size||e[c].length-u.length>=i.length-u.length)&&l.suggestions.add(h)}function o(e,n){var l=e.length,i=n.length,h=[[]],u=l+i,c=new Map,v,m,T;for(h[0][0]=u,v=0;v<=l;v++)h[v+1]||(h[v+1]=[]),h[v+1][1]=v,h[v+1][0]=u;for(T=0;T<=i;T++)h[1][T+1]=T,h[0][T+1]=u;var C=e+n,S;for(v=0,m=C.length;vh)return[];for(var v=[u],m=new Set,T=new Set,C=[],S,P;v.length>0&&(S=v.shift(),!(l<2&&C.length>0&&c-S.length>C[0].distance));){if(P=e[S],P!==void 0){if(typeof P=="number"&&(P=x(P)),P.count>0&&!T.has(S)){T.add(S);var A=t(S,c-S.length,P.count);if(C.push(A),l<2&&c-S.length===0)break}P.suggestions.forEach(D=>{var B=n[D];if(!T.has(B)){T.add(B);var G=0;if(u!==B)if(B.length===S.length)G=c-S.length;else if(c===S.length)G=B.length-S.length;else{for(var z=0,W=0,Y=B.length;z0||W>0?G=o(B.substr(z,Y-z-W),u.substr(z,c-z-W)):G=o(B,u)}if(l<2&&C.length>0&&C[0].distance>G&&(C=[]),!(l<2&&C.length>0&&G>C[0].distance)&&G<=i){var K=e[B];K!==void 0&&C.push(t(B,G,K.count))}}})}if(c-S.length0&&c-S.length>=C[0].distance)continue;for(var L=0,F=S.length;Lthis.maxLength&&(this.maxLength=e.length)),n.count===1){var l=this.words.length;this.words.push(e);var i=a(e,0,this.maxDistance);i.forEach(h=>{var u=this.dictionary[h];u!==void 0?(typeof u=="number"&&(u=x(u),this.dictionary[h]=u),u.suggestions.has(l)||p(this.words,this.verbosity,u,e,l,h)):this.dictionary[h]=l})}return this.size++,this},r.prototype.search=function(e){return s(this.dictionary,this.words,this.verbosity,this.maxDistance,this.maxLength,e)},r.prototype.inspect=function(){var e=[];e.size=this.size,e.maxDistance=this.maxDistance,e.verbosity=this.verbosity,e.behavior=d[this.verbosity];for(var n in this.dictionary)typeof this.dictionary[n]=="object"&&this.dictionary[n].count&&e.push([n,this.dictionary[n].count]);return Object.defineProperty(e,"constructor",{value:r,enumerable:!1}),e},typeof Symbol<"u"&&(r.prototype[Symbol.for("nodejs.util.inspect.custom")]=r.prototype.inspect),r.from=function(e,n){var l=new r(n);return y(e,function(i){l.add(i)}),l},g.exports=r}),Zx=Ft((f,g)=>{var y=ye(),E=Ye(),w=String.fromCharCode(0);function R(d){this.mode=d===Array?"array":"string",this.clear()}R.prototype.clear=function(){this.root={},this.size=0},R.prototype.set=function(d,x){for(var t=this.root,a,p=0,o=d.length;p"u")return;if(w in x)return x[w]},R.prototype.delete=function(d){var x=this.root,t=null,a=null,p,o,s,r;for(s=0,r=d.length;s"u")return!1;t!==null?Object.keys(x).length>1&&(t=null,a=null):Object.keys(x).length<2&&(t=p,a=o)}return w in x?(this.size--,t?delete t[a]:delete x[w],!0):!1},R.prototype.has=function(d){for(var x=this.root,t,a=0,p=d.length;a"u")return!1;return w in x},R.prototype.find=function(d){var x=typeof d=="string",t=this.root,a=[],p,o,s;for(o=0,s=d.length;o"u")return a;for(var r=[t],e=[d],n;r.length;){d=e.pop(),t=r.pop();for(n in t){if(n===w){a.push([d,t[w]]);continue}r.push(t[n]),e.push(x?d+n:d.concat(n))}}return a},R.prototype.values=function(d){var x=this.root,t=[],a,p,o;if(d){for(p=0,o=d.length;p"u")return E.empty()}return t.push(x),new E(function(){for(var s,r=!1,e;t.length;){s=t.pop();for(e in s){if(e===w){r=!0;continue}t.push(s[e])}if(r)return{done:!1,value:s[w]}}return{done:!0}})},R.prototype.prefixes=function(d){var x=this.root,t=[],a=[],p,o,s,r=this.mode==="string";if(d){for(o=0,s=d.length;o"u")return E.empty()}else d=r?"":[];return t.push(x),a.push(d),new E(function(){for(var e,n,l=!1,i;t.length;){e=t.pop(),n=a.pop();for(i in e){if(i===w){l=!0;continue}t.push(e[i]),a.push(r?n+i:n.concat(i))}if(l)return{done:!1,value:n}}return{done:!0}})},R.prototype.keys=R.prototype.prefixes,R.prototype.entries=function(d){var x=this.root,t=[],a=[],p,o,s,r=this.mode==="string";if(d){for(o=0,s=d.length;o"u")return E.empty()}else d=r?"":[];return t.push(x),a.push(d),new E(function(){for(var e,n,l=!1,i;t.length;){e=t.pop(),n=a.pop();for(i in e){if(i===w){l=!0;continue}t.push(e[i]),a.push(r?n+i:n.concat(i))}if(l)return{done:!1,value:[n,e[w]]}}return{done:!0}})},typeof Symbol<"u"&&(R.prototype[Symbol.iterator]=R.prototype.entries),R.prototype.inspect=function(){for(var d=new Array(this.size),x=this.entries(),t,a=0;t=x.next(),!t.done;)d[a++]=t.value;return Object.defineProperty(d,"constructor",{value:R,enumerable:!1}),d},typeof Symbol<"u"&&(R.prototype[Symbol.for("nodejs.util.inspect.custom")]=R.prototype.inspect),R.prototype.toJSON=function(){return this.root},R.from=function(d){var x=new R;return y(d,function(t,a){x.set(a,t)}),x},R.SENTINEL=w,g.exports=R}),rR=Ft((f,g)=>{var y=ye(),E=Zx(),w=String.fromCharCode(0);function R(x){this.mode=x===Array?"array":"string",this.clear()}for(d in E.prototype)R.prototype[d]=E.prototype[d];var d;delete R.prototype.set,delete R.prototype.get,delete R.prototype.values,delete R.prototype.entries,R.prototype.add=function(x){for(var t=this.root,a,p=0,o=x.length;p"u")return p;for(var e=[a],n=[x],l;e.length;){x=n.pop(),a=e.pop();for(l in a){if(l===w){p.push(x);continue}e.push(a[l]),n.push(t?x+l:x.concat(l))}}return p},typeof Symbol<"u"&&(R.prototype[Symbol.iterator]=R.prototype.keys),R.prototype.inspect=function(){for(var x=new Set,t=this.keys(),a;a=t.next(),!a.done;)x.add(a.value);return Object.defineProperty(x,"constructor",{value:R,enumerable:!1}),x},typeof Symbol<"u"&&(R.prototype[Symbol.for("nodejs.util.inspect.custom")]=R.prototype.inspect),R.prototype.toJSON=function(){return this.root},R.from=function(x){var t=new R;return y(x,function(a){t.add(a)}),t},R.SENTINEL=w,g.exports=R}),sR=Ft((f,g)=>{var y=Ye(),E=ye(),w=Ri(),R=ci(),d=function(p){return Math.max(1,Math.ceil(p*1.5))},x=function(p){var o=R.getPointerArray(p);return new o(p)};function t(p,o){if(arguments.length<1)throw new Error("mnemonist/vector: expecting at least a byte array constructor.");var s=o||0,r=d,e=0,n=!1;typeof o=="object"&&(s=o.initialCapacity||0,e=o.initialLength||0,r=o.policy||r,n=o.factory===!0),this.factory=n?p:null,this.ArrayClass=p,this.length=e,this.capacity=Math.max(e,s),this.policy=r,this.array=new p(this.capacity)}t.prototype.set=function(p,o){if(this.lengththis.capacity)if(this.factory===null?this.array=new this.ArrayClass(p):this.array=this.factory(p),R.isTypedArray(this.array))this.array.set(o,0);else for(var s=0,r=this.length;s=p)return this;for(o=this.capacity;o=o)return{done:!0};var r=p[s];return s++,{value:r,done:!1}})},t.prototype.entries=function(){var p=this.array,o=this.length,s=0;return new y(function(){if(s>=o)return{done:!0};var r=p[s];return{value:[s++,r],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,o,s){if(arguments.length<3&&(s=w.guessLength(p),typeof s!="number"))throw new Error("mnemonist/vector.from: could not guess iterable length. Please provide desired capacity as last argument.");var r=new t(o,s);return E(p,function(e){r.push(e)}),r};function a(p){var o=function(r){t.call(this,p,r)};for(var s in t.prototype)t.prototype.hasOwnProperty(s)&&(o.prototype[s]=t.prototype[s]);return o.from=function(r,e){return t.from(r,p,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(x),g.exports=t}),aR=Ft((f,g)=>{var y=Ri(),E=ci(),w=Kx().inplaceQuickSortIndices,R=$x().lowerBoundIndices,d=wv(),x=E.getPointerArray;function t(o,s){return o.distances.distance?-1:0}function a(o,s,r){for(var e=r.length,n=x(e),l=0,i=new n(e),h=new n(e),u=new n(e),c=new Float64Array(e),v=[0,0,e],m=new Float64Array(e),T,C,S,P,A,L,F,I,D;v.length;)if(A=v.pop(),P=v.pop(),T=v.pop(),C=r[A-1],A--,D=A-P,i[T]=C,D!==0){if(D===1){F=o(s[C],s[r[P]]),c[T]=F,l++,u[T]=l,i[l]=r[P];continue}for(I=P;I0&&(l++,u[T]=l,v.push(l,L,A)),L-P>0&&(l++,h[T]=l,v.push(l,P,L))}return{nodes:i,lefts:h,rights:u,mus:c}}function p(o,s){if(typeof o!="function")throw new Error("mnemonist/VPTree.constructor: given `distance` must be a function.");if(!s)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 d(t),this.D=0;var r=y.toArrayWithIndices(s);this.items=r[0];var e=r[1];this.size=e.length;var n=a(o,this.items,e);this.nodes=n.nodes,this.lefts=n.lefts,this.rights=n.rights,this.mus=n.mus}p.prototype.nearestNeighbors=function(o,s){var r=this.heap,e=[0],n=1/0,l,i,h,u,c,v,m;for(this.D=0;e.length;)l=e.pop(),i=this.nodes[l],h=this.items[i],m=this.distance(h,s),this.D++,mo&&r.pop(),r.size>=o&&(n=r.peek().distance)),u=this.lefts[l],c=this.rights[l],!(!u&&!c)&&(v=this.mus[l],m=v-n&&e.push(c)):(c&&m>=v-n&&e.push(c),u&&m=0;C--)T[C]=r.pop();return T},p.prototype.neighbors=function(o,s){var r=[],e=[0],n,l,i,h,u,c,v;for(this.D=0;e.length;)n=e.pop(),l=this.nodes[n],i=this.items[l],v=this.distance(i,s),this.D++,v<=o&&r.push({distance:v,item:i}),h=this.lefts[n],u=this.rights[n],!(!h&&!u)&&(c=this.mus[n],v=c-o&&e.push(u)):(u&&v>=c-o&&e.push(u),h&&v{var y=wv(),E=Av(),w=R9();g.exports={BiMap:L9(),BitSet:F9(),BitVector:O9(),BloomFilter:I9(),BKTree:B9(),CircularBuffer:N9(),DefaultMap:G9(),DefaultWeakMap:z9(),FixedDeque:Xx(),StaticDisjointSet:U9(),FibonacciHeap:E,MinFibonacciHeap:E.MinFibonacciHeap,MaxFibonacciHeap:E.MaxFibonacciHeap,FixedReverseHeap:Mv(),FuzzyMap:b9(),FuzzyMultiMap:V9(),HashedArrayTree:W9(),Heap:y,MinHeap:y.MinHeap,MaxHeap:y.MaxHeap,StaticIntervalTree:X9(),InvertedIndex:H9(),KDTree:$9(),LinkedList:K9(),LRUCache:Rv(),LRUCacheWithDelete:j9(),LRUMap:jx(),LRUMapWithDelete:Z9(),MultiMap:Yx(),MultiSet:k9(),PassjoinIndex:Q9(),Queue:J9(),FixedStack:Hx(),Stack:q9(),SuffixArray:w,GeneralizedSuffixArray:w.GeneralizedSuffixArray,Set:_9(),SparseQueueSet:tR(),SparseMap:eR(),SparseSet:iR(),SymSpell:nR(),Trie:rR(),TrieMap:Zx(),Vector:sR(),VPTree:aR()}}),Pt=class we{static get ZERO(){return new we(0,0)}static get ONE(){return new we(1,1)}static get UP(){return new we(0,-1)}static get DOWN(){return new we(0,1)}static get LEFT(){return new we(-1,0)}static get RIGHT(){return new we(1,0)}static get UP_LEFT(){return new we(-1,-1)}static get UP_RIGHT(){return new we(1,-1)}static get DOWN_RIGHT(){return new we(1,1)}static get DOWN_LEFT(){return new we(-1,1)}constructor(g,y){typeof g=="number"?(this.x=g,this.y=y||0):(this.x=g.x,this.y=g.y)}clone(){return new we(this.x,this.y)}add(g){return new we(this.x+g.x,this.y+g.y)}multiply(g){return new we(this.x*g.x,this.y*g.y)}divide(g){return new we(this.x/g.x,this.y/g.y)}subtract(g){return new we(this.x-g.x,this.y-g.y)}equals(g){return this.x===g.x&&this.y===g.y}abs(){return new we(Math.abs(this.x),Math.abs(this.y))}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}modulo(g){return new we(this.x%g.x,this.y%g.y)}scalarModulo(g){return new we(this.x%g,this.y%g)}scalarMult(g){return new we(this.x*g,this.y*g)}toPosition(){return{x:this.x,y:this.y}}toString(){return`${this.x}#${this.y}`}},bt=class{static equal(f,g){return f.position.x===g.position.x&&f.position.y===g.position.y&&f.layer===g.layer}static copyOver(f,g){g.position.x=f.position.x,g.position.y=f.position.y,g.layer=f.layer}static clone(f){return{position:f.position.clone(),layer:f.layer}}static toString(f){return`${f.position.toString()}#${f.layer}`}static toInternal(f){return{position:new Pt(f.position.x,f.position.y),layer:f.charLayer}}static fromInternal(f){return{position:f.position.toPosition(),charLayer:f.layer}}},hR=(f=>(f.NONE="none",f.LEFT="left",f.UP_LEFT="up-left",f.UP="up",f.UP_RIGHT="up-right",f.RIGHT="right",f.DOWN_RIGHT="down-right",f.DOWN="down",f.DOWN_LEFT="down-left",f))(hR||{}),lR={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"},uR={up:Pt.UP,down:Pt.DOWN,left:Pt.LEFT,right:Pt.RIGHT,none:Pt.ZERO,"up-left":Pt.UP_LEFT,"up-right":Pt.UP_RIGHT,"down-right":Pt.DOWN_RIGHT,"down-left":Pt.DOWN_LEFT},wl={up:0,"up-right":1,right:2,"down-right":3,down:4,"down-left":5,left:6,"up-left":7,none:NaN},kx=["up","up-right","right","down-right","down","down-left","left","up-left"],fR=["down-left","down-right","up-right","up-left"];function Lv(){return["up","down","left","right","none","up-left","up-right","down-right","down-left"]}function ja(f){return fR.includes(f)}function Um(f){return["left","right"].includes(f)}function bm(f){return["up","down"].includes(f)}function dR(f,g=1){return f==="none"?"none":kx[(wl[f]+8-Math.abs(g)%8)%8]}function Fv(f,g=1){return f==="none"?"none":kx[(wl[f]+g)%8]}function qs(f){return uR[f]}function cR(f){return lR[f]}function Yi(f,g){if(f.x===g.x){if(f.y>g.y)return"up";if(f.yg.x)return"left";if(f.xg.x){if(f.yg.y)return"up-left"}else if(f.xg.y)return"up-right"}return"none"}var vR=(f=>(f[f.FOUR=4]="FOUR",f[f.EIGHT=8]="EIGHT",f))(vR||{});function Ds(f){return typeof f=="string"&&Lv().includes(f)}var uc=function(f,g){return uc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,E){y.__proto__=E}||function(y,E){for(var w in E)Object.prototype.hasOwnProperty.call(E,w)&&(y[w]=E[w])},uc(f,g)};function Eo(f,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");uc(f,g);function y(){this.constructor=f}f.prototype=g===null?Object.create(g):(y.prototype=g.prototype,new y)}function pR(f,g,y,E){function w(R){return R instanceof y?R:new y(function(d){d(R)})}return new(y||(y=Promise))(function(R,d){function x(p){try{a(E.next(p))}catch(o){d(o)}}function t(p){try{a(E.throw(p))}catch(o){d(o)}}function a(p){p.done?R(p.value):w(p.value).then(x,t)}a((E=E.apply(f,g||[])).next())})}function Qx(f,g){var y={label:0,sent:function(){if(R[0]&1)throw R[1];return R[1]},trys:[],ops:[]},E,w,R,d;return d={next:x(0),throw:x(1),return:x(2)},typeof Symbol=="function"&&(d[Symbol.iterator]=function(){return this}),d;function x(a){return function(p){return t([a,p])}}function t(a){if(E)throw new TypeError("Generator is already executing.");for(;d&&(d=0,a[0]&&(y=0)),y;)try{if(E=1,w&&(R=a[0]&2?w.return:a[0]?w.throw||((R=w.return)&&R.call(w),0):w.next)&&!(R=R.call(w,a[1])).done)return R;switch(w=0,R&&(a=[a[0]&2,R.value]),a[0]){case 0:case 1:R=a;break;case 4:return y.label++,{value:a[1],done:!1};case 5:y.label++,w=a[1],a=[0];continue;case 7:a=y.ops.pop(),y.trys.pop();continue;default:if(R=y.trys,!(R=R.length>0&&R[R.length-1])&&(a[0]===6||a[0]===2)){y=0;continue}if(a[0]===3&&(!R||a[1]>R[0]&&a[1]=f.length&&(f=void 0),{value:f&&f[E++],done:!f}}};throw new TypeError(g?"Object is not iterable.":"Symbol.iterator is not defined.")}function po(f,g){var y=typeof Symbol=="function"&&f[Symbol.iterator];if(!y)return f;var E=y.call(f),w,R=[],d;try{for(;(g===void 0||g-- >0)&&!(w=E.next()).done;)R.push(w.value)}catch(x){d={error:x}}finally{try{w&&!w.done&&(y=E.return)&&y.call(E)}finally{if(d)throw d.error}}return R}function go(f,g,y){if(y||arguments.length===2)for(var E=0,w=g.length,R;E1||x(s,r)})})}function x(s,r){try{t(E[s](r))}catch(e){o(R[0][3],e)}}function t(s){s.value instanceof Ws?Promise.resolve(s.value.v).then(a,p):o(R[0][2],s)}function a(s){x("next",s)}function p(s){x("throw",s)}function o(s,r){s(r),R.shift(),R.length&&x(R[0][0],R[0][1])}}function mR(f){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var g=f[Symbol.asyncIterator],y;return g?g.call(f):(f=typeof _s=="function"?_s(f):f[Symbol.iterator](),y={},E("next"),E("throw"),E("return"),y[Symbol.asyncIterator]=function(){return this},y);function E(R){y[R]=f[R]&&function(d){return new Promise(function(x,t){d=f[R](d),w(x,t,d.done,d.value)})}}function w(R,d,x,t){Promise.resolve(t).then(function(a){R({value:a,done:x})},d)}}function De(f){return typeof f=="function"}function Jx(f){var g=function(E){Error.call(E),E.stack=new Error().stack},y=f(g);return y.prototype=Object.create(Error.prototype),y.prototype.constructor=y,y}var nd=Jx(function(f){return function(g){f(this),this.message=g?g.length+` errors occurred during unsubscription: +`+g.map(function(y,E){return E+1+") "+y.toString()}).join(` + `):"",this.name="UnsubscriptionError",this.errors=g}});function fc(f,g){if(f){var y=f.indexOf(g);0<=y&&f.splice(y,1)}}var fu=function(){function f(g){this.initialTeardown=g,this.closed=!1,this._parentage=null,this._finalizers=null}return f.prototype.unsubscribe=function(){var g,y,E,w,R;if(!this.closed){this.closed=!0;var d=this._parentage;if(d)if(this._parentage=null,Array.isArray(d))try{for(var x=_s(d),t=x.next();!t.done;t=x.next()){var a=t.value;a.remove(this)}}catch(n){g={error:n}}finally{try{t&&!t.done&&(y=x.return)&&y.call(x)}finally{if(g)throw g.error}}else d.remove(this);var p=this.initialTeardown;if(De(p))try{p()}catch(n){R=n instanceof nd?n.errors:[n]}var o=this._finalizers;if(o){this._finalizers=null;try{for(var s=_s(o),r=s.next();!r.done;r=s.next()){var e=r.value;try{Vm(e)}catch(n){R=R??[],n instanceof nd?R=go(go([],po(R)),po(n.errors)):R.push(n)}}}catch(n){E={error:n}}finally{try{r&&!r.done&&(w=s.return)&&w.call(s)}finally{if(E)throw E.error}}}if(R)throw new nd(R)}},f.prototype.add=function(g){var y;if(g&&g!==this)if(this.closed)Vm(g);else{if(g instanceof f){if(g.closed||g._hasParent(this))return;g._addParent(this)}(this._finalizers=(y=this._finalizers)!==null&&y!==void 0?y:[]).push(g)}},f.prototype._hasParent=function(g){var y=this._parentage;return y===g||Array.isArray(y)&&y.includes(g)},f.prototype._addParent=function(g){var y=this._parentage;this._parentage=Array.isArray(y)?(y.push(g),y):y?[y,g]:g},f.prototype._removeParent=function(g){var y=this._parentage;y===g?this._parentage=null:Array.isArray(y)&&fc(y,g)},f.prototype.remove=function(g){var y=this._finalizers;y&&fc(y,g),g instanceof f&&g._removeParent(this)},f.EMPTY=function(){var g=new f;return g.closed=!0,g}(),f}(),qx=fu.EMPTY;function _x(f){return f instanceof fu||f&&"closed"in f&&De(f.remove)&&De(f.add)&&De(f.unsubscribe)}function Vm(f){De(f)?f():f.unsubscribe()}var tT={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},yR={setTimeout:function(f,g){for(var y=[],E=2;E0},enumerable:!1,configurable:!0}),g.prototype._trySubscribe=function(y){return this._throwIfClosed(),f.prototype._trySubscribe.call(this,y)},g.prototype._subscribe=function(y){return this._throwIfClosed(),this._checkFinalizedStatuses(y),this._innerSubscribe(y)},g.prototype._innerSubscribe=function(y){var E=this,w=this,R=w.hasError,d=w.isStopped,x=w.observers;return R||d?qx:(this.currentObservers=null,x.push(y),new fu(function(){E.currentObservers=null,fc(x,y)}))},g.prototype._checkFinalizedStatuses=function(y){var E=this,w=E.hasError,R=E.thrownError,d=E.isStopped;w?y.error(R):d&&y.complete()},g.prototype.asObservable=function(){var y=new ji;return y.source=this,y},g.create=function(y,E){return new Xm(y,E)},g}(ji),Xm=function(f){Eo(g,f);function g(y,E){var w=f.call(this)||this;return w.destination=y,w.source=E,w}return g.prototype.next=function(y){var E,w;(w=(E=this.destination)===null||E===void 0?void 0:E.next)===null||w===void 0||w.call(E,y)},g.prototype.error=function(y){var E,w;(w=(E=this.destination)===null||E===void 0?void 0:E.error)===null||w===void 0||w.call(E,y)},g.prototype.complete=function(){var y,E;(E=(y=this.destination)===null||y===void 0?void 0:y.complete)===null||E===void 0||E.call(y)},g.prototype._subscribe=function(y){var E,w;return(w=(E=this.source)===null||E===void 0?void 0:E.subscribe(y))!==null&&w!==void 0?w:qx},g}(pe),rT=new ji(function(f){return f.complete()});function LR(f){return f&&De(f.schedule)}function sT(f){return f[f.length-1]}function aT(f){return LR(sT(f))?f.pop():void 0}function oT(f,g){return typeof sT(f)=="number"?f.pop():g}var hT=function(f){return f&&typeof f.length=="number"&&typeof f!="function"};function lT(f){return De(f==null?void 0:f.then)}function uT(f){return De(f[Dv])}function fT(f){return Symbol.asyncIterator&&De(f==null?void 0:f[Symbol.asyncIterator])}function dT(f){return new TypeError("You provided "+(f!==null&&typeof f=="object"?"an invalid object":"'"+f+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function FR(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var cT=FR();function vT(f){return De(f==null?void 0:f[cT])}function pT(f){return gR(this,arguments,function(){var g,y,E,w;return Qx(this,function(R){switch(R.label){case 0:g=f.getReader(),R.label=1;case 1:R.trys.push([1,,9,10]),R.label=2;case 2:return[4,Ws(g.read())];case 3:return y=R.sent(),E=y.value,w=y.done,w?[4,Ws(void 0)]:[3,5];case 4:return[2,R.sent()];case 5:return[4,Ws(E)];case 6:return[4,R.sent()];case 7:return R.sent(),[3,2];case 8:return[3,10];case 9:return g.releaseLock(),[7];case 10:return[2]}})})}function gT(f){return De(f==null?void 0:f.getReader)}function is(f){if(f instanceof ji)return f;if(f!=null){if(uT(f))return OR(f);if(hT(f))return DR(f);if(lT(f))return IR(f);if(fT(f))return mT(f);if(vT(f))return BR(f);if(gT(f))return NR(f)}throw dT(f)}function OR(f){return new ji(function(g){var y=f[Dv]();if(De(y.subscribe))return y.subscribe(g);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function DR(f){return new ji(function(g){for(var y=0;y{let w=this.tilePosInDirection(new Pt(y,E),f);return this.tilemap.hasBlockingTile(w,g,cR(f),this.ignoreMissingTiles)})}isCharBlocking(f,g){return this.someCharTile((y,E)=>{let w=this.tilePosInDirection(new Pt(y,E),f);return this.tilemap.hasBlockingChar(w,g,this.getCollisionGroups(),new Set([this.getId()]),this.ignoreCollisionGroups)})}isMoving(){return this.movementDirection!="none"}turnTowards(f){this.isMoving()||f!="none"&&this.changeFacingDirection(f)}changeFacingDirection(f){this.facingDirection!==f&&(this.facingDirection=f,this.directionChanged$.next(f))}getFacingDirection(){return this.facingDirection}getFacingPosition(){return this._tilePos.position.add(qs(this.facingDirection))}addCollisionGroup(f){this.collisionGroups.add(f)}setCollisionGroups(f){this.collisionGroups=new Set(f)}setIgnoreCollisionGroups(f){this.ignoreCollisionGroups=new Set(f)}getCollisionGroups(){return Array.from(this.collisionGroups)}getIgnoreCollisionGroups(){return Array.from(this.ignoreCollisionGroups)}hasCollisionGroup(f){return this.collisionGroups.has(f)}removeCollisionGroup(f){this.collisionGroups.delete(f)}removeAllCollisionGroups(){this.collisionGroups.clear()}addLabels(f){for(let g of f)this.labels.add(g)}getLabels(){return[...this.labels.values()]}hasLabel(f){return this.labels.has(f)}clearLabels(){this.labels.clear()}removeLabels(f){for(let g of f)this.labels.delete(g)}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(f){let g=Math.max(0,Math.min(Ur,f));this.movementProgress=g}hasWalkedHalfATile(){return this.movementProgress>Ur/2}willCrossTileBorderThisUpdate(f){return this.movementProgress+this.maxProgressForDelta(f)>=Ur}updateCharacterPosition(f){let g=this.willCrossTileBorderThisUpdate(f),y=1-(g?Ur-this.movementProgress:this.maxProgressForDelta(f))/this.maxProgressForDelta(f);this.movementProgress=Math.min(this.movementProgress+this.maxProgressForDelta(f),Ur),g&&(this.movementProgress=0,this.shouldContinueMoving()?(this.fire(this.positionChangeFinished$,this.tilePos,this.getNextTilePos()),this.tilePos=this.getNextTilePos(),this.startMoving(this.lastMovementImpulse),y>0&&this.updateCharacterPosition(f*y)):this.stopMoving())}maxProgressForDelta(f){let g=f/1e3;return Math.floor(g*this.speed*Ur)}get tilePos(){return bt.clone(this._tilePos)}set tilePos(f){bt.copyOver(f,this._tilePos)}startMoving(f){f!=="none"&&(f!=this.movementDirection&&this.movementStarted$.next(f),this.movementDirection=f,this.facingDirection=f,this.fire(this.positionChangeStarted$,this.tilePos,this.getNextTilePos()))}tilePosInDirection(f,g){return f.add(qs(this.tilemap.toMapDirection(g)))}shouldContinueMoving(){return this.lastMovementImpulse!=="none"&&!this.isBlockingDirection(this.lastMovementImpulse)}stopMoving(){if(this.movementDirection==="none")return;let f=this.tilePos,g=this.getNextTilePos(),y=this.movementDirection;this.tilePos=this.getNextTilePos(),this.movementDirection="none",this.movementStopped$.next(y),this.fire(this.positionChangeFinished$,f,g)}fire(f,{position:g,layer:y},{position:E,layer:w}){f.next({exitTile:g,enterTile:E,exitLayer:y,enterLayer:w})}someCharTile(f){let g=this.getNextTilePos().position;for(let y=g.x;ythis.isLayerAlwaysOnTop(w));this.tilemap.layers.filter(w=>!this.isLayerAlwaysOnTop(w)).forEach(w=>{this.hasLayerProp(w,br.HEIGHT_SHIFT_PROP_NAME)?(this.createHeightShiftLayers(w,y),g.push(w.tilemapLayer)):this.setDepth(w,++y)}),this.charLayerDepths.set(void 0,y),E.forEach((w,R)=>{w.tilemapLayer.setDepth(R+1+y)}),g.forEach(w=>w.destroy())}setDepth(g,y){g.tilemapLayer.setDepth(y),this.isCharLayer(g)&&this.charLayerDepths.set(this.getLayerProp(g,br.CHAR_LAYER_PROP_NAME),y)}createHeightShiftLayers(g,y){let E=this.getLayerProp(g,br.HEIGHT_SHIFT_PROP_NAME);isNaN(E)&&(E=0);let w=1;for(let R=0;Rw.name==y);return E==null?void 0:E.value}hasLayerProp(g,y){return this.getLayerProp(g,y)!=null}copyLayer(g,y){let E=`${g.name}#${y}`,w=this.tilemap.createBlankLayer(E,g.tilemapLayer.tileset);if(w){if(w.name=E,this.isIsometric())for(let R=y;R>=0;R--){let d=y-R;w.putTileAt(g.data[R][d],d,R)}else for(let R=0;Rx===this.charData.id)).subscribe(({direction:x})=>{var t;(t=this.animation)==null||t.setStandingFrame(x)}),this.sprite&&(this.sprite.setOrigin(0,0),this.resetAnimation(this.sprite),this.updateOverlaySprite(),this.updateGridChar())}destroy(){this.destroy$.next(),this.destroy$.complete(),this.newSpriteSet$.complete()}setSprite(f){f?(this.sprite&&(f.x=this.sprite.x,f.y=this.sprite.y),this.sprite=f,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(f){var g;this.container=f,this.cachedContainerHeight=(g=f==null?void 0:f.getBounds().height)!=null?g:0}getContainer(){return this.container}getOffsetX(){return this.customOffset.x}setOffsetX(f){this.customOffset.x=f}getOffsetY(){return this.customOffset.y}setOffsetY(f){this.customOffset.y=f}getWalkingAnimationMapping(){return this.walkingAnimationMapping}turnTowards(f){var g;this.geHeadless.isMoving(this.charData.id)||f!="none"&&(this.geHeadless.turnTowards(this.charData.id,f),(g=this.animation)==null||g.setStandingFrame(f))}getAnimation(){return this.animation}setAnimation(f){this.animation=f}update(f){this.updateGridChar()}getEngineOffset(){var f,g,y,E;if(!this.sprite)return Pt.ZERO;let w=this.tilemap.getTileWidth()/2-Math.floor(((g=(f=this.sprite)==null?void 0:f.displayWidth)!=null?g:0)/2),R=-((E=(y=this.sprite)==null?void 0:y.displayHeight)!=null?E:0)+this.tilemap.getTileHeight();return new Pt(w,R)}updatePixelPos(){let f=new Pt(this.geHeadless.getPosition(this.charData.id)),g=this.geHeadless.getMovementProgress(this.charData.id)/1e3,y=this.tilemap.tilePosToPixelPos(f).add(this.getEngineOffset()).add(this.customOffset).add(qs(this.geHeadless.getFacingDirection(this.charData.id)).multiply(this.tilemap.getTileDistance(this.geHeadless.getFacingDirection(this.charData.id)).scalarMult(g))),E=this.getGameObj();E&&(E.x=Math.floor(y.x),E.y=Math.floor(y.y))}getGameObj(){return this.container||this.sprite}updateGridChar(){var f;if(this.updatePixelPos(),this.sprite&&this.geHeadless.isMoving(this.charData.id)){let g=this.geHeadless.getMovementProgress(this.charData.id)>Ur/2;(f=this.getAnimation())==null||f.updateCharacterFrame(this.geHeadless.getFacingDirection(this.charData.id),g,Number(this.sprite.frame.name))}this.updateDepth()}resetAnimation(f){let g=new Ym(this.walkingAnimationMapping,f.texture.source[0].width/f.width/Ym.FRAMES_CHAR_ROW);this.setAnimation(g),g.frameChange().pipe(Vi(this.newSpriteSet$)).subscribe(y=>{f==null||f.setFrame(y)}),g.setIsEnabled(this.walkingAnimationMapping!==void 0),g.setStandingFrame(this.geHeadless.getFacingDirection(this.charData.id))}updateOverlaySprite(){if(!this.layerOverlaySprite||!this.sprite)return;this.layerOverlaySprite.scale=this.sprite.scale;let f=this.tilemap.getTileHeight()/this.layerOverlaySprite.scale;this.layerOverlaySprite.setCrop(0,0,this.layerOverlaySprite.displayWidth,this.sprite.height-f),this.layerOverlaySprite.setOrigin(0,0)}updateDepth(){if(!this.getGameObj())return;let f=new Pt(this.geHeadless.getPosition(this.charData.id)),g=this.geHeadless.getCharLayer(this.charData.id);this.container?this.setContainerDepth(this.container,{position:f,layer:g}):this.sprite&&this.setSpriteDepth(this.sprite,{position:f,layer:g});let y=this.getLayerOverlaySprite();if(y){let E=new Pt(Sr(fe({},f),{y:f.y-1}));this.setSpriteDepth(y,{position:E,layer:g})}}setSpriteDepth(f,g){f.setDepth(this.tilemap.getDepthOfCharLayer(this.getTransitionLayer(g))+this.getPaddedPixelDepthSprite(f))}setContainerDepth(f,g){f.setDepth(this.tilemap.getDepthOfCharLayer(this.getTransitionLayer(g))+this.getPaddedPixelDepthContainer(f))}getPaddedPixelDepthContainer(f){return pc.shiftPad(f.y+this.cachedContainerHeight,mc.Z_INDEX_PADDING)}getPaddedPixelDepthSprite(f){return pc.shiftPad(f.y+f.displayHeight,mc.Z_INDEX_PADDING)}getTransitionLayer(f){if(f.layer)return this.geHeadless.getTransition(f.position,f.layer)||f.layer}},JR=(f=>(f.DONT_BLOCK="DONT_BLOCK",f.BLOCK_TWO_TILES="BLOCK_TWO_TILES",f.BLOCK_ONE_TILE_AHEAD="BLOCK_ONE_TILE_AHEAD",f.BLOCK_ONE_TILE_BEHIND="BLOCK_ONE_TILE_BEHIND",f))(JR||{}),PT=(f=>(f.STOP="STOP",f.CLOSEST_REACHABLE="CLOSEST_REACHABLE",f.RETRY="RETRY",f.ALTERNATIVE_TARGETS="ALTERNATIVE_TARGETS",f))(PT||{}),qR=class{distance(f,g){return un.manhattanDistance(f,g)}direction(f,g){if(un.equal(f,g))return"none";let y=f.clone().subtract(g);return Math.abs(y.x)>Math.abs(y.y)?y.x>0?"left":"right":y.y>0?"up":"down"}neighbors(f){return[new Pt(f.x,f.y+1),new Pt(f.x+1,f.y),new Pt(f.x-1,f.y),new Pt(f.x,f.y-1)]}getDirections(){return["up","right","down","left"]}},_R=class{distance(f,g){return un.chebyshevDistance(f,g)}neighbors(f){let g=[new Pt(f.x,f.y+1),new Pt(f.x+1,f.y),new Pt(f.x-1,f.y),new Pt(f.x,f.y-1)],y=[new Pt(f.x+1,f.y+1),new Pt(f.x+1,f.y-1),new Pt(f.x-1,f.y+1),new Pt(f.x-1,f.y-1)];return[...g,...y]}direction(f,g){return g.x>f.x?g.y>f.y?"down-right":g.yf.y?"down-left":g.yf.y?"down":"none"}getDirections(){return["up","right","down","left","down-left","down-right","up-right","up-left"]}},qr=class{static create(f){switch(f){case 4:return new qR;case 8:return new _R}}},Hm=class{constructor(f,g,y){this.backoffMs=f,this.maxRetries=g,this.onFinished=y,this.retries=0,this.elapsed=0}retry(f,g){this.shouldRetry()?(this.elapsed+=f,this.elapsed>=this.backoffMs&&(this.elapsed=0,this.retries++,g())):this.onFinished()}reset(){this.retries=0,this.elapsed=0}getMaxRetries(){return this.maxRetries}getBackoffMs(){return this.backoffMs}shouldRetry(){return this.maxRetries===-1||this.retries(f.WAIT="WAIT",f.RETRY="RETRY",f.STOP="STOP",f))(AT||{}),du=class{constructor(f,{shortestPathAlgorithm:g="BFS",pathWidth:y=1,pathHeight:E=1,numberOfDirections:w=4,isPositionAllowed:R=(n,l)=>!0,collisionGroups:d=[],ignoredChars:x=[],ignoreTiles:t=!1,ignoreMapBounds:a=!1,ignoreBlockedTarget:p=!1,maxPathLength:o=1/0,ignoreLayers:s=!1,considerCosts:r=!1,calculateClosestToTarget:e=!0}={}){this.gridTilemap=f,this.options={shortestPathAlgorithm:g,pathWidth:y,pathHeight:E,numberOfDirections:w,isPositionAllowed:R,collisionGroups:d,ignoredChars:x,ignoreTiles:t,ignoreMapBounds:a,ignoreBlockedTarget:p,maxPathLength:o,ignoreLayers:s,considerCosts:r,calculateClosestToTarget:e}}findShortestPath(f,g){this.options.ignoreLayers&&(this.gridTilemap.fixCacheLayer(f.layer),g.layer=f.layer);let y=this.findShortestPathImpl(f,g);return this.gridTilemap.unfixCacheLayers(),y}getNeighbors(f,g){var y;return qr.create((y=this.options.numberOfDirections)!=null?y:4).neighbors(f.position).map(E=>{let w=f.layer;return this.options.ignoreLayers||(w=this.gridTilemap.getTransition(E,f.layer)),{position:E,layer:w||f.layer}}).filter(E=>!this.isBlocking(f,E)||this.options.ignoreBlockedTarget&&bt.equal(E,g))}getTransition(f,g){if(!this.options.ignoreLayers)return this.gridTilemap.getTransition(f,g)}getCosts(f,g){if(!this.options.considerCosts)return 1;let y=Yi(g.position,f);return this.gridTilemap.getTileCosts(g,y)}isBlocking(f,g){return!(this.options.ignoreMapBounds||this.gridTilemap.isInRange(g.position))||!this.options.isPositionAllowed(g.position,g.layer)||!this.options.ignoreTiles&&this.hasBlockingTileFrom(f,g,this.options.pathWidth,this.options.pathHeight,this.options.ignoreMapBounds,this.gridTilemap)?!0:this.hasBlockingCharFrom(f,g,this.options.pathWidth,this.options.pathHeight,this.options.collisionGroups,this.options.ignoredChars,this.gridTilemap)}distance(f,g){return(this.options.numberOfDirections===4?un.manhattanDistance:un.chebyshevDistance)(f,g)}getTilePosInDir(f,g){return this.gridTilemap.getTilePosInDirection(f,g)}getReverseNeighbors(f,g){var y;let E=qr.create((y=this.options.numberOfDirections)!=null?y:4).neighbors(f.position),w;if(!this.options.ignoreLayers){let R=this.gridTilemap.getReverseTransitions(f.position,f.layer);w=R?[...R]:void 0}return E.map(R=>w?w.map(d=>({position:R,layer:d||f.layer})):[{position:R,layer:f.layer}]).flat().filter(R=>!this.isBlocking(R,f)||this.options.ignoreBlockedTarget&&bt.equal(f,g))}hasBlockingCharFrom(f,g,y,E,w,R,d){let x=a=>d.hasBlockingChar(a,g.layer,w,new Set(R));if(y===1&&E===1)return x(g.position);let t=Yi(f.position,g.position);return this.isBlockingMultiTile(f,t,y,E,x)}hasBlockingTileFrom(f,g,y,E,w,R){if(y===1&&E===1)return R.hasBlockingTile(g.position,g.layer,Yi(g.position,f.position),w);let d=Yi(f.position,g.position),x=t=>R.hasBlockingTile(t,g.layer,d,w);return this.isBlockingMultiTile(f,d,y,E,x)}isBlockingMultiTile(f,g,y,E,w){let R={src:new Pt(f.position.x+y,f.position.y),dest:new Pt(f.position.x+y,f.position.y+E-1)},d={src:new Pt(f.position.x-1,f.position.y),dest:new Pt(f.position.x-1,f.position.y+E-1)},x={src:new Pt(f.position.x,f.position.y-1),dest:new Pt(f.position.x+y-1,f.position.y-1)},t={src:new Pt(f.position.x,f.position.y+E),dest:new Pt(f.position.x+y-1,f.position.y+E)};switch(g){case"right":return this.checkLine(R,w);case"left":return this.checkLine(d,w);case"up":return this.checkLine(x,w);case"down":return this.checkLine(t,w);case"up-left":return this.checkLine({src:x.src,dest:new Pt(x.dest.x-1,x.dest.y)},w)||this.checkLine({src:new Pt(d.src.x,d.src.y-1),dest:new Pt(d.dest.x,d.dest.y-1)},w);case"up-right":return this.checkLine({src:new Pt(x.src.x+1,x.src.y),dest:x.dest},w)||this.checkLine({src:new Pt(R.src.x,R.src.y-1),dest:new Pt(R.dest.x,R.dest.y-1)},w);case"down-left":return this.checkLine({src:new Pt(d.src.x,d.src.y+1),dest:new Pt(d.dest.x,d.dest.y+1)},w)||this.checkLine({src:t.src,dest:new Pt(t.dest.x-1,t.dest.y)},w);case"down-right":return this.checkLine({src:new Pt(t.src.x+1,t.src.y),dest:t.dest},w)||this.checkLine({src:new Pt(R.src.x,R.src.y+1),dest:new Pt(R.dest.x,R.dest.y+1)},w)}return!1}checkLine(f,g){for(let y=f.src.x;y<=f.dest.x;y++)for(let E=f.src.y;E<=f.dest.y;E++)if(g(new Pt(y,E)))return!0;return!1}},tL=Vx(Av(),1),eL=class extends du{findShortestPathImpl(f,g){let y=this.shortestPathBfs(f,g);return{path:this.returnPath(y.previous,f,g),closestToTarget:y.closestToTarget,steps:y.steps,maxPathLengthReached:y.maxPathLengthReached,algorithmUsed:"A_STAR"}}shortestPathBfs(f,g){let y=new Map,E=new Map,w=new Map,R=new tL.MinFibonacciHeap((a,p)=>Fa(w,a)-Fa(w,p)),d=f,x=this.distance(f.position,g.position),t=0;for(R.push(f),E.set(bt.toString(f),0),w.set(bt.toString(f),this.distance(f.position,g.position));R.size>0;){let a=R.pop();if(!a)break;t++;let p=this.distance(a.position,g.position);if(pthis.options.maxPathLength)return{previous:new Map,closestToTarget:d,steps:t,maxPathLengthReached:!0};for(let o of this.getNeighbors(a,g)){let s=Fa(E,a)+this.getCosts(a.position,o),r=bt.toString(o);(!E.has(r)||s0;){let t=w.dequeue();if(x++,!t)break;let{node:a,dist:p}=t;if(p>this.options.maxPathLength)return{previous:new Map,closestToTarget:R,steps:x,maxPathLengthReached:!0};let o=this.distance(a.position,g.position);if(othis.lastDist)}step(f,g,y){var E;this.lastDist=y;for(let w of f){let R=bt.toString(w);if(!this.visited.has(R)){this.previous.set(R,g),this.queue.enqueue({node:w,dist:y+1}),this.visited.set(R,y+1);let d=(E=this.otherBfs)==null?void 0:E.visited.get(R);d!==void 0&&d0,w.queue.size()>0);){let t=E.queue.dequeue();if(!t)break;let{node:a,dist:p}=t;if(p+1+(((y=w.queue.peek())==null?void 0:y.dist)||0)>this.options.maxPathLength)return{previous:E.previous,previous2:w.previous,closestToTarget:this.maybeClosestToTarget(d),steps:R,maxPathLengthReached:!0};let o=this.distance(a.position,g.position);if(oOa(this.f,w)-Oa(this.f,R)),this.openSet.push(f);let E=bt.toString(f);for(this.g.set(E,0),this.f.set(E,this.distance(f.position,g.position)),this.maxFrontierSize=Math.max(this.maxFrontierSize,this.openSet.size);this.openSet.size>0;){let w=this.openSet.pop();if(!w)break;if(this.steps++,bt.equal(w,g))return{previous:y,closestToTarget:g,steps:this.steps,maxPathLengthReached:!1};if(Oa(this.g,w)+1>this.options.maxPathLength)return{previous:new Map,closestToTarget:this.closestToTarget,steps:this.steps,maxPathLengthReached:!0};this.updateClosestToTarget(w,g);for(let R of this.getNeighborsInternal(w,y.get(bt.toString(w)),g)){let d=bt.toString(R.p),x=Oa(this.g,w)+R.dist;(!this.g.has(d)||x({p:R,dist:1}));let E=this.prune(g,f).map(R=>{let d=this.getTransition(R.position,f.layer);return{position:R.position,layer:d||f.layer}}),w=[];for(let R of E){let d=this.jump(f,R,y,1);d&&w.push(d)}return w}jump(f,g,y,E){let w=this.distanceUtils.direction(f.position,g.position);if(!(this.isBlocking(f,g)&&!(bt.equal(g,y)&&this.options.ignoreBlockedTarget)))return bt.equal(g,y)?{p:g,dist:E}:E>=this.maxJumpSize?{p:g,dist:E}:this.getTransition(g.position,f.layer)!==void 0?{p:g,dist:E}:Um(w)?{p:g,dist:E}:this.hasForced(f,g)?{p:g,dist:E}:(this.updateClosestToTarget(g,y),this.jump(g,this.getTilePosInDir(g,Yi(f.position,g.position)),y,E+1))}getForced(f,g){let y=new Set,E=this.posInDir(g,this.distanceUtils.direction(g.position,f.position)),{topLeft:w,downLeft:R,top:d,bottom:x}=this.normalizedPositions(E,g),t=this.distanceUtils.direction(f.position,g.position);return bm(t)&&((this.blockOrTrans(E,R)||this.blockOrTrans(R,x))&&this.addIfNotBlocked(y,g,x),(this.blockOrTrans(E,w)||this.blockOrTrans(w,d))&&this.addIfNotBlocked(y,g,d)),y}hasForced(f,g){let y=this.posInDir(g,this.distanceUtils.direction(g.position,f.position)),{topLeft:E,downLeft:w,top:R,bottom:d}=this.normalizedPositions(y,g),x=this.distanceUtils.direction(f.position,g.position);return!!(bm(x)&&((this.blockOrTrans(y,w)||this.blockOrTrans(w,d))&&!this.blockOrTrans(g,d)||(this.blockOrTrans(y,E)||this.blockOrTrans(E,R))&&!this.blockOrTrans(g,R)))}prune(f,g){let{right:y,top:E,bottom:w}=this.normalizedPositions(f,g),R=this.getForced(f,g),d=Yi(f.position,g.position);return Um(d)?[y,E,w]:[y,...R]}normalizedPositions(f,g){var y,E,w,R,d,x,t;let a=Yi(f.position,g.position);return{topLeft:this.posInDir(g,((y=this.turnTimes.get("up-left"))==null?void 0:y.get(this.turnOrder[a]))||"up-left"),downLeft:this.posInDir(g,((E=this.turnTimes.get("down-left"))==null?void 0:E.get(this.turnOrder[a]))||"down-left"),downRight:this.posInDir(g,((w=this.turnTimes.get("down-right"))==null?void 0:w.get(this.turnOrder[a]))||"down-right"),topRight:this.posInDir(g,((R=this.turnTimes.get("up-right"))==null?void 0:R.get(this.turnOrder[a]))||"up-right"),top:this.posInDir(g,((d=this.turnTimes.get("up"))==null?void 0:d.get(this.turnOrder[a]))||"up"),bottom:this.posInDir(g,((x=this.turnTimes.get("down"))==null?void 0:x.get(this.turnOrder[a]))||"down"),right:this.posInDir(g,((t=this.turnTimes.get("right"))==null?void 0:t.get(this.turnOrder[a]))||"right")}}posInDir(f,g){return{position:f.position.add(qs(g)),layer:f.layer}}returnPath(f,g,y){let E=[],w=y;for(E.push(w);!bt.equal(w,g);){let R=f.get(bt.toString(w));if(!R)return[];this.distance(R.position,w.position)>1?this.fillPath(w,R,E):E.push(R),w=R}return E.reverse()}fillPath(f,g,y){let E=f;do{let w=Yi(E.position,g.position);E=this.getTilePosInDir(E,w),y.push(E)}while(!un.equal(E.position,g.position))}};function Oa(f,g){var y;return(y=f.get(bt.toString(g)))!=null?y:Number.MAX_VALUE}function nL(){let f=["right","down-right","down","down-left","left","up-left","up","up-right"],g=new Map;for(let y=0;y1||f.getTileHeight()>1&&this.options.shortestPathAlgorithm==="JPS")&&console.warn("GridEngine: Pathfinding algorithm 'JPS' can only be used for characters with 'tileWidth' and 'tileHeight' of 1"),this.character=f,this.updateTarget(this.charToFollow.getTilePos().position,this.charToFollow.getTilePos().layer),this.charToFollow.positionChangeStarted().pipe(Vi(this.character.autoMovementSet().pipe(Cr(R=>R!==this),ra(1)))).subscribe(({enterTile:R,enterLayer:d})=>{this.updateTarget(R,d)})}update(f){var g;(g=this.targetMovement)==null||g.update(f)}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}}}updateTarget(f,g){let y=this.options.facingDirection!=="none"&&this.options.distance===0;if(y){let E=wl[this.options.facingDirection]+wl[this.charToFollow.getFacingDirection()],w=Fv("up",E);f=this.gridTilemap.getTilePosInDirection({position:new Pt(f),layer:g},w).position}this.targetMovement=new DT(this.character,this.gridTilemap,{position:new Pt(f),layer:g},{distance:y?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},ignoreBlockedTarget:!0})}},km=class{static getRandomInt(f){return Math.floor(Math.random()*Math.floor(f))}},sL=class{constructor(f,g=0,y=-1){this.character=f,this.delay=g,this.radius=y,this.stepSize=0,this.delayLeft=this.delay,this.initialRow=f.getNextTilePos().position.y,this.initialCol=f.getNextTilePos().position.x,this.randomizeStepSize(),this.stepsWalked=0,this.currentMovementDirection="none",this.character.positionChangeStarted().pipe(Vi(this.character.autoMovementSet().pipe(Cr(E=>E!==this),ra(1)))).subscribe(()=>{this.stepsWalked++}),this.distanceUtils=qr.create(f.getNumberOfDirections())}update(f){if(this.shouldContinueWalkingCurrentDirection())this.character.move(this.currentMovementDirection);else if(this.delayLeft-=f,this.delayLeft<=0){this.delayLeft=this.delay;let g=this.getFreeRandomDirection();this.stepsWalked=0,this.character.move(g),this.currentMovementDirection=g,this.randomizeStepSize()}}getInfo(){return{type:"Random",config:{delay:this.delay,radius:this.radius}}}shouldContinueWalkingCurrentDirection(){return this.stepsWalked!this.character.isBlockingDirection(f)).filter(f=>this.isWithinRadius(f))}isWithinRadius(f){return this.radius==-1?!0:this.getDist(f)<=this.radius}getDist(f){return this.distanceUtils.distance(this.character.getNextTilePos().position.add(qs(f)),new Pt(this.initialCol,this.initialRow))}getFreeRandomDirection(){let f=this.getFreeDirections();return f.length==0?"none":f[km.getRandomInt(f.length)]}randomizeStepSize(){this.stepSize=km.getRandomInt(this.radius)+1}};function aL(f,g){return f.filter(y=>{var E,w,R,d,x,t;return(E=g.labels)!=null&&E.withAllLabels?(w=g.labels)==null?void 0:w.withAllLabels.every(a=>y.hasLabel(a)):(R=g.labels)!=null&&R.withOneOfLabels?(d=g.labels)==null?void 0:d.withOneOfLabels.some(a=>y.hasLabel(a)):(x=g.labels)!=null&&x.withNoneLabels?!((t=g.labels)!=null&&t.withNoneLabels.some(a=>y.hasLabel(a))):!0})}var RT="2.44.2",oL=class{constructor(f,g){this.collistionStrategy=f,this.collisionGroupRelation=g,this.tilePosToCharacters=new Map,this.charRemoved$=new pe}isCharBlockingAt(f,g,y,E=new Set,w=new Set){if(y.length===0)return!1;let R=this.posToString(f,g),d=this.tilePosToCharacters.get(R);return!!(d&&d.size>0&&[...d].filter(x=>!E.has(x.getId())).filter(x=>!this.doIntersect(x.getCollisionGroups(),w)).some(x=>y.some(t=>x.getCollisionGroups().some(a=>this.collidesWith(t,a)))))}doIntersect(f,g){for(let y of f)if(g.has(y))return!0;return!1}collidesWith(f,g){return this.collisionGroupRelation?(this.collisionGroupRelation.get(f)||new Set).has(g):f===g}getCharactersAt(f,g){let y=this.posToString(f,g),E=this.tilePosToCharacters.get(y);return new Set(E)}addCharacter(f){this.addTilePositions(f.getTilePos(),f),this.addTilePositions(f.getNextTilePos(),f),this.addPositionChangeSub(f),this.addPositionChangeFinishedSub(f),this.addTilePosSetSub(f)}removeCharacter(f){let g=f.getId();this.charRemoved$.next(g),this.deleteTilePositions(f.getTilePos(),f),this.deleteTilePositions(f.getNextTilePos(),f)}add(f,g){var y;this.tilePosToCharacters.has(f)||this.tilePosToCharacters.set(f,new Set),(y=this.tilePosToCharacters.get(f))==null||y.add(g)}addTilePosSetSub(f){f.tilePositionSet().pipe(Vi(this.charRemoved(f.getId()))).subscribe(g=>{this.deleteTilePositions(f.getNextTilePos(),f),this.addTilePositions(g,f)})}charRemoved(f){var g;return(g=this.charRemoved$)==null?void 0:g.pipe(ra(1),Cr(y=>y==f))}addPositionChangeSub(f){f.positionChangeStarted().pipe(Vi(this.charRemoved(f.getId())),this.posChangeToLayerPos()).subscribe(g=>{this.collistionStrategy==="BLOCK_ONE_TILE_AHEAD"&&this.deleteTilePositions(g.exit,f),this.addTilePositions(g.enter,f)})}addPositionChangeFinishedSub(f){f.positionChangeFinished().pipe(Vi(this.charRemoved(f.getId())),this.posChangeToLayerPos()).subscribe(g=>{this.deleteTilePositions(g.exit,f),this.addTilePositions(g.enter,f)})}addTilePositions(f,g){this.forEachCharTile(f,g,(y,E)=>{this.add(this.posToString(new Pt(y,E),f.layer),g)})}deleteTilePositions(f,g){this.forEachCharTile(f,g,(y,E)=>{var w;(w=this.tilePosToCharacters.get(this.posToString(new Pt(y,E),f.layer)))==null||w.delete(g)})}forEachCharTile(f,g,y){let E=f.position;for(let w=E.x;w({enter:{position:new Pt(f.enterTile),layer:f.enterLayer},exit:{position:new Pt(f.exitTile),layer:f.exitLayer}})))}posToString(f,g){return`${f.x}#${f.y}#${g}`}},Iv=class{constructor(f,g,y,E){this.x=f,this.y=g,this.width=y,this.height=E}getX(){return this.x}getY(){return this.y}getWidth(){return this.width}getHeight(){return this.height}isInRange(f){return f.x>=this.x&&f.x=this.y&&f.yy.isCharLayer());for(let y of[...g,void 0]){let E=this.tileCollisionCache.get(y==null?void 0:y.getName());if(E===void 0){E=new Array(this.tilemap.getWidth());for(let w=0;w>g&1)==1}var Jm="ge_cost",LT=class FT{constructor(g,y,E,w=void 0,R=!1){this.tilemap=g,this.collisionTilePropertyName=y,this.useTileCollisionCache=R,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 oL(E,w);for(let d of Lv())this.collidesPropNames.set(d,FT.ONE_WAY_COLLIDE_PROP_PREFIX+d),this.tileCostPropNames.set(d,`${Jm}_${d}`);this.useTileCollisionCache&&(this.tileCollisionCache=new lL(g,this),this.tileCollisionCache.rebuild())}fixCacheLayer(g){var y;(y=this.tileCollisionCache)==null||y.fixLayer(g)}unfixCacheLayers(){var g;(g=this.tileCollisionCache)==null||g.unfixLayers()}addCharacter(g){this.characters.set(g.getId(),g);let y=g.getNextTilePos().layer;y===void 0?g.setTilePosition(Sr(fe({},g.getNextTilePos()),{layer:this.getLowestCharLayer()})):this.getCharLayerNames().includes(y)||console.warn(`Char layer '${y}' of character '${g.getId()}' is unknown.`),this.charBlockCache.addCharacter(g)}removeCharacter(g){let y=this.characters.get(g);y&&(this.charBlockCache.removeCharacter(y),this.characters.delete(g))}getCharacters(){return[...this.characters.values()]}getCharactersAt(g,y){return this.charBlockCache.getCharactersAt(g,y)}rebuildTileCollisionCache(g){var y;(y=this.tileCollisionCache)==null||y.rebuild(g)}hasBlockingTileUncached(g,y,E,w){if(!w&&this.hasNoTileUncached(g,y))return!0;let R=this.getCollisionRelevantLayers(y);for(let d of R)if(this.isLayerBlockingAt(d.getName(),g,E))return!0;return!1}hasBlockingTile(g,y,E,w){var R;let d=(R=this.tileCollisionCache)==null?void 0:R.isBlockingFrom(g.x,g.y,y,E,w);return d!==void 0?d:this.hasBlockingTileUncached(g,y,E,w)}getTransition(g,y){let E=this.transitions.get(g.toString());if(E)return E.get(y)}getReverseTransitions(g,y){let E=this.reverseTransitions.get(g.toString());if(E)return E.get(y)}setTransition(g,y,E){var w,R,d,x,t;this.transitions.has(g.toString())||this.transitions.set(g.toString(),new Map),this.reverseTransitions.has(g.toString())||this.reverseTransitions.set(g.toString(),new Map),(w=this.transitions.get(g.toString()))==null||w.set(y,E),(R=this.reverseTransitions.get(g.toString()))!=null&&R.has(E)||(d=this.reverseTransitions.get(g.toString()))==null||d.set(E,new Set),(t=(x=this.reverseTransitions.get(g.toString()))==null?void 0:x.get(E))==null||t.add(y)}getTransitions(){return new Map([...this.transitions].map(([g,y])=>[g,new Map(y)]))}getTileCosts(g,y){let E=this.getCollisionRelevantLayers(g.layer),w=1;for(let R of E)w=Math.max(w,this.getTileCostsForLayer(Sr(fe({},g),{layer:R.getName()}),y));return w}getTileCostsForLayer(g,y){let E=this.tilemap.getTileAt(g.position.x,g.position.y,g.layer);return y&&(E==null?void 0:E.getProperty(this.tileCostPropNames.get(y)||""))||(E==null?void 0:E.getProperty(Jm))||1}hasNoTileUncached(g,y){return!this.getCollisionRelevantLayers(y).some(E=>this.tilemap.hasTileAt(g.x,g.y,E.getName()))}hasNoTile(g,y){var E;let w=(E=this.tileCollisionCache)==null?void 0:E.hasTileAt(g.x,g.y,y);return w!==void 0?w:this.hasNoTileUncached(g,y)}hasBlockingChar(g,y,E,w=new Set,R=new Set){return this.charBlockCache.isCharBlockingAt(g,y,E,w,R)}isInRange(g){return new Iv(0,0,this.tilemap.getWidth(),this.tilemap.getHeight()).isInRange(g)}toMapDirection(g){return this.isIsometric()?dR(g):g}fromMapDirection(g){return this.isIsometric()?Fv(g):g}isIsometric(){return this.tilemap.getOrientation()==="isometric"}getTilePosInDirection(g,y){let E=g.position.add(qs(this.toMapDirection(y))),w=this.getTransition(E,g.layer)||g.layer;return{position:E,layer:w}}invalidateFrameCache(){this.collisionRelevantLayersFrameCache.clear()}isLayerBlockingAt(g,y,E){let w=this.tilemap.getTileAt(y.x,y.y,g);return w?!!(w.getProperty(this.collisionTilePropertyName)||E&&w.getProperty(this.collidesPropNames.get(E)||"")):!1}getCharLayerIndexes(){return this.tilemap.getLayers().map((g,y)=>({layer:g,index:y})).filter(({layer:g})=>g.isCharLayer()).map(({index:g})=>g)}findPrevAndCharLayer(g){let y=this.getCharLayerIndexes(),E=this.tilemap.getLayers(),w=y.findIndex(R=>E[R].getProperty(_h)==g);return w==0?{prevIndex:-1,charLayerIndex:y[w]}:{prevIndex:y[w-1],charLayerIndex:y[w]}}getCollisionRelevantLayers(g){if(!g)return this.tilemap.getLayers();let y=this.collisionRelevantLayersFrameCache.get(g);if(y)return y;let{prevIndex:E,charLayerIndex:w}=this.findPrevAndCharLayer(g),R=this.tilemap.getLayers().slice(E+1,w+1);return this.collisionRelevantLayersFrameCache.set(g,R),R}getLowestCharLayer(){for(let g of this.tilemap.getLayers())if(g.isCharLayer())return g.getProperty(_h)}getCharLayerNames(){return this.tilemap.getLayers().filter(g=>g.isCharLayer()).map(g=>g.getProperty(_h)).filter(fL)}};LT.ONE_WAY_COLLIDE_PROP_PREFIX="ge_collide_";var uL=LT;function fL(f){return f!=null}var dL=(f=>(f.REMOVED="REMOVED",f.ADDED="ADDED",f))(dL||{}),cL=(f=>(f.WAIT="WAIT",f.SKIP="SKIP",f.STOP="STOP",f))(cL||{}),vL=class{constructor(f,g){this.character=f,this.tilemap=g,this.queue=new Ml,this.finished$=new pe,this.pathBlockedWaitElapsed=0,this.distanceUtils=qr.create(f.getNumberOfDirections()),this.character.autoMovementSet().pipe(Cr(y=>y!==this),ra(1)).subscribe(()=>{this.queue.size()>0&&this.finishMovementTerminated(),this.finished$.complete()})}update(f){(!this.character.isMoving()||this.character.willCrossTileBorderThisUpdate(f))&&this.queue.size()>0&&this.moveCharOnPath(f)}getInfo(){return{type:"Queue"}}enqueue(f,g={}){var y,E,w;let R={pathBlockedStrategy:(y=g.pathBlockedStrategy)!=null?y:"STOP",pathBlockedWaitTimeoutMs:(g==null?void 0:g.pathBlockedWaitTimeoutMs)||-1,ignoreInvalidPositions:(E=g.ignoreInvalidPositions)!=null?E:!1,skipInvalidPositions:(w=g.skipInvalidPositions)!=null?w:!1};for(let d of f){let x={command:d,config:R};if(Ds(d)){this.queue.enqueue(x);continue}let t=this.queue.peekEnd(),a=t==null?void 0:t.command;if(a||(a=this.character.getNextTilePos()),Ds(a)){this.queue.enqueue(x);continue}let p=this.distanceUtils.distance(a.position,d.position)===1;(!g.ignoreInvalidPositions||p)&&this.queue.enqueue(x)}}peekAll(){return this.queue.peekAll()}size(){return this.queue.size()}finished(){return this.finished$}clear(){this.queue.clear()}moveCharOnPath(f){let g=this.queue.peek();if(!g)return;let y=g.command,E=g.config;if(Ds(y)&&(y=this.tilemap.getTilePosInDirection(this.character.getNextTilePos(),y)),E.skipInvalidPositions){if(y=this.getNextValidPosition(),!y){this.finishInvalidNextPos(y);return}}else if(!this.isNeighborPos(y)){this.finishInvalidNextPos(y);return}if(this.character.isBlockingDirection(Yi(this.character.getNextTilePos().position,y.position))){if(E.pathBlockedStrategy==="STOP")this.finishPathBlocked(y);else if(E.pathBlockedStrategy==="SKIP"){this.queue.dequeue(),this.moveCharOnPath(f);return}else E.pathBlockedStrategy==="WAIT"&&E.pathBlockedWaitTimeoutMs>-1&&(this.pathBlockedWaitElapsed+=f,this.pathBlockedWaitElapsed>=E.pathBlockedWaitTimeoutMs&&this.finishBlockedWaitTimeout(y,E.pathBlockedWaitTimeoutMs));return}this.pathBlockedWaitElapsed=0,this.queue.dequeue(),this.character.move(this.getDir(this.character.getNextTilePos().position,y.position)),this.isLastMovement()&&this.finish("SUCCESS","",y)}getNextValidPosition(){for(var f;this.queue.size()>0;){let g=(f=this.queue.peek())==null?void 0:f.command;if(Ds(g)&&(g=this.tilemap.getTilePosInDirection(this.character.getNextTilePos(),g)),g&&this.isNeighborPos(g))return g;this.queue.dequeue()}}isLastMovement(){return this.queue.size()===0}isNeighborPos(f){let g=this.distanceUtils.distance(this.character.getNextTilePos().position,f.position)===1,y=this.tilemap.getTransition(f.position,this.character.getNextTilePos().layer);if(this.character.getNextTilePos().layer!==f.layer)return g&&y===f.layer;let E=y!==void 0&&y!==f.layer;return g&&!E}finishMovementTerminated(){this.finish("MOVEMENT_TERMINATED","New automatic movement has been set to character.")}finishInvalidNextPos(f){f?this.finish("INVALID_NEXT_POS",`Position ${this.posToStr(f)} 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(f){this.finish("PATH_BLOCKED",`Position ${this.posToStr(f)} is blocked.`)}finishBlockedWaitTimeout(f,g){this.finish("PATH_BLOCKED_WAIT_TIMEOUT",`Position ${this.posToStr(f)} is blocked and the wait timeout of ${g} ms has been exceeded.`)}finish(f,g="",y=this.character.getNextTilePos()){this.queue=new Ml,this.finished$.next({position:y.position,result:f,description:g,layer:y.layer})}getDir(f,g){return this.tilemap.fromMapDirection(Yi(f,g))}posToStr(f){return`(${f.position.x}, ${f.position.y}, ${f.layer})`}},pL=class{constructor(f=!0){this.isCreatedInternal=!1,f&&console.log(`Using GridEngine v${RT}`)}getCharLayer(f){var g;this.initGuard();let y=(g=this.gridCharacters)==null?void 0:g.get(f);if(!y)throw this.createCharUnknownErr(f);return y.getTilePos().layer}getTransition(f,g){var y;return this.initGuard(),(y=this.gridTilemap)==null?void 0:y.getTransition(new Pt(f),g)}setTransition(f,g,y){var E;return this.initGuard(),(E=this.gridTilemap)==null?void 0:E.setTransition(new Pt(f),g,y)}create(f,g){this.isCreatedInternal=!0,this.gridCharacters=new Map;let y=this.setConfigDefaults(g);this.config=y,this.movementStopped$=new pe,this.movementStarted$=new pe,this.directionChanged$=new pe,this.positionChangeStarted$=new pe,this.positionChangeFinished$=new pe,this.queueMovementFinished$=new pe,this.charRemoved$=new pe,this.charAdded$=new pe,this.gridTilemap=new uL(f,this.config.collisionTilePropertyName,this.config.characterCollisionStrategy,this.recordToMap(this.config.collisionGroupRelation),this.config.cacheTileCollisions),this.addCharacters()}recordToMap(f){return f?new Map(Object.entries(f).map(([g,y])=>[g,new Set(y)])):void 0}getPosition(f){var g;this.initGuard();let y=(g=this.gridCharacters)==null?void 0:g.get(f);if(!y)throw this.createCharUnknownErr(f);return y.getTilePos().position}move(f,g){this.moveChar(f,g)}moveRandomly(f,g=0,y=-1){var E;this.initGuard();let w=(E=this.gridCharacters)==null?void 0:E.get(f);if(!w)throw this.createCharUnknownErr(f);let R=new sL(w,g,y);w.setMovement(R)}getMovement(f){var g;this.initGuard();let y=(g=this.gridCharacters)==null?void 0:g.get(f);if(!y)throw this.createCharUnknownErr(f);let E=y.getMovement();return E?E.getInfo():{type:"None"}}moveTo(f,g,y){var E;let w=this.assembleMoveToConfig(y);this.initGuard();let R=(E=this.gridCharacters)==null?void 0:E.get(f);if(!R)throw this.createCharUnknownErr(f);if(!this.gridTilemap)throw this.createUninitializedErr();let d=new DT(R,this.gridTilemap,{position:new Pt(g),layer:(y==null?void 0:y.targetLayer)||R.getNextTilePos().layer},{distance:0,config:w});return R.setMovement(d),d.finishedObs().pipe(Za(x=>({charId:f,position:x.position,result:x.result,description:x.description,layer:x.layer})))}stopMovement(f){var g;this.initGuard();let y=(g=this.gridCharacters)==null?void 0:g.get(f);if(!y)throw this.createCharUnknownErr(f);y.setMovement(void 0)}setSpeed(f,g){var y;this.initGuard();let E=(y=this.gridCharacters)==null?void 0:y.get(f);if(!E)throw this.createCharUnknownErr(f);E.setSpeed(g)}getSpeed(f){var g;this.initGuard();let y=(g=this.gridCharacters)==null?void 0:g.get(f);if(!y)throw this.createCharUnknownErr(f);return y.getSpeed()}collidesWithTiles(f){var g;this.initGuard();let y=(g=this.gridCharacters)==null?void 0:g.get(f);if(!y)throw this.createCharUnknownErr(f);return y.collidesWithTiles()}update(f,g){var y;if(this.isCreatedInternal&&this.gridCharacters)for(let[E,w]of this.gridCharacters)w.update(g);(y=this.gridTilemap)==null||y.invalidateFrameCache()}addCharacter(f){var g,y,E,w,R;if(!this.gridTilemap)throw this.createUninitializedErr();if(!this.config)throw this.createUninitializedErr();let d={speed:f.speed||4,tilemap:this.gridTilemap,collidesWithTiles:!0,collisionGroups:["geDefault"],ignoreCollisionGroups:[],charLayer:f.charLayer,facingDirection:f.facingDirection,labels:f.labels,numberOfDirections:(g=f.numberOfDirections)!=null?g:this.config.numberOfDirections,tileWidth:f.tileWidth,tileHeight:f.tileHeight};typeof f.collides=="boolean"?f.collides===!1&&(d.collidesWithTiles=!1,d.collisionGroups=[]):f.collides!==void 0&&(f.collides.collidesWithTiles===!1&&(d.collidesWithTiles=!1),f.collides.collisionGroups&&(d.collisionGroups=f.collides.collisionGroups),f.collides.ignoreCollisionGroups&&(d.ignoreCollisionGroups=f.collides.ignoreCollisionGroups),d.ignoreMissingTiles=(E=(y=f.collides)==null?void 0:y.ignoreMissingTiles)!=null?E:!1);let x=new kR(f.id,d);f.startPosition&&x.setTilePosition({position:new Pt(f.startPosition),layer:x.getTilePos().layer}),(w=this.gridCharacters)==null||w.set(f.id,x),this.gridTilemap.addCharacter(x);let t=x.getId();x.movementStopped().pipe(Vi(this.charRemoved(t))).subscribe(a=>{var p;(p=this.movementStopped$)==null||p.next({charId:t,direction:a})}),x.movementStarted().pipe(Vi(this.charRemoved(t))).subscribe(a=>{var p;(p=this.movementStarted$)==null||p.next({charId:t,direction:a})}),x.directionChanged().pipe(Vi(this.charRemoved(t))).subscribe(a=>{var p;(p=this.directionChanged$)==null||p.next({charId:t,direction:a})}),x.positionChangeStarted().pipe(Vi(this.charRemoved(t))).subscribe(a=>{var p;(p=this.positionChangeStarted$)==null||p.next(fe({charId:t},a))}),x.positionChangeFinished().pipe(Vi(this.charRemoved(t))).subscribe(a=>{var p;(p=this.positionChangeFinished$)==null||p.next(fe({charId:t},a))}),(R=this.charAdded$)==null||R.next(t)}hasCharacter(f){var g;return this.initGuard(),!!((g=this.gridCharacters)!=null&&g.has(f))}removeCharacter(f){var g,y,E,w;if(this.initGuard(),!((g=this.gridCharacters)!=null&&g.get(f)))throw this.createCharUnknownErr(f);(y=this.gridTilemap)==null||y.removeCharacter(f),(E=this.gridCharacters)==null||E.delete(f),(w=this.charRemoved$)==null||w.next(f)}removeAllCharacters(){if(this.initGuard(),!!this.gridCharacters)for(let f of this.gridCharacters.keys())this.removeCharacter(f)}getAllCharacters(f){if(this.initGuard(),!this.gridCharacters)return[];let g=[...this.gridCharacters.values()];return(f?aL(g,f):g).map(y=>y.getId())}getLabels(f){var g;this.initGuard();let y=(g=this.gridCharacters)==null?void 0:g.get(f);if(!y)throw this.createCharUnknownErr(f);return y.getLabels()}addLabels(f,g){var y;this.initGuard();let E=(y=this.gridCharacters)==null?void 0:y.get(f);if(!E)throw this.createCharUnknownErr(f);E.addLabels(g)}removeLabels(f,g){var y;this.initGuard();let E=(y=this.gridCharacters)==null?void 0:y.get(f);if(!E)throw this.createCharUnknownErr(f);E.removeLabels(g)}clearLabels(f){var g;this.initGuard();let y=(g=this.gridCharacters)==null?void 0:g.get(f);if(!y)throw this.createCharUnknownErr(f);y.clearLabels()}follow(f,g,y,E){var w,R,d,x,t,a;let p;y===void 0?p={distance:0,closestPointIfBlocked:!1}:typeof y=="number"?(p={distance:y,closestPointIfBlocked:!1},E&&(p.closestPointIfBlocked=!0)):p=y,this.initGuard();let o=(w=this.gridCharacters)==null?void 0:w.get(f),s=(R=this.gridCharacters)==null?void 0:R.get(g);if(!o)throw this.createCharUnknownErr(f);if(!s)throw this.createCharUnknownErr(g);if(!this.gridTilemap)throw this.createUninitializedErr();let r=new rL(o,this.gridTilemap,s,{distance:(d=p.distance)!=null?d:0,noPathFoundStrategy:p.closestPointIfBlocked?"CLOSEST_REACHABLE":"STOP",maxPathLength:(x=p.maxPathLength)!=null?x:1/0,shortestPathAlgorithm:(t=p.algorithm)!=null?t:"BIDIRECTIONAL_SEARCH",ignoreLayers:!!p.ignoreLayers,facingDirection:(a=p.facingDirection)!=null?a:"none"});o.setMovement(r)}isMoving(f){var g;this.initGuard();let y=(g=this.gridCharacters)==null?void 0:g.get(f);if(!y)throw this.createCharUnknownErr(f);return y.isMoving()}getFacingDirection(f){var g;this.initGuard();let y=(g=this.gridCharacters)==null?void 0:g.get(f);if(!y)throw this.createCharUnknownErr(f);return y.getFacingDirection()}getFacingPosition(f){var g;this.initGuard();let y=(g=this.gridCharacters)==null?void 0:g.get(f);if(!y)throw this.createCharUnknownErr(f);let E=y.getFacingPosition();return{x:E.x,y:E.y}}turnTowards(f,g){var y;this.initGuard();let E=(y=this.gridCharacters)==null?void 0:y.get(f);if(!E)throw this.createCharUnknownErr(f);return E.turnTowards(g)}getCharactersAt(f,g){if(this.initGuard(),!this.gridTilemap)return[];let y=this.gridTilemap.getCharactersAt(new Pt(f),g);return Array.from(y).map(E=>E.getId())}setPosition(f,g,y){var E;this.initGuard();let w=(E=this.gridCharacters)==null?void 0:E.get(f);if(!w)throw this.createCharUnknownErr(f);y||w.setTilePosition({position:new Pt(g),layer:w.getTilePos().layer}),w.setTilePosition({position:new Pt(g),layer:y})}isBlocked(f,g,y=["geDefault"]){var E,w;this.initGuard();let R=new Pt(f);return!!((E=this.gridTilemap)!=null&&E.hasBlockingTile(R,g)||(w=this.gridTilemap)!=null&&w.hasBlockingChar(R,g,y))}isTileBlocked(f,g){var y;return this.initGuard(),!!((y=this.gridTilemap)!=null&&y.hasBlockingTile(new Pt(f),g))}getCollisionGroups(f){var g;this.initGuard();let y=(g=this.gridCharacters)==null?void 0:g.get(f);if(!y)throw this.createCharUnknownErr(f);return y.getCollisionGroups()||[]}setCollisionGroups(f,g){var y;this.initGuard();let E=(y=this.gridCharacters)==null?void 0:y.get(f);if(!E)throw this.createCharUnknownErr(f);E.setCollisionGroups(g)}getIgnoreCollisionGroups(f){var g;this.initGuard();let y=(g=this.gridCharacters)==null?void 0:g.get(f);if(!y)throw this.createCharUnknownErr(f);return y.getIgnoreCollisionGroups()||[]}setIgnoreCollisionGroups(f,g){var y;this.initGuard();let E=(y=this.gridCharacters)==null?void 0:y.get(f);if(!E)throw this.createCharUnknownErr(f);E.setIgnoreCollisionGroups(g)}getTilePosInDirection(f,g,y){if(!this.gridTilemap)throw this.createUninitializedErr();let E=this.gridTilemap.getTilePosInDirection({position:new Pt(f),layer:g},y);return{position:E.position.toPosition(),charLayer:E.layer}}findShortestPath(f,g,y={}){if(!this.gridTilemap)throw this.createUninitializedErr();let E=y.shortestPathAlgorithm||"BFS";y.considerCosts&&E!=="A_STAR"&&console.warn(`GridEngine: Pathfinding option 'considerCosts' cannot be used with algorithm '${E}'. It can only be used with A* algorithm.`);let w=y.pathWidth!==void 0&&y.pathWidth!==1,R=y.pathHeight!==void 0&&y.pathHeight!==1;(w||R)&&E==="JPS"&&console.warn("GridEngine: Pathfinding options 'pathWidth' and 'pathHeight' > 1 cannot be used with algorithm 'JPS'.");let d=new OT(this.gridTilemap).findShortestPath(bt.toInternal(f),bt.toInternal(g),Sr(fe({},y),{shortestPathAlgorithm:E}));return{path:d.path.map(bt.fromInternal),closestToTarget:d.closestToTarget?bt.fromInternal(d.closestToTarget):void 0,reachedMaxPathLength:!1,steps:d.steps}}steppedOn(f,g,y){return this.positionChangeFinished().pipe(Cr(E=>f.includes(E.charId)&&g.some(w=>w.x===E.enterTile.x&&w.y===E.enterTile.y)&&(y===void 0||y.includes(E.enterLayer))))}characterShifted(){if(!this.charAdded$||!this.charRemoved$)throw this.createUninitializedErr();return this.charAdded$.pipe(Za(f=>({charId:f,action:"ADDED"})),ZR(this.charRemoved$.pipe(Za(f=>({charId:f,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(f){var g;this.initGuard();let y=(g=this.gridCharacters)==null?void 0:g.get(f);if(!y)throw this.createCharUnknownErr(f);return y.getMovementProgress()}rebuildTileCollisionCache(f,g,y,E){var w;(w=this.gridTilemap)==null||w.rebuildTileCollisionCache(new Iv(f,g,y,E))}addQueueMovements(f,g,y){var E,w;this.initGuard();let R=(E=this.gridCharacters)==null?void 0:E.get(f);if(!R)throw this.createCharUnknownErr(f);if(!this.gridTilemap)throw this.createUninitializedErr();let d;((w=R==null?void 0:R.getMovement())==null?void 0:w.getInfo().type)==="Queue"?d=R.getMovement():(d=new vL(R,this.gridTilemap),R.setMovement(d),d.finished().pipe(Vi(HR(this.charRemoved(f),R.autoMovementSet()))).subscribe(x=>{var t;(t=this.queueMovementFinished$)==null||t.next(fe({charId:f},x))})),d.enqueue(g.map(x=>Ds(x)?x:{position:new Pt(x.position),layer:x.charLayer}),y)}queueMovementFinished(){if(!this.queueMovementFinished$)throw this.createUninitializedErr();return this.queueMovementFinished$}getEnqueuedMovements(f){var g,y;this.initGuard();let E=(g=this.gridCharacters)==null?void 0:g.get(f);if(!E)throw this.createCharUnknownErr(f);return((y=E.getMovement())==null?void 0:y.getInfo().type)==="Queue"?E.getMovement().peekAll().map(w=>({command:Ds(w.command)?w.command:bt.fromInternal(w.command),config:w.config})):[]}clearEnqueuedMovements(f){var g,y;this.initGuard();let E=(g=this.gridCharacters)==null?void 0:g.get(f);if(!E)throw this.createCharUnknownErr(f);((y=E.getMovement())==null?void 0:y.getInfo().type)==="Queue"&&E.getMovement().clear()}getTileCost(f,g,y){var E,w;return this.initGuard(),(w=(E=this.gridTilemap)==null?void 0:E.getTileCosts({position:new Pt(f),layer:g},y))!=null?w:1}getState(){let f=[];if(this.gridCharacters)for(let[g,y]of this.gridCharacters.entries())f.push({id:g,position:bt.fromInternal(y.getTilePos()),facingDirection:y.getFacingDirection(),speed:y.getSpeed(),labels:y.getLabels(),movementProgress:y.getMovementProgress(),collisionConfig:{collisionGroups:y.getCollisionGroups(),ignoreCollisionGroups:y.getIgnoreCollisionGroups(),collidesWithTiles:y.collidesWithTiles(),ignoreMissingTiles:y.getIgnoreMissingTiles()}});return{characters:f}}setState(f){if(this.gridCharacters)for(let g of f.characters){let y=this.gridCharacters.get(g.id);if(y){let E=y.getTilePos();bt.equal(E,bt.toInternal(g.position))||y.setTilePosition(bt.toInternal(g.position)),y.setSpeed(g.speed),y.turnTowards(g.facingDirection),g.collisionConfig.collisionGroups&&y.setCollisionGroups(g.collisionConfig.collisionGroups),g.collisionConfig.collidesWithTiles!==void 0&&y.setCollidesWithTiles(g.collisionConfig.collidesWithTiles),g.collisionConfig.ignoreMissingTiles!==void 0&&y.setIgnoreMissingTiles(g.collisionConfig.ignoreMissingTiles),y.setMovementProgress(g.movementProgress),y.clearLabels(),y.addLabels(g.labels)}}}charRemoved(f){var g;if(!this.charRemoved$)throw this.createUninitializedErr();return(g=this.charRemoved$)==null?void 0:g.pipe(ra(1),Cr(y=>y==f))}initGuard(){if(!this.isCreatedInternal)throw this.createUninitializedErr()}createUninitializedErr(){throw new Error("GridEngine not initialized. You need to call create() first.")}addCharacters(){var f;(f=this.config)==null||f.characters.forEach(g=>this.addCharacter(g))}moveChar(f,g){var y,E,w;this.initGuard();let R=(y=this.gridCharacters)==null?void 0:y.get(f);if(!R)throw this.createCharUnknownErr(f);if(R.getNumberOfDirections()===4){if(!((E=this.gridTilemap)!=null&&E.isIsometric())&&ja(g)){console.warn(`GridEngine: Character '${f}' can't be moved '${g}' in 4 direction mode.`);return}else if((w=this.gridTilemap)!=null&&w.isIsometric()&&!ja(g)){console.warn(`GridEngine: Character '${f}' can't be moved '${g}' in 4 direction isometric mode.`);return}}R.move(g)}createCharUnknownErr(f){return new Error(`Character unknown: ${f}`)}assembleMoveToConfig(f={}){let g=Sr(fe({},f),{noPathFoundStrategy:"STOP",pathBlockedStrategy:"WAIT"});return f!=null&&f.noPathFoundStrategy&&(Object.values(PT).includes(f.noPathFoundStrategy)?g.noPathFoundStrategy=f.noPathFoundStrategy:console.warn(`GridEngine: Unknown NoPathFoundStrategy '${f.noPathFoundStrategy}'. Falling back to 'STOP'`)),f!=null&&f.pathBlockedStrategy&&(Object.values(AT).includes(f.pathBlockedStrategy)?g.pathBlockedStrategy=f.pathBlockedStrategy:console.warn(`GridEngine: Unknown PathBlockedStrategy '${f.pathBlockedStrategy}'. Falling back to 'WAIT'`)),g}setConfigDefaults(f){return fe({collisionTilePropertyName:"ge_collide",numberOfDirections:4,characterCollisionStrategy:"BLOCK_TWO_TILES",cacheTileCollisions:!1},f)}},gL=class extends MT{constructor(f,g={}){super(f,g),this.distanceUtils=qr.create(8)}getForced(f,g){let y=new Set,E=this.posInDir(g,this.distanceUtils.direction(g.position,f.position)),{topLeft:w,downLeft:R,top:d,bottom:x,topRight:t,downRight:a}=this.normalizedPositions(E,g),p=this.distanceUtils.direction(f.position,g.position);return ja(p)?(this.blockOrTrans(E,w)&&(this.addIfNotBlocked(y,g,d),this.addIfNotBlocked(y,g,t),this.blockOrTrans(R,w)&&this.addIfNotBlocked(y,g,w)),this.blockOrTrans(E,R)&&(this.addIfNotBlocked(y,g,x),this.addIfNotBlocked(y,g,a),this.blockOrTrans(w,R)&&this.addIfNotBlocked(y,g,R)),this.blockOrTrans(w,d)&&this.addIfNotBlocked(y,g,d),this.blockOrTrans(R,x)&&this.addIfNotBlocked(y,g,x),this.blockOrTrans(w,t)&&this.addIfNotBlocked(y,g,t),this.blockOrTrans(R,a)&&this.addIfNotBlocked(y,g,a)):((this.blockOrTrans(E,d)||this.blockOrTrans(d,t))&&this.addIfNotBlocked(y,g,t),(this.blockOrTrans(E,x)||this.blockOrTrans(x,a))&&this.addIfNotBlocked(y,g,a),this.blockOrTrans(E,w)&&this.blockOrTrans(E,d)&&(this.addIfNotBlocked(y,g,d),this.addIfNotBlocked(y,g,w)),this.blockOrTrans(E,R)&&this.blockOrTrans(E,x)&&(this.addIfNotBlocked(y,g,x),this.addIfNotBlocked(y,g,R)),this.blockOrTrans(w,d)&&this.blockOrTrans(E,d)&&this.addIfNotBlocked(y,g,d),this.blockOrTrans(R,x)&&this.blockOrTrans(E,x)&&this.addIfNotBlocked(y,g,x)),y}hasForced(f,g){let y=this.posInDir(g,this.distanceUtils.direction(g.position,f.position)),{topLeft:E,downLeft:w,top:R,bottom:d,topRight:x,downRight:t}=this.normalizedPositions(y,g),a=this.distanceUtils.direction(f.position,g.position);if(ja(a)){if(this.blockOrTrans(y,E)&&(!this.blockOrTrans(g,R)||!this.blockOrTrans(g,x)||this.blockOrTrans(w,E)&&!this.blockOrTrans(g,E))||this.blockOrTrans(y,w)&&(!this.blockOrTrans(g,d)||!this.blockOrTrans(g,t)||this.blockOrTrans(E,w)&&!this.blockOrTrans(g,w))||this.blockOrTrans(E,R)&&!this.blockOrTrans(g,R)||this.blockOrTrans(w,d)&&!this.blockOrTrans(g,d)||this.blockOrTrans(E,x)&&!this.blockOrTrans(g,x)||this.blockOrTrans(w,t)&&!this.blockOrTrans(g,t))return!0}else if((this.blockOrTrans(y,R)||this.blockOrTrans(R,x))&&!this.blockOrTrans(g,x)||(this.blockOrTrans(y,d)||this.blockOrTrans(d,t))&&!this.blockOrTrans(g,t)||this.blockOrTrans(y,E)&&this.blockOrTrans(y,R)&&(!this.blockOrTrans(g,R)||!this.blockOrTrans(g,E))||this.blockOrTrans(y,w)&&this.blockOrTrans(y,d)&&(!this.blockOrTrans(g,d)||!this.blockOrTrans(g,w))||this.blockOrTrans(E,R)&&this.blockOrTrans(y,R)&&!this.blockOrTrans(g,R)||this.blockOrTrans(w,d)&&this.blockOrTrans(y,d)&&!this.blockOrTrans(g,d))return!0;return!1}prune(f,g){let{top:y,right:E,topRight:w,downRight:R,bottom:d}=this.normalizedPositions(f,g),x=this.getForced(f,g),t=Yi(f.position,g.position);return ja(t)?[y,E,w,R,d,...x]:[E,...x]}jump(f,g,y,E){let w=this.distanceUtils.direction(f.position,g.position),R=this.getTilePosInDir(g,this.distanceUtils.direction(g.position,f.position));if(!(this.isBlocking(R,g)&&!(bt.equal(g,y)&&this.options.ignoreBlockedTarget))){if(bt.equal(g,y))return{p:g,dist:E};if(E>=this.maxJumpSize)return{p:g,dist:E};if(this.getTransition(g.position,f.layer)!==void 0)return{p:g,dist:E};if(this.hasForced(f,g))return{p:g,dist:E};if(this.updateClosestToTarget(g,y),w==="up-left"){if(this.jump(g,this.getTilePosInDir(g,"up"),y,E+1)!==void 0)return{p:g,dist:E};if(this.jump(g,this.getTilePosInDir(g,"left"),y,E+1)!==void 0)return{p:g,dist:E}}else if(w==="down-left"){if(this.jump(g,this.getTilePosInDir(g,"down"),y,E+1)!==void 0)return{p:g,dist:E};if(this.jump(g,this.getTilePosInDir(g,"left"),y,E+1)!==void 0)return{p:g,dist:E}}else if(w==="up-right"){if(this.jump(g,this.getTilePosInDir(g,"up"),y,E+1)!==void 0)return{p:g,dist:E};if(this.jump(g,this.getTilePosInDir(g,"right"),y,E+1)!==void 0)return{p:g,dist:E}}else if(w==="down-right"){if(this.jump(g,this.getTilePosInDir(g,"down"),y,E+1)!==void 0)return{p:g,dist:E};if(this.jump(g,this.getTilePosInDir(g,"right"),y,E+1)!==void 0)return{p:g,dist:E}}return this.jump(g,this.getTilePosInDir(g,Yi(f.position,g.position)),y,E+1)}}},OT=class{constructor(f){this.gridTilemap=f}findShortestPath(f,g,y={}){return mL(y.shortestPathAlgorithm||"BIDIRECTIONAL_SEARCH",this.gridTilemap,y).findShortestPath(f,g)}};function mL(f,g,y){switch(f){case"BIDIRECTIONAL_SEARCH":return new iL(g,y);case"A_STAR":return new eL(g,y);case"JPS":return y.numberOfDirections===8?new gL(g,y):new MT(g,y)}return new wT(g,y)}var yL=(f=>(f.SUCCESS="SUCCESS",f.NO_PATH_FOUND_MAX_RETRIES_EXCEEDED="NO_PATH_FOUND_MAX_RETRIES_EXCEEDED",f.PATH_BLOCKED_MAX_RETRIES_EXCEEDED="PATH_BLOCKED_MAX_RETRIES_EXCEEDED",f.PATH_BLOCKED="PATH_BLOCKED",f.NO_PATH_FOUND="NO_PATH_FOUND",f.PATH_BLOCKED_WAIT_TIMEOUT="PATH_BLOCKED_WAIT_TIMEOUT",f.MOVEMENT_TERMINATED="MOVEMENT_TERMINATED",f.MAX_PATH_LENGTH_REACHED="MAX_PATH_LENGTH_REACHED",f))(yL||{}),DT=class{constructor(f,g,y,{config:E,ignoreBlockedTarget:w=!1,distance:R=0}={}){this.character=f,this.tilemap=g,this.targetPos=y,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.isBlocking=(x,t)=>x?new wT(this.tilemap,this.getPathfindingOptions()).isBlocking(this.character.getTilePos(),{position:x,layer:t}):!0;var d;this.shortestPathAlgorithm=(d=E==null?void 0:E.algorithm)!=null?d:this.shortestPathAlgorithm,this.ignoreBlockedTarget=w,this.distance=R,this.noPathFoundStrategy=(E==null?void 0:E.noPathFoundStrategy)||"STOP",this.pathBlockedStrategy=(E==null?void 0:E.pathBlockedStrategy)||"WAIT",this.noPathFoundRetryable=new Hm((E==null?void 0:E.noPathFoundRetryBackoffMs)||200,(E==null?void 0:E.noPathFoundMaxRetries)||-1,()=>{this.stop("NO_PATH_FOUND_MAX_RETRIES_EXCEEDED")}),this.pathBlockedRetryable=new Hm((E==null?void 0:E.pathBlockedRetryBackoffMs)||200,(E==null?void 0:E.pathBlockedMaxRetries)||-1,()=>{this.stop("PATH_BLOCKED_MAX_RETRIES_EXCEEDED")}),E!=null&&E.isPositionAllowedFn&&(this.isPositionAllowed=E.isPositionAllowedFn),E!=null&&E.maxPathLength&&(this.maxPathLength=E.maxPathLength),this.alternativeTargets=E==null?void 0:E.alternativeTargets,this.noPathFoundAlternativeTargetsFallbackStrategy=E==null?void 0:E.noPathFoundAlternativeTargetsFallbackStrategy,E!=null&&E.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.character.getTileWidth()>1||this.character.getTileHeight()>1&&this.shortestPathAlgorithm==="JPS")&&console.warn("GridEngine: Pathfinding algorithm 'JPS' can only be used for characters with 'tileWidth' and 'tileHeight' of 1"),this.considerCosts=(E==null?void 0:E.considerCosts)||!1,this.ignoreLayers=!!(E!=null&&E.ignoreLayers),this.distanceUtils=qr.create(f.getNumberOfDirections()),this.pathBlockedWaitTimeoutMs=(E==null?void 0:E.pathBlockedWaitTimeoutMs)||-1,this.finished$=new pe,this.setCharacter(f)}setPathBlockedStrategy(f){this.pathBlockedStrategy=f}getPathBlockedStrategy(){return this.pathBlockedStrategy}setCharacter(f){this.character=f,this.noPathFoundRetryable.reset(),this.pathBlockedRetryable.reset(),this.pathBlockedWaitElapsed=0,this.calcShortestPath(),this.character.autoMovementSet().pipe(Cr(g=>g!==this),ra(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()],ignoreTiles:!this.character.collidesWithTiles(),ignoreMapBounds:this.character.getIgnoreMissingTiles(),ignoreBlockedTarget:this.ignoreBlockedTarget,maxPathLength:this.maxPathLength,ignoreLayers:this.ignoreLayers,considerCosts:this.considerCosts,calculateClosestToTarget:!0}}update(f){var g,y,E,w;this.stopped||(this.noPathFound()&&(this.noPathFoundStrategy==="RETRY"?this.noPathFoundRetryable.retry(f,()=>this.calcShortestPath()):this.noPathFoundStrategy==="STOP"&&this.stop("NO_PATH_FOUND")),this.updatePosOnPath(),this.isBlocking((g=this.nextTileOnPath())==null?void 0:g.position,(y=this.character)==null?void 0:y.getNextTilePos().layer)?this.applyPathBlockedStrategy(f):this.pathBlockedWaitElapsed=0,this.hasArrived()?(this.stop("SUCCESS"),this.existsDistToTarget()&&this.turnTowardsTarget()):this.isBlocking((E=this.nextTileOnPath())==null?void 0:E.position,(w=this.character)==null?void 0:w.getNextTilePos().layer)||this.moveCharOnPath())}finishedObs(){return this.finished$}getInfo(){return{type:"Target",state:{pathAhead:this.shortestPath.slice(this.posOnPath).map(f=>bt.fromInternal(f))},config:{algorithm:this.shortestPathAlgorithm,ignoreBlockedTarget:this.ignoreBlockedTarget,distance:this.distance,targetPos:bt.fromInternal(this.targetPos),noPathFoundStrategy:this.noPathFoundStrategy,pathBlockedStrategy:this.pathBlockedStrategy,noPathFoundRetryBackoffMs:this.noPathFoundRetryable.getBackoffMs(),noPathFoundMaxRetries:this.noPathFoundRetryable.getMaxRetries()}}}resultToReason(f){switch(f){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(f){this.pathBlockedStrategy==="RETRY"?this.pathBlockedRetryable.retry(f,()=>{let g=this.getShortestPath();g.path.length>0&&this.calcShortestPath(g)}):this.pathBlockedStrategy==="STOP"?this.stop("PATH_BLOCKED"):this.pathBlockedStrategy==="WAIT"&&this.pathBlockedWaitTimeoutMs>-1&&(this.pathBlockedWaitElapsed+=f,this.pathBlockedWaitElapsed>=this.pathBlockedWaitTimeoutMs&&this.stop("PATH_BLOCKED_WAIT_TIMEOUT"))}moveCharOnPath(){let f=this.nextTileOnPath();if(!f)return;let g=this.getDir(this.character.getNextTilePos().position,f.position);this.character.move(g)}nextTileOnPath(){return this.shortestPath[this.posOnPath+1]}stop(f){this.finished$.next({position:this.character.getTilePos().position,result:f,description:this.resultToReason(f),layer:this.character.getTilePos().layer}),this.finished$.complete(),this.stopped=!0}turnTowardsTarget(){let f=this.shortestPath[this.posOnPath+1],g=this.getDir(this.character.getNextTilePos().position,f.position);this.character.turnTowards(g)}existsDistToTarget(){return this.posOnPath=this.shortestPath.length-1}updatePosOnPath(){let f=this.shortestPath[this.posOnPath];for(;this.posOnPath0)return{path:R,distOffset:d}}return this.noPathFoundStrategy=this.noPathFoundAlternativeTargetsFallbackStrategy||"STOP",this.getShortestPath()}}return{path:y,distOffset:0}}pathToAlternativeTarget(f,g){let y=g.findShortestPath(this.character.getNextTilePos(),f,this.getPathfindingOptions()).path,E=this.distanceUtils.distance(f.position,this.targetPos.position);return{path:y,distOffset:E}}getDir(f,g){return this.tilemap.fromMapDirection(this.distanceUtils.direction(f,g))}},xL=Object.create,IT=Object.defineProperty,TL=Object.getOwnPropertyDescriptor,SL=Object.getOwnPropertyNames,CL=Object.getPrototypeOf,EL=Object.prototype.hasOwnProperty,PL=(f,g)=>()=>(g||f((g={exports:{}}).exports,g),g.exports),AL=(f,g,y,E)=>{if(g&&typeof g=="object"||typeof g=="function")for(let w of SL(g))!EL.call(f,w)&&w!==y&&IT(f,w,{get:()=>g[w],enumerable:!(E=TL(g,w))||E.enumerable});return f},Bv=(f,g,y)=>(y=f!=null?xL(CL(f)):{},AL(g||!f||!f.__esModule?IT(y,"default",{value:f,enumerable:!0}):y,f)),Nv=PL((f,g)=>{(function(){var y,E="4.17.21",w=200,R="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",d="Expected a function",x="Invalid `variable` option passed into `_.template`",t="__lodash_hash_undefined__",a=500,p="__lodash_placeholder__",o=1,s=2,r=4,e=1,n=2,l=1,i=2,h=4,u=8,c=16,v=32,m=64,T=128,C=256,S=512,P=30,A="...",L=800,F=16,I=1,D=2,B=3,G=1/0,z=9007199254740991,W=17976931348623157e292,Y=0/0,K=4294967295,Z=K-1,V=K>>>1,H=[["ary",T],["bind",l],["bindKey",i],["curry",u],["curryRight",c],["flip",S],["partial",v],["partialRight",m],["rearg",C]],N="[object Arguments]",U="[object Array]",X="[object AsyncFunction]",$="[object Boolean]",k="[object Date]",Q="[object DOMException]",J="[object Error]",et="[object Function]",nt="[object GeneratorFunction]",st="[object Map]",ot="[object Number]",ut="[object Null]",at="[object Object]",ct="[object Promise]",Et="[object Proxy]",St="[object RegExp]",Ct="[object Set]",dt="[object String]",Tt="[object Symbol]",vt="[object Undefined]",wt="[object WeakMap]",Bt="[object WeakSet]",jt="[object ArrayBuffer]",Ut="[object DataView]",Yt="[object Float32Array]",Nt="[object Float64Array]",ae="[object Int8Array]",Qt="[object Int16Array]",xe="[object Int32Array]",Ce="[object Uint8Array]",Ue="[object Uint8ClampedArray]",ki="[object Uint16Array]",Qi="[object Uint32Array]",Sn=/\b__p \+= '';/g,Cn=/\b(__p \+=) '' \+/g,En=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Gv=/&(?:amp|lt|gt|quot|#39);/g,zv=/[&<>"']/g,UT=RegExp(Gv.source),bT=RegExp(zv.source),VT=/<%-([\s\S]+?)%>/g,WT=/<%([\s\S]+?)%>/g,Uv=/<%=([\s\S]+?)%>/g,XT=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,YT=/^\w*$/,HT=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,cu=/[\\^$.*+?()[\]{}|]/g,$T=RegExp(cu.source),vu=/^\s+/,KT=/\s/,jT=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ZT=/\{\n\/\* \[wrapped with (.+)\] \*/,kT=/,? & /,QT=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,JT=/[()=,{}\[\]\/\s]/,qT=/\\(\\)?/g,_T=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,bv=/\w*$/,tS=/^[-+]0x[0-9a-f]+$/i,eS=/^0b[01]+$/i,iS=/^\[object .+?Constructor\]$/,nS=/^0o[0-7]+$/i,rS=/^(?:0|[1-9]\d*)$/,sS=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Po=/($^)/,aS=/['\n\r\u2028\u2029\\]/g,Ao="\\ud800-\\udfff",oS="\\u0300-\\u036f",hS="\\ufe20-\\ufe2f",lS="\\u20d0-\\u20ff",Vv=oS+hS+lS,Wv="\\u2700-\\u27bf",Xv="a-z\\xdf-\\xf6\\xf8-\\xff",uS="\\xac\\xb1\\xd7\\xf7",fS="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",dS="\\u2000-\\u206f",cS=" \\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",Yv="A-Z\\xc0-\\xd6\\xd8-\\xde",Hv="\\ufe0e\\ufe0f",$v=uS+fS+dS+cS,pu="['’]",vS="["+Ao+"]",Kv="["+$v+"]",wo="["+Vv+"]",jv="\\d+",pS="["+Wv+"]",Zv="["+Xv+"]",kv="[^"+Ao+$v+jv+Wv+Xv+Yv+"]",gu="\\ud83c[\\udffb-\\udfff]",gS="(?:"+wo+"|"+gu+")",Qv="[^"+Ao+"]",mu="(?:\\ud83c[\\udde6-\\uddff]){2}",yu="[\\ud800-\\udbff][\\udc00-\\udfff]",ns="["+Yv+"]",Jv="\\u200d",qv="(?:"+Zv+"|"+kv+")",mS="(?:"+ns+"|"+kv+")",_v="(?:"+pu+"(?:d|ll|m|re|s|t|ve))?",tp="(?:"+pu+"(?:D|LL|M|RE|S|T|VE))?",ep=gS+"?",ip="["+Hv+"]?",yS="(?:"+Jv+"(?:"+[Qv,mu,yu].join("|")+")"+ip+ep+")*",xS="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",TS="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",np=ip+ep+yS,SS="(?:"+[pS,mu,yu].join("|")+")"+np,CS="(?:"+[Qv+wo+"?",wo,mu,yu,vS].join("|")+")",ES=RegExp(pu,"g"),PS=RegExp(wo,"g"),xu=RegExp(gu+"(?="+gu+")|"+CS+np,"g"),AS=RegExp([ns+"?"+Zv+"+"+_v+"(?="+[Kv,ns,"$"].join("|")+")",mS+"+"+tp+"(?="+[Kv,ns+qv,"$"].join("|")+")",ns+"?"+qv+"+"+_v,ns+"+"+tp,TS,xS,jv,SS].join("|"),"g"),wS=RegExp("["+Jv+Ao+Vv+Hv+"]"),MS=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,RS=["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"],LS=-1,oe={};oe[Yt]=oe[Nt]=oe[ae]=oe[Qt]=oe[xe]=oe[Ce]=oe[Ue]=oe[ki]=oe[Qi]=!0,oe[N]=oe[U]=oe[jt]=oe[$]=oe[Ut]=oe[k]=oe[J]=oe[et]=oe[st]=oe[ot]=oe[at]=oe[St]=oe[Ct]=oe[dt]=oe[wt]=!1;var re={};re[N]=re[U]=re[jt]=re[Ut]=re[$]=re[k]=re[Yt]=re[Nt]=re[ae]=re[Qt]=re[xe]=re[st]=re[ot]=re[at]=re[St]=re[Ct]=re[dt]=re[Tt]=re[Ce]=re[Ue]=re[ki]=re[Qi]=!0,re[J]=re[et]=re[wt]=!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={"&":"&","<":"<",">":">",'"':""","'":"'"},DS={"&":"&","<":"<",">":">",""":'"',"'":"'"},IS={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},BS=parseFloat,NS=parseInt,rp=typeof global=="object"&&global&&global.Object===Object&&global,GS=typeof self=="object"&&self&&self.Object===Object&&self,Ie=rp||GS||Function("return this")(),Tu=typeof f=="object"&&f&&!f.nodeType&&f,Mr=Tu&&typeof g=="object"&&g&&!g.nodeType&&g,sp=Mr&&Mr.exports===Tu,Su=sp&&rp.process,Li=function(){try{var ht=Mr&&Mr.require&&Mr.require("util").types;return ht||Su&&Su.binding&&Su.binding("util")}catch{}}(),ap=Li&&Li.isArrayBuffer,op=Li&&Li.isDate,hp=Li&&Li.isMap,lp=Li&&Li.isRegExp,up=Li&&Li.isSet,fp=Li&&Li.isTypedArray;function vi(ht,pt,ft){switch(ft.length){case 0:return ht.call(pt);case 1:return ht.call(pt,ft[0]);case 2:return ht.call(pt,ft[0],ft[1]);case 3:return ht.call(pt,ft[0],ft[1],ft[2])}return ht.apply(pt,ft)}function zS(ht,pt,ft,Mt){for(var Gt=-1,Jt=ht==null?0:ht.length;++Gt-1}function Cu(ht,pt,ft){for(var Mt=-1,Gt=ht==null?0:ht.length;++Mt-1;);return ft}function xp(ht,pt){for(var ft=ht.length;ft--&&rs(pt,ht[ft],0)>-1;);return ft}function KS(ht,pt){for(var ft=ht.length,Mt=0;ft--;)ht[ft]===pt&&++Mt;return Mt}var jS=wu(FS),ZS=wu(OS);function kS(ht){return"\\"+IS[ht]}function QS(ht,pt){return ht==null?y:ht[pt]}function ss(ht){return wS.test(ht)}function JS(ht){return MS.test(ht)}function qS(ht){for(var pt,ft=[];!(pt=ht.next()).done;)ft.push(pt.value);return ft}function Fu(ht){var pt=-1,ft=Array(ht.size);return ht.forEach(function(Mt,Gt){ft[++pt]=[Gt,Mt]}),ft}function Tp(ht,pt){return function(ft){return ht(pt(ft))}}function jn(ht,pt){for(var ft=-1,Mt=ht.length,Gt=0,Jt=[];++ft-1}function b2(M,O){var b=this.__data__,j=Ho(b,M);return j<0?(++this.size,b.push([M,O])):b[j][1]=O,this}Pn.prototype.clear=N2,Pn.prototype.delete=G2,Pn.prototype.get=z2,Pn.prototype.has=U2,Pn.prototype.set=b2;function An(M){var O=-1,b=M==null?0:M.length;for(this.clear();++O=O?M:O)),M}function Ii(M,O,b,j,q,tt){var it,rt=O&o,lt=O&s,gt=O&r;if(b&&(it=q?b(M,j,q,tt):b(M)),it!==y)return it;if(!ce(M))return M;var mt=zt(M);if(mt){if(it=YC(M),!rt)return ri(M,it)}else{var yt=$e(M),At=yt==et||yt==nt;if(tr(M))return i0(M,rt);if(yt==at||yt==N||At&&!q){if(it=lt||At?{}:S0(M),!rt)return lt?DC(M,eC(it,M)):OC(M,Dp(it,M))}else{if(!re[yt])return q?M:{};it=HC(M,yt,rt)}}tt||(tt=new qi);var Lt=tt.get(M);if(Lt)return Lt;tt.set(M,it),Q0(M)?M.forEach(function(It){it.add(Ii(It,O,b,It,M,tt))}):Z0(M)&&M.forEach(function(It,Ht){it.set(Ht,Ii(It,O,b,Ht,M,tt))});var Dt=gt?lt?nf:ef:lt?ai:Be,Wt=mt?y:Dt(M);return Fi(Wt||M,function(It,Ht){Wt&&(Ht=It,It=M[Ht]),fa(it,Ht,Ii(It,O,b,Ht,M,tt))}),it}function iC(M){var O=Be(M);return function(b){return Ip(b,M,O)}}function Ip(M,O,b){var j=b.length;if(M==null)return!j;for(M=ne(M);j--;){var q=b[j],tt=O[q],it=M[q];if(it===y&&!(q in M)||!tt(it))return!1}return!0}function Bp(M,O,b){if(typeof M!="function")throw new Oi(d);return ya(function(){M.apply(y,b)},O)}function da(M,O,b,j){var q=-1,tt=Mo,it=!0,rt=M.length,lt=[],gt=O.length;if(!rt)return lt;b&&(O=ue(O,pi(b))),j?(tt=Cu,it=!1):O.length>=w&&(tt=sa,it=!1,O=new Fr(O));t:for(;++qq?0:q+b),j=j===y||j>q?q:Vt(j),j<0&&(j+=q),j=b>j?0:q0(j);b0&&b(rt)?O>1?be(rt,O-1,b,j,q):Kn(q,rt):j||(q[q.length]=rt)}return q}var zu=h0(),zp=h0(!0);function fn(M,O){return M&&zu(M,O,Be)}function Uu(M,O){return M&&zp(M,O,Be)}function Ko(M,O){return $n(O,function(b){return Fn(M[b])})}function Dr(M,O){O=qn(O,M);for(var b=0,j=O.length;M!=null&&bO}function sC(M,O){return M!=null&&_t.call(M,O)}function aC(M,O){return M!=null&&O in ne(M)}function oC(M,O,b){return M>=He(O,b)&&M=120&&mt.length>=120)?new Fr(it&&mt):y}mt=M[0];var yt=-1,At=rt[0];t:for(;++yt-1;)rt!==M&&zo.call(rt,lt,1),zo.call(M,lt,1);return M}function Zp(M,O){for(var b=M?O.length:0,j=b-1;b--;){var q=O[b];if(b==j||q!==tt){var tt=q;Ln(q)?zo.call(M,q,1):Zu(M,q)}}return M}function $u(M,O){return M+Vo(Rp()*(O-M+1))}function TC(M,O,b,j){for(var q=-1,tt=Le(bo((O-M)/(b||1)),0),it=ft(tt);tt--;)it[j?tt:++q]=M,M+=b;return it}function Ku(M,O){var b="";if(!M||O<1||O>z)return b;do O%2&&(b+=M),O=Vo(O/2),O&&(M+=M);while(O);return b}function Xt(M,O){return uf(P0(M,O,oi),M+"")}function SC(M){return Op(ps(M))}function CC(M,O){var b=ps(M);return nh(b,Or(O,0,b.length))}function pa(M,O,b,j){if(!ce(M))return M;O=qn(O,M);for(var q=-1,tt=O.length,it=tt-1,rt=M;rt!=null&&++qq?0:q+O),b=b>q?q:b,b<0&&(b+=q),q=O>b?0:b-O>>>0,O>>>=0;for(var tt=ft(q);++j>>1,it=M[tt];it!==null&&!mi(it)&&(b?it<=O:it=w){var gt=O?null:GC(M);if(gt)return Lo(gt);it=!1,q=sa,lt=new Fr}else lt=O?[]:rt;t:for(;++j=j?M:Bi(M,O,b)}var e0=c2||function(M){return Ie.clearTimeout(M)};function i0(M,O){if(O)return M.slice();var b=M.length,j=Ep?Ep(b):new M.constructor(b);return M.copy(j),j}function qu(M){var O=new M.constructor(M.byteLength);return new No(O).set(new No(M)),O}function MC(M,O){var b=O?qu(M.buffer):M.buffer;return new M.constructor(b,M.byteOffset,M.byteLength)}function RC(M){var O=new M.constructor(M.source,bv.exec(M));return O.lastIndex=M.lastIndex,O}function LC(M){return ua?ne(ua.call(M)):{}}function n0(M,O){var b=O?qu(M.buffer):M.buffer;return new M.constructor(b,M.byteOffset,M.length)}function r0(M,O){if(M!==O){var b=M!==y,j=M===null,q=M===M,tt=mi(M),it=O!==y,rt=O===null,lt=O===O,gt=mi(O);if(!rt&&!gt&&!tt&&M>O||tt&&it&<&&!rt&&!gt||j&&it&<||!b&<||!q)return 1;if(!j&&!tt&&!gt&&M=rt)return lt;var gt=b[j];return lt*(gt=="desc"?-1:1)}}return M.index-O.index}function s0(M,O,b,j){for(var q=-1,tt=M.length,it=b.length,rt=-1,lt=O.length,gt=Le(tt-it,0),mt=ft(lt+gt),yt=!j;++rt1?b[q-1]:y,it=q>2?b[2]:y;for(tt=M.length>3&&typeof tt=="function"?(q--,tt):y,it&&Je(b[0],b[1],it)&&(tt=q<3?y:tt,q=1),O=ne(O);++j-1?q[tt?O[it]:it]:y}}function f0(M){return Rn(function(O){var b=O.length,j=b,q=Di.prototype.thru;for(M&&O.reverse();j--;){var tt=O[j];if(typeof tt!="function")throw new Oi(d);if(q&&!it&&eh(tt)=="wrapper")var it=new Di([],!0)}for(j=it?j:b;++j1&&Zt.reverse(),mt&<rt))return!1;var gt=tt.get(M),mt=tt.get(O);if(gt&&mt)return gt==O&&mt==M;var yt=-1,At=!0,Lt=b&n?new Fr:y;for(tt.set(M,O),tt.set(O,M);++yt1?"& ":"")+O[j],O=O.join(b>2?", ":" "),M.replace(jT,`{ +/* [wrapped with `+O+`] */ +`)}function KC(M){return zt(M)||Nr(M)||!!(wp&&M&&M[wp])}function Ln(M,O){var b=typeof M;return O=O??z,!!O&&(b=="number"||b!="symbol"&&rS.test(M))&&M>-1&&M%1==0&&M0){if(++O>=L)return arguments[0]}else O=0;return M.apply(y,arguments)}}function nh(M,O){var b=-1,j=M.length,q=j-1;for(O=O===y?j:O;++b1?M[O-1]:y;return b=typeof b=="function"?(M.pop(),b):y,G0(M,b)});function z0(M){var O=_(M);return O.__chain__=!0,O}function nP(M,O){return O(M),M}function rh(M,O){return O(M)}var rP=Rn(function(M){var O=M.length,b=O?M[0]:0,j=this.__wrapped__,q=function(tt){return Gu(tt,M)};return O>1||this.__actions__.length||!(j instanceof $t)||!Ln(b)?this.thru(q):(j=j.slice(b,+b+(O?1:0)),j.__actions__.push({func:rh,args:[q],thisArg:y}),new Di(j,this.__chain__).thru(function(tt){return O&&!tt.length&&tt.push(y),tt}))});function sP(){return z0(this)}function aP(){return new Di(this.value(),this.__chain__)}function oP(){this.__values__===y&&(this.__values__=J0(this.value()));var M=this.__index__>=this.__values__.length,O=M?y:this.__values__[this.__index__++];return{done:M,value:O}}function hP(){return this}function lP(M){for(var O,b=this;b instanceof Yo;){var j=F0(b);j.__index__=0,j.__values__=y,O?q.__wrapped__=j:O=j;var q=j;b=b.__wrapped__}return q.__wrapped__=M,O}function uP(){var M=this.__wrapped__;if(M instanceof $t){var O=M;return this.__actions__.length&&(O=new $t(this)),O=O.reverse(),O.__actions__.push({func:rh,args:[ff],thisArg:y}),new Di(O,this.__chain__)}return this.thru(ff)}function fP(){return _p(this.__wrapped__,this.__actions__)}var dP=Qo(function(M,O,b){_t.call(M,b)?++M[b]:wn(M,b,1)});function cP(M,O,b){var j=zt(M)?dp:nC;return b&&Je(M,O,b)&&(O=y),j(M,Ot(O,3))}function vP(M,O){var b=zt(M)?$n:Gp;return b(M,Ot(O,3))}var pP=u0(O0),gP=u0(D0);function mP(M,O){return be(sh(M,O),1)}function yP(M,O){return be(sh(M,O),G)}function xP(M,O,b){return b=b===y?1:Vt(b),be(sh(M,O),b)}function U0(M,O){var b=zt(M)?Fi:Qn;return b(M,Ot(O,3))}function b0(M,O){var b=zt(M)?US:Np;return b(M,Ot(O,3))}var TP=Qo(function(M,O,b){_t.call(M,b)?M[b].push(O):wn(M,b,[O])});function SP(M,O,b,j){M=si(M)?M:ps(M),b=b&&!j?Vt(b):0;var q=M.length;return b<0&&(b=Le(q+b,0)),uh(M)?b<=q&&M.indexOf(O,b)>-1:!!q&&rs(M,O,b)>-1}var CP=Xt(function(M,O,b){var j=-1,q=typeof O=="function",tt=si(M)?ft(M.length):[];return Qn(M,function(it){tt[++j]=q?vi(O,it,b):ca(it,O,b)}),tt}),EP=Qo(function(M,O,b){wn(M,b,O)});function sh(M,O){var b=zt(M)?ue:Xp;return b(M,Ot(O,3))}function PP(M,O,b,j){return M==null?[]:(zt(O)||(O=O==null?[]:[O]),b=j?y:b,zt(b)||(b=b==null?[]:[b]),Kp(M,O,b))}var AP=Qo(function(M,O,b){M[b?0:1].push(O)},function(){return[[],[]]});function wP(M,O,b){var j=zt(M)?Eu:gp,q=arguments.length<3;return j(M,Ot(O,4),b,q,Qn)}function MP(M,O,b){var j=zt(M)?bS:gp,q=arguments.length<3;return j(M,Ot(O,4),b,q,Np)}function RP(M,O){var b=zt(M)?$n:Gp;return b(M,hh(Ot(O,3)))}function LP(M){var O=zt(M)?Op:SC;return O(M)}function FP(M,O,b){(b?Je(M,O,b):O===y)?O=1:O=Vt(O);var j=zt(M)?q2:CC;return j(M,O)}function OP(M){var O=zt(M)?_2:PC;return O(M)}function DP(M){if(M==null)return 0;if(si(M))return uh(M)?as(M):M.length;var O=$e(M);return O==st||O==Ct?M.size:Xu(M).length}function IP(M,O,b){var j=zt(M)?Pu:AC;return b&&Je(M,O,b)&&(O=y),j(M,Ot(O,3))}var BP=Xt(function(M,O){if(M==null)return[];var b=O.length;return b>1&&Je(M,O[0],O[1])?O=[]:b>2&&Je(O[0],O[1],O[2])&&(O=[O[0]]),Kp(M,be(O,1),[])}),ah=v2||function(){return Ie.Date.now()};function NP(M,O){if(typeof O!="function")throw new Oi(d);return M=Vt(M),function(){if(--M<1)return O.apply(this,arguments)}}function V0(M,O,b){return O=b?y:O,O=M&&O==null?M.length:O,Mn(M,T,y,y,y,y,O)}function W0(M,O){var b;if(typeof O!="function")throw new Oi(d);return M=Vt(M),function(){return--M>0&&(b=O.apply(this,arguments)),M<=1&&(O=y),b}}var cf=Xt(function(M,O,b){var j=l;if(b.length){var q=jn(b,cs(cf));j|=v}return Mn(M,j,O,b,q)}),X0=Xt(function(M,O,b){var j=l|i;if(b.length){var q=jn(b,cs(X0));j|=v}return Mn(O,j,M,b,q)});function Y0(M,O,b){O=b?y:O;var j=Mn(M,u,y,y,y,y,y,O);return j.placeholder=Y0.placeholder,j}function H0(M,O,b){O=b?y:O;var j=Mn(M,c,y,y,y,y,y,O);return j.placeholder=H0.placeholder,j}function $0(M,O,b){var j,q,tt,it,rt,lt,gt=0,mt=!1,yt=!1,At=!0;if(typeof M!="function")throw new Oi(d);O=Gi(O)||0,ce(b)&&(mt=!!b.leading,yt="maxWait"in b,tt=yt?Le(Gi(b.maxWait)||0,O):tt,At="trailing"in b?!!b.trailing:At);function Lt(Pe){var tn=j,Dn=q;return j=q=y,gt=Pe,it=M.apply(Dn,tn),it}function Dt(Pe){return gt=Pe,rt=ya(Ht,O),mt?Lt(Pe):it}function Wt(Pe){var tn=Pe-lt,Dn=Pe-gt,ug=O-tn;return yt?He(ug,tt-Dn):ug}function It(Pe){var tn=Pe-lt,Dn=Pe-gt;return lt===y||tn>=O||tn<0||yt&&Dn>=tt}function Ht(){var Pe=ah();if(It(Pe))return Zt(Pe);rt=ya(Ht,Wt(Pe))}function Zt(Pe){return rt=y,At&&j?Lt(Pe):(j=q=y,it)}function yi(){rt!==y&&e0(rt),gt=0,j=lt=q=rt=y}function qe(){return rt===y?it:Zt(ah())}function xi(){var Pe=ah(),tn=It(Pe);if(j=arguments,q=this,lt=Pe,tn){if(rt===y)return Dt(lt);if(yt)return e0(rt),rt=ya(Ht,O),Lt(lt)}return rt===y&&(rt=ya(Ht,O)),it}return xi.cancel=yi,xi.flush=qe,xi}var GP=Xt(function(M,O){return Bp(M,1,O)}),zP=Xt(function(M,O,b){return Bp(M,Gi(O)||0,b)});function UP(M){return Mn(M,S)}function oh(M,O){if(typeof M!="function"||O!=null&&typeof O!="function")throw new Oi(d);var b=function(){var j=arguments,q=O?O.apply(this,j):j[0],tt=b.cache;if(tt.has(q))return tt.get(q);var it=M.apply(this,j);return b.cache=tt.set(q,it)||tt,it};return b.cache=new(oh.Cache||An),b}oh.Cache=An;function hh(M){if(typeof M!="function")throw new Oi(d);return function(){var O=arguments;switch(O.length){case 0:return!M.call(this);case 1:return!M.call(this,O[0]);case 2:return!M.call(this,O[0],O[1]);case 3:return!M.call(this,O[0],O[1],O[2])}return!M.apply(this,O)}}function bP(M){return W0(2,M)}var VP=wC(function(M,O){O=O.length==1&&zt(O[0])?ue(O[0],pi(Ot())):ue(be(O,1),pi(Ot()));var b=O.length;return Xt(function(j){for(var q=-1,tt=He(j.length,b);++q=O}),Nr=bp(function(){return arguments}())?bp:function(M){return Te(M)&&_t.call(M,"callee")&&!Ap.call(M,"callee")},zt=ft.isArray,e3=ap?pi(ap):lC;function si(M){return M!=null&&lh(M.length)&&!Fn(M)}function Ee(M){return Te(M)&&si(M)}function i3(M){return M===!0||M===!1||Te(M)&&Qe(M)==$}var tr=g2||Af,n3=op?pi(op):uC;function r3(M){return Te(M)&&M.nodeType===1&&!xa(M)}function s3(M){if(M==null)return!0;if(si(M)&&(zt(M)||typeof M=="string"||typeof M.splice=="function"||tr(M)||vs(M)||Nr(M)))return!M.length;var O=$e(M);if(O==st||O==Ct)return!M.size;if(ma(M))return!Xu(M).length;for(var b in M)if(_t.call(M,b))return!1;return!0}function a3(M,O){return va(M,O)}function o3(M,O,b){b=typeof b=="function"?b:y;var j=b?b(M,O):y;return j===y?va(M,O,y,b):!!j}function pf(M){if(!Te(M))return!1;var O=Qe(M);return O==J||O==Q||typeof M.message=="string"&&typeof M.name=="string"&&!xa(M)}function h3(M){return typeof M=="number"&&Mp(M)}function Fn(M){if(!ce(M))return!1;var O=Qe(M);return O==et||O==nt||O==X||O==Et}function j0(M){return typeof M=="number"&&M==Vt(M)}function lh(M){return typeof M=="number"&&M>-1&&M%1==0&&M<=z}function ce(M){var O=typeof M;return M!=null&&(O=="object"||O=="function")}function Te(M){return M!=null&&typeof M=="object"}var Z0=hp?pi(hp):dC;function l3(M,O){return M===O||Wu(M,O,sf(O))}function u3(M,O,b){return b=typeof b=="function"?b:y,Wu(M,O,sf(O),b)}function f3(M){return k0(M)&&M!=+M}function d3(M){if(kC(M))throw new Gt(R);return Vp(M)}function c3(M){return M===null}function v3(M){return M==null}function k0(M){return typeof M=="number"||Te(M)&&Qe(M)==ot}function xa(M){if(!Te(M)||Qe(M)!=at)return!1;var O=Go(M);if(O===null)return!0;var b=_t.call(O,"constructor")&&O.constructor;return typeof b=="function"&&b instanceof b&&Do.call(b)==u2}var gf=lp?pi(lp):cC;function p3(M){return j0(M)&&M>=-z&&M<=z}var Q0=up?pi(up):vC;function uh(M){return typeof M=="string"||!zt(M)&&Te(M)&&Qe(M)==dt}function mi(M){return typeof M=="symbol"||Te(M)&&Qe(M)==Tt}var vs=fp?pi(fp):pC;function g3(M){return M===y}function m3(M){return Te(M)&&$e(M)==wt}function y3(M){return Te(M)&&Qe(M)==Bt}var x3=th(Yu),T3=th(function(M,O){return M<=O});function J0(M){if(!M)return[];if(si(M))return uh(M)?Ji(M):ri(M);if(aa&&M[aa])return qS(M[aa]());var O=$e(M),b=O==st?Fu:O==Ct?Lo:ps;return b(M)}function On(M){if(!M)return M===0?M:0;if(M=Gi(M),M===G||M===-G){var O=M<0?-1:1;return O*W}return M===M?M:0}function Vt(M){var O=On(M),b=O%1;return O===O?b?O-b:O:0}function q0(M){return M?Or(Vt(M),0,K):0}function Gi(M){if(typeof M=="number")return M;if(mi(M))return Y;if(ce(M)){var O=typeof M.valueOf=="function"?M.valueOf():M;M=ce(O)?O+"":O}if(typeof M!="string")return M===0?M:+M;M=mp(M);var b=eS.test(M);return b||nS.test(M)?NS(M.slice(2),b?2:8):tS.test(M)?Y:+M}function _0(M){return dn(M,ai(M))}function S3(M){return M?Or(Vt(M),-z,z):M===0?M:0}function qt(M){return M==null?"":gi(M)}var C3=fs(function(M,O){if(ma(O)||si(O)){dn(O,Be(O),M);return}for(var b in O)_t.call(O,b)&&fa(M,b,O[b])}),tg=fs(function(M,O){dn(O,ai(O),M)}),fh=fs(function(M,O,b,j){dn(O,ai(O),M,j)}),E3=fs(function(M,O,b,j){dn(O,Be(O),M,j)}),P3=Rn(Gu);function A3(M,O){var b=us(M);return O==null?b:Dp(b,O)}var w3=Xt(function(M,O){M=ne(M);var b=-1,j=O.length,q=j>2?O[2]:y;for(q&&Je(O[0],O[1],q)&&(j=1);++b1),tt}),dn(M,nf(M),b),j&&(b=Ii(b,o|s|r,zC));for(var q=O.length;q--;)Zu(b,O[q]);return b});function H3(M,O){return ig(M,hh(Ot(O)))}var $3=Rn(function(M,O){return M==null?{}:yC(M,O)});function ig(M,O){if(M==null)return{};var b=ue(nf(M),function(j){return[j]});return O=Ot(O),jp(M,b,function(j,q){return O(j,q[0])})}function K3(M,O,b){O=qn(O,M);var j=-1,q=O.length;for(q||(q=1,M=y);++jO){var j=M;M=O,O=j}if(b||M%1||O%1){var q=Rp();return He(M+q*(O-M+BS("1e-"+((q+"").length-1))),O)}return $u(M,O)}var nA=ds(function(M,O,b){return O=O.toLowerCase(),M+(b?sg(O):O)});function sg(M){return xf(qt(M).toLowerCase())}function ag(M){return M=qt(M),M&&M.replace(sS,jS).replace(PS,"")}function rA(M,O,b){M=qt(M),O=gi(O);var j=M.length;b=b===y?j:Or(Vt(b),0,j);var q=b;return b-=O.length,b>=0&&M.slice(b,q)==O}function sA(M){return M=qt(M),M&&bT.test(M)?M.replace(zv,ZS):M}function aA(M){return M=qt(M),M&&$T.test(M)?M.replace(cu,"\\$&"):M}var oA=ds(function(M,O,b){return M+(b?"-":"")+O.toLowerCase()}),hA=ds(function(M,O,b){return M+(b?" ":"")+O.toLowerCase()}),lA=l0("toLowerCase");function uA(M,O,b){M=qt(M),O=Vt(O);var j=O?as(M):0;if(!O||j>=O)return M;var q=(O-j)/2;return _o(Vo(q),b)+M+_o(bo(q),b)}function fA(M,O,b){M=qt(M),O=Vt(O);var j=O?as(M):0;return O&&j>>0,b?(M=qt(M),M&&(typeof O=="string"||O!=null&&!gf(O))&&(O=gi(O),!O&&ss(M))?_n(Ji(M),0,b):M.split(O,b)):[]}var yA=ds(function(M,O,b){return M+(b?" ":"")+xf(O)});function xA(M,O,b){return M=qt(M),b=b==null?0:Or(Vt(b),0,M.length),O=gi(O),M.slice(b,b+O.length)==O}function TA(M,O,b){var j=_.templateSettings;b&&Je(M,O,b)&&(O=y),M=qt(M),O=fh({},O,j,g0);var q=fh({},O.imports,j.imports,g0),tt=Be(q),it=Lu(q,tt),rt,lt,gt=0,mt=O.interpolate||Po,yt="__p += '",At=Ou((O.escape||Po).source+"|"+mt.source+"|"+(mt===Uv?_T:Po).source+"|"+(O.evaluate||Po).source+"|$","g"),Lt="//# sourceURL="+(_t.call(O,"sourceURL")?(O.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++LS+"]")+` +`;M.replace(At,function(It,Ht,Zt,yi,qe,xi){return Zt||(Zt=yi),yt+=M.slice(gt,xi).replace(aS,kS),Ht&&(rt=!0,yt+=`' + +__e(`+Ht+`) + +'`),qe&&(lt=!0,yt+=`'; +`+qe+`; +__p += '`),Zt&&(yt+=`' + +((__t = (`+Zt+`)) == null ? '' : __t) + +'`),gt=xi+It.length,It}),yt+=`'; +`;var Dt=_t.call(O,"variable")&&O.variable;if(!Dt)yt=`with (obj) { +`+yt+` +} +`;else if(JT.test(Dt))throw new Gt(x);yt=(lt?yt.replace(Sn,""):yt).replace(Cn,"$1").replace(En,"$1;"),yt="function("+(Dt||"obj")+`) { +`+(Dt?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(rt?", __e = _.escape":"")+(lt?`, __j = Array.prototype.join; +function print() { __p += __j.call(arguments, '') } +`:`; +`)+yt+`return __p +}`;var Wt=hg(function(){return Jt(tt,Lt+"return "+yt).apply(y,it)});if(Wt.source=yt,pf(Wt))throw Wt;return Wt}function SA(M){return qt(M).toLowerCase()}function CA(M){return qt(M).toUpperCase()}function EA(M,O,b){if(M=qt(M),M&&(b||O===y))return mp(M);if(!M||!(O=gi(O)))return M;var j=Ji(M),q=Ji(O),tt=yp(j,q),it=xp(j,q)+1;return _n(j,tt,it).join("")}function PA(M,O,b){if(M=qt(M),M&&(b||O===y))return M.slice(0,Sp(M)+1);if(!M||!(O=gi(O)))return M;var j=Ji(M),q=xp(j,Ji(O))+1;return _n(j,0,q).join("")}function AA(M,O,b){if(M=qt(M),M&&(b||O===y))return M.replace(vu,"");if(!M||!(O=gi(O)))return M;var j=Ji(M),q=yp(j,Ji(O));return _n(j,q).join("")}function wA(M,O){var b=P,j=A;if(ce(O)){var q="separator"in O?O.separator:q;b="length"in O?Vt(O.length):b,j="omission"in O?gi(O.omission):j}M=qt(M);var tt=M.length;if(ss(M)){var it=Ji(M);tt=it.length}if(b>=tt)return M;var rt=b-as(j);if(rt<1)return j;var lt=it?_n(it,0,rt).join(""):M.slice(0,rt);if(q===y)return lt+j;if(it&&(rt+=lt.length-rt),gf(q)){if(M.slice(rt).search(q)){var gt,mt=lt;for(q.global||(q=Ou(q.source,qt(bv.exec(q))+"g")),q.lastIndex=0;gt=q.exec(mt);)var yt=gt.index;lt=lt.slice(0,yt===y?rt:yt)}}else if(M.indexOf(gi(q),rt)!=rt){var At=lt.lastIndexOf(q);At>-1&&(lt=lt.slice(0,At))}return lt+j}function MA(M){return M=qt(M),M&&UT.test(M)?M.replace(Gv,i2):M}var RA=ds(function(M,O,b){return M+(b?" ":"")+O.toUpperCase()}),xf=l0("toUpperCase");function og(M,O,b){return M=qt(M),O=b?y:O,O===y?JS(M)?s2(M):XS(M):M.match(O)||[]}var hg=Xt(function(M,O){try{return vi(M,y,O)}catch(b){return pf(b)?b:new Gt(b)}}),LA=Rn(function(M,O){return Fi(O,function(b){b=cn(b),wn(M,b,cf(M[b],M))}),M});function FA(M){var O=M==null?0:M.length,b=Ot();return M=O?ue(M,function(j){if(typeof j[1]!="function")throw new Oi(d);return[b(j[0]),j[1]]}):[],Xt(function(j){for(var q=-1;++qz)return[];var b=K,j=He(M,K);O=Ot(O),M-=K;for(var q=Ru(j,O);++b0||O<0)?new $t(b):(M<0?b=b.takeRight(-M):M&&(b=b.drop(M)),O!==y&&(O=Vt(O),b=O<0?b.dropRight(-O):b.take(O-M)),b)},$t.prototype.takeRightWhile=function(M){return this.reverse().takeWhile(M).reverse()},$t.prototype.toArray=function(){return this.take(K)},fn($t.prototype,function(M,O){var b=/^(?:filter|find|map|reject)|While$/.test(O),j=/^(?:head|last)$/.test(O),q=_[j?"take"+(O=="last"?"Right":""):O],tt=j||/^find/.test(O);q&&(_.prototype[O]=function(){var it=this.__wrapped__,rt=j?[1]:arguments,lt=it instanceof $t,gt=rt[0],mt=lt||zt(it),yt=function(Ht){var Zt=q.apply(_,Kn([Ht],rt));return j&&At?Zt[0]:Zt};mt&&b&&typeof gt=="function"&>.length!=1&&(lt=mt=!1);var At=this.__chain__,Lt=!!this.__actions__.length,Dt=tt&&!At,Wt=lt&&!Lt;if(!tt&&mt){it=Wt?it:new $t(this);var It=M.apply(it,rt);return It.__actions__.push({func:rh,args:[yt],thisArg:y}),new Di(It,At)}return Dt&&Wt?M.apply(this,rt):(It=this.thru(yt),Dt?j?It.value()[0]:It.value():It)})}),Fi(["pop","push","shift","sort","splice","unshift"],function(M){var O=Fo[M],b=/^(?:push|sort|unshift)$/.test(M)?"tap":"thru",j=/^(?:pop|shift)$/.test(M);_.prototype[M]=function(){var q=arguments;if(j&&!this.__chain__){var tt=this.value();return O.apply(zt(tt)?tt:[],q)}return this[b](function(it){return O.apply(zt(it)?it:[],q)})}}),fn($t.prototype,function(M,O){var b=_[O];if(b){var j=b.name+"";_t.call(ls,j)||(ls[j]=[]),ls[j].push({name:O,func:b})}}),ls[Jo(y,i).name]=[{name:"wrapper",func:y}],$t.prototype.clone=M2,$t.prototype.reverse=R2,$t.prototype.value=L2,_.prototype.at=rP,_.prototype.chain=sP,_.prototype.commit=aP,_.prototype.next=oP,_.prototype.plant=lP,_.prototype.reverse=uP,_.prototype.toJSON=_.prototype.valueOf=_.prototype.value=fP,_.prototype.first=_.prototype.head,aa&&(_.prototype[aa]=hP),_},Zn=a2();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Ie._=Zn,define(function(){return Zn})):Mr?((Mr.exports=Zn)._=Zn,Tu._=Zn):Ie._=Zn}).call(f)}),BT=class extends Set{constructor(f,g=!1){super(f),this.valuesAsFlags=g}};function ka(f){if(f instanceof Map)return Object.fromEntries([...f.entries()].map(([g,y])=>[g,ka(y)]));if(f instanceof Set)return Array.from(f.values()).map(ka);if(f instanceof BT)return{values:[...f.values()],valuesAsFlags:f.valuesAsFlags};if(typeof f=="object"){let g={};return Object.entries(f).forEach(([y,E])=>{g[y]=ka(E)}),g}else return f}Bv(Nv(),1);var wL=Bv(Nv(),1);function Vr(f,g){if(typeof f!="object")throw new Error(`Cannot merge into non-object objectToMergeWith. Received: ${JSON.stringify(f)}`);if(typeof g!="object")throw new Error(`Cannot merge using non-object objectToMergeWith. Received: ${JSON.stringify(g)}`);let y=(0,wL.cloneDeep)(f);for(let[E,w]of Object.entries(g))typeof w!="object"||w instanceof Set||y[E]===void 0?y[E]=w:y[E]=Vr(y[E],w);return y}function NT(f,g){if(!(f===void 0||typeof f!="object"))for(let y of Object.keys(f)){if(y===g)return f[y];let E=f[y];if(typeof E=="object"){let w=NT(E,g);if(w!==void 0)return w}}}var od="@composite:",ML="@inherit:",RL=class{constructor(f,g,y){this.tiledClassToMembersMap=f,this.enumNameToValuesMap=g,this.parserOptions=y,this.memoiser=new Map}flattenMembers(f,g){return this.memoiser.has(f)?{[f]:this.memoiser.get(f)}:(this.memoiser.set(f,g.reduce((y,E)=>fe(fe({},y),this.flattenMemberProperty(E)),{})),{[f]:this.memoiser.get(f)})}flattenMemberProperty(f){var g;let y=(g=f.propertyType)!=null?g:f.propertytype;if(f.type==="class"){if(!this.memoiser.has(y)){let R=this.tiledClassToMembersMap.get(y).reduce((d,x)=>Vr(this.flattenMemberProperty(x),d),{});this.memoiser.set(y,R)}let E=this.memoiser.get(y),w=Vr(E,this.flattenValue(f.value,E));return this.checkIfShouldFlatten(f.name)?w:{[f.name.replace(od,"")]:w}}else return this.enumNameToValuesMap.has(y)?this.enumNameToValuesMap.get(y).valuesAsFlags?{[f.name]:new Set(f.value.split(",").filter(E=>E!==""))}:{[f.name]:f.value}:{[f.name]:f.value}}get memoisedFlattenedProperties(){return this.memoiser}flattenValue(f,g){return Object.entries(f).reduce((y,[E,w])=>{if(typeof w!="object")return NT(g,E)instanceof Set?Vr({[E]:new Set(w.split(",").filter(R=>R!==""))},y):Vr({[E]:w},y);if(this.checkIfShouldFlatten(E))return Vr(this.flattenValue(w,g),y);{let R=E.replace(od,"");return Vr({[R]:this.flattenValue(w,g)},y)}},{})}checkIfShouldFlatten(f){var g;return((g=this.parserOptions)==null?void 0:g.defaultComposite)===!0?f.startsWith(ML):!f.startsWith(od)}},qm=Bv(Nv(),1),LL=class{constructor(f){this.flattener=f}flattenPropertiesOnObject(f){var g,y,E,w;return Sr(fe(fe({},this.flattener.memoisedFlattenedProperties.get((g=f.class)!=null?g:f.type)),(y=f.properties)==null?void 0:y.reduce((R,d)=>fe(fe({},R),this.flattener.flattenMemberProperty(d)),{})),{name:f.name,id:f.id,class:(w=(E=f.class)!=null?E:f.type)!=null?w:null,x:f.x,y:f.y})}flattenPropertiesOnTile(f){var g,y,E,w;return Sr(fe(fe({},this.flattener.memoisedFlattenedProperties.get((g=f.class)!=null?g:f.type)),(y=f.properties)==null?void 0:y.reduce((R,d)=>fe(fe({},R),this.flattener.flattenMemberProperty(d)),{})),{id:f.id,class:(w=(E=f.class)!=null?E:f.type)!=null?w:null})}getCustomTypesMap(){return new Map([...this.flattener.memoisedFlattenedProperties.entries()].map(([f,g])=>[f,(0,qm.cloneDeep)(g)]))}getEnumsMap(){return new Map([...this.flattener.enumNameToValuesMap.entries()].map(([f,g])=>[f,(0,qm.cloneDeep)(g)]))}toJSON(){return JSON.stringify({customTypes:ka(this.getCustomTypesMap()),enums:ka(this.getEnumsMap())},null,4)}};function FL(f,g){let y=new Map(f.propertyTypes.filter(R=>R.type==="enum").map(R=>[R.name,new BT(R.values,R.valuesAsFlags)])),E=new Map(f.propertyTypes.filter(R=>R.type==="class").map(R=>[R.name,R.members])),w=new RL(E,y,g);return E.forEach((R,d)=>{w.flattenMembers(d,R)}),new LL(w)}var OL={parse:FL},GT=class{constructor(f,g){this.phaserTile=f,this.tiledProject=g}getProperty(f){var g,y;let E={};if(this.tiledProject){let w=OL.parse(this.tiledProject),R=this.getType();if(R){let d=(g=w.getCustomTypesMap())==null?void 0:g.get(R);if(d)for(let[x,t]of Object.entries(d))E[x]=t}}return(y=this.phaserTile.properties[f])!=null?y:E[f]}hasProperty(f){return this.getProperty(f)!=null}getType(){var f,g;return(g=(f=this.phaserTile.tileset)==null?void 0:f.tileData[this.phaserTile.index-1])==null?void 0:g.type}},DL=class{constructor(f,g){this.phaserTilemapLayer=f,this.tiledProject=g}getName(){return this.phaserTilemapLayer.layer.name}getProperty(f){let g=this.phaserTilemapLayer.layer.properties,y=g==null?void 0:g.find(E=>E.name==f);return y==null?void 0:y.value}hasProperty(f){return this.getProperty(f)!=null}isCharLayer(){return this.hasProperty(_h)}getData(){return this.phaserTilemapLayer.layer.data.map(f=>f.map(g=>new GT(g,this.tiledProject)))}},IL=class{constructor(f,g){this.phaserTilemap=f,this.tiledProject=g;for(let y of this.phaserTilemap.layers)if(y.tilemapLayer==null)throw new Error(`Error initializing tilemap. Layer '${y.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(f=>new DL(f.tilemapLayer,this.tiledProject))}hasTileAt(f,g,y){return!!this.phaserTilemap.hasTileAt(f,g,y)}getTileAt(f,g,y){let E=this.phaserTilemap.getTileAt(f,g,!1,y);if(E)return new GT(E,this.tiledProject)}},zT=class yc{constructor(g){this.scene=g,this.geHeadless=new pL(!1),this.isCreatedInternal=!1,yc.welcomeMessagePrinted||(console.log(`Using GridEngine Phaser Plugin v${RT}`),yc.welcomeMessagePrinted=!0),this.scene.sys.events.once("boot",this.boot,this)}boot(){this.scene.sys.events.on("update",this.update,this)}getCharLayer(g){return this.geHeadless.getCharLayer(g)}getTransition(g,y){return this.geHeadless.getTransition(g,y)}setTransition(g,y,E){this.geHeadless.setTransition(g,y,E)}create(g,y){this.geHeadless.create(new IL(g,y.tiledProject),y),this.isCreatedInternal=!0,this.gridCharacters=new Map;let E=this.setConfigDefaults(y);this.config=E,this.gridTilemap=new mc(g),this.addCharacters()}getPosition(g){return this.geHeadless.getPosition(g)}move(g,y){this.geHeadless.move(g,y)}moveRandomly(g,y=0,E=-1){this.geHeadless.moveRandomly(g,y,E)}getMovement(g){return this.geHeadless.getMovement(g)}moveTo(g,y,E){return this.geHeadless.moveTo(g,y,E)}stopMovement(g){this.geHeadless.stopMovement(g)}setSpeed(g,y){this.geHeadless.setSpeed(g,y)}getSpeed(g){return this.geHeadless.getSpeed(g)}setContainer(g,y){var E;this.initGuard();let w=(E=this.gridCharacters)==null?void 0:E.get(g);if(!w)throw this.createCharUnknownErr(g);w.setContainer(y)}getContainer(g){var y;this.initGuard();let E=(y=this.gridCharacters)==null?void 0:y.get(g);if(!E)throw this.createCharUnknownErr(g);return E.getContainer()}getOffsetX(g){var y;this.initGuard();let E=(y=this.gridCharacters)==null?void 0:y.get(g);if(!E)throw this.createCharUnknownErr(g);return E.getOffsetX()}setOffsetX(g,y){var E;this.initGuard();let w=(E=this.gridCharacters)==null?void 0:E.get(g);if(!w)throw this.createCharUnknownErr(g);w.setOffsetX(y)}getOffsetY(g){var y;this.initGuard();let E=(y=this.gridCharacters)==null?void 0:y.get(g);if(!E)throw this.createCharUnknownErr(g);return E.getOffsetY()}setOffsetY(g,y){var E;this.initGuard();let w=(E=this.gridCharacters)==null?void 0:E.get(g);if(!w)throw this.createCharUnknownErr(g);w.setOffsetY(y)}collidesWithTiles(g){return this.geHeadless.collidesWithTiles(g)}getWalkingAnimationMapping(g){var y;this.initGuard();let E=(y=this.gridCharacters)==null?void 0:y.get(g);if(!E)throw this.createCharUnknownErr(g);let w=E.getAnimation();return w==null?void 0:w.getWalkingAnimationMapping()}hasLayerOverlay(){var g;return this.initGuard(),!!((g=this.config)!=null&&g.layerOverlay)}setWalkingAnimationMapping(g,y){var E;this.initGuard();let w=(E=this.gridCharacters)==null?void 0:E.get(g);if(!w)throw this.createCharUnknownErr(g);let R=w.getAnimation();R==null||R.setWalkingAnimationMapping(y)}update(g,y){if(this.isCreatedInternal&&this.gridCharacters)for(let[E,w]of this.gridCharacters)w.update(y);this.geHeadless.update(g,y)}addCharacter(g){this.geHeadless.addCharacter(g),this.addCharacterInternal(g)}hasCharacter(g){return this.geHeadless.hasCharacter(g)}removeCharacter(g){var y,E;this.initGuard();let w=(y=this.gridCharacters)==null?void 0:y.get(g);if(!w)throw this.createCharUnknownErr(g);w.destroy(),(E=this.gridCharacters)==null||E.delete(g),this.geHeadless.removeCharacter(g)}removeAllCharacters(){if(this.initGuard(),!!this.gridCharacters){for(let g of this.gridCharacters.keys())this.removeCharacter(g);this.geHeadless.removeAllCharacters()}}getAllCharacters(g){return this.geHeadless.getAllCharacters(g)}getLabels(g){return this.geHeadless.getLabels(g)}addLabels(g,y){this.geHeadless.addLabels(g,y)}removeLabels(g,y){this.geHeadless.removeLabels(g,y)}clearLabels(g){this.geHeadless.clearLabels(g)}follow(g,y,E,w){let R;E===void 0?R={distance:0,closestPointIfBlocked:!1}:typeof E=="number"?(R={distance:E,closestPointIfBlocked:!1},w&&(R.closestPointIfBlocked=!0)):R=E,this.geHeadless.follow(g,y,R)}isMoving(g){return this.geHeadless.isMoving(g)}getFacingDirection(g){return this.geHeadless.getFacingDirection(g)}getFacingPosition(g){return this.geHeadless.getFacingPosition(g)}turnTowards(g,y){var E;this.initGuard();let w=(E=this.gridCharacters)==null?void 0:E.get(g);if(!w)throw this.createCharUnknownErr(g);w.turnTowards(y),this.geHeadless.turnTowards(g,y)}getCharactersAt(g,y){return this.geHeadless.getCharactersAt(g,y)}setPosition(g,y,E){this.geHeadless.setPosition(g,y,E)}getSprite(g){var y;this.initGuard();let E=(y=this.gridCharacters)==null?void 0:y.get(g);if(!E)throw this.createCharUnknownErr(g);return E.getSprite()}setSprite(g,y){var E;this.initGuard();let w=(E=this.gridCharacters)==null?void 0:E.get(g);if(!w)throw this.createCharUnknownErr(g);y.setOrigin(0,0),w.setSprite(y)}isBlocked(g,y,E=["geDefault"]){return this.geHeadless.isBlocked(g,y,E)}isTileBlocked(g,y){return this.geHeadless.isTileBlocked(g,y)}getCollisionGroups(g){return this.geHeadless.getCollisionGroups(g)}setCollisionGroups(g,y){this.geHeadless.setCollisionGroups(g,y)}getIgnoreCollisionGroups(g){return this.geHeadless.getIgnoreCollisionGroups(g)}setIgnoreCollisionGroups(g,y){this.geHeadless.setIgnoreCollisionGroups(g,y)}getTilePosInDirection(g,y,E){return this.geHeadless.getTilePosInDirection(g,y,E)}findShortestPath(g,y,E={}){return this.geHeadless.findShortestPath(g,y,E)}steppedOn(g,y,E){return this.geHeadless.steppedOn(g,y,E)}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(g){return this.geHeadless.getMovementProgress(g)}rebuildTileCollisionCache(g,y,E,w){this.geHeadless.rebuildTileCollisionCache(g,y,E,w)}addQueueMovements(g,y,E){this.geHeadless.addQueueMovements(g,y,E)}getEnqueuedMovements(g){return this.geHeadless.getEnqueuedMovements(g)}queueMovementFinished(){return this.geHeadless.queueMovementFinished()}clearEnqueuedMovements(g){return this.geHeadless.clearEnqueuedMovements(g)}getState(){return{characters:this.geHeadless.getState().characters.map(g=>Sr(fe({},g),{offsetX:this.getOffsetX(g.id),offsetY:this.getOffsetY(g.id)}))}}setState(g){if(this.geHeadless.setState(g),this.gridCharacters)for(let y of g.characters){let E=this.gridCharacters.get(y.id);E&&(E.setOffsetX(y.offsetX),E.setOffsetY(y.offsetY))}}getTileCost(g,y,E){return this.initGuard(),this.geHeadless.getTileCost(g,y,E)}setConfigDefaults(g){return fe({collisionTilePropertyName:"ge_collide",numberOfDirections:4,characterCollisionStrategy:"BLOCK_TWO_TILES",layerOverlay:!1,cacheTileCollisions:!1},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(y=>this.addCharacterInternal(y))}createCharUnknownErr(g){return new Error(`Character unknown: ${g}`)}addCharacterInternal(g){var y;if(this.initGuard(),!this.gridTilemap)throw this.createUninitializedErr();if(!this.config)throw this.createUninitializedErr();let E=new QR(g,this.scene,this.gridTilemap,this.config.layerOverlay,this.geHeadless);(y=this.gridCharacters)==null||y.set(g.id,E)}};zT.welcomeMessagePrinted=!1;var BL=zT,NL=BL;/*! 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 GL extends es.Scene{constructor(){super({key:"CreditsScene"})}create(){this.add.image(this.cameras.main.centerX,this.cameras.main.centerY,"creditsBg");const g=`Developers: +BChip +h0lybyte +David + +Artists: +ArchanDroid - Sprites +Nezt50 - Tiles +Retornodomal - Menus +BChip - Music & Animations`;this.add.text(this.cameras.main.centerX,this.cameras.main.centerY,g,{font:"20px Arial",stroke:"#000000",strokeThickness:8,align:"center"}).setOrigin(.5),this.add.text(this.cameras.main.centerX-40,550,"Back",{font:"32px Arial",stroke:"#000000",strokeThickness:8,align:"center"}).setInteractive({useHandCursor:!0}).on("pointerdown",()=>{this.scene.start("TownScene")})}}const _m=["Angelfish","Barracuda","Clownfish","Damselfish","Eel","Flounder","Guppy","Haddock","Iridescent Shark","Jellynose Fish","Koi","Lionfish","Mackerel","Nurse Shark","Oscar","Pufferfish","Quillback","Rasbora","Salmon","Tilapia","Uaru","Vampire Tetra","Wrasse","X-ray Tetra","Yellowtail","Zebrafish","Arowana","Blue Tang","Catfish","Dorado","Electric Eel","Flying Fish","Goldfish","Halibut","Icefish","Jack Dempsey","Killifish","Loach","Mudskipper","Neon Tetra","Octopus Squid","Pirarucu","Queen Triggerfish","Rainbow Trout","Swordfish","Triggerfish","Unicorn Fish","Velvetfish","Whale Shark","Yellowfin Tuna","Albacore Tuna","Bluefin Tuna","Chinook Salmon","Dolly Varden Trout","Epaulette Shark","French Angelfish","Green Swordtail","Humpback Angelfish","Ivory Goby","Jade Goby","Kelp Bass","Lemon Shark","Midnight Angelfish","Northern Pike","Olive Flounder","Pacific Halibut","Queen Snapper","Red Drum","Spotted Seatrout","Tiger Barb","Violet Goby","White Sturgeon","Xingu River Ray","Yellow Perch","Zebra Danio","Amberjack","Black Molly","Dragonet","Emperor Angelfish","Firefish","Ghost Knifefish","Hogfish","Indian Glassy Fish","Jewelfish","Knifefish","Longfin Bannerfish","Maroon Clownfish","Nightfish","Pink Salmon","Quagga Catfish","Rusty Cichlid","Silver Dollar","Turquoise Discus","Upland Bully","Velvet Crab","Wobbegong Shark","Xenon Blue Cichlid","Zigzag Eel","African Lungfish","Banded Archerfish","Candy Basslet","Dwarf Gourami","Electric Blue Hap","Firemouth Cichlid","Golden Dojo Loach","Horn Shark","Indian Glassfish","Jaguar Cichlid","Kissing Gourami","Lemon Cichlid","Midas Cichlid","Nile Tilapia","Oscar Cichlid","Pajama Cardinalfish","Queen Parrotfish","Redtail Catfish","Sailfin Tang","Tiger Oscar","Upside-down Catfish","Wrasse Bass","Yellow Tang","Zebra Pleco","Bala Shark","Clown Loach","Dwarf Pufferfish","Fire Eel","Giant Gourami","Humphead Glassfish","Indian Tigerfish","Jewel Cichlid","Kuhli Loach","Lemon Tetra","Mbu Puffer","Niger Triggerfish","Otocinclus Catfish","Panda Corydoras","Queen Loach","Redtail Shark","Sailfin Molly","Tiger Barb","Upside-down Catfish","Wrasse Bass","Yellow Tang","Zebra Pleco","Bala Shark","Clown Loach","Dwarf Pufferfish","Fire Eel","Giant Gourami","Humphead Glassfish","Indian Tigerfish","Jewel Cichlid","Kuhli Loach","Lemon Tetra","Mbu Puffer","Niger Triggerfish","Otocinclus Catfish","Panda Corydoras","Queen Loach","Redtail Shark","Sailfin Molly","Tiger Barb","Upside-down Catfish","Wrasse Bass","Yellow Tang","Zebra Pleco","Bala Shark","Clown Loach","Dwarf Pufferfish","Fire Eel","Giant Gourami","Humphead Glassfish","Indian Tigerfish","Jewel Cichlid","Kuhli Loach","Lemon Tetra","Mbu Puffer","Niger Triggerfish","Otocinclus Catfish","Panda Corydoras","Queen Loach","Redtail Shark","Sailfin Molly","Tiger Barb","Upside-down Catfish","Wrasse Bass","Yellow Tang","Zebra Pleco","Bala Shark","Clown Loach","Dwarf Pufferfish","Fire Eel","Giant Gourami","Humphead Glassfish","Indian Tigerfish","Jewel Cichlid","Kuhli Loach","Lemon Tetra","Mbu Puffer","Niger Triggerfish","Otocinclus Catfish","Panda Corydoras","Queen Loach","Redtail Shark","Sailfin Molly","Tiger Barb","Upside-down Catfish","Wrasse Bass"];class zL extends es.Scene{constructor(){super("FishChipScene"),this.comboTextObjects=[],this.startTime=null,this.combo=[],this.userInput=[],this.score=0,this.comboTextObjects=[],this.startTime=null,this.correctChars=0,this.wpm=0,this.typingStarted=!1}resetGameState(){this.combo=[],this.userInput=[],this.score=0,this.scoreText.setText("You Caught: "+this.score+" Fish"),this.comboTextObjects.forEach(g=>g.destroy()),this.comboTextObjects=[],this.startTime=null,this.correctChars=0,this.wpm=0,this.typingStarted=!1,this.timerText.setText(""),this.countdownEvent&&this.countdownEvent.remove()}startComboSequence(){this.combo=this.generateCombo(),this.userInput=[],this.timeLeft=20,this.timerText.setText(`Time Left: ${this.timeLeft}s`),this.countdownEvent&&this.countdownEvent.remove(),this.countdownEvent=this.time.addEvent({delay:1e3,callback:()=>{this.timeLeft--,this.timerText.setText(`Time Left: ${this.timeLeft}s`),this.timeLeft<=0&&this.checkCombo(!0)},callbackScope:this,loop:!0}),this.displayCombo()}displayCombo(){this.comboTextObjects.forEach(E=>E.destroy()),this.comboTextObjects=[];const g=30,y=480-this.combo.length*g/2;this.combo.forEach((E,w)=>{const R=this.add.text(y+w*g,384,E,{fontFamily:"Courier",fontSize:48,color:"#ffffff",stroke:"#000000",strokeThickness:8,align:"center"}).setOrigin(.5);this.comboTextObjects[w]=R})}gameOver(){this.countdownEvent&&this.countdownEvent.remove(),this.scene.start("GameOver",{score:this.score,wpm:this.wpm})}handleInput(g){if(this.startTime||(this.startTime=Date.now()),this.combo.length>0){const y=this.combo[this.userInput.length];g===y?(this.userInput.push(g),this.comboTextObjects[this.userInput.length-1].setColor("#00ff00"),this.correctChars++,this.userInput.length===this.combo.length&&this.checkCombo()):this.gameOver()}}calculateWPM(){if(this.startTime===null)return 0;{const y=(Date.now()-this.startTime)/6e4,E=this.correctChars/5/y;return Number(E.toFixed(0))}}generateCombo(){return _m[Math.floor(Math.random()*_m.length)].toUpperCase().split("")}generateCompliments(){const g=["Great job!","You're doing great!","Keep it up!","You're a typing machine!","You're a typing wizard!","You're a typing master!","You're a typing prodigy!","You're a typing genius!","You're a typing god!","You're a typing legend!","You're a typing hero!","You're a typing champion!","You're a typing superstar!","You're a typing sensation!","You're a typing phenomenon!","You're a typing marvel!","You're a typing miracle!","You're a typing wonder!","You're a typing miracle!","You're a typing marvel!","You're a typing sensation!","You're a typing superstar!","You're a typing champion!","You're a typing hero!","You're a typing legend!","You're a typing god!","You're a typing genius!","You're a typing prodigy!","You're a typing master!","You're a typing wizard!","You're a typing machine!","Keep it up!","You're doing great!","Great job!","Great job!","You're doing great!","Keep it up!","Woah!","Amazing!","Incredible!","Unbelievable","Unreal","Radical!","Awesome!","Fantastic!","Superb!","Terrific!","Stupendous!","Phenomenal!","Magnificent!","Marvelous!","Splendid!","Spectacular!","Stunning!","Breathtaking!","Astonishing!","Mind-blowing!","Mind-boggling!","Mind-bending!","Mind-blowing!","Astonishing!","Breathtaking!","Stunning!","Spectacular!","Splendid!","Marvelous!","Magnificent!","Phenomenal!","Stupendous!","Terrific!","Superb!","Fantastic!","Awesome!","Radical!","Unreal","Unbelievable","Incredible!","Amazing!","Woah!","Keep it up!","You're doing great!","Great job!"];return g[Math.floor(Math.random()*g.length)]}checkCombo(g=!1){if(g||this.userInput.join("")!==this.combo.join("")){this.gameOver();return}this.userInput.join("")===this.combo.join("")?(this.score++,this.scoreText.setText("You Caught: "+this.score+" Fish"),this.wpm=this.calculateWPM(),this.wpmText.setText("WPM: "+this.wpm),this.instructions.setText(this.generateCompliments()),this.startComboSequence()):g?this.gameOver():this.gameOver()}create(){const g=this.sound.add("type",{volume:.1});this.timerText=this.add.text(480,200,"",{fontFamily:"Arial Black",fontSize:38,color:"#ff0000",stroke:"#000000",strokeThickness:8,align:"center"}).setOrigin(.5).setDepth(99),this.wpmText=this.add.text(480,250,"WPM: 0",{fontFamily:"Arial Black",fontSize:38,color:"#ffffff",stroke:"#000000",strokeThickness:8,align:"center"}).setOrigin(.5).setDepth(99),this.scoreText=this.add.text(480,300,this.score.toString(),{fontFamily:"Arial Black",fontSize:38,color:"#ffffff",stroke:"#000000",strokeThickness:8,align:"center"}).setOrigin(.5).setDepth(99),this.instructions=this.add.text(480,650,`Prepare to Start Typing! +Press SHIFT to Start`,{fontFamily:"Arial Black",fontSize:38,color:"#ffffff",stroke:"#000000",strokeThickness:8,align:"center"}).setOrigin(.5).setDepth(99),this.anims.create({key:"fishing",frames:this.anims.generateFrameNumbers("fishing",{start:0,end:46}),frameRate:30,repeat:-1}),this.fisherman=this.add.sprite(480,480,"fishing").play("fishing").setDepth(-1),this.createSandStorm(),this.resetGameState(),this.input&&this.input.keyboard&&(this.input.keyboard.on("keydown-SHIFT",()=>{this.typingStarted||(this.typingStarted=!0,this.instructions.setText("Type the letters as fast as you can!"),this.startComboSequence())}),this.input.keyboard.on("keydown",y=>{g.play();const E=y.key.toUpperCase();E.length===1&&this.handleInput(E)}))}createSandStorm(){const y=[],E=this.make.graphics({x:this.fisherman.x-this.fisherman.width/2,y:this.fisherman.y-this.fisherman.height/2});E.fillStyle(16777215),E.beginPath(),E.fillRect(0,0,this.fisherman.width,this.fisherman.height),E.closePath(),E.fillPath();const w=E.createGeometryMask(),R=()=>y.length>0?y.pop():this.add.rectangle(0,0,this.cameras.main.width,20,12759680,.2),d=t=>{t.setVisible(!1),y.push(t)},x=t=>{t.setVisible(!0),t.setX(hr.Math.Between(this.fisherman.x-this.fisherman.width/2,this.fisherman.x+this.fisherman.width/2)),t.setY(hr.Math.Between(this.fisherman.y-this.fisherman.height/2,this.fisherman.y+this.fisherman.height/2)),this.tweens.add({targets:t,x:`+=${this.cameras.main.width}`,y:`+=${hr.Math.Between(-100,100)}`,ease:"Linear",duration:hr.Math.Between(3e3,5e3),repeat:0,yoyo:!1,onComplete:()=>{d(t),x(t)}})};for(let t=0;t<150;t++){const a=R();a.setMask(w),x(a)}}}class UL extends es.Scene{constructor(){super({key:"FishScene"}),this.fish=null}create(){this.fish=this.add.sprite(100,100,"fish"),this.tweens.add({targets:this.fish,x:300,duration:2e3,ease:"Power2",yoyo:!0,repeat:-1})}update(){}}class bL extends es.Scene{constructor(){super("GameOver"),this.score=0,this.wpm=0,this.scores=[]}init(g){this.score=g.score,this.wpm=g.wpm;const y=localStorage.getItem("scores"),E=y?JSON.parse(y):[];E.push({score:this.score,wpm:this.wpm}),E.sort((d,x)=>x.score-d.score),this.scores=E.slice(0,5),localStorage.setItem("scores",JSON.stringify(this.scores));const w=localStorage.getItem("totalScore");let R=w?JSON.parse(w):0;R+=this.score,localStorage.setItem("totalScore",JSON.stringify(R))}create(){const g=localStorage.getItem("scores"),y=g?JSON.parse(g):[];this.scores=y,this.add.image(480,480,"background").setScale(1.4,1.4),this.add.text(480,100,`Game Over +Score: ${this.score} +WPM: ${this.wpm}`,{fontFamily:"Arial Black",fontSize:38,color:"#ffffff",stroke:"#000000",strokeThickness:8,align:"center"}).setOrigin(.5),this.add.text(480,225,"High Scores",{fontFamily:"Arial Black",fontSize:64,color:"#ffffff",stroke:"#000000",strokeThickness:8,align:"center"}).setOrigin(.5),this.scores.forEach((R,d)=>{this.add.text(480,300+d*50,`${d+1}. Score: ${R.score} - WPM: ${R.wpm}`,{fontFamily:"Arial Black",fontSize:38,color:"#ffffff",stroke:"#000000",strokeThickness:8,align:"center"}).setOrigin(.5)});const E=this.add.text(200,600,"Retry",{fontFamily:"Arial Black",fontSize:40,color:"#ffffff",stroke:"#000000",strokeThickness:6}).setInteractive({useHandCursor:!0}),w=this.add.text(500,600,"Go Back To Town",{fontFamily:"Arial Black",fontSize:40,color:"#ffffff",stroke:"#000000",strokeThickness:6}).setInteractive({useHandCursor:!0});E.on("pointerdown",()=>{this.retry()}),w.on("pointerdown",()=>{this.mainMenu()}),this.add.text(480,700,"Press Shift or R to Retry",{fontFamily:"Arial Black",fontSize:32,color:"#ffffff",stroke:"#000000",strokeThickness:6,align:"center"}).setOrigin(.5),this.input&&this.input.keyboard&&this.input.keyboard.on("keydown",this.handleKeyDown,this)}handleKeyDown(g){const y=g.key.toUpperCase();(y==="SHIFT"||y==="R")&&this.retry()}retry(){this.scene.start("FishChipScene")}mainMenu(){this.scene.start("TownScene")}}class VL extends es.Scene{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://cdn.discordapp.com/attachments/1213306326290010112/1213992501166350466/itchcover.png?ex=65f77d9f&is=65e5089f&hm=1118240df1bba0735961a514a40d5293e91710f95d3746a1e32f61b218d63a30&"),this.load.audio("type","https://kbve.com/assets/img/fishchip/type.mp3"),this.load.spritesheet("fishing","https://kbve.com/assets/img/fishchip/animate.png",{frameWidth:800,frameHeight:600}),this.load.image("fish","https://kbve.com/assets/img/letter_logo.png"),this.load.image("background","https://kbve.com/assets/img/fishchip/scaled_fish_menu_minigame.webp"),this.load.image("tiles","https://kbve.com/assets/img/fishchip/desert_tileset_1.png"),this.load.tilemapTiledJSON("cloud-city-map","https://kbve.com/assets/img/fishchip/cloud_city.json"),this.load.spritesheet("player","https://kbve.com/assets/img/fishchip/chip_charactersheet_warmer.png",{frameWidth:52,frameHeight:72})}create(){var g;(g=this.sound.get("music"))!=null&&g.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("TownScene")},this)}}let _e=[],WL=(f,g)=>{let y=[],E={get(){return E.lc||E.listen(()=>{})(),E.value},l:g||0,lc:0,listen(w,R){return E.lc=y.push(w,R||E.l)/2,()=>{let d=y.indexOf(w);~d&&(y.splice(d,2),E.lc--,E.lc||E.off())}},notify(w){let R=!_e.length;for(let d=0;d(f.events=f.events||{},f.events[y+Nh]||(f.events[y+Nh]=E(w=>{f.events[y].reduceRight((R,d)=>(d(R),R),{shared:{},...w})})),f.events[y]=f.events[y]||[],f.events[y].push(g),()=>{let w=f.events[y],R=w.indexOf(g);w.splice(R,1),w.length||(delete f.events[y],f.events[y+Nh](),delete f.events[y+Nh])}),HL=1e3,$L=(f,g)=>YL(f,E=>{let w=g(E);w&&f.events[Bh].push(w)},XL,E=>{let w=f.listen;f.listen=(...d)=>(!f.lc&&!f.active&&(f.active=!0,E()),w(...d));let R=f.off;return f.events[Bh]=[],f.off=()=>{R(),setTimeout(()=>{if(f.active&&!f.lc){f.active=!1;for(let d of f.events[Bh])d();f.events[Bh]=[]}},HL)},()=>{f.listen=w,f.off=R}}),ty=f=>f,ys={},xc={addEventListener(){},removeEventListener(){}};function KL(){try{return typeof localStorage<"u"}catch{return!1}}KL()&&(ys=localStorage);let jL={addEventListener(f,g,y){window.addEventListener("storage",g),window.addEventListener("pageshow",y)},removeEventListener(f,g,y){window.removeEventListener("storage",g),window.removeEventListener("pageshow",y)}};typeof window<"u"&&(xc=jL);function ZL(f,g=void 0,y={}){let E=y.encode||ty,w=y.decode||ty,R=WL(g),d=R.set;R.set=a=>{typeof a>"u"?delete ys[f]:ys[f]=E(a),d(a)};function x(a){a.key===f?a.newValue===null?d(void 0):d(w(a.newValue)):ys[f]||d(void 0)}function t(){R.set(ys[f]?w(ys[f]):g)}return $L(R,()=>{if(t(),y.listen!==!1)return xc.addEventListener(f,x,t),()=>{xc.removeEventListener(f,x,t)}}),R}const kL=ZL("score",{wpm:0,score:0},{encode(f){return JSON.stringify(f)},decode(f){try{const g=JSON.parse(f);return typeof g.wpm=="number"&&typeof g.score=="number"?g:(console.error("Decoded value does not match ScoreEntry structure, returning default value."),{wpm:0,score:0})}catch(g){return console.error("Error parsing value, returning default value.",g),{wpm:0,score:0}}}});class rF extends hr.GameObjects.Sprite{}class QL extends es.Scene{constructor(){super({key:"TownScene"})}create(){const g=kL.get(),y=this.make.tilemap({key:"cloud-city-map"});y.addTilesetImage("Cloud City","tiles");for(let R=0;R=2&&d.x<=5&&d.y>=10&&d.y<=14}function E(d){return d.x>=2&&d.x<=5&&d.y>=2&&d.y<=5}function w(d){return d.x>=13&&d.x<=13&&d.y>=6&&d.y<=7}function R(d){return d.x>=7&&d.x<=10&&d.y>=9&&d.y<=10}if(this.input.keyboard&&this.input.keyboard.addKey("F").isDown){const d=this.gridEngine.getPosition("player");y(d)&&this.scene.start("FishChipScene"),E(d)&&this.scene.start("CreditsScene"),w(d)&&console.log("Enter the Building?"),R(d)&&console.log("Samson Statue!")}g&&g.left.isDown||this.input.keyboard&&this.input.keyboard.addKey("A").isDown?this.gridEngine.move("player","left"):g&&g.right.isDown||this.input.keyboard&&this.input.keyboard.addKey("D").isDown?this.gridEngine.move("player","right"):g&&g.up.isDown||this.input.keyboard&&this.input.keyboard.addKey("W").isDown?this.gridEngine.move("player","up"):(g&&g.down.isDown||this.input.keyboard&&this.input.keyboard.addKey("S").isDown)&&this.gridEngine.move("player","down"),this.npcSprite&&this.npcSprite.textBubble&&this.updateTextBubblePosition(this.npcSprite),this.fishNpcSprite&&this.fishNpcSprite.textBubble&&this.updateTextBubblePosition(this.fishNpcSprite)}}const JL=zx.div` + // Your style here +`;function qL(){const f=Ei.useRef(null);return Ei.useEffect(()=>{if(f.current){const g=f.current,E={...{title:"TownEngine",render:{antialias:!1},scale:{mode:hr.Scale.RESIZE,min:{width:1024,height:768},max:{width:1600,height:1200},zoom:1},type:hr.AUTO,transparent:!0,width:800,height:600,physics:{default:"arcade",arcade:{gravity:{x:0,y:0},debug:!1}},plugins:{scene:[{key:"gridEngine",plugin:NL,mapping:"gridEngine"}]},scene:[VL,QL,zL,bL,UL,GL],input:{mouse:{preventDefaultWheel:!1},touch:{capture:!1}}},parent:g},w=new hr.Game(E);return()=>{w.destroy(!0)}}},[]),yn.jsx(JL,{children:yn.jsx("div",{ref:f})})}const _L=zx.div` + // Your style here +`;function tF(){return yn.jsx(_L,{children:yn.jsx(qL,{})})}const eF=()=>yn.jsxs(Sx,{children:[yn.jsx(g5,{children:yn.jsx("title",{children:"Fish and Chip Adventures"})}),yn.jsx(tF,{})]}),iF=vx(document.getElementById("fishchip"));iF.render(yn.jsx(Ei.StrictMode,{children:yn.jsx(eF,{})})); diff --git a/docs/embed/js/fishchip/index.html b/docs/embed/js/fishchip/index.html new file mode 100644 index 0000000000..a03837b93f --- /dev/null +++ b/docs/embed/js/fishchip/index.html @@ -0,0 +1,15 @@ + + + + + + + + + + + + +
+ + diff --git a/docs/embed/js/travelbox/favicon.ico b/docs/embed/js/travelbox/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..317ebcb2336e0833a22dddf0ab287849f26fda57 GIT binary patch literal 15086 zcmeI332;U^%p|z7g|#(P)qFEA@4f!_@qOK2 z_lJl}!lhL!VT_U|uN7%8B2iKH??xhDa;*`g{yjTFWHvXn;2s{4R7kH|pKGdy(7z!K zgftM+Ku7~24TLlh(!g)gz|foI94G^t2^IO$uvX$3(OR0<_5L2sB)lMAMy|+`xodJ{ z_Uh_1m)~h?a;2W{dmhM;u!YGo=)OdmId_B<%^V^{ovI@y`7^g1_V9G}*f# zNzAtvou}I!W1#{M^@ROc(BZ! z+F!!_aR&Px3_reO(EW+TwlW~tv*2zr?iP7(d~a~yA|@*a89IUke+c472NXM0wiX{- zl`UrZC^1XYyf%1u)-Y)jj9;MZ!SLfd2Hl?o|80Su%Z?To_=^g_Jt0oa#CT*tjx>BI z16wec&AOWNK<#i0Qd=1O$fymLRoUR*%;h@*@v7}wApDl^w*h}!sYq%kw+DKDY)@&A z@9$ULEB3qkR#85`lb8#WZw=@})#kQig9oqy^I$dj&k4jU&^2(M3q{n1AKeGUKPFbr z1^<)aH;VsG@J|B&l>UtU#Ejv3GIqERzYgL@UOAWtW<{p#zy`WyJgpCy8$c_e%wYJL zyGHRRx38)HyjU3y{-4z6)pzb>&Q1pR)B&u01F-|&Gx4EZWK$nkUkOI|(D4UHOXg_- zw{OBf!oWQUn)Pe(=f=nt=zkmdjpO^o8ZZ9o_|4tW1ni+Un9iCW47*-ut$KQOww!;u z`0q)$s6IZO!~9$e_P9X!hqLxu`fpcL|2f^I5d4*a@Dq28;@2271v_N+5HqYZ>x;&O z05*7JT)mUe&%S0@UD)@&8SmQrMtsDfZT;fkdA!r(S=}Oz>iP)w=W508=Rc#nNn7ym z1;42c|8($ALY8#a({%1#IXbWn9-Y|0eDY$_L&j{63?{?AH{);EzcqfydD$@-B`Y3<%IIj7S7rK_N}je^=dEk%JQ4c z!tBdTPE3Tse;oYF>cnrapWq*o)m47X1`~6@(!Y29#>-#8zm&LXrXa(3=7Z)ElaQqj z-#0JJy3Fi(C#Rx(`=VXtJ63E2_bZGCz+QRa{W0e2(m3sI?LOcUBx)~^YCqZ{XEPX)C>G>U4tfqeH8L(3|pQR*zbL1 zT9e~4Tb5p9_G}$y4t`i*4t_Mr9QYvL9C&Ah*}t`q*}S+VYh0M6GxTTSXI)hMpMpIq zD1ImYqJLzbj0}~EpE-aH#VCH_udYEW#`P2zYmi&xSPs_{n6tBj=MY|-XrA;SGA_>y zGtU$?HXm$gYj*!N)_nQ59%lQdXtQZS3*#PC-{iB_sm+ytD*7j`D*k(P&IH2GHT}Eh z5697eQECVIGQAUe#eU2I!yI&%0CP#>%6MWV z@zS!p@+Y1i1b^QuuEF*13CuB zu69dve5k7&Wgb+^s|UB08Dr3u`h@yM0NTj4h7MnHo-4@xmyr7(*4$rpPwsCDZ@2be zRz9V^GnV;;?^Lk%ynzq&K(Aix`mWmW`^152Hoy$CTYVehpD-S1-W^#k#{0^L`V6CN+E z!w+xte;2vu4AmVNEFUOBmrBL>6MK@!O2*N|2=d|Y;oN&A&qv=qKn73lDD zI(+oJAdgv>Yr}8(&@ZuAZE%XUXmX(U!N+Z_sjL<1vjy1R+1IeHt`79fnYdOL{$ci7 z%3f0A*;Zt@ED&Gjm|OFTYBDe%bbo*xXAQsFz+Q`fVBH!N2)kaxN8P$c>sp~QXnv>b zwq=W3&Mtmih7xkR$YA)1Yi?avHNR6C99!u6fh=cL|KQ&PwF!n@ud^n(HNIImHD!h87!i*t?G|p0o+eelJ?B@A64_9%SBhNaJ64EvKgD&%LjLCYnNfc; znj?%*p@*?dq#NqcQFmmX($wms@CSAr9#>hUR^=I+=0B)vvGX%T&#h$kmX*s=^M2E!@N9#m?LhMvz}YB+kd zG~mbP|D(;{s_#;hsKK9lbVK&Lo734x7SIFJ9V_}2$@q?zm^7?*XH94w5Qae{7zOMUF z^?%F%)c1Y)Q?Iy?I>knw*8gYW#ok|2gdS=YYZLiD=CW|Nj;n^x!=S#iJ#`~Ld79+xXpVmUK^B(xO_vO!btA9y7w3L3-0j-y4 z?M-V{%z;JI`bk7yFDcP}OcCd*{Q9S5$iGA7*E1@tfkyjAi!;wP^O71cZ^Ep)qrQ)N z#wqw0_HS;T7x3y|`P==i3hEwK%|>fZ)c&@kgKO1~5<5xBSk?iZV?KI6&i72H6S9A* z=U(*e)EqEs?Oc04)V-~K5AUmh|62H4*`UAtItO$O(q5?6jj+K^oD!04r=6#dsxp?~}{`?&sXn#q2 zGuY~7>O2=!u@@Kfu7q=W*4egu@qPMRM>(eyYyaIE<|j%d=iWNdGsx%c!902v#ngNg z@#U-O_4xN$s_9?(`{>{>7~-6FgWpBpqXb`Ydc3OFL#&I}Irse9F_8R@4zSS*Y*o*B zXL?6*Aw!AfkNCgcr#*yj&p3ZDe2y>v$>FUdKIy_2N~}6AbHc7gA3`6$g@1o|dE>vz z4pl(j9;kyMsjaw}lO?(?Xg%4k!5%^t#@5n=WVc&JRa+XT$~#@rldvN3S1rEpU$;XgxVny7mki3 z-Hh|jUCHrUXuLr!)`w>wgO0N%KTB-1di>cj(x3Bav`7v z3G7EIbU$z>`Nad7Rk_&OT-W{;qg)-GXV-aJT#(ozdmnA~Rq3GQ_3mby(>q6Ocb-RgTUhTN)))x>m&eD;$J5Bg zo&DhY36Yg=J=$Z>t}RJ>o|@hAcwWzN#r(WJ52^g$lh^!63@hh+dR$&_dEGu&^CR*< z!oFqSqO@>xZ*nC2oiOd0eS*F^IL~W-rsrO`J`ej{=ou_q^_(<$&-3f^J z&L^MSYWIe{&pYq&9eGaArA~*kA + + + + ReactPhaserTravelbox + + + + + + + + +
+ + diff --git a/docs/embed/js/travelbox/travelbox.js b/docs/embed/js/travelbox/travelbox.js new file mode 100644 index 0000000000..450165076c --- /dev/null +++ b/docs/embed/js/travelbox/travelbox.js @@ -0,0 +1,470 @@ +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?o.credentials="include":l.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(l){if(l.ep)return;l.ep=!0;const o=n(l);fetch(l.href,o)}})();function Ca(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ea={exports:{}},Hl={},_a={exports:{}},U={};/** + * @license React + * react.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 $r=Symbol.for("react.element"),ed=Symbol.for("react.portal"),td=Symbol.for("react.fragment"),nd=Symbol.for("react.strict_mode"),rd=Symbol.for("react.profiler"),ld=Symbol.for("react.provider"),od=Symbol.for("react.context"),id=Symbol.for("react.forward_ref"),ud=Symbol.for("react.suspense"),sd=Symbol.for("react.memo"),ad=Symbol.for("react.lazy"),rs=Symbol.iterator;function cd(e){return e===null||typeof e!="object"?null:(e=rs&&e[rs]||e["@@iterator"],typeof e=="function"?e:null)}var ja={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},za=Object.assign,Pa={};function Bn(e,t,n){this.props=e,this.context=t,this.refs=Pa,this.updater=n||ja}Bn.prototype.isReactComponent={};Bn.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Bn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Na(){}Na.prototype=Bn.prototype;function eu(e,t,n){this.props=e,this.context=t,this.refs=Pa,this.updater=n||ja}var tu=eu.prototype=new Na;tu.constructor=eu;za(tu,Bn.prototype);tu.isPureReactComponent=!0;var ls=Array.isArray,La=Object.prototype.hasOwnProperty,nu={current:null},Ta={key:!0,ref:!0,__self:!0,__source:!0};function $a(e,t,n){var r,l={},o=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)La.call(t,r)&&!Ta.hasOwnProperty(r)&&(l[r]=t[r]);var u=arguments.length-2;if(u===1)l.children=n;else if(1>>1,j=E[J];if(0>>1;Jl(O,A))hl(B,O)?(E[J]=B,E[h]=A,J=h):(E[J]=O,E[L]=A,J=L);else if(hl(B,A))E[J]=B,E[h]=A,J=h;else break e}}return M}function l(E,M){var A=E.sortIndex-M.sortIndex;return A!==0?A:E.id-M.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,u=i.now();e.unstable_now=function(){return i.now()-u}}var s=[],c=[],g=1,m=null,p=3,S=!1,w=!1,k=!1,R=typeof setTimeout=="function"?setTimeout:null,f=typeof clearTimeout=="function"?clearTimeout:null,a=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(E){for(var M=n(c);M!==null;){if(M.callback===null)r(c);else if(M.startTime<=E)r(c),M.sortIndex=M.expirationTime,t(s,M);else break;M=n(c)}}function y(E){if(k=!1,d(E),!w)if(n(s)!==null)w=!0,vt(C);else{var M=n(c);M!==null&&Le(y,M.startTime-E)}}function C(E,M){w=!1,k&&(k=!1,f(N),N=-1),S=!0;var A=p;try{for(d(M),m=n(s);m!==null&&(!(m.expirationTime>M)||E&&!pe());){var J=m.callback;if(typeof J=="function"){m.callback=null,p=m.priorityLevel;var j=J(m.expirationTime<=M);M=e.unstable_now(),typeof j=="function"?m.callback=j:m===n(s)&&r(s),d(M)}else r(s);m=n(s)}if(m!==null)var z=!0;else{var L=n(c);L!==null&&Le(y,L.startTime-M),z=!1}return z}finally{m=null,p=A,S=!1}}var P=!1,$=null,N=-1,H=5,I=-1;function pe(){return!(e.unstable_now()-IE||125J?(E.sortIndex=A,t(c,E),n(s)===null&&E===n(c)&&(k?(f(N),N=-1):k=!0,Le(y,A-J))):(E.sortIndex=j,t(s,E),w||S||(w=!0,vt(C))),E},e.unstable_shouldYield=pe,e.unstable_wrapCallback=function(E){var M=p;return function(){var A=p;p=M;try{return E.apply(this,arguments)}finally{p=A}}}})(Oa);Aa.exports=Oa;var xd=Aa.exports;/** + * @license React + * react-dom.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 Ia=Qt,Qe=xd;function x(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ri=Object.prototype.hasOwnProperty,Sd=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,is={},us={};function Cd(e){return ri.call(us,e)?!0:ri.call(is,e)?!1:Sd.test(e)?us[e]=!0:(is[e]=!0,!1)}function Ed(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function _d(e,t,n,r){if(t===null||typeof t>"u"||Ed(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Me(e,t,n,r,l,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var Ce={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ce[e]=new Me(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ce[t]=new Me(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ce[e]=new Me(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ce[e]=new Me(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ce[e]=new Me(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ce[e]=new Me(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ce[e]=new Me(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ce[e]=new Me(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ce[e]=new Me(e,5,!1,e.toLowerCase(),null,!1,!1)});var lu=/[\-:]([a-z])/g;function ou(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(lu,ou);Ce[t]=new Me(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(lu,ou);Ce[t]=new Me(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(lu,ou);Ce[t]=new Me(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ce[e]=new Me(e,1,!1,e.toLowerCase(),null,!1,!1)});Ce.xlinkHref=new Me("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ce[e]=new Me(e,1,!1,e.toLowerCase(),null,!0,!0)});function iu(e,t,n,r){var l=Ce.hasOwnProperty(t)?Ce[t]:null;(l!==null?l.type!==0:r||!(2u||l[i]!==o[u]){var s=` +`+l[i].replace(" at new "," at ");return e.displayName&&s.includes("")&&(s=s.replace("",e.displayName)),s}while(1<=i&&0<=u);break}}}finally{To=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?er(e):""}function jd(e){switch(e.tag){case 5:return er(e.type);case 16:return er("Lazy");case 13:return er("Suspense");case 19:return er("SuspenseList");case 0:case 2:case 15:return e=$o(e.type,!1),e;case 11:return e=$o(e.type.render,!1),e;case 1:return e=$o(e.type,!0),e;default:return""}}function ui(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case hn:return"Fragment";case pn:return"Portal";case li:return"Profiler";case uu:return"StrictMode";case oi:return"Suspense";case ii:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Ua:return(e.displayName||"Context")+".Consumer";case Fa:return(e._context.displayName||"Context")+".Provider";case su:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case au:return t=e.displayName||null,t!==null?t:ui(e.type)||"Memo";case Lt:t=e._payload,e=e._init;try{return ui(e(t))}catch{}}return null}function zd(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ui(t);case 8:return t===uu?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Yt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Va(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Pd(e){var t=Va(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(i){r=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Br(e){e._valueTracker||(e._valueTracker=Pd(e))}function Ha(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Va(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function gl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function si(e,t){var n=t.checked;return le({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function as(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Yt(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Wa(e,t){t=t.checked,t!=null&&iu(e,"checked",t,!1)}function ai(e,t){Wa(e,t);var n=Yt(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ci(e,t.type,n):t.hasOwnProperty("defaultValue")&&ci(e,t.type,Yt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function cs(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function ci(e,t,n){(t!=="number"||gl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var tr=Array.isArray;function jn(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=Vr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function mr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var lr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Nd=["Webkit","ms","Moz","O"];Object.keys(lr).forEach(function(e){Nd.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),lr[t]=lr[e]})});function Ka(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||lr.hasOwnProperty(e)&&lr[e]?(""+t).trim():t+"px"}function Xa(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=Ka(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var Ld=le({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function pi(e,t){if(t){if(Ld[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(x(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(x(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(x(61))}if(t.style!=null&&typeof t.style!="object")throw Error(x(62))}}function hi(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var mi=null;function cu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var vi=null,zn=null,Pn=null;function ps(e){if(e=Ar(e)){if(typeof vi!="function")throw Error(x(280));var t=e.stateNode;t&&(t=Xl(t),vi(e.stateNode,e.type,t))}}function Za(e){zn?Pn?Pn.push(e):Pn=[e]:zn=e}function Ja(){if(zn){var e=zn,t=Pn;if(Pn=zn=null,ps(e),t)for(e=0;e>>=0,e===0?32:31-(Bd(e)/Vd|0)|0}var Hr=64,Wr=4194304;function nr(e){switch(e&-e){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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function xl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,o=e.pingedLanes,i=n&268435455;if(i!==0){var u=i&~l;u!==0?r=nr(u):(o&=i,o!==0&&(r=nr(o)))}else i=n&~l,i!==0?r=nr(i):o!==0&&(r=nr(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&l)&&(l=r&-r,o=t&-t,l>=o||l===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Rr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ut(t),e[t]=n}function Yd(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=ir),Ss=String.fromCharCode(32),Cs=!1;function gc(e,t){switch(e){case"keyup":return kp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function yc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var mn=!1;function Sp(e,t){switch(e){case"compositionend":return yc(t);case"keypress":return t.which!==32?null:(Cs=!0,Ss);case"textInput":return e=t.data,e===Ss&&Cs?null:e;default:return null}}function Cp(e,t){if(mn)return e==="compositionend"||!yu&&gc(e,t)?(e=mc(),ul=mu=Mt=null,mn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=zs(n)}}function Sc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Sc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Cc(){for(var e=window,t=gl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=gl(e.document)}return t}function wu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function $p(e){var t=Cc(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Sc(n.ownerDocument.documentElement,n)){if(r!==null&&wu(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=n.textContent.length,o=Math.min(r.start,l);r=r.end===void 0?o:Math.min(r.end,l),!e.extend&&o>r&&(l=r,r=o,o=l),l=Ps(n,o);var i=Ps(n,r);l&&i&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,vn=null,Si=null,sr=null,Ci=!1;function Ns(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ci||vn==null||vn!==gl(r)||(r=vn,"selectionStart"in r&&wu(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),sr&&xr(sr,r)||(sr=r,r=El(Si,"onSelect"),0wn||(e.current=Ni[wn],Ni[wn]=null,wn--)}function q(e,t){wn++,Ni[wn]=e.current,e.current=t}var Gt={},Ne=Xt(Gt),De=Xt(!1),ln=Gt;function Rn(e,t){var n=e.type.contextTypes;if(!n)return Gt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},o;for(o in n)l[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function Fe(e){return e=e.childContextTypes,e!=null}function jl(){ee(De),ee(Ne)}function Os(e,t,n){if(Ne.current!==Gt)throw Error(x(168));q(Ne,t),q(De,n)}function $c(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(x(108,zd(e)||"Unknown",l));return le({},n,r)}function zl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Gt,ln=Ne.current,q(Ne,e),q(De,De.current),!0}function Is(e,t,n){var r=e.stateNode;if(!r)throw Error(x(169));n?(e=$c(e,t,ln),r.__reactInternalMemoizedMergedChildContext=e,ee(De),ee(Ne),q(Ne,e)):ee(De),q(De,n)}var yt=null,Zl=!1,Yo=!1;function Rc(e){yt===null?yt=[e]:yt.push(e)}function Wp(e){Zl=!0,Rc(e)}function Zt(){if(!Yo&&yt!==null){Yo=!0;var e=0,t=K;try{var n=yt;for(K=1;e>=i,l-=i,wt=1<<32-ut(t)+l|n<N?(H=$,$=null):H=$.sibling;var I=p(f,$,d[N],y);if(I===null){$===null&&($=H);break}e&&$&&I.alternate===null&&t(f,$),a=o(I,a,N),P===null?C=I:P.sibling=I,P=I,$=H}if(N===d.length)return n(f,$),te&&Jt(f,N),C;if($===null){for(;NN?(H=$,$=null):H=$.sibling;var pe=p(f,$,I.value,y);if(pe===null){$===null&&($=H);break}e&&$&&pe.alternate===null&&t(f,$),a=o(pe,a,N),P===null?C=pe:P.sibling=pe,P=pe,$=H}if(I.done)return n(f,$),te&&Jt(f,N),C;if($===null){for(;!I.done;N++,I=d.next())I=m(f,I.value,y),I!==null&&(a=o(I,a,N),P===null?C=I:P.sibling=I,P=I);return te&&Jt(f,N),C}for($=r(f,$);!I.done;N++,I=d.next())I=S($,f,N,I.value,y),I!==null&&(e&&I.alternate!==null&&$.delete(I.key===null?N:I.key),a=o(I,a,N),P===null?C=I:P.sibling=I,P=I);return e&&$.forEach(function(ce){return t(f,ce)}),te&&Jt(f,N),C}function R(f,a,d,y){if(typeof d=="object"&&d!==null&&d.type===hn&&d.key===null&&(d=d.props.children),typeof d=="object"&&d!==null){switch(d.$$typeof){case Ur:e:{for(var C=d.key,P=a;P!==null;){if(P.key===C){if(C=d.type,C===hn){if(P.tag===7){n(f,P.sibling),a=l(P,d.props.children),a.return=f,f=a;break e}}else if(P.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Lt&&Ws(C)===P.type){n(f,P.sibling),a=l(P,d.props),a.ref=Jn(f,P,d),a.return=f,f=a;break e}n(f,P);break}else t(f,P);P=P.sibling}d.type===hn?(a=rn(d.props.children,f.mode,y,d.key),a.return=f,f=a):(y=ml(d.type,d.key,d.props,null,f.mode,y),y.ref=Jn(f,a,d),y.return=f,f=y)}return i(f);case pn:e:{for(P=d.key;a!==null;){if(a.key===P)if(a.tag===4&&a.stateNode.containerInfo===d.containerInfo&&a.stateNode.implementation===d.implementation){n(f,a.sibling),a=l(a,d.children||[]),a.return=f,f=a;break e}else{n(f,a);break}else t(f,a);a=a.sibling}a=ei(d,f.mode,y),a.return=f,f=a}return i(f);case Lt:return P=d._init,R(f,a,P(d._payload),y)}if(tr(d))return w(f,a,d,y);if(Yn(d))return k(f,a,d,y);Jr(f,d)}return typeof d=="string"&&d!==""||typeof d=="number"?(d=""+d,a!==null&&a.tag===6?(n(f,a.sibling),a=l(a,d),a.return=f,f=a):(n(f,a),a=bo(d,f.mode,y),a.return=f,f=a),i(f)):n(f,a)}return R}var An=Bc(!0),Vc=Bc(!1),Or={},mt=Xt(Or),_r=Xt(Or),jr=Xt(Or);function tn(e){if(e===Or)throw Error(x(174));return e}function Pu(e,t){switch(q(jr,t),q(_r,e),q(mt,Or),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:di(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=di(t,e)}ee(mt),q(mt,t)}function On(){ee(mt),ee(_r),ee(jr)}function Hc(e){tn(jr.current);var t=tn(mt.current),n=di(t,e.type);t!==n&&(q(_r,e),q(mt,n))}function Nu(e){_r.current===e&&(ee(mt),ee(_r))}var ne=Xt(0);function Rl(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Go=[];function Lu(){for(var e=0;en?n:4,e(!0);var r=Ko.transition;Ko.transition={};try{e(!1),t()}finally{K=n,Ko.transition=r}}function of(){return et().memoizedState}function Kp(e,t,n){var r=Vt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},uf(e))sf(t,n);else if(n=Ic(e,t,n,r),n!==null){var l=$e();st(n,e,r,l),af(n,t,r)}}function Xp(e,t,n){var r=Vt(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(uf(e))sf(t,l);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,u=o(i,n);if(l.hasEagerState=!0,l.eagerState=u,at(u,i)){var s=t.interleaved;s===null?(l.next=l,ju(t)):(l.next=s.next,s.next=l),t.interleaved=l;return}}catch{}finally{}n=Ic(e,t,l,r),n!==null&&(l=$e(),st(n,e,r,l),af(n,t,r))}}function uf(e){var t=e.alternate;return e===re||t!==null&&t===re}function sf(e,t){ar=Ml=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function af(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,du(e,n)}}var Al={readContext:be,useCallback:je,useContext:je,useEffect:je,useImperativeHandle:je,useInsertionEffect:je,useLayoutEffect:je,useMemo:je,useReducer:je,useRef:je,useState:je,useDebugValue:je,useDeferredValue:je,useTransition:je,useMutableSource:je,useSyncExternalStore:je,useId:je,unstable_isNewReconciler:!1},Zp={readContext:be,useCallback:function(e,t){return ft().memoizedState=[e,t===void 0?null:t],e},useContext:be,useEffect:Ys,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,fl(4194308,4,ef.bind(null,t,e),n)},useLayoutEffect:function(e,t){return fl(4194308,4,e,t)},useInsertionEffect:function(e,t){return fl(4,2,e,t)},useMemo:function(e,t){var n=ft();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ft();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Kp.bind(null,re,e),[r.memoizedState,e]},useRef:function(e){var t=ft();return e={current:e},t.memoizedState=e},useState:Qs,useDebugValue:Au,useDeferredValue:function(e){return ft().memoizedState=e},useTransition:function(){var e=Qs(!1),t=e[0];return e=Gp.bind(null,e[1]),ft().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=re,l=ft();if(te){if(n===void 0)throw Error(x(407));n=n()}else{if(n=t(),me===null)throw Error(x(349));un&30||Yc(r,t,n)}l.memoizedState=n;var o={value:n,getSnapshot:t};return l.queue=o,Ys(Kc.bind(null,r,o,e),[e]),r.flags|=2048,Nr(9,Gc.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=ft(),t=me.identifierPrefix;if(te){var n=kt,r=wt;n=(r&~(1<<32-ut(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=zr++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[pt]=t,e[Er]=r,yf(e,t,!1,!1),t.stateNode=e;e:{switch(i=hi(n,r),n){case"dialog":b("cancel",e),b("close",e),l=r;break;case"iframe":case"object":case"embed":b("load",e),l=r;break;case"video":case"audio":for(l=0;lDn&&(t.flags|=128,r=!0,qn(o,!1),t.lanes=4194304)}else{if(!r)if(e=Rl(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),qn(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!te)return ze(t),null}else 2*se()-o.renderingStartTime>Dn&&n!==1073741824&&(t.flags|=128,r=!0,qn(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(n=o.last,n!==null?n.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=se(),t.sibling=null,n=ne.current,q(ne,r?n&1|2:n&1),t):(ze(t),null);case 22:case 23:return Bu(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ve&1073741824&&(ze(t),t.subtreeFlags&6&&(t.flags|=8192)):ze(t),null;case 24:return null;case 25:return null}throw Error(x(156,t.tag))}function l0(e,t){switch(xu(t),t.tag){case 1:return Fe(t.type)&&jl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return On(),ee(De),ee(Ne),Lu(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Nu(t),null;case 13:if(ee(ne),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(x(340));Mn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ee(ne),null;case 4:return On(),null;case 10:return _u(t.type._context),null;case 22:case 23:return Bu(),null;case 24:return null;default:return null}}var br=!1,Pe=!1,o0=typeof WeakSet=="function"?WeakSet:Set,T=null;function Cn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ie(e,t,r)}else n.current=null}function Bi(e,t,n){try{n()}catch(r){ie(e,t,r)}}var ta=!1;function i0(e,t){if(Ei=Sl,e=Cc(),wu(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var i=0,u=-1,s=-1,c=0,g=0,m=e,p=null;t:for(;;){for(var S;m!==n||l!==0&&m.nodeType!==3||(u=i+l),m!==o||r!==0&&m.nodeType!==3||(s=i+r),m.nodeType===3&&(i+=m.nodeValue.length),(S=m.firstChild)!==null;)p=m,m=S;for(;;){if(m===e)break t;if(p===n&&++c===l&&(u=i),p===o&&++g===r&&(s=i),(S=m.nextSibling)!==null)break;m=p,p=m.parentNode}m=S}n=u===-1||s===-1?null:{start:u,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(_i={focusedElem:e,selectionRange:n},Sl=!1,T=t;T!==null;)if(t=T,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,T=e;else for(;T!==null;){t=T;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var k=w.memoizedProps,R=w.memoizedState,f=t.stateNode,a=f.getSnapshotBeforeUpdate(t.elementType===t.type?k:lt(t.type,k),R);f.__reactInternalSnapshotBeforeUpdate=a}break;case 3:var d=t.stateNode.containerInfo;d.nodeType===1?d.textContent="":d.nodeType===9&&d.documentElement&&d.removeChild(d.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(x(163))}}catch(y){ie(t,t.return,y)}if(e=t.sibling,e!==null){e.return=t.return,T=e;break}T=t.return}return w=ta,ta=!1,w}function cr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var o=l.destroy;l.destroy=void 0,o!==void 0&&Bi(t,n,o)}l=l.next}while(l!==r)}}function bl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Vi(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function xf(e){var t=e.alternate;t!==null&&(e.alternate=null,xf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[pt],delete t[Er],delete t[Pi],delete t[Vp],delete t[Hp])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Sf(e){return e.tag===5||e.tag===3||e.tag===4}function na(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Sf(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Hi(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=_l));else if(r!==4&&(e=e.child,e!==null))for(Hi(e,t,n),e=e.sibling;e!==null;)Hi(e,t,n),e=e.sibling}function Wi(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Wi(e,t,n),e=e.sibling;e!==null;)Wi(e,t,n),e=e.sibling}var xe=null,ot=!1;function Nt(e,t,n){for(n=n.child;n!==null;)Cf(e,t,n),n=n.sibling}function Cf(e,t,n){if(ht&&typeof ht.onCommitFiberUnmount=="function")try{ht.onCommitFiberUnmount(Ql,n)}catch{}switch(n.tag){case 5:Pe||Cn(n,t);case 6:var r=xe,l=ot;xe=null,Nt(e,t,n),xe=r,ot=l,xe!==null&&(ot?(e=xe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):xe.removeChild(n.stateNode));break;case 18:xe!==null&&(ot?(e=xe,n=n.stateNode,e.nodeType===8?Qo(e.parentNode,n):e.nodeType===1&&Qo(e,n),wr(e)):Qo(xe,n.stateNode));break;case 4:r=xe,l=ot,xe=n.stateNode.containerInfo,ot=!0,Nt(e,t,n),xe=r,ot=l;break;case 0:case 11:case 14:case 15:if(!Pe&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var o=l,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&Bi(n,t,i),l=l.next}while(l!==r)}Nt(e,t,n);break;case 1:if(!Pe&&(Cn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){ie(n,t,u)}Nt(e,t,n);break;case 21:Nt(e,t,n);break;case 22:n.mode&1?(Pe=(r=Pe)||n.memoizedState!==null,Nt(e,t,n),Pe=r):Nt(e,t,n);break;default:Nt(e,t,n)}}function ra(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new o0),t.forEach(function(r){var l=m0.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function rt(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=i),r&=~o}if(r=l,r=se()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*s0(r/1960))-r,10e?16:e,At===null)var r=!1;else{if(e=At,At=null,Dl=0,V&6)throw Error(x(331));var l=V;for(V|=4,T=e.current;T!==null;){var o=T,i=o.child;if(T.flags&16){var u=o.deletions;if(u!==null){for(var s=0;sse()-Fu?nn(e,0):Du|=n),Ue(e,t)}function Tf(e,t){t===0&&(e.mode&1?(t=Wr,Wr<<=1,!(Wr&130023424)&&(Wr=4194304)):t=1);var n=$e();e=_t(e,t),e!==null&&(Rr(e,t,n),Ue(e,n))}function h0(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Tf(e,n)}function m0(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(x(314))}r!==null&&r.delete(t),Tf(e,n)}var $f;$f=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||De.current)Ie=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ie=!1,n0(e,t,n);Ie=!!(e.flags&131072)}else Ie=!1,te&&t.flags&1048576&&Mc(t,Nl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;dl(e,t),e=t.pendingProps;var l=Rn(t,Ne.current);Ln(t,n),l=$u(null,t,r,e,l,n);var o=Ru();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Fe(r)?(o=!0,zl(t)):o=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,zu(t),l.updater=Jl,t.stateNode=l,l._reactInternals=t,Mi(t,r,e,n),t=Ii(null,t,r,!0,o,n)):(t.tag=0,te&&o&&ku(t),Te(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(dl(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=g0(r),e=lt(r,e),l){case 0:t=Oi(null,t,r,e,n);break e;case 1:t=qs(null,t,r,e,n);break e;case 11:t=Zs(null,t,r,e,n);break e;case 14:t=Js(null,t,r,lt(r.type,e),n);break e}throw Error(x(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:lt(r,l),Oi(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:lt(r,l),qs(e,t,r,l,n);case 3:e:{if(mf(t),e===null)throw Error(x(387));r=t.pendingProps,o=t.memoizedState,l=o.element,Dc(e,t),$l(t,r,null,n);var i=t.memoizedState;if(r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){l=In(Error(x(423)),t),t=bs(e,t,r,n,l);break e}else if(r!==l){l=In(Error(x(424)),t),t=bs(e,t,r,n,l);break e}else for(He=Ft(t.stateNode.containerInfo.firstChild),We=t,te=!0,it=null,n=Vc(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Mn(),r===l){t=jt(e,t,n);break e}Te(e,t,r,n)}t=t.child}return t;case 5:return Hc(t),e===null&&Ti(t),r=t.type,l=t.pendingProps,o=e!==null?e.memoizedProps:null,i=l.children,ji(r,l)?i=null:o!==null&&ji(r,o)&&(t.flags|=32),hf(e,t),Te(e,t,i,n),t.child;case 6:return e===null&&Ti(t),null;case 13:return vf(e,t,n);case 4:return Pu(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=An(t,null,r,n):Te(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:lt(r,l),Zs(e,t,r,l,n);case 7:return Te(e,t,t.pendingProps,n),t.child;case 8:return Te(e,t,t.pendingProps.children,n),t.child;case 12:return Te(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,o=t.memoizedProps,i=l.value,q(Ll,r._currentValue),r._currentValue=i,o!==null)if(at(o.value,i)){if(o.children===l.children&&!De.current){t=jt(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var u=o.dependencies;if(u!==null){i=o.child;for(var s=u.firstContext;s!==null;){if(s.context===r){if(o.tag===1){s=St(-1,n&-n),s.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var g=c.pending;g===null?s.next=s:(s.next=g.next,g.next=s),c.pending=s}}o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),$i(o.return,n,t),u.lanes|=n;break}s=s.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(x(341));i.lanes|=n,u=i.alternate,u!==null&&(u.lanes|=n),$i(i,n,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}Te(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,Ln(t,n),l=be(l),r=r(l),t.flags|=1,Te(e,t,r,n),t.child;case 14:return r=t.type,l=lt(r,t.pendingProps),l=lt(r.type,l),Js(e,t,r,l,n);case 15:return df(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:lt(r,l),dl(e,t),t.tag=1,Fe(r)?(e=!0,zl(t)):e=!1,Ln(t,n),Uc(t,r,l),Mi(t,r,l,n),Ii(null,t,r,!0,e,n);case 19:return gf(e,t,n);case 22:return pf(e,t,n)}throw Error(x(156,t.tag))};function Rf(e,t){return lc(e,t)}function v0(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Je(e,t,n,r){return new v0(e,t,n,r)}function Hu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function g0(e){if(typeof e=="function")return Hu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===su)return 11;if(e===au)return 14}return 2}function Ht(e,t){var n=e.alternate;return n===null?(n=Je(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ml(e,t,n,r,l,o){var i=2;if(r=e,typeof e=="function")Hu(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case hn:return rn(n.children,l,o,t);case uu:i=8,l|=8;break;case li:return e=Je(12,n,t,l|2),e.elementType=li,e.lanes=o,e;case oi:return e=Je(13,n,t,l),e.elementType=oi,e.lanes=o,e;case ii:return e=Je(19,n,t,l),e.elementType=ii,e.lanes=o,e;case Ba:return to(n,l,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Fa:i=10;break e;case Ua:i=9;break e;case su:i=11;break e;case au:i=14;break e;case Lt:i=16,r=null;break e}throw Error(x(130,e==null?e:typeof e,""))}return t=Je(i,n,t,l),t.elementType=e,t.type=r,t.lanes=o,t}function rn(e,t,n,r){return e=Je(7,e,r,t),e.lanes=n,e}function to(e,t,n,r){return e=Je(22,e,r,t),e.elementType=Ba,e.lanes=n,e.stateNode={isHidden:!1},e}function bo(e,t,n){return e=Je(6,e,null,t),e.lanes=n,e}function ei(e,t,n){return t=Je(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function y0(e,t,n,r,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Mo(0),this.expirationTimes=Mo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Mo(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Wu(e,t,n,r,l,o,i,u,s){return e=new y0(e,t,n,u,s),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Je(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},zu(o),e}function w0(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(If)}catch(e){console.error(e)}}If(),Ma.exports=Ye;var E0=Ma.exports,Df,fa=E0;Df=fa.createRoot,fa.hydrateRoot;var Ff={exports:{}},X={};/** + * @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 Ku=Symbol.for("react.element"),Xu=Symbol.for("react.portal"),io=Symbol.for("react.fragment"),uo=Symbol.for("react.strict_mode"),so=Symbol.for("react.profiler"),ao=Symbol.for("react.provider"),co=Symbol.for("react.context"),_0=Symbol.for("react.server_context"),fo=Symbol.for("react.forward_ref"),po=Symbol.for("react.suspense"),ho=Symbol.for("react.suspense_list"),mo=Symbol.for("react.memo"),vo=Symbol.for("react.lazy"),j0=Symbol.for("react.offscreen"),Uf;Uf=Symbol.for("react.module.reference");function tt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Ku:switch(e=e.type,e){case io:case so:case uo:case po:case ho:return e;default:switch(e=e&&e.$$typeof,e){case _0:case co:case fo:case vo:case mo:case ao:return e;default:return t}}case Xu:return t}}}X.ContextConsumer=co;X.ContextProvider=ao;X.Element=Ku;X.ForwardRef=fo;X.Fragment=io;X.Lazy=vo;X.Memo=mo;X.Portal=Xu;X.Profiler=so;X.StrictMode=uo;X.Suspense=po;X.SuspenseList=ho;X.isAsyncMode=function(){return!1};X.isConcurrentMode=function(){return!1};X.isContextConsumer=function(e){return tt(e)===co};X.isContextProvider=function(e){return tt(e)===ao};X.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ku};X.isForwardRef=function(e){return tt(e)===fo};X.isFragment=function(e){return tt(e)===io};X.isLazy=function(e){return tt(e)===vo};X.isMemo=function(e){return tt(e)===mo};X.isPortal=function(e){return tt(e)===Xu};X.isProfiler=function(e){return tt(e)===so};X.isStrictMode=function(e){return tt(e)===uo};X.isSuspense=function(e){return tt(e)===po};X.isSuspenseList=function(e){return tt(e)===ho};X.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===io||e===so||e===uo||e===po||e===ho||e===j0||typeof e=="object"&&e!==null&&(e.$$typeof===vo||e.$$typeof===mo||e.$$typeof===ao||e.$$typeof===co||e.$$typeof===fo||e.$$typeof===Uf||e.getModuleId!==void 0)};X.typeOf=tt;Ff.exports=X;var Bf=Ff.exports;function z0(e){function t(j,z,L,O,h){for(var B=0,_=0,oe=0,Q=0,G,F,ye=0,Ae=0,W,_e=W=G=0,Y=0,we=0,Wn=0,ke=0,Dr=L.length,Qn=Dr-1,nt,D="",ue="",zo="",Po="",Pt;YG)&&(ke=(D=D.replace(" ",":")).length),0O&&(O=(z=z.trim()).charCodeAt(0)),O){case 38:return z.replace(f,"$1"+j.trim());case 58:return j.trim()+z.replace(f,"$1"+j.trim());default:if(0<1*L&&0_.charCodeAt(8))break;case 115:h=h.replace(_,"-webkit-"+_)+";"+h;break;case 207:case 102:h=h.replace(_,"-webkit-"+(102L.charCodeAt(0)&&(L=L.trim()),J=L,L=[J],01?t-1:0),r=1;r0?" Args: "+n.join(", "):""))}var G0=function(){function e(n){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=n}var t=e.prototype;return t.indexOfGroup=function(n){for(var r=0,l=0;l=this.groupSizes.length){for(var l=this.groupSizes,o=l.length,i=o;n>=i;)(i<<=1)<0&&Ir(16,""+n);this.groupSizes=new Uint32Array(i),this.groupSizes.set(l),this.length=i;for(var u=o;u=this.length||this.groupSizes[n]===0)return r;for(var l=this.groupSizes[n],o=this.indexOfGroup(n),i=o+l,u=o;u=pr&&(pr=t+1),vl.set(e,t),Vl.set(t,e)},Z0="style["+Fn+'][data-styled-version="5.3.6"]',J0=new RegExp("^"+Fn+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),q0=function(e,t,n){for(var r,l=n.split(","),o=0,i=l.length;o=0;c--){var g=s[c];if(g&&g.nodeType===1&&g.hasAttribute(Fn))return g}}(n),o=l!==void 0?l.nextSibling:null;r.setAttribute(Fn,"active"),r.setAttribute("data-styled-version","5.3.6");var i=e1();return i&&r.setAttribute("nonce",i),n.insertBefore(r,o),r},t1=function(){function e(n){var r=this.element=Yf(n);r.appendChild(document.createTextNode("")),this.sheet=function(l){if(l.sheet)return l.sheet;for(var o=document.styleSheets,i=0,u=o.length;i=0){var l=document.createTextNode(r),o=this.nodes[n];return this.element.insertBefore(l,o||null),this.length++,!0}return!1},t.deleteRule=function(n){this.element.removeChild(this.nodes[n]),this.length--},t.getRule=function(n){return n0&&(m+=p+",")}),o+=""+c+g+'{content:"'+m+`"}/*!sc*/ +`}}}return o}(this)},e}(),o1=/(a)(d)/gi,wa=function(e){return String.fromCharCode(e+(e>25?39:97))};function Zi(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=wa(t%52)+n;return(wa(t%52)+n).replace(o1,"$1-$2")}var _n=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},Kf=function(e){return _n(5381,e)};function i1(e){for(var t=0;t>>0);if(!n.hasNameForId(l,u)){var s=r(i,"."+u,void 0,l);n.insertRules(l,u,s)}o.push(u),this.staticRulesId=u}else{for(var c=this.rules.length,g=_n(this.baseHash,r.hash),m="",p=0;p>>0);if(!n.hasNameForId(l,R)){var f=r(m,"."+R,void 0,l);n.insertRules(l,R,f)}o.push(R)}}return o.join(" ")},e}(),a1=/^\s*\/\/.*$/gm,c1=[":","[",".","#"];function f1(e){var t,n,r,l,o=e===void 0?Wt:e,i=o.options,u=i===void 0?Wt:i,s=o.plugins,c=s===void 0?Bl:s,g=new z0(u),m=[],p=function(k){function R(f){if(f)try{k(f+"}")}catch{}}return function(f,a,d,y,C,P,$,N,H,I){switch(f){case 1:if(H===0&&a.charCodeAt(0)===64)return k(a+";"),"";break;case 2:if(N===0)return a+"/*|*/";break;case 3:switch(N){case 102:case 112:return k(d[0]+a),"";default:return a+(I===0?"/*|*/":"")}case-2:a.split("/*|*/}").forEach(R)}}}(function(k){m.push(k)}),S=function(k,R,f){return R===0&&c1.indexOf(f[n.length])!==-1||f.match(l)?k:"."+t};function w(k,R,f,a){a===void 0&&(a="&");var d=k.replace(a1,""),y=R&&f?f+" "+R+" { "+d+" }":d;return t=a,n=R,r=new RegExp("\\"+n+"\\b","g"),l=new RegExp("(\\"+n+"\\b){2,}"),g(f||!R?"":R,y)}return g.use([].concat(c,[function(k,R,f){k===2&&f.length&&f[0].lastIndexOf(n)>0&&(f[0]=f[0].replace(r,S))},p,function(k){if(k===-2){var R=m;return m=[],R}}])),w.hash=c.length?c.reduce(function(k,R){return R.name||Ir(15),_n(k,R.name)},5381).toString():"",w}var Xf=Wl.createContext();Xf.Consumer;var Zf=Wl.createContext(),d1=(Zf.Consumer,new Gf),Ji=f1();function p1(){return Qt.useContext(Xf)||d1}function h1(){return Qt.useContext(Zf)||Ji}var m1=function(){function e(t,n){var r=this;this.inject=function(l,o){o===void 0&&(o=Ji);var i=r.name+o.hash;l.hasNameForId(r.id,i)||l.insertRules(r.id,i,o(r.rules,i,"@keyframes"))},this.toString=function(){return Ir(12,String(r.name))},this.name=t,this.id="sc-keyframes-"+t,this.rules=n}return e.prototype.getName=function(t){return t===void 0&&(t=Ji),this.name+t.hash},e}(),v1=/([A-Z])/,g1=/([A-Z])/g,y1=/^ms-/,w1=function(e){return"-"+e.toLowerCase()};function ka(e){return v1.test(e)?e.replace(g1,w1).replace(y1,"-ms-"):e}var xa=function(e){return e==null||e===!1||e===""};function Un(e,t,n,r){if(Array.isArray(e)){for(var l,o=[],i=0,u=e.length;i1?t-1:0),r=1;r?@[\\\]^`{|}~-]+/g,C1=/(^-|-$)/g;function ti(e){return e.replace(S1,"-").replace(C1,"")}var E1=function(e){return Zi(Kf(e)>>>0)};function rl(e){return typeof e=="string"&&!0}var qi=function(e){return typeof e=="function"||typeof e=="object"&&e!==null&&!Array.isArray(e)},_1=function(e){return e!=="__proto__"&&e!=="constructor"&&e!=="prototype"};function j1(e,t,n){var r=e[n];qi(t)&&qi(r)?Jf(r,t):e[n]=t}function Jf(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0||(I[N]=P[N]);return I}(t,["componentId"]),C=d&&d+"-"+(rl(a)?a:ti(ga(a)));return bf(a,xt({},y,{attrs:p,componentId:C}),n)},Object.defineProperty(w,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(a){this._foldedDefaultProps=r?Jf({},e.defaultProps,a):a}}),w.toString=function(){return"."+w.styledComponentId},l&&Q0(w,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),w}var bi=function(e){return function t(n,r,l){if(l===void 0&&(l=Wt),!Bf.isValidElementType(r))return Ir(1,String(r));var o=function(){return n(r,l,k1.apply(void 0,arguments))};return o.withConfig=function(i){return t(n,r,xt({},l,{},i))},o.attrs=function(i){return t(n,r,xt({},l,{attrs:Array.prototype.concat(l.attrs,i).filter(Boolean)}))},o}(bf,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach(function(e){bi[e]=bi(e)});const z1=bi;function P1({title:e}){return v.jsxs(v.Fragment,{children:[v.jsx("style",{dangerouslySetInnerHTML:{__html:` + html { + -webkit-text-size-adjust: 100%; + font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, + 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, + 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', + 'Noto Color Emoji'; + line-height: 1.5; + tab-size: 4; + scroll-behavior: smooth; + } + body { + font-family: inherit; + line-height: inherit; + margin: 0; + } + h1, + h2, + p, + pre { + margin: 0; + } + *, + ::before, + ::after { + box-sizing: border-box; + border-width: 0; + border-style: solid; + border-color: currentColor; + } + h1, + h2 { + font-size: inherit; + font-weight: inherit; + } + a { + color: inherit; + text-decoration: inherit; + } + pre { + font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, + 'Liberation Mono', 'Courier New', monospace; + } + svg { + display: block; + vertical-align: middle; + shape-rendering: auto; + text-rendering: optimizeLegibility; + } + pre { + background-color: rgba(55, 65, 81, 1); + border-radius: 0.25rem; + color: rgba(229, 231, 235, 1); + font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, + 'Liberation Mono', 'Courier New', monospace; + overflow: scroll; + padding: 0.5rem 0.75rem; + } + + .shadow { + box-shadow: 0 0 #0000, 0 0 #0000, 0 10px 15px -3px rgba(0, 0, 0, 0.1), + 0 4px 6px -2px rgba(0, 0, 0, 0.05); + } + .rounded { + border-radius: 1.5rem; + } + .wrapper { + width: 100%; + } + .container { + margin-left: auto; + margin-right: auto; + max-width: 768px; + padding-bottom: 3rem; + padding-left: 1rem; + padding-right: 1rem; + color: rgba(55, 65, 81, 1); + width: 100%; + } + #welcome { + margin-top: 2.5rem; + } + #welcome h1 { + font-size: 3rem; + font-weight: 500; + letter-spacing: -0.025em; + line-height: 1; + } + #welcome span { + display: block; + font-size: 1.875rem; + font-weight: 300; + line-height: 2.25rem; + margin-bottom: 0.5rem; + } + #hero { + align-items: center; + background-color: hsla(214, 62%, 21%, 1); + border: none; + box-sizing: border-box; + color: rgba(55, 65, 81, 1); + display: grid; + grid-template-columns: 1fr; + margin-top: 3.5rem; + } + #hero .text-container { + color: rgba(255, 255, 255, 1); + padding: 3rem 2rem; + } + #hero .text-container h2 { + font-size: 1.5rem; + line-height: 2rem; + position: relative; + } + #hero .text-container h2 svg { + color: hsla(162, 47%, 50%, 1); + height: 2rem; + left: -0.25rem; + position: absolute; + top: 0; + width: 2rem; + } + #hero .text-container h2 span { + margin-left: 2.5rem; + } + #hero .text-container a { + background-color: rgba(255, 255, 255, 1); + border-radius: 0.75rem; + color: rgba(55, 65, 81, 1); + display: inline-block; + margin-top: 1.5rem; + padding: 1rem 2rem; + text-decoration: inherit; + } + #hero .logo-container { + display: none; + justify-content: center; + padding-left: 2rem; + padding-right: 2rem; + } + #hero .logo-container svg { + color: rgba(255, 255, 255, 1); + width: 66.666667%; + } + #middle-content { + align-items: flex-start; + display: grid; + gap: 4rem; + grid-template-columns: 1fr; + margin-top: 3.5rem; + } + #learning-materials { + padding: 2.5rem 2rem; + } + #learning-materials h2 { + font-weight: 500; + font-size: 1.25rem; + letter-spacing: -0.025em; + line-height: 1.75rem; + padding-left: 1rem; + padding-right: 1rem; + } + .list-item-link { + align-items: center; + border-radius: 0.75rem; + display: flex; + margin-top: 1rem; + padding: 1rem; + transition-property: background-color, border-color, color, fill, stroke, + opacity, box-shadow, transform, filter, backdrop-filter, + -webkit-backdrop-filter; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; + width: 100%; + } + .list-item-link svg:first-child { + margin-right: 1rem; + height: 1.5rem; + transition-property: background-color, border-color, color, fill, stroke, + opacity, box-shadow, transform, filter, backdrop-filter, + -webkit-backdrop-filter; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; + width: 1.5rem; + } + .list-item-link > span { + flex-grow: 1; + font-weight: 400; + transition-property: background-color, border-color, color, fill, stroke, + opacity, box-shadow, transform, filter, backdrop-filter, + -webkit-backdrop-filter; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; + } + .list-item-link > span > span { + color: rgba(107, 114, 128, 1); + display: block; + flex-grow: 1; + font-size: 0.75rem; + font-weight: 300; + line-height: 1rem; + transition-property: background-color, border-color, color, fill, stroke, + opacity, box-shadow, transform, filter, backdrop-filter, + -webkit-backdrop-filter; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; + } + .list-item-link svg:last-child { + height: 1rem; + transition-property: all; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; + width: 1rem; + } + .list-item-link:hover { + color: rgba(255, 255, 255, 1); + background-color: hsla(162, 47%, 50%, 1); + } + .list-item-link:hover > span {} + .list-item-link:hover > span > span { + color: rgba(243, 244, 246, 1); + } + .list-item-link:hover svg:last-child { + transform: translateX(0.25rem); + } + #other-links {} + .button-pill { + padding: 1.5rem 2rem; + margin-bottom: 2rem; + transition-duration: 300ms; + transition-property: background-color, border-color, color, fill, stroke, + opacity, box-shadow, transform, filter, backdrop-filter, + -webkit-backdrop-filter; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + align-items: center; + display: flex; + } + .button-pill svg { + transition-property: background-color, border-color, color, fill, stroke, + opacity, box-shadow, transform, filter, backdrop-filter, + -webkit-backdrop-filter; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; + flex-shrink: 0; + width: 3rem; + } + .button-pill > span { + letter-spacing: -0.025em; + font-weight: 400; + font-size: 1.125rem; + line-height: 1.75rem; + padding-left: 1rem; + padding-right: 1rem; + } + .button-pill span span { + display: block; + font-size: 0.875rem; + font-weight: 300; + line-height: 1.25rem; + } + .button-pill:hover svg, + .button-pill:hover { + color: rgba(255, 255, 255, 1) !important; + } + #nx-console:hover { + background-color: rgba(0, 122, 204, 1); + } + #nx-console svg { + color: rgba(0, 122, 204, 1); + } + #nx-console-jetbrains { + margin-top: 2rem; + } + #nx-console-jetbrains:hover { + background-color: rgba(255, 49, 140, 1); + } + #nx-console-jetbrains svg { + color: rgba(255, 49, 140, 1); + } + #nx-repo:hover { + background-color: rgba(24, 23, 23, 1); + } + #nx-repo svg { + color: rgba(24, 23, 23, 1); + } + #nx-cloud { + margin-bottom: 2rem; + margin-top: 2rem; + padding: 2.5rem 2rem; + } + #nx-cloud > div { + align-items: center; + display: flex; + } + #nx-cloud > div svg { + border-radius: 0.375rem; + flex-shrink: 0; + width: 3rem; + } + #nx-cloud > div h2 { + font-size: 1.125rem; + font-weight: 400; + letter-spacing: -0.025em; + line-height: 1.75rem; + padding-left: 1rem; + padding-right: 1rem; + } + #nx-cloud > div h2 span { + display: block; + font-size: 0.875rem; + font-weight: 300; + line-height: 1.25rem; + } + #nx-cloud p { + font-size: 1rem; + line-height: 1.5rem; + margin-top: 1rem; + } + #nx-cloud pre { + margin-top: 1rem; + } + #nx-cloud a { + color: rgba(107, 114, 128, 1); + display: block; + font-size: 0.875rem; + line-height: 1.25rem; + margin-top: 1.5rem; + text-align: right; + } + #nx-cloud a:hover { + text-decoration: underline; + } + #commands { + padding: 2.5rem 2rem; + margin-top: 3.5rem; + } + #commands h2 { + font-size: 1.25rem; + font-weight: 400; + letter-spacing: -0.025em; + line-height: 1.75rem; + padding-left: 1rem; + padding-right: 1rem; + } + #commands p { + font-size: 1rem; + font-weight: 300; + line-height: 1.5rem; + margin-top: 1rem; + padding-left: 1rem; + padding-right: 1rem; + } + details { + align-items: center; + display: flex; + margin-top: 1rem; + padding-left: 1rem; + padding-right: 1rem; + width: 100%; + } + details pre > span { + color: rgba(181, 181, 181, 1); + display: block; + } + summary { + border-radius: 0.5rem; + display: flex; + font-weight: 400; + padding: 0.5rem; + cursor: pointer; + transition-property: background-color, border-color, color, fill, stroke, + opacity, box-shadow, transform, filter, backdrop-filter, + -webkit-backdrop-filter; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: 150ms; + } + summary:hover { + background-color: rgba(243, 244, 246, 1); + } + summary svg { + height: 1.5rem; + margin-right: 1rem; + width: 1.5rem; + } + #love { + color: rgba(107, 114, 128, 1); + font-size: 0.875rem; + line-height: 1.25rem; + margin-top: 3.5rem; + opacity: 0.6; + text-align: center; + } + #love svg { + color: rgba(252, 165, 165, 1); + width: 1.25rem; + height: 1.25rem; + display: inline; + margin-top: -0.25rem; + } + @media screen and (min-width: 768px) { + #hero { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } + #hero .logo-container { + display: flex; + } + #middle-content { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } + } + `}}),v.jsx("div",{className:"wrapper",children:v.jsxs("div",{className:"container",children:[v.jsx("div",{id:"welcome",children:v.jsxs("h1",{children:[v.jsx("span",{children:" Hello there, "}),"Welcome ",e," 👋"]})}),v.jsxs("div",{id:"hero",className:"rounded",children:[v.jsxs("div",{className:"text-container",children:[v.jsxs("h2",{children:[v.jsx("svg",{fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:v.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 12l2 2 4-4M7.835 4.697a3.42 3.42 0 001.946-.806 3.42 3.42 0 014.438 0 3.42 3.42 0 001.946.806 3.42 3.42 0 013.138 3.138 3.42 3.42 0 00.806 1.946 3.42 3.42 0 010 4.438 3.42 3.42 0 00-.806 1.946 3.42 3.42 0 01-3.138 3.138 3.42 3.42 0 00-1.946.806 3.42 3.42 0 01-4.438 0 3.42 3.42 0 00-1.946-.806 3.42 3.42 0 01-3.138-3.138 3.42 3.42 0 00-.806-1.946 3.42 3.42 0 010-4.438 3.42 3.42 0 00.806-1.946 3.42 3.42 0 013.138-3.138z"})}),v.jsx("span",{children:"You're up and running"})]}),v.jsx("a",{href:"#commands",children:" What's next? "})]}),v.jsx("div",{className:"logo-container",children:v.jsx("svg",{fill:"currentColor",role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:v.jsx("path",{d:"M11.987 14.138l-3.132 4.923-5.193-8.427-.012 8.822H0V4.544h3.691l5.247 8.833.005-3.998 3.044 4.759zm.601-5.761c.024-.048 0-3.784.008-3.833h-3.65c.002.059-.005 3.776-.003 3.833h3.645zm5.634 4.134a2.061 2.061 0 0 0-1.969 1.336 1.963 1.963 0 0 1 2.343-.739c.396.161.917.422 1.33.283a2.1 2.1 0 0 0-1.704-.88zm3.39 1.061c-.375-.13-.8-.277-1.109-.681-.06-.08-.116-.17-.176-.265a2.143 2.143 0 0 0-.533-.642c-.294-.216-.68-.322-1.18-.322a2.482 2.482 0 0 0-2.294 1.536 2.325 2.325 0 0 1 4.002.388.75.75 0 0 0 .836.334c.493-.105.46.36 1.203.518v-.133c-.003-.446-.246-.55-.75-.733zm2.024 1.266a.723.723 0 0 0 .347-.638c-.01-2.957-2.41-5.487-5.37-5.487a5.364 5.364 0 0 0-4.487 2.418c-.01-.026-1.522-2.39-1.538-2.418H8.943l3.463 5.423-3.379 5.32h3.54l1.54-2.366 1.568 2.366h3.541l-3.21-5.052a.7.7 0 0 1-.084-.32 2.69 2.69 0 0 1 2.69-2.691h.001c1.488 0 1.736.89 2.057 1.308.634.826 1.9.464 1.9 1.541a.707.707 0 0 0 1.066.596zm.35.133c-.173.372-.56.338-.755.639-.176.271.114.412.114.412s.337.156.538-.311c.104-.231.14-.488.103-.74z"})})})]}),v.jsxs("div",{id:"middle-content",children:[v.jsxs("div",{id:"learning-materials",className:"rounded shadow",children:[v.jsx("h2",{children:"Learning materials"}),v.jsxs("a",{href:"https://nx.dev/getting-started/intro?utm_source=nx-project",target:"_blank",rel:"noreferrer",className:"list-item-link",children:[v.jsx("svg",{fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:v.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253"})}),v.jsxs("span",{children:["Documentation",v.jsx("span",{children:" Everything is in there "})]}),v.jsx("svg",{fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:v.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 5l7 7-7 7"})})]}),v.jsxs("a",{href:"https://blog.nrwl.io/?utm_source=nx-project",target:"_blank",rel:"noreferrer",className:"list-item-link",children:[v.jsx("svg",{fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:v.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M19 20H5a2 2 0 01-2-2V6a2 2 0 012-2h10a2 2 0 012 2v1m2 13a2 2 0 01-2-2V7m2 13a2 2 0 002-2V9a2 2 0 00-2-2h-2m-4-3H9M7 16h6M7 8h6v4H7V8z"})}),v.jsxs("span",{children:["Blog",v.jsx("span",{children:" Changelog, features & events "})]}),v.jsx("svg",{fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:v.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 5l7 7-7 7"})})]}),v.jsxs("a",{href:"https://www.youtube.com/@NxDevtools/videos?utm_source=nx-project&sub_confirmation=1",target:"_blank",rel:"noreferrer",className:"list-item-link",children:[v.jsxs("svg",{role:"img",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[v.jsx("title",{children:"YouTube"}),v.jsx("path",{d:"M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"})]}),v.jsxs("span",{children:["YouTube channel",v.jsx("span",{children:" Nx Show, talks & tutorials "})]}),v.jsx("svg",{fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:v.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 5l7 7-7 7"})})]}),v.jsxs("a",{href:"https://nx.dev/react-tutorial/1-code-generation?utm_source=nx-project",target:"_blank",rel:"noreferrer",className:"list-item-link",children:[v.jsx("svg",{fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:v.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M15 15l-2 5L9 9l11 4-5 2zm0 0l5 5M7.188 2.239l.777 2.897M5.136 7.965l-2.898-.777M13.95 4.05l-2.122 2.122m-5.657 5.656l-2.12 2.122"})}),v.jsxs("span",{children:["Interactive tutorials",v.jsx("span",{children:" Create an app, step-by-step "})]}),v.jsx("svg",{fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:v.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 5l7 7-7 7"})})]}),v.jsxs("a",{href:"https://nxplaybook.com/?utm_source=nx-project",target:"_blank",rel:"noreferrer",className:"list-item-link",children:[v.jsxs("svg",{fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[v.jsx("path",{d:"M12 14l9-5-9-5-9 5 9 5z"}),v.jsx("path",{d:"M12 14l6.16-3.422a12.083 12.083 0 01.665 6.479A11.952 11.952 0 0012 20.055a11.952 11.952 0 00-6.824-2.998 12.078 12.078 0 01.665-6.479L12 14z"}),v.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 14l9-5-9-5-9 5 9 5zm0 0l6.16-3.422a12.083 12.083 0 01.665 6.479A11.952 11.952 0 0012 20.055a11.952 11.952 0 00-6.824-2.998 12.078 12.078 0 01.665-6.479L12 14zm-4 6v-7.5l4-2.222"})]}),v.jsxs("span",{children:["Video courses",v.jsx("span",{children:" Nx custom courses "})]}),v.jsx("svg",{fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:v.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 5l7 7-7 7"})})]})]}),v.jsxs("div",{id:"other-links",children:[v.jsxs("a",{id:"nx-console",className:"button-pill rounded shadow",href:"https://marketplace.visualstudio.com/items?itemName=nrwl.angular-console&utm_source=nx-project",target:"_blank",rel:"noreferrer",children:[v.jsxs("svg",{fill:"currentColor",role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[v.jsx("title",{children:"Visual Studio Code"}),v.jsx("path",{d:"M23.15 2.587L18.21.21a1.494 1.494 0 0 0-1.705.29l-9.46 8.63-4.12-3.128a.999.999 0 0 0-1.276.057L.327 7.261A1 1 0 0 0 .326 8.74L3.899 12 .326 15.26a1 1 0 0 0 .001 1.479L1.65 17.94a.999.999 0 0 0 1.276.057l4.12-3.128 9.46 8.63a1.492 1.492 0 0 0 1.704.29l4.942-2.377A1.5 1.5 0 0 0 24 20.06V3.939a1.5 1.5 0 0 0-.85-1.352zm-5.146 14.861L10.826 12l7.178-5.448v10.896z"})]}),v.jsxs("span",{children:["Install Nx Console for VSCode",v.jsx("span",{children:"The official VSCode extension for Nx."})]})]}),v.jsxs("a",{id:"nx-console-jetbrains",className:"button-pill rounded shadow",href:"https://plugins.jetbrains.com/plugin/21060-nx-console",target:"_blank",rel:"noreferrer",children:[v.jsxs("svg",{height:"48",width:"48",viewBox:"20 20 60 60",xmlns:"http://www.w3.org/2000/svg",children:[v.jsx("path",{d:"m22.5 22.5h60v60h-60z"}),v.jsxs("g",{fill:"#fff",children:[v.jsx("path",{d:"m29.03 71.25h22.5v3.75h-22.5z"}),v.jsx("path",{d:"m28.09 38 1.67-1.58a1.88 1.88 0 0 0 1.47.87c.64 0 1.06-.44 1.06-1.31v-5.98h2.58v6a3.48 3.48 0 0 1 -.87 2.6 3.56 3.56 0 0 1 -2.57.95 3.84 3.84 0 0 1 -3.34-1.55z"}),v.jsx("path",{d:"m36 30h7.53v2.19h-5v1.44h4.49v2h-4.42v1.49h5v2.21h-7.6z"}),v.jsx("path",{d:"m47.23 32.29h-2.8v-2.29h8.21v2.27h-2.81v7.1h-2.6z"}),v.jsx("path",{d:"m29.13 43.08h4.42a3.53 3.53 0 0 1 2.55.83 2.09 2.09 0 0 1 .6 1.53 2.16 2.16 0 0 1 -1.44 2.09 2.27 2.27 0 0 1 1.86 2.29c0 1.61-1.31 2.59-3.55 2.59h-4.44zm5 2.89c0-.52-.42-.8-1.18-.8h-1.29v1.64h1.24c.79 0 1.25-.26 1.25-.81zm-.9 2.66h-1.57v1.73h1.62c.8 0 1.24-.31 1.24-.86 0-.5-.4-.87-1.27-.87z"}),v.jsx("path",{d:"m38 43.08h4.1a4.19 4.19 0 0 1 3 1 2.93 2.93 0 0 1 .9 2.19 3 3 0 0 1 -1.93 2.89l2.24 3.27h-3l-1.88-2.84h-.87v2.84h-2.56zm4 4.5c.87 0 1.39-.43 1.39-1.11 0-.75-.54-1.12-1.4-1.12h-1.44v2.26z"}),v.jsx("path",{d:"m49.59 43h2.5l4 9.44h-2.79l-.67-1.69h-3.63l-.67 1.69h-2.71zm2.27 5.73-1-2.65-1.06 2.65z"}),v.jsx("path",{d:"m56.46 43.05h2.6v9.37h-2.6z"}),v.jsx("path",{d:"m60.06 43.05h2.42l3.37 5v-5h2.57v9.37h-2.26l-3.53-5.14v5.14h-2.57z"}),v.jsx("path",{d:"m68.86 51 1.45-1.73a4.84 4.84 0 0 0 3 1.13c.71 0 1.08-.24 1.08-.65 0-.4-.31-.6-1.59-.91-2-.46-3.53-1-3.53-2.93 0-1.74 1.37-3 3.62-3a5.89 5.89 0 0 1 3.86 1.25l-1.26 1.84a4.63 4.63 0 0 0 -2.62-.92c-.63 0-.94.25-.94.6 0 .42.32.61 1.63.91 2.14.46 3.44 1.16 3.44 2.91 0 1.91-1.51 3-3.79 3a6.58 6.58 0 0 1 -4.35-1.5z"})]})]}),v.jsxs("span",{children:["Install Nx Console for JetBrains",v.jsx("span",{children:"Available for WebStorm, Intellij IDEA Ultimate and more!"})]})]}),v.jsxs("div",{id:"nx-cloud",className:"rounded shadow",children:[v.jsxs("div",{children:[v.jsxs("svg",{id:"nx-cloud-logo",role:"img",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",fill:"transparent",viewBox:"0 0 24 24",children:[v.jsx("path",{strokeWidth:"2",d:"M23 3.75V6.5c-3.036 0-5.5 2.464-5.5 5.5s-2.464 5.5-5.5 5.5-5.5 2.464-5.5 5.5H3.75C2.232 23 1 21.768 1 20.25V3.75C1 2.232 2.232 1 3.75 1h16.5C21.768 1 23 2.232 23 3.75Z"}),v.jsx("path",{strokeWidth:"2",d:"M23 6v14.1667C23 21.7307 21.7307 23 20.1667 23H6c0-3.128 2.53867-5.6667 5.6667-5.6667 3.128 0 5.6666-2.5386 5.6666-5.6666C17.3333 8.53867 19.872 6 23 6Z"})]}),v.jsxs("h2",{children:["Nx Cloud",v.jsx("span",{children:"Enable faster CI & better DX"})]})]}),v.jsx("p",{children:"You can activate distributed tasks executions and caching by running:"}),v.jsx("pre",{children:"nx connect-to-nx-cloud"}),v.jsxs("a",{href:"https://nx.app/?utm_source=nx-project",target:"_blank",rel:"noreferrer",children:[" ","What is Nx Cloud?"," "]})]}),v.jsxs("a",{id:"nx-repo",className:"button-pill rounded shadow",href:"https://github.com/nrwl/nx?utm_source=nx-project",target:"_blank",rel:"noreferrer",children:[v.jsx("svg",{fill:"currentColor",role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:v.jsx("path",{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"})}),v.jsxs("span",{children:["Nx is open source",v.jsx("span",{children:" Love Nx? Give us a star! "})]})]})]})]}),v.jsxs("div",{id:"commands",className:"rounded shadow",children:[v.jsx("h2",{children:"Next steps"}),v.jsx("p",{children:"Here are some things you can do with Nx:"}),v.jsxs("details",{children:[v.jsxs("summary",{children:[v.jsx("svg",{fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:v.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})}),"Add UI library"]}),v.jsxs("pre",{children:[v.jsx("span",{children:"# Generate UI lib"}),"nx g @nx/react:lib ui",v.jsx("span",{children:"# Add a component"}),"nx g @nx/react:component ui/src/lib/button"]})]}),v.jsxs("details",{children:[v.jsxs("summary",{children:[v.jsx("svg",{fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:v.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})}),"View project details"]}),v.jsxs("pre",{children:["nx show project ",e," --web"]})]}),v.jsxs("details",{children:[v.jsxs("summary",{children:[v.jsx("svg",{fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:v.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})}),"View interactive project graph"]}),v.jsx("pre",{children:"nx graph"})]}),v.jsxs("details",{children:[v.jsxs("summary",{children:[v.jsx("svg",{fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:v.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})}),"Run affected commands"]}),v.jsxs("pre",{children:[v.jsx("span",{children:"# see what's been affected by changes"}),"nx affected:graph",v.jsx("span",{children:"# run tests for current changes"}),"nx affected:test",v.jsx("span",{children:"# run e2e tests for current changes"}),"nx affected:e2e"]})]})]}),v.jsxs("p",{id:"love",children:["Carefully crafted with",v.jsx("svg",{fill:"currentColor",stroke:"none",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:v.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z"})})]})]})})]})}const N1=z1.div` + // Your style here +`;function L1(){return v.jsx(N1,{children:v.jsx(P1,{title:"react-phaser-travelbox"})})}const T1=Df(document.getElementById("root"));T1.render(v.jsx(Qt.StrictMode,{children:v.jsx(L1,{})})); diff --git a/docs/journal/03-14/index.html b/docs/journal/03-14/index.html index b964af4c45..92dc16f643 100644 --- a/docs/journal/03-14/index.html +++ b/docs/journal/03-14/index.html @@ -165,6 +165,6 @@ ../../dist/apps/react-phaser-fish-chip/index.html 0.37 kB │ gzip: 0.25 kB ../../dist/apps/react-phaser-fish-chip/fish-chip.js 1,969.38 kB │ gzip: 484.77 kB

We can actually just avoid using the shell and pass through that empty outdir command! Yay! -That ended up being easier to manage than I would have thought.


David Goliath

+That ended up being easier to manage than I would have thought.


David Goliath

The travel tag might be a bit weird but also these notes for this year , 2024, will extend into the next day because its almost 3:39am here.

KBVE Copyright ©




\ No newline at end of file diff --git a/docs/journal/03-15/index.html b/docs/journal/03-15/index.html index 054bfa8dd9..7df5857302 100644 --- a/docs/journal/03-15/index.html +++ b/docs/journal/03-15/index.html @@ -154,6 +154,48 @@

Tasks

[ ] - Prepare Discord Jam R&D [ ] - Travel Jam Repo

2024

Travel

Travel Game Jam! -We are thinking David Goliath.

+We are thinking David Goliath or a boeing flappy bird style game, hmmm.

Bell just reminded me of the Mighty Max concept and maybe we could use that as a base concept for the game?

There are only 69 hours left in the jam, we got this!

The repo for the last mini game was under nextjs-react-fish-chip-built-request , now we could go ahead and create a new one.

Okay! The demo for the pipeline looks perfect, so time to test case this with the travelbox gamejam.

We will have to create a new react app with the vite bundler!

Run : pnpm nx g @nx/react:app react-phaser-travelbox --bundler=vite

Then we would update the ci-beta twith this code block.


+            #   [React] -> Travel Box
+
+            -   name: React Travel Box
+                if: needs.alter.outputs.reacttravelbox == 'true'
+                uses: ./.github/actions/kbve-shell
+                with:
+                    flag: '-build react-phaser-travelbox'
+                    create_pull_request: true
+                    github_token: ${{ secrets.GITHUB_TOKEN }}
+                    pull_request_title: 'react-travelbox-built-request'
+                    pull_request_body: 'React TravelBox Built Request'
+            
+

Now the game build itself, mapping out the menu will be easy and we can at least start from there. +The configurations are next on the journy!

The first was the NX Project JSON for building out the application, which we can extend the project.json to help us handle it.

    "build": {
+			"executor": "@nx/vite:build",
+			"outputs": ["{options.outputPath}"],
+			"defaultConfiguration": "production",
+			"options": {
+				"outputPath": "apps/kbve.com/public/embed/js/travelbox",
+				"emptyOutDir": true
+			},
+			"configurations": {
+				"development": {
+					"mode": "development"
+				},
+				"production": {
+					"mode": "production"
+				}
+			}
+		}

This way the game that gets built can go directly into the travelbox embed and we can work from there.

After setting up the build command within the nx project, ./kbve.sh -nx react-phaser-travelbox:build, we can add our rollup configurtions too.


+      rollupOptions: {
+        external: ['fs', 'path', 'process'],
+        output: {
+          // ES Module Output
+          format: 'es', // ES module format
+          // Change the output directory structure and naming
+          entryFileNames: `travelbox.js`,
+          chunkFileNames: `[name].js`,
+          assetFileNames: `[name].[ext]`,
+        },
+      },
+

We will come back to this on a later date, probably need to adjust the configuration of the chunking, but it will get that initial file down.

Third step will be to make it so that we adjust the travelbox/index.astro to load the new travelbox build.


TravelBox Menu

Getting started on the TravelBox Menu? This will be the menu of the game, while I am trying to remember the different parts of the menu haha.


TravelBox GamePlay

The gameplay for the travelbox and the design around it will be a bit of a test casing for us.

KBVE Copyright ©




\ No newline at end of file diff --git a/docs/sitemap-0.xml b/docs/sitemap-0.xml index afb6c55da1..9621a8a1cc 100644 --- a/docs/sitemap-0.xml +++ b/docs/sitemap-0.xml @@ -1 +1 @@ -https://kbve.com/https://kbve.com/application/https://kbve.com/application/android/https://kbve.com/application/ansible/https://kbve.com/application/appwrite/https://kbve.com/application/authelia/https://kbve.com/application/automation/https://kbve.com/application/cubejs/https://kbve.com/application/docker/https://kbve.com/application/emulator/https://kbve.com/application/emulator/ryujinx/https://kbve.com/application/flipperzero/https://kbve.com/application/flutter/https://kbve.com/application/gcloud/https://kbve.com/application/git/https://kbve.com/application/godot/https://kbve.com/application/javascript/https://kbve.com/application/kubernetes/https://kbve.com/application/longhorn/https://kbve.com/application/lvm/https://kbve.com/application/ml/https://kbve.com/application/n8n/https://kbve.com/application/nginx/https://kbve.com/application/nmap/https://kbve.com/application/nomad/https://kbve.com/application/obs/https://kbve.com/application/obsidian/https://kbve.com/application/php/https://kbve.com/application/pocketbase/https://kbve.com/application/portainer/https://kbve.com/application/proxmox/https://kbve.com/application/pterodactyl/https://kbve.com/application/python/https://kbve.com/application/redis/https://kbve.com/application/rust/https://kbve.com/application/rustdesk/https://kbve.com/application/sql/https://kbve.com/application/ssh/https://kbve.com/application/ssh/zsh/https://kbve.com/application/terraform/https://kbve.com/application/traefik/https://kbve.com/application/unity/https://kbve.com/application/void/https://kbve.com/application/watchtower/https://kbve.com/application/wireguard/https://kbve.com/arcade/fishchip/https://kbve.com/arcade/fishchip/inn/https://kbve.com/arcade/fishchip/itch/https://kbve.com/auth/login/https://kbve.com/auth/register/https://kbve.com/comic/dnd/barspaghetti/https://kbve.com/crypto/btc/https://kbve.com/crypto/doge/https://kbve.com/crypto/eth/https://kbve.com/discord/https://kbve.com/experiments/https://kbve.com/experiments/wasm/https://kbve.com/journal/https://kbve.com/journal/01-01/https://kbve.com/journal/01-02/https://kbve.com/journal/01-03/https://kbve.com/journal/01-04/https://kbve.com/journal/01-05/https://kbve.com/journal/01-06/https://kbve.com/journal/01-07/https://kbve.com/journal/01-08/https://kbve.com/journal/01-09/https://kbve.com/journal/01-10/https://kbve.com/journal/01-11/https://kbve.com/journal/01-12/https://kbve.com/journal/01-13/https://kbve.com/journal/01-14/https://kbve.com/journal/01-15/https://kbve.com/journal/01-16/https://kbve.com/journal/01-17/https://kbve.com/journal/01-18/https://kbve.com/journal/01-19/https://kbve.com/journal/01-20/https://kbve.com/journal/01-21/https://kbve.com/journal/01-22/https://kbve.com/journal/01-23/https://kbve.com/journal/01-24/https://kbve.com/journal/01-25/https://kbve.com/journal/01-26/https://kbve.com/journal/01-27/https://kbve.com/journal/01-28/https://kbve.com/journal/01-29/https://kbve.com/journal/01-30/https://kbve.com/journal/01-31/https://kbve.com/journal/02-01/https://kbve.com/journal/02-02/https://kbve.com/journal/02-03/https://kbve.com/journal/02-04/https://kbve.com/journal/02-05/https://kbve.com/journal/02-06/https://kbve.com/journal/02-07/https://kbve.com/journal/02-08/https://kbve.com/journal/02-09/https://kbve.com/journal/02-10/https://kbve.com/journal/02-11/https://kbve.com/journal/02-12/https://kbve.com/journal/02-13/https://kbve.com/journal/02-14/https://kbve.com/journal/02-15/https://kbve.com/journal/02-16/https://kbve.com/journal/02-17/https://kbve.com/journal/02-18/https://kbve.com/journal/02-19/https://kbve.com/journal/02-20/https://kbve.com/journal/02-21/https://kbve.com/journal/02-22/https://kbve.com/journal/02-23/https://kbve.com/journal/02-24/https://kbve.com/journal/02-25/https://kbve.com/journal/02-26/https://kbve.com/journal/02-27/https://kbve.com/journal/02-28/https://kbve.com/journal/02-29/https://kbve.com/journal/03-01/https://kbve.com/journal/03-02/https://kbve.com/journal/03-03/https://kbve.com/journal/03-04/https://kbve.com/journal/03-05/https://kbve.com/journal/03-06/https://kbve.com/journal/03-07/https://kbve.com/journal/03-08/https://kbve.com/journal/03-09/https://kbve.com/journal/03-10/https://kbve.com/journal/03-11/https://kbve.com/journal/03-12/https://kbve.com/journal/03-13/https://kbve.com/journal/03-14/https://kbve.com/journal/03-15/https://kbve.com/legal/https://kbve.com/legal/disclaimer/https://kbve.com/legal/eula/https://kbve.com/legal/privacy/https://kbve.com/legal/tos/https://kbve.com/search/ \ No newline at end of file +https://kbve.com/https://kbve.com/application/https://kbve.com/application/android/https://kbve.com/application/ansible/https://kbve.com/application/appwrite/https://kbve.com/application/authelia/https://kbve.com/application/automation/https://kbve.com/application/cubejs/https://kbve.com/application/docker/https://kbve.com/application/emulator/https://kbve.com/application/emulator/ryujinx/https://kbve.com/application/flipperzero/https://kbve.com/application/flutter/https://kbve.com/application/gcloud/https://kbve.com/application/git/https://kbve.com/application/godot/https://kbve.com/application/javascript/https://kbve.com/application/kubernetes/https://kbve.com/application/longhorn/https://kbve.com/application/lvm/https://kbve.com/application/ml/https://kbve.com/application/n8n/https://kbve.com/application/nginx/https://kbve.com/application/nmap/https://kbve.com/application/nomad/https://kbve.com/application/obs/https://kbve.com/application/obsidian/https://kbve.com/application/php/https://kbve.com/application/pocketbase/https://kbve.com/application/portainer/https://kbve.com/application/proxmox/https://kbve.com/application/pterodactyl/https://kbve.com/application/python/https://kbve.com/application/redis/https://kbve.com/application/rust/https://kbve.com/application/rustdesk/https://kbve.com/application/sql/https://kbve.com/application/ssh/https://kbve.com/application/ssh/zsh/https://kbve.com/application/terraform/https://kbve.com/application/traefik/https://kbve.com/application/unity/https://kbve.com/application/void/https://kbve.com/application/watchtower/https://kbve.com/application/wireguard/https://kbve.com/arcade/fishchip/https://kbve.com/arcade/fishchip/inn/https://kbve.com/arcade/fishchip/itch/https://kbve.com/arcade/travelbox/https://kbve.com/auth/login/https://kbve.com/auth/register/https://kbve.com/comic/dnd/barspaghetti/https://kbve.com/crypto/btc/https://kbve.com/crypto/doge/https://kbve.com/crypto/eth/https://kbve.com/discord/https://kbve.com/experiments/https://kbve.com/experiments/wasm/https://kbve.com/journal/https://kbve.com/journal/01-01/https://kbve.com/journal/01-02/https://kbve.com/journal/01-03/https://kbve.com/journal/01-04/https://kbve.com/journal/01-05/https://kbve.com/journal/01-06/https://kbve.com/journal/01-07/https://kbve.com/journal/01-08/https://kbve.com/journal/01-09/https://kbve.com/journal/01-10/https://kbve.com/journal/01-11/https://kbve.com/journal/01-12/https://kbve.com/journal/01-13/https://kbve.com/journal/01-14/https://kbve.com/journal/01-15/https://kbve.com/journal/01-16/https://kbve.com/journal/01-17/https://kbve.com/journal/01-18/https://kbve.com/journal/01-19/https://kbve.com/journal/01-20/https://kbve.com/journal/01-21/https://kbve.com/journal/01-22/https://kbve.com/journal/01-23/https://kbve.com/journal/01-24/https://kbve.com/journal/01-25/https://kbve.com/journal/01-26/https://kbve.com/journal/01-27/https://kbve.com/journal/01-28/https://kbve.com/journal/01-29/https://kbve.com/journal/01-30/https://kbve.com/journal/01-31/https://kbve.com/journal/02-01/https://kbve.com/journal/02-02/https://kbve.com/journal/02-03/https://kbve.com/journal/02-04/https://kbve.com/journal/02-05/https://kbve.com/journal/02-06/https://kbve.com/journal/02-07/https://kbve.com/journal/02-08/https://kbve.com/journal/02-09/https://kbve.com/journal/02-10/https://kbve.com/journal/02-11/https://kbve.com/journal/02-12/https://kbve.com/journal/02-13/https://kbve.com/journal/02-14/https://kbve.com/journal/02-15/https://kbve.com/journal/02-16/https://kbve.com/journal/02-17/https://kbve.com/journal/02-18/https://kbve.com/journal/02-19/https://kbve.com/journal/02-20/https://kbve.com/journal/02-21/https://kbve.com/journal/02-22/https://kbve.com/journal/02-23/https://kbve.com/journal/02-24/https://kbve.com/journal/02-25/https://kbve.com/journal/02-26/https://kbve.com/journal/02-27/https://kbve.com/journal/02-28/https://kbve.com/journal/02-29/https://kbve.com/journal/03-01/https://kbve.com/journal/03-02/https://kbve.com/journal/03-03/https://kbve.com/journal/03-04/https://kbve.com/journal/03-05/https://kbve.com/journal/03-06/https://kbve.com/journal/03-07/https://kbve.com/journal/03-08/https://kbve.com/journal/03-09/https://kbve.com/journal/03-10/https://kbve.com/journal/03-11/https://kbve.com/journal/03-12/https://kbve.com/journal/03-13/https://kbve.com/journal/03-14/https://kbve.com/journal/03-15/https://kbve.com/legal/https://kbve.com/legal/disclaimer/https://kbve.com/legal/eula/https://kbve.com/legal/privacy/https://kbve.com/legal/tos/https://kbve.com/search/ \ No newline at end of file