diff --git a/docs/.nojekyll b/docs/.nojekyll index 8b13789..e69de29 100644 --- a/docs/.nojekyll +++ b/docs/.nojekyll @@ -1 +0,0 @@ - diff --git a/docs/CNAME b/docs/CNAME index 55611b6..ed8d2e2 100644 --- a/docs/CNAME +++ b/docs/CNAME @@ -1 +1 @@ -cryptothrone.com +cryptothrone.com \ No newline at end of file diff --git a/docs/_astro/App.4l_ZXIlI.js b/docs/_astro/App.4l_ZXIlI.js new file mode 100644 index 0000000..e58b7d6 --- /dev/null +++ b/docs/_astro/App.4l_ZXIlI.js @@ -0,0 +1,6403 @@ +import{j as $n}from"./jsx-runtime.BFYNFNPI.js";import{g as Au,r as qn,a as ps,c as Tx}from"./index.DIpCM_17.js";var Mu={exports:{}},Qt={};/** + * @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 eo=Symbol.for("react.element"),io=Symbol.for("react.portal"),_n=Symbol.for("react.fragment"),tr=Symbol.for("react.strict_mode"),er=Symbol.for("react.profiler"),ir=Symbol.for("react.provider"),sr=Symbol.for("react.context"),Sx=Symbol.for("react.server_context"),nr=Symbol.for("react.forward_ref"),rr=Symbol.for("react.suspense"),ar=Symbol.for("react.suspense_list"),or=Symbol.for("react.memo"),hr=Symbol.for("react.lazy"),Cx=Symbol.for("react.offscreen"),wu;wu=Symbol.for("react.module.reference");function ke(P){if(typeof P=="object"&&P!==null){var C=P.$$typeof;switch(C){case eo:switch(P=P.type,P){case _n:case er:case tr:case rr:case ar:return P;default:switch(P=P&&P.$$typeof,P){case Sx:case sr:case nr:case hr:case or:case ir:return P;default:return C}}case io:return C}}}Qt.ContextConsumer=sr;Qt.ContextProvider=ir;Qt.Element=eo;Qt.ForwardRef=nr;Qt.Fragment=_n;Qt.Lazy=hr;Qt.Memo=or;Qt.Portal=io;Qt.Profiler=er;Qt.StrictMode=tr;Qt.Suspense=rr;Qt.SuspenseList=ar;Qt.isAsyncMode=function(){return!1};Qt.isConcurrentMode=function(){return!1};Qt.isContextConsumer=function(P){return ke(P)===sr};Qt.isContextProvider=function(P){return ke(P)===ir};Qt.isElement=function(P){return typeof P=="object"&&P!==null&&P.$$typeof===eo};Qt.isForwardRef=function(P){return ke(P)===nr};Qt.isFragment=function(P){return ke(P)===_n};Qt.isLazy=function(P){return ke(P)===hr};Qt.isMemo=function(P){return ke(P)===or};Qt.isPortal=function(P){return ke(P)===io};Qt.isProfiler=function(P){return ke(P)===er};Qt.isStrictMode=function(P){return ke(P)===tr};Qt.isSuspense=function(P){return ke(P)===rr};Qt.isSuspenseList=function(P){return ke(P)===ar};Qt.isValidElementType=function(P){return typeof P=="string"||typeof P=="function"||P===_n||P===er||P===tr||P===rr||P===ar||P===Cx||typeof P=="object"&&P!==null&&(P.$$typeof===hr||P.$$typeof===or||P.$$typeof===ir||P.$$typeof===sr||P.$$typeof===nr||P.$$typeof===wu||P.getModuleId!==void 0)};Qt.typeOf=ke;Mu.exports=Qt;var Ru=Mu.exports;function Ex(P){function C(j,X,Y,D,z){for(var W=0,H=0,J=0,Q=0,k,et,st=0,rt=0,ot,ft=ot=k=0,at=0,ct=0,Et=0,St=0,Ct=Y.length,vt=Ct-1,Tt,pt="",At="",Dt="",Ht="",Gt;atk)&&(St=(pt=pt.replace(" ",":")).length),0D&&(D=(X=X.trim()).charCodeAt(0)),D){case 38:return X.replace(s,"$1"+j.trim());case 58:return j.trim()+X.replace(s,"$1"+j.trim());default:if(0<1*Y&&0H.charCodeAt(8))break;case 115:z=z.replace(H,"-webkit-"+H)+";"+z;break;case 207:case 102:z=z.replace(H,"-webkit-"+(102Y.charCodeAt(0)&&(Y=Y.trim()),$=Y,Y=[$],01?C-1:0),I=1;I0?" Args: "+A.join(", "):""))}var Yx=function(){function P(A){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=A}var C=P.prototype;return C.indexOfGroup=function(A){for(var I=0,B=0;B=this.groupSizes.length){for(var B=this.groupSizes,G=B.length,v=G;A>=v;)(v<<=1)<0&&$s(16,""+A);this.groupSizes=new Uint32Array(v),this.groupSizes.set(B),this.length=v;for(var m=G;m=this.length||this.groupSizes[A]===0)return I;for(var B=this.groupSizes[A],G=this.indexOfGroup(A),v=G+B,m=G;m=zs&&(zs=C+1),Vn.set(P,C),Jn.set(C,P)},$x="style["+gs+'][data-styled-version="5.3.6"]',Zx=new RegExp("^"+gs+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),Jx=function(P,C,A){for(var I,B=A.split(","),G=0,v=B.length;G=0;a--){var c=t[a];if(c&&c.nodeType===1&&c.hasAttribute(gs))return c}}(A),G=B!==void 0?B.nextSibling:null;I.setAttribute(gs,"active"),I.setAttribute("data-styled-version","5.3.6");var v=Qx();return v&&I.setAttribute("nonce",v),A.insertBefore(I,G),I},kx=function(){function P(A){var I=this.element=Iu(A);I.appendChild(document.createTextNode("")),this.sheet=function(B){if(B.sheet)return B.sheet;for(var G=document.styleSheets,v=0,m=G.length;v=0){var B=document.createTextNode(I),G=this.nodes[A];return this.element.insertBefore(B,G||null),this.length++,!0}return!1},C.deleteRule=function(A){this.element.removeChild(this.nodes[A]),this.length--},C.getRule=function(A){return A0&&(o+=r+",")}),G+=""+a+c+'{content:"'+o+`"}/*!sc*/ +`}}}return G}(this)},P}(),ey=/(a)(d)/gi,ru=function(P){return String.fromCharCode(P+(P>25?39:97))};function Wa(P){var C,A="";for(C=Math.abs(P);C>52;C=C/52|0)A=ru(C%52)+A;return(ru(C%52)+A).replace(ey,"$1-$2")}var fs=function(P,C){for(var A=C.length;A;)P=33*P^C.charCodeAt(--A);return P},bu=function(P){return fs(5381,P)};function iy(P){for(var C=0;C>>0);if(!A.hasNameForId(B,m)){var t=I(v,"."+m,void 0,B);A.insertRules(B,m,t)}G.push(m),this.staticRulesId=m}else{for(var a=this.rules.length,c=fs(this.baseHash,I.hash),o="",r=0;r>>0);if(!A.hasNameForId(B,h)){var s=I(o,"."+h,void 0,B);A.insertRules(B,h,s)}G.push(h)}}return G.join(" ")},P}(),ry=/^\s*\/\/.*$/gm,ay=[":","[",".","#"];function oy(P){var C,A,I,B,G=P===void 0?Di:P,v=G.options,m=v===void 0?Di:v,t=G.plugins,a=t===void 0?Zn:t,c=new Ex(m),o=[],r=function(i){function h(s){if(s)try{i(s+"}")}catch{}}return function(s,l,f,u,d,p,g,y,x,T){switch(s){case 1:if(x===0&&l.charCodeAt(0)===64)return i(l+";"),"";break;case 2:if(y===0)return l+"/*|*/";break;case 3:switch(y){case 102:case 112:return i(f[0]+l),"";default:return l+(T===0?"/*|*/":"")}case-2:l.split("/*|*/}").forEach(h)}}}(function(i){o.push(i)}),n=function(i,h,s){return h===0&&ay.indexOf(s[A.length])!==-1||s.match(B)?i:"."+C};function e(i,h,s,l){l===void 0&&(l="&");var f=i.replace(ry,""),u=h&&s?s+" "+h+" { "+f+" }":f;return C=l,A=h,I=new RegExp("\\"+A+"\\b","g"),B=new RegExp("(\\"+A+"\\b){2,}"),c(s||!h?"":h,u)}return c.use([].concat(a,[function(i,h,s){i===2&&s.length&&s[0].lastIndexOf(A)>0&&(s[0]=s[0].replace(I,n))},r,function(i){if(i===-2){var h=o;return o=[],h}}])),e.hash=a.length?a.reduce(function(i,h){return h.name||$s(15),fs(i,h.name)},5381).toString():"",e}var Gu=qn.createContext();Gu.Consumer;var Nu=qn.createContext(),hy=(Nu.Consumer,new Bu),Ya=oy();function ly(){return ps.useContext(Gu)||hy}function uy(){return ps.useContext(Nu)||Ya}var fy=function(){function P(C,A){var I=this;this.inject=function(B,G){G===void 0&&(G=Ya);var v=I.name+G.hash;B.hasNameForId(I.id,v)||B.insertRules(I.id,v,G(I.rules,v,"@keyframes"))},this.toString=function(){return $s(12,String(I.name))},this.name=C,this.id="sc-keyframes-"+C,this.rules=A}return P.prototype.getName=function(C){return C===void 0&&(C=Ya),this.name+C.hash},P}(),dy=/([A-Z])/,vy=/([A-Z])/g,cy=/^ms-/,py=function(P){return"-"+P.toLowerCase()};function au(P){return dy.test(P)?P.replace(vy,py).replace(cy,"-ms-"):P}var ou=function(P){return P==null||P===!1||P===""};function ms(P,C,A,I){if(Array.isArray(P)){for(var B,G=[],v=0,m=P.length;v1?C-1:0),I=1;I?@[\\\]^`{|}~-]+/g,yy=/(^-|-$)/g;function Ba(P){return P.replace(xy,"-").replace(yy,"")}var Ty=function(P){return Wa(bu(P)>>>0)};function zn(P){return typeof P=="string"&&!0}var Ha=function(P){return typeof P=="function"||typeof P=="object"&&P!==null&&!Array.isArray(P)},Sy=function(P){return P!=="__proto__"&&P!=="constructor"&&P!=="prototype"};function Cy(P,C,A){var I=P[A];Ha(C)&&Ha(I)?zu(I,C):P[A]=C}function zu(P){for(var C=arguments.length,A=new Array(C>1?C-1:0),I=1;I=0||(T[y]=p[y]);return T}(C,["componentId"]),d=f&&f+"-"+(zn(l)?l:Ba(su(l)));return Xu(l,Si({},u,{attrs:r,componentId:d}),A)},Object.defineProperty(e,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(l){this._foldedDefaultProps=I?zu({},P.defaultProps,l):l}}),e.toString=function(){return"."+e.styledComponentId},B&&Vx(e,P,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),e}var jn=function(P){return function C(A,I,B){if(B===void 0&&(B=Di),!Ru.isValidElementType(I))return $s(1,String(I));var G=function(){return A(I,B,gy.apply(void 0,arguments))};return G.withConfig=function(v){return C(A,I,Si({},B,{},v))},G.attrs=function(v){return C(A,I,Si({},B,{attrs:Array.prototype.concat(B.attrs,v).filter(Boolean)}))},G}(Xu,P)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach(function(P){jn[P]=jn(P)});var Vu={exports:{}};(function(P,C){(function(I,B){P.exports=B()})(Tx,()=>(()=>{var A={50792:v=>{var m=Object.prototype.hasOwnProperty,t="~";function a(){}Object.create&&(a.prototype=Object.create(null),new a().__proto__||(t=!1));function c(e,i,h){this.fn=e,this.context=i,this.once=h||!1}function o(e,i,h,s,l){if(typeof h!="function")throw new TypeError("The listener must be a function");var f=new c(h,s||e,l),u=t?t+i:i;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],f]:e._events[u].push(f):(e._events[u]=f,e._eventsCount++),e}function r(e,i){--e._eventsCount===0?e._events=new a:delete e._events[i]}function n(){this._events=new a,this._eventsCount=0}n.prototype.eventNames=function(){var i=[],h,s;if(this._eventsCount===0)return i;for(s in h=this._events)m.call(h,s)&&i.push(t?s.slice(1):s);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(h)):i},n.prototype.listeners=function(i){var h=t?t+i:i,s=this._events[h];if(!s)return[];if(s.fn)return[s.fn];for(var l=0,f=s.length,u=new Array(f);l{/** + * @author samme + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(38829),c=function(o,r,n,e){for(var i=o[0],h=1;h{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(66979),c=function(o,r,n,e,i){return a(o,"angle",r,n,e,i)};v.exports=c},60757:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){for(var o=0;o{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){c===void 0&&(c=0);for(var o=c;o{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){c===void 0&&(c=0);for(var o=t.length-1;o>=c;o--){var r=t[o],n=!0;for(var e in a)r[e]!==a[e]&&(n=!1);if(n)return r}return null};v.exports=m},94420:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(11879),c=t(60461),o=t(95540),r=t(29747),n=t(41481),e=new n({sys:{queueDepthSort:r,events:{once:r}}},0,0,1,1).setOrigin(0,0),i=function(h,s){s===void 0&&(s={});var l=s.hasOwnProperty("width"),f=s.hasOwnProperty("height"),u=o(s,"width",-1),d=o(s,"height",-1),p=o(s,"cellWidth",1),g=o(s,"cellHeight",p),y=o(s,"position",c.TOP_LEFT),x=o(s,"x",0),T=o(s,"y",0),S=0,M=0,w=u*p,L=d*g;e.setPosition(x,T),e.setSize(p,g);for(var F=0;F{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(66979),c=function(o,r,n,e,i){return a(o,"alpha",r,n,e,i)};v.exports=c},67285:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(66979),c=function(o,r,n,e,i){return a(o,"x",r,n,e,i)};v.exports=c},9074:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(66979),c=function(o,r,n,e,i,h,s){return n==null&&(n=r),a(o,"x",r,e,h,s),a(o,"y",n,i,h,s)};v.exports=c},75222:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(66979),c=function(o,r,n,e,i){return a(o,"y",r,n,e,i)};v.exports=c},22983:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c,o){c===void 0&&(c=0),o===void 0&&(o=6.28);for(var r=c,n=(o-c)/t.length,e=a.x,i=a.y,h=a.radius,s=0;s{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c,o){c===void 0&&(c=0),o===void 0&&(o=6.28);for(var r=c,n=(o-c)/t.length,e=a.width/2,i=a.height/2,h=0;h{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(15258),c=t(26708),o=function(r,n,e){var i;e?i=c(n,e,r.length):i=a(n,r.length);for(var h=0;h{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(14649),c=t(86003),o=t(49498),r=function(n,e,i){i===void 0&&(i=0);var h=a(e,!1,n.length);i>0?c(h,i):i<0&&o(h,Math.abs(i));for(var s=0;s{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(84993),c=function(o,r,n){var e=a({x1:r.x1,y1:r.y1,x2:r.x2,y2:r.y2},n),i=a({x1:r.x2,y1:r.y2,x2:r.x3,y2:r.y3},n),h=a({x1:r.x3,y1:r.y3,x2:r.x1,y2:r.y1},n);e.pop(),i.pop(),h.pop(),e=e.concat(i,h);for(var s=e.length/o.length,l=0,f=0;f{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){for(var o=0;o{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c,o,r,n){o===void 0&&(o=0),r===void 0&&(r=0),n===void 0&&(n=1);var e,i=0,h=t.length;if(n===1)for(e=r;e=0;e--)t[e][a]+=c+i*o,i++;return t};v.exports=m},43967:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c,o,r,n){o===void 0&&(o=0),r===void 0&&(r=0),n===void 0&&(n=1);var e,i=0,h=t.length;if(n===1)for(e=r;e=0;e--)t[e][a]=c+i*o,i++;return t};v.exports=m},88926:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(28176),c=function(o,r){for(var n=0;n{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(24820),c=function(o,r){for(var n=0;n{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(65822),c=function(o,r){for(var n=0;n{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(26597),c=function(o,r){for(var n=0;n{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(90260),c=function(o,r){for(var n=0;n{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(66979),c=function(o,r,n,e,i){return a(o,"rotation",r,n,e,i)};v.exports=c},91051:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(1163),c=t(20339),o=function(r,n,e){for(var i=n.x,h=n.y,s=0;s{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(1163),c=function(o,r,n,e){var i=r.x,h=r.y;if(e===0)return o;for(var s=0;s{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(66979),c=function(o,r,n,e,i){return a(o,"scaleX",r,n,e,i)};v.exports=c},94868:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(66979),c=function(o,r,n,e,i,h,s){return n==null&&(n=r),a(o,"scaleX",r,e,h,s),a(o,"scaleY",n,i,h,s)};v.exports=c},95532:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(66979),c=function(o,r,n,e,i){return a(o,"scaleY",r,n,e,i)};v.exports=c},8689:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(43967),c=function(o,r,n,e,i){return a(o,"alpha",r,n,e,i)};v.exports=c},2645:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(43967),c=function(o,r,n,e){return a(o,"blendMode",r,0,n,e)};v.exports=c},32372:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(43967),c=function(o,r,n,e,i){return a(o,"depth",r,n,e,i)};v.exports=c},85373:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){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),c=function(o,r,n,e,i,h,s){return n==null&&(n=r),a(o,"originX",r,e,h,s),a(o,"originY",n,i,h,s),o.forEach(function(l){l.updateDisplayOrigin()}),o};v.exports=c},79939:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(43967),c=function(o,r,n,e,i){return a(o,"rotation",r,n,e,i)};v.exports=c},2699:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(43967),c=function(o,r,n,e,i,h,s){return n==null&&(n=r),a(o,"scaleX",r,e,h,s),a(o,"scaleY",n,i,h,s)};v.exports=c},98739:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(43967),c=function(o,r,n,e,i){return a(o,"scaleX",r,n,e,i)};v.exports=c},98476:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(43967),c=function(o,r,n,e,i){return a(o,"scaleY",r,n,e,i)};v.exports=c},6207:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(43967),c=function(o,r,n,e,i,h,s){return n==null&&(n=r),a(o,"scrollFactorX",r,e,h,s),a(o,"scrollFactorY",n,i,h,s)};v.exports=c},6607:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(43967),c=function(o,r,n,e,i){return a(o,"scrollFactorX",r,n,e,i)};v.exports=c},72248:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(43967),c=function(o,r,n,e,i){return a(o,"scrollFactorY",r,n,e,i)};v.exports=c},14036:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c,o,r){for(var n=0;n{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(43967),c=function(o,r,n,e){return a(o,"visible",r,0,n,e)};v.exports=c},77597:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(43967),c=function(o,r,n,e,i){return a(o,"x",r,n,e,i)};v.exports=c},83194:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(43967),c=function(o,r,n,e,i,h,s){return n==null&&(n=r),a(o,"x",r,e,h,s),a(o,"y",n,i,h,s)};v.exports=c},67678:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(43967),c=function(o,r,n,e,i){return a(o,"y",r,n,e,i)};v.exports=c},35850:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(26099),c=function(o,r,n,e,i){e===void 0&&(e=0),i===void 0&&(i=new a);var h,s,l=o.length;if(l===1)h=o[0].x,s=o[0].y,o[0].x=r,o[0].y=n;else{var f=1,u=0;e===0&&(u=l-1,f=l-2),h=o[u].x,s=o[u].y,o[u].x=r,o[u].y=n;for(var d=0;d=l||f===-1)){var p=o[f],g=p.x,y=p.y;p.x=h,p.y=s,h=g,s=y,e===0?f--:f++}}return i.x=h,i.y=s,i};v.exports=c},8628:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(33680),c=function(o){return a(o)};v.exports=c},21837:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(7602),c=function(o,r,n,e,i){i===void 0&&(i=!1);var h=Math.abs(e-n)/o.length,s;if(i)for(s=0;s{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(54261),c=function(o,r,n,e,i){i===void 0&&(i=!1);var h=Math.abs(e-n)/o.length,s;if(i)for(s=0;s{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c,o,r){if(r===void 0&&(r=!1),t.length===0)return t;if(t.length===1)return r?t[0][a]+=(o+c)/2:t[0][a]=(o+c)/2,t;var n=Math.abs(o-c)/(t.length-1),e;if(r)for(e=0;e{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){for(var a=0;a{/** + * @author Richard Davey + * @author samme + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(15994),c=function(o,r,n){n===void 0&&(n=0);for(var e=0;e{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.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:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(45319),c=t(83419),o=t(74943),r=t(81957),n=t(41138),e=t(35154),i=t(90126),h=new c({initialize:function(l,f,u){this.manager=l,this.key=f,this.type="frame",this.frames=this.getFrames(l.textureManager,e(u,"frames",[]),e(u,"defaultTextureKey",null),e(u,"sortFrames",!0)),this.frameRate=e(u,"frameRate",null),this.duration=e(u,"duration",null),this.msPerFrame,this.skipMissedFrames=e(u,"skipMissedFrames",!0),this.delay=e(u,"delay",0),this.repeat=e(u,"repeat",0),this.repeatDelay=e(u,"repeatDelay",0),this.yoyo=e(u,"yoyo",!1),this.showBeforeDelay=e(u,"showBeforeDelay",!1),this.showOnStart=e(u,"showOnStart",!1),this.hideOnComplete=e(u,"hideOnComplete",!1),this.randomFrame=e(u,"randomFrame",!1),this.paused=!1,this.calculateDuration(this,this.getTotalFrames(),this.duration,this.frameRate),this.manager.on&&(this.manager.on(o.PAUSE_ALL,this.pause,this),this.manager.on(o.RESUME_ALL,this.resume,this))},getTotalFrames:function(){return this.frames.length},calculateDuration:function(s,l,f,u){f===null&&u===null?(s.frameRate=24,s.duration=24/l*1e3):f&&u===null?(s.duration=f,s.frameRate=l/(f/1e3)):(s.frameRate=u,s.duration=l/u*1e3),s.msPerFrame=1e3/s.frameRate},addFrame:function(s){return this.addFrameAt(this.frames.length,s)},addFrameAt:function(s,l){var f=this.getFrames(this.manager.textureManager,l);if(f.length>0){if(s===0)this.frames=f.concat(this.frames);else if(s===this.frames.length)this.frames=this.frames.concat(f);else{var u=this.frames.slice(0,s),d=this.frames.slice(s);this.frames=u.concat(f,d)}this.updateFrameSequence()}return this},checkFrame:function(s){return s>=0&&s0){g.isLast=!0,g.nextFrame=d[0],d[0].prevFrame=g;var b=1/(d.length-1);for(x=0;x0?s.inReverse&&s.forward?s.forward=!1:this.repeatAnimation(s):s.complete():this.updateAndGetNextTick(s,l.nextFrame)},handleYoyoFrame:function(s,l){if(l||(l=!1),s.inReverse===!l&&s.repeatCounter>0){(s.repeatDelay===0||s.pendingRepeat)&&(s.forward=l),this.repeatAnimation(s);return}if(s.inReverse!==l&&s.repeatCounter===0){s.complete();return}s.forward=l;var f=l?s.currentFrame.nextFrame:s.currentFrame.prevFrame;this.updateAndGetNextTick(s,f)},getLastFrame:function(){return this.frames[this.frames.length-1]},previousFrame:function(s){var l=s.currentFrame;l.isFirst?s.yoyo?this.handleYoyoFrame(s,!0):s.repeatCounter>0?s.inReverse&&!s.forward?this.repeatAnimation(s):(s.forward=!0,this.repeatAnimation(s)):s.complete():this.updateAndGetNextTick(s,l.prevFrame)},updateAndGetNextTick:function(s,l){s.setCurrentFrame(l),this.getNextTick(s)},removeFrame:function(s){var l=this.frames.indexOf(s);return l!==-1&&this.removeFrameAt(l),this},removeFrameAt:function(s){return this.frames.splice(s,1),this.updateFrameSequence(),this},repeatAnimation:function(s){if(s._pendingStop===2){if(s._pendingStopValue===0)return s.stop();s._pendingStopValue--}s.repeatDelay>0&&!s.pendingRepeat?(s.pendingRepeat=!0,s.accumulator-=s.nextTick,s.nextTick+=s.repeatDelay):(s.repeatCounter--,s.forward?s.setCurrentFrame(s.currentFrame.nextFrame):s.setCurrentFrame(s.currentFrame.prevFrame),s.isPlaying&&(this.getNextTick(s),s.handleRepeat()))},toJSON:function(){var s={key:this.key,type:this.type,frames:[],frameRate:this.frameRate,duration:this.duration,skipMissedFrames:this.skipMissedFrames,delay:this.delay,repeat:this.repeat,repeatDelay:this.repeatDelay,yoyo:this.yoyo,showBeforeDelay:this.showBeforeDelay,showOnStart:this.showOnStart,randomFrame:this.randomFrame,hideOnComplete:this.hideOnComplete};return this.frames.forEach(function(l){s.frames.push(l.toJSON())}),s},updateFrameSequence:function(){for(var s=this.frames.length,l=1/(s-1),f,u=0;u1?(f.isLast=!0,f.prevFrame=this.frames[s-2],f.nextFrame=this.frames[0]):s>1&&(f.prevFrame=this.frames[u-1],f.nextFrame=this.frames[u+1]);return this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},destroy:function(){this.manager.off&&(this.manager.off(o.PAUSE_ALL,this.pause,this),this.manager.off(o.RESUME_ALL,this.resume,this)),this.manager.remove(this.key);for(var s=0;s{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=new a({initialize:function(r,n,e,i,h){h===void 0&&(h=!1),this.textureKey=r,this.textureFrame=n,this.index=e,this.frame=i,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0,this.isKeyFrame=h},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration,keyframe:this.isKeyFrame}},destroy:function(){this.frame=void 0}});v.exports=c},60848:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(42099),c=t(83419),o=t(90330),r=t(50792),n=t(74943),e=t(8443),i=t(95540),h=t(35154),s=t(36383),l=t(20283),f=t(41836),u=new c({Extends:r,initialize:function(p){r.call(this),this.game=p,this.textureManager=null,this.globalTimeScale=1,this.anims=new o,this.mixes=new o,this.paused=!1,this.name="AnimationManager",p.events.once(e.BOOT,this.boot,this)},boot:function(){this.textureManager=this.game.textures,this.game.events.once(e.DESTROY,this.destroy,this)},addMix:function(d,p,g){var y=this.anims,x=this.mixes,T=typeof d=="string"?d:d.key,S=typeof p=="string"?p:p.key;if(y.has(T)&&y.has(S)){var M=x.get(T);M||(M={}),M[S]=g,x.set(T,M)}return this},removeMix:function(d,p){var g=this.mixes,y=typeof d=="string"?d:d.key,x=g.get(y);if(x)if(p){var T=typeof p=="string"?p:p.key;x.hasOwnProperty(T)&&delete x[T]}else p||g.delete(y);return this},getMix:function(d,p){var g=this.mixes,y=typeof d=="string"?d:d.key,x=typeof p=="string"?p:p.key,T=g.get(y);return T&&T.hasOwnProperty(x)?T[x]:0},add:function(d,p){return this.anims.has(d)?(console.warn("Animation key exists: "+d),this):(p.key=d,this.anims.set(d,p),this.emit(n.ADD_ANIMATION,d,p),this)},exists:function(d){return this.anims.has(d)},createFromAseprite:function(d,p,g){var y=[],x=this.game.cache.json.get(d);if(!x)return console.warn("No Aseprite data found for: "+d),y;var T=this,S=h(x,"meta",null),M=h(x,"frames",null);if(S&&M){var w=h(S,"frameTags",[]);w.forEach(function(L){var F=[],O=i(L,"name",null),b=i(L,"from",0),N=i(L,"to",0),V=i(L,"direction","forward");if(O&&(!p||p&&p.indexOf(O)>-1)){for(var K=0,$=b;$<=N;$++){var j=$.toString(),X=M[j];if(X){var Y=i(X,"duration",s.MAX_SAFE_INTEGER);F.push({key:d,frame:j,duration:Y}),K+=Y}}V==="reverse"&&(F=F.reverse());var D={key:O,frames:F,duration:K,yoyo:V==="pingpong"},z;g?g.anims&&(z=g.anims.create(D)):z=T.create(D),z&&y.push(z)}})}return y},create:function(d){var p=d.key,g=!1;return p&&(g=this.get(p),g?console.warn("AnimationManager key already exists: "+p):(g=new a(this,p,d),this.anims.set(p,g),this.emit(n.ADD_ANIMATION,p,g))),g},fromJSON:function(d,p){p===void 0&&(p=!1),p&&this.anims.clear(),typeof d=="string"&&(d=JSON.parse(d));var g=[];if(d.hasOwnProperty("anims")&&Array.isArray(d.anims)){for(var y=0;y{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(42099),c=t(30976),o=t(83419),r=t(90330),n=t(74943),e=t(95540),i=new o({initialize:function(s){this.parent=s,this.animationManager=s.scene.sys.anims,this.animationManager.on(n.REMOVE_ANIMATION,this.globalRemove,this),this.textureManager=this.animationManager.textureManager,this.anims=null,this.isPlaying=!1,this.hasStarted=!1,this.currentAnim=null,this.currentFrame=null,this.nextAnim=null,this.nextAnimsQueue=[],this.timeScale=1,this.frameRate=0,this.duration=0,this.msPerFrame=0,this.skipMissedFrames=!0,this.randomFrame=!1,this.delay=0,this.repeat=0,this.repeatDelay=0,this.yoyo=!1,this.showBeforeDelay=!1,this.showOnStart=!1,this.hideOnComplete=!1,this.forward=!0,this.inReverse=!1,this.accumulator=0,this.nextTick=0,this.delayCounter=0,this.repeatCounter=0,this.pendingRepeat=!1,this._paused=!1,this._wasPlaying=!1,this._pendingStop=0,this._pendingStopValue},chain:function(h){var s=this.parent;if(h===void 0)return this.nextAnimsQueue.length=0,this.nextAnim=null,s;Array.isArray(h)||(h=[h]);for(var l=0;lu&&(g=0),this.randomFrame&&(g=c(0,u-1));var y=f.frames[g];g===0&&!this.forward&&(y=f.getLastFrame()),this.currentFrame=y}return this.parent},pause:function(h){return this._paused||(this._paused=!0,this._wasPlaying=this.isPlaying,this.isPlaying=!1),h!==void 0&&this.setCurrentFrame(h),this.parent},resume:function(h){return this._paused&&(this._paused=!1,this.isPlaying=this._wasPlaying),h!==void 0&&this.setCurrentFrame(h),this.parent},playAfterDelay:function(h,s){if(!this.isPlaying)this.delayCounter=s,this.play(h,!0);else{var l=this.nextAnim,f=this.nextAnimsQueue;l&&f.unshift(l),this.nextAnim=h,this._pendingStop=1,this._pendingStopValue=s}return this.parent},playAfterRepeat:function(h,s){if(s===void 0&&(s=1),!this.isPlaying)this.play(h);else{var l=this.nextAnim,f=this.nextAnimsQueue;l&&f.unshift(l),this.repeatCounter!==-1&&s>this.repeatCounter&&(s=this.repeatCounter),this.nextAnim=h,this._pendingStop=2,this._pendingStopValue=s}return this.parent},play:function(h,s){s===void 0&&(s=!1);var l=this.currentAnim,f=this.parent,u=typeof h=="string"?h:h.key;if(s&&this.isPlaying&&l.key===u)return f;if(l&&this.isPlaying){var d=this.animationManager.getMix(l.key,h);if(d>0)return this.playAfterDelay(h,d)}return this.forward=!0,this.inReverse=!1,this._paused=!1,this._wasPlaying=!0,this.startAnimation(h)},playReverse:function(h,s){s===void 0&&(s=!1);var l=typeof h=="string"?h:h.key;return s&&this.isPlaying&&this.currentAnim.key===l?this.parent:(this.forward=!1,this.inReverse=!0,this._paused=!1,this._wasPlaying=!0,this.startAnimation(h))},startAnimation:function(h){this.load(h);var s=this.currentAnim,l=this.parent;return s&&(this.repeatCounter=this.repeat===-1?Number.MAX_VALUE:this.repeat,s.getFirstTick(this),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!1,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.delayCounter+=this.delay,this.delayCounter===0?this.handleStart():this.showBeforeDelay&&this.setCurrentFrame(this.currentFrame)),l},handleStart:function(){this.showOnStart&&this.parent.setVisible(!0),this.setCurrentFrame(this.currentFrame),this.hasStarted=!0,this.emitEvents(n.ANIMATION_START)},handleRepeat:function(){this.pendingRepeat=!1,this.emitEvents(n.ANIMATION_REPEAT)},handleStop:function(){this._pendingStop=0,this.isPlaying=!1,this.emitEvents(n.ANIMATION_STOP)},handleComplete:function(){this._pendingStop=0,this.isPlaying=!1,this.hideOnComplete&&this.parent.setVisible(!1),this.emitEvents(n.ANIMATION_COMPLETE,n.ANIMATION_COMPLETE_KEY)},emitEvents:function(h,s){var l=this.currentAnim;if(l){var f=this.currentFrame,u=this.parent,d=f.textureFrame;u.emit(h,l,f,u,d),s&&u.emit(s+l.key,l,f,u,d)}},reverse:function(){return this.isPlaying&&(this.inReverse=!this.inReverse,this.forward=!this.forward),this.parent},getProgress:function(){var h=this.currentFrame;if(!h)return 0;var s=h.progress;return this.inReverse&&(s*=-1),s},setProgress:function(h){return this.forward||(h=1-h),this.setCurrentFrame(this.currentAnim.getFrameByProgress(h)),this.parent},setRepeat:function(h){return this.repeatCounter=h===-1?Number.MAX_VALUE:h,this.parent},globalRemove:function(h,s){s===void 0&&(s=this.currentAnim),this.isPlaying&&s.key===this.currentAnim.key&&(this.stop(),this.setCurrentFrame(this.currentAnim.frames[0]))},restart:function(h,s){h===void 0&&(h=!1),s===void 0&&(s=!1);var l=this.currentAnim,f=this.parent;return l?(s&&(this.repeatCounter=this.repeat===-1?Number.MAX_VALUE:this.repeat),l.getFirstTick(this),this.emitEvents(n.ANIMATION_RESTART),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!h,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.setCurrentFrame(l.frames[0]),this.parent):f},complete:function(){if(this._pendingStop=0,this.isPlaying=!1,this.currentAnim&&this.handleComplete(),this.nextAnim){var h=this.nextAnim;this.nextAnim=this.nextAnimsQueue.length>0?this.nextAnimsQueue.shift():null,this.play(h)}return this.parent},stop:function(){if(this._pendingStop=0,this.isPlaying=!1,this.delayCounter=0,this.currentAnim&&this.handleStop(),this.nextAnim){var h=this.nextAnim;this.nextAnim=this.nextAnimsQueue.shift(),this.play(h)}return this.parent},stopAfterDelay:function(h){return this._pendingStop=1,this._pendingStopValue=h,this.parent},stopAfterRepeat:function(h){return h===void 0&&(h=1),this.repeatCounter!==-1&&h>this.repeatCounter&&(h=this.repeatCounter),this._pendingStop=2,this._pendingStopValue=h,this.parent},stopOnFrame:function(h){return this._pendingStop=3,this._pendingStopValue=h,this.parent},getTotalFrames:function(){return this.currentAnim?this.currentAnim.getTotalFrames():0},update:function(h,s){var l=this.currentAnim;if(!(!this.isPlaying||!l||l.paused)){if(this.accumulator+=s*this.timeScale*this.animationManager.globalTimeScale,this._pendingStop===1&&(this._pendingStopValue-=s,this._pendingStopValue<=0))return this.stop();if(!this.hasStarted)this.accumulator>=this.delayCounter&&(this.accumulator-=this.delayCounter,this.handleStart());else if(this.accumulator>=this.nextTick&&(this.forward?l.nextFrame(this):l.previousFrame(this),this.isPlaying&&this._pendingStop===0&&this.skipMissedFrames&&this.accumulator>this.nextTick)){var f=0;do this.forward?l.nextFrame(this):l.previousFrame(this),f++;while(this.isPlaying&&this.accumulator>this.nextTick&&f<60)}}},setCurrentFrame:function(h){var s=this.parent;return this.currentFrame=h,s.texture=h.frame.texture,s.frame=h.frame,s.isCropped&&s.frame.updateCropUVs(s._crop,s.flipX,s.flipY),h.setAlpha&&(s.alpha=h.alpha),s.setSizeToFrame(),s._originComponent&&(h.frame.customPivot?s.setOrigin(h.frame.pivotX,h.frame.pivotY):s.updateDisplayOrigin()),this.isPlaying&&this.hasStarted&&(this.emitEvents(n.ANIMATION_UPDATE),this._pendingStop===3&&this._pendingStopValue===h&&this.stop()),s},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},get:function(h){return this.anims?this.anims.get(h):null},exists:function(h){return this.anims?this.anims.has(h):!1},create:function(h){var s=h.key,l=!1;return s&&(l=this.get(s),l?console.warn("Animation key already exists: "+s):(l=new a(this,s,h),this.anims||(this.anims=new r),this.anims.set(s,l))),l},createFromAseprite:function(h,s){return this.animationManager.createFromAseprite(h,s,this.parent)},generateFrameNames:function(h,s){return this.animationManager.generateFrameNames(h,s)},generateFrameNumbers:function(h,s){return this.animationManager.generateFrameNumbers(h,s)},remove:function(h){var s=this.get(h);return s&&(this.currentAnim===s&&this.stop(),this.anims.delete(h)),s},destroy:function(){this.animationManager.off(n.REMOVE_ANIMATION,this.globalRemove,this),this.anims&&this.anims.clear(),this.animationManager=null,this.parent=null,this.nextAnim=null,this.nextAnimsQueue.length=0,this.currentAnim=null,this.currentFrame=null},isPaused:{get:function(){return this._paused}}});v.exports=i},57090:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="add"},25312:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="animationcomplete"},89580:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="animationcomplete-"},52860:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="animationrepeat"},63850:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="animationrestart"},99085:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="animationstart"},28087:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="animationstop"},1794:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="animationupdate"},52562:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="pauseall"},57953:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="remove"},68339:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="resumeall"},74943:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.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:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={Animation:t(42099),AnimationFrame:t(41138),AnimationManager:t(60848),AnimationState:t(9674),Events:t(74943)}},2161:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(90330),o=t(50792),r=t(24736),n=new a({initialize:function(){this.entries=new c,this.events=new o},add:function(e,i){return this.entries.set(e,i),this.events.emit(r.ADD,this,e,i),this},has:function(e){return this.entries.has(e)},exists:function(e){return this.entries.has(e)},get:function(e){return this.entries.get(e)},remove:function(e){var i=this.get(e);return i&&(this.entries.delete(e),this.events.emit(r.REMOVE,this,e,i.data)),this},getKeys:function(){return this.entries.keys()},destroy:function(){this.entries.clear(),this.events.removeAllListeners(),this.entries=null,this.events=null}});v.exports=n},24047:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(2161),c=t(83419),o=t(8443),r=new c({initialize:function(e){this.game=e,this.binary=new a,this.bitmapFont=new a,this.json=new a,this.physics=new a,this.shader=new a,this.audio=new a,this.video=new a,this.text=new a,this.html=new a,this.obj=new a,this.tilemap=new a,this.xml=new a,this.custom={},this.game.events.once(o.DESTROY,this.destroy,this)},addCustom:function(n){return this.custom.hasOwnProperty(n)||(this.custom[n]=new a),this.custom[n]},destroy:function(){for(var n=["binary","bitmapFont","json","physics","shader","audio","video","text","html","obj","tilemap","xml"],e=0;e{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="add"},59261:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="remove"},24736:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={ADD:t(51464),REMOVE:t(59261)}},83388:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={BaseCache:t(2161),CacheManager:t(24047),Events:t(24736)}},71911:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(31401),o=t(39506),r=t(50792),n=t(19715),e=t(87841),i=t(61340),h=t(80333),s=t(26099),l=new a({Extends:r,Mixins:[c.AlphaSingle,c.Visible],initialize:function(u,d,p,g){u===void 0&&(u=0),d===void 0&&(d=0),p===void 0&&(p=0),g===void 0&&(g=0),r.call(this),this.scene,this.sceneManager,this.scaleManager,this.cameraManager,this.id=0,this.name="",this.roundPixels=!1,this.useBounds=!1,this.worldView=new e,this.dirty=!0,this._x=u,this._y=d,this._width=p,this._height=g,this._bounds=new e,this._scrollX=0,this._scrollY=0,this._zoomX=1,this._zoomY=1,this._rotation=0,this.matrix=new i,this.transparent=!0,this.backgroundColor=h("rgba(0,0,0,0)"),this.disableCull=!1,this.culledObjects=[],this.midPoint=new s(p/2,g/2),this.originX=.5,this.originY=.5,this._customViewport=!1,this.mask=null,this._maskCamera=null,this.renderList=[],this.isSceneCamera=!0},addToRenderList:function(f){this.renderList.push(f)},setOrigin:function(f,u){return f===void 0&&(f=.5),u===void 0&&(u=f),this.originX=f,this.originY=u,this},getScroll:function(f,u,d){d===void 0&&(d=new s);var p=this.width*.5,g=this.height*.5;return d.x=f-p,d.y=u-g,this.useBounds&&(d.x=this.clampX(d.x),d.y=this.clampY(d.y)),d},centerOnX:function(f){var u=this.width*.5;return this.midPoint.x=f,this.scrollX=f-u,this.useBounds&&(this.scrollX=this.clampX(this.scrollX)),this},centerOnY:function(f){var u=this.height*.5;return this.midPoint.y=f,this.scrollY=f-u,this.useBounds&&(this.scrollY=this.clampY(this.scrollY)),this},centerOn:function(f,u){return this.centerOnX(f),this.centerOnY(u),this},centerToBounds:function(){if(this.useBounds){var f=this._bounds,u=this.width*.5,d=this.height*.5;this.midPoint.set(f.centerX,f.centerY),this.scrollX=f.centerX-u,this.scrollY=f.centerY-d}return this},centerToSize:function(){return this.scrollX=this.width*.5,this.scrollY=this.height*.5,this},cull:function(f){if(this.disableCull)return f;var u=this.matrix.matrix,d=u[0],p=u[1],g=u[2],y=u[3],x=d*y-p*g;if(!x)return f;var T=u[4],S=u[5],M=this.scrollX,w=this.scrollY,L=this.width,F=this.height,O=this.y,b=O+F,N=this.x,V=N+L,K=this.culledObjects,$=f.length;x=1/x,K.length=0;for(var j=0;j<$;++j){var X=f[j];if(!X.hasOwnProperty("width")||X.parentContainer){K.push(X);continue}var Y=X.width,D=X.height,z=X.x-M*X.scrollFactorX-Y*X.originX,W=X.y-w*X.scrollFactorY-D*X.originY,H=z*d+W*g+T,J=z*p+W*y+S,Q=(z+Y)*d+(W+D)*g+T,k=(z+Y)*p+(W+D)*y+S;Q>N&&HO&&Jg&&(f=g),f},clampY:function(f){var u=this._bounds,d=this.displayHeight,p=u.y+(d-this.height)/2,g=Math.max(p,p+u.height-d);return fg&&(f=g),f},removeBounds:function(){return this.useBounds=!1,this.dirty=!0,this._bounds.setEmpty(),this},setAngle:function(f){return f===void 0&&(f=0),this.rotation=o(f),this},setBackgroundColor:function(f){return f===void 0&&(f="rgba(0,0,0,0)"),this.backgroundColor=h(f),this.transparent=this.backgroundColor.alpha===0,this},setBounds:function(f,u,d,p,g){return g===void 0&&(g=!1),this._bounds.setTo(f,u,d,p),this.dirty=!0,this.useBounds=!0,g?this.centerToBounds():(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},getBounds:function(f){f===void 0&&(f=new e);var u=this._bounds;return f.setTo(u.x,u.y,u.width,u.height),f},setName:function(f){return f===void 0&&(f=""),this.name=f,this},setPosition:function(f,u){return u===void 0&&(u=f),this.x=f,this.y=u,this},setRotation:function(f){return f===void 0&&(f=0),this.rotation=f,this},setRoundPixels:function(f){return this.roundPixels=f,this},setScene:function(f,u){u===void 0&&(u=!0),this.scene&&this._customViewport&&this.sceneManager.customViewports--,this.scene=f,this.isSceneCamera=u;var d=f.sys;return this.sceneManager=d.game.scene,this.scaleManager=d.scale,this.cameraManager=d.cameras,this.updateSystem(),this},setScroll:function(f,u){return u===void 0&&(u=f),this.scrollX=f,this.scrollY=u,this},setSize:function(f,u){return u===void 0&&(u=f),this.width=f,this.height=u,this},setViewport:function(f,u,d,p){return this.x=f,this.y=u,this.width=d,this.height=p,this},setZoom:function(f,u){return f===void 0&&(f=1),u===void 0&&(u=f),f===0&&(f=.001),u===0&&(u=.001),this.zoomX=f,this.zoomY=u,this},setMask:function(f,u){return u===void 0&&(u=!0),this.mask=f,this._maskCamera=u?this.cameraManager.default:this,this},clearMask:function(f){return f===void 0&&(f=!1),f&&this.mask&&this.mask.destroy(),this.mask=null,this},toJSON:function(){var f={name:this.name,x:this.x,y:this.y,width:this.width,height:this.height,zoom:this.zoom,rotation:this.rotation,roundPixels:this.roundPixels,scrollX:this.scrollX,scrollY:this.scrollY,backgroundColor:this.backgroundColor.rgba};return this.useBounds&&(f.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),f},update:function(){},setIsSceneCamera:function(f){return this.isSceneCamera=f,this},updateSystem:function(){if(!(!this.scaleManager||!this.isSceneCamera)){var f=this._x!==0||this._y!==0||this.scaleManager.width!==this._width||this.scaleManager.height!==this._height,u=this.sceneManager;f&&!this._customViewport?u.customViewports++:!f&&this._customViewport&&u.customViewports--,this.dirty=!0,this._customViewport=f}},destroy:function(){this.emit(n.DESTROY,this),this.removeAllListeners(),this.matrix.destroy(),this.culledObjects=[],this._customViewport&&this.sceneManager.customViewports--,this.renderList=[],this._bounds=null,this.scene=null,this.scaleManager=null,this.sceneManager=null,this.cameraManager=null},x:{get:function(){return this._x},set:function(f){this._x=f,this.updateSystem()}},y:{get:function(){return this._y},set:function(f){this._y=f,this.updateSystem()}},width:{get:function(){return this._width},set:function(f){this._width=f,this.updateSystem()}},height:{get:function(){return this._height},set:function(f){this._height=f,this.updateSystem()}},scrollX:{get:function(){return this._scrollX},set:function(f){f!==this._scrollX&&(this._scrollX=f,this.dirty=!0)}},scrollY:{get:function(){return this._scrollY},set:function(f){f!==this._scrollY&&(this._scrollY=f,this.dirty=!0)}},zoom:{get:function(){return(this._zoomX+this._zoomY)/2},set:function(f){this._zoomX=f,this._zoomY=f,this.dirty=!0}},zoomX:{get:function(){return this._zoomX},set:function(f){this._zoomX=f,this.dirty=!0}},zoomY:{get:function(){return this._zoomY},set:function(f){this._zoomY=f,this.dirty=!0}},rotation:{get:function(){return this._rotation},set:function(f){this._rotation=f,this.dirty=!0}},centerX:{get:function(){return this.x+.5*this.width}},centerY:{get:function(){return this.y+.5*this.height}},displayWidth:{get:function(){return this.width/this.zoomX}},displayHeight:{get:function(){return this.height/this.zoomY}}});v.exports=l},38058:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(71911),c=t(67502),o=t(45319),r=t(83419),n=t(31401),e=t(20052),i=t(19715),h=t(28915),s=t(87841),l=t(26099),f=new r({Extends:a,Mixins:[n.PostPipeline],initialize:function(d,p,g,y){a.call(this,d,p,g,y),this.initPostPipeline(),this.inputEnabled=!0,this.fadeEffect=new e.Fade(this),this.flashEffect=new e.Flash(this),this.shakeEffect=new e.Shake(this),this.panEffect=new e.Pan(this),this.rotateToEffect=new e.RotateTo(this),this.zoomEffect=new e.Zoom(this),this.lerp=new l(1,1),this.followOffset=new l,this.deadzone=null,this._follow=null},setDeadzone:function(u,d){if(u===void 0)this.deadzone=null;else{if(this.deadzone?(this.deadzone.width=u,this.deadzone.height=d):this.deadzone=new s(0,0,u,d),this._follow){var p=this.width/2,g=this.height/2,y=this._follow.x-this.followOffset.x,x=this._follow.y-this.followOffset.y;this.midPoint.set(y,x),this.scrollX=y-p,this.scrollY=x-g}c(this.deadzone,this.midPoint.x,this.midPoint.y)}return this},fadeIn:function(u,d,p,g,y,x){return this.fadeEffect.start(!1,u,d,p,g,!0,y,x)},fadeOut:function(u,d,p,g,y,x){return this.fadeEffect.start(!0,u,d,p,g,!0,y,x)},fadeFrom:function(u,d,p,g,y,x,T){return this.fadeEffect.start(!1,u,d,p,g,y,x,T)},fade:function(u,d,p,g,y,x,T){return this.fadeEffect.start(!0,u,d,p,g,y,x,T)},flash:function(u,d,p,g,y,x,T){return this.flashEffect.start(u,d,p,g,y,x,T)},shake:function(u,d,p,g,y){return this.shakeEffect.start(u,d,p,g,y)},pan:function(u,d,p,g,y,x,T){return this.panEffect.start(u,d,p,g,y,x,T)},rotateTo:function(u,d,p,g,y,x,T){return this.rotateToEffect.start(u,d,p,g,y,x,T)},zoomTo:function(u,d,p,g,y,x){return this.zoomEffect.start(u,d,p,g,y,x)},preRender:function(){this.renderList.length=0;var u=this.width,d=this.height,p=u*.5,g=d*.5,y=this.zoom,x=this.matrix,T=u*this.originX,S=d*this.originY,M=this._follow,w=this.deadzone,L=this.scrollX,F=this.scrollY;w&&c(w,this.midPoint.x,this.midPoint.y);var O=!1;if(M&&!this.panEffect.isRunning){var b=this.lerp,N=M.x-this.followOffset.x,V=M.y-this.followOffset.y;w?(Nw.right&&(L=h(L,L+(N-w.right),b.x)),Vw.bottom&&(F=h(F,F+(V-w.bottom),b.y))):(L=h(L,N-T,b.x),F=h(F,V-S,b.y)),O=!0}this.useBounds&&(L=this.clampX(L),F=this.clampY(F)),this.scrollX=L,this.scrollY=F;var K=L+p,$=F+g;this.midPoint.set(K,$);var j=u/y,X=d/y,Y=Math.floor(K-j/2),D=Math.floor($-X/2);this.worldView.setTo(Y,D,j,X),x.applyITRS(Math.floor(this.x+T),Math.floor(this.y+S),this.rotation,y,y),x.translate(-T,-S),this.shakeEffect.preRender(),O&&this.emit(i.FOLLOW_UPDATE,this,M)},setLerp:function(u,d){return u===void 0&&(u=1),d===void 0&&(d=u),this.lerp.set(u,d),this},setFollowOffset:function(u,d){return u===void 0&&(u=0),d===void 0&&(d=0),this.followOffset.set(u,d),this},startFollow:function(u,d,p,g,y,x){d===void 0&&(d=!1),p===void 0&&(p=1),g===void 0&&(g=p),y===void 0&&(y=0),x===void 0&&(x=y),this._follow=u,this.roundPixels=d,p=o(p,0,1),g=o(g,0,1),this.lerp.set(p,g),this.followOffset.set(y,x);var T=this.width/2,S=this.height/2,M=u.x-y,w=u.y-x;return this.midPoint.set(M,w),this.scrollX=M-T,this.scrollY=w-S,this.useBounds&&(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},stopFollow:function(){return this._follow=null,this},resetFX:function(){return this.rotateToEffect.reset(),this.panEffect.reset(),this.shakeEffect.reset(),this.flashEffect.reset(),this.fadeEffect.reset(),this},update:function(u,d){this.visible&&(this.rotateToEffect.update(u,d),this.panEffect.update(u,d),this.zoomEffect.update(u,d),this.shakeEffect.update(u,d),this.flashEffect.update(u,d),this.fadeEffect.update(u,d))},destroy:function(){this.resetFX(),a.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});v.exports=f},32743:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(38058),c=t(83419),o=t(95540),r=t(37277),n=t(37303),e=t(97480),i=t(44594),h=new c({initialize:function(l){this.scene=l,this.systems=l.sys,this.roundPixels=l.sys.game.config.roundPixels,this.cameras=[],this.main,this.default,l.sys.events.once(i.BOOT,this.boot,this),l.sys.events.on(i.START,this.start,this)},boot:function(){var s=this.systems;s.settings.cameras?this.fromJSON(s.settings.cameras):this.add(),this.main=this.cameras[0],this.default=new a(0,0,s.scale.width,s.scale.height).setScene(this.scene),s.game.scale.on(e.RESIZE,this.onResize,this),this.systems.events.once(i.DESTROY,this.destroy,this)},start:function(){if(!this.main){var s=this.systems;s.settings.cameras?this.fromJSON(s.settings.cameras):this.add(),this.main=this.cameras[0]}var l=this.systems.events;l.on(i.UPDATE,this.update,this),l.once(i.SHUTDOWN,this.shutdown,this)},add:function(s,l,f,u,d,p){s===void 0&&(s=0),l===void 0&&(l=0),f===void 0&&(f=this.scene.sys.scale.width),u===void 0&&(u=this.scene.sys.scale.height),d===void 0&&(d=!1),p===void 0&&(p="");var g=new a(s,l,f,u);return g.setName(p),g.setScene(this.scene),g.setRoundPixels(this.roundPixels),g.id=this.getNextID(),this.cameras.push(g),d&&(this.main=g),g},addExisting:function(s,l){l===void 0&&(l=!1);var f=this.cameras.indexOf(s);return f===-1?(s.id=this.getNextID(),s.setRoundPixels(this.roundPixels),this.cameras.push(s),l&&(this.main=s),s):null},getNextID:function(){for(var s=this.cameras,l=1,f=0;f<32;f++){for(var u=!1,d=0;d0){p.preRender();var g=this.getVisibleChildren(l.getChildren(),p);s.render(f,g,p)}}},getVisibleChildren:function(s,l){return s.filter(function(f){return f.willRender(l)})},resetAll:function(){for(var s=0;s{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(45319),c=t(83419),o=t(19715),r=new c({initialize:function(e){this.camera=e,this.isRunning=!1,this.isComplete=!1,this.direction=!0,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(n,e,i,h,s,l,f,u){if(n===void 0&&(n=!0),e===void 0&&(e=1e3),i===void 0&&(i=0),h===void 0&&(h=0),s===void 0&&(s=0),l===void 0&&(l=!1),f===void 0&&(f=null),u===void 0&&(u=this.camera.scene),!l&&this.isRunning)return this.camera;this.isRunning=!0,this.isComplete=!1,this.duration=e,this.direction=n,this.progress=0,this.red=i,this.green=h,this.blue=s,this.alpha=n?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=f,this._onUpdateScope=u;var d=n?o.FADE_OUT_START:o.FADE_IN_START;return this.camera.emit(d,this.camera,this,e,i,h,s),this.camera},update:function(n,e){this.isRunning&&(this._elapsed+=e,this.progress=a(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(45319),c=t(83419),o=t(19715),r=new c({initialize:function(e){this.camera=e,this.isRunning=!1,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=1,this.progress=0,this._elapsed=0,this._alpha,this._onUpdate,this._onUpdateScope},start:function(n,e,i,h,s,l,f){return n===void 0&&(n=250),e===void 0&&(e=255),i===void 0&&(i=255),h===void 0&&(h=255),s===void 0&&(s=!1),l===void 0&&(l=null),f===void 0&&(f=this.camera.scene),!s&&this.isRunning?this.camera:(this.isRunning=!0,this.duration=n,this.progress=0,this.red=e,this.green=i,this.blue=h,this._alpha=this.alpha,this._elapsed=0,this._onUpdate=l,this._onUpdateScope=f,this.camera.emit(o.FLASH_START,this.camera,this,n,e,i,h),this.camera)},update:function(n,e){this.isRunning&&(this._elapsed+=e,this.progress=a(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(45319),c=t(83419),o=t(62640),r=t(19715),n=t(26099),e=new c({initialize:function(h){this.camera=h,this.isRunning=!1,this.duration=0,this.source=new n,this.current=new n,this.destination=new n,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(i,h,s,l,f,u,d){s===void 0&&(s=1e3),l===void 0&&(l=o.Linear),f===void 0&&(f=!1),u===void 0&&(u=null),d===void 0&&(d=this.camera.scene);var p=this.camera;return!f&&this.isRunning||(this.isRunning=!0,this.duration=s,this.progress=0,this.source.set(p.scrollX,p.scrollY),this.destination.set(i,h),p.getScroll(i,h,this.current),typeof l=="string"&&o.hasOwnProperty(l)?this.ease=o[l]:typeof l=="function"&&(this.ease=l),this._elapsed=0,this._onUpdate=u,this._onUpdateScope=d,this.camera.emit(r.PAN_START,this.camera,this,s,i,h)),p},update:function(i,h){if(this.isRunning){this._elapsed+=h;var s=a(this._elapsed/this.duration,0,1);this.progress=s;var l=this.camera;if(this._elapsed{/** + * @author Jason Nicholls + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */var a=t(45319),c=t(83419),o=t(19715),r=t(62640),n=new c({initialize:function(i){this.camera=i,this.isRunning=!1,this.duration=0,this.source=0,this.current=0,this.destination=0,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope,this.clockwise=!0,this.shortestPath=!1},start:function(e,i,h,s,l,f,u){h===void 0&&(h=1e3),s===void 0&&(s=r.Linear),l===void 0&&(l=!1),f===void 0&&(f=null),u===void 0&&(u=this.camera.scene),i===void 0&&(i=!1),this.shortestPath=i;var d=e;e<0?(d=-1*e,this.clockwise=!1):this.clockwise=!0;var p=360*Math.PI/180;d=d-Math.floor(d/p)*p;var g=this.camera;if(!l&&this.isRunning)return g;if(this.isRunning=!0,this.duration=h,this.progress=0,this.source=g.rotation,this.destination=d,typeof s=="string"&&r.hasOwnProperty(s)?this.ease=r[s]:typeof s=="function"&&(this.ease=s),this._elapsed=0,this._onUpdate=f,this._onUpdateScope=u,this.shortestPath){var y=0,x=0;this.destination>this.source?y=Math.abs(this.destination-this.source):y=Math.abs(this.destination+p)-this.source,this.source>this.destination?x=Math.abs(this.source-this.destination):x=Math.abs(this.source+p)-this.destination,yx&&(this.clockwise=!1)}return this.camera.emit(o.ROTATE_START,this.camera,this,h,d),g},update:function(e,i){if(this.isRunning){this._elapsed+=i;var h=a(this._elapsed/this.duration,0,1);this.progress=h;var s=this.camera;if(this._elapsed=p?f=Math.abs(d-p):f=Math.abs(d+u)-p;var g=0;this.clockwise?g=s.rotation+f*l:g=s.rotation-f*l,s.rotation=g,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,s,h,g)}else s.rotation=this.destination,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,s,h,this.destination),this.effectComplete()}},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(o.ROTATE_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null,this.source=null,this.destination=null}});v.exports=n},30330:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(45319),c=t(83419),o=t(19715),r=t(26099),n=new c({initialize:function(i){this.camera=i,this.isRunning=!1,this.duration=0,this.intensity=new r,this.progress=0,this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate,this._onUpdateScope},start:function(e,i,h,s,l){return e===void 0&&(e=100),i===void 0&&(i=.05),h===void 0&&(h=!1),s===void 0&&(s=null),l===void 0&&(l=this.camera.scene),!h&&this.isRunning?this.camera:(this.isRunning=!0,this.duration=e,this.progress=0,typeof i=="number"?this.intensity.set(i):this.intensity.set(i.x,i.y),this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate=s,this._onUpdateScope=l,this.camera.emit(o.SHAKE_START,this.camera,this,e,i),this.camera)},preRender:function(){this.isRunning&&this.camera.matrix.translate(this._offsetX,this._offsetY)},update:function(e,i){if(this.isRunning)if(this._elapsed+=i,this.progress=a(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(45319),c=t(83419),o=t(62640),r=t(19715),n=new c({initialize:function(i){this.camera=i,this.isRunning=!1,this.duration=0,this.source=1,this.destination=1,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(e,i,h,s,l,f){i===void 0&&(i=1e3),h===void 0&&(h=o.Linear),s===void 0&&(s=!1),l===void 0&&(l=null),f===void 0&&(f=this.camera.scene);var u=this.camera;return!s&&this.isRunning||(this.isRunning=!0,this.duration=i,this.progress=0,this.source=u.zoom,this.destination=e,typeof h=="string"&&o.hasOwnProperty(h)?this.ease=o[h]:typeof h=="function"&&(this.ease=h),this._elapsed=0,this._onUpdate=l,this._onUpdateScope=f,this.camera.emit(r.ZOOM_START,this.camera,this,i,e)),u},update:function(e,i){this.isRunning&&(this._elapsed+=i,this.progress=a(this._elapsed/this.duration,0,1),this._elapsed{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={Fade:t(5020),Flash:t(10662),Pan:t(20359),Shake:t(30330),RotateTo:t(34208),Zoom:t(45641)}},16438:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="cameradestroy"},32726:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="camerafadeincomplete"},87807:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="camerafadeinstart"},45917:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="camerafadeoutcomplete"},95666:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="camerafadeoutstart"},47056:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="cameraflashcomplete"},91261:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="cameraflashstart"},45047:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="followupdate"},81927:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="camerapancomplete"},74264:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="camerapanstart"},54419:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="postrender"},79330:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="prerender"},93183:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="camerarotatecomplete"},80112:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="camerarotatestart"},62252:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="camerashakecomplete"},86017:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="camerashakestart"},539:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="camerazoomcomplete"},51892:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="camerazoomstart"},19715:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.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:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={Camera:t(38058),BaseCamera:t(71911),CameraManager:t(32743),Effects:t(20052),Events:t(19715)}},63091:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(35154),o=new a({initialize:function(n){this.camera=c(n,"camera",null),this.left=c(n,"left",null),this.right=c(n,"right",null),this.up=c(n,"up",null),this.down=c(n,"down",null),this.zoomIn=c(n,"zoomIn",null),this.zoomOut=c(n,"zoomOut",null),this.zoomSpeed=c(n,"zoomSpeed",.01),this.minZoom=c(n,"minZoom",.001),this.maxZoom=c(n,"maxZoom",1e3),this.speedX=0,this.speedY=0;var e=c(n,"speed",null);typeof e=="number"?(this.speedX=e,this.speedY=e):(this.speedX=c(n,"speed.x",0),this.speedY=c(n,"speed.y",0)),this._zoom=0,this.active=this.camera!==null},start:function(){return this.active=this.camera!==null,this},stop:function(){return this.active=!1,this},setCamera:function(r){return this.camera=r,this},update:function(r){if(this.active){r===void 0&&(r=1);var n=this.camera;this.up&&this.up.isDown?n.scrollY-=this.speedY*r|0:this.down&&this.down.isDown&&(n.scrollY+=this.speedY*r|0),this.left&&this.left.isDown?n.scrollX-=this.speedX*r|0:this.right&&this.right.isDown&&(n.scrollX+=this.speedX*r|0),this.zoomIn&&this.zoomIn.isDown?(n.zoom-=this.zoomSpeed,n.zoomthis.maxZoom&&(n.zoom=this.maxZoom))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});v.exports=o},58818:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(35154),o=new a({initialize:function(n){this.camera=c(n,"camera",null),this.left=c(n,"left",null),this.right=c(n,"right",null),this.up=c(n,"up",null),this.down=c(n,"down",null),this.zoomIn=c(n,"zoomIn",null),this.zoomOut=c(n,"zoomOut",null),this.zoomSpeed=c(n,"zoomSpeed",.01),this.minZoom=c(n,"minZoom",.001),this.maxZoom=c(n,"maxZoom",1e3),this.accelX=0,this.accelY=0;var e=c(n,"acceleration",null);typeof e=="number"?(this.accelX=e,this.accelY=e):(this.accelX=c(n,"acceleration.x",0),this.accelY=c(n,"acceleration.y",0)),this.dragX=0,this.dragY=0;var i=c(n,"drag",null);typeof i=="number"?(this.dragX=i,this.dragY=i):(this.dragX=c(n,"drag.x",0),this.dragY=c(n,"drag.y",0)),this.maxSpeedX=0,this.maxSpeedY=0;var h=c(n,"maxSpeed",null);typeof h=="number"?(this.maxSpeedX=h,this.maxSpeedY=h):(this.maxSpeedX=c(n,"maxSpeed.x",0),this.maxSpeedY=c(n,"maxSpeed.y",0)),this._speedX=0,this._speedY=0,this._zoom=0,this.active=this.camera!==null},start:function(){return this.active=this.camera!==null,this},stop:function(){return this.active=!1,this},setCamera:function(r){return this.camera=r,this},update:function(r){if(this.active){r===void 0&&(r=1);var n=this.camera;this._speedX>0?(this._speedX-=this.dragX*r,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*r,this._speedX>0&&(this._speedX=0)),this._speedY>0?(this._speedY-=this.dragY*r,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*r,this._speedY>0&&(this._speedY=0)),this.up&&this.up.isDown?(this._speedY+=this.accelY,this._speedY>this.maxSpeedY&&(this._speedY=this.maxSpeedY)):this.down&&this.down.isDown&&(this._speedY-=this.accelY,this._speedY<-this.maxSpeedY&&(this._speedY=-this.maxSpeedY)),this.left&&this.left.isDown?(this._speedX+=this.accelX,this._speedX>this.maxSpeedX&&(this._speedX=this.maxSpeedX)):this.right&&this.right.isDown&&(this._speedX-=this.accelX,this._speedX<-this.maxSpeedX&&(this._speedX=-this.maxSpeedX)),this.zoomIn&&this.zoomIn.isDown?this._zoom=-this.zoomSpeed:this.zoomOut&&this.zoomOut.isDown?this._zoom=this.zoomSpeed:this._zoom=0,this._speedX!==0&&(n.scrollX-=this._speedX*r|0),this._speedY!==0&&(n.scrollY-=this._speedY*r|0),this._zoom!==0&&(n.zoom+=this._zoom,n.zoomthis.maxZoom&&(n.zoom=this.maxZoom))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});v.exports=o},38865:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={FixedKeyControl:t(63091),SmoothedKeyControl:t(58818)}},26638:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={Controls:t(38865),Scene2D:t(87969)}},8054:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a={VERSION:"3.80.1",BlendModes:t(10312),ScaleModes:t(29795),AUTO:0,CANVAS:1,WEBGL:2,HEADLESS:3,FOREVER:-1,NONE:4,UP:5,DOWN:6,LEFT:7,RIGHT:8};v.exports=a},69547:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(8054),o=t(42363),r=t(82264),n=t(95540),e=t(35154),i=t(41212),h=t(29747),s=t(75508),l=t(36060),f=t(80333),u=new a({initialize:function(p){p===void 0&&(p={});var g=["#ff0000","#ffff00","#00ff00","#00ffff","#000000"],y="#ffffff",x=e(p,"scale",null);this.width=e(x,"width",1024,p),this.height=e(x,"height",768,p),this.zoom=e(x,"zoom",1,p),this.parent=e(x,"parent",void 0,p),this.scaleMode=e(x,x?"mode":"scaleMode",0,p),this.expandParent=e(x,"expandParent",!0,p),this.autoRound=e(x,"autoRound",!1,p),this.autoCenter=e(x,"autoCenter",0,p),this.resizeInterval=e(x,"resizeInterval",500,p),this.fullscreenTarget=e(x,"fullscreenTarget",null,p),this.minWidth=e(x,"min.width",0,p),this.maxWidth=e(x,"max.width",0,p),this.minHeight=e(x,"min.height",0,p),this.maxHeight=e(x,"max.height",0,p),this.snapWidth=e(x,"snap.width",0,p),this.snapHeight=e(x,"snap.height",0,p),this.renderType=e(p,"type",c.AUTO),this.canvas=e(p,"canvas",null),this.context=e(p,"context",null),this.canvasStyle=e(p,"canvasStyle",null),this.customEnvironment=e(p,"customEnvironment",!1),this.sceneConfig=e(p,"scene",null),this.seed=e(p,"seed",[(Date.now()*Math.random()).toString()]),s.RND=new s.RandomDataGenerator(this.seed),this.gameTitle=e(p,"title",""),this.gameURL=e(p,"url","https://phaser.io"),this.gameVersion=e(p,"version",""),this.autoFocus=e(p,"autoFocus",!0),this.stableSort=e(p,"stableSort",-1),this.stableSort===-1&&(this.stableSort=r.browser.es2019?1:0),r.features.stableSort=this.stableSort,this.domCreateContainer=e(p,"dom.createContainer",!1),this.domPointerEvents=e(p,"dom.pointerEvents","none"),this.inputKeyboard=e(p,"input.keyboard",!0),this.inputKeyboardEventTarget=e(p,"input.keyboard.target",window),this.inputKeyboardCapture=e(p,"input.keyboard.capture",[]),this.inputMouse=e(p,"input.mouse",!0),this.inputMouseEventTarget=e(p,"input.mouse.target",null),this.inputMousePreventDefaultDown=e(p,"input.mouse.preventDefaultDown",!0),this.inputMousePreventDefaultUp=e(p,"input.mouse.preventDefaultUp",!0),this.inputMousePreventDefaultMove=e(p,"input.mouse.preventDefaultMove",!0),this.inputMousePreventDefaultWheel=e(p,"input.mouse.preventDefaultWheel",!0),this.inputTouch=e(p,"input.touch",r.input.touch),this.inputTouchEventTarget=e(p,"input.touch.target",null),this.inputTouchCapture=e(p,"input.touch.capture",!0),this.inputActivePointers=e(p,"input.activePointers",1),this.inputSmoothFactor=e(p,"input.smoothFactor",0),this.inputWindowEvents=e(p,"input.windowEvents",!0),this.inputGamepad=e(p,"input.gamepad",!1),this.inputGamepadEventTarget=e(p,"input.gamepad.target",window),this.disableContextMenu=e(p,"disableContextMenu",!1),this.audio=e(p,"audio",{}),this.hideBanner=e(p,"banner",null)===!1,this.hidePhaser=e(p,"banner.hidePhaser",!1),this.bannerTextColor=e(p,"banner.text",y),this.bannerBackgroundColor=e(p,"banner.background",g),this.gameTitle===""&&this.hidePhaser&&(this.hideBanner=!0),this.fps=e(p,"fps",null),this.disablePreFX=e(p,"disablePreFX",!1),this.disablePostFX=e(p,"disablePostFX",!1);var T=e(p,"render",null);this.pipeline=e(T,"pipeline",null,p),this.autoMobilePipeline=e(T,"autoMobilePipeline",!0,p),this.defaultPipeline=e(T,"defaultPipeline",l.MULTI_PIPELINE,p),this.antialias=e(T,"antialias",!0,p),this.antialiasGL=e(T,"antialiasGL",!0,p),this.mipmapFilter=e(T,"mipmapFilter","",p),this.desynchronized=e(T,"desynchronized",!1,p),this.roundPixels=e(T,"roundPixels",!0,p),this.pixelArt=e(T,"pixelArt",this.zoom!==1,p),this.pixelArt&&(this.antialias=!1,this.antialiasGL=!1,this.roundPixels=!0),this.transparent=e(T,"transparent",!1,p),this.clearBeforeRender=e(T,"clearBeforeRender",!0,p),this.preserveDrawingBuffer=e(T,"preserveDrawingBuffer",!1,p),this.premultipliedAlpha=e(T,"premultipliedAlpha",!0,p),this.failIfMajorPerformanceCaveat=e(T,"failIfMajorPerformanceCaveat",!1,p),this.powerPreference=e(T,"powerPreference","default",p),this.batchSize=e(T,"batchSize",4096,p),this.maxTextures=e(T,"maxTextures",-1,p),this.maxLights=e(T,"maxLights",10,p);var S=e(p,"backgroundColor",0);this.backgroundColor=f(S),this.transparent&&(this.backgroundColor=f(0),this.backgroundColor.alpha=0),this.preBoot=e(p,"callbacks.preBoot",h),this.postBoot=e(p,"callbacks.postBoot",h),this.physics=e(p,"physics",{}),this.defaultPhysicsSystem=e(this.physics,"default",!1),this.loaderBaseURL=e(p,"loader.baseURL",""),this.loaderPath=e(p,"loader.path",""),this.loaderMaxParallelDownloads=e(p,"loader.maxParallelDownloads",r.os.android?6:32),this.loaderCrossOrigin=e(p,"loader.crossOrigin",void 0),this.loaderResponseType=e(p,"loader.responseType",""),this.loaderAsync=e(p,"loader.async",!0),this.loaderUser=e(p,"loader.user",""),this.loaderPassword=e(p,"loader.password",""),this.loaderTimeout=e(p,"loader.timeout",0),this.loaderWithCredentials=e(p,"loader.withCredentials",!1),this.loaderImageLoadType=e(p,"loader.imageLoadType","XHR"),this.loaderLocalScheme=e(p,"loader.localScheme",["file://","capacitor://"]),this.glowFXQuality=e(p,"fx.glow.quality",.1),this.glowFXDistance=e(p,"fx.glow.distance",10),this.installGlobalPlugins=[],this.installScenePlugins=[];var M=e(p,"plugins",null),w=o.DefaultScene;M&&(Array.isArray(M)?this.defaultPlugins=M:i(M)&&(this.installGlobalPlugins=n(M,"global",[]),this.installScenePlugins=n(M,"scene",[]),Array.isArray(M.default)?w=M.default:Array.isArray(M.defaultMerge)&&(w=w.concat(M.defaultMerge)))),this.defaultPlugins=w;var L="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=e(p,"images.default",L+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=e(p,"images.missing",L+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),this.whiteImage=e(p,"images.white","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABdJREFUeNpi/P//PwMMMDEgAdwcgAADAJZuAwXJYZOzAAAAAElFTkSuQmCC"),window&&(window.FORCE_WEBGL?this.renderType=c.WEBGL:window.FORCE_CANVAS&&(this.renderType=c.CANVAS))}});v.exports=u},86054:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(20623),c=t(27919),o=t(8054),r=t(89357),n=function(e){var i=e.config;if((i.customEnvironment||i.canvas)&&i.renderType===o.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!i.customEnvironment&&!i.canvas&&i.renderType!==o.HEADLESS)if(i.renderType===o.AUTO&&(i.renderType=r.webGL?o.WEBGL:o.CANVAS),i.renderType===o.WEBGL){if(!r.webGL)throw new Error("Cannot create WebGL context, aborting.")}else if(i.renderType===o.CANVAS){if(!r.canvas)throw new Error("Cannot create Canvas context, aborting.")}else throw new Error("Unknown value for renderer type: "+i.renderType);i.antialias||c.disableSmoothing();var h=e.scale.baseSize,s=h.width,l=h.height;if(i.canvas?(e.canvas=i.canvas,e.canvas.width=s,e.canvas.height=l):e.canvas=c.create(e,s,l,i.renderType),i.canvasStyle&&(e.canvas.style=i.canvasStyle),i.antialias||a.setCrisp(e.canvas),i.renderType!==o.HEADLESS){var f,u;f=t(68627),u=t(74797),i.renderType===o.WEBGL?e.renderer=new u(e):(e.renderer=new f(e),e.context=e.renderer.gameContext)}};v.exports=n},96391:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(8054),c=function(o){var r=o.config;if(!r.hideBanner){var n="WebGL";r.renderType===a.CANVAS?n="Canvas":r.renderType===a.HEADLESS&&(n="Headless");var e=r.audio,i=o.device.audio,h;if(i.webAudio&&!e.disableWebAudio?h="Web Audio":e.noAudio||!i.webAudio&&!i.audioData?h="No Audio":h="HTML5 Audio",o.device.browser.ie)window.console&&console.log("Phaser v"+a.VERSION+" / https://phaser.io");else{var s="",l=[s];if(Array.isArray(r.bannerBackgroundColor)){var f;r.bannerBackgroundColor.forEach(function(d){s=s.concat("%c "),l.push("background: "+d),f=d}),l[l.length-1]="color: "+r.bannerTextColor+"; background: "+f}else s=s.concat("%c "),l.push("color: "+r.bannerTextColor+"; background: "+r.bannerBackgroundColor);l.push("background: transparent"),r.gameTitle&&(s=s.concat(r.gameTitle),r.gameVersion&&(s=s.concat(" v"+r.gameVersion)),r.hidePhaser||(s=s.concat(" / ")));var u="";r.hidePhaser||(s=s.concat("Phaser v"+a.VERSION+u+" ("+n+" | "+h+")")),s=s.concat(" %c "+r.gameURL),l[0]=s,console.log.apply(console,l)}}};v.exports=c},50127:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(40366),c=t(60848),o=t(24047),r=t(27919),n=t(83419),e=t(69547),i=t(83719),h=t(86054),s=t(45893),l=t(96391),f=t(82264),u=t(57264),d=t(50792),p=t(8443),g=t(7003),y=t(37277),x=t(77332),T=t(76531),S=t(60903),M=t(69442),w=t(17130),L=t(65898),F=t(51085),O=t(14747),b=new n({initialize:function(V){this.config=new e(V),this.renderer=null,this.domContainer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new d,this.anims=new c(this),this.textures=new w(this),this.cache=new o(this),this.registry=new s(this,new d),this.input=new g(this,this.config),this.scene=new S(this,this.config.sceneConfig),this.device=f,this.scale=new T(this,this.config),this.sound=null,this.sound=O.create(this),this.loop=new L(this,this.config.fps),this.plugins=new x(this,this.config),this.pendingDestroy=!1,this.removeCanvas=!1,this.noReturn=!1,this.hasFocus=!1,this.isPaused=!1,u(this.boot.bind(this))},boot:function(){if(!y.hasCore("EventEmitter")){console.warn("Aborting. Core Plugins missing.");return}this.isBooted=!0,this.config.preBoot(this),this.scale.preBoot(),h(this),i(this),l(this),a(this.canvas,this.config.parent),this.textures.once(M.READY,this.texturesReady,this),this.events.emit(p.BOOT)},texturesReady:function(){this.events.emit(p.READY),this.start()},start:function(){this.isRunning=!0,this.config.postBoot(this),this.renderer?this.loop.start(this.step.bind(this)):this.loop.start(this.headlessStep.bind(this)),F(this);var N=this.events;N.on(p.HIDDEN,this.onHidden,this),N.on(p.VISIBLE,this.onVisible,this),N.on(p.BLUR,this.onBlur,this),N.on(p.FOCUS,this.onFocus,this)},step:function(N,V){if(this.pendingDestroy)return this.runDestroy();if(!this.isPaused){var K=this.events;K.emit(p.PRE_STEP,N,V),K.emit(p.STEP,N,V),this.scene.update(N,V),K.emit(p.POST_STEP,N,V);var $=this.renderer;$.preRender(),K.emit(p.PRE_RENDER,$,N,V),this.scene.render($),$.postRender(),K.emit(p.POST_RENDER,$,N,V)}},headlessStep:function(N,V){if(this.pendingDestroy)return this.runDestroy();if(!this.isPaused){var K=this.events;K.emit(p.PRE_STEP,N,V),K.emit(p.STEP,N,V),this.scene.update(N,V),K.emit(p.POST_STEP,N,V),this.scene.isProcessing=!1,K.emit(p.PRE_RENDER,null,N,V),K.emit(p.POST_RENDER,null,N,V)}},onHidden:function(){this.loop.pause(),this.events.emit(p.PAUSE)},pause:function(){var N=this.isPaused;this.isPaused=!0,N||this.events.emit(p.PAUSE)},onVisible:function(){this.loop.resume(),this.events.emit(p.RESUME)},resume:function(){var N=this.isPaused;this.isPaused=!1,N&&this.events.emit(p.RESUME)},onBlur:function(){this.hasFocus=!1,this.loop.blur()},onFocus:function(){this.hasFocus=!0,this.loop.focus()},getFrame:function(){return this.loop.frame},getTime:function(){return this.loop.now},destroy:function(N,V){V===void 0&&(V=!1),this.pendingDestroy=!0,this.removeCanvas=N,this.noReturn=V},runDestroy:function(){this.scene.destroy(),this.events.emit(p.DESTROY),this.events.removeAllListeners(),this.renderer&&this.renderer.destroy(),this.removeCanvas&&this.canvas&&(r.remove(this.canvas),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)),this.domContainer&&this.domContainer.parentNode&&this.domContainer.parentNode.removeChild(this.domContainer),this.loop.destroy(),this.pendingDestroy=!1}});v.exports=b},65898:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(35154),o=t(29747),r=t(43092),n=new a({initialize:function(i,h){this.game=i,this.raf=new r,this.started=!1,this.running=!1,this.minFps=c(h,"min",5),this.targetFps=c(h,"target",60),this.fpsLimit=c(h,"limit",0),this.hasFpsLimit=this.fpsLimit>0,this._limitRate=this.hasFpsLimit?1e3/this.fpsLimit:0,this._min=1e3/this.minFps,this._target=1e3/this.targetFps,this.actualFps=this.targetFps,this.nextFpsUpdate=0,this.framesThisSecond=0,this.callback=o,this.forceSetTimeOut=c(h,"forceSetTimeOut",!1),this.time=0,this.startTime=0,this.lastTime=0,this.frame=0,this.inFocus=!0,this._pauseTime=0,this._coolDown=0,this.delta=0,this.deltaIndex=0,this.deltaHistory=[],this.deltaSmoothingMax=c(h,"deltaHistory",10),this.panicMax=c(h,"panicMax",120),this.rawDelta=0,this.now=0,this.smoothStep=c(h,"smoothStep",!0)},blur:function(){this.inFocus=!1},focus:function(){this.inFocus=!0,this.resetDelta()},pause:function(){this._pauseTime=window.performance.now()},resume:function(){this.resetDelta(),this.startTime+=this.time-this._pauseTime},resetDelta:function(){var e=window.performance.now();this.time=e,this.lastTime=e,this.nextFpsUpdate=e+1e3,this.framesThisSecond=0;for(var i=0;i0||!this.inFocus)&&(this._coolDown--,e=Math.min(e,this._target)),e>this._min&&(e=h[i],e=Math.min(e,this._min)),h[i]=e,this.deltaIndex++,this.deltaIndex>=s&&(this.deltaIndex=0);for(var l=0,f=0;f=this.nextFpsUpdate&&this.updateFPS(e),this.framesThisSecond++,this.delta>=this._limitRate&&(this.callback(e,this.delta),this.delta=0),this.lastTime=e,this.frame++},step:function(e){this.now=e;var i=Math.max(0,e-this.lastTime);this.rawDelta=i,this.time+=this.rawDelta,this.smoothStep&&(i=this.smoothDelta(i)),this.delta=i,e>=this.nextFpsUpdate&&this.updateFPS(e),this.framesThisSecond++,this.callback(e,i),this.lastTime=e,this.frame++},tick:function(){var e=window.performance.now();this.hasFpsLimit?this.stepLimitFPS(e):this.step(e)},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(e){e===void 0&&(e=!1);var i=window.performance.now();if(!this.running){e&&(this.startTime+=-this.lastTime+(this.lastTime+i));var h=this.hasFpsLimit?this.stepLimitFPS.bind(this):this.step.bind(this);this.raf.start(h,this.forceSetTimeOut,this._target),this.running=!0,this.nextFpsUpdate=i+1e3,this.framesThisSecond=0,this.fpsLimitTriggered=!1,this.tick()}},getDuration:function(){return Math.round(this.lastTime-this.startTime)/1e3},getDurationMS:function(){return Math.round(this.lastTime-this.startTime)},stop:function(){return this.running=!1,this.started=!1,this.raf.stop(),this},destroy:function(){this.stop(),this.raf.destroy(),this.raf=null,this.game=null,this.callback=null}});v.exports=n},51085:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(8443),c=function(o){var r,n=o.events;if(document.hidden!==void 0)r="visibilitychange";else{var e=["webkit","moz","ms"];e.forEach(function(h){document[h+"Hidden"]!==void 0&&(document.hidden=function(){return document[h+"Hidden"]},r=h+"visibilitychange")})}var i=function(h){document.hidden||h.type==="pause"?n.emit(a.HIDDEN):n.emit(a.VISIBLE)};r&&document.addEventListener(r,i,!1),window.onblur=function(){n.emit(a.BLUR)},window.onfocus=function(){n.emit(a.FOCUS)},window.focus&&o.config.autoFocus&&window.focus()};v.exports=c},97217:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="blur"},47548:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="boot"},19814:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="contextlost"},68446:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="destroy"},41700:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="focus"},25432:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="hidden"},65942:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="pause"},59211:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="postrender"},47789:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="poststep"},39066:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="prerender"},460:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="prestep"},16175:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="ready"},42331:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="resume"},11966:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="step"},32969:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="systemready"},94830:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="visible"},8443:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.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:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={Config:t(69547),CreateRenderer:t(86054),DebugHeader:t(96391),Events:t(8443),TimeStep:t(65898),VisibilityHandler:t(51085)}},99584:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(5290),c=t(27919),o=t(35154),r=function(n){var e=o(n,"data",[]),i=o(n,"canvas",null),h=o(n,"palette",a),s=o(n,"pixelWidth",1),l=o(n,"pixelHeight",s),f=o(n,"resizeCanvas",!0),u=o(n,"clearCanvas",!0),d=o(n,"preRender",null),p=o(n,"postRender",null),g=Math.floor(Math.abs(e[0].length*s)),y=Math.floor(Math.abs(e.length*l));i||(i=c.create2D(this,g,y),f=!1,u=!1),f&&(i.width=g,i.height=y);var x=i.getContext("2d",{willReadFrequently:!0});u&&x.clearRect(0,0,g,y),d&&d(i,x);for(var T=0;T{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={GenerateTexture:t(99584),Palettes:t(57763)}},5290:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.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:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.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:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.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:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.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:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.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:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={ARNE16:t(5290),C64:t(23816),CGA:t(9866),JMP:t(77552),MSX:t(92259)}},46728:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(36316),o=t(80021),r=t(26099),n=new a({Extends:o,initialize:function(i,h,s,l){o.call(this,"CubicBezierCurve"),Array.isArray(i)&&(l=new r(i[6],i[7]),s=new r(i[4],i[5]),h=new r(i[2],i[3]),i=new r(i[0],i[1])),this.p0=i,this.p1=h,this.p2=s,this.p3=l},getStartPoint:function(e){return e===void 0&&(e=new r),e.copy(this.p0)},getResolution:function(e){return e},getPoint:function(e,i){i===void 0&&(i=new r);var h=this.p0,s=this.p1,l=this.p2,f=this.p3;return i.set(c(e,h.x,s.x,l.x,f.x),c(e,h.y,s.y,l.y,f.y))},draw:function(e,i){i===void 0&&(i=32);var h=this.getPoints(i);e.beginPath(),e.moveTo(this.p0.x,this.p0.y);for(var s=1;s{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(19217),o=t(87841),r=t(26099),n=new a({initialize:function(i){this.type=i,this.defaultDivisions=5,this.arcLengthDivisions=100,this.cacheArcLengths=[],this.needsUpdate=!0,this.active=!0,this._tmpVec2A=new r,this._tmpVec2B=new r},draw:function(e,i){return i===void 0&&(i=32),e.strokePoints(this.getPoints(i))},getBounds:function(e,i){e||(e=new o),i===void 0&&(i=16);var h=this.getLength();i>h&&(i=h/2);var s=Math.max(1,Math.round(h/i));return c(this.getSpacedPoints(s),e)},getDistancePoints:function(e){var i=this.getLength(),h=Math.max(1,i/e);return this.getSpacedPoints(h)},getEndPoint:function(e){return e===void 0&&(e=new r),this.getPointAt(1,e)},getLength:function(){var e=this.getLengths();return e[e.length-1]},getLengths:function(e){if(e===void 0&&(e=this.arcLengthDivisions),this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var i=[],h,s=this.getPoint(0,this._tmpVec2A),l=0;i.push(0);for(var f=1;f<=e;f++)h=this.getPoint(f/e,this._tmpVec2B),l+=h.distance(s),i.push(l),s.copy(h);return this.cacheArcLengths=i,i},getPointAt:function(e,i){var h=this.getUtoTmapping(e);return this.getPoint(h,i)},getPoints:function(e,i,h){h===void 0&&(h=[]),e||(i?e=this.getLength()/i:e=this.defaultDivisions);for(var s=0;s<=e;s++)h.push(this.getPoint(s/e));return h},getRandomPoint:function(e){return e===void 0&&(e=new r),this.getPoint(Math.random(),e)},getSpacedPoints:function(e,i,h){h===void 0&&(h=[]),e||(i?e=this.getLength()/i:e=this.defaultDivisions);for(var s=0;s<=e;s++){var l=this.getUtoTmapping(s/e,null,e);h.push(this.getPoint(l))}return h},getStartPoint:function(e){return e===void 0&&(e=new r),this.getPointAt(0,e)},getTangent:function(e,i){i===void 0&&(i=new r);var h=1e-4,s=e-h,l=e+h;return s<0&&(s=0),l>1&&(l=1),this.getPoint(s,this._tmpVec2A),this.getPoint(l,i),i.subtract(this._tmpVec2A).normalize()},getTangentAt:function(e,i){var h=this.getUtoTmapping(e);return this.getTangent(h,i)},getTFromDistance:function(e,i){return e<=0?0:this.getUtoTmapping(0,e,i)},getUtoTmapping:function(e,i,h){var s=this.getLengths(h),l=0,f=s.length,u;i?u=Math.min(i,s[f-1]):u=e*s[f-1];for(var d=0,p=f-1,g;d<=p;)if(l=Math.floor(d+(p-d)/2),g=s[l]-u,g<0)d=l+1;else if(g>0)p=l-1;else{p=l;break}if(l=p,s[l]===u)return l/(f-1);var y=s[l],x=s[l+1],T=x-y,S=(u-y)/T;return(l+S)/(f-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});v.exports=n},73825:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(80021),o=t(39506),r=t(35154),n=t(43396),e=t(26099),i=new a({Extends:c,initialize:function(s,l,f,u,d,p,g,y){if(typeof s=="object"){var x=s;s=r(x,"x",0),l=r(x,"y",0),f=r(x,"xRadius",0),u=r(x,"yRadius",f),d=r(x,"startAngle",0),p=r(x,"endAngle",360),g=r(x,"clockwise",!1),y=r(x,"rotation",0)}else u===void 0&&(u=f),d===void 0&&(d=0),p===void 0&&(p=360),g===void 0&&(g=!1),y===void 0&&(y=0);c.call(this,"EllipseCurve"),this.p0=new e(s,l),this._xRadius=f,this._yRadius=u,this._startAngle=o(d),this._endAngle=o(p),this._clockwise=g,this._rotation=o(y)},getStartPoint:function(h){return h===void 0&&(h=new e),this.getPoint(0,h)},getResolution:function(h){return h*2},getPoint:function(h,s){s===void 0&&(s=new e);for(var l=Math.PI*2,f=this._endAngle-this._startAngle,u=Math.abs(f)l;)f-=l;f{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(80021),o=t(19217),r=t(87841),n=t(26099),e=new a({Extends:c,initialize:function(h,s){c.call(this,"LineCurve"),Array.isArray(h)&&(s=new n(h[2],h[3]),h=new n(h[0],h[1])),this.p0=h,this.p1=s,this.arcLengthDivisions=1},getBounds:function(i){return i===void 0&&(i=new r),o([this.p0,this.p1],i)},getStartPoint:function(i){return i===void 0&&(i=new n),i.copy(this.p0)},getResolution:function(i){return i===void 0&&(i=1),i},getPoint:function(i,h){return h===void 0&&(h=new n),i===1?h.copy(this.p1):(h.copy(this.p1).subtract(this.p0).scale(i).add(this.p0),h)},getPointAt:function(i,h){return this.getPoint(i,h)},getTangent:function(i,h){return h===void 0&&(h=new n),h.copy(this.p1).subtract(this.p0).normalize(),h},getUtoTmapping:function(i,h,s){var l;if(h){var f=this.getLengths(s),u=f[f.length-1],d=Math.min(h,u);l=d/u}else l=i;return l},draw:function(i){return i.lineBetween(this.p0.x,this.p0.y,this.p1.x,this.p1.y),i},toJSON:function(){return{type:this.type,points:[this.p0.x,this.p0.y,this.p1.x,this.p1.y]}}});e.fromJSON=function(i){var h=i.points,s=new n(h[0],h[1]),l=new n(h[2],h[3]);return new e(s,l)},v.exports=e},14744:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(80021),o=t(32112),r=t(26099),n=new a({Extends:c,initialize:function(i,h,s){c.call(this,"QuadraticBezierCurve"),Array.isArray(i)&&(s=new r(i[4],i[5]),h=new r(i[2],i[3]),i=new r(i[0],i[1])),this.p0=i,this.p1=h,this.p2=s},getStartPoint:function(e){return e===void 0&&(e=new r),e.copy(this.p0)},getResolution:function(e){return e},getPoint:function(e,i){i===void 0&&(i=new r);var h=this.p0,s=this.p1,l=this.p2;return i.set(o(e,h.x,s.x,l.x),o(e,h.y,s.y,l.y))},draw:function(e,i){i===void 0&&(i=32);var h=this.getPoints(i);e.beginPath(),e.moveTo(this.p0.x,this.p0.y);for(var s=1;s{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(87842),c=t(83419),o=t(80021),r=t(26099),n=new c({Extends:o,initialize:function(i){i===void 0&&(i=[]),o.call(this,"SplineCurve"),this.points=[],this.addPoints(i)},addPoints:function(e){for(var i=0;ih.length-2?h.length-1:l+1],g=h[l>h.length-3?h.length-1:l+2];return i.set(a(f,u.x,d.x,p.x,g.x),a(f,u.y,d.y,p.y,g.y))},toJSON:function(){for(var e=[],i=0;i{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.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:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(26099),o=new a({initialize:function(n,e){this.active=!1,this.p0=new c(n,e)},getPoint:function(r,n){return n===void 0&&(n=new c),n.copy(this.p0)},getPointAt:function(r,n){return this.getPoint(r,n)},getResolution:function(){return 1},getLength:function(){return 0},toJSON:function(){return{type:"MoveTo",points:[this.p0.x,this.p0.y]}}});v.exports=o},46669:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(46728),o=t(73825),r=t(39429),n=t(33951),e=t(68618),i=t(14744),h=t(87841),s=t(42534),l=t(26099),f=t(36383),u=new a({initialize:function(p,g){p===void 0&&(p=0),g===void 0&&(g=0),this.name="",this.defaultDivisions=12,this.curves=[],this.cacheLengths=[],this.autoClose=!1,this.startPoint=new l,this._tmpVec2A=new l,this._tmpVec2B=new l,typeof p=="object"?this.fromJSON(p):this.startPoint.set(p,g)},add:function(d){return this.curves.push(d),this},circleTo:function(d,p,g){return p===void 0&&(p=!1),this.ellipseTo(d,d,0,360,p,g)},closePath:function(){var d=this.curves[0].getPoint(0),p=this.curves[this.curves.length-1].getPoint(1);return d.equals(p)||this.curves.push(new n(p,d)),this},cubicBezierTo:function(d,p,g,y,x,T){var S=this.getEndPoint(),M,w,L;return d instanceof l?(M=d,w=p,L=g):(M=new l(g,y),w=new l(x,T),L=new l(d,p)),this.add(new c(S,M,w,L))},quadraticBezierTo:function(d,p,g,y){var x=this.getEndPoint(),T,S;return d instanceof l?(T=d,S=p):(T=new l(g,y),S=new l(d,p)),this.add(new i(x,T,S))},draw:function(d,p){for(var g=0;g=p)return this.curves[y];y++}return null},getEndPoint:function(d){return d===void 0&&(d=new l),this.curves.length>0?this.curves[this.curves.length-1].getPoint(1,d):d.copy(this.startPoint),d},getLength:function(){var d=this.getCurveLengths();return d[d.length-1]},getPoint:function(d,p){p===void 0&&(p=new l);for(var g=d*this.getLength(),y=this.getCurveLengths(),x=0;x=g){var T=y[x]-g,S=this.curves[x],M=S.getLength(),w=M===0?0:1-T/M;return S.getPointAt(w,p)}x++}return null},getPoints:function(d,p){!d&&!p&&(d=this.defaultDivisions);for(var g=[],y,x=0;x1&&!g[g.length-1].equals(g[0])&&g.push(g[0]),g},getRandomPoint:function(d){return d===void 0&&(d=new l),this.getPoint(Math.random(),d)},getSpacedPoints:function(d){d===void 0&&(d=40);for(var p=[],g=0;g<=d;g++)p.push(this.getPoint(g/d));return this.autoClose&&p.push(p[0]),p},getStartPoint:function(d){return d===void 0&&(d=new l),d.copy(this.startPoint)},getTangent:function(d,p){p===void 0&&(p=new l);for(var g=d*this.getLength(),y=this.getCurveLengths(),x=0;x=g){var T=y[x]-g,S=this.curves[x],M=S.getLength(),w=M===0?0:1-T/M;return S.getTangentAt(w,p)}x++}return null},lineTo:function(d,p){d instanceof l?this._tmpVec2B.copy(d):typeof d=="object"?this._tmpVec2B.setFromObject(d):this._tmpVec2B.set(d,p);var g=this.getEndPoint(this._tmpVec2A);return this.add(new n([g.x,g.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(d){return d.unshift(this.getEndPoint()),this.add(new s(d))},moveTo:function(d,p){return d instanceof l?this.add(new e(d.x,d.y)):this.add(new e(d,p))},toJSON:function(){for(var d=[],p=0;p{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(24882),o=new a({initialize:function(n,e){this.parent=n,this.events=e,e||(this.events=n.events?n.events:n),this.list={},this.values={},this._frozen=!1,!n.hasOwnProperty("sys")&&this.events&&this.events.once(c.DESTROY,this.destroy,this)},get:function(r){var n=this.list;if(Array.isArray(r)){for(var e=[],i=0;i{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(45893),o=t(37277),r=t(44594),n=new a({Extends:c,initialize:function(i){c.call(this,i,i.sys.events),this.scene=i,this.systems=i.sys,i.sys.events.once(r.BOOT,this.boot,this),i.sys.events.on(r.START,this.start,this)},boot:function(){this.events=this.systems.events,this.events.once(r.DESTROY,this.destroy,this)},start:function(){this.events.once(r.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.systems.events.off(r.SHUTDOWN,this.shutdown,this)},destroy:function(){c.prototype.destroy.call(this),this.events.off(r.START,this.start,this),this.scene=null,this.systems=null}});o.register("DataManagerPlugin",n,"data"),v.exports=n},10700:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="changedata"},93608:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="changedata-"},60883:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="destroy"},69780:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="removedata"},22166:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="setdata"},24882:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={CHANGE_DATA:t(10700),CHANGE_DATA_KEY:t(93608),DESTROY:t(60883),REMOVE_DATA:t(69780),SET_DATA:t(22166)}},44965:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={DataManager:t(45893),DataManagerPlugin:t(63646),Events:t(24882)}},7098:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(84148),c={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 c;c.audioData=!!window.Audio,c.webAudio=!!(window.AudioContext||window.webkitAudioContext);var r=document.createElement("audio"),n=!!r.canPlayType;try{if(n){var e=function(s,l){var f=r.canPlayType("audio/"+s).replace(/^no$/,"");return l?!!(f||r.canPlayType("audio/"+l).replace(/^no$/,"")):!!f};if(c.ogg=e('ogg; codecs="vorbis"'),c.opus=e('ogg; codecs="opus"',"opus"),c.mp3=e("mpeg"),c.wav=e("wav"),c.m4a=e("x-m4a"),c.aac=e("aac"),c.flac=e("flac","x-flac"),c.webm=e('webm; codecs="vorbis"'),r.canPlayType('audio/mp4; codecs="ec-3"')!==""){if(a.edge)c.dolby=!0;else if(a.safari&&a.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var i=parseInt(RegExp.$1,10),h=parseInt(RegExp.$2,10);(i===10&&h>=11||i>10)&&(c.dolby=!0)}}}}catch{}return c}v.exports=o()},84148:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(25892),c={chrome:!1,chromeVersion:0,edge:!1,firefox:!1,firefoxVersion:0,ie:!1,ieVersion:0,mobileSafari:!1,opera:!1,safari:!1,safariVersion:0,silk:!1,trident:!1,tridentVersion:0,es2019:!1};function o(){var r=navigator.userAgent;return/Edg\/\d+/.test(r)?(c.edge=!0,c.es2019=!0):/OPR/.test(r)?(c.opera=!0,c.es2019=!0):/Chrome\/(\d+)/.test(r)&&!a.windowsPhone?(c.chrome=!0,c.chromeVersion=parseInt(RegExp.$1,10),c.es2019=c.chromeVersion>69):/Firefox\D+(\d+)/.test(r)?(c.firefox=!0,c.firefoxVersion=parseInt(RegExp.$1,10),c.es2019=c.firefoxVersion>10):/AppleWebKit\/(?!.*CriOS)/.test(r)&&a.iOS?(c.mobileSafari=!0,c.es2019=!0):/MSIE (\d+\.\d+);/.test(r)?(c.ie=!0,c.ieVersion=parseInt(RegExp.$1,10)):/Version\/(\d+\.\d+(\.\d+)?) Safari/.test(r)&&!a.windowsPhone?(c.safari=!0,c.safariVersion=parseInt(RegExp.$1,10),c.es2019=c.safariVersion>10):/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(r)&&(c.ie=!0,c.trident=!0,c.tridentVersion=parseInt(RegExp.$1,10),c.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(r)&&(c.silk=!0),c}v.exports=o()},89289:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(27919),c={supportInverseAlpha:!1,supportNewBlendModes:!1};function o(){var e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",i="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",h=new Image;return h.onload=function(){var s=new Image;s.onload=function(){var l=a.create2D(s,6),f=l.getContext("2d",{willReadFrequently:!0});if(f.globalCompositeOperation="multiply",f.drawImage(h,0,0),f.drawImage(s,2,0),!f.getImageData(2,0,1,1))return!1;var u=f.getImageData(2,0,1,1).data;a.remove(s),c.supportNewBlendModes=u[0]===255&&u[1]===0&&u[2]===0},s.src=e+"/wCKxvRF"+i},h.src=e+"AP804Oa6"+i,!1}function r(){var e=a.create2D(this,2),i=e.getContext("2d",{willReadFrequently:!0});i.fillStyle="rgba(10, 20, 30, 0.5)",i.fillRect(0,0,1,1);var h=i.getImageData(0,0,1,1);if(h===null)return!1;i.putImageData(h,1,0);var s=i.getImageData(1,0,1,1),l=s.data[0]===h.data[0]&&s.data[1]===h.data[1]&&s.data[2]===h.data[2]&&s.data[3]===h.data[3];return a.remove(this),l}function n(){return typeof importScripts!="function"&&document!==void 0&&(c.supportNewBlendModes=o(),c.supportInverseAlpha=r()),c}v.exports=n()},89357:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(25892),c=t(84148),o=t(27919),r={canvas:!1,canvasBitBltShift:null,file:!1,fileSystem:!1,getUserMedia:!0,littleEndian:!1,localStorage:!1,pointerLock:!1,stableSort:!1,support32bit:!1,vibration:!1,webGL:!1,worker:!1};function n(){var i=new ArrayBuffer(4),h=new Uint8Array(i),s=new Uint32Array(i);return h[0]=161,h[1]=178,h[2]=195,h[3]=212,s[0]===3569595041?!0:s[0]===2712847316?!1:null}function e(){if(typeof importScripts=="function")return r;r.canvas=!!window.CanvasRenderingContext2D;try{r.localStorage=!!localStorage.getItem}catch{r.localStorage=!1}r.file=!!window.File&&!!window.FileReader&&!!window.FileList&&!!window.Blob,r.fileSystem=!!window.requestFileSystem;var i=!1,h=function(){if(window.WebGLRenderingContext)try{var s=o.createWebGL(this),l=s.getContext("webgl")||s.getContext("experimental-webgl"),f=o.create2D(this),u=f.getContext("2d",{willReadFrequently:!0}),d=u.createImageData(1,1);return i=d.data instanceof Uint8ClampedArray,o.remove(s),o.remove(f),!!l}catch{return!1}return!1};return r.webGL=h(),r.worker=!!window.Worker,r.pointerLock="pointerLockElement"in document||"mozPointerLockElement"in document||"webkitPointerLockElement"in document,navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia||navigator.oGetUserMedia,window.URL=window.URL||window.webkitURL||window.mozURL||window.msURL,r.getUserMedia=r.getUserMedia&&!!navigator.getUserMedia&&!!window.URL,c.firefox&&c.firefoxVersion<21&&(r.getUserMedia=!1),!a.iOS&&(c.ie||c.firefox||c.chrome)&&(r.canvasBitBltShift=!0),(c.safari||c.mobileSafari)&&(r.canvasBitBltShift=!1),navigator.vibrate=navigator.vibrate||navigator.webkitVibrate||navigator.mozVibrate||navigator.msVibrate,navigator.vibrate&&(r.vibration=!0),typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&typeof Uint32Array<"u"&&(r.littleEndian=n()),r.support32bit=typeof ArrayBuffer<"u"&&typeof Uint8ClampedArray<"u"&&typeof Int32Array<"u"&&r.littleEndian!==null&&i,r}v.exports=e()},91639:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m={available:!1,cancel:"",keyboard:!1,request:""};function t(){if(typeof importScripts=="function")return m;var a,c="Fullscreen",o="FullScreen",r=["request"+c,"request"+o,"webkitRequest"+c,"webkitRequest"+o,"msRequest"+c,"msRequest"+o,"mozRequest"+o,"mozRequest"+c];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),c={gamepads:!1,mspointer:!1,touch:!1,wheelEvent:null};function o(){return typeof importScripts=="function"||(("ontouchstart"in document.documentElement||navigator.maxTouchPoints&&navigator.maxTouchPoints>=1)&&(c.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(c.mspointer=!0),navigator.getGamepads&&(c.gamepads=!0),"onwheel"in window||a.ie&&"WheelEvent"in window?c.wheelEvent="wheel":"onmousewheel"in window?c.wheelEvent="mousewheel":a.firefox&&"MouseScrollEvent"in window&&(c.wheelEvent="DOMMouseScroll")),c}v.exports=o()},25892:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m={android:!1,chromeOS:!1,cordova:!1,crosswalk:!1,desktop:!1,ejecta:!1,electron:!1,iOS:!1,iOSVersion:0,iPad:!1,iPhone:!1,kindle:!1,linux:!1,macOS:!1,node:!1,nodeWebkit:!1,pixelRatio:1,webApp:!1,windows:!1,windowsPhone:!1};function t(){if(typeof importScripts=="function")return m;var a=navigator.userAgent;/Windows/.test(a)?m.windows=!0:/Mac OS/.test(a)&&!/like Mac OS/.test(a)?navigator.maxTouchPoints&&navigator.maxTouchPoints>2?(m.iOS=!0,m.iPad=!0,navigator.appVersion.match(/Version\/(\d+)/),m.iOSVersion=parseInt(RegExp.$1,10)):m.macOS=!0:/Android/.test(a)?m.android=!0:/Linux/.test(a)?m.linux=!0:/iP[ao]d|iPhone/i.test(a)?(m.iOS=!0,navigator.appVersion.match(/OS (\d+)/),m.iOSVersion=parseInt(RegExp.$1,10),m.iPhone=a.toLowerCase().indexOf("iphone")!==-1,m.iPad=a.toLowerCase().indexOf("ipad")!==-1):/Kindle/.test(a)||/\bKF[A-Z][A-Z]+/.test(a)||/Silk.*Mobile Safari/.test(a)?m.kindle=!0:/CrOS/.test(a)&&(m.chromeOS=!0),(/Windows Phone/i.test(a)||/IEMobile/i.test(a))&&(m.android=!1,m.iOS=!1,m.macOS=!1,m.windows=!0,m.windowsPhone=!0);var c=/Silk/.test(a);return(m.windows||m.macOS||m.linux&&!c||m.chromeOS)&&(m.desktop=!0),(m.windowsPhone||/Windows NT/i.test(a)&&/Touch/i.test(a))&&(m.desktop=!1),navigator.standalone&&(m.webApp=!0),typeof importScripts!="function"&&(window.cordova!==void 0&&(m.cordova=!0),window.ejecta!==void 0&&(m.ejecta=!0)),typeof process<"u"&&process.versions&&process.versions.node&&(m.node=!0),m.node&&typeof process.versions=="object"&&(m.nodeWebkit=!!process.versions["node-webkit"],m.electron=!!process.versions.electron),/Crosswalk/.test(a)&&(m.crosswalk=!0),m.pixelRatio=window.devicePixelRatio||1,m}v.exports=t()},43267:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(95540),c={h264:!1,hls:!1,mp4:!1,m4v:!1,ogg:!1,vp9:!1,webm:!1,hasRequestVideoFrame:!1};function o(){if(typeof importScripts=="function")return c;var r=document.createElement("video"),n=!!r.canPlayType,e=/^no$/;try{n&&(r.canPlayType('video/ogg; codecs="theora"').replace(e,"")&&(c.ogg=!0),r.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(e,"")&&(c.h264=!0,c.mp4=!0),r.canPlayType("video/x-m4v").replace(e,"")&&(c.m4v=!0),r.canPlayType('video/webm; codecs="vp8, vorbis"').replace(e,"")&&(c.webm=!0),r.canPlayType('video/webm; codecs="vp9"').replace(e,"")&&(c.vp9=!0),r.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(e,"")&&(c.hls=!0))}catch{}return r.parentNode&&r.parentNode.removeChild(r),c.getVideoURL=function(i){Array.isArray(i)||(i=[i]);for(var h=0;h{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.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:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=new Float32Array(20),o=new a({initialize:function(){this._matrix=new Float32Array(20),this.alpha=1,this._dirty=!0,this._data=new Float32Array(20),this.reset()},set:function(r){return this._matrix.set(r),this._dirty=!0,this},reset:function(){var r=this._matrix;return r.fill(0),r[0]=1,r[6]=1,r[12]=1,r[18]=1,this.alpha=1,this._dirty=!0,this},getData:function(){var r=this._data;return this._dirty&&(r.set(this._matrix),r[4]/=255,r[9]/=255,r[14]/=255,r[19]/=255,this._dirty=!1),r},brightness:function(r,n){r===void 0&&(r=0),n===void 0&&(n=!1);var e=r;return this.multiply([e,0,0,0,0,0,e,0,0,0,0,0,e,0,0,0,0,0,1,0],n)},saturate:function(r,n){r===void 0&&(r=0),n===void 0&&(n=!1);var e=r*2/3+1,i=(e-1)*-.5;return this.multiply([e,i,i,0,0,i,e,i,0,0,i,i,e,0,0,0,0,0,1,0],n)},desaturate:function(r){return r===void 0&&(r=!1),this.saturate(-1,r)},hue:function(r,n){r===void 0&&(r=0),n===void 0&&(n=!1),r=r/180*Math.PI;var e=Math.cos(r),i=Math.sin(r),h=.213,s=.715,l=.072;return this.multiply([h+e*(1-h)+i*-h,s+e*-s+i*-s,l+e*-l+i*(1-l),0,0,h+e*-h+i*.143,s+e*(1-s)+i*.14,l+e*-l+i*-.283,0,0,h+e*-h+i*-(1-h),s+e*-s+i*s,l+e*(1-l)+i*l,0,0,0,0,0,1,0],n)},grayscale:function(r,n){return r===void 0&&(r=1),n===void 0&&(n=!1),this.saturate(-r,n)},blackWhite:function(r){return r===void 0&&(r=!1),this.multiply(o.BLACK_WHITE,r)},contrast:function(r,n){r===void 0&&(r=0),n===void 0&&(n=!1);var e=r+1,i=-.5*(e-1);return this.multiply([e,0,0,0,i,0,e,0,0,i,0,0,e,0,i,0,0,0,1,0],n)},negative:function(r){return r===void 0&&(r=!1),this.multiply(o.NEGATIVE,r)},desaturateLuminance:function(r){return r===void 0&&(r=!1),this.multiply(o.DESATURATE_LUMINANCE,r)},sepia:function(r){return r===void 0&&(r=!1),this.multiply(o.SEPIA,r)},night:function(r,n){return r===void 0&&(r=.1),n===void 0&&(n=!1),this.multiply([r*-2,-r,0,0,0,-r,0,r,0,0,0,r,r*2,0,0,0,0,0,1,0],n)},lsd:function(r){return r===void 0&&(r=!1),this.multiply(o.LSD,r)},brown:function(r){return r===void 0&&(r=!1),this.multiply(o.BROWN,r)},vintagePinhole:function(r){return r===void 0&&(r=!1),this.multiply(o.VINTAGE,r)},kodachrome:function(r){return r===void 0&&(r=!1),this.multiply(o.KODACHROME,r)},technicolor:function(r){return r===void 0&&(r=!1),this.multiply(o.TECHNICOLOR,r)},polaroid:function(r){return r===void 0&&(r=!1),this.multiply(o.POLAROID,r)},shiftToBGR:function(r){return r===void 0&&(r=!1),this.multiply(o.SHIFT_BGR,r)},multiply:function(r,n){n===void 0&&(n=!1),n||this.reset();var e=this._matrix,i=c;return i.set(e),e.set([i[0]*r[0]+i[1]*r[5]+i[2]*r[10]+i[3]*r[15],i[0]*r[1]+i[1]*r[6]+i[2]*r[11]+i[3]*r[16],i[0]*r[2]+i[1]*r[7]+i[2]*r[12]+i[3]*r[17],i[0]*r[3]+i[1]*r[8]+i[2]*r[13]+i[3]*r[18],i[0]*r[4]+i[1]*r[9]+i[2]*r[14]+i[3]*r[19]+i[4],i[5]*r[0]+i[6]*r[5]+i[7]*r[10]+i[8]*r[15],i[5]*r[1]+i[6]*r[6]+i[7]*r[11]+i[8]*r[16],i[5]*r[2]+i[6]*r[7]+i[7]*r[12]+i[8]*r[17],i[5]*r[3]+i[6]*r[8]+i[7]*r[13]+i[8]*r[18],i[5]*r[4]+i[6]*r[9]+i[7]*r[14]+i[8]*r[19]+i[9],i[10]*r[0]+i[11]*r[5]+i[12]*r[10]+i[13]*r[15],i[10]*r[1]+i[11]*r[6]+i[12]*r[11]+i[13]*r[16],i[10]*r[2]+i[11]*r[7]+i[12]*r[12]+i[13]*r[17],i[10]*r[3]+i[11]*r[8]+i[12]*r[13]+i[13]*r[18],i[10]*r[4]+i[11]*r[9]+i[12]*r[14]+i[13]*r[19]+i[14],i[15]*r[0]+i[16]*r[5]+i[17]*r[10]+i[18]*r[15],i[15]*r[1]+i[16]*r[6]+i[17]*r[11]+i[18]*r[16],i[15]*r[2]+i[16]*r[7]+i[17]*r[12]+i[18]*r[17],i[15]*r[3]+i[16]*r[8]+i[17]*r[13]+i[18]*r[18],i[15]*r[4]+i[16]*r[9]+i[17]*r[14]+i[18]*r[19]+i[19]]),this._dirty=!0,this}});o.BLACK_WHITE=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],o.NEGATIVE=[-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],o.DESATURATE_LUMINANCE=[.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,0,0,0,1,0],o.SEPIA=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],o.LSD=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],o.BROWN=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],o.VINTAGE=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],o.KODACHROME=[1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0],o.TECHNICOLOR=[1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0],o.POLAROID=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],o.SHIFT_BGR=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],v.exports=o},51767:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(29747),o=new a({initialize:function(n,e,i){this._rgb=[0,0,0],this.onChangeCallback=c,this.dirty=!1,this.set(n,e,i)},set:function(r,n,e){return r===void 0&&(r=0),n===void 0&&(n=0),e===void 0&&(e=0),this._rgb=[r,n,e],this.onChange(),this},equals:function(r,n,e){var i=this._rgb;return i[0]===r&&i[1]===n&&i[2]===e},onChange:function(){this.dirty=!0;var r=this._rgb;this.onChangeCallback.call(this,r[0],r[1],r[2])},r:{get:function(){return this._rgb[0]},set:function(r){this._rgb[0]=r,this.onChange()}},g:{get:function(){return this._rgb[1]},set:function(r){this._rgb[1]=r,this.onChange()}},b:{get:function(){return this._rgb[2]},set:function(r){this._rgb[2]=r,this.onChange()}},destroy:function(){this.onChangeCallback=null}});v.exports=o},60461:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m={TOP_LEFT:0,TOP_CENTER:1,TOP_RIGHT:2,LEFT_TOP:3,LEFT_CENTER:4,LEFT_BOTTOM:5,CENTER:6,RIGHT_TOP:7,RIGHT_CENTER:8,RIGHT_BOTTOM:9,BOTTOM_LEFT:10,BOTTOM_CENTER:11,BOTTOM_RIGHT:12};v.exports=m},54312:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(62235),c=t(35893),o=t(86327),r=t(88417),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),r(e,c(i)+h),o(e,a(i)+s),e};v.exports=n},46768:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(62235),c=t(26541),o=t(86327),r=t(385),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),r(e,c(i)-h),o(e,a(i)+s),e};v.exports=n},35827:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(62235),c=t(54380),o=t(86327),r=t(40136),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),r(e,c(i)+h),o(e,a(i)+s),e};v.exports=n},46871:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(66786),c=t(35893),o=t(7702),r=function(n,e,i,h){return i===void 0&&(i=0),h===void 0&&(h=0),a(n,c(e)+i,o(e)+h),n};v.exports=r},5198:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(7702),c=t(26541),o=t(20786),r=t(385),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),r(e,c(i)-h),o(e,a(i)+s),e};v.exports=n},11879:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(60461),c=[];c[a.BOTTOM_CENTER]=t(54312),c[a.BOTTOM_LEFT]=t(46768),c[a.BOTTOM_RIGHT]=t(35827),c[a.CENTER]=t(46871),c[a.LEFT_CENTER]=t(5198),c[a.RIGHT_CENTER]=t(80503),c[a.TOP_CENTER]=t(89698),c[a.TOP_LEFT]=t(922),c[a.TOP_RIGHT]=t(21373),c[a.LEFT_BOTTOM]=c[a.BOTTOM_LEFT],c[a.LEFT_TOP]=c[a.TOP_LEFT],c[a.RIGHT_BOTTOM]=c[a.BOTTOM_RIGHT],c[a.RIGHT_TOP]=c[a.TOP_RIGHT];var o=function(r,n,e,i,h){return c[e](r,n,i,h)};v.exports=o},80503:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(7702),c=t(54380),o=t(20786),r=t(40136),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),r(e,c(i)+h),o(e,a(i)+s),e};v.exports=n},89698:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(35893),c=t(17717),o=t(88417),r=t(66737),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),o(e,a(i)+h),r(e,c(i)-s),e};v.exports=n},922:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(26541),c=t(17717),o=t(385),r=t(66737),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),o(e,a(i)-h),r(e,c(i)-s),e};v.exports=n},21373:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(54380),c=t(17717),o=t(40136),r=t(66737),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),o(e,a(i)+h),r(e,c(i)-s),e};v.exports=n},91660:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.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:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(60461),c=t(79291),o={In:t(91660),To:t(16694)};o=c(!1,o,a),v.exports=o},21578:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(62235),c=t(35893),o=t(88417),r=t(66737),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),o(e,c(i)+h),r(e,a(i)+s),e};v.exports=n},10210:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(62235),c=t(26541),o=t(385),r=t(66737),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),o(e,c(i)-h),r(e,a(i)+s),e};v.exports=n},82341:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(62235),c=t(54380),o=t(40136),r=t(66737),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),o(e,c(i)+h),r(e,a(i)+s),e};v.exports=n},87958:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(62235),c=t(26541),o=t(86327),r=t(40136),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),r(e,c(i)-h),o(e,a(i)+s),e};v.exports=n},40080:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(7702),c=t(26541),o=t(20786),r=t(40136),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),r(e,c(i)-h),o(e,a(i)+s),e};v.exports=n},88466:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(26541),c=t(17717),o=t(40136),r=t(66737),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),o(e,a(i)-h),r(e,c(i)-s),e};v.exports=n},38829:(v,m,t)=>{/** + * @author samme + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(60461),c=[];c[a.BOTTOM_CENTER]=t(21578),c[a.BOTTOM_LEFT]=t(10210),c[a.BOTTOM_RIGHT]=t(82341),c[a.LEFT_BOTTOM]=t(87958),c[a.LEFT_CENTER]=t(40080),c[a.LEFT_TOP]=t(88466),c[a.RIGHT_BOTTOM]=t(19211),c[a.RIGHT_CENTER]=t(34609),c[a.RIGHT_TOP]=t(48741),c[a.TOP_CENTER]=t(49440),c[a.TOP_LEFT]=t(81288),c[a.TOP_RIGHT]=t(61323);var o=function(r,n,e,i,h){return c[e](r,n,i,h)};v.exports=o},19211:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(62235),c=t(54380),o=t(86327),r=t(385),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),r(e,c(i)+h),o(e,a(i)+s),e};v.exports=n},34609:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(7702),c=t(54380),o=t(20786),r=t(385),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),r(e,c(i)+h),o(e,a(i)+s),e};v.exports=n},48741:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(54380),c=t(17717),o=t(385),r=t(66737),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),o(e,a(i)+h),r(e,c(i)-s),e};v.exports=n},49440:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(35893),c=t(17717),o=t(86327),r=t(88417),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),r(e,a(i)+h),o(e,c(i)-s),e};v.exports=n},81288:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(26541),c=t(17717),o=t(86327),r=t(385),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),r(e,a(i)-h),o(e,c(i)-s),e};v.exports=n},61323:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(54380),c=t(17717),o=t(86327),r=t(40136),n=function(e,i,h,s){return h===void 0&&(h=0),s===void 0&&(s=0),r(e,a(i)+h),o(e,c(i)-s),e};v.exports=n},16694:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.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:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(88417),c=t(20786),o=function(r,n,e){return a(r,n),c(r,e)};v.exports=o},62235:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return t.y+t.height-t.height*t.originY};v.exports=m},72873:(v,m,t)=>{/** + * @author samme + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(62235),c=t(26541),o=t(54380),r=t(17717),n=t(87841),e=function(i,h){h===void 0&&(h=new n);var s=c(i),l=r(i);return h.x=s,h.y=l,h.width=o(i)-s,h.height=a(i)-l,h};v.exports=e},35893:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return t.x-t.width*t.originX+t.width*.5};v.exports=m},7702:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return t.y-t.height*t.originY+t.height*.5};v.exports=m},26541:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return t.x-t.width*t.originX};v.exports=m},87431:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return t.width*t.originX};v.exports=m},46928:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return t.height*t.originY};v.exports=m},54380:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return t.x+t.width-t.width*t.originX};v.exports=m},17717:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return t.y-t.height*t.originY};v.exports=m},86327:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){return t.y=a-t.height+t.height*t.originY,t};v.exports=m},88417:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){var c=t.width*t.originX;return t.x=a+c-t.width*.5,t};v.exports=m},20786:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){var c=t.height*t.originY;return t.y=a+c-t.height*.5,t};v.exports=m},385:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){return t.x=a+t.width*t.originX,t};v.exports=m},40136:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){return t.x=a-t.width+t.width*t.originX,t};v.exports=m},66737:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){return t.y=a+t.height*t.originY,t};v.exports=m},58724:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.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:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m={setCrisp:function(t){var a=["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"];return a.forEach(function(c){t.style["image-rendering"]=c}),t.style.msInterpolationMode="nearest-neighbor",t},setBicubic:function(t){return t.style["image-rendering"]="auto",t.style.msInterpolationMode="bicubic",t}};v.exports=m},27919:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(8054),c=t(68703),o=[],r=!1,n=function(){var e=function(g,y,x,T,S){y===void 0&&(y=1),x===void 0&&(x=1),T===void 0&&(T=a.CANVAS),S===void 0&&(S=!1);var M,w=s(T);return w===null?(w={parent:g,canvas:document.createElement("canvas"),type:T},T===a.CANVAS&&o.push(w),M=w.canvas):(w.parent=g,M=w.canvas),S&&(w.parent=M),M.width=y,M.height=x,r&&T===a.CANVAS&&c.disable(M.getContext("2d",{willReadFrequently:!1})),M},i=function(g,y,x){return e(g,y,x,a.CANVAS)},h=function(g,y,x){return e(g,y,x,a.WEBGL)},s=function(g){if(g===void 0&&(g=a.CANVAS),g===a.WEBGL)return null;for(var y=0;y{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m="",t=function(){var a=function(n){for(var e=["i","webkitI","msI","mozI","oI"],i=0;i{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){return a===void 0&&(a="none"),t.style.msTouchAction=a,t.style["ms-touch-action"]=a,t.style["touch-action"]=a,t};v.exports=m},91610:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){a===void 0&&(a="none");var c=["-webkit-","-khtml-","-moz-","-ms-",""];return c.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};v.exports=m},26253:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={CanvasInterpolation:t(20623),CanvasPool:t(27919),Smoothing:t(68703),TouchAction:t(65208),UserSelect:t(91610)}},40987:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(37589),o=t(1e3),r=t(7537),n=t(87837),e=new a({initialize:function(h,s,l,f){h===void 0&&(h=0),s===void 0&&(s=0),l===void 0&&(l=0),f===void 0&&(f=255),this.r=0,this.g=0,this.b=0,this.a=255,this._h=0,this._s=0,this._v=0,this._locked=!1,this.gl=[0,0,0,1],this._color=0,this._color32=0,this._rgba="",this.setTo(h,s,l,f)},transparent:function(){return this._locked=!0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this._locked=!1,this.update(!0)},setTo:function(i,h,s,l,f){return l===void 0&&(l=255),f===void 0&&(f=!0),this._locked=!0,this.red=i,this.green=h,this.blue=s,this.alpha=l,this._locked=!1,this.update(f)},setGLTo:function(i,h,s,l){return l===void 0&&(l=1),this._locked=!0,this.redGL=i,this.greenGL=h,this.blueGL=s,this.alphaGL=l,this._locked=!1,this.update(!0)},setFromRGB:function(i){return this._locked=!0,this.red=i.r,this.green=i.g,this.blue=i.b,i.hasOwnProperty("a")&&(this.alpha=i.a),this._locked=!1,this.update(!0)},setFromHSV:function(i,h,s){return r(i,h,s,this)},update:function(i){if(i===void 0&&(i=!1),this._locked)return this;var h=this.r,s=this.g,l=this.b,f=this.a;return this._color=c(h,s,l),this._color32=o(h,s,l,f),this._rgba="rgba("+h+","+s+","+l+","+f/255+")",i&&n(h,s,l,this),this},updateHSV:function(){var i=this.r,h=this.g,s=this.b;return n(i,h,s,this),this},clone:function(){return new e(this.r,this.g,this.b,this.a)},gray:function(i){return this.setTo(i,i,i)},random:function(i,h){i===void 0&&(i=0),h===void 0&&(h=255);var s=Math.floor(i+Math.random()*(h-i)),l=Math.floor(i+Math.random()*(h-i)),f=Math.floor(i+Math.random()*(h-i));return this.setTo(s,l,f)},randomGray:function(i,h){i===void 0&&(i=0),h===void 0&&(h=255);var s=Math.floor(i+Math.random()*(h-i));return this.setTo(s,s,s)},saturate:function(i){return this.s+=i/100,this},desaturate:function(i){return this.s-=i/100,this},lighten:function(i){return this.v+=i/100,this},darken:function(i){return this.v-=i/100,this},brighten:function(i){var h=this.r,s=this.g,l=this.b;return h=Math.max(0,Math.min(255,h-Math.round(255*-(i/100)))),s=Math.max(0,Math.min(255,s-Math.round(255*-(i/100)))),l=Math.max(0,Math.min(255,l-Math.round(255*-(i/100)))),this.setTo(h,s,l)},color:{get:function(){return this._color}},color32:{get:function(){return this._color32}},rgba:{get:function(){return this._rgba}},redGL:{get:function(){return this.gl[0]},set:function(i){this.gl[0]=Math.min(Math.abs(i),1),this.r=Math.floor(this.gl[0]*255),this.update(!0)}},greenGL:{get:function(){return this.gl[1]},set:function(i){this.gl[1]=Math.min(Math.abs(i),1),this.g=Math.floor(this.gl[1]*255),this.update(!0)}},blueGL:{get:function(){return this.gl[2]},set:function(i){this.gl[2]=Math.min(Math.abs(i),1),this.b=Math.floor(this.gl[2]*255),this.update(!0)}},alphaGL:{get:function(){return this.gl[3]},set:function(i){this.gl[3]=Math.min(Math.abs(i),1),this.a=Math.floor(this.gl[3]*255),this.update()}},red:{get:function(){return this.r},set:function(i){i=Math.floor(Math.abs(i)),this.r=Math.min(i,255),this.gl[0]=i/255,this.update(!0)}},green:{get:function(){return this.g},set:function(i){i=Math.floor(Math.abs(i)),this.g=Math.min(i,255),this.gl[1]=i/255,this.update(!0)}},blue:{get:function(){return this.b},set:function(i){i=Math.floor(Math.abs(i)),this.b=Math.min(i,255),this.gl[2]=i/255,this.update(!0)}},alpha:{get:function(){return this.a},set:function(i){i=Math.floor(Math.abs(i)),this.a=Math.min(i,255),this.gl[3]=i/255,this.update()}},h:{get:function(){return this._h},set:function(i){this._h=i,r(i,this._s,this._v,this)}},s:{get:function(){return this._s},set:function(i){this._s=i,r(this._h,i,this._v,this)}},v:{get:function(){return this._v},set:function(i){this._v=i,r(this._h,this._s,i,this)}}});v.exports=e},92728:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(37589),c=function(o){o===void 0&&(o=1024);var r=[],n=255,e,i=255,h=0,s=0;for(e=0;e<=n;e++)r.push({r:i,g:e,b:s,color:a(i,e,s)});for(h=255,e=n;e>=0;e--)r.push({r:e,g:h,b:s,color:a(e,h,s)});for(i=0,e=0;e<=n;e++,h--)r.push({r:i,g:h,b:e,color:a(i,h,e)});for(h=0,s=255,e=0;e<=n;e++,s--,i++)r.push({r:i,g:h,b:s,color:a(i,h,s)});if(o===1024)return r;var l=[],f=0,u=1024/o;for(e=0;e{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){var a={r:t>>16&255,g:t>>8&255,b:t&255,a:255};return t>16777215&&(a.a=t>>>24),a};v.exports=m},62957:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){var a=t.toString(16);return a.length===1?"0"+a:a};v.exports=m},37589:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){return t<<16|a<<8|c};v.exports=m},1e3:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c,o){return o<<24|t<<16|a<<8|c};v.exports=m},62183:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(40987),c=t(89528),o=function(r,n,e){var i=e,h=e,s=e;if(n!==0){var l=e<.5?e*(1+n):e+n-e*n,f=2*e-l;i=c(f,l,r+1/3),h=c(f,l,r),s=c(f,l,r-1/3)}var u=new a;return u.setGLTo(i,h,s,1)};v.exports=o},27939:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(7537),c=function(o,r){o===void 0&&(o=1),r===void 0&&(r=1);for(var n=[],e=0;e<=359;e++)n.push(a(e/359,o,r));return n};v.exports=c},7537:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(37589);function c(r,n,e,i){var h=(r+n*6)%6,s=Math.min(h,4-h,1);return Math.round(255*(i-i*e*Math.max(0,s)))}var o=function(r,n,e,i){n===void 0&&(n=1),e===void 0&&(e=1);var h=c(5,r,n,e),s=c(3,r,n,e),l=c(1,r,n,e);return i?i.setTo?i.setTo(h,s,l,i.alpha,!0):(i.r=h,i.g=s,i.b=l,i.color=a(h,s,l),i):{r:h,g:s,b:l,color:a(h,s,l)}};v.exports=o},70238:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(40987),c=function(o){var r=new a;o=o.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,function(s,l,f,u){return l+l+f+f+u+u});var n=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(o);if(n){var e=parseInt(n[1],16),i=parseInt(n[2],16),h=parseInt(n[3],16);r.setTo(e,i,h)}return r};v.exports=c},89528:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){return c<0&&(c+=1),c>1&&(c-=1),c<.16666666666666666?t+(a-t)*6*c:c<.5?a:c<.6666666666666666?t+(a-t)*(.6666666666666666-c)*6:t};v.exports=m},30100:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(40987),c=t(90664),o=function(r){var n=c(r);return new a(n.r,n.g,n.b,n.a)};v.exports=o},90664:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return t>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}};v.exports=m},13699:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(28915),c=function(n,e,i,h,s,l,f,u){f===void 0&&(f=100),u===void 0&&(u=0);var d=u/f;return{r:a(n,h,d),g:a(e,s,d),b:a(i,l,d)}},o=function(n,e,i,h){return i===void 0&&(i=100),h===void 0&&(h=0),c(n.r,n.g,n.b,e.r,e.g,e.b,i,h)},r=function(n,e,i,h,s,l){return s===void 0&&(s=100),l===void 0&&(l=0),c(n.r,n.g,n.b,e,i,h,s,l)};v.exports={RGBWithRGB:c,ColorWithRGB:r,ColorWithColor:o}},68957:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(40987),c=function(o){return new a(o.r,o.g,o.b,o.a)};v.exports=c},87388:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(40987),c=function(o){var r=new a,n=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(o.toLowerCase());if(n){var e=parseInt(n[1],10),i=parseInt(n[2],10),h=parseInt(n[3],10),s=n[4]!==void 0?parseFloat(n[4]):1;r.setTo(e,i,h,s*255)}return r};v.exports=c},87837:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c,o){o===void 0&&(o={h:0,s:0,v:0}),t/=255,a/=255,c/=255;var r=Math.min(t,a,c),n=Math.max(t,a,c),e=n-r,i=0,h=n===0?0:e/n,s=n;return n!==r&&(n===t?i=(a-c)/e+(a{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(62957),c=function(o,r,n,e,i){return e===void 0&&(e=255),i===void 0&&(i="#"),i==="#"?"#"+((1<<24)+(o<<16)+(r<<8)+n).toString(16).slice(1,7):"0x"+a(e)+a(o)+a(r)+a(n)};v.exports=c},85386:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(30976),c=t(40987),o=function(r,n){return r===void 0&&(r=0),n===void 0&&(n=255),new c(a(r,n),a(r,n),a(r,n))};v.exports=o},80333:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(70238),c=t(30100),o=t(68957),r=t(87388),n=function(e){var i=typeof e;switch(i){case"string":return e.substr(0,3).toLowerCase()==="rgb"?r(e):a(e);case"number":return c(e);case"object":return o(e)}};v.exports=n},3956:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(40987);a.ColorSpectrum=t(92728),a.ColorToRGBA=t(91588),a.ComponentToHex=t(62957),a.GetColor=t(37589),a.GetColor32=t(1e3),a.HexStringToColor=t(70238),a.HSLToColor=t(62183),a.HSVColorWheel=t(27939),a.HSVToRGB=t(7537),a.HueToComponent=t(89528),a.IntegerToColor=t(30100),a.IntegerToRGB=t(90664),a.Interpolate=t(13699),a.ObjectToColor=t(68957),a.RandomRGB=t(85386),a.RGBStringToColor=t(87388),a.RGBToHSV=t(87837),a.RGBToString=t(75723),a.ValueToColor=t(80333),v.exports=a},27460:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.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:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(39429),o=new a({initialize:function(n,e,i,h,s,l){e||(e=n.sys.make.image({x:i,y:h,key:s,frame:l,add:!1})),this.bitmapMask=e,this.invertAlpha=!1,this.isStencil=!1},setBitmap:function(r){this.bitmapMask=r},preRenderWebGL:function(r,n,e){r.pipelines.BITMAPMASK_PIPELINE.beginMask(this,n,e)},postRenderWebGL:function(r,n,e){r.pipelines.BITMAPMASK_PIPELINE.endMask(this,n,e)},preRenderCanvas:function(){},postRenderCanvas:function(){},destroy:function(){this.bitmapMask=null}});c.register("bitmapMask",function(r,n,e,i,h){return new o(this.scene,r,n,e,i,h)}),v.exports=o},80661:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=new a({initialize:function(r,n){this.geometryMask=n,this.invertAlpha=!1,this.isStencil=!0,this.level=0},setShape:function(o){return this.geometryMask=o,this},setInvertAlpha:function(o){return o===void 0&&(o=!0),this.invertAlpha=o,this},preRenderWebGL:function(o,r,n){var e=o.gl;o.flush(),o.maskStack.length===0&&(e.enable(e.STENCIL_TEST),e.clear(e.STENCIL_BUFFER_BIT),o.maskCount=0),o.currentCameraMask.mask!==this&&(o.currentMask.mask=this),o.maskStack.push({mask:this,camera:n}),this.applyStencil(o,n,!0),o.maskCount++},applyStencil:function(o,r,n){var e=o.gl,i=this.geometryMask,h=o.maskCount,s=255;e.colorMask(!1,!1,!1,!1),n?(e.stencilFunc(e.EQUAL,h,s),e.stencilOp(e.KEEP,e.KEEP,e.INCR),h++):(e.stencilFunc(e.EQUAL,h+1,s),e.stencilOp(e.KEEP,e.KEEP,e.DECR)),this.level=h,i.renderWebGL(o,i,r),o.flush(),e.colorMask(!0,!0,!0,!0),e.stencilOp(e.KEEP,e.KEEP,e.KEEP),this.invertAlpha?e.stencilFunc(e.NOTEQUAL,h,s):e.stencilFunc(e.EQUAL,h,s)},postRenderWebGL:function(o){var r=o.gl;o.maskStack.pop(),o.maskCount--,o.flush();var n=o.currentMask;if(o.maskStack.length===0)n.mask=null,r.disable(r.STENCIL_TEST);else{var e=o.maskStack[o.maskStack.length-1];e.mask.applyStencil(o,e.camera,!1),o.currentCameraMask.mask!==e.mask?(n.mask=e.mask,n.camera=e.camera):n.mask=null}},preRenderCanvas:function(o,r,n){var e=this.geometryMask;o.currentContext.save(),e.renderCanvas(o,e,n,null,null,!0),o.currentContext.clip()},postRenderCanvas:function(o){o.currentContext.restore()},destroy:function(){this.geometryMask=null}});v.exports=c},69781:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={BitmapMask:t(6858),GeometryMask:t(80661)}},73894:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=new a({initialize:function(r,n,e,i){(!n||n==="")&&(n=["precision mediump float;","uniform vec2 resolution;","varying vec2 fragCoord;","void main () {"," vec2 uv = fragCoord / resolution.xy;"," gl_FragColor = vec4(uv.xyx, 1.0);","}"].join(` +`)),(!e||e==="")&&(e=["precision mediump float;","uniform mat4 uProjectionMatrix;","uniform mat4 uViewMatrix;","uniform vec2 uResolution;","attribute vec2 inPosition;","varying vec2 fragCoord;","varying vec2 outTexCoord;","void main () {"," gl_Position = uProjectionMatrix * uViewMatrix * vec4(inPosition, 1.0, 1.0);"," fragCoord = vec2(inPosition.x, uResolution.y - inPosition.y);"," outTexCoord = vec2(inPosition.x / uResolution.x, fragCoord.y / uResolution.y);","}"].join(` +`)),i===void 0&&(i=null),this.key=r,this.fragmentSrc=n,this.vertexSrc=e,this.uniforms=i}});v.exports=c},40366:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){var c;if(a)typeof a=="string"?c=document.getElementById(a):typeof a=="object"&&a.nodeType===1&&(c=a);else if(t.parentElement||a===null)return t;return c||(c=document.body),c.appendChild(t),t};v.exports=m},83719:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(40366),c=function(o){var r=o.config;if(!(!r.parent||!r.domCreateContainer)){var n=document.createElement("div");n.style.cssText=["display: block;","width: "+o.scale.width+"px;","height: "+o.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: "+r.domPointerEvents+";","transform: scale(1);","transform-origin: left top;"].join(" "),o.domContainer=n,a(n,r.parent)}};v.exports=c},57264:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(25892),c=function(o){if(document.readyState==="complete"||document.readyState==="interactive"){o();return}var r=function(){document.removeEventListener("deviceready",r,!0),document.removeEventListener("DOMContentLoaded",r,!0),window.removeEventListener("load",r,!0),o()};document.body?a.cordova?document.addEventListener("deviceready",r,!1):(document.addEventListener("DOMContentLoaded",r,!0),window.addEventListener("load",r,!0)):window.setTimeout(r,20)};v.exports=c},57811:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){if(!t)return window.innerHeight;var a=Math.abs(window.orientation),c={w:0,h:0},o=document.createElement("div");return o.setAttribute("style","position: fixed; height: 100vh; width: 0; top: 0"),document.documentElement.appendChild(o),c.w=a===90?o.offsetHeight:window.innerWidth,c.h=a===90?window.innerWidth:o.offsetHeight,document.documentElement.removeChild(o),o=null,Math.abs(window.orientation)!==90?c.h:c.w};v.exports=m},45818:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(13560),c=function(o,r){var n=window.screen,e=n?n.orientation||n.mozOrientation||n.msOrientation:!1;if(e&&typeof e.type=="string")return e.type;if(typeof e=="string")return e;if(typeof window.orientation=="number")return window.orientation===0||window.orientation===180?a.ORIENTATION.PORTRAIT:a.ORIENTATION.LANDSCAPE;if(window.matchMedia){if(window.matchMedia("(orientation: portrait)").matches)return a.ORIENTATION.PORTRAIT;if(window.matchMedia("(orientation: landscape)").matches)return a.ORIENTATION.LANDSCAPE}else return r>o?a.ORIENTATION.PORTRAIT:a.ORIENTATION.LANDSCAPE};v.exports=c},74403:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){var a;return t!==""&&(typeof t=="string"?a=document.getElementById(t):t&&t.nodeType===1&&(a=t)),a||(a=document.body),a};v.exports=m},56836:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){var a="";try{if(window.DOMParser){var c=new DOMParser;a=c.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};v.exports=m},35846:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){t.parentNode&&t.parentNode.removeChild(t)};v.exports=m},43092:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(29747),o=new a({initialize:function(){this.isRunning=!1,this.callback=c,this.isSetTimeOut=!1,this.timeOutID=null,this.delay=0;var n=this;this.step=function e(i){n.callback(i),n.isRunning&&(n.timeOutID=window.requestAnimationFrame(e))},this.stepTimeout=function e(){n.isRunning&&(n.timeOutID=window.setTimeout(e,n.delay)),n.callback(window.performance.now())}},start:function(r,n,e){this.isRunning||(this.callback=r,this.isSetTimeOut=n,this.delay=e,this.isRunning=!0,this.timeOutID=n?window.setTimeout(this.stepTimeout,0):window.requestAnimationFrame(this.step))},stop:function(){this.isRunning=!1,this.isSetTimeOut?clearTimeout(this.timeOutID):window.cancelAnimationFrame(this.timeOutID)},destroy:function(){this.stop(),this.callback=c}});v.exports=o},84902:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a={AddToDOM:t(40366),DOMContentLoaded:t(57264),GetInnerHeight:t(57811),GetScreenOrientation:t(45818),GetTarget:t(74403),ParseXML:t(56836),RemoveFromDOM:t(35846),RequestAnimationFrame:t(43092)};v.exports=a},47565:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(50792),o=t(37277),r=new a({Extends:c,initialize:function(){c.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});o.register("EventEmitter",r,"events"),v.exports=r},93055:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={EventEmitter:t(47565)}},20122:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(72898),o=t(14811),r=new a({Extends:c,initialize:function(e,i){i===void 0&&(i=1),c.call(this,o.BARREL,e),this.amount=i}});v.exports=r},32251:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(72898),o=t(14811),r=new a({Extends:c,initialize:function(e,i,h,s,l,f,u){h===void 0&&(h=1),s===void 0&&(s=1),l===void 0&&(l=1),f===void 0&&(f=1),u===void 0&&(u=4),c.call(this,o.BLOOM,e),this.steps=u,this.offsetX=h,this.offsetY=s,this.blurStrength=l,this.strength=f,this.glcolor=[1,1,1],i!=null&&(this.color=i)},color:{get:function(){var n=this.glcolor;return(n[0]*255<<16)+(n[1]*255<<8)+(n[2]*255|0)},set:function(n){var e=this.glcolor;e[0]=(n>>16&255)/255,e[1]=(n>>8&255)/255,e[2]=(n&255)/255}}});v.exports=r},9047:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(72898),o=t(14811),r=new a({Extends:c,initialize:function(e,i,h,s,l,f,u){i===void 0&&(i=0),h===void 0&&(h=2),s===void 0&&(s=2),l===void 0&&(l=1),u===void 0&&(u=4),c.call(this,o.BLUR,e),this.quality=i,this.x=h,this.y=s,this.steps=u,this.strength=l,this.glcolor=[1,1,1],f!=null&&(this.color=f)},color:{get:function(){var n=this.glcolor;return(n[0]*255<<16)+(n[1]*255<<8)+(n[2]*255|0)},set:function(n){var e=this.glcolor;e[0]=(n>>16&255)/255,e[1]=(n>>8&255)/255,e[2]=(n&255)/255}}});v.exports=r},27885:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(72898),o=t(14811),r=new a({Extends:c,initialize:function(e,i,h,s,l,f,u,d){i===void 0&&(i=.5),h===void 0&&(h=1),s===void 0&&(s=.2),l===void 0&&(l=!1),f===void 0&&(f=1),u===void 0&&(u=1),d===void 0&&(d=1),c.call(this,o.BOKEH,e),this.radius=i,this.amount=h,this.contrast=s,this.isTiltShift=l,this.strength=d,this.blurX=f,this.blurY=u}});v.exports=r},12578:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(72898),o=t(14811),r=new a({Extends:c,initialize:function(e,i,h,s,l,f){i===void 0&&(i=8),l===void 0&&(l=1),f===void 0&&(f=.005),c.call(this,o.CIRCLE,e),this.scale=l,this.feather=f,this.thickness=i,this.glcolor=[1,.2,.7],this.glcolor2=[1,0,0,.4],h!=null&&(this.color=h),s!=null&&(this.backgroundColor=s)},color:{get:function(){var n=this.glcolor;return(n[0]*255<<16)+(n[1]*255<<8)+(n[2]*255|0)},set:function(n){var e=this.glcolor;e[0]=(n>>16&255)/255,e[1]=(n>>8&255)/255,e[2]=(n&255)/255}},backgroundColor:{get:function(){var n=this.glcolor2;return(n[0]*255<<16)+(n[1]*255<<8)+(n[2]*255|0)},set:function(n){var e=this.glcolor2;e[0]=(n>>16&255)/255,e[1]=(n>>8&255)/255,e[2]=(n&255)/255}},backgroundAlpha:{get:function(){return this.glcolor2[3]},set:function(n){this.glcolor2[3]=n}}});v.exports=r},15802:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(89422),o=t(14811),r=new a({Extends:c,initialize:function(e){c.call(this),this.type=o.COLOR_MATRIX,this.gameObject=e,this.active=!0},destroy:function(){this.gameObject=null,this._matrix=null,this._data=null}});v.exports=r},72898:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=new a({initialize:function(r,n){this.type=r,this.gameObject=n,this.active=!0},setActive:function(o){return this.active=o,this},destroy:function(){this.gameObject=null,this.active=!1}});v.exports=c},44553:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(72898),o=t(14811),r=new a({Extends:c,initialize:function(e,i,h,s){i===void 0&&(i="__WHITE"),h===void 0&&(h=.005),s===void 0&&(s=.005),c.call(this,o.DISPLACEMENT,e),this.x=h,this.y=s,this.glTexture,this.setTexture(i)},setTexture:function(n){var e=this.gameObject.scene.sys.textures.getFrame(n);return e&&(this.glTexture=e.glTexture),this}});v.exports=r},68531:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(72898),o=t(14811),r=new a({Extends:c,initialize:function(e,i,h,s,l){h===void 0&&(h=4),s===void 0&&(s=0),l===void 0&&(l=!1),c.call(this,o.GLOW,e),this.outerStrength=h,this.innerStrength=s,this.knockout=l,this.glcolor=[1,1,1,1],i!==void 0&&(this.color=i)},color:{get:function(){var n=this.glcolor;return(n[0]*255<<16)+(n[1]*255<<8)+(n[2]*255|0)},set:function(n){var e=this.glcolor;e[0]=(n>>16&255)/255,e[1]=(n>>8&255)/255,e[2]=(n&255)/255}}});v.exports=r},37102:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(72898),o=t(14811),r=new a({Extends:c,initialize:function(e,i,h,s,l,f,u,d,p){s===void 0&&(s=.2),l===void 0&&(l=0),f===void 0&&(f=0),u===void 0&&(u=0),d===void 0&&(d=1),p===void 0&&(p=0),c.call(this,o.GRADIENT,e),this.alpha=s,this.size=p,this.fromX=l,this.fromY=f,this.toX=u,this.toY=d,this.glcolor1=[255,0,0],this.glcolor2=[0,255,0],i!=null&&(this.color1=i),h!=null&&(this.color2=h)},color1:{get:function(){var n=this.glcolor1;return(n[0]<<16)+(n[1]<<8)+(n[2]|0)},set:function(n){var e=this.glcolor1;e[0]=n>>16&255,e[1]=n>>8&255,e[2]=n&255}},color2:{get:function(){var n=this.glcolor2;return(n[0]<<16)+(n[1]<<8)+(n[2]|0)},set:function(n){var e=this.glcolor2;e[0]=n>>16&255,e[1]=n>>8&255,e[2]=n&255}}});v.exports=r},86886:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(72898),o=t(14811),r=new a({Extends:c,initialize:function(e,i){i===void 0&&(i=1),c.call(this,o.PIXELATE,e),this.amount=i}});v.exports=r},92322:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(72898),o=t(14811),r=new a({Extends:c,initialize:function(e,i,h,s,l,f,u,d){i===void 0&&(i=0),h===void 0&&(h=0),s===void 0&&(s=.1),l===void 0&&(l=1),u===void 0&&(u=6),d===void 0&&(d=1),c.call(this,o.SHADOW,e),this.x=i,this.y=h,this.decay=s,this.power=l,this.glcolor=[0,0,0,1],this.samples=u,this.intensity=d,f!==void 0&&(this.color=f)},color:{get:function(){var n=this.glcolor;return(n[0]*255<<16)+(n[1]*255<<8)+(n[2]*255|0)},set:function(n){var e=this.glcolor;e[0]=(n>>16&255)/255,e[1]=(n>>8&255)/255,e[2]=(n&255)/255}}});v.exports=r},39563:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(72898),o=t(14811),r=new a({Extends:c,initialize:function(e,i,h,s,l){i===void 0&&(i=.5),h===void 0&&(h=.5),s===void 0&&(s=3),l===void 0&&(l=!1),c.call(this,o.SHINE,e),this.speed=i,this.lineWidth=h,this.gradient=s,this.reveal=l}});v.exports=r},56448:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(72898),o=t(14811),r=new a({Extends:c,initialize:function(e,i,h,s,l){i===void 0&&(i=.5),h===void 0&&(h=.5),s===void 0&&(s=.5),l===void 0&&(l=.5),c.call(this,o.VIGNETTE,e),this.x=i,this.y=h,this.radius=s,this.strength=l}});v.exports=r},38433:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(72898),o=t(14811),r=new a({Extends:c,initialize:function(e,i,h,s,l){i===void 0&&(i=.1),h===void 0&&(h=0),s===void 0&&(s=0),l===void 0&&(l=!1),c.call(this,o.WIPE,e),this.progress=0,this.wipeWidth=i,this.direction=h,this.axis=s,this.reveal=l}});v.exports=r},14811:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m={GLOW:4,SHADOW:5,PIXELATE:6,VIGNETTE:7,SHINE:8,BLUR:9,GRADIENT:12,BLOOM:13,COLOR_MATRIX:14,CIRCLE:15,BARREL:16,DISPLACEMENT:17,WIPE:18,BOKEH:19};v.exports=m},66064:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(79291),c=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,c),v.exports=o},25305:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(10312),c=t(23568),o=function(r,n,e){n.x=c(e,"x",0),n.y=c(e,"y",0),n.depth=c(e,"depth",0),n.flipX=c(e,"flipX",!1),n.flipY=c(e,"flipY",!1);var i=c(e,"scale",null);typeof i=="number"?n.setScale(i):i!==null&&(n.scaleX=c(i,"x",1),n.scaleY=c(i,"y",1));var h=c(e,"scrollFactor",null);typeof h=="number"?n.setScrollFactor(h):h!==null&&(n.scrollFactorX=c(h,"x",1),n.scrollFactorY=c(h,"y",1)),n.rotation=c(e,"rotation",0);var s=c(e,"angle",null);s!==null&&(n.angle=s),n.alpha=c(e,"alpha",1);var l=c(e,"origin",null);if(typeof l=="number")n.setOrigin(l);else if(l!==null){var f=c(l,"x",.5),u=c(l,"y",.5);n.setOrigin(f,u)}n.blendMode=c(e,"blendMode",a.NORMAL),n.visible=c(e,"visible",!0);var d=c(e,"add",!0);return d&&r.sys.displayList.add(n),n.preUpdate&&r.sys.updateList.add(n),n};v.exports=o},13059:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(23568),c=function(o,r){var n=a(r,"anims",null);if(n===null)return o;if(typeof n=="string")o.anims.play(n);else if(typeof n=="object"){var e=o.anims,i=a(n,"key",void 0);if(i){var h=a(n,"startFrame",void 0),s=a(n,"delay",0),l=a(n,"repeat",0),f=a(n,"repeatDelay",0),u=a(n,"yoyo",!1),d=a(n,"play",!1),p=a(n,"delayedPlay",0),g={key:i,delay:s,repeat:l,repeatDelay:f,yoyo:u,startFrame:h};d?e.play(g):p>0?e.playAfterDelay(g,p):e.load(g)}}return o};v.exports=c},8050:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(73162),o=t(37277),r=t(51708),n=t(44594),e=t(19186),i=new a({Extends:c,initialize:function(s){c.call(this,s),this.sortChildrenFlag=!1,this.scene=s,this.systems=s.sys,this.events=s.sys.events,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.events.once(n.BOOT,this.boot,this),this.events.on(n.START,this.start,this)},boot:function(){this.events.once(n.DESTROY,this.destroy,this)},addChildCallback:function(h){h.displayList&&h.displayList!==this&&h.removeFromDisplayList(),h.parentContainer&&h.parentContainer.remove(h),h.displayList||(this.queueDepthSort(),h.displayList=this,h.emit(r.ADDED_TO_SCENE,h,this.scene),this.events.emit(n.ADDED_TO_SCENE,h,this.scene))},removeChildCallback:function(h){this.queueDepthSort(),h.displayList=null,h.emit(r.REMOVED_FROM_SCENE,h,this.scene),this.events.emit(n.REMOVED_FROM_SCENE,h,this.scene)},start:function(){this.events.once(n.SHUTDOWN,this.shutdown,this)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(e(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(h,s){return h._depth-s._depth},getChildren:function(){return this.list},shutdown:function(){for(var h=this.list;h.length;)h[0].destroy(!0);this.events.off(n.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(n.START,this.start,this),this.scene=null,this.systems=null,this.events=null}});o.register("DisplayList",i,"displayList"),v.exports=i},95643:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(53774),o=t(45893),r=t(50792),n=t(51708),e=t(44594),i=new a({Extends:r,initialize:function(s,l){r.call(this),this.scene=s,this.displayList=null,this.type=l,this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.on(n.ADDED_TO_SCENE,this.addedToScene,this),this.on(n.REMOVED_FROM_SCENE,this.removedFromScene,this),s.sys.queueDepthSort()},setActive:function(h){return this.active=h,this},setName:function(h){return this.name=h,this},setState:function(h){return this.state=h,this},setDataEnabled:function(){return this.data||(this.data=new o(this)),this},setData:function(h,s){return this.data||(this.data=new o(this)),this.data.set(h,s),this},incData:function(h,s){return this.data||(this.data=new o(this)),this.data.inc(h,s),this},toggleData:function(h){return this.data||(this.data=new o(this)),this.data.toggle(h),this},getData:function(h){return this.data||(this.data=new o(this)),this.data.get(h)},setInteractive:function(h,s,l){return this.scene.sys.input.enable(this,h,s,l),this},disableInteractive:function(){return this.scene.sys.input.disable(this),this},removeInteractive:function(){return this.scene.sys.input.clear(this),this.input=void 0,this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return c(this)},willRender:function(h){var s=this.displayList&&this.displayList.active?this.displayList.willRender(h):!0;return!(!s||i.RENDER_MASK!==this.renderFlags||this.cameraFilter!==0&&this.cameraFilter&h.id)},getIndexList:function(){for(var h=this,s=this.parentContainer,l=[];s&&(l.unshift(s.getIndex(h)),h=s,s.parentContainer);)s=s.parentContainer;return this.displayList?l.unshift(this.displayList.getIndex(h)):l.unshift(this.scene.sys.displayList.getIndex(h)),l},addToDisplayList:function(h){return h===void 0&&(h=this.scene.sys.displayList),this.displayList&&this.displayList!==h&&this.removeFromDisplayList(),h.exists(this)||(this.displayList=h,h.add(this,!0),h.queueDepthSort(),this.emit(n.ADDED_TO_SCENE,this,this.scene),h.events.emit(e.ADDED_TO_SCENE,this,this.scene)),this},addToUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.add(this),this},removeFromDisplayList:function(){var h=this.displayList||this.scene.sys.displayList;return h&&h.exists(this)&&(h.remove(this,!0),h.queueDepthSort(),this.displayList=null,this.emit(n.REMOVED_FROM_SCENE,this,this.scene),h.events.emit(e.REMOVED_FROM_SCENE,this,this.scene)),this},removeFromUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.remove(this),this},destroy:function(h){!this.scene||this.ignoreDestroy||(h===void 0&&(h=!1),this.preDestroy&&this.preDestroy.call(this),this.emit(n.DESTROY,this,h),this.removeAllListeners(),this.postPipelines&&this.resetPostPipeline(!0),this.removeFromDisplayList(),this.removeFromUpdateList(),this.input&&(this.scene.sys.input.clear(this),this.input=void 0),this.data&&(this.data.destroy(),this.data=void 0),this.body&&(this.body.destroy(),this.body=void 0),this.preFX&&(this.preFX.destroy(),this.preFX=void 0),this.postFX&&(this.postFX.destroy(),this.postFX=void 0),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0)}});i.RENDER_MASK=15,v.exports=i},44603:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(37277),o=t(44594),r=new a({initialize:function(e){this.scene=e,this.systems=e.sys,this.events=e.sys.events,this.displayList,this.updateList,this.events.once(o.BOOT,this.boot,this),this.events.on(o.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(o.DESTROY,this.destroy,this)},start:function(){this.events.once(o.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.events.off(o.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(o.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});r.register=function(n,e){r.prototype.hasOwnProperty(n)||(r.prototype[n]=e)},r.remove=function(n){r.prototype.hasOwnProperty(n)&&delete r.prototype[n]},c.register("GameObjectCreator",r,"make"),v.exports=r},39429:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(37277),o=t(44594),r=new a({initialize:function(e){this.scene=e,this.systems=e.sys,this.events=e.sys.events,this.displayList,this.updateList,this.events.once(o.BOOT,this.boot,this),this.events.on(o.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(o.DESTROY,this.destroy,this)},start:function(){this.events.once(o.SHUTDOWN,this.shutdown,this)},existing:function(n){return(n.renderCanvas||n.renderWebGL)&&this.displayList.add(n),n.preUpdate&&this.updateList.add(n),n},shutdown:function(){this.events.off(o.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(o.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});r.register=function(n,e){r.prototype.hasOwnProperty(n)||(r.prototype[n]=e)},r.remove=function(n){r.prototype.hasOwnProperty(n)&&delete r.prototype[n]},c.register("GameObjectFactory",r,"add"),v.exports=r},91296:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(61340),c=new a,o=new a,r=new a,n={camera:c,sprite:o,calc:r},e=function(i,h,s){var l=c,f=o,u=r;return f.applyITRS(i.x,i.y,i.rotation,i.scaleX,i.scaleY),l.copyFrom(h.matrix),s?(l.multiplyWithOffset(s,-h.scrollX*i.scrollFactorX,-h.scrollY*i.scrollFactorY),f.e=i.x,f.f=i.y):(f.e-=h.scrollX*i.scrollFactorX,f.f-=h.scrollY*i.scrollFactorY),l.multiply(f,u),n};v.exports=e},45027:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(25774),o=t(37277),r=t(44594),n=new a({Extends:c,initialize:function(i){c.call(this),this.checkQueue=!0,this.scene=i,this.systems=i.sys,i.sys.events.once(r.BOOT,this.boot,this),i.sys.events.on(r.START,this.start,this)},boot:function(){this.systems.events.once(r.DESTROY,this.destroy,this)},start:function(){var e=this.systems.events;e.on(r.PRE_UPDATE,this.update,this),e.on(r.UPDATE,this.sceneUpdate,this),e.once(r.SHUTDOWN,this.shutdown,this)},sceneUpdate:function(e,i){for(var h=this._active,s=h.length,l=0;l{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c,o,r,n,e,i,h,s,l,f,u,d,p){var g=c.x-a.displayOriginX+r,y=c.y-a.displayOriginY+n,x=g+c.w,T=y+c.h,S=e.getXRound(g,y,i),M=e.getYRound(g,y,i),w=e.getXRound(g,T,i),L=e.getYRound(g,T,i),F=e.getXRound(x,T,i),O=e.getYRound(x,T,i),b=e.getXRound(x,y,i),N=e.getYRound(x,y,i);t.batchQuad(a,S,M,w,L,F,O,b,N,o.u0,o.v0,o.u1,o.v1,h,s,l,f,u,d,p)};v.exports=m},53048:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c,o){if(c===void 0&&(c=!1),o===void 0)return o={local:{x:0,y:0,width:0,height:0},global:{x:0,y:0,width:0,height:0},lines:{shortest:0,longest:0,lengths:null,height:0},wrappedText:"",words:[],characters:[],scaleX:0,scaleY:0},o;var r=t.text,n=r.length,e=t.maxWidth,i=t.wordWrapCharCode,h=Number.MAX_VALUE,s=Number.MAX_VALUE,l=0,f=0,u=t.fontData.chars,d=t.fontData.lineHeight,p=t.letterSpacing,g=t.lineSpacing,y=0,x=0,T=0,S=null,M=t._align,w=0,L=0,F=t.fontSize/t.fontData.size,O=F*t.scaleX,b=F*t.scaleY,N=null,V=0,K=[],$=Number.MAX_VALUE,j=0,X=0,Y=0,D,z=[],W=[],H=null;if(e>0){for(D=0;De||ct>e?(et.push(st.i-1),st.cr?(et.push(st.i+st.word.length),k=0,Q=null):Q=st):st.cr&&(et.push(st.i+st.word.length),k=0,Q=null)}var Et=function($t,oe,le){return $t.substr(0,oe)+le+$t.substr(oe+1)};for(D=et.length-1;D>=0;D--)r=Et(r,et[D],` +`);o.wrappedText=r,n=r.length,z=[],H=null}var St=0;for(D=0;Dj&&(j=Y),Y<$&&($=Y),X++,Y=0;continue}if(S=u[T],!!S){if(w=y,L=x,N!==null){var Ct=S.kerning[V];w+=Ct!==void 0?Ct:0}h>w&&(h=w),s>L&&(s=L);var vt=w+S.xAdvance,Tt=L+d;lj&&(j=Y),Y<$&&($=Y),M>0)for(var At=0;At{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(21859),c=function(o,r,n,e,i,h,s){var l=o.sys.textures.get(n),f=l.get(e),u=o.sys.cache.xml.get(i);if(f&&u){var d=a(u,f,h,s,l);return o.sys.cache.bitmapFont.add(r,{data:d,texture:n,frame:e,fromAtlas:!0}),!0}else return!1};v.exports=c},6925:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(35154),c=function(o,r){var n=r.width,e=r.height,i=Math.floor(n/2),h=Math.floor(e/2),s=a(r,"chars","");if(s!==""){var l=a(r,"image",""),f=o.sys.textures.getFrame(l),u=f.cutX,d=f.cutY,p=f.source.width,g=f.source.height,y=a(r,"offset.x",0),x=a(r,"offset.y",0),T=a(r,"spacing.x",0),S=a(r,"spacing.y",0),M=a(r,"lineSpacing",0),w=a(r,"charsPerRow",null);w===null&&(w=p/n,w>s.length&&(w=s.length));for(var L=y,F=x,O={retroFont:!0,font:l,size:n,lineHeight:e+M,chars:{}},b=0,N=0;N{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */function m(a,c){return parseInt(a.getAttribute(c),10)}var t=function(a,c,o,r,n){o===void 0&&(o=0),r===void 0&&(r=0);var e=c.cutX,i=c.cutY,h=c.source.width,s=c.source.height,l=c.sourceIndex,f={},u=a.getElementsByTagName("info")[0],d=a.getElementsByTagName("common")[0];f.font=u.getAttribute("face"),f.size=m(u,"size"),f.lineHeight=m(d,"lineHeight")+r,f.chars={};var p=a.getElementsByTagName("char"),g=c!==void 0&&c.trimmed;if(g)var y=c.height,x=c.width;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(87662),c=t(79291),o={Parse:t(6925)};o=c(!1,o,a),v.exports=o},87662:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m={TEXT_SET1:" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",TEXT_SET2:` !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ`,TEXT_SET3:"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",TEXT_SET4:"ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789",TEXT_SET5:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789",TEXT_SET6:`ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789"(),-.' `,TEXT_SET7:`AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW")28FLRX-'39`,TEXT_SET8:"0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET9:`ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'"?!`,TEXT_SET10:"ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET11:`ABCDEFGHIJKLMNOPQRSTUVWXYZ.,"-+!?()':;0123456789`};v.exports=m},2638:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(22186),c=t(83419),o=t(12310),r=new c({Extends:a,Mixins:[o],initialize:function(e,i,h,s,l,f,u){a.call(this,e,i,h,s,l,f,u),this.type="DynamicBitmapText",this.scrollX=0,this.scrollY=0,this.cropWidth=0,this.cropHeight=0,this.displayCallback,this.callbackData={parent:this,color:0,tint:{topLeft:0,topRight:0,bottomLeft:0,bottomRight:0},index:0,charCode:0,x:0,y:0,scale:0,rotation:0,data:0}},setSize:function(n,e){return this.cropWidth=n,this.cropHeight=e,this},setDisplayCallback:function(n){return this.displayCallback=n,this},setScrollX:function(n){return this.scrollX=n,this},setScrollY:function(n){return this.scrollY=n,this}});v.exports=r},86741:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(20926),c=function(o,r,n,e){var i=r._text,h=i.length,s=o.currentContext;if(!(h===0||!a(o,s,r,n,e))){n.addToRenderList(r);var l=r.fromAtlas?r.frame:r.texture.frames.__BASE,f=r.displayCallback,u=r.callbackData,d=r.fontData.chars,p=r.fontData.lineHeight,g=r._letterSpacing,y=0,x=0,T=0,S=null,M=0,w=0,L=0,F=0,O=0,b=0,N=null,V=0,K=r.frame.source.image,$=l.cutX,j=l.cutY,X=0,Y=0,D=r._fontSize/r.fontData.size,z=r._align,W=0,H=0;r.getTextBounds(!1);var J=r._bounds.lines;z===1?H=(J.longest-J.lengths[0])/2:z===2&&(H=J.longest-J.lengths[0]),s.translate(-r.displayOriginX,-r.displayOriginY);var Q=n.roundPixels;r.cropWidth>0&&r.cropHeight>0&&(s.beginPath(),s.rect(0,0,r.cropWidth,r.cropHeight),s.clip());for(var k=0;k{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(2638),c=t(25305),o=t(44603),r=t(23568);o.register("dynamicBitmapText",function(n,e){n===void 0&&(n={});var i=r(n,"font",""),h=r(n,"text",""),s=r(n,"size",!1),l=new a(this.scene,0,0,i,h,s);return e!==void 0&&(n.add=e),c(this.scene,l,n),l})},72566:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(2638),c=t(39429);c.register("dynamicBitmapText",function(o,r,n,e,i){return this.displayList.add(new a(this.scene,o,r,n,e,i))})},12310:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),c=a,o=a;c=t(73482),o=t(86741),v.exports={renderWebGL:c,renderCanvas:o}},73482:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(91296),c=t(61340),o=t(70554),r=new c,n=function(e,i,h,s){var l=i.text,f=l.length;if(f!==0){h.addToRenderList(i);var u=e.pipelines.set(i.pipeline,i),d=a(i,h,s);e.pipelines.preBatch(i);var p=d.sprite,g=d.calc,y=r,x=i.cropWidth>0||i.cropHeight>0;x&&(u.flush(),e.pushScissor(g.tx,g.ty,i.cropWidth*g.scaleX,i.cropHeight*g.scaleY));var T=i.frame,S=T.glTexture,M=i.tintFill,w=o.getTintAppendFloatAlpha(i.tintTopLeft,h.alpha*i._alphaTL),L=o.getTintAppendFloatAlpha(i.tintTopRight,h.alpha*i._alphaTR),F=o.getTintAppendFloatAlpha(i.tintBottomLeft,h.alpha*i._alphaBL),O=o.getTintAppendFloatAlpha(i.tintBottomRight,h.alpha*i._alphaBR),b=u.setGameObject(i),N=0,V=0,K=0,$=0,j=i.letterSpacing,X,Y=0,D=0,z,W=i.scrollX,H=i.scrollY,J=i.fontData,Q=J.chars,k=J.lineHeight,et=i.fontSize/J.size,st=0,rt=i._align,ot=0,ft=0,at=i.getTextBounds(!1);i.maxWidth>0&&(l=at.wrappedText,f=l.length);var ct=i._bounds.lines;rt===1?ft=(ct.longest-ct.lengths[0])/2:rt===2&&(ft=ct.longest-ct.lengths[0]);for(var Et=h.roundPixels,St=i.displayCallback,Ct=i.callbackData,vt=0;vt{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(45319),o=t(31401),r=t(95643),n=t(53048),e=t(61327),i=t(21859),h=t(87841),s=t(18658),l=new a({Extends:r,Mixins:[o.Alpha,o.BlendMode,o.Depth,o.GetBounds,o.Mask,o.Origin,o.Pipeline,o.PostPipeline,o.ScrollFactor,o.Texture,o.Tint,o.Transform,o.Visible,s],initialize:function(u,d,p,g,y,x,T){y===void 0&&(y=""),T===void 0&&(T=0),r.call(this,u,"BitmapText"),this.font=g;var S=this.scene.sys.cache.bitmapFont.get(g);S||console.warn("Invalid BitmapText key: "+g),this.fontData=S.data,this._text="",this._fontSize=x||this.fontData.size,this._letterSpacing=0,this._lineSpacing=0,this._align=T,this._bounds=n(),this._dirty=!0,this._maxWidth=0,this.wordWrapCharCode=32,this.charColors=[],this.dropShadowX=0,this.dropShadowY=0,this.dropShadowColor=0,this.dropShadowAlpha=.5,this.fromAtlas=S.fromAtlas,this.setTexture(S.texture,S.frame),this.setPosition(d,p),this.setOrigin(0,0),this.initPipeline(),this.initPostPipeline(),this.setText(y)},setLeftAlign:function(){return this._align=l.ALIGN_LEFT,this._dirty=!0,this},setCenterAlign:function(){return this._align=l.ALIGN_CENTER,this._dirty=!0,this},setRightAlign:function(){return this._align=l.ALIGN_RIGHT,this._dirty=!0,this},setFontSize:function(f){return this._fontSize=f,this._dirty=!0,this},setLetterSpacing:function(f){return f===void 0&&(f=0),this._letterSpacing=f,this._dirty=!0,this},setLineSpacing:function(f){return f===void 0&&(f=0),this.lineSpacing=f,this},setText:function(f){return!f&&f!==0&&(f=""),Array.isArray(f)&&(f=f.join(` +`)),f!==this.text&&(this._text=f.toString(),this._dirty=!0,this.updateDisplayOrigin()),this},setDropShadow:function(f,u,d,p){return f===void 0&&(f=0),u===void 0&&(u=0),d===void 0&&(d=0),p===void 0&&(p=.5),this.dropShadowX=f,this.dropShadowY=u,this.dropShadowColor=d,this.dropShadowAlpha=p,this},setCharacterTint:function(f,u,d,p,g,y,x){f===void 0&&(f=0),u===void 0&&(u=1),d===void 0&&(d=!1),p===void 0&&(p=-1),g===void 0&&(g=p,y=p,x=p);var T=this.text.length;u===-1&&(u=T),f<0&&(f=T+f),f=c(f,0,T-1);for(var S=c(f+u,f,T),M=this.charColors,w=f;w{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(20926),c=function(o,r,n,e){var i=r._text,h=i.length,s=o.currentContext;if(!(h===0||!a(o,s,r,n,e))){n.addToRenderList(r);var l=r.fromAtlas?r.frame:r.texture.frames.__BASE,f=r.fontData.chars,u=r.fontData.lineHeight,d=r._letterSpacing,p=r._lineSpacing,g=0,y=0,x=0,T=null,S=0,M=0,w=0,L=0,F=0,O=0,b=null,N=0,V=l.source.image,K=l.cutX,$=l.cutY,j=r._fontSize/r.fontData.size,X=r._align,Y=0,D=0,z=r.getTextBounds(!1);r.maxWidth>0&&(i=z.wrappedText,h=i.length);var W=r._bounds.lines;X===1?D=(W.longest-W.lengths[0])/2:X===2&&(D=W.longest-W.lengths[0]),s.translate(-r.displayOriginX,-r.displayOriginY);for(var H=n.roundPixels,J=0;J{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(22186),c=t(25305),o=t(44603),r=t(23568),n=t(35154);o.register("bitmapText",function(e,i){e===void 0&&(e={});var h=n(e,"font",""),s=r(e,"text",""),l=r(e,"size",!1),f=n(e,"align",0),u=new a(this.scene,0,0,h,s,l,f);return i!==void 0&&(e.add=i),c(this.scene,u,e),u})},34914:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(22186),c=t(39429);c.register("bitmapText",function(o,r,n,e,i,h){return this.displayList.add(new a(this.scene,o,r,n,e,i,h))})},18658:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),c=a,o=a;c=t(33590),o=t(37289),v.exports={renderWebGL:c,renderCanvas:o}},33590:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(3217),c=t(91296),o=t(70554),r=function(n,e,i,h){var s=e._text,l=s.length;if(l!==0){i.addToRenderList(e);var f=n.pipelines.set(e.pipeline,e),u=c(e,i,h).calc;n.pipelines.preBatch(e);var d=i.roundPixels,p=i.alpha,g=e.charColors,y=e.tintFill,x=o.getTintAppendFloatAlpha,T=x(e.tintTopLeft,p*e._alphaTL),S=x(e.tintTopRight,p*e._alphaTR),M=x(e.tintBottomLeft,p*e._alphaBL),w=x(e.tintBottomRight,p*e._alphaBR),L=e.frame.glTexture,F=f.setGameObject(e),O=e.getTextBounds(!1),b,N,V,K=O.characters,$=e.dropShadowX,j=e.dropShadowY,X=$!==0||j!==0;if(X){var Y=e.dropShadowColor,D=e.dropShadowAlpha,z=x(Y,p*D*e._alphaTL),W=x(Y,p*D*e._alphaTR),H=x(Y,p*D*e._alphaBL),J=x(Y,p*D*e._alphaBR);for(b=0;b{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(48011),c=t(46590),o=t(83419),r=t(31401),n=t(4327),e=t(95643),i=t(73162),h=new o({Extends:e,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Mask,r.Pipeline,r.PostPipeline,r.ScrollFactor,r.Size,r.Texture,r.Transform,r.Visible,a],initialize:function(l,f,u,d,p){e.call(this,l,"Blitter"),this.setTexture(d,p),this.setPosition(f,u),this.initPipeline(),this.initPostPipeline(),this.children=new i,this.renderList=[],this.dirty=!1},create:function(s,l,f,u,d){u===void 0&&(u=!0),d===void 0&&(d=this.children.length),f===void 0?f=this.frame:f instanceof n||(f=this.texture.get(f));var p=new c(this,s,l,f,u);return this.children.addAt(p,d,!1),this.dirty=!0,p},createFromCallback:function(s,l,f,u){for(var d=this.createMultiple(l,f,u),p=0;p0},getRenderList:function(){return this.dirty&&(this.renderList=this.children.list.filter(this.childCanRender,this),this.dirty=!1),this.renderList},clear:function(){this.children.removeAll(),this.dirty=!0},preDestroy:function(){this.children.destroy(),this.renderList=[]}});v.exports=h},72396:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c,o){var r=a.getRenderList();if(r.length!==0){var n=t.currentContext,e=c.alpha*a.alpha;if(e!==0){c.addToRenderList(a),n.globalCompositeOperation=t.blendModes[a.blendMode],n.imageSmoothingEnabled=!a.frame.source.scaleMode;var i=a.x-c.scrollX*a.scrollFactorX,h=a.y-c.scrollY*a.scrollFactorY;n.save(),o&&o.copyToContext(n);for(var s=c.roundPixels,l=0;l0&&p.height>0&&(n.save(),n.translate(f.x+i,f.y+h),n.scale(x,T),n.drawImage(d.source.image,p.x,p.y,p.width,p.height,g,y,p.width,p.height),n.restore())):(s&&(g=Math.round(g),y=Math.round(y)),p.width>0&&p.height>0&&n.drawImage(d.source.image,p.x,p.y,p.width,p.height,g+f.x+i,y+f.y+h,p.width,p.height)))}n.restore()}}};v.exports=m},9403:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(6107),c=t(25305),o=t(44603),r=t(23568);o.register("blitter",function(n,e){n===void 0&&(n={});var i=r(n,"key",null),h=r(n,"frame",null),s=new a(this.scene,0,0,i,h);return e!==void 0&&(n.add=e),c(this.scene,s,n),s})},12709:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(6107),c=t(39429);c.register("blitter",function(o,r,n,e){return this.displayList.add(new a(this.scene,o,r,n,e))})},48011:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),c=a,o=a;c=t(99485),o=t(72396),v.exports={renderWebGL:c,renderCanvas:o}},99485:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(61340),c=t(70554),o=new a,r=function(n,e,i,h){var s=e.getRenderList(),l=i.alpha*e.alpha;if(!(s.length===0||l===0)){i.addToRenderList(e);var f=n.pipelines.set(this.pipeline,e),u=i.scrollX*e.scrollFactorX,d=i.scrollY*e.scrollFactorY,p=o.copyFrom(i.matrix);h&&(p.multiplyWithOffset(h,-u,-d),u=0,d=0);var g=e.x-u,y=e.y-d,x=-1,T=!1;n.pipelines.preBatch(e);for(var S=0;S{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(4327),o=new a({initialize:function(n,e,i,h,s){this.parent=n,this.x=e,this.y=i,this.frame=h,this.data={},this.tint=16777215,this._visible=s,this._alpha=1,this.flipX=!1,this.flipY=!1,this.hasTransformComponent=!0},setFrame:function(r){return r===void 0?this.frame=this.parent.frame:r instanceof c&&r.texture===this.parent.texture?this.frame=r:this.frame=this.parent.texture.get(r),this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this},reset:function(r,n,e){return this.x=r,this.y=n,this.flipX=!1,this.flipY=!1,this._alpha=1,this._visible=!0,this.parent.dirty=!0,e&&this.setFrame(e),this},setPosition:function(r,n){return this.x=r,this.y=n,this},setFlipX:function(r){return this.flipX=r,this},setFlipY:function(r){return this.flipY=r,this},setFlip:function(r,n){return this.flipX=r,this.flipY=n,this},setVisible:function(r){return this.visible=r,this},setAlpha:function(r){return this.alpha=r,this},setTint:function(r){return this.tint=r,this},destroy:function(){this.parent.dirty=!0,this.parent.children.remove(this),this.parent=void 0,this.frame=void 0,this.data=void 0},visible:{get:function(){return this._visible},set:function(r){this.parent.dirty|=this._visible!==r,this._visible=r}},alpha:{get:function(){return this._alpha},set:function(r){this.parent.dirty|=this._alpha>0!=r>0,this._alpha=r}}});v.exports=o},16005:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(45319),c=2,o={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(r,n,e,i){return r===void 0&&(r=1),n===void 0?this.alpha=r:(this._alphaTL=a(r,0,1),this._alphaTR=a(n,0,1),this._alphaBL=a(e,0,1),this._alphaBR=a(i,0,1)),this},alpha:{get:function(){return this._alpha},set:function(r){var n=a(r,0,1);this._alpha=n,this._alphaTL=n,this._alphaTR=n,this._alphaBL=n,this._alphaBR=n,n===0?this.renderFlags&=~c:this.renderFlags|=c}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(r){var n=a(r,0,1);this._alphaTL=n,n!==0&&(this.renderFlags|=c)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(r){var n=a(r,0,1);this._alphaTR=n,n!==0&&(this.renderFlags|=c)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(r){var n=a(r,0,1);this._alphaBL=n,n!==0&&(this.renderFlags|=c)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(r){var n=a(r,0,1);this._alphaBR=n,n!==0&&(this.renderFlags|=c)}}};v.exports=o},88509:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(45319),c=2,o={_alpha:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(r){return r===void 0&&(r=1),this.alpha=r,this},alpha:{get:function(){return this._alpha},set:function(r){var n=a(r,0,1);this._alpha=n,n===0?this.renderFlags&=~c:this.renderFlags|=c}}};v.exports=o},90065:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(10312),c={_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}};v.exports=c},94215:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,a){return this.width=t,this.height=a,this},setDisplaySize:function(t,a){return this.displayWidth=t,this.displayHeight=a,this}};v.exports=m},61683:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m={texture:null,frame:null,isCropped:!1,setCrop:function(t,a,c,o){if(t===void 0)this.isCropped=!1;else if(this.frame){if(typeof t=="number")this.frame.setCropUVs(this._crop,t,a,c,o,this.flipX,this.flipY);else{var r=t;this.frame.setCropUVs(this._crop,r.x,r.y,r.width,r.height,this.flipX,this.flipY)}this.isCropped=!0}return this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};v.exports=m},89272:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.displayList&&this.displayList.queueDepthSort(),this._depth=t}},setDepth:function(t){return t===void 0&&(t=0),this.depth=t,this}};v.exports=m},47059:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(66064),o=t(19133),r=new a({initialize:function(e,i){this.gameObject=e,this.isPost=i,this.enabled=!1,this.list=[],this.padding=0},setPadding:function(n){return n===void 0&&(n=0),this.padding=n,this.gameObject},onFXCopy:function(){},onFX:function(){},enable:function(n){if(!this.isPost){var e=this.gameObject.scene.sys.renderer;e&&e.pipelines?(this.gameObject.pipeline=e.pipelines.FX_PIPELINE,n!==void 0&&(this.padding=n),this.enabled=!0):this.enabled=!1}},clear:function(){if(this.isPost)this.gameObject.resetPostPipeline(!0);else{for(var n=this.list,e=0;e{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,a){return this.flipX=t,this.flipY=a,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}};v.exports=m},8004:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(87841),c=t(11520),o=t(26099),r={prepareBoundsOutput:function(n,e){if(e===void 0&&(e=!1),this.rotation!==0&&c(n,this.x,this.y,this.rotation),e&&this.parentContainer){var i=this.parentContainer.getBoundsTransformMatrix();i.transformPoint(n.x,n.y,n)}return n},getCenter:function(n,e){return n===void 0&&(n=new o),n.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,n.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(n,e)},getTopLeft:function(n,e){return n||(n=new o),n.x=this.x-this.displayWidth*this.originX,n.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(n,e)},getTopCenter:function(n,e){return n||(n=new o),n.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,n.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(n,e)},getTopRight:function(n,e){return n||(n=new o),n.x=this.x-this.displayWidth*this.originX+this.displayWidth,n.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(n,e)},getLeftCenter:function(n,e){return n||(n=new o),n.x=this.x-this.displayWidth*this.originX,n.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(n,e)},getRightCenter:function(n,e){return n||(n=new o),n.x=this.x-this.displayWidth*this.originX+this.displayWidth,n.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(n,e)},getBottomLeft:function(n,e){return n||(n=new o),n.x=this.x-this.displayWidth*this.originX,n.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(n,e)},getBottomCenter:function(n,e){return n||(n=new o),n.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,n.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(n,e)},getBottomRight:function(n,e){return n||(n=new o),n.x=this.x-this.displayWidth*this.originX+this.displayWidth,n.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(n,e)},getBounds:function(n){n===void 0&&(n=new a);var e,i,h,s,l,f,u,d;if(this.parentContainer){var p=this.parentContainer.getBoundsTransformMatrix();this.getTopLeft(n),p.transformPoint(n.x,n.y,n),e=n.x,i=n.y,this.getTopRight(n),p.transformPoint(n.x,n.y,n),h=n.x,s=n.y,this.getBottomLeft(n),p.transformPoint(n.x,n.y,n),l=n.x,f=n.y,this.getBottomRight(n),p.transformPoint(n.x,n.y,n),u=n.x,d=n.y}else this.getTopLeft(n),e=n.x,i=n.y,this.getTopRight(n),h=n.x,s=n.y,this.getBottomLeft(n),l=n.x,f=n.y,this.getBottomRight(n),u=n.x,d=n.y;return n.x=Math.min(e,h,l,u),n.y=Math.min(i,s,f,d),n.width=Math.max(e,h,l,u)-n.x,n.height=Math.max(i,s,f,d)-n.y,n}};v.exports=r},8573:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(6858),c=t(80661),o={mask:null,setMask:function(r){return this.mask=r,this},clearMask:function(r){return r===void 0&&(r=!1),r&&this.mask&&this.mask.destroy(),this.mask=null,this},createBitmapMask:function(r,n,e,i,h){return r===void 0&&(this.texture||this.shader||this.geom)&&(r=this),new a(this.scene,r,n,e,i,h)},createGeometryMask:function(r){return r===void 0&&(this.type==="Graphics"||this.geom)&&(r=this),new c(this.scene,r)}};v.exports=o},27387:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m={_originComponent:!0,originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(t){this._displayOriginX=t,this.originX=t/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(t){this._displayOriginY=t,this.originY=t/this.height}},setOrigin:function(t,a){return t===void 0&&(t=.5),a===void 0&&(a=t),this.originX=t,this.originY=a,this.updateDisplayOrigin()},setOriginFromFrame:function(){return!this.frame||!this.frame.customPivot?this.setOrigin():(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin())},setDisplayOrigin:function(t,a){return t===void 0&&(t=0),a===void 0&&(a=t),this.displayOriginX=t,this.displayOriginY=a,this},updateDisplayOrigin:function(){return this._displayOriginX=this.originX*this.width,this._displayOriginY=this.originY*this.height,this}};v.exports=m},37640:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(39506),c=t(57355),o=t(35154),r=t(86353),n=t(26099),e={path:null,rotateToPath:!1,pathRotationOffset:0,pathOffset:null,pathVector:null,pathDelta:null,pathTween:null,pathConfig:null,_prevDirection:r.PLAYING_FORWARD,setPath:function(i,h){h===void 0&&(h=this.pathConfig);var s=this.pathTween;return s&&s.isPlaying()&&s.stop(),this.path=i,h&&this.startFollow(h),this},setRotateToPath:function(i,h){return h===void 0&&(h=0),this.rotateToPath=i,this.pathRotationOffset=h,this},isFollowing:function(){var i=this.pathTween;return i&&i.isPlaying()},startFollow:function(i,h){i===void 0&&(i={}),h===void 0&&(h=0);var s=this.pathTween;s&&s.isPlaying()&&s.stop(),typeof i=="number"&&(i={duration:i}),i.from=o(i,"from",0),i.to=o(i,"to",1);var l=c(i,"positionOnPath",!1);this.rotateToPath=c(i,"rotateToPath",!1),this.pathRotationOffset=o(i,"rotationOffset",0);var f=o(i,"startAt",h);if(f&&(i.onStart=function(d){var p=d.data[0];p.progress=f,p.elapsed=p.duration*f;var g=p.ease(p.progress);p.current=p.start+(p.end-p.start)*g,p.setTargetValue()}),this.pathOffset||(this.pathOffset=new n(this.x,this.y)),this.pathVector||(this.pathVector=new n),this.pathDelta||(this.pathDelta=new n),this.pathDelta.reset(),i.persist=!0,this.pathTween=this.scene.sys.tweens.addCounter(i),this.path.getStartPoint(this.pathOffset),l&&(this.x=this.pathOffset.x,this.y=this.pathOffset.y),this.pathOffset.x=this.x-this.pathOffset.x,this.pathOffset.y=this.y-this.pathOffset.y,this._prevDirection=r.PLAYING_FORWARD,this.rotateToPath){var u=this.path.getPoint(.1);this.rotation=Math.atan2(u.y-this.y,u.x-this.x)+a(this.pathRotationOffset)}return this.pathConfig=i,this},pauseFollow:function(){var i=this.pathTween;return i&&i.isPlaying()&&i.pause(),this},resumeFollow:function(){var i=this.pathTween;return i&&i.isPaused()&&i.resume(),this},stopFollow:function(){var i=this.pathTween;return i&&i.isPlaying()&&i.stop(),this},pathUpdate:function(){var i=this.pathTween;if(i&&i.data){var h=i.data[0],s=this.pathDelta,l=this.pathVector;if(s.copy(l).negate(),h.state===r.COMPLETE){this.path.getPoint(h.end,l),s.add(l),l.add(this.pathOffset),this.setPosition(l.x,l.y);return}else if(h.state!==r.PLAYING_FORWARD&&h.state!==r.PLAYING_BACKWARD)return;this.path.getPoint(i.getValue(),l),s.add(l),l.add(this.pathOffset);var f=this.x,u=this.y;this.setPosition(l.x,l.y);var d=this.x-f,p=this.y-u;if(d===0&&p===0)return;if(h.state!==this._prevDirection){this._prevDirection=h.state;return}this.rotateToPath&&(this.rotation=Math.atan2(p,d)+a(this.pathRotationOffset))}}};v.exports=e},72699:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(62644),c={defaultPipeline:null,pipeline:null,pipelineData:null,initPipeline:function(o){this.pipelineData={};var r=this.scene.sys.renderer;if(!r)return!1;var n=r.pipelines;if(n){o===void 0&&(o=n.default);var e=n.get(o);if(e)return this.defaultPipeline=e,this.pipeline=e,!0}return!1},setPipeline:function(o,r,n){var e=this.scene.sys.renderer;if(!e)return this;var i=e.pipelines;if(i){var h=i.get(o);h&&(this.pipeline=h),r&&(this.pipelineData=n?a(r):r)}return this},setPipelineData:function(o,r){var n=this.pipelineData;return r===void 0?delete n[o]:n[o]=r,this},resetPipeline:function(o){return o===void 0&&(o=!1),this.pipeline=this.defaultPipeline,o&&(this.pipelineData={}),this.pipeline!==null},getPipelineName:function(){return this.pipeline.name}};v.exports=c},17581:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(62644),c=t(47059),o=t(19133),r={hasPostPipeline:!1,postPipelines:null,postPipelineData:null,preFX:null,postFX:null,initPostPipeline:function(n){this.postPipelines=[],this.postPipelineData={},this.postFX=new c(this,!0),n&&(this.preFX=new c(this,!1))},setPostPipeline:function(n,e,i){var h=this.scene.sys.renderer;if(!h)return this;var s=h.pipelines;if(s){Array.isArray(n)||(n=[n]);for(var l=0;l0,this},setPostPipelineData:function(n,e){var i=this.postPipelineData;return e===void 0?delete i[n]:i[n]=e,this},getPostPipeline:function(n){for(var e=typeof n=="string",i=this.postPipelines,h=[],s=0;s=0;h--){var s=i[h];(e&&s.name===n||!e&&s===n)&&(s.destroy(),o(i,h))}return this.hasPostPipeline=this.postPipelines.length>0,this},clearFX:function(){return this.preFX&&this.preFX.clear(),this.postFX&&this.postFX.clear(),this}};v.exports=r},80227:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,a){return a===void 0&&(a=t),this.scrollFactorX=t,this.scrollFactorY=a,this}};v.exports=m},16736:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m={_sizeComponent:!0,width:0,height:0,displayWidth:{get:function(){return Math.abs(this.scaleX*this.frame.realWidth)},set:function(t){this.scaleX=t/this.frame.realWidth}},displayHeight:{get:function(){return Math.abs(this.scaleY*this.frame.realHeight)},set:function(t){this.scaleY=t/this.frame.realHeight}},setSizeToFrame:function(t){t||(t=this.frame),this.width=t.realWidth,this.height=t.realHeight;var a=this.input;return a&&!a.customHitArea&&(a.hitArea.width=this.width,a.hitArea.height=this.height),this},setSize:function(t,a){return this.width=t,this.height=a,this},setDisplaySize:function(t,a){return this.displayWidth=t,this.displayHeight=a,this}};v.exports=m},37726:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(4327),c=8,o={texture:null,frame:null,isCropped:!1,setTexture:function(r,n,e,i){return this.texture=this.scene.sys.textures.get(r),this.setFrame(n,e,i)},setFrame:function(r,n,e){return n===void 0&&(n=!0),e===void 0&&(e=!0),r instanceof a?(this.texture=this.scene.sys.textures.get(r.texture.key),this.frame=r):this.frame=this.texture.get(r),!this.frame.cutWidth||!this.frame.cutHeight?this.renderFlags&=~c:this.renderFlags|=c,this._sizeComponent&&n&&this.setSizeToFrame(),this._originComponent&&e&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}};v.exports=o},79812:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(4327),c=8,o={texture:null,frame:null,isCropped:!1,setCrop:function(r,n,e,i){if(r===void 0)this.isCropped=!1;else if(this.frame){if(typeof r=="number")this.frame.setCropUVs(this._crop,r,n,e,i,this.flipX,this.flipY);else{var h=r;this.frame.setCropUVs(this._crop,h.x,h.y,h.width,h.height,this.flipX,this.flipY)}this.isCropped=!0}return this},setTexture:function(r,n){return this.texture=this.scene.sys.textures.get(r),this.setFrame(n)},setFrame:function(r,n,e){return n===void 0&&(n=!0),e===void 0&&(e=!0),r instanceof a?(this.texture=this.scene.sys.textures.get(r.texture.key),this.frame=r):this.frame=this.texture.get(r),!this.frame.cutWidth||!this.frame.cutHeight?this.renderFlags&=~c:this.renderFlags|=c,this._sizeComponent&&n&&this.setSizeToFrame(),this._originComponent&&e&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this.isCropped&&this.frame.updateCropUVs(this._crop,this.flipX,this.flipY),this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};v.exports=o},27472:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m={tintTopLeft:16777215,tintTopRight:16777215,tintBottomLeft:16777215,tintBottomRight:16777215,tintFill:!1,clearTint:function(){return this.setTint(16777215),this},setTint:function(t,a,c,o){return t===void 0&&(t=16777215),a===void 0&&(a=t,c=t,o=t),this.tintTopLeft=t,this.tintTopRight=a,this.tintBottomLeft=c,this.tintBottomRight=o,this.tintFill=!1,this},setTintFill:function(t,a,c,o){return this.setTint(t,a,c,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}}};v.exports=m},53774:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){var a={name:t.name,type:t.type,x:t.x,y:t.y,depth:t.depth,scale:{x:t.scaleX,y:t.scaleY},origin:{x:t.originX,y:t.originY},flipX:t.flipX,flipY:t.flipY,rotation:t.rotation,alpha:t.alpha,visible:t.visible,blendMode:t.blendMode,textureKey:"",frameKey:"",data:{}};return t.texture&&(a.textureKey=t.texture.key,a.frameKey=t.frame.name),a};v.exports=m},16901:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(36383),c=t(61340),o=t(85955),r=t(86554),n=t(30954),e=t(26099),i=4,h={hasTransformComponent:!0,_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scale:{get:function(){return(this._scaleX+this._scaleY)/2},set:function(s){this._scaleX=s,this._scaleY=s,s===0?this.renderFlags&=~i:this.renderFlags|=i}},scaleX:{get:function(){return this._scaleX},set:function(s){this._scaleX=s,s===0?this.renderFlags&=~i:this._scaleY!==0&&(this.renderFlags|=i)}},scaleY:{get:function(){return this._scaleY},set:function(s){this._scaleY=s,s===0?this.renderFlags&=~i:this._scaleX!==0&&(this.renderFlags|=i)}},angle:{get:function(){return n(this._rotation*a.RAD_TO_DEG)},set:function(s){this.rotation=n(s)*a.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(s){this._rotation=r(s)}},setPosition:function(s,l,f,u){return s===void 0&&(s=0),l===void 0&&(l=s),f===void 0&&(f=0),u===void 0&&(u=0),this.x=s,this.y=l,this.z=f,this.w=u,this},copyPosition:function(s){return s.x!==void 0&&(this.x=s.x),s.y!==void 0&&(this.y=s.y),s.z!==void 0&&(this.z=s.z),s.w!==void 0&&(this.w=s.w),this},setRandomPosition:function(s,l,f,u){return s===void 0&&(s=0),l===void 0&&(l=0),f===void 0&&(f=this.scene.sys.scale.width),u===void 0&&(u=this.scene.sys.scale.height),this.x=s+Math.random()*f,this.y=l+Math.random()*u,this},setRotation:function(s){return s===void 0&&(s=0),this.rotation=s,this},setAngle:function(s){return s===void 0&&(s=0),this.angle=s,this},setScale:function(s,l){return s===void 0&&(s=1),l===void 0&&(l=s),this.scaleX=s,this.scaleY=l,this},setX:function(s){return s===void 0&&(s=0),this.x=s,this},setY:function(s){return s===void 0&&(s=0),this.y=s,this},setZ:function(s){return s===void 0&&(s=0),this.z=s,this},setW:function(s){return s===void 0&&(s=0),this.w=s,this},getLocalTransformMatrix:function(s){return s===void 0&&(s=new c),s.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(s,l){s===void 0&&(s=new c);var f=this.parentContainer;if(!f)return this.getLocalTransformMatrix(s);for(l||(l=new c),s.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY);f;)l.applyITRS(f.x,f.y,f._rotation,f._scaleX,f._scaleY),l.multiply(s,s),f=f.parentContainer;return s},getLocalPoint:function(s,l,f,u){f||(f=new e),u||(u=this.scene.sys.cameras.main);var d=u.scrollX,p=u.scrollY,g=s+d*this.scrollFactorX-d,y=l+p*this.scrollFactorY-p;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(g,y,f):o(g,y,this.x,this.y,this.rotation,this.scaleX,this.scaleY,f),this._originComponent&&(f.x+=this._displayOriginX,f.y+=this._displayOriginY),f},getParentRotation:function(){for(var s=0,l=this.parentContainer;l;)s+=l.rotation,l=l.parentContainer;return s}};v.exports=h},61340:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(36383),o=t(26099),r=new a({initialize:function(e,i,h,s,l,f){e===void 0&&(e=1),i===void 0&&(i=0),h===void 0&&(h=0),s===void 0&&(s=1),l===void 0&&(l=0),f===void 0&&(f=0),this.matrix=new Float32Array([e,i,h,s,l,f,0,0,1]),this.decomposedMatrix={translateX:0,translateY:0,scaleX:1,scaleY:1,rotation:0},this.quad=new Float32Array(8)},a:{get:function(){return this.matrix[0]},set:function(n){this.matrix[0]=n}},b:{get:function(){return this.matrix[1]},set:function(n){this.matrix[1]=n}},c:{get:function(){return this.matrix[2]},set:function(n){this.matrix[2]=n}},d:{get:function(){return this.matrix[3]},set:function(n){this.matrix[3]=n}},e:{get:function(){return this.matrix[4]},set:function(n){this.matrix[4]=n}},f:{get:function(){return this.matrix[5]},set:function(n){this.matrix[5]=n}},tx:{get:function(){return this.matrix[4]},set:function(n){this.matrix[4]=n}},ty:{get:function(){return this.matrix[5]},set:function(n){this.matrix[5]=n}},rotation:{get:function(){return Math.acos(this.a/this.scaleX)*(Math.atan(-this.c/this.a)<0?-1:1)}},rotationNormalized:{get:function(){var n=this.matrix,e=n[0],i=n[1],h=n[2],s=n[3];return e||i?i>0?Math.acos(e/this.scaleX):-Math.acos(e/this.scaleX):h||s?c.TAU-(s>0?Math.acos(-h/this.scaleY):-Math.acos(h/this.scaleY)):0}},scaleX:{get:function(){return Math.sqrt(this.a*this.a+this.b*this.b)}},scaleY:{get:function(){return Math.sqrt(this.c*this.c+this.d*this.d)}},loadIdentity:function(){var n=this.matrix;return n[0]=1,n[1]=0,n[2]=0,n[3]=1,n[4]=0,n[5]=0,this},translate:function(n,e){var i=this.matrix;return i[4]=i[0]*n+i[2]*e+i[4],i[5]=i[1]*n+i[3]*e+i[5],this},scale:function(n,e){var i=this.matrix;return i[0]*=n,i[1]*=n,i[2]*=e,i[3]*=e,this},rotate:function(n){var e=Math.sin(n),i=Math.cos(n),h=this.matrix,s=h[0],l=h[1],f=h[2],u=h[3];return h[0]=s*i+f*e,h[1]=l*i+u*e,h[2]=s*-e+f*i,h[3]=l*-e+u*i,this},multiply:function(n,e){var i=this.matrix,h=n.matrix,s=i[0],l=i[1],f=i[2],u=i[3],d=i[4],p=i[5],g=h[0],y=h[1],x=h[2],T=h[3],S=h[4],M=h[5],w=e===void 0?i:e.matrix;return w[0]=g*s+y*f,w[1]=g*l+y*u,w[2]=x*s+T*f,w[3]=x*l+T*u,w[4]=S*s+M*f+d,w[5]=S*l+M*u+p,w},multiplyWithOffset:function(n,e,i){var h=this.matrix,s=n.matrix,l=h[0],f=h[1],u=h[2],d=h[3],p=h[4],g=h[5],y=e*l+i*u+p,x=e*f+i*d+g,T=s[0],S=s[1],M=s[2],w=s[3],L=s[4],F=s[5];return h[0]=T*l+S*u,h[1]=T*f+S*d,h[2]=M*l+w*u,h[3]=M*f+w*d,h[4]=L*l+F*u+y,h[5]=L*f+F*d+x,this},transform:function(n,e,i,h,s,l){var f=this.matrix,u=f[0],d=f[1],p=f[2],g=f[3],y=f[4],x=f[5];return f[0]=n*u+e*p,f[1]=n*d+e*g,f[2]=i*u+h*p,f[3]=i*d+h*g,f[4]=s*u+l*p+y,f[5]=s*d+l*g+x,this},transformPoint:function(n,e,i){i===void 0&&(i={x:0,y:0});var h=this.matrix,s=h[0],l=h[1],f=h[2],u=h[3],d=h[4],p=h[5];return i.x=n*s+e*f+d,i.y=n*l+e*u+p,i},invert:function(){var n=this.matrix,e=n[0],i=n[1],h=n[2],s=n[3],l=n[4],f=n[5],u=e*s-i*h;return n[0]=s/u,n[1]=-i/u,n[2]=-h/u,n[3]=e/u,n[4]=(h*f-s*l)/u,n[5]=-(e*f-i*l)/u,this},copyFrom:function(n){var e=this.matrix;return e[0]=n.a,e[1]=n.b,e[2]=n.c,e[3]=n.d,e[4]=n.e,e[5]=n.f,this},copyFromArray:function(n){var e=this.matrix;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],this},copyToContext:function(n){var e=this.matrix;return n.transform(e[0],e[1],e[2],e[3],e[4],e[5]),n},setToContext:function(n){return n.setTransform(this),n},copyToArray:function(n){var e=this.matrix;return n===void 0?n=[e[0],e[1],e[2],e[3],e[4],e[5]]:(n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=e[4],n[5]=e[5]),n},setTransform:function(n,e,i,h,s,l){var f=this.matrix;return f[0]=n,f[1]=e,f[2]=i,f[3]=h,f[4]=s,f[5]=l,this},decomposeMatrix:function(){var n=this.decomposedMatrix,e=this.matrix,i=e[0],h=e[1],s=e[2],l=e[3],f=i*l-h*s;if(n.translateX=e[4],n.translateY=e[5],i||h){var u=Math.sqrt(i*i+h*h);n.rotation=h>0?Math.acos(i/u):-Math.acos(i/u),n.scaleX=u,n.scaleY=f/u}else if(s||l){var d=Math.sqrt(s*s+l*l);n.rotation=Math.PI*.5-(l>0?Math.acos(-s/d):-Math.acos(s/d)),n.scaleX=f/d,n.scaleY=d}else n.rotation=0,n.scaleX=0,n.scaleY=0;return n},applyITRS:function(n,e,i,h,s){var l=this.matrix,f=Math.sin(i),u=Math.cos(i);return l[4]=n,l[5]=e,l[0]=u*h,l[1]=f*h,l[2]=-f*s,l[3]=u*s,this},applyInverse:function(n,e,i){i===void 0&&(i=new o);var h=this.matrix,s=h[0],l=h[1],f=h[2],u=h[3],d=h[4],p=h[5],g=1/(s*u+f*-l);return i.x=u*g*n+-f*g*e+(p*f-d*u)*g,i.y=s*g*e+-l*g*n+(-p*s+d*l)*g,i},setQuad:function(n,e,i,h,s,l){s===void 0&&(s=!1),l===void 0&&(l=this.quad);var f=this.matrix,u=f[0],d=f[1],p=f[2],g=f[3],y=f[4],x=f[5];return s?(l[0]=Math.round(n*u+e*p+y),l[1]=Math.round(n*d+e*g+x),l[2]=Math.round(n*u+h*p+y),l[3]=Math.round(n*d+h*g+x),l[4]=Math.round(i*u+h*p+y),l[5]=Math.round(i*d+h*g+x),l[6]=Math.round(i*u+e*p+y),l[7]=Math.round(i*d+e*g+x)):(l[0]=n*u+e*p+y,l[1]=n*d+e*g+x,l[2]=n*u+h*p+y,l[3]=n*d+h*g+x,l[4]=i*u+h*p+y,l[5]=i*d+h*g+x,l[6]=i*u+e*p+y,l[7]=i*d+e*g+x),l},getX:function(n,e){return n*this.a+e*this.c+this.e},getY:function(n,e){return n*this.b+e*this.d+this.f},getXRound:function(n,e,i){var h=this.getX(n,e);return i&&(h=Math.round(h)),h},getYRound:function(n,e,i){var h=this.getY(n,e);return i&&(h=Math.round(h)),h},getCSSMatrix:function(){var n=this.matrix;return"matrix("+n[0]+","+n[1]+","+n[2]+","+n[3]+","+n[4]+","+n[5]+")"},destroy:function(){this.matrix=null,this.quad=null,this.decomposedMatrix=null}});v.exports=r},59715:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=1,t={_visible:!0,visible:{get:function(){return this._visible},set:function(a){a?(this._visible=!0,this.renderFlags|=m):(this._visible=!1,this.renderFlags&=~m)}},setVisible:function(a){return this.visible=a,this}};v.exports=t},31401:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.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:(v,m,t)=>{/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(37105),c=t(10312),o=t(83419),r=t(31401),n=t(51708),e=t(95643),i=t(87841),h=t(29959),s=t(36899),l=t(26099),f=new o({Extends:e,Mixins:[r.AlphaSingle,r.BlendMode,r.ComputedSize,r.Depth,r.Mask,r.PostPipeline,r.Transform,r.Visible,h],initialize:function(d,p,g,y){e.call(this,d,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new r.TransformMatrix,this.tempTransformMatrix=new r.TransformMatrix,this._sortKey="",this._sysEvents=d.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.initPostPipeline(),this.setPosition(p,g),this.setBlendMode(c.SKIP_CHECK),y&&this.add(y)},originX:{get:function(){return .5}},originY:{get:function(){return .5}},displayOriginX:{get:function(){return this.width*.5}},displayOriginY:{get:function(){return this.height*.5}},setExclusive:function(u){return u===void 0&&(u=!0),this.exclusive=u,this},getBounds:function(u){if(u===void 0&&(u=new i),u.setTo(this.x,this.y,0,0),this.parentContainer){var d=this.parentContainer.getBoundsTransformMatrix(),p=d.transformPoint(this.x,this.y);u.setTo(p.x,p.y,0,0)}if(this.list.length>0){var g=this.list,y=new i,x=!1;u.setEmpty();for(var T=0;T-1},setAll:function(u,d,p,g){return a.SetAll(this.list,u,d,p,g),this},each:function(u,d){var p=[null],g,y=this.list.slice(),x=y.length;for(g=2;g0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[]},onChildDestroyed:function(u){a.Remove(this.list,u),this.exclusive&&(u.parentContainer=null,u.removedFromScene())}});v.exports=f},53584:v=>{/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c,o){c.addToRenderList(a);var r=a.list;if(r.length!==0){var n=a.localTransform;o?(n.loadIdentity(),n.multiply(o),n.translate(a.x,a.y),n.rotate(a.rotation),n.scale(a.scaleX,a.scaleY)):n.applyITRS(a.x,a.y,a.rotation,a.scaleX,a.scaleY);var e=a.blendMode!==-1;e||t.setBlendMode(0);var i=a._alpha,h=a.scrollFactorX,s=a.scrollFactorY;a.mask&&a.mask.preRenderCanvas(t,null,c);for(var l=0;l{/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(25305),c=t(31559),o=t(44603),r=t(23568),n=t(95540);o.register("container",function(e,i){e===void 0&&(e={});var h=r(e,"x",0),s=r(e,"y",0),l=n(e,"children",null),f=new c(this.scene,h,s,l);return i!==void 0&&(e.add=i),a(this.scene,f,e),f})},24961:(v,m,t)=>{/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(31559),c=t(39429);c.register("container",function(o,r,n){return this.displayList.add(new a(this.scene,o,r,n))})},29959:(v,m,t)=>{/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),c=a,o=a;c=t(72249),o=t(53584),v.exports={renderWebGL:c,renderCanvas:o}},72249:v=>{/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c,o){c.addToRenderList(a);var r=a.list,n=r.length;if(n!==0){var e=a.localTransform;o?(e.loadIdentity(),e.multiply(o),e.translate(a.x,a.y),e.rotate(a.rotation),e.scale(a.scaleX,a.scaleY)):e.applyITRS(a.x,a.y,a.rotation,a.scaleX,a.scaleY),t.pipelines.preBatch(a);var i=a.blendMode!==-1;i||t.setBlendMode(0);for(var h=a.alpha,s=a.scrollFactorX,l=a.scrollFactorY,f=0;f{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports=["normal","multiply","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]},3069:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(31401),o=t(441),r=t(95643),n=t(41212),e=t(35846),i=t(44594),h=t(61369),s=new a({Extends:r,Mixins:[c.AlphaSingle,c.BlendMode,c.Depth,c.Origin,c.ScrollFactor,c.Transform,c.Visible,o],initialize:function(f,u,d,p,g,y){r.call(this,f,"DOMElement"),this.parent=f.sys.game.domContainer,this.cache=f.sys.cache.html,this.node,this.transformOnly=!1,this.skewX=0,this.skewY=0,this.rotate3d=new h,this.rotate3dAngle="deg",this.pointerEvents="auto",this.width=0,this.height=0,this.displayWidth=0,this.displayHeight=0,this.handler=this.dispatchNativeEvent.bind(this),this.setPosition(u,d),typeof p=="string"?p[0]==="#"?this.setElement(p.substr(1),g,y):this.createElement(p,g,y):p&&this.setElement(p,g,y),f.sys.events.on(i.SLEEP,this.handleSceneEvent,this),f.sys.events.on(i.WAKE,this.handleSceneEvent,this),f.sys.events.on(i.PRE_RENDER,this.preRender,this)},handleSceneEvent:function(l){var f=this.node,u=f.style;f&&(u.display=l.settings.visible?"block":"none")},setSkew:function(l,f){return l===void 0&&(l=0),f===void 0&&(f=l),this.skewX=l,this.skewY=f,this},setPerspective:function(l){return this.parent.style.perspective=l+"px",this},perspective:{get:function(){return parseFloat(this.parent.style.perspective)},set:function(l){this.parent.style.perspective=l+"px"}},addListener:function(l){if(this.node){l=l.split(" ");for(var f=0;f{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(47407),c=t(95643),o=t(61340),r=new o,n=new o,e=new o,i=function(h,s,l,f){if(s.node){var u=s.node.style,d=s.scene.sys.settings;if(!u||!d.visible||c.RENDER_MASK!==s.renderFlags||s.cameraFilter!==0&&s.cameraFilter&l.id||s.parentContainer&&!s.parentContainer.willRender()){u.display="none";return}var p=s.parentContainer,g=l.alpha*s.alpha;p&&(g*=p.alpha);var y=r,x=n,T=e,S=0,M=0,w="0%",L="0%";f?(S=s.width*s.scaleX*s.originX,M=s.height*s.scaleY*s.originY,x.applyITRS(s.x-S,s.y-M,s.rotation,s.scaleX,s.scaleY),y.copyFrom(l.matrix),y.multiplyWithOffset(f,-l.scrollX*s.scrollFactorX,-l.scrollY*s.scrollFactorY),x.e=s.x-S,x.f=s.y-M,y.multiply(x,T)):(S=s.width*s.originX,M=s.height*s.originY,x.applyITRS(s.x-S,s.y-M,s.rotation,s.scaleX,s.scaleY),y.copyFrom(l.matrix),w=100*s.originX+"%",L=100*s.originY+"%",x.e-=l.scrollX*s.scrollFactorX,x.f-=l.scrollY*s.scrollFactorY,y.multiply(x,T)),s.transformOnly||(u.display="block",u.opacity=g,u.zIndex=s._depth,u.pointerEvents=s.pointerEvents,u.mixBlendMode=a[s._blendMode]),u.transform=T.getCSSMatrix()+" skew("+s.skewX+"rad, "+s.skewY+"rad) rotate3d("+s.rotate3d.x+","+s.rotate3d.y+","+s.rotate3d.z+","+s.rotate3d.w+s.rotate3dAngle+")",u.transformOrigin=w+" "+L}};v.exports=i},2611:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(3069),c=t(39429);c.register("dom",function(o,r,n,e,i){var h=new a(this.scene,o,r,n,e,i);return this.displayList.add(h),h})},441:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),c=a,o=a;c=t(49381),o=t(49381),v.exports={renderWebGL:c,renderCanvas:o}},62980:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="addedtoscene"},41337:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="destroy"},44947:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="removedfromscene"},49358:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="complete"},35163:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="created"},97249:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="error"},19483:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="locked"},56059:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="loop"},26772:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="metadata"},64437:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="playing"},83411:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="play"},75780:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="seeked"},67799:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="seeking"},63500:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="stalled"},55541:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="stop"},53208:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="textureready"},4992:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="unlocked"},12:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="unsupported"},51708:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.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:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(31401),o=t(95643),r=t(64993),n=new a({Extends:o,Mixins:[c.Alpha,c.BlendMode,c.Depth,c.Flip,c.Origin,c.ScrollFactor,c.Size,c.Texture,c.Tint,c.Transform,c.Visible,r],initialize:function(i){o.call(this,i,"Extern")},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(){},render:function(){}});v.exports=n},70217:()=>{},56315:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(42421),c=t(39429);c.register("extern",function(){var o=new a(this.scene);return this.displayList.add(o),o})},64993:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),c=a,o=a;c=t(80287),o=t(70217),v.exports={renderWebGL:c,renderCanvas:o}},80287:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(91296),c=function(o,r,n,e){o.pipelines.clear();var i=a(r,n,e).calc;r.render.call(r,o,n,i),o.pipelines.rebind()};v.exports=c},85592:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.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:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(71911),c=t(83419),o=t(85592),r=t(31401),n=t(8497),e=t(95643),i=t(95540),h=t(35154),s=t(36383),l=t(84503),f=new c({Extends:e,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.Mask,r.Pipeline,r.PostPipeline,r.Transform,r.Visible,r.ScrollFactor,l],initialize:function(d,p){var g=h(p,"x",0),y=h(p,"y",0);e.call(this,d,"Graphics"),this.setPosition(g,y),this.initPipeline(),this.initPostPipeline(),this.displayOriginX=0,this.displayOriginY=0,this.commandBuffer=[],this.defaultFillColor=-1,this.defaultFillAlpha=1,this.defaultStrokeWidth=1,this.defaultStrokeColor=-1,this.defaultStrokeAlpha=1,this._lineWidth=1,this.lineStyle(1,0,0),this.fillStyle(0,0),this.setDefaultStyles(p)},setDefaultStyles:function(u){return h(u,"lineStyle",null)&&(this.defaultStrokeWidth=h(u,"lineStyle.width",1),this.defaultStrokeColor=h(u,"lineStyle.color",16777215),this.defaultStrokeAlpha=h(u,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),h(u,"fillStyle",null)&&(this.defaultFillColor=h(u,"fillStyle.color",16777215),this.defaultFillAlpha=h(u,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(u,d,p){return p===void 0&&(p=1),this.commandBuffer.push(o.LINE_STYLE,u,d,p),this._lineWidth=u,this},fillStyle:function(u,d){return d===void 0&&(d=1),this.commandBuffer.push(o.FILL_STYLE,u,d),this},fillGradientStyle:function(u,d,p,g,y,x,T,S){return y===void 0&&(y=1),x===void 0&&(x=y),T===void 0&&(T=y),S===void 0&&(S=y),this.commandBuffer.push(o.GRADIENT_FILL_STYLE,y,x,T,S,u,d,p,g),this},lineGradientStyle:function(u,d,p,g,y,x){return x===void 0&&(x=1),this.commandBuffer.push(o.GRADIENT_LINE_STYLE,u,x,d,p,g,y),this},beginPath:function(){return this.commandBuffer.push(o.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(o.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(o.FILL_PATH),this},fill:function(){return this.commandBuffer.push(o.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(o.STROKE_PATH),this},stroke:function(){return this.commandBuffer.push(o.STROKE_PATH),this},fillCircleShape:function(u){return this.fillCircle(u.x,u.y,u.radius)},strokeCircleShape:function(u){return this.strokeCircle(u.x,u.y,u.radius)},fillCircle:function(u,d,p){return this.beginPath(),this.arc(u,d,p,0,s.PI2),this.fillPath(),this},strokeCircle:function(u,d,p){return this.beginPath(),this.arc(u,d,p,0,s.PI2),this.strokePath(),this},fillRectShape:function(u){return this.fillRect(u.x,u.y,u.width,u.height)},strokeRectShape:function(u){return this.strokeRect(u.x,u.y,u.width,u.height)},fillRect:function(u,d,p,g){return this.commandBuffer.push(o.FILL_RECT,u,d,p,g),this},strokeRect:function(u,d,p,g){var y=this._lineWidth/2,x=u-y,T=u+y;return this.beginPath(),this.moveTo(u,d),this.lineTo(u,d+g),this.strokePath(),this.beginPath(),this.moveTo(u+p,d),this.lineTo(u+p,d+g),this.strokePath(),this.beginPath(),this.moveTo(x,d),this.lineTo(T+p,d),this.strokePath(),this.beginPath(),this.moveTo(x,d+g),this.lineTo(T+p,d+g),this.strokePath(),this},fillRoundedRect:function(u,d,p,g,y){y===void 0&&(y=20);var x=y,T=y,S=y,M=y;typeof y!="number"&&(x=i(y,"tl",20),T=i(y,"tr",20),S=i(y,"bl",20),M=i(y,"br",20));var w=x>=0,L=T>=0,F=S>=0,O=M>=0;return x=Math.abs(x),T=Math.abs(T),S=Math.abs(S),M=Math.abs(M),this.beginPath(),this.moveTo(u+x,d),this.lineTo(u+p-T,d),L?this.arc(u+p-T,d+T,T,-s.TAU,0):this.arc(u+p,d,T,Math.PI,s.TAU,!0),this.lineTo(u+p,d+g-M),O?this.arc(u+p-M,d+g-M,M,0,s.TAU):this.arc(u+p,d+g,M,-s.TAU,Math.PI,!0),this.lineTo(u+S,d+g),F?this.arc(u+S,d+g-S,S,s.TAU,Math.PI):this.arc(u,d+g,S,0,-s.TAU,!0),this.lineTo(u,d+x),w?this.arc(u+x,d+x,x,-Math.PI,-s.TAU):this.arc(u,d,x,s.TAU,0,!0),this.fillPath(),this},strokeRoundedRect:function(u,d,p,g,y){y===void 0&&(y=20);var x=y,T=y,S=y,M=y,w=Math.min(p,g)/2;typeof y!="number"&&(x=i(y,"tl",20),T=i(y,"tr",20),S=i(y,"bl",20),M=i(y,"br",20));var L=x>=0,F=T>=0,O=S>=0,b=M>=0;return x=Math.min(Math.abs(x),w),T=Math.min(Math.abs(T),w),S=Math.min(Math.abs(S),w),M=Math.min(Math.abs(M),w),this.beginPath(),this.moveTo(u+x,d),this.lineTo(u+p-T,d),this.moveTo(u+p-T,d),F?this.arc(u+p-T,d+T,T,-s.TAU,0):this.arc(u+p,d,T,Math.PI,s.TAU,!0),this.lineTo(u+p,d+g-M),this.moveTo(u+p,d+g-M),b?this.arc(u+p-M,d+g-M,M,0,s.TAU):this.arc(u+p,d+g,M,-s.TAU,Math.PI,!0),this.lineTo(u+S,d+g),this.moveTo(u+S,d+g),O?this.arc(u+S,d+g-S,S,s.TAU,Math.PI):this.arc(u,d+g,S,0,-s.TAU,!0),this.lineTo(u,d+x),this.moveTo(u,d+x),L?this.arc(u+x,d+x,x,-Math.PI,-s.TAU):this.arc(u,d,x,s.TAU,0,!0),this.strokePath(),this},fillPointShape:function(u,d){return this.fillPoint(u.x,u.y,d)},fillPoint:function(u,d,p){return!p||p<1?p=1:(u-=p/2,d-=p/2),this.commandBuffer.push(o.FILL_RECT,u,d,p,p),this},fillTriangleShape:function(u){return this.fillTriangle(u.x1,u.y1,u.x2,u.y2,u.x3,u.y3)},strokeTriangleShape:function(u){return this.strokeTriangle(u.x1,u.y1,u.x2,u.y2,u.x3,u.y3)},fillTriangle:function(u,d,p,g,y,x){return this.commandBuffer.push(o.FILL_TRIANGLE,u,d,p,g,y,x),this},strokeTriangle:function(u,d,p,g,y,x){return this.commandBuffer.push(o.STROKE_TRIANGLE,u,d,p,g,y,x),this},strokeLineShape:function(u){return this.lineBetween(u.x1,u.y1,u.x2,u.y2)},lineBetween:function(u,d,p,g){return this.beginPath(),this.moveTo(u,d),this.lineTo(p,g),this.strokePath(),this},lineTo:function(u,d){return this.commandBuffer.push(o.LINE_TO,u,d),this},moveTo:function(u,d){return this.commandBuffer.push(o.MOVE_TO,u,d),this},strokePoints:function(u,d,p,g){d===void 0&&(d=!1),p===void 0&&(p=!1),g===void 0&&(g=u.length),this.beginPath(),this.moveTo(u[0].x,u[0].y);for(var y=1;y-1&&this.fillStyle(this.defaultFillColor,this.defaultFillAlpha),this.defaultStrokeColor>-1&&this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha),this},generateTexture:function(u,d,p){var g=this.scene.sys,y=g.game.renderer;d===void 0&&(d=g.scale.width),p===void 0&&(p=g.scale.height),f.TargetCamera.setScene(this.scene),f.TargetCamera.setViewport(0,0,d,p),f.TargetCamera.scrollX=this.x,f.TargetCamera.scrollY=this.y;var x,T,S={willReadFrequently:!0};if(typeof u=="string")if(g.textures.exists(u)){x=g.textures.get(u);var M=x.getSourceImage();M instanceof HTMLCanvasElement&&(T=M.getContext("2d",S))}else x=g.textures.createCanvas(u,d,p),T=x.getSourceImage().getContext("2d",S);else u instanceof HTMLCanvasElement&&(T=u.getContext("2d",S));return T&&(this.renderCanvas(y,this,f.TargetCamera,null,T,!1),x&&x.refresh()),this},preDestroy:function(){this.commandBuffer=[]}});f.TargetCamera=new a,v.exports=f},32768:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(85592),c=t(20926),o=function(r,n,e,i,h,s){var l=n.commandBuffer,f=l.length,u=h||r.currentContext;if(!(f===0||!c(r,u,n,e,i))){e.addToRenderList(n);var d=1,p=1,g=0,y=0,x=1,T=0,S=0,M=0;u.beginPath();for(var w=0;w>>16,S=(g&65280)>>>8,M=g&255,u.strokeStyle="rgba("+T+","+S+","+M+","+d+")",u.lineWidth=x,w+=3;break;case a.FILL_STYLE:y=l[w+1],p=l[w+2],T=(y&16711680)>>>16,S=(y&65280)>>>8,M=y&255,u.fillStyle="rgba("+T+","+S+","+M+","+p+")",w+=2;break;case a.BEGIN_PATH:u.beginPath();break;case a.CLOSE_PATH:u.closePath();break;case a.FILL_PATH:s||u.fill();break;case a.STROKE_PATH:s||u.stroke();break;case a.FILL_RECT:s?u.rect(l[w+1],l[w+2],l[w+3],l[w+4]):u.fillRect(l[w+1],l[w+2],l[w+3],l[w+4]),w+=4;break;case a.FILL_TRIANGLE:u.beginPath(),u.moveTo(l[w+1],l[w+2]),u.lineTo(l[w+3],l[w+4]),u.lineTo(l[w+5],l[w+6]),u.closePath(),s||u.fill(),w+=6;break;case a.STROKE_TRIANGLE:u.beginPath(),u.moveTo(l[w+1],l[w+2]),u.lineTo(l[w+3],l[w+4]),u.lineTo(l[w+5],l[w+6]),u.closePath(),s||u.stroke(),w+=6;break;case a.LINE_TO:u.lineTo(l[w+1],l[w+2]),w+=2;break;case a.MOVE_TO:u.moveTo(l[w+1],l[w+2]),w+=2;break;case a.LINE_FX_TO:u.lineTo(l[w+1],l[w+2]),w+=5;break;case a.MOVE_FX_TO:u.moveTo(l[w+1],l[w+2]),w+=5;break;case a.SAVE:u.save();break;case a.RESTORE:u.restore();break;case a.TRANSLATE:u.translate(l[w+1],l[w+2]),w+=2;break;case a.SCALE:u.scale(l[w+1],l[w+2]),w+=2;break;case a.ROTATE:u.rotate(l[w+1]),w+=1;break;case a.GRADIENT_FILL_STYLE:w+=5;break;case a.GRADIENT_LINE_STYLE:w+=6;break}}u.restore()}};v.exports=o},87079:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(44603),c=t(43831);a.register("graphics",function(o,r){o===void 0&&(o={}),r!==void 0&&(o.add=r);var n=new c(this.scene,o);return o.add&&this.scene.sys.displayList.add(n),n})},1201:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(43831),c=t(39429);c.register("graphics",function(o){return this.displayList.add(new a(this.scene,o))})},84503:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),c=a,o=a;c=t(77545),o=t(32768),o=t(32768),v.exports={renderWebGL:c,renderCanvas:o}},77545:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(85592),c=t(91296),o=t(61340),r=t(70554),n=function(l,f,u){this.x=l,this.y=f,this.width=u},e=function(l,f,u){this.points=[],this.pointsLength=1,this.points[0]=new n(l,f,u)},i=[],h=new o,s=function(l,f,u,d){if(f.commandBuffer.length!==0){u.addToRenderList(f);var p=l.pipelines.set(f.pipeline,f);l.pipelines.preBatch(f);for(var g=c(f,u,d).calc,y=h.loadIdentity(),x=f.commandBuffer,T=u.alpha*f.alpha,S=1,M=p.fillTint,w=p.strokeTint,L=0,F=0,O=0,b=.01,N=Math.PI*2,V,K=[],$=0,j=!0,X=null,Y=r.getTintAppendFloatAlpha,D=0;D0&&(vt=-N+vt%N):vt>N?vt=N:vt<0&&(vt=N+vt%N),X===null&&(X=new e(ct+Math.cos(Ct)*St,Et+Math.sin(Ct)*St,S),K.push(X),at+=b);at<1+pt;)O=vt*at+Ct,L=ct+Math.cos(O)*St,F=Et+Math.sin(O)*St,X.points.push(new n(L,F,S)),at+=b;O=vt+Ct,L=ct+Math.cos(O)*St,F=Et+Math.sin(O)*St,X.points.push(new n(L,F,S));break}case a.FILL_RECT:{p.batchFillRect(x[++D],x[++D],x[++D],x[++D],y,g);break}case a.FILL_TRIANGLE:{p.batchFillTriangle(x[++D],x[++D],x[++D],x[++D],x[++D],x[++D],y,g);break}case a.STROKE_TRIANGLE:{p.batchStrokeTriangle(x[++D],x[++D],x[++D],x[++D],x[++D],x[++D],S,y,g);break}case a.LINE_TO:{X!==null?X.points.push(new n(x[++D],x[++D],S)):(X=new e(x[++D],x[++D],S),K.push(X));break}case a.MOVE_TO:{X=new e(x[++D],x[++D],S),K.push(X);break}case a.SAVE:{i.push(y.copyToArray());break}case a.RESTORE:{y.copyFromArray(i.pop());break}case a.TRANSLATE:{ct=x[++D],Et=x[++D],y.translate(ct,Et);break}case a.SCALE:{ct=x[++D],Et=x[++D],y.scale(ct,Et);break}case a.ROTATE:{y.rotate(x[++D]);break}}l.pipelines.postBatch(f)}};v.exports=s},26479:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(61061),c=t(83419),o=t(51708),r=t(50792),n=t(46710),e=t(95540),i=t(35154),h=t(97022),s=t(41212),l=t(88492),f=t(35072),u=t(68287),d=new c({Extends:r,initialize:function(g,y,x){r.call(this),x?y&&!Array.isArray(y)&&(y=[y]):Array.isArray(y)?s(y[0])&&(x=y,y=null):s(y)&&(x=y,y=null),this.scene=g,this.children=new f,this.isParent=!0,this.type="Group",this.classType=e(x,"classType",u),this.name=e(x,"name",""),this.active=e(x,"active",!0),this.maxSize=e(x,"maxSize",-1),this.defaultKey=e(x,"defaultKey",null),this.defaultFrame=e(x,"defaultFrame",null),this.runChildUpdate=e(x,"runChildUpdate",!1),this.createCallback=e(x,"createCallback",null),this.removeCallback=e(x,"removeCallback",null),this.createMultipleCallback=e(x,"createMultipleCallback",null),this.internalCreateCallback=e(x,"internalCreateCallback",null),this.internalRemoveCallback=e(x,"internalRemoveCallback",null),y&&this.addMultiple(y),x&&this.createMultiple(x),this.on(o.ADDED_TO_SCENE,this.addedToScene,this),this.on(o.REMOVED_FROM_SCENE,this.removedFromScene,this)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},create:function(p,g,y,x,T,S){if(p===void 0&&(p=0),g===void 0&&(g=0),y===void 0&&(y=this.defaultKey),x===void 0&&(x=this.defaultFrame),T===void 0&&(T=!0),S===void 0&&(S=!0),this.isFull())return null;var M=new this.classType(this.scene,p,g,y,x);return M.addToDisplayList(this.scene.sys.displayList),M.addToUpdateList(),M.visible=T,M.setActive(S),this.add(M),M},createMultiple:function(p){if(this.isFull())return[];Array.isArray(p)||(p=[p]);var g=[];if(p[0].key)for(var y=0;y=0;O--)if(F=N[O],F.active===y){if(b++,b===g)break}else F=null;return F?(typeof T=="number"&&(F.x=T),typeof S=="number"&&(F.y=S),F):x?this.create(T,S,M,w,L):null},get:function(p,g,y,x,T){return this.getFirst(!1,!0,p,g,y,x,T)},getFirstAlive:function(p,g,y,x,T,S){return this.getFirst(!0,p,g,y,x,T,S)},getFirstDead:function(p,g,y,x,T,S){return this.getFirst(!1,p,g,y,x,T,S)},playAnimation:function(p,g){return a.PlayAnimation(this.children.entries,p,g),this},isFull:function(){return this.maxSize===-1?!1:this.children.size>=this.maxSize},countActive:function(p){p===void 0&&(p=!0);for(var g=0,y=0;y{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(44603),c=t(26479);a.register("group",function(o){return new c(this.scene,null,o)})},3385:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(26479),c=t(39429);c.register("group",function(o,r){return this.updateList.add(new a(this.scene,o,r))})},88571:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(31401),o=t(95643),r=t(59819),n=new a({Extends:o,Mixins:[c.Alpha,c.BlendMode,c.Depth,c.Flip,c.GetBounds,c.Mask,c.Origin,c.Pipeline,c.PostPipeline,c.ScrollFactor,c.Size,c.TextureCrop,c.Tint,c.Transform,c.Visible,r],initialize:function(i,h,s,l,f){o.call(this,i,"Image"),this._crop=this.resetCropObject(),this.setTexture(l,f),this.setPosition(h,s),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline(),this.initPostPipeline(!0)}});v.exports=n},40652:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c,o){c.addToRenderList(a),t.batchSprite(a,a.frame,c,o)};v.exports=m},82459:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(25305),c=t(44603),o=t(23568),r=t(88571);c.register("image",function(n,e){n===void 0&&(n={});var i=o(n,"key",null),h=o(n,"frame",null),s=new r(this.scene,0,0,i,h);return e!==void 0&&(n.add=e),a(this.scene,s,n),s})},2117:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(88571),c=t(39429);c.register("image",function(o,r,n,e){return this.displayList.add(new a(this.scene,o,r,n,e))})},59819:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),c=a,o=a;c=t(99517),o=t(40652),v.exports={renderWebGL:c,renderCanvas:o}},99517:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c,o){c.addToRenderList(a),this.pipeline.batchSprite(a,c,o)};v.exports=m},77856:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a={Events:t(51708),DisplayList:t(8050),GameObjectCreator:t(44603),GameObjectFactory:t(39429),UpdateList:t(45027),Components:t(31401),GetCalcMatrix:t(91296),BuildGameObject:t(25305),BuildGameObjectAnimation:t(13059),GameObject:t(95643),BitmapText:t(22186),Blitter:t(6107),Bob:t(46590),Container:t(31559),DOMElement:t(3069),DynamicBitmapText:t(2638),Extern:t(42421),Graphics:t(43831),Group:t(26479),Image:t(88571),Layer:t(93595),Particles:t(18404),PathFollower:t(1159),RenderTexture:t(591),RetroFont:t(196),Rope:t(77757),Sprite:t(68287),Text:t(50171),GetTextSize:t(14220),MeasureText:t(79557),TextStyle:t(35762),TileSprite:t(20839),Zone:t(41481),Video:t(18471),Shape:t(17803),Arc:t(23629),Curve:t(89),Ellipse:t(19921),Grid:t(30479),IsoBox:t(61475),IsoTriangle:t(16933),Line:t(57847),Polygon:t(24949),Rectangle:t(74561),Star:t(55911),Triangle:t(36931),Factories:{Blitter:t(12709),Container:t(24961),DOMElement:t(2611),DynamicBitmapText:t(72566),Extern:t(56315),Graphics:t(1201),Group:t(3385),Image:t(2117),Layer:t(20005),Particles:t(676),PathFollower:t(90145),RenderTexture:t(60505),Rope:t(96819),Sprite:t(46409),StaticBitmapText:t(34914),Text:t(68005),TileSprite:t(91681),Zone:t(84175),Video:t(89025),Arc:t(42563),Curve:t(40511),Ellipse:t(1543),Grid:t(34137),IsoBox:t(3933),IsoTriangle:t(49803),Line:t(2481),Polygon:t(64827),Rectangle:t(87959),Star:t(93697),Triangle:t(45245)},Creators:{Blitter:t(9403),Container:t(77143),DynamicBitmapText:t(11164),Graphics:t(87079),Group:t(94975),Image:t(82459),Layer:t(25179),Particles:t(92730),RenderTexture:t(34495),Rope:t(26209),Sprite:t(15567),StaticBitmapText:t(57336),Text:t(71259),TileSprite:t(14167),Zone:t(95261),Video:t(11511)}};a.Shader=t(20071),a.Mesh=t(4703),a.NineSlice=t(28103),a.PointLight=t(80321),a.Plane=t(33663),a.Factories.Shader=t(74177),a.Factories.Mesh=t(9225),a.Factories.NineSlice=t(47521),a.Factories.PointLight=t(71255),a.Factories.Plane=t(30985),a.Creators.Shader=t(54935),a.Creators.Mesh=t(20527),a.Creators.NineSlice=t(28279),a.Creators.PointLight=t(39829),a.Creators.Plane=t(56015),a.Light=t(41432),a.LightsManager=t(61356),a.LightsPlugin=t(88992),v.exports=a},93595:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(10312),c=t(83419),o=t(31401),r=t(53774),n=t(45893),e=t(50792),i=t(51708),h=t(73162),s=t(33963),l=t(44594),f=t(19186),u=new c({Extends:h,Mixins:[o.AlphaSingle,o.BlendMode,o.Depth,o.Mask,o.PostPipeline,o.Visible,e,s],initialize:function(p,g){h.call(this,p),e.call(this),this.scene=p,this.displayList=null,this.type="Layer",this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.systems=p.sys,this.events=p.sys.events,this.sortChildrenFlag=!1,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.initPostPipeline(),this.clearAlpha(),this.setBlendMode(a.SKIP_CHECK),g&&this.add(g),p.sys.queueDepthSort()},setActive:function(d){return this.active=d,this},setName:function(d){return this.name=d,this},setState:function(d){return this.state=d,this},setDataEnabled:function(){return this.data||(this.data=new n(this)),this},setData:function(d,p){return this.data||(this.data=new n(this)),this.data.set(d,p),this},incData:function(d,p){return this.data||(this.data=new n(this)),this.data.inc(d,p),this},toggleData:function(d){return this.data||(this.data=new n(this)),this.data.toggle(d),this},getData:function(d){return this.data||(this.data=new n(this)),this.data.get(d)},setInteractive:function(){return this},disableInteractive:function(){return this},removeInteractive:function(){return this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return r(this)},willRender:function(d){return!(this.renderFlags!==15||this.list.length===0||this.cameraFilter!==0&&this.cameraFilter&d.id)},getIndexList:function(){for(var d=this,p=this.parentContainer,g=[];p&&(g.unshift(p.getIndex(d)),d=p,p.parentContainer);)p=p.parentContainer;return g.unshift(this.displayList.getIndex(d)),g},addChildCallback:function(d){var p=d.displayList;p&&p!==this&&d.removeFromDisplayList(),d.displayList||(this.queueDepthSort(),d.displayList=this,d.emit(i.ADDED_TO_SCENE,d,this.scene),this.events.emit(l.ADDED_TO_SCENE,d,this.scene))},removeChildCallback:function(d){this.queueDepthSort(),d.displayList=null,d.emit(i.REMOVED_FROM_SCENE,d,this.scene),this.events.emit(l.REMOVED_FROM_SCENE,d,this.scene)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(f(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(d,p){return d._depth-p._depth},getChildren:function(){return this.list},addToDisplayList:function(d){return d===void 0&&(d=this.scene.sys.displayList),this.displayList&&this.displayList!==d&&this.removeFromDisplayList(),d.exists(this)||(this.displayList=d,d.add(this,!0),d.queueDepthSort(),this.emit(i.ADDED_TO_SCENE,this,this.scene),d.events.emit(l.ADDED_TO_SCENE,this,this.scene)),this},removeFromDisplayList:function(){var d=this.displayList||this.scene.sys.displayList;return d.exists(this)&&(d.remove(this,!0),d.queueDepthSort(),this.displayList=null,this.emit(i.REMOVED_FROM_SCENE,this,this.scene),d.events.emit(l.REMOVED_FROM_SCENE,this,this.scene)),this},destroy:function(d){if(!(!this.scene||this.ignoreDestroy)){this.emit(i.DESTROY,this);for(var p=this.list;p.length;)p[0].destroy(d);this.removeAllListeners(),this.resetPostPipeline(!0),this.displayList&&(this.displayList.remove(this,!0,!1),this.displayList.queueDepthSort()),this.data&&(this.data.destroy(),this.data=void 0),this.active=!1,this.visible=!1,this.list=void 0,this.scene=void 0,this.displayList=void 0,this.systems=void 0,this.events=void 0}}});v.exports=u},2956:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){var o=a.list;if(o.length!==0){a.depthSort();var r=a.blendMode!==-1;r||t.setBlendMode(0);var n=a._alpha;a.mask&&a.mask.preRenderCanvas(t,null,c);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),c=t(93595),o=t(44603),r=t(23568);o.register("layer",function(n,e){n===void 0&&(n={});var i=r(n,"children",null),h=new c(this.scene,i);return e!==void 0&&(n.add=e),a(this.scene,h,n),h})},20005:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(93595),c=t(39429);c.register("layer",function(o){return this.displayList.add(new a(this.scene,o))})},33963:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),c=a,o=a;c=t(15869),o=t(2956),v.exports={renderWebGL:c,renderCanvas:o}},15869:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){var o=a.list,r=o.length;if(r!==0){a.depthSort(),t.pipelines.preBatch(a);var n=a.blendMode!==-1;n||t.setBlendMode(0);for(var e=a.alpha,i=0;i{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(96503),c=t(83419),o=t(31401),r=t(51767),n=t(70554),e=new c({Extends:a,Mixins:[o.Origin,o.ScrollFactor,o.Visible],initialize:function(h,s,l,f,u,d,p){a.call(this,h,s,l),this.color=new r(f,u,d),this.intensity=p,this.renderFlags=15,this.cameraFilter=0,this.setScrollFactor(1,1),this.setOrigin(),this.setDisplayOrigin(l)},displayWidth:{get:function(){return this.diameter},set:function(i){this.diameter=i}},displayHeight:{get:function(){return this.diameter},set:function(i){this.diameter=i}},width:{get:function(){return this.diameter},set:function(i){this.diameter=i}},height:{get:function(){return this.diameter},set:function(i){this.diameter=i}},willRender:function(i){return!(e.RENDER_MASK!==this.renderFlags||this.cameraFilter!==0&&this.cameraFilter&i.id)},setColor:function(i){var h=n.getFloatsFromUintRGB(i);return this.color.set(h[0],h[1],h[2]),this},setIntensity:function(i){return this.intensity=i,this},setRadius:function(i){return this.radius=i,this}});e.RENDER_MASK=15,v.exports=e},61356:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(81491),c=t(83419),o=t(20339),r=t(41432),n=t(80321),e=t(51767),i=t(19133),h=t(19186),s=t(70554),l=new c({initialize:function(){this.lights=[],this.ambientColor=new e(.1,.1,.1),this.active=!1,this.maxLights=-1,this.visibleLights=0},addPointLight:function(f,u,d,p,g,y){return this.systems.displayList.add(new n(this.scene,f,u,d,p,g,y))},enable:function(){return this.maxLights===-1&&(this.maxLights=this.systems.renderer.config.maxLights),this.active=!0,this},disable:function(){return this.active=!1,this},getLights:function(f){for(var u=this.lights,d=f.worldView,p=[],g=0;gthis.maxLights&&(h(p,this.sortByDistance),p=p.slice(0,this.maxLights)),this.visibleLights=p.length,p},sortByDistance:function(f,u){return f.distance>=u.distance},setAmbientColor:function(f){var u=s.getFloatsFromUintRGB(f);return this.ambientColor.set(u[0],u[1],u[2]),this},getMaxVisibleLights:function(){return this.maxLights},getLightCount:function(){return this.lights.length},addLight:function(f,u,d,p,g){f===void 0&&(f=0),u===void 0&&(u=0),d===void 0&&(d=128),p===void 0&&(p=16777215),g===void 0&&(g=1);var y=s.getFloatsFromUintRGB(p),x=new r(f,u,d,y[0],y[1],y[2],g);return this.lights.push(x),x},removeLight:function(f){var u=this.lights.indexOf(f);return u>=0&&i(this.lights,u),this},shutdown:function(){this.lights.length=0},destroy:function(){this.shutdown()}});v.exports=l},88992:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(61356),o=t(37277),r=t(44594),n=new a({Extends:c,initialize:function(i){this.scene=i,this.systems=i.sys,i.sys.settings.isBooted||i.sys.events.once(r.BOOT,this.boot,this),c.call(this)},boot:function(){var e=this.systems.events;e.on(r.SHUTDOWN,this.shutdown,this),e.on(r.DESTROY,this.destroy,this)},destroy:function(){this.shutdown(),this.scene=void 0,this.systems=void 0}});o.register("LightsPlugin",n,"lights"),v.exports=n},4703:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(31401),o=t(39506),r=t(83997),n=t(95643),e=t(34684),i=t(92515),h=t(91296),s=t(37867),l=t(29807),f=t(43396),u=t(19186),d=t(25836),p=t(39318),g=new a({Extends:n,Mixins:[c.AlphaSingle,c.BlendMode,c.Depth,c.Mask,c.Pipeline,c.PostPipeline,c.ScrollFactor,c.Size,c.Texture,c.Transform,c.Visible,l],initialize:function(x,T,S,M,w,L,F,O,b,N,V,K){T===void 0&&(T=0),S===void 0&&(S=0),M===void 0&&(M="__WHITE"),n.call(this,x,"Mesh"),this.faces=[],this.vertices=[],this.tintFill=!1,this.debugCallback=null,this.debugGraphic=null,this.hideCCW=!0,this.modelPosition=new d,this.modelScale=new d(1,1,1),this.modelRotation=new d,this.dirtyCache=[0,0,0,0,0,0,0,0,0,0,0,0],this.transformMatrix=new s,this.viewPosition=new d,this.viewMatrix=new s,this.projectionMatrix=new s,this.totalRendered=0,this.totalFrame=0,this.ignoreDirtyCache=!1,this.fov,this.displayOriginX=0,this.displayOriginY=0;var $=x.sys.renderer;this.setPosition(T,S),this.setTexture(M,w),this.setSize($.width,$.height),this.initPipeline(),this.initPostPipeline(),this.setPerspective($.width,$.height),L&&this.addVertices(L,F,O,b,N,V,K)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},panX:function(y){return this.viewPosition.addScale(d.LEFT,y),this.dirtyCache[10]=1,this},panY:function(y){return this.viewPosition.y+=d.DOWN.y*y,this.dirtyCache[10]=1,this},panZ:function(y){return this.viewPosition.z+=y,this.dirtyCache[10]=1,this},setPerspective:function(y,x,T,S,M){return T===void 0&&(T=45),S===void 0&&(S=.01),M===void 0&&(M=1e3),this.fov=T,this.projectionMatrix.perspective(o(T),y/x,S,M),this.dirtyCache[10]=1,this.dirtyCache[11]=0,this},setOrtho:function(y,x,T,S){return y===void 0&&(y=this.scene.sys.renderer.getAspectRatio()),x===void 0&&(x=1),T===void 0&&(T=-1e3),S===void 0&&(S=1e3),this.fov=0,this.projectionMatrix.ortho(-y,y,-x,x,T,S),this.dirtyCache[10]=1,this.dirtyCache[11]=1,this},clear:function(){return this.faces.forEach(function(y){y.destroy()}),this.faces=[],this.vertices=[],this},addVerticesFromObj:function(y,x,T,S,M,w,L,F,O){var b=this.scene.sys.cache.obj.get(y),N;return b&&(N=e(b,this,x,T,S,M,w,L,F,O)),(!N||N.verts.length===0)&&console.warn("Mesh.addVerticesFromObj data empty:",y),this},sortByDepth:function(y,x){return y.depth-x.depth},depthSort:function(){return u(this.faces,this.sortByDepth),this},addVertex:function(y,x,T,S,M,w,L){var F=new p(y,x,T,S,M,w,L);return this.vertices.push(F),F},addFace:function(y,x,T){var S=new r(y,x,T);return this.faces.push(S),this.dirtyCache[9]=-1,S},addVertices:function(y,x,T,S,M,w,L){var F=i(y,x,T,S,M,w,L);return F?(this.faces=this.faces.concat(F.faces),this.vertices=this.vertices.concat(F.vertices)):console.warn("Mesh.addVertices data empty or invalid"),this.dirtyCache[9]=-1,this},getFaceCount:function(){return this.faces.length},getVertexCount:function(){return this.vertices.length},getFace:function(y){return this.faces[y]},hasFaceAt:function(y,x,T){T===void 0&&(T=this.scene.sys.cameras.main);for(var S=h(this,T).calc,M=this.faces,w=0;w{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(){};v.exports=m},20527:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(25305),c=t(44603),o=t(23568),r=t(35154),n=t(4703);c.register("mesh",function(e,i){e===void 0&&(e={});var h=o(e,"key",null),s=o(e,"frame",null),l=r(e,"vertices",[]),f=r(e,"uvs",[]),u=r(e,"indicies",[]),d=r(e,"containsZ",!1),p=r(e,"normals",[]),g=r(e,"colors",16777215),y=r(e,"alphas",1),x=new n(this.scene,0,0,h,s,l,f,u,d,p,g,y);return i!==void 0&&(e.add=i),a(this.scene,x,e),x})},9225:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(4703),c=t(39429);c.register("mesh",function(o,r,n,e,i,h,s,l,f,u,d){return this.displayList.add(new a(this.scene,o,r,n,e,i,h,s,l,f,u,d))})},29807:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),c=a,o=a;c=t(48833),o=t(36488),v.exports={renderWebGL:c,renderCanvas:o}},48833:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(91296),c=function(o,r,n,e){var i=r.faces,h=i.length;if(h!==0){n.addToRenderList(r);var s=o.pipelines.set(r.pipeline,r),l=a(r,n,e).calc;o.pipelines.preBatch(r);for(var f=s.setGameObject(r),u=s.vertexViewF32,d=s.vertexViewU32,p=s.vertexCount*s.currentShader.vertexComponentCount-1,g=r.tintFill,y=[],x=r.debugCallback,T=l.a,S=l.b,M=l.c,w=l.d,L=l.e,F=l.f,O=r.viewPosition.z,b=r.hideCCW,N=n.roundPixels,V=n.alpha*r.alpha,K=0,$=0;${/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(31401),o=t(95643),r=t(78023),n=t(39318),e=new a({Extends:o,Mixins:[c.AlphaSingle,c.BlendMode,c.Depth,c.GetBounds,c.Mask,c.Origin,c.Pipeline,c.PostPipeline,c.ScrollFactor,c.Texture,c.Transform,c.Visible,r],initialize:function(h,s,l,f,u,d,p,g,y,x,T){o.call(this,h,"NineSlice"),this._width,this._height,this._originX=.5,this._originY=.5,this._sizeComponent=!0,this.vertices=[],this.leftWidth,this.rightWidth,this.topHeight,this.bottomHeight,this.tint=16777215,this.tintFill=!1;var S=h.textures.getFrame(f,u);this.is3Slice=!x&&!T,S.scale9&&(this.is3Slice=S.is3Slice);for(var M=this.is3Slice?18:54,w=0;w{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(25305),c=t(44603),o=t(23568),r=t(35154),n=t(28103);c.register("nineslice",function(e,i){e===void 0&&(e={});var h=o(e,"key",null),s=o(e,"frame",null),l=r(e,"width",256),f=r(e,"height",256),u=r(e,"leftWidth",10),d=r(e,"rightWidth",10),p=r(e,"topHeight",0),g=r(e,"bottomHeight",0),y=new n(this.scene,0,0,h,s,l,f,u,d,p,g);return i!==void 0&&(e.add=i),a(this.scene,y,e),y})},47521:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(28103),c=t(39429);c.register("nineslice",function(o,r,n,e,i,h,s,l,f,u){return this.displayList.add(new a(this.scene,o,r,n,e,i,h,s,l,f,u))})},78023:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),c=a,o=a;c=t(52230),v.exports={renderWebGL:c,renderCanvas:o}},52230:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(91296),c=t(70554),o=function(r,n,e,i){var h=n.vertices,s=h.length;if(s!==0){e.addToRenderList(n);var l=r.pipelines.set(n.pipeline,n),f=a(n,e,i,!1).calc;r.pipelines.preBatch(n);var u=l.setGameObject(n),d=l.vertexViewF32,p=l.vertexViewU32,g=l.vertexCount*l.currentShader.vertexComponentCount-1,y=e.roundPixels,x=n.tintFill,T=e.alpha*n.alpha,S=c.getTintAppendFloatAlpha(n.tint,T),M=l.vertexAvailable(),w=-1;M{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(44777),o=t(37589),r=t(6113),n=t(91389),e=t(90664),i=new a({Extends:c,initialize:function(s){c.call(this,s,null,!1),this.active=!1,this.easeName="Linear",this.r=[],this.g=[],this.b=[]},getMethod:function(){return this.propertyValue===null?0:9},setMethods:function(){var h=this.propertyValue,s=h,l=this.defaultEmit,f=this.defaultUpdate;if(this.method===9){this.start=h[0],this.ease=r("Linear"),this.interpolation=n("linear"),l=this.easedValueEmit,f=this.easeValueUpdate,s=h[0],this.active=!0;for(var u=0;u{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(30976),c=t(45319),o=t(83419),r=t(99472),n=t(6113),e=t(95540),i=t(91389),h=t(77720),s=t(15994),l=new o({initialize:function(u,d,p){p===void 0&&(p=!1),this.propertyKey=u,this.propertyValue=d,this.defaultValue=d,this.steps=0,this.counter=0,this.yoyo=!1,this.direction=0,this.start=0,this.current=0,this.end=0,this.ease=null,this.interpolation=null,this.emitOnly=p,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.active=!0,this.method=0,this._onEmit,this._onUpdate},loadConfig:function(f,u){f===void 0&&(f={}),u&&(this.propertyKey=u),this.propertyValue=e(f,this.propertyKey,this.defaultValue),this.method=this.getMethod(),this.setMethods(),this.emitOnly&&(this.onUpdate=this.defaultUpdate)},toJSON:function(){return JSON.stringify(this.propertyValue)},onChange:function(f){var u;switch(this.method){case 1:case 3:case 8:u=f;break;case 2:this.propertyValue.indexOf(f)>=0&&(u=f);break;case 4:var d=(this.end-this.start)/this.steps;u=h(f,d),this.counter=u;break;case 5:case 6:case 7:u=c(f,this.start,this.end);break;case 9:u=this.start[0];break}return this.current=u,this},getMethod:function(){var f=this.propertyValue;if(f===null)return 0;var u=typeof f;if(u==="number")return 1;if(Array.isArray(f))return 2;if(u==="function")return 3;if(u==="object"){if(this.hasBoth(f,"start","end"))return this.has(f,"steps")?4:5;if(this.hasBoth(f,"min","max"))return 6;if(this.has(f,"random"))return 7;if(this.hasEither(f,"onEmit","onUpdate"))return 8;if(this.hasEither(f,"values","interpolation"))return 9}return 0},setMethods:function(){var f=this.propertyValue,u=f,d=this.defaultEmit,p=this.defaultUpdate;switch(this.method){case 1:d=this.staticValueEmit;break;case 2:d=this.randomStaticValueEmit,u=f[0];break;case 3:this._onEmit=f,d=this.proxyEmit;break;case 4:this.start=f.start,this.end=f.end,this.steps=f.steps,this.counter=this.start,this.yoyo=this.has(f,"yoyo")?f.yoyo:!1,this.direction=0,d=this.steppedEmit,u=this.start;break;case 5:this.start=f.start,this.end=f.end;var g=this.has(f,"ease")?f.ease:"Linear";this.ease=n(g,f.easeParams),d=this.has(f,"random")&&f.random?this.randomRangedValueEmit:this.easedValueEmit,p=this.easeValueUpdate,u=this.start;break;case 6:this.start=f.min,this.end=f.max,d=this.has(f,"int")&&f.int?this.randomRangedIntEmit:this.randomRangedValueEmit,u=this.start;break;case 7:var y=f.random;Array.isArray(y)&&(this.start=y[0],this.end=y[1]),d=this.randomRangedIntEmit,u=this.start;break;case 8:this._onEmit=this.has(f,"onEmit")?f.onEmit:this.defaultEmit,this._onUpdate=this.has(f,"onUpdate")?f.onUpdate:this.defaultUpdate,d=this.proxyEmit,p=this.proxyUpdate;break;case 9:this.start=f.values;var x=this.has(f,"ease")?f.ease:"Linear";this.ease=n(x,f.easeParams),this.interpolation=i(f.interpolation),d=this.easedValueEmit,p=this.easeValueUpdate,u=this.start[0];break}return this.onEmit=d,this.onUpdate=p,this.current=u,this},has:function(f,u){return f.hasOwnProperty(u)},hasBoth:function(f,u,d){return f.hasOwnProperty(u)&&f.hasOwnProperty(d)},hasEither:function(f,u,d){return f.hasOwnProperty(u)||f.hasOwnProperty(d)},defaultEmit:function(f,u,d){return d},defaultUpdate:function(f,u,d,p){return p},proxyEmit:function(f,u,d){var p=this._onEmit(f,u,d);return this.current=p,p},proxyUpdate:function(f,u,d,p){var g=this._onUpdate(f,u,d,p);return this.current=g,g},staticValueEmit:function(){return this.current},staticValueUpdate:function(){return this.current},randomStaticValueEmit:function(){var f=Math.floor(Math.random()*this.propertyValue.length);return this.current=this.propertyValue[f],this.current},randomRangedValueEmit:function(f,u){var d=r(this.start,this.end);return f&&f.data[u]&&(f.data[u].min=d,f.data[u].max=this.end),this.current=d,d},randomRangedIntEmit:function(f,u){var d=a(this.start,this.end);return f&&f.data[u]&&(f.data[u].min=d,f.data[u].max=this.end),this.current=d,d},steppedEmit:function(){var f=this.counter,u=f,d=(this.end-this.start)/this.steps;if(this.yoyo){var p;this.direction===0?(u+=d,u>=this.end&&(p=u-this.end,u=this.end-p,this.direction=1)):(u-=d,u<=this.start&&(p=this.start-u,u=this.start+p,this.direction=0)),this.counter=u}else this.counter=s(u+d,this.start,this.end);return this.current=f,f},easedValueEmit:function(f,u){if(f&&f.data[u]){var d=f.data[u];d.min=this.start,d.max=this.end}return this.current=this.start,this.start},easeValueUpdate:function(f,u,d){var p=f.data[u],g,y=this.ease(d);return this.interpolation?g=this.interpolation(this.start,y):g=(p.max-p.min)*y+p.min,this.current=g,g},destroy:function(){this.propertyValue=null,this.defaultValue=null,this.ease=null,this.interpolation=null,this._onEmit=null,this._onUpdate=null}});v.exports=l},24502:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(95540),o=t(20286),r=new a({Extends:o,initialize:function(e,i,h,s,l){if(typeof e=="object"){var f=e;e=c(f,"x",0),i=c(f,"y",0),h=c(f,"power",0),s=c(f,"epsilon",100),l=c(f,"gravity",50)}else e===void 0&&(e=0),i===void 0&&(i=0),h===void 0&&(h=0),s===void 0&&(s=100),l===void 0&&(l=50);o.call(this,e,i,!0),this._gravity=l,this._power=h*l,this._epsilon=s*s},update:function(n,e){var i=this.x-n.x,h=this.y-n.y,s=i*i+h*h;if(s!==0){var l=Math.sqrt(s);s{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(9674),c=t(45319),o=t(83419),r=t(39506),n=t(87841),e=t(11520),i=t(26099),h=new o({initialize:function(l){this.emitter=l,this.texture=null,this.frame=null,this.x=0,this.y=0,this.worldPosition=new i,this.velocityX=0,this.velocityY=0,this.accelerationX=0,this.accelerationY=0,this.maxVelocityX=1e4,this.maxVelocityY=1e4,this.bounce=0,this.scaleX=1,this.scaleY=1,this.alpha=1,this.angle=0,this.rotation=0,this.tint=16777215,this.life=1e3,this.lifeCurrent=1e3,this.delayCurrent=0,this.holdCurrent=0,this.lifeT=0,this.data={tint:{min:16777215,max:16777215},alpha:{min:1,max:1},rotate:{min:0,max:0},scaleX:{min:1,max:1},scaleY:{min:1,max:1},x:{min:0,max:0},y:{min:0,max:0},accelerationX:{min:0,max:0},accelerationY:{min:0,max:0},maxVelocityX:{min:0,max:0},maxVelocityY:{min:0,max:0},moveToX:{min:0,max:0},moveToY:{min:0,max:0},bounce:{min:0,max:0}},this.isCropped=!1,this.scene=l.scene,this.anims=new a(this),this.bounds=new n},emit:function(s,l,f,u,d,p){return this.emitter.emit(s,l,f,u,d,p)},isAlive:function(){return this.lifeCurrent>0},kill:function(){this.lifeCurrent=0},setPosition:function(s,l){s===void 0&&(s=0),l===void 0&&(l=0),this.x=s,this.y=l},fire:function(s,l){var f=this.emitter,u=f.ops,d=f.getAnim();if(d?this.anims.play(d):(this.frame=f.getFrame(),this.texture=this.frame.texture),!this.frame)throw new Error("Particle has no texture frame");if(f.getEmitZone(this),s===void 0?this.x+=u.x.onEmit(this,"x"):u.x.steps>0?this.x+=s+u.x.onEmit(this,"x"):this.x+=s,l===void 0?this.y+=u.y.onEmit(this,"y"):u.y.steps>0?this.y+=l+u.y.onEmit(this,"y"):this.y+=l,this.life=u.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0,this.delayCurrent=u.delay.onEmit(this,"delay"),this.holdCurrent=u.hold.onEmit(this,"hold"),this.scaleX=u.scaleX.onEmit(this,"scaleX"),this.scaleY=u.scaleY.active?u.scaleY.onEmit(this,"scaleY"):this.scaleX,this.angle=u.rotate.onEmit(this,"rotate"),this.rotation=r(this.angle),f.worldMatrix.transformPoint(this.x,this.y,this.worldPosition),this.delayCurrent===0&&f.getDeathZone(this))return this.lifeCurrent=0,!1;var p=u.speedX.onEmit(this,"speedX"),g=u.speedY.active?u.speedY.onEmit(this,"speedY"):p;if(f.radial){var y=r(u.angle.onEmit(this,"angle"));this.velocityX=Math.cos(y)*Math.abs(p),this.velocityY=Math.sin(y)*Math.abs(g)}else if(f.moveTo){var x=u.moveToX.onEmit(this,"moveToX"),T=u.moveToY.onEmit(this,"moveToY"),S=this.life/1e3;this.velocityX=(x-this.x)/S,this.velocityY=(T-this.y)/S}else this.velocityX=p,this.velocityY=g;return f.acceleration&&(this.accelerationX=u.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=u.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=u.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=u.maxVelocityY.onEmit(this,"maxVelocityY"),this.bounce=u.bounce.onEmit(this,"bounce"),this.alpha=u.alpha.onEmit(this,"alpha"),u.color.active?this.tint=u.color.onEmit(this,"tint"):this.tint=u.tint.onEmit(this,"tint"),!0},update:function(s,l,f){if(this.lifeCurrent<=0)return this.holdCurrent>0?(this.holdCurrent-=s,this.holdCurrent<=0):!0;if(this.delayCurrent>0)return this.delayCurrent-=s,!1;this.anims.update(0,s);var u=this.emitter,d=u.ops,p=1-this.lifeCurrent/this.life;if(this.lifeT=p,this.x=d.x.onUpdate(this,"x",p,this.x),this.y=d.y.onUpdate(this,"y",p,this.y),u.moveTo){var g=d.moveToX.onUpdate(this,"moveToX",p,u.moveToX),y=d.moveToY.onUpdate(this,"moveToY",p,u.moveToY),x=this.lifeCurrent/1e3;this.velocityX=(g-this.x)/x,this.velocityY=(y-this.y)/x}return this.computeVelocity(u,s,l,f,p),this.scaleX=d.scaleX.onUpdate(this,"scaleX",p,this.scaleX),d.scaleY.active?this.scaleY=d.scaleY.onUpdate(this,"scaleY",p,this.scaleY):this.scaleY=this.scaleX,this.angle=d.rotate.onUpdate(this,"rotate",p,this.angle),this.rotation=r(this.angle),u.getDeathZone(this)?(this.lifeCurrent=0,!0):(this.alpha=c(d.alpha.onUpdate(this,"alpha",p,this.alpha),0,1),d.color.active?this.tint=d.color.onUpdate(this,"color",p,this.tint):this.tint=d.tint.onUpdate(this,"tint",p,this.tint),this.lifeCurrent-=s,this.lifeCurrent<=0&&this.holdCurrent<=0)},computeVelocity:function(s,l,f,u,d){var p=s.ops,g=this.velocityX,y=this.velocityY,x=p.accelerationX.onUpdate(this,"accelerationX",d,this.accelerationX),T=p.accelerationY.onUpdate(this,"accelerationY",d,this.accelerationY),S=p.maxVelocityX.onUpdate(this,"maxVelocityX",d,this.maxVelocityX),M=p.maxVelocityY.onUpdate(this,"maxVelocityY",d,this.maxVelocityY);this.bounce=p.bounce.onUpdate(this,"bounce",d,this.bounce),g+=s.gravityX*f+x*f,y+=s.gravityY*f+T*f,g=c(g,-S,S),y=c(y,-M,M),this.velocityX=g,this.velocityY=y,this.x+=g*f,this.y+=y*f,s.worldMatrix.transformPoint(this.x,this.y,this.worldPosition);for(var w=0;w{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(20286),o=t(87841),r=new a({Extends:c,initialize:function(e,i,h,s,l,f,u,d){l===void 0&&(l=!0),f===void 0&&(f=!0),u===void 0&&(u=!0),d===void 0&&(d=!0),c.call(this,e,i,!0),this.bounds=new o(e,i,h,s),this.collideLeft=l,this.collideRight=f,this.collideTop=u,this.collideBottom=d},update:function(n){var e=this.bounds,i=-n.bounce,h=n.worldPosition;h.xe.right&&this.collideRight&&(n.x-=h.x-e.right,n.velocityX*=i),h.ye.bottom&&this.collideBottom&&(n.y-=h.y-e.bottom,n.velocityY*=i)}});v.exports=r},31600:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(31401),o=t(53774),r=t(43459),n=t(26388),e=t(19909),i=t(76472),h=t(44777),s=t(20696),l=t(95643),f=t(95540),u=t(26546),d=t(24502),p=t(1985),g=t(97022),y=t(86091),x=t(73162),T=t(20074),S=t(56480),M=t(68875),w=t(87841),L=t(59996),F=t(72905),O=t(90668),b=t(19186),N=t(61340),V=t(26099),K=t(15994),$=t(69601),j=["active","advance","blendMode","colorEase","deathCallback","deathCallbackScope","duration","emitCallback","emitCallbackScope","follow","frequency","gravityX","gravityY","maxAliveParticles","maxParticles","name","emitting","particleBringToTop","particleClass","radial","sortCallback","sortOrderAsc","sortProperty","stopAfter","tintFill","timeScale","trackVisible","visible"],X=["accelerationX","accelerationY","alpha","angle","bounce","color","delay","hold","lifespan","maxVelocityX","maxVelocityY","moveToX","moveToY","quantity","rotate","scaleX","scaleY","speedX","speedY","tint","x","y"],Y=new a({Extends:l,Mixins:[c.AlphaSingle,c.BlendMode,c.Depth,c.Mask,c.Pipeline,c.PostPipeline,c.ScrollFactor,c.Texture,c.Transform,c.Visible,O],initialize:function(z,W,H,J,Q){l.call(this,z,"ParticleEmitter"),this.particleClass=S,this.ops={accelerationX:new h("accelerationX",0),accelerationY:new h("accelerationY",0),alpha:new h("alpha",1),angle:new h("angle",{min:0,max:360},!0),bounce:new h("bounce",0),color:new i("color"),delay:new h("delay",0,!0),hold:new h("hold",0,!0),lifespan:new h("lifespan",1e3,!0),maxVelocityX:new h("maxVelocityX",1e4),maxVelocityY:new h("maxVelocityY",1e4),moveToX:new h("moveToX",0),moveToY:new h("moveToY",0),quantity:new h("quantity",1,!0),rotate:new h("rotate",0),scaleX:new h("scaleX",1),scaleY:new h("scaleY",1),speedX:new h("speedX",0,!0),speedY:new h("speedY",0,!0),tint:new h("tint",16777215),x:new h("x",0),y:new h("y",0)},this.radial=!0,this.gravityX=0,this.gravityY=0,this.acceleration=!1,this.moveTo=!1,this.emitCallback=null,this.emitCallbackScope=null,this.deathCallback=null,this.deathCallbackScope=null,this.maxParticles=0,this.maxAliveParticles=0,this.stopAfter=0,this.duration=0,this.frequency=0,this.emitting=!0,this.particleBringToTop=!0,this.timeScale=1,this.emitZones=[],this.deathZones=[],this.viewBounds=null,this.follow=null,this.followOffset=new V,this.trackVisible=!1,this.frames=[],this.randomFrame=!0,this.frameQuantity=1,this.anims=[],this.randomAnim=!0,this.animQuantity=1,this.dead=[],this.alive=[],this.counters=new Float32Array(10),this.skipping=!1,this.worldMatrix=new N,this.sortProperty="",this.sortOrderAsc=!0,this.sortCallback=this.depthSortCallback,this.processors=new x(this),this.tintFill=!1,this.initPipeline(),this.initPostPipeline(),this.setPosition(W,H),this.setTexture(J),Q&&this.setConfig(Q)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},setConfig:function(D){if(!D)return this;var z=0,W="",H=this.ops;for(z=0;z=this.animQuantity&&(this.animCounter=0,this.currentAnim=K(this.currentAnim+1,0,z)),W},setAnim:function(D,z,W){z===void 0&&(z=!0),W===void 0&&(W=1),this.randomAnim=z,this.animQuantity=W,this.currentAnim=0;var H=typeof D;if(this.anims.length=0,Array.isArray(D))this.anims=this.anims.concat(D);else if(H==="string")this.anims.push(D);else if(H==="object"){var J=D;D=f(J,"anims",null),D&&(this.anims=this.anims.concat(D));var Q=f(J,"cycle",!1);this.randomAnim=!Q,this.animQuantity=f(J,"quantity",W)}return this.anims.length===1&&(this.animQuantity=1,this.randomAnim=!1),this},setRadial:function(D){return D===void 0&&(D=!0),this.radial=D,this},addParticleBounds:function(D,z,W,H,J,Q,k,et){if(typeof D=="object"){var st=D;D=st.x,z=st.y,W=g(st,"w")?st.w:st.width,H=g(st,"h")?st.h:st.height}return this.addParticleProcessor(new $(D,z,W,H,J,Q,k,et))},setParticleSpeed:function(D,z){return z===void 0&&(z=D),this.ops.speedX.onChange(D),D===z?this.ops.speedY.active=!1:this.ops.speedY.onChange(z),this.radial=!0,this},setParticleScale:function(D,z){return D===void 0&&(D=1),z===void 0&&(z=D),this.ops.scaleX.onChange(D),this.ops.scaleY.onChange(z),this},setParticleGravity:function(D,z){return this.gravityX=D,this.gravityY=z,this},setParticleAlpha:function(D){return this.ops.alpha.onChange(D),this},setParticleTint:function(D){return this.ops.tint.onChange(D),this},setEmitterAngle:function(D){return this.ops.angle.onChange(D),this},setParticleLifespan:function(D){return this.ops.lifespan.onChange(D),this},setQuantity:function(D){return this.quantity=D,this},setFrequency:function(D,z){return this.frequency=D,this.flowCounter=D>0?D:0,z&&(this.quantity=z),this},addDeathZone:function(D){Array.isArray(D)||(D=[D]);for(var z,W=[],H=0;H-1&&(this.zoneTotal++,this.zoneTotal===H.total&&(this.zoneTotal=0,this.zoneIndex++,this.zoneIndex===W&&(this.zoneIndex=0)))}},getDeathZone:function(D){for(var z=this.deathZones,W=0;W=0&&(this.zoneIndex=z),this},addParticleProcessor:function(D){return this.processors.exists(D)||(D.emitter&&D.emitter.removeParticleProcessor(D),this.processors.add(D),D.emitter=this),D},removeParticleProcessor:function(D){return this.processors.exists(D)&&(this.processors.remove(D,!0),D.emitter=null),D},getProcessors:function(){return this.processors.getAll("active",!0)},createGravityWell:function(D){return this.addParticleProcessor(new d(D))},reserve:function(D){var z=this.dead;if(this.maxParticles>0){var W=this.getParticleCount();W+D>this.maxParticles&&(D=this.maxParticles-(W+D))}for(var H=0;H0&&this.getParticleCount()>=this.maxParticles?!0:this.maxAliveParticles>0&&this.getAliveParticleCount()>=this.maxAliveParticles},onParticleEmit:function(D,z){return D===void 0?(this.emitCallback=null,this.emitCallbackScope=null):typeof D=="function"&&(this.emitCallback=D,z&&(this.emitCallbackScope=z)),this},onParticleDeath:function(D,z){return D===void 0?(this.deathCallback=null,this.deathCallbackScope=null):typeof D=="function"&&(this.deathCallback=D,z&&(this.deathCallbackScope=z)),this},killAll:function(){for(var D=this.dead,z=this.alive;z.length>0;)D.push(z.pop());return this},forEachAlive:function(D,z){for(var W=this.alive,H=W.length,J=0;J0&&this.fastForward(D),this.emitting=!0,this.resetCounters(this.frequency,!0),z!==void 0&&(this.duration=Math.abs(z)),this.emit(s.START,this)),this},stop:function(D){return D===void 0&&(D=!1),this.emitting&&(this.emitting=!1,D&&this.killAll(),this.emit(s.STOP,this)),this},pause:function(){return this.active=!1,this},resume:function(){return this.active=!0,this},setSortProperty:function(D,z){return D===void 0&&(D=""),z===void 0&&(z=this.true),this.sortProperty=D,this.sortOrderAsc=z,this.sortCallback=this.depthSortCallback,this},setSortCallback:function(D){return this.sortProperty!==""?D=this.depthSortCallback:D=null,this.sortCallback=D,this},depthSort:function(){return b(this.alive,this.sortCallback.bind(this)),this},depthSortCallback:function(D,z){var W=this.sortProperty;return this.sortOrderAsc?D[W]-z[W]:z[W]-D[W]},flow:function(D,z,W){return z===void 0&&(z=1),this.emitting=!1,this.frequency=D,this.quantity=z,W!==void 0&&(this.stopAfter=W),this.start()},explode:function(D,z,W){this.frequency=-1,this.resetCounters(-1,!0);var H=this.emitParticle(D,z,W);return this.emit(s.EXPLODE,this,H),H},emitParticleAt:function(D,z,W){return this.emitParticle(W,D,z)},emitParticle:function(D,z,W){if(!this.atLimit()){D===void 0&&(D=this.ops.quantity.onEmit());for(var H=this.dead,J=this.stopAfter,Q=this.follow?this.follow.x+this.followOffset.x:z,k=this.follow?this.follow.y+this.followOffset.y:W,et=0;et0&&(this.stopCounter++,this.stopCounter>=J)||this.atLimit())break}return st}},fastForward:function(D,z){z===void 0&&(z=1e3/60);var W=0;for(this.skipping=!0;W0){var ot=this.deathCallback,ft=this.deathCallbackScope;for(k=st-1;k>=0;k--){var at=et[k];J.splice(at.index,1),Q.push(at.particle),ot&&ot.call(ft,at.particle),at.particle.setPosition()}}if(!this.emitting&&!this.skipping){this.completeFlag===1&&J.length===0&&(this.completeFlag=0,this.emit(s.COMPLETE,this));return}if(this.frequency===0)this.emitParticle();else if(this.frequency>0)for(this.flowCounter-=z;this.flowCounter<=0;)this.emitParticle(),this.flowCounter+=this.frequency;this.skipping||(this.duration>0&&(this.elapsed+=z,this.elapsed>=this.duration&&this.stop()),this.stopAfter>0&&this.stopCounter>=this.stopAfter&&this.stop())},overlap:function(D){for(var z=this.getWorldTransformMatrix(),W=this.alive,H=W.length,J=[],Q=0;Q0){var rt=0;for(this.skipping=!0;rt0&&y(H,D,D),H},createEmitter:function(){throw new Error("createEmitter removed. See ParticleEmitter docs for info")},particleX:{get:function(){return this.ops.x.current},set:function(D){this.ops.x.onChange(D)}},particleY:{get:function(){return this.ops.y.current},set:function(D){this.ops.y.onChange(D)}},accelerationX:{get:function(){return this.ops.accelerationX.current},set:function(D){this.ops.accelerationX.onChange(D)}},accelerationY:{get:function(){return this.ops.accelerationY.current},set:function(D){this.ops.accelerationY.onChange(D)}},maxVelocityX:{get:function(){return this.ops.maxVelocityX.current},set:function(D){this.ops.maxVelocityX.onChange(D)}},maxVelocityY:{get:function(){return this.ops.maxVelocityY.current},set:function(D){this.ops.maxVelocityY.onChange(D)}},speed:{get:function(){return this.ops.speedX.current},set:function(D){this.ops.speedX.onChange(D),this.ops.speedY.onChange(D)}},speedX:{get:function(){return this.ops.speedX.current},set:function(D){this.ops.speedX.onChange(D)}},speedY:{get:function(){return this.ops.speedY.current},set:function(D){this.ops.speedY.onChange(D)}},moveToX:{get:function(){return this.ops.moveToX.current},set:function(D){this.ops.moveToX.onChange(D)}},moveToY:{get:function(){return this.ops.moveToY.current},set:function(D){this.ops.moveToY.onChange(D)}},bounce:{get:function(){return this.ops.bounce.current},set:function(D){this.ops.bounce.onChange(D)}},particleScaleX:{get:function(){return this.ops.scaleX.current},set:function(D){this.ops.scaleX.onChange(D)}},particleScaleY:{get:function(){return this.ops.scaleY.current},set:function(D){this.ops.scaleY.onChange(D)}},particleColor:{get:function(){return this.ops.color.current},set:function(D){this.ops.color.onChange(D)}},colorEase:{get:function(){return this.ops.color.easeName},set:function(D){this.ops.color.setEase(D)}},particleTint:{get:function(){return this.ops.tint.current},set:function(D){this.ops.tint.onChange(D)}},particleAlpha:{get:function(){return this.ops.alpha.current},set:function(D){this.ops.alpha.onChange(D)}},lifespan:{get:function(){return this.ops.lifespan.current},set:function(D){this.ops.lifespan.onChange(D)}},particleAngle:{get:function(){return this.ops.angle.current},set:function(D){this.ops.angle.onChange(D)}},particleRotate:{get:function(){return this.ops.rotate.current},set:function(D){this.ops.rotate.onChange(D)}},quantity:{get:function(){return this.ops.quantity.current},set:function(D){this.ops.quantity.onChange(D)}},delay:{get:function(){return this.ops.delay.current},set:function(D){this.ops.delay.onChange(D)}},hold:{get:function(){return this.ops.hold.current},set:function(D){this.ops.hold.onChange(D)}},flowCounter:{get:function(){return this.counters[0]},set:function(D){this.counters[0]=D}},frameCounter:{get:function(){return this.counters[1]},set:function(D){this.counters[1]=D}},animCounter:{get:function(){return this.counters[2]},set:function(D){this.counters[2]=D}},elapsed:{get:function(){return this.counters[3]},set:function(D){this.counters[3]=D}},stopCounter:{get:function(){return this.counters[4]},set:function(D){this.counters[4]=D}},completeFlag:{get:function(){return this.counters[5]},set:function(D){this.counters[5]=D}},zoneIndex:{get:function(){return this.counters[6]},set:function(D){this.counters[6]=D}},zoneTotal:{get:function(){return this.counters[7]},set:function(D){this.counters[7]=D}},currentFrame:{get:function(){return this.counters[8]},set:function(D){this.counters[8]=D}},currentAnim:{get:function(){return this.counters[9]},set:function(D){this.counters[9]=D}},preDestroy:function(){this.texture=null,this.frames=null,this.anims=null,this.emitCallback=null,this.emitCallbackScope=null,this.deathCallback=null,this.deathCallbackScope=null,this.emitZones=null,this.deathZones=null,this.bounds=null,this.follow=null,this.counters=null;var D,z=this.ops;for(D=0;D{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(59996),c=t(61340),o=new c,r=new c,n=new c,e=new c,i=function(h,s,l,f){var u=o,d=r,p=n,g=e;f?(g.loadIdentity(),g.multiply(f),g.translate(s.x,s.y),g.rotate(s.rotation),g.scale(s.scaleX,s.scaleY)):g.applyITRS(s.x,s.y,s.rotation,s.scaleX,s.scaleY);var y=h.currentContext,x=l.roundPixels,T=l.alpha,S=s.alpha,M=s.alive,w=M.length,L=s.viewBounds;if(!(!s.visible||w===0||L&&!a(L,l.worldView))){s.sortCallback&&s.depthSort(),l.addToRenderList(s);var F=s.scrollFactorX,O=s.scrollFactorY;y.save(),y.globalCompositeOperation=h.blendModes[s.blendMode];for(var b=0;b0&&$.height>0){var j=-K.halfWidth,X=-K.halfHeight;y.globalAlpha=V,y.save(),d.setToContext(y),x&&(j=Math.round(j),X=Math.round(X)),y.imageSmoothingEnabled=!K.source.scaleMode,y.drawImage(K.source.image,$.x,$.y,$.width,$.height,j,X,$.width,$.height),y.restore()}}}y.restore()}};v.exports=i},92730:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(25305),c=t(44603),o=t(23568),r=t(95540),n=t(31600);c.register("particles",function(e,i){e===void 0&&(e={});var h=o(e,"key",null),s=r(e,"config",null),l=new n(this.scene,0,0,h);return i!==void 0&&(e.add=i),a(this.scene,l,e),s&&l.setConfig(s),l})},676:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(39429),c=t(31600);a.register("particles",function(o,r,n,e){return o!==void 0&&typeof o=="string"&&console.warn("ParticleEmitterManager was removed in Phaser 3.60. See documentation for details"),this.displayList.add(new c(this.scene,o,r,n,e))})},90668:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),c=a,o=a;c=t(21188),o=t(9871),v.exports={renderWebGL:c,renderCanvas:o}},21188:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(59996),c=t(61340),o=t(70554),r=new c,n=new c,e=new c,i=new c,h=function(s,l,f,u){var d=s.pipelines.set(l.pipeline),p=r,g=n,y=e,x=i;u?(x.loadIdentity(),x.multiply(u),x.translate(l.x,l.y),x.rotate(l.rotation),x.scale(l.scaleX,l.scaleY)):x.applyITRS(l.x,l.y,l.rotation,l.scaleX,l.scaleY);var T=o.getTintAppendFloatAlpha,S=f.alpha,M=l.alpha;s.pipelines.preBatch(l);var w=l.alive,L=w.length,F=l.viewBounds;if(!(L===0||F&&!a(F,f.worldView))){l.sortCallback&&l.depthSort(),f.addToRenderList(l),p.copyFrom(f.matrix),p.multiplyWithOffset(x,-f.scrollX*l.scrollFactorX,-f.scrollY*l.scrollFactorY),s.setBlendMode(l.blendMode),l.mask&&(l.mask.preRenderWebGL(s,l,f),s.pipelines.set(l.pipeline));for(var O=l.tintFill,b,N,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),c=new a({initialize:function(r,n,e){r===void 0&&(r=0),n===void 0&&(n=0),e===void 0&&(e=!0),this.emitter,this.x=r,this.y=n,this.active=e},update:function(){},destroy:function(){this.emitter=null}});v.exports=c},9774:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="complete"},812:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="deathzone"},30522:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="explode"},96695:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="start"},18677:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="stop"},20696:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={COMPLETE:t(9774),DEATH_ZONE:t(812),EXPLODE:t(30522),START:t(96695),STOP:t(18677)}},18404:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.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:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=new a({initialize:function(r,n){this.source=r,this.killOnEnter=n},willKill:function(o){var r=o.worldPosition,n=this.source.contains(r.x,r.y);return n&&this.killOnEnter||!n&&!this.killOnEnter}});v.exports=c},19909:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=new a({initialize:function(r,n,e,i,h,s){i===void 0&&(i=!1),h===void 0&&(h=!0),s===void 0&&(s=-1),this.source=r,this.points=[],this.quantity=n,this.stepRate=e,this.yoyo=i,this.counter=-1,this.seamless=h,this._length=0,this._direction=0,this.total=s,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var o=this.points[0],r=this.points[this.points.length-1];o.x===r.x&&o.y===r.y&&this.points.pop()}var n=this._length;return this._length=this.points.length,this._lengththis._length&&(this.counter=this._length-1),this},changeSource:function(o){return this.source=o,this.updateSource()},getPoint:function(o){this._direction===0?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,this.counter===-1&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var r=this.points[this.counter];r&&(o.x=r.x,o.y=r.y)}});v.exports=c},68875:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(26099),o=new a({initialize:function(n){this.source=n,this._tempVec=new c,this.total=-1},getPoint:function(r){var n=this._tempVec;this.source.getRandomPoint(n),r.x=n.x,r.y=n.y}});v.exports=o},21024:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={DeathZone:t(26388),EdgeZone:t(19909),RandomZone:t(68875)}},1159:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(31401),o=t(68287),r=new a({Extends:o,Mixins:[c.PathFollower],initialize:function(e,i,h,s,l,f){o.call(this,e,h,s,l,f),this.path=i},preUpdate:function(n,e){this.anims.update(n,e),this.pathUpdate(n)}});v.exports=r},90145:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(39429),c=t(1159);a.register("follower",function(o,r,n,e,i){var h=new c(this.scene,o,r,n,e,i);return this.displayList.add(h),this.updateList.add(h),h})},33663:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(9674),c=t(83419),o=t(48803),r=t(90664),n=t(4703),e=t(45650),i=new c({Extends:n,initialize:function(s,l,f,u,d,p,g,y){u||(u="__DEFAULT"),n.call(this,s,l,f,u,d),this.type="Plane",this.anims=new a(this),this.gridWidth,this.gridHeight,this.isTiled,this._checkerboard=null,this.hideCCW=!1,this.setGridSize(p,g,y),this.setSizeToFrame(!1),this.setViewHeight()},originX:{get:function(){return .5}},originY:{get:function(){return .5}},setGridSize:function(h,s,l){h===void 0&&(h=8),s===void 0&&(s=8),l===void 0&&(l=!1);var f=!1;return l&&(f=!0),this.gridWidth=h,this.gridHeight=s,this.isTiled=l,this.clear(),o({mesh:this,widthSegments:h,heightSegments:s,isOrtho:!1,tile:l,flipY:f}),this},setSizeToFrame:function(h){h===void 0&&(h=!0);var s=this.frame;if(this.setPerspective(this.width/s.width,this.height/s.height),this._checkerboard&&this._checkerboard!==this.texture&&this.removeCheckerboard(),!h)return this;var l=this.gridWidth,f=this.gridHeight,u=this.vertices,d=s.u0,p=s.u1,g=s.v0,y=s.v1,x,T,S=0;if(this.isTiled)for(g=s.v1,y=s.v0,T=0;T7&&x>7?g.push(d.r,d.g,d.b,l):g.push(p.r,p.g,p.b,f);var T=this.scene.sys.textures.addUint8Array(e(),new Uint8Array(g),16,16);return this.removeCheckerboard(),this.setTexture(T),this.setSizeToFrame(),this.setViewHeight(u),this},removeCheckerboard:function(){this._checkerboard&&(this._checkerboard.destroy(),this._checkerboard=null)},play:function(h,s){return this.anims.play(h,s)},playReverse:function(h,s){return this.anims.playReverse(h,s)},playAfterDelay:function(h,s){return this.anims.playAfterDelay(h,s)},playAfterRepeat:function(h,s){return this.anims.playAfterRepeat(h,s)},stop:function(){return this.anims.stop()},stopAfterDelay:function(h){return this.anims.stopAfterDelay(h)},stopAfterRepeat:function(h){return this.anims.stopAfterRepeat(h)},stopOnFrame:function(h){return this.anims.stopOnFrame(h)},preUpdate:function(h,s){n.prototype.preUpdate.call(this,h,s),this.anims.update(h,s)},preDestroy:function(){this.clear(),this.removeCheckerboard(),this.anims.destroy(),this.anims=void 0,this.debugCallback=null,this.debugGraphic=null}});v.exports=i},56015:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(25305),c=t(13059),o=t(44603),r=t(23568),n=t(35154),e=t(33663);o.register("plane",function(i,h){i===void 0&&(i={});var s=r(i,"key",null),l=r(i,"frame",null),f=n(i,"width",8),u=n(i,"height",8),d=n(i,"tile",!1),p=new e(this.scene,0,0,s,l,f,u,d);h!==void 0&&(i.add=h);var g=n(i,"checkerboard",null);if(g){var y=n(g,"color1",16777215),x=n(g,"color2",255),T=n(g,"alpha1",255),S=n(g,"alpha2",255),M=n(g,"height",128);p.createCheckerboard(y,x,T,S,M)}return a(this.scene,p,i),c(p,i),p})},30985:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(33663),c=t(39429);c.register("plane",function(o,r,n,e,i,h,s){return this.displayList.add(new a(this.scene,o,r,n,e,i,h,s))})},80321:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(31401),o=t(95643),r=t(30100),n=t(36060),e=t(67277),i=new a({Extends:o,Mixins:[c.AlphaSingle,c.BlendMode,c.Depth,c.Mask,c.Pipeline,c.PostPipeline,c.ScrollFactor,c.Transform,c.Visible,e],initialize:function(s,l,f,u,d,p,g){u===void 0&&(u=16777215),d===void 0&&(d=128),p===void 0&&(p=1),g===void 0&&(g=.1),o.call(this,s,"PointLight"),this.initPipeline(n.POINTLIGHT_PIPELINE),this.initPostPipeline(),this.setPosition(l,f),this.color=r(u),this.intensity=p,this.attenuation=g,this.width=d*2,this.height=d*2,this._radius=d},radius:{get:function(){return this._radius},set:function(h){this._radius=h,this.width=h*2,this.height=h*2}},originX:{get:function(){return .5}},originY:{get:function(){return .5}},displayOriginX:{get:function(){return this._radius}},displayOriginY:{get:function(){return this._radius}}});v.exports=i},39829:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(25305),c=t(44603),o=t(23568),r=t(80321);c.register("pointlight",function(n,e){n===void 0&&(n={});var i=o(n,"color",16777215),h=o(n,"radius",128),s=o(n,"intensity",1),l=o(n,"attenuation",.1),f=new r(this.scene,0,0,i,h,s,l);return e!==void 0&&(n.add=e),a(this.scene,f,n),f})},71255:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(39429),c=t(80321);a.register("pointlight",function(o,r,n,e,i,h){return this.displayList.add(new c(this.scene,o,r,n,e,i,h))})},67277:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),c=a,o=a;c=t(57787),v.exports={renderWebGL:c,renderCanvas:o}},57787:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(91296),c=function(o,r,n,e){n.addToRenderList(r);var i=o.pipelines.set(r.pipeline),h=a(r,n,e).calc,s=r.width,l=r.height,f=-r._radius,u=-r._radius,d=f+s,p=u+l,g=h.getX(0,0),y=h.getY(0,0),x=h.getX(f,u),T=h.getY(f,u),S=h.getX(f,p),M=h.getY(f,p),w=h.getX(d,p),L=h.getY(d,p),F=h.getX(d,u),O=h.getY(d,u);o.pipelines.preBatch(r),i.batchPointLight(r,n,x,T,S,M,w,L,F,O,g,y),o.pipelines.postBatch(r)};v.exports=c},591:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(81320),o=t(88571),r=new a({Extends:o,initialize:function(e,i,h,s,l){i===void 0&&(i=0),h===void 0&&(h=0),s===void 0&&(s=32),l===void 0&&(l=32);var f=new c(e.sys.textures,"",s,l);o.call(this,e,i,h,f),this.type="RenderTexture",this.camera=this.texture.camera,this._saved=!1},setSize:function(n,e){this.width=n,this.height=e,this.texture.setSize(n,e),this.updateDisplayOrigin();var i=this.input;return i&&!i.customHitArea&&(i.hitArea.width=n,i.hitArea.height=e),this},resize:function(n,e){return this.setSize(n,e),this},saveTexture:function(n){var e=this.texture;return e.key=n,e.manager.addDynamicTexture(e)&&(this._saved=!0),e},fill:function(n,e,i,h,s,l){return this.texture.fill(n,e,i,h,s,l),this},clear:function(){return this.texture.clear(),this},stamp:function(n,e,i,h,s){return this.texture.stamp(n,e,i,h,s),this},erase:function(n,e,i){return this.texture.erase(n,e,i),this},draw:function(n,e,i,h,s){return this.texture.draw(n,e,i,h,s),this},drawFrame:function(n,e,i,h,s,l){return this.texture.drawFrame(n,e,i,h,s,l),this},repeat:function(n,e,i,h,s,l,f,u,d){return this.texture.repeat(n,e,i,h,s,l,f,u,d),this},beginDraw:function(){return this.texture.beginDraw(),this},batchDraw:function(n,e,i,h,s){return this.texture.batchDraw(n,e,i,h,s),this},batchDrawFrame:function(n,e,i,h,s,l){return this.texture.batchDrawFrame(n,e,i,h,s,l),this},endDraw:function(n){return this.texture.endDraw(n),this},snapshotArea:function(n,e,i,h,s,l,f){return this.texture.snapshotArea(n,e,i,h,s,l,f),this},snapshot:function(n,e,i){return this.snapshotArea(0,0,this.width,this.height,n,e,i)},snapshotPixel:function(n,e,i){return this.snapshotArea(n,e,1,1,i,"pixel")},preDestroy:function(){this.camera=null,this._saved||this.texture.destroy()}});v.exports=r},34495:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(25305),c=t(44603),o=t(23568),r=t(591);c.register("renderTexture",function(n,e){n===void 0&&(n={});var i=o(n,"x",0),h=o(n,"y",0),s=o(n,"width",32),l=o(n,"height",32),f=new r(this.scene,i,h,s,l);return e!==void 0&&(n.add=e),a(this.scene,f,n),f})},60505:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(39429),c=t(591);a.register("renderTexture",function(o,r,n,e){return this.displayList.add(new c(this.scene,o,r,n,e))})},77757:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(9674),c=t(83419),o=t(31401),r=t(95643),n=t(36060),e=t(38745),i=t(26099),h=new c({Extends:r,Mixins:[o.AlphaSingle,o.BlendMode,o.Depth,o.Flip,o.Mask,o.Pipeline,o.PostPipeline,o.Size,o.Texture,o.Transform,o.Visible,o.ScrollFactor,e],initialize:function(l,f,u,d,p,g,y,x,T){d===void 0&&(d="__DEFAULT"),g===void 0&&(g=2),y===void 0&&(y=!0),r.call(this,l,"Rope"),this.anims=new a(this),this.points=g,this.vertices,this.uv,this.colors,this.alphas,this.tintFill=d==="__DEFAULT",this.dirty=!1,this.horizontal=y,this._flipX=!1,this._flipY=!1,this._perp=new i,this.debugCallback=null,this.debugGraphic=null,this.setTexture(d,p),this.setPosition(f,u),this.setSizeToFrame(),this.initPipeline(n.ROPE_PIPELINE),this.initPostPipeline(),Array.isArray(g)&&this.resizeArrays(g.length),this.setPoints(g,x,T),this.updateVertices()},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(s,l){var f=this.anims.currentFrame;this.anims.update(s,l),this.anims.currentFrame!==f&&(this.updateUVs(),this.updateVertices())},play:function(s,l,f){return this.anims.play(s,l,f),this},setDirty:function(){return this.dirty=!0,this},setHorizontal:function(s,l,f){return s===void 0&&(s=this.points.length),this.horizontal?this:(this.horizontal=!0,this.setPoints(s,l,f))},setVertical:function(s,l,f){return s===void 0&&(s=this.points.length),this.horizontal?(this.horizontal=!1,this.setPoints(s,l,f)):this},setTintFill:function(s){return s===void 0&&(s=!1),this.tintFill=s,this},setAlphas:function(s,l){var f=this.points.length;if(f<1)return this;var u=this.alphas;s===void 0?s=[1]:!Array.isArray(s)&&l===void 0&&(s=[s]);var d,p=0;if(l!==void 0)for(d=0;dp&&(g=s[p]),u[p]=g,s.length>p+1&&(g=s[p+1]),u[p+1]=g}return this},setColors:function(s){var l=this.points.length;if(l<1)return this;var f=this.colors;s===void 0?s=[16777215]:Array.isArray(s)||(s=[s]);var u,d=0;if(s.length===l)for(u=0;ud&&(p=s[d]),f[d]=p,s.length>d+1&&(p=s[d+1]),f[d+1]=p}return this},setPoints:function(s,l,f){if(s===void 0&&(s=2),typeof s=="number"){var u=s;u<2&&(u=2),s=[];var d,p,g;if(this.horizontal)for(g=-this.frame.halfWidth,p=this.frame.width/(u-1),d=0;d{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(){};v.exports=m},26209:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(25305),c=t(44603),o=t(23568),r=t(35154),n=t(77757);c.register("rope",function(e,i){e===void 0&&(e={});var h=o(e,"key",null),s=o(e,"frame",null),l=o(e,"horizontal",!0),f=r(e,"points",void 0),u=r(e,"colors",void 0),d=r(e,"alphas",void 0),p=new n(this.scene,0,0,h,s,f,l,u,d);return i!==void 0&&(e.add=i),a(this.scene,p,e),p})},96819:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(77757),c=t(39429);c.register("rope",function(o,r,n,e,i,h,s,l){return this.displayList.add(new a(this.scene,o,r,n,e,i,h,s,l))})},38745:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),c=a,o=a;c=t(20439),o=t(95262),v.exports={renderWebGL:c,renderCanvas:o}},20439:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(91296),c=t(70554),o=function(r,n,e,i){e.addToRenderList(n);var h=r.pipelines.set(n.pipeline,n),s=a(n,e,i).calc,l=n.vertices,f=n.uv,u=n.colors,d=n.alphas,p=n.alpha,g=c.getTintAppendFloatAlpha,y=e.roundPixels,x=l.length,T=Math.floor(x*.5);h.flush(),r.pipelines.preBatch(n);var S=h.setGameObject(n),M=h.vertexViewF32,w=h.vertexViewU32,L=h.vertexCount*h.currentShader.vertexComponentCount-1,F=0,O=n.tintFill;n.dirty&&n.updateVertices();for(var b=n.debugCallback,N=[],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),c=t(31401),o=t(95643),r=t(95540),n=t(79291),e=t(61622),i=t(25479),h=t(61340),s=t(95428),l=t(92503),f=new a({Extends:o,Mixins:[c.ComputedSize,c.Depth,c.GetBounds,c.Mask,c.Origin,c.ScrollFactor,c.Transform,c.Visible,i],initialize:function(d,p,g,y,x,T,S,M){g===void 0&&(g=0),y===void 0&&(y=0),x===void 0&&(x=128),T===void 0&&(T=128),o.call(this,d,"Shader"),this.blendMode=-1,this.shader;var w=d.sys.renderer;this.renderer=w,this.gl=w.gl,this.vertexData=new ArrayBuffer(6*(Float32Array.BYTES_PER_ELEMENT*2)),this.vertexBuffer=w.createVertexBuffer(this.vertexData.byteLength,this.gl.STREAM_DRAW),this._deferSetShader=null,this._deferProjOrtho=null,this.program=null,this.bytes=new Uint8Array(this.vertexData),this.vertexViewF32=new Float32Array(this.vertexData),this._tempMatrix1=new h,this._tempMatrix2=new h,this._tempMatrix3=new h,this.viewMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.projectionMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.uniforms={},this.pointer=null,this._rendererWidth=w.width,this._rendererHeight=w.height,this._textureCount=0,this.framebuffer=null,this.glTexture=null,this.renderToTexture=!1,this.texture=null,this.setPosition(g,y),this.setSize(x,T),this.setOrigin(.5,.5),this.setShader(p,S,M),this.renderer.on(l.RESTORE_WEBGL,this.onContextRestored,this)},willRender:function(u){return this.renderToTexture?!0:!(o.RENDER_MASK!==this.renderFlags||this.cameraFilter!==0&&this.cameraFilter&u.id)},setRenderToTexture:function(u,d){if(!this.renderToTexture){var p=this.width,g=this.height,y=this.renderer;this.glTexture=y.createTextureFromSource(null,p,g,0),this.framebuffer=y.createFramebuffer(p,g,this.glTexture,!1),this._rendererWidth=p,this._rendererHeight=g,this.renderToTexture=!0,this.projOrtho(0,this.width,this.height,0),u&&(this.texture=this.scene.sys.textures.addGLTexture(u,this.glTexture))}return this.shader&&(y.pipelines.clear(),this.load(),this.flush(),y.pipelines.rebind()),this},setShader:function(u,d,p){if(this.renderer.contextLost)return this._deferSetShader={key:u,textures:d,textureData:p},this;if(d===void 0&&(d=[]),typeof u=="string"){var g=this.scene.sys.cache.shader;if(!g.has(u))return console.warn("Shader missing: "+u),this;this.shader=g.get(u)}else this.shader=u;var y=this.gl,x=this.renderer;this.program&&x.deleteProgram(this.program);var T=x.createProgram(this.shader.vertexSrc,this.shader.fragmentSrc);y.uniformMatrix4fv(y.getUniformLocation(T.webGLProgram,"uViewMatrix"),!1,this.viewMatrix),y.uniformMatrix4fv(y.getUniformLocation(T.webGLProgram,"uProjectionMatrix"),!1,this.projectionMatrix),y.uniform2f(y.getUniformLocation(T.webGLProgram,"uResolution"),this.width,this.height),this.program=T;var S=new Date,M={resolution:{type:"2f",value:{x:this.width,y:this.height}},time:{type:"1f",value:0},mouse:{type:"2f",value:{x:this.width/2,y:this.height/2}},date:{type:"4fv",value:[S.getFullYear(),S.getMonth(),S.getDate(),S.getHours()*60*60+S.getMinutes()*60+S.getSeconds()]},sampleRate:{type:"1f",value:44100},iChannel0:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel1:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel2:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel3:{type:"sampler2D",value:null,textureData:{repeat:!0}}};this.shader.uniforms?this.uniforms=n(!0,{},this.shader.uniforms,M):this.uniforms=M;for(var w=0;w<4;w++)d[w]&&this.setSampler2D("iChannel"+w,d[w],w,p);return this.initUniforms(),this.projOrtho(0,this._rendererWidth,this._rendererHeight,0),this},setPointer:function(u){return this.pointer=u,this},projOrtho:function(u,d,p,g){if(this.renderer.contextLost){this._deferProjOrtho={left:u,right:d,bottom:p,top:g};return}var y=-1e3,x=1e3,T=1/(u-d),S=1/(p-g),M=1/(y-x),w=this.projectionMatrix;w[0]=-2*T,w[5]=-2*S,w[10]=2*M,w[12]=(u+d)*T,w[13]=(g+p)*S,w[14]=(x+y)*M;var L=this.program,F=this.gl,O=this.renderer;O.setProgram(L),F.uniformMatrix4fv(F.getUniformLocation(L.webGLProgram,"uProjectionMatrix"),!1,this.projectionMatrix),this._rendererWidth=d,this._rendererHeight=p},initUniforms:function(){var u=this.renderer.glFuncMap,d=this.program;this._textureCount=0;for(var p in this.uniforms){var g=this.uniforms[p],y=g.type,x=u[y];g.uniformLocation=this.renderer.createUniformLocation(d,p),y!=="sampler2D"&&(g.glMatrix=x.matrix,g.glValueLength=x.length,g.glFunc=x.func)}},setSampler2DBuffer:function(u,d,p,g,y,x){y===void 0&&(y=0),x===void 0&&(x={});var T=this.uniforms[u];return T.value=d,x.width=p,x.height=g,T.textureData=x,this._textureCount=y,this.initSampler2D(T),this},setSampler2D:function(u,d,p,g){p===void 0&&(p=0);var y=this.scene.sys.textures;if(y.exists(d)){var x=y.getFrame(d);if(x.glTexture&&x.glTexture.isRenderTexture)return this.setSampler2DBuffer(u,x.glTexture,x.width,x.height,p,g);var T=this.uniforms[u],S=x.source;T.textureKey=d,T.source=S.image,T.value=x.glTexture,S.isGLTexture&&(g||(g={}),g.width=S.width,g.height=S.height),g&&(T.textureData=g),this._textureCount=p,this.initSampler2D(T)}return this},setUniform:function(u,d){return e(this.uniforms,u,d),this},getUniform:function(u){return r(this.uniforms,u,null)},setChannel0:function(u,d){return this.setSampler2D("iChannel0",u,0,d)},setChannel1:function(u,d){return this.setSampler2D("iChannel1",u,1,d)},setChannel2:function(u,d){return this.setSampler2D("iChannel2",u,2,d)},setChannel3:function(u,d){return this.setSampler2D("iChannel3",u,3,d)},initSampler2D:function(u){if(u.value){var d=u.textureData;if(d&&!u.value.isRenderTexture){var p=this.gl,g=u.value,y=p[r(d,"magFilter","linear").toUpperCase()],x=p[r(d,"minFilter","linear").toUpperCase()],T=p[r(d,"wrapS","repeat").toUpperCase()],S=p[r(d,"wrapT","repeat").toUpperCase()],M=p[r(d,"format","rgba").toUpperCase()],w=r(d,"flipY",!1),L=r(d,"width",g.width),F=r(d,"height",g.height),O=r(d,"source",g.pixels);d.repeat&&(T=p.REPEAT,S=p.REPEAT),d.width&&(O=null),g.update(O,L,F,w,T,S,x,y,M)}this.renderer.setProgram(this.program),this._textureCount++}},syncUniforms:function(){var u=this.gl,d=this.uniforms,p,g,y,x,T,S=0;for(var M in d)p=d[M],y=p.glFunc,g=p.glValueLength,x=p.uniformLocation,T=p.value,T!==null&&(g===1?p.glMatrix?y.call(u,x.webGLUniformLocation,p.transpose,T):y.call(u,x.webGLUniformLocation,T):g===2?y.call(u,x.webGLUniformLocation,T.x,T.y):g===3?y.call(u,x.webGLUniformLocation,T.x,T.y,T.z):g===4?y.call(u,x.webGLUniformLocation,T.x,T.y,T.z,T.w):p.type==="sampler2D"&&(u.activeTexture(u.TEXTURE0+S),u.bindTexture(u.TEXTURE_2D,T.webGLTexture),u.uniform1i(x.webGLUniformLocation,S),S++))},load:function(u){var d=this.gl,p=this.width,g=this.height,y=this.renderer,x=this.program,T=this.viewMatrix;if(!this.renderToTexture){var S=-this._displayOriginX,M=-this._displayOriginY;T[0]=u[0],T[1]=u[1],T[4]=u[2],T[5]=u[3],T[8]=u[4],T[9]=u[5],T[12]=T[0]*S+T[4]*M,T[13]=T[1]*S+T[5]*M}d.useProgram(x.webGLProgram),d.uniformMatrix4fv(d.getUniformLocation(x.webGLProgram,"uViewMatrix"),!1,T),d.uniformMatrix4fv(d.getUniformLocation(x.webGLProgram,"uProjectionMatrix"),!1,this.projectionMatrix),d.uniform2f(d.getUniformLocation(x.webGLProgram,"uResolution"),this.width,this.height);var w=this.uniforms,L=w.resolution;L.value.x=p,L.value.y=g,w.time.value=y.game.loop.getDuration();var F=this.pointer;if(F){var O=w.mouse,b=F.x/p,N=1-F.y/g;O.value.x=b.toFixed(2),O.value.y=N.toFixed(2)}this.syncUniforms()},flush:function(){var u=this.width,d=this.height,p=this.program,g=this.gl,y=this.vertexBuffer,x=this.renderer,T=Float32Array.BYTES_PER_ELEMENT*2;this.renderToTexture&&(x.setFramebuffer(this.framebuffer),g.clearColor(0,0,0,0),g.clear(g.COLOR_BUFFER_BIT)),g.bindBuffer(g.ARRAY_BUFFER,y.webGLBuffer);var S=g.getAttribLocation(p.webGLProgram,"inPosition");S!==-1&&(g.enableVertexAttribArray(S),g.vertexAttribPointer(S,2,g.FLOAT,!1,T,0));var M=this.vertexViewF32;M[3]=d,M[4]=u,M[5]=d,M[8]=u,M[9]=d,M[10]=u;var w=6;g.bufferSubData(g.ARRAY_BUFFER,0,this.bytes.subarray(0,w*T)),g.drawArrays(g.TRIANGLES,0,w),this.renderToTexture&&x.setFramebuffer(null,!1)},setAlpha:function(){},setBlendMode:function(){},onContextRestored:function(){if(this._deferSetShader!==null){var u=this._deferSetShader.key,d=this._deferSetShader.textures,p=this._deferSetShader.textureData;this._deferSetShader=null,this.setShader(u,d,p)}if(this._deferProjOrtho!==null){var g=this._deferProjOrtho.left,y=this._deferProjOrtho.right,x=this._deferProjOrtho.bottom,T=this._deferProjOrtho.top;this._deferProjOrtho=null,this.projOrtho(g,y,x,T)}},preDestroy:function(){var u=this.renderer;u.off(l.RESTORE_WEBGL,this.onContextRestored,this),u.deleteProgram(this.program),u.deleteBuffer(this.vertexBuffer),this.renderToTexture&&(u.deleteFramebuffer(this.framebuffer),this.texture.destroy(),this.framebuffer=null,this.glTexture=null,this.texture=null),s(this.uniforms,function(d){u.deleteUniformLocation(d.uniformLocation),d.uniformLocation=null})}});v.exports=f},80464:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(){};v.exports=m},54935:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(25305),c=t(44603),o=t(23568),r=t(20071);c.register("shader",function(n,e){n===void 0&&(n={});var i=o(n,"key",null),h=o(n,"x",0),s=o(n,"y",0),l=o(n,"width",128),f=o(n,"height",128),u=new r(this.scene,i,h,s,l,f);return e!==void 0&&(n.add=e),a(this.scene,u,n),u})},74177:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(20071),c=t(39429);c.register("shader",function(o,r,n,e,i,h,s){return this.displayList.add(new a(this.scene,o,r,n,e,i,h,s))})},25479:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),c=a,o=a;c=t(19257),o=t(80464),v.exports={renderWebGL:c,renderCanvas:o}},19257:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(91296),c=function(o,r,n,e){if(r.shader){if(n.addToRenderList(r),o.pipelines.clear(),r.renderToTexture)r.load(),r.flush();else{var i=a(r,n,e).calc;(o.width!==r._rendererWidth||o.height!==r._rendererHeight)&&r.projOrtho(0,o.width,o.height,0),r.load(i.matrix),r.flush()}o.pipelines.rebind()}};v.exports=c},10441:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(70554),c=function(o,r,n,e,i,h){for(var s=a.getTintAppendFloatAlpha(n.fillColor,n.fillAlpha*e),l=n.pathData,f=n.pathIndexes,u=0;u{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c,o){var r=c||a.fillColor,n=o||a.fillAlpha,e=(r&16711680)>>>16,i=(r&65280)>>>8,h=r&255;t.fillStyle="rgba("+e+","+i+","+h+","+n+")"};v.exports=m},75177:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c,o){var r=c||a.strokeColor,n=o||a.strokeAlpha,e=(r&16711680)>>>16,i=(r&65280)>>>8,h=r&255;t.strokeStyle="rgba("+e+","+i+","+h+","+n+")",t.lineWidth=a.lineWidth};v.exports=m},17803:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(31401),o=t(95643),r=t(23031),n=new a({Extends:o,Mixins:[c.AlphaSingle,c.BlendMode,c.Depth,c.GetBounds,c.Mask,c.Origin,c.Pipeline,c.PostPipeline,c.ScrollFactor,c.Transform,c.Visible],initialize:function(i,h,s){h===void 0&&(h="Shape"),o.call(this,i,h),this.geom=s,this.pathData=[],this.pathIndexes=[],this.fillColor=16777215,this.fillAlpha=1,this.strokeColor=16777215,this.strokeAlpha=1,this.lineWidth=1,this.isFilled=!1,this.isStroked=!1,this.closePath=!0,this._tempLine=new r,this.width=0,this.height=0,this.initPipeline(),this.initPostPipeline()},setFillStyle:function(e,i){return i===void 0&&(i=1),e===void 0?this.isFilled=!1:(this.fillColor=e,this.fillAlpha=i,this.isFilled=!0),this},setStrokeStyle:function(e,i,h){return h===void 0&&(h=1),e===void 0?this.isStroked=!1:(this.lineWidth=e,this.strokeColor=i,this.strokeAlpha=h,this.isStroked=!0),this},setClosePath:function(e){return this.closePath=e,this},setSize:function(e,i){return this.width=e,this.height=i,this},setDisplaySize:function(e,i){return this.displayWidth=e,this.displayHeight=i,this},preDestroy:function(){this.geom=null,this._tempLine=null,this.pathData=[],this.pathIndexes=[]},displayWidth:{get:function(){return this.scaleX*this.width},set:function(e){this.scaleX=e/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(e){this.scaleY=e/this.height}}});v.exports=n},34682:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(70554),c=function(o,r,n,e,i){var h=o.strokeTint,s=a.getTintAppendFloatAlpha(r.strokeColor,r.strokeAlpha*n);h.TL=s,h.TR=s,h.BL=s,h.BR=s;var l=r.pathData,f=l.length-1,u=r.lineWidth,d=u/2,p=l[0]-e,g=l[1]-i;r.closePath||(f-=2);for(var y=2;y{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(13609),c=t(83419),o=t(39506),r=t(94811),n=t(96503),e=t(36383),i=t(17803),h=new c({Extends:i,Mixins:[a],initialize:function(l,f,u,d,p,g,y,x,T){f===void 0&&(f=0),u===void 0&&(u=0),d===void 0&&(d=128),p===void 0&&(p=0),g===void 0&&(g=360),y===void 0&&(y=!1),i.call(this,l,"Arc",new n(0,0,d)),this._startAngle=p,this._endAngle=g,this._anticlockwise=y,this._iterations=.01,this.setPosition(f,u);var S=this.geom.radius*2;this.setSize(S,S),x!==void 0&&this.setFillStyle(x,T),this.updateDisplayOrigin(),this.updateData()},iterations:{get:function(){return this._iterations},set:function(s){this._iterations=s,this.updateData()}},radius:{get:function(){return this.geom.radius},set:function(s){this.geom.radius=s;var l=s*2;this.setSize(l,l),this.updateDisplayOrigin(),this.updateData()}},startAngle:{get:function(){return this._startAngle},set:function(s){this._startAngle=s,this.updateData()}},endAngle:{get:function(){return this._endAngle},set:function(s){this._endAngle=s,this.updateData()}},anticlockwise:{get:function(){return this._anticlockwise},set:function(s){this._anticlockwise=s,this.updateData()}},setRadius:function(s){return this.radius=s,this},setIterations:function(s){return s===void 0&&(s=.01),this.iterations=s,this},setStartAngle:function(s,l){return this._startAngle=s,l!==void 0&&(this._anticlockwise=l),this.updateData()},setEndAngle:function(s,l){return this._endAngle=s,l!==void 0&&(this._anticlockwise=l),this.updateData()},updateData:function(){var s=this._iterations,l=s,f=this.geom.radius,u=o(this._startAngle),d=o(this._endAngle),p=this._anticlockwise,g=f,y=f;d-=u,p?d<-e.PI2?d=-e.PI2:d>0&&(d=-e.PI2+d%e.PI2):d>e.PI2?d=e.PI2:d<0&&(d=e.PI2+d%e.PI2);for(var x=[g+Math.cos(u)*f,y+Math.sin(u)*f],T;l<1;)T=d*l+u,x.push(g+Math.cos(T)*f,y+Math.sin(T)*f),l+=s;return T=d+u,x.push(g+Math.cos(T)*f,y+Math.sin(T)*f),x.push(g+Math.cos(u)*f,y+Math.sin(u)*f),this.pathIndexes=r(x),this.pathData=x,this}});v.exports=h},42542:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(39506),c=t(65960),o=t(75177),r=t(20926),n=function(e,i,h,s){h.addToRenderList(i);var l=e.currentContext;if(r(e,l,i,h,s)){var f=i.radius;l.beginPath(),l.arc(f-i.originX*(f*2),f-i.originY*(f*2),f,a(i._startAngle),a(i._endAngle),i.anticlockwise),i.closePath&&l.closePath(),i.isFilled&&(c(l,i),l.fill()),i.isStroked&&(o(l,i),l.stroke()),l.restore()}};v.exports=n},42563:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(23629),c=t(39429);c.register("arc",function(o,r,n,e,i,h,s,l){return this.displayList.add(new a(this.scene,o,r,n,e,i,h,s,l))}),c.register("circle",function(o,r,n,e,i){return this.displayList.add(new a(this.scene,o,r,n,0,360,!1,e,i))})},13609:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),c=a,o=a;c=t(41447),o=t(42542),v.exports={renderWebGL:c,renderCanvas:o}},41447:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(91296),c=t(10441),o=t(34682),r=function(n,e,i,h){i.addToRenderList(e);var s=n.pipelines.set(e.pipeline),l=a(e,i,h),f=s.calcMatrix.copyFrom(l.calc),u=e._displayOriginX,d=e._displayOriginY,p=i.alpha*e.alpha;n.pipelines.preBatch(e),e.isFilled&&c(s,f,e,p,u,d),e.isStroked&&o(s,e,p,u,d),n.pipelines.postBatch(e)};v.exports=r},89:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(33141),o=t(94811),r=t(87841),n=t(17803),e=new a({Extends:n,Mixins:[c],initialize:function(h,s,l,f,u,d){s===void 0&&(s=0),l===void 0&&(l=0),n.call(this,h,"Curve",f),this._smoothness=32,this._curveBounds=new r,this.closePath=!1,this.setPosition(s,l),u!==void 0&&this.setFillStyle(u,d),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(i){this._smoothness=i,this.updateData()}},setSmoothness:function(i){return this._smoothness=i,this.updateData()},updateData:function(){var i=this._curveBounds,h=this._smoothness;this.geom.getBounds(i,h),this.setSize(i.width,i.height),this.updateDisplayOrigin();for(var s=[],l=this.geom.getPoints(h),f=0;f{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(65960),c=t(75177),o=t(20926),r=function(n,e,i,h){i.addToRenderList(e);var s=n.currentContext;if(o(n,s,e,i,h)){var l=e._displayOriginX+e._curveBounds.x,f=e._displayOriginY+e._curveBounds.y,u=e.pathData,d=u.length-1,p=u[0]-l,g=u[1]-f;s.beginPath(),s.moveTo(p,g),e.closePath||(d-=2);for(var y=2;y{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(39429),c=t(89);a.register("curve",function(o,r,n,e,i){return this.displayList.add(new c(this.scene,o,r,n,e,i))})},33141:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),c=a,o=a;c=t(53987),o=t(3170),v.exports={renderWebGL:c,renderCanvas:o}},53987:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(10441),c=t(91296),o=t(34682),r=function(n,e,i,h){i.addToRenderList(e);var s=n.pipelines.set(e.pipeline),l=c(e,i,h),f=s.calcMatrix.copyFrom(l.calc),u=e._displayOriginX+e._curveBounds.x,d=e._displayOriginY+e._curveBounds.y,p=i.alpha*e.alpha;n.pipelines.preBatch(e),e.isFilled&&a(s,f,e,p,u,d),e.isStroked&&o(s,e,p,u,d),n.pipelines.postBatch(e)};v.exports=r},19921:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(94811),o=t(54205),r=t(8497),n=t(17803),e=new a({Extends:n,Mixins:[o],initialize:function(h,s,l,f,u,d,p){s===void 0&&(s=0),l===void 0&&(l=0),f===void 0&&(f=128),u===void 0&&(u=128),n.call(this,h,"Ellipse",new r(f/2,u/2,f,u)),this._smoothness=64,this.setPosition(s,l),this.width=f,this.height=u,d!==void 0&&this.setFillStyle(d,p),this.updateDisplayOrigin(),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(i){this._smoothness=i,this.updateData()}},setSize:function(i,h){return this.width=i,this.height=h,this.geom.setPosition(i/2,h/2),this.geom.setSize(i,h),this.updateData()},setSmoothness:function(i){return this._smoothness=i,this.updateData()},updateData:function(){for(var i=[],h=this.geom.getPoints(this._smoothness),s=0;s{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(65960),c=t(75177),o=t(20926),r=function(n,e,i,h){i.addToRenderList(e);var s=n.currentContext;if(o(n,s,e,i,h)){var l=e._displayOriginX,f=e._displayOriginY,u=e.pathData,d=u.length-1,p=u[0]-l,g=u[1]-f;s.beginPath(),s.moveTo(p,g),e.closePath||(d-=2);for(var y=2;y{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(19921),c=t(39429);c.register("ellipse",function(o,r,n,e,i,h){return this.displayList.add(new a(this.scene,o,r,n,e,i,h))})},54205:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),c=a,o=a;c=t(19467),o=t(7930),v.exports={renderWebGL:c,renderCanvas:o}},19467:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(10441),c=t(91296),o=t(34682),r=function(n,e,i,h){i.addToRenderList(e);var s=n.pipelines.set(e.pipeline),l=c(e,i,h),f=s.calcMatrix.copyFrom(l.calc),u=e._displayOriginX,d=e._displayOriginY,p=i.alpha*e.alpha;n.pipelines.preBatch(e),e.isFilled&&a(s,f,e,p,u,d),e.isStroked&&o(s,e,p,u,d),n.pipelines.postBatch(e)};v.exports=r},30479:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(17803),o=t(26015),r=new a({Extends:c,Mixins:[o],initialize:function(e,i,h,s,l,f,u,d,p,g,y){i===void 0&&(i=0),h===void 0&&(h=0),s===void 0&&(s=128),l===void 0&&(l=128),f===void 0&&(f=32),u===void 0&&(u=32),c.call(this,e,"Grid",null),this.cellWidth=f,this.cellHeight=u,this.showCells=!0,this.outlineFillColor=0,this.outlineFillAlpha=0,this.showOutline=!0,this.showAltCells=!1,this.altFillColor,this.altFillAlpha,this.setPosition(i,h),this.setSize(s,l),this.setFillStyle(d,p),g!==void 0&&this.setOutlineStyle(g,y),this.updateDisplayOrigin()},setFillStyle:function(n,e){return e===void 0&&(e=1),n===void 0?this.showCells=!1:(this.fillColor=n,this.fillAlpha=e,this.showCells=!0),this},setAltFillStyle:function(n,e){return e===void 0&&(e=1),n===void 0?this.showAltCells=!1:(this.altFillColor=n,this.altFillAlpha=e,this.showAltCells=!0),this},setOutlineStyle:function(n,e){return e===void 0&&(e=1),n===void 0?this.showOutline=!1:(this.outlineFillColor=n,this.outlineFillAlpha=e,this.showOutline=!0),this}});v.exports=r},49912:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(65960),c=t(75177),o=t(20926),r=function(n,e,i,h){i.addToRenderList(e);var s=n.currentContext;if(o(n,s,e,i,h)){var l=-e._displayOriginX,f=-e._displayOriginY,u=i.alpha*e.alpha,d=e.width,p=e.height,g=e.cellWidth,y=e.cellHeight,x=Math.ceil(d/g),T=Math.ceil(p/y),S=g,M=y,w=g-(x*g-d),L=y-(T*y-p),F=e.showCells,O=e.showAltCells,b=e.showOutline,N=0,V=0,K=0,$=0,j=0;if(b&&(S--,M--,w===g&&w--,L===y&&L--),F&&e.fillAlpha>0)for(a(s,e),V=0;V0)for(a(s,e,e.altFillColor,e.altFillAlpha*u),V=0;V0){for(c(s,e,e.outlineFillColor,e.outlineFillAlpha*u),N=1;N{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(39429),c=t(30479);a.register("grid",function(o,r,n,e,i,h,s,l,f,u){return this.displayList.add(new c(this.scene,o,r,n,e,i,h,s,l,f,u))})},26015:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),c=a,o=a;c=t(46161),o=t(49912),v.exports={renderWebGL:c,renderCanvas:o}},46161:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(91296),c=t(70554),o=function(r,n,e,i){e.addToRenderList(n);var h=r.pipelines.set(n.pipeline),s=a(n,e,i),l=h.calcMatrix.copyFrom(s.calc);l.translate(-n._displayOriginX,-n._displayOriginY);var f=e.alpha*n.alpha,u=n.width,d=n.height,p=n.cellWidth,g=n.cellHeight,y=Math.ceil(u/p),x=Math.ceil(d/g),T=p,S=g,M=p-(y*p-u),w=g-(x*g-d),L,F,O=n.showCells,b=n.showAltCells,N=n.showOutline,V=0,K=0,$=0,j=0,X=0;if(N&&(T--,S--,M===p&&M--,w===g&&w--),r.pipelines.preBatch(n),O&&n.fillAlpha>0)for(L=h.fillTint,F=c.getTintAppendFloatAlpha(n.fillColor,n.fillAlpha*f),L.TL=F,L.TR=F,L.BL=F,L.BR=F,K=0;K0)for(L=h.fillTint,F=c.getTintAppendFloatAlpha(n.altFillColor,n.altFillAlpha*f),L.TL=F,L.TR=F,L.BL=F,L.BR=F,K=0;K0){var Y=h.strokeTint,D=c.getTintAppendFloatAlpha(n.outlineFillColor,n.outlineFillAlpha*f);for(Y.TL=D,Y.TR=D,Y.BL=D,Y.BR=D,V=1;V{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(99651),c=t(83419),o=t(17803),r=new c({Extends:o,Mixins:[a],initialize:function(e,i,h,s,l,f,u,d){i===void 0&&(i=0),h===void 0&&(h=0),s===void 0&&(s=48),l===void 0&&(l=32),f===void 0&&(f=15658734),u===void 0&&(u=10066329),d===void 0&&(d=13421772),o.call(this,e,"IsoBox",null),this.projection=4,this.fillTop=f,this.fillLeft=u,this.fillRight=d,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isFilled=!0,this.setPosition(i,h),this.setSize(s,l),this.updateDisplayOrigin()},setProjection:function(n){return this.projection=n,this},setFaces:function(n,e,i){return n===void 0&&(n=!0),e===void 0&&(e=!0),i===void 0&&(i=!0),this.showTop=n,this.showLeft=e,this.showRight=i,this},setFillStyle:function(n,e,i){return this.fillTop=n,this.fillLeft=e,this.fillRight=i,this.isFilled=!0,this}});v.exports=r},11508:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(65960),c=t(20926),o=function(r,n,e,i){e.addToRenderList(n);var h=r.currentContext;if(c(r,h,n,e,i)&&n.isFilled){var s=n.width,l=n.height,f=s/2,u=s/n.projection;n.showTop&&(a(h,n,n.fillTop),h.beginPath(),h.moveTo(-f,-l),h.lineTo(0,-u-l),h.lineTo(f,-l),h.lineTo(f,-1),h.lineTo(0,u-1),h.lineTo(-f,-1),h.lineTo(-f,-l),h.fill()),n.showLeft&&(a(h,n,n.fillLeft),h.beginPath(),h.moveTo(-f,0),h.lineTo(0,u),h.lineTo(0,u-l),h.lineTo(-f,-l),h.lineTo(-f,0),h.fill()),n.showRight&&(a(h,n,n.fillRight),h.beginPath(),h.moveTo(f,0),h.lineTo(0,u),h.lineTo(0,u-l),h.lineTo(f,-l),h.lineTo(f,0),h.fill()),h.restore()}};v.exports=o},3933:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(39429),c=t(61475);a.register("isobox",function(o,r,n,e,i,h,s){return this.displayList.add(new c(this.scene,o,r,n,e,i,h,s))})},99651:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),c=a,o=a;c=t(68149),o=t(11508),v.exports={renderWebGL:c,renderCanvas:o}},68149:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(91296),c=t(70554),o=function(r,n,e,i){e.addToRenderList(n);var h=r.pipelines.set(n.pipeline),s=a(n,e,i),l=h.calcMatrix.copyFrom(s.calc),f=n.width,u=n.height,d=f/2,p=f/n.projection,g=e.alpha*n.alpha;if(n.isFilled){var y,x,T,S,M,w,L,F,O;r.pipelines.preBatch(n),n.showTop&&(y=c.getTintAppendFloatAlpha(n.fillTop,g),x=l.getX(-d,-u),T=l.getY(-d,-u),S=l.getX(0,-p-u),M=l.getY(0,-p-u),w=l.getX(d,-u),L=l.getY(d,-u),F=l.getX(0,p-u),O=l.getY(0,p-u),h.batchQuad(n,x,T,S,M,w,L,F,O,0,0,1,1,y,y,y,y,2)),n.showLeft&&(y=c.getTintAppendFloatAlpha(n.fillLeft,g),x=l.getX(-d,0),T=l.getY(-d,0),S=l.getX(0,p),M=l.getY(0,p),w=l.getX(0,p-u),L=l.getY(0,p-u),F=l.getX(-d,-u),O=l.getY(-d,-u),h.batchQuad(n,x,T,S,M,w,L,F,O,0,0,1,1,y,y,y,y,2)),n.showRight&&(y=c.getTintAppendFloatAlpha(n.fillRight,g),x=l.getX(d,0),T=l.getY(d,0),S=l.getX(0,p),M=l.getY(0,p),w=l.getX(0,p-u),L=l.getY(0,p-u),F=l.getX(d,-u),O=l.getY(d,-u),h.batchQuad(n,x,T,S,M,w,L,F,O,0,0,1,1,y,y,y,y,2)),r.pipelines.postBatch(n)}};v.exports=o},16933:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(60561),o=t(17803),r=new a({Extends:o,Mixins:[c],initialize:function(e,i,h,s,l,f,u,d,p){i===void 0&&(i=0),h===void 0&&(h=0),s===void 0&&(s=48),l===void 0&&(l=32),f===void 0&&(f=!1),u===void 0&&(u=15658734),d===void 0&&(d=10066329),p===void 0&&(p=13421772),o.call(this,e,"IsoTriangle",null),this.projection=4,this.fillTop=u,this.fillLeft=d,this.fillRight=p,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isReversed=f,this.isFilled=!0,this.setPosition(i,h),this.setSize(s,l),this.updateDisplayOrigin()},setProjection:function(n){return this.projection=n,this},setReversed:function(n){return this.isReversed=n,this},setFaces:function(n,e,i){return n===void 0&&(n=!0),e===void 0&&(e=!0),i===void 0&&(i=!0),this.showTop=n,this.showLeft=e,this.showRight=i,this},setFillStyle:function(n,e,i){return this.fillTop=n,this.fillLeft=e,this.fillRight=i,this.isFilled=!0,this}});v.exports=r},79590:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(65960),c=t(20926),o=function(r,n,e,i){e.addToRenderList(n);var h=r.currentContext;if(c(r,h,n,e,i)&&n.isFilled){var s=n.width,l=n.height,f=s/2,u=s/n.projection,d=n.isReversed;n.showTop&&d&&(a(h,n,n.fillTop),h.beginPath(),h.moveTo(-f,-l),h.lineTo(0,-u-l),h.lineTo(f,-l),h.lineTo(0,u-l),h.fill()),n.showLeft&&(a(h,n,n.fillLeft),h.beginPath(),d?(h.moveTo(-f,-l),h.lineTo(0,u),h.lineTo(0,u-l)):(h.moveTo(-f,0),h.lineTo(0,u),h.lineTo(0,u-l)),h.fill()),n.showRight&&(a(h,n,n.fillRight),h.beginPath(),d?(h.moveTo(f,-l),h.lineTo(0,u),h.lineTo(0,u-l)):(h.moveTo(f,0),h.lineTo(0,u),h.lineTo(0,u-l)),h.fill()),h.restore()}};v.exports=o},49803:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(39429),c=t(16933);a.register("isotriangle",function(o,r,n,e,i,h,s,l){return this.displayList.add(new c(this.scene,o,r,n,e,i,h,s,l))})},60561:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),c=a,o=a;c=t(51503),o=t(79590),v.exports={renderWebGL:c,renderCanvas:o}},51503:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(91296),c=t(70554),o=function(r,n,e,i){e.addToRenderList(n);var h=r.pipelines.set(n.pipeline),s=a(n,e,i),l=h.calcMatrix.copyFrom(s.calc),f=n.width,u=n.height,d=f/2,p=f/n.projection,g=n.isReversed,y=e.alpha*n.alpha;if(n.isFilled){r.pipelines.preBatch(n);var x,T,S,M,w,L,F;if(n.showTop&&g){x=c.getTintAppendFloatAlpha(n.fillTop,y),T=l.getX(-d,-u),S=l.getY(-d,-u),M=l.getX(0,-p-u),w=l.getY(0,-p-u),L=l.getX(d,-u),F=l.getY(d,-u);var O=l.getX(0,p-u),b=l.getY(0,p-u);h.batchQuad(n,T,S,M,w,L,F,O,b,0,0,1,1,x,x,x,x,2)}n.showLeft&&(x=c.getTintAppendFloatAlpha(n.fillLeft,y),g?(T=l.getX(-d,-u),S=l.getY(-d,-u),M=l.getX(0,p),w=l.getY(0,p),L=l.getX(0,p-u),F=l.getY(0,p-u)):(T=l.getX(-d,0),S=l.getY(-d,0),M=l.getX(0,p),w=l.getY(0,p),L=l.getX(0,p-u),F=l.getY(0,p-u)),h.batchTri(n,T,S,M,w,L,F,0,0,1,1,x,x,x,2)),n.showRight&&(x=c.getTintAppendFloatAlpha(n.fillRight,y),g?(T=l.getX(d,-u),S=l.getY(d,-u),M=l.getX(0,p),w=l.getY(0,p),L=l.getX(0,p-u),F=l.getY(0,p-u)):(T=l.getX(d,0),S=l.getY(d,0),M=l.getX(0,p),w=l.getY(0,p),L=l.getX(0,p-u),F=l.getY(0,p-u)),h.batchTri(n,T,S,M,w,L,F,0,0,1,1,x,x,x,2)),r.pipelines.postBatch(n)}};v.exports=o},57847:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(17803),o=t(23031),r=t(36823),n=new a({Extends:c,Mixins:[r],initialize:function(i,h,s,l,f,u,d,p,g){h===void 0&&(h=0),s===void 0&&(s=0),l===void 0&&(l=0),f===void 0&&(f=0),u===void 0&&(u=128),d===void 0&&(d=0),c.call(this,i,"Line",new o(l,f,u,d));var y=Math.max(1,this.geom.right-this.geom.left),x=Math.max(1,this.geom.bottom-this.geom.top);this.lineWidth=1,this._startWidth=1,this._endWidth=1,this.setPosition(h,s),this.setSize(y,x),p!==void 0&&this.setStrokeStyle(1,p,g),this.updateDisplayOrigin()},setLineWidth:function(e,i){return i===void 0&&(i=e),this._startWidth=e,this._endWidth=i,this.lineWidth=e,this},setTo:function(e,i,h,s){return this.geom.setTo(e,i,h,s),this}});v.exports=n},17440:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(75177),c=t(20926),o=function(r,n,e,i){e.addToRenderList(n);var h=r.currentContext;if(c(r,h,n,e,i)){var s=n._displayOriginX,l=n._displayOriginY;n.isStroked&&(a(h,n),h.beginPath(),h.moveTo(n.geom.x1-s,n.geom.y1-l),h.lineTo(n.geom.x2-s,n.geom.y2-l),h.stroke()),h.restore()}};v.exports=o},2481:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(39429),c=t(57847);a.register("line",function(o,r,n,e,i,h,s,l){return this.displayList.add(new c(this.scene,o,r,n,e,i,h,s,l))})},36823:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),c=a,o=a;c=t(77385),o=t(17440),v.exports={renderWebGL:c,renderCanvas:o}},77385:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(91296),c=t(70554),o=function(r,n,e,i){e.addToRenderList(n);var h=r.pipelines.set(n.pipeline),s=a(n,e,i);h.calcMatrix.copyFrom(s.calc);var l=n._displayOriginX,f=n._displayOriginY,u=e.alpha*n.alpha;if(r.pipelines.preBatch(n),n.isStroked){var d=h.strokeTint,p=c.getTintAppendFloatAlpha(n.strokeColor,n.strokeAlpha*u);d.TL=p,d.TR=p,d.BL=p,d.BR=p,h.batchLine(n.geom.x1-l,n.geom.y1-f,n.geom.x2-l,n.geom.y2-f,n._startWidth/2,n._endWidth/2,1,0,!1,s.sprite,s.camera)}r.pipelines.postBatch(n)};v.exports=o},24949:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(90273),c=t(83419),o=t(94811),r=t(13829),n=t(25717),e=t(17803),i=t(5469),h=new c({Extends:e,Mixins:[a],initialize:function(l,f,u,d,p,g){f===void 0&&(f=0),u===void 0&&(u=0),e.call(this,l,"Polygon",new n(d));var y=r(this.geom);this.setPosition(f,u),this.setSize(y.width,y.height),p!==void 0&&this.setFillStyle(p,g),this.updateDisplayOrigin(),this.updateData()},smooth:function(s){s===void 0&&(s=1);for(var l=0;l{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(65960),c=t(75177),o=t(20926),r=function(n,e,i,h){i.addToRenderList(e);var s=n.currentContext;if(o(n,s,e,i,h)){var l=e._displayOriginX,f=e._displayOriginY,u=e.pathData,d=u.length-1,p=u[0]-l,g=u[1]-f;s.beginPath(),s.moveTo(p,g),e.closePath||(d-=2);for(var y=2;y{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(39429),c=t(24949);a.register("polygon",function(o,r,n,e,i){return this.displayList.add(new c(this.scene,o,r,n,e,i))})},90273:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),c=a,o=a;c=t(73695),o=t(38710),v.exports={renderWebGL:c,renderCanvas:o}},73695:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(10441),c=t(91296),o=t(34682),r=function(n,e,i,h){i.addToRenderList(e);var s=n.pipelines.set(e.pipeline),l=c(e,i,h),f=s.calcMatrix.copyFrom(l.calc),u=e._displayOriginX,d=e._displayOriginY,p=i.alpha*e.alpha;n.pipelines.preBatch(e),e.isFilled&&a(s,f,e,p,u,d),e.isStroked&&o(s,e,p,u,d),n.pipelines.postBatch(e)};v.exports=r},74561:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(87841),o=t(17803),r=t(95597),n=new a({Extends:o,Mixins:[r],initialize:function(i,h,s,l,f,u,d){h===void 0&&(h=0),s===void 0&&(s=0),l===void 0&&(l=128),f===void 0&&(f=128),o.call(this,i,"Rectangle",new c(0,0,l,f)),this.setPosition(h,s),this.setSize(l,f),u!==void 0&&this.setFillStyle(u,d),this.updateDisplayOrigin(),this.updateData()},setSize:function(e,i){this.width=e,this.height=i,this.geom.setSize(e,i),this.updateData(),this.updateDisplayOrigin();var h=this.input;return h&&!h.customHitArea&&(h.hitArea.width=e,h.hitArea.height=i),this},updateData:function(){var e=[],i=this.geom,h=this._tempLine;return i.getLineA(h),e.push(h.x1,h.y1,h.x2,h.y2),i.getLineB(h),e.push(h.x2,h.y2),i.getLineC(h),e.push(h.x2,h.y2),i.getLineD(h),e.push(h.x2,h.y2),this.pathData=e,this}});v.exports=n},48682:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(65960),c=t(75177),o=t(20926),r=function(n,e,i,h){i.addToRenderList(e);var s=n.currentContext;if(o(n,s,e,i,h)){var l=e._displayOriginX,f=e._displayOriginY;e.isFilled&&(a(s,e),s.fillRect(-l,-f,e.width,e.height)),e.isStroked&&(c(s,e),s.beginPath(),s.rect(-l,-f,e.width,e.height),s.stroke()),s.restore()}};v.exports=r},87959:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(39429),c=t(74561);a.register("rectangle",function(o,r,n,e,i,h){return this.displayList.add(new c(this.scene,o,r,n,e,i,h))})},95597:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),c=a,o=a;c=t(52059),o=t(48682),v.exports={renderWebGL:c,renderCanvas:o}},52059:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(91296),c=t(34682),o=t(70554),r=function(n,e,i,h){i.addToRenderList(e);var s=n.pipelines.set(e.pipeline),l=a(e,i,h);s.calcMatrix.copyFrom(l.calc);var f=e._displayOriginX,u=e._displayOriginY,d=i.alpha*e.alpha;if(n.pipelines.preBatch(e),e.isFilled){var p=s.fillTint,g=o.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*d);p.TL=g,p.TR=g,p.BL=g,p.BR=g,s.batchFillRect(-f,-u,e.width,e.height)}e.isStroked&&c(s,e,d,f,u),n.pipelines.postBatch(e)};v.exports=r},55911:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(81991),c=t(83419),o=t(94811),r=t(17803),n=new c({Extends:r,Mixins:[a],initialize:function(i,h,s,l,f,u,d,p){h===void 0&&(h=0),s===void 0&&(s=0),l===void 0&&(l=5),f===void 0&&(f=32),u===void 0&&(u=64),r.call(this,i,"Star",null),this._points=l,this._innerRadius=f,this._outerRadius=u,this.setPosition(h,s),this.setSize(u*2,u*2),d!==void 0&&this.setFillStyle(d,p),this.updateDisplayOrigin(),this.updateData()},setPoints:function(e){return this._points=e,this.updateData()},setInnerRadius:function(e){return this._innerRadius=e,this.updateData()},setOuterRadius:function(e){return this._outerRadius=e,this.updateData()},points:{get:function(){return this._points},set:function(e){this._points=e,this.updateData()}},innerRadius:{get:function(){return this._innerRadius},set:function(e){this._innerRadius=e,this.updateData()}},outerRadius:{get:function(){return this._outerRadius},set:function(e){this._outerRadius=e,this.updateData()}},updateData:function(){var e=[],i=this._points,h=this._innerRadius,s=this._outerRadius,l=Math.PI/2*3,f=Math.PI/i,u=s,d=s;e.push(u,d+-s);for(var p=0;p{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(65960),c=t(75177),o=t(20926),r=function(n,e,i,h){i.addToRenderList(e);var s=n.currentContext;if(o(n,s,e,i,h)){var l=e._displayOriginX,f=e._displayOriginY,u=e.pathData,d=u.length-1,p=u[0]-l,g=u[1]-f;s.beginPath(),s.moveTo(p,g),e.closePath||(d-=2);for(var y=2;y{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(55911),c=t(39429);c.register("star",function(o,r,n,e,i,h,s){return this.displayList.add(new a(this.scene,o,r,n,e,i,h,s))})},81991:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),c=a,o=a;c=t(57017),o=t(64272),v.exports={renderWebGL:c,renderCanvas:o}},57017:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(10441),c=t(91296),o=t(34682),r=function(n,e,i,h){i.addToRenderList(e);var s=n.pipelines.set(e.pipeline),l=c(e,i,h),f=s.calcMatrix.copyFrom(l.calc),u=e._displayOriginX,d=e._displayOriginY,p=i.alpha*e.alpha;n.pipelines.preBatch(e),e.isFilled&&a(s,f,e,p,u,d),e.isStroked&&o(s,e,p,u,d),n.pipelines.postBatch(e)};v.exports=r},36931:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(17803),o=t(16483),r=t(96195),n=new a({Extends:c,Mixins:[r],initialize:function(i,h,s,l,f,u,d,p,g,y,x){h===void 0&&(h=0),s===void 0&&(s=0),l===void 0&&(l=0),f===void 0&&(f=128),u===void 0&&(u=64),d===void 0&&(d=0),p===void 0&&(p=128),g===void 0&&(g=128),c.call(this,i,"Triangle",new o(l,f,u,d,p,g));var T=this.geom.right-this.geom.left,S=this.geom.bottom-this.geom.top;this.setPosition(h,s),this.setSize(T,S),y!==void 0&&this.setFillStyle(y,x),this.updateDisplayOrigin(),this.updateData()},setTo:function(e,i,h,s,l,f){return this.geom.setTo(e,i,h,s,l,f),this.updateData()},updateData:function(){var e=[],i=this.geom,h=this._tempLine;return i.getLineA(h),e.push(h.x1,h.y1,h.x2,h.y2),i.getLineB(h),e.push(h.x2,h.y2),i.getLineC(h),e.push(h.x2,h.y2),this.pathData=e,this}});v.exports=n},85172:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(65960),c=t(75177),o=t(20926),r=function(n,e,i,h){i.addToRenderList(e);var s=n.currentContext;if(o(n,s,e,i,h)){var l=e._displayOriginX,f=e._displayOriginY,u=e.geom.x1-l,d=e.geom.y1-f,p=e.geom.x2-l,g=e.geom.y2-f,y=e.geom.x3-l,x=e.geom.y3-f;s.beginPath(),s.moveTo(u,d),s.lineTo(p,g),s.lineTo(y,x),s.closePath(),e.isFilled&&(a(s,e),s.fill()),e.isStroked&&(c(s,e),s.stroke()),s.restore()}};v.exports=r},45245:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(39429),c=t(36931);a.register("triangle",function(o,r,n,e,i,h,s,l,f,u){return this.displayList.add(new c(this.scene,o,r,n,e,i,h,s,l,f,u))})},96195:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),c=a,o=a;c=t(83253),o=t(85172),v.exports={renderWebGL:c,renderCanvas:o}},83253:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(91296),c=t(34682),o=t(70554),r=function(n,e,i,h){i.addToRenderList(e);var s=n.pipelines.set(e.pipeline),l=a(e,i,h);s.calcMatrix.copyFrom(l.calc);var f=e._displayOriginX,u=e._displayOriginY,d=i.alpha*e.alpha;if(n.pipelines.preBatch(e),e.isFilled){var p=s.fillTint,g=o.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*d);p.TL=g,p.TR=g,p.BL=g,p.BR=g;var y=e.geom.x1-f,x=e.geom.y1-u,T=e.geom.x2-f,S=e.geom.y2-u,M=e.geom.x3-f,w=e.geom.y3-u;s.batchFillTriangle(y,x,T,S,M,w,l.sprite,l.camera)}e.isStroked&&c(s,e,d,f,u),n.pipelines.postBatch(e)};v.exports=r},68287:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(9674),c=t(83419),o=t(31401),r=t(95643),n=t(92751),e=new c({Extends:r,Mixins:[o.Alpha,o.BlendMode,o.Depth,o.Flip,o.GetBounds,o.Mask,o.Origin,o.Pipeline,o.PostPipeline,o.ScrollFactor,o.Size,o.TextureCrop,o.Tint,o.Transform,o.Visible,n],initialize:function(h,s,l,f,u){r.call(this,h,"Sprite"),this._crop=this.resetCropObject(),this.anims=new a(this),this.setTexture(f,u),this.setPosition(s,l),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline(),this.initPostPipeline(!0)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(i,h){this.anims.update(i,h)},play:function(i,h){return this.anims.play(i,h)},playReverse:function(i,h){return this.anims.playReverse(i,h)},playAfterDelay:function(i,h){return this.anims.playAfterDelay(i,h)},playAfterRepeat:function(i,h){return this.anims.playAfterRepeat(i,h)},chain:function(i){return this.anims.chain(i)},stop:function(){return this.anims.stop()},stopAfterDelay:function(i){return this.anims.stopAfterDelay(i)},stopAfterRepeat:function(i){return this.anims.stopAfterRepeat(i)},stopOnFrame:function(i){return this.anims.stopOnFrame(i)},toJSON:function(){return o.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}});v.exports=e},76552:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c,o){c.addToRenderList(a),t.batchSprite(a,a.frame,c,o)};v.exports=m},15567:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(25305),c=t(13059),o=t(44603),r=t(23568),n=t(68287);o.register("sprite",function(e,i){e===void 0&&(e={});var h=r(e,"key",null),s=r(e,"frame",null),l=new n(this.scene,0,0,h,s);return i!==void 0&&(e.add=i),a(this.scene,l,e),c(l,e),l})},46409:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(39429),c=t(68287);a.register("sprite",function(o,r,n,e){return this.displayList.add(new c(this.scene,o,r,n,e))})},92751:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),c=a,o=a;c=t(9409),o=t(76552),v.exports={renderWebGL:c,renderCanvas:o}},9409:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c,o){c.addToRenderList(a),a.pipeline.batchSprite(a,c,o)};v.exports=m},14220:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){var o=t.canvas,r=t.context,n=t.style,e=[],i=0,h=c.length;n.maxLines>0&&n.maxLines1&&(l+=t.letterSpacing*(c[s].length-1)),n.wordWrap&&(l-=r.measureText(" ").width),e[s]=Math.ceil(l),i=Math.max(i,e[s])}var f=a.fontSize+n.strokeThickness,u=f*h,d=t.lineSpacing;return h>1&&(u+=d*(h-1)),{width:i,height:u,lines:h,lineWidths:e,lineSpacing:d,lineHeight:f}};v.exports=m},79557:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(27919),c=function(o){var r=a.create(this),n=r.getContext("2d",{willReadFrequently:!0});o.syncFont(r,n);var e=n.measureText(o.testString);if("actualBoundingBoxAscent"in e){var i=e.actualBoundingBoxAscent,h=e.actualBoundingBoxDescent;return a.remove(r),{ascent:i,descent:h,fontSize:i+h}}var s=Math.ceil(e.width*o.baselineX),l=s,f=2*l;l=l*o.baselineY|0,r.width=s,r.height=f,n.fillStyle="#f00",n.fillRect(0,0,s,f),n.font=o._font,n.textBaseline="alphabetic",n.fillStyle="#000",n.fillText(o.testString,0,l);var u={ascent:0,descent:0,fontSize:0},d=n.getImageData(0,0,s,f);if(!d)return u.ascent=l,u.descent=l+6,u.fontSize=u.ascent+u.descent,a.remove(r),u;var p=d.data,g=p.length,y=s*4,x,T,S=0,M=!1;for(x=0;xl;x--){for(T=0;T{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(40366),c=t(27919),o=t(83419),r=t(31401),n=t(95643),e=t(14220),i=t(35154),h=t(35846),s=t(61771),l=t(35762),f=t(45650),u=new o({Extends:n,Mixins:[r.Alpha,r.BlendMode,r.ComputedSize,r.Crop,r.Depth,r.Flip,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.PostPipeline,r.ScrollFactor,r.Tint,r.Transform,r.Visible,s],initialize:function(p,g,y,x,T){g===void 0&&(g=0),y===void 0&&(y=0),n.call(this,p,"Text"),this.renderer=p.sys.renderer,this.setPosition(g,y),this.setOrigin(0,0),this.initPipeline(),this.initPostPipeline(!0),this.canvas=c.create(this),this.context,this.style=new l(this,T),this.autoRound=!0,this.splitRegExp=/(?:\r\n|\r|\n)/,this._text=void 0,this.padding={left:0,right:0,top:0,bottom:0},this.width=1,this.height=1,this.lineSpacing=0,this.letterSpacing=0,this.style.resolution===0&&(this.style.resolution=1),this._crop=this.resetCropObject(),this._textureKey=f(),this.texture=p.sys.textures.addCanvas(this._textureKey,this.canvas),this.context=this.texture.context,this.frame=this.texture.get(),this.frame.source.resolution=this.style.resolution,this.renderer&&this.renderer.gl&&(this.renderer.deleteTexture(this.frame.source.glTexture),this.frame.source.glTexture=null),this.initRTL(),this.setText(x),T&&T.padding&&this.setPadding(T.padding),T&&T.lineSpacing&&this.setLineSpacing(T.lineSpacing)},initRTL:function(){this.style.rtl&&(this.canvas.dir="rtl",this.context.direction="rtl",this.canvas.style.display="none",a(this.canvas,this.scene.sys.canvas),this.originX=1)},runWordWrap:function(d){var p=this.style;if(p.wordWrapCallback){var g=p.wordWrapCallback.call(p.wordWrapCallbackScope,d,this);return Array.isArray(g)&&(g=g.join(` +`)),g}else return p.wordWrapWidth?p.wordWrapUseAdvanced?this.advancedWordWrap(d,this.context,this.style.wordWrapWidth):this.basicWordWrap(d,this.context,this.style.wordWrapWidth):d},advancedWordWrap:function(d,p,g){for(var y="",x=d.replace(/ +/gi," ").split(this.splitRegExp),T=x.length,S=0;SF){if(b===0){for(var $=V;$.length&&($=$.slice(0,-1),K=p.measureText($).width,!(K<=F)););if(!$.length)throw new Error("wordWrapWidth < a single character");var j=N.substr($.length);O[b]=j,w+=$}var X=O[b].length?b:b+1,Y=O.slice(X).join(" ").replace(/[ \n]*$/gi,"");x.splice(S+1,0,Y),T=x.length;break}else w+=V,F-=K}y+=w.replace(/[ \n]*$/gi,"")+` +`}return y=y.replace(/[\s|\n]*$/gi,""),y},basicWordWrap:function(d,p,g){for(var y="",x=d.split(this.splitRegExp),T=x.length-1,S=p.measureText(" ").width,M=0;M<=T;M++){for(var w=g,L=x[M].split(" "),F=L.length-1,O=0;O<=F;O++){var b=L[O],N=p.measureText(b).width,V=N;Ow&&O>0&&(y+=` +`,w=g),y+=b,O0&&(N+=M.lineSpacing*V),g.rtl)b=F-b-w.left-w.right;else if(g.align==="right")b+=L-M.lineWidths[V];else if(g.align==="center")b+=(L-M.lineWidths[V])/2;else if(g.align==="justify"){var K=.85;if(M.lineWidths[V]/M.width>=K){var $=M.width-M.lineWidths[V],j=p.measureText(" ").width,X=S[V].trim(),Y=X.split(" ");$+=(S[V].length-X.length)*j;for(var D=Math.floor($/j),z=0;D>0;)Y[z]+=" ",z=(z+1)%(Y.length-1||1),--D;S[V]=Y.join(" ")}}if(this.autoRound&&(b=Math.round(b),N=Math.round(N)),g.strokeThickness&&(g.syncShadow(p,g.shadowStroke),p.strokeText(S[V],b,N)),g.color){g.syncShadow(p,g.shadowFill);var W=this.letterSpacing;if(W!==0)for(var H=0,J=S[V].split(""),Q=0;Q{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c,o){a.width===0||a.height===0||(c.addToRenderList(a),t.batchSprite(a,a.frame,c,o))};v.exports=m},71259:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(25305),c=t(44603),o=t(23568),r=t(50171);c.register("text",function(n,e){n===void 0&&(n={});var i=o(n,"text",""),h=o(n,"style",null),s=o(n,"padding",null);s!==null&&(h.padding=s);var l=new r(this.scene,0,0,i,h);return e!==void 0&&(n.add=e),a(this.scene,l,n),l.autoRound=o(n,"autoRound",!0),l.resolution=o(n,"resolution",1),l})},68005:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(50171),c=t(39429);c.register("text",function(o,r,n,e){return this.displayList.add(new a(this.scene,o,r,n,e))})},61771:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),c=a,o=a;c=t(34397),o=t(79724),v.exports={renderWebGL:c,renderCanvas:o}},35762:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(23568),o=t(35154),r=t(79557),n={fontFamily:["fontFamily","Courier"],fontSize:["fontSize","16px"],fontStyle:["fontStyle",""],backgroundColor:["backgroundColor",null],color:["color","#fff"],stroke:["stroke","#fff"],strokeThickness:["strokeThickness",0],shadowOffsetX:["shadow.offsetX",0],shadowOffsetY:["shadow.offsetY",0],shadowColor:["shadow.color","#000"],shadowBlur:["shadow.blur",0],shadowStroke:["shadow.stroke",!1],shadowFill:["shadow.fill",!1],align:["align","left"],maxLines:["maxLines",0],fixedWidth:["fixedWidth",0],fixedHeight:["fixedHeight",0],resolution:["resolution",0],rtl:["rtl",!1],testString:["testString","|MÉqgy"],baselineX:["baselineX",1.2],baselineY:["baselineY",1.4],wordWrapWidth:["wordWrap.width",null],wordWrapCallback:["wordWrap.callback",null],wordWrapCallbackScope:["wordWrap.callbackScope",null],wordWrapUseAdvanced:["wordWrap.useAdvancedWrap",!1]},e=new a({initialize:function(h,s){this.parent=h,this.fontFamily,this.fontSize,this.fontStyle,this.backgroundColor,this.color,this.stroke,this.strokeThickness,this.shadowOffsetX,this.shadowOffsetY,this.shadowColor,this.shadowBlur,this.shadowStroke,this.shadowFill,this.align,this.maxLines,this.fixedWidth,this.fixedHeight,this.resolution,this.rtl,this.testString,this.baselineX,this.baselineY,this.wordWrapWidth,this.wordWrapCallback,this.wordWrapCallbackScope,this.wordWrapUseAdvanced,this._font,this.setStyle(s,!1,!0)},setStyle:function(i,h,s){h===void 0&&(h=!0),s===void 0&&(s=!1),i&&i.hasOwnProperty("fontSize")&&typeof i.fontSize=="number"&&(i.fontSize=i.fontSize.toString()+"px");for(var l in n){var f=s?n[l][1]:this[l];l==="wordWrapCallback"||l==="wordWrapCallbackScope"?this[l]=o(i,n[l][0],f):this[l]=c(i,n[l][0],f)}var u=o(i,"font",null);u!==null&&this.setFont(u,!1),this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim();var d=o(i,"fill",null);d!==null&&(this.color=d);var p=o(i,"metrics",!1);return p?this.metrics={ascent:o(p,"ascent",0),descent:o(p,"descent",0),fontSize:o(p,"fontSize",0)}:(h||!this.metrics)&&(this.metrics=r(this)),h?this.parent.updateText():this.parent},syncFont:function(i,h){h.font=this._font},syncStyle:function(i,h){h.textBaseline="alphabetic",h.fillStyle=this.color,h.strokeStyle=this.stroke,h.lineWidth=this.strokeThickness,h.lineCap="round",h.lineJoin="round"},syncShadow:function(i,h){h?(i.shadowOffsetX=this.shadowOffsetX,i.shadowOffsetY=this.shadowOffsetY,i.shadowColor=this.shadowColor,i.shadowBlur=this.shadowBlur):(i.shadowOffsetX=0,i.shadowOffsetY=0,i.shadowColor=0,i.shadowBlur=0)},update:function(i){return i&&(this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim(),this.metrics=r(this)),this.parent.updateText()},setFont:function(i,h){h===void 0&&(h=!0);var s=i,l="",f="";if(typeof i!="string")s=o(i,"fontFamily","Courier"),l=o(i,"fontSize","16px"),f=o(i,"fontStyle","");else{var u=i.split(" "),d=0;f=u.length>2?u[d++]:"",l=u[d++]||"16px",s=u[d++]||"Courier"}return(s!==this.fontFamily||l!==this.fontSize||f!==this.fontStyle)&&(this.fontFamily=s,this.fontSize=l,this.fontStyle=f,h&&this.update(!0)),this.parent},setFontFamily:function(i){return this.fontFamily!==i&&(this.fontFamily=i,this.update(!0)),this.parent},setFontStyle:function(i){return this.fontStyle!==i&&(this.fontStyle=i,this.update(!0)),this.parent},setFontSize:function(i){return typeof i=="number"&&(i=i.toString()+"px"),this.fontSize!==i&&(this.fontSize=i,this.update(!0)),this.parent},setTestString:function(i){return this.testString=i,this.update(!0)},setFixedSize:function(i,h){return this.fixedWidth=i,this.fixedHeight=h,i&&(this.parent.width=i),h&&(this.parent.height=h),this.update(!1)},setBackgroundColor:function(i){return this.backgroundColor=i,this.update(!1)},setFill:function(i){return this.color=i,this.update(!1)},setColor:function(i){return this.color=i,this.update(!1)},setResolution:function(i){return this.resolution=i,this.update(!1)},setStroke:function(i,h){return h===void 0&&(h=this.strokeThickness),i===void 0&&this.strokeThickness!==0?(this.strokeThickness=0,this.update(!0)):(this.stroke!==i||this.strokeThickness!==h)&&(this.stroke=i,this.strokeThickness=h,this.update(!0)),this.parent},setShadow:function(i,h,s,l,f,u){return i===void 0&&(i=0),h===void 0&&(h=0),s===void 0&&(s="#000"),l===void 0&&(l=0),f===void 0&&(f=!1),u===void 0&&(u=!0),this.shadowOffsetX=i,this.shadowOffsetY=h,this.shadowColor=s,this.shadowBlur=l,this.shadowStroke=f,this.shadowFill=u,this.update(!1)},setShadowOffset:function(i,h){return i===void 0&&(i=0),h===void 0&&(h=i),this.shadowOffsetX=i,this.shadowOffsetY=h,this.update(!1)},setShadowColor:function(i){return i===void 0&&(i="#000"),this.shadowColor=i,this.update(!1)},setShadowBlur:function(i){return i===void 0&&(i=0),this.shadowBlur=i,this.update(!1)},setShadowStroke:function(i){return this.shadowStroke=i,this.update(!1)},setShadowFill:function(i){return this.shadowFill=i,this.update(!1)},setWordWrapWidth:function(i,h){return h===void 0&&(h=!1),this.wordWrapWidth=i,this.wordWrapUseAdvanced=h,this.update(!1)},setWordWrapCallback:function(i,h){return h===void 0&&(h=null),this.wordWrapCallback=i,this.wordWrapCallbackScope=h,this.update(!1)},setAlign:function(i){return i===void 0&&(i="left"),this.align=i,this.update(!1)},setMaxLines:function(i){return i===void 0&&(i=0),this.maxLines=i,this.update(!1)},getTextMetrics:function(){var i=this.metrics;return{ascent:i.ascent,descent:i.descent,fontSize:i.fontSize}},toJSON:function(){var i={};for(var h in n)i[h]=this[h];return i.metrics=this.getTextMetrics(),i},destroy:function(){this.parent=void 0}});v.exports=e},34397:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(70554),c=function(o,r,n,e){if(!(r.width===0||r.height===0)){n.addToRenderList(r);var i=r.frame,h=i.width,s=i.height,l=a.getTintAppendFloatAlpha,f=o.pipelines.set(r.pipeline,r),u=f.setTexture2D(i.glTexture,r);f.batchTexture(r,i.glTexture,h,s,r.x,r.y,h/r.style.resolution,s/r.style.resolution,r.scaleX,r.scaleY,r.rotation,r.flipX,r.flipY,r.scrollFactorX,r.scrollFactorY,r.displayOriginX,r.displayOriginY,0,0,h,s,l(r.tintTopLeft,n.alpha*r._alphaTL),l(r.tintTopRight,n.alpha*r._alphaTR),l(r.tintBottomLeft,n.alpha*r._alphaBL),l(r.tintBottomRight,n.alpha*r._alphaBR),r.tintFill,0,0,n,e,!1,u)}};v.exports=c},20839:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(27919),c=t(83419),o=t(31401),r=t(95643),n=t(98439),e=t(68703),i=t(56295),h=t(45650),s=t(26099),l=8,f=new c({Extends:r,Mixins:[o.Alpha,o.BlendMode,o.ComputedSize,o.Crop,o.Depth,o.Flip,o.GetBounds,o.Mask,o.Origin,o.Pipeline,o.PostPipeline,o.ScrollFactor,o.Tint,o.Transform,o.Visible,i],initialize:function(d,p,g,y,x,T,S){var M=d.sys.renderer;r.call(this,d,"TileSprite");var w=d.sys.textures.get(T),L=w.get(S);L.source.compressionAlgorithm&&(console.warn("TileSprite cannot use compressed texture"),w=d.sys.textures.get("__MISSING"),L=w.get()),w.type==="DynamicTexture"&&(console.warn("TileSprite cannot use Dynamic Texture"),w=d.sys.textures.get("__MISSING"),L=w.get()),!y||!x?(y=L.width,x=L.height):(y=Math.floor(y),x=Math.floor(x)),this._tilePosition=new s,this._tileScale=new s(1,1),this.dirty=!1,this.renderer=M,this.canvas=a.create(this,y,x),this.context=this.canvas.getContext("2d",{willReadFrequently:!1}),this.displayTexture=w,this.displayFrame=L,this._crop=this.resetCropObject(),this._textureKey=h(),this.texture=d.sys.textures.addCanvas(this._textureKey,this.canvas),this.frame=this.texture.get(),this.potWidth=n(L.width),this.potHeight=n(L.height),this.fillCanvas=a.create2D(this,this.potWidth,this.potHeight),this.fillContext=this.fillCanvas.getContext("2d",{willReadFrequently:!1}),this.fillPattern=null,this.setPosition(p,g),this.setSize(y,x),this.setFrame(S),this.setOriginFromFrame(),this.initPipeline(),this.initPostPipeline(!0)},setTexture:function(u,d){return this.displayTexture=this.scene.sys.textures.get(u),this.setFrame(d)},setFrame:function(u){var d=this.displayTexture.get(u);return this.potWidth=n(d.width),this.potHeight=n(d.height),this.canvas.width=0,!d.cutWidth||!d.cutHeight?this.renderFlags&=~l:this.renderFlags|=l,this.displayFrame=d,this.dirty=!0,this.updateTileTexture(),this},setTilePosition:function(u,d){return u!==void 0&&(this.tilePositionX=u),d!==void 0&&(this.tilePositionY=d),this},setTileScale:function(u,d){return u===void 0&&(u=this.tileScaleX),d===void 0&&(d=u),this.tileScaleX=u,this.tileScaleY=d,this},updateTileTexture:function(){if(!(!this.dirty||!this.renderer)){var u=this.displayFrame;if(u.source.isRenderTexture||u.source.isGLTexture){console.warn("TileSprites can only use Image or Canvas based textures"),this.dirty=!1;return}var d=this.fillContext,p=this.fillCanvas,g=this.potWidth,y=this.potHeight;(!this.renderer||!this.renderer.gl)&&(g=u.cutWidth,y=u.cutHeight),d.clearRect(0,0,g,y),p.width=g,p.height=y,d.drawImage(u.source.image,u.cutX,u.cutY,u.cutWidth,u.cutHeight,0,0,g,y),this.renderer&&this.renderer.gl?this.fillPattern=this.renderer.canvasToTexture(p,this.fillPattern):this.fillPattern=d.createPattern(p,"repeat"),this.updateCanvas(),this.dirty=!1}},updateCanvas:function(){var u=this.canvas;if((u.width!==this.width||u.height!==this.height)&&(u.width=this.width,u.height=this.height,this.frame.setSize(this.width,this.height),this.updateDisplayOrigin(),this.dirty=!0),!this.dirty||this.renderer&&this.renderer.gl){this.dirty=!1;return}var d=this.context;this.scene.sys.game.config.antialias||e.disable(d);var p=this._tileScale.x,g=this._tileScale.y,y=this._tilePosition.x,x=this._tilePosition.y;d.clearRect(0,0,this.width,this.height),d.save(),d.scale(p,g),d.translate(-y,-x),d.fillStyle=this.fillPattern,d.fillRect(y,x,this.width/p,this.height/g),d.restore(),this.dirty=!1},preDestroy:function(){this.renderer&&this.renderer.gl&&this.renderer.deleteTexture(this.fillPattern),a.remove(this.canvas),a.remove(this.fillCanvas),this.fillPattern=null,this.fillContext=null,this.fillCanvas=null,this.displayTexture=null,this.displayFrame=null;var u=this.texture;u&&u.destroy(),this.renderer=null},tilePositionX:{get:function(){return this._tilePosition.x},set:function(u){this._tilePosition.x=u,this.dirty=!0}},tilePositionY:{get:function(){return this._tilePosition.y},set:function(u){this._tilePosition.y=u,this.dirty=!0}},tileScaleX:{get:function(){return this._tileScale.x},set:function(u){this._tileScale.x=u,this.dirty=!0}},tileScaleY:{get:function(){return this._tileScale.y},set:function(u){this._tileScale.y=u,this.dirty=!0}}});v.exports=f},46992:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c,o){a.updateCanvas(),c.addToRenderList(a),t.batchSprite(a,a.frame,c,o)};v.exports=m},14167:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(25305),c=t(44603),o=t(23568),r=t(20839);c.register("tileSprite",function(n,e){n===void 0&&(n={});var i=o(n,"x",0),h=o(n,"y",0),s=o(n,"width",512),l=o(n,"height",512),f=o(n,"key",""),u=o(n,"frame",""),d=new r(this.scene,i,h,s,l,f,u);return e!==void 0&&(n.add=e),a(this.scene,d,n),d})},91681:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(20839),c=t(39429);c.register("tileSprite",function(o,r,n,e,i,h){return this.displayList.add(new a(this.scene,o,r,n,e,i,h))})},56295:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),c=a,o=a;c=t(18553),o=t(46992),v.exports={renderWebGL:c,renderCanvas:o}},18553:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(70554),c=function(o,r,n,e){r.updateCanvas();var i=r.width,h=r.height;if(!(i===0||h===0)){n.addToRenderList(r);var s=a.getTintAppendFloatAlpha,l=o.pipelines.set(r.pipeline,r),f=l.setTexture2D(r.fillPattern,r);l.batchTexture(r,r.fillPattern,r.displayFrame.width*r.tileScaleX,r.displayFrame.height*r.tileScaleY,r.x,r.y,i,h,r.scaleX,r.scaleY,r.rotation,r.flipX,r.flipY,r.scrollFactorX,r.scrollFactorY,r.originX*i,r.originY*h,0,0,i,h,s(r.tintTopLeft,n.alpha*r._alphaTL),s(r.tintTopRight,n.alpha*r._alphaTR),s(r.tintBottomLeft,n.alpha*r._alphaBL),s(r.tintBottomRight,n.alpha*r._alphaBR),r.tintFill,r.tilePositionX%r.displayFrame.width/r.displayFrame.width,r.tilePositionY%r.displayFrame.height/r.displayFrame.height,n,e,!1,f)}};v.exports=c},18471:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(45319),c=t(83419),o=t(31401),r=t(51708),n=t(8443),e=t(95643),i=t(36383),h=t(14463),s=t(45650),l=t(10247),f=new c({Extends:e,Mixins:[o.Alpha,o.BlendMode,o.ComputedSize,o.Depth,o.Flip,o.GetBounds,o.Mask,o.Origin,o.Pipeline,o.PostPipeline,o.ScrollFactor,o.TextureCrop,o.Tint,o.Transform,o.Visible,l],initialize:function(d,p,g,y){e.call(this,d,"Video"),this.video,this.videoTexture,this.videoTextureSource,this.snapshotTexture,this.flipY=!1,this._key=s(),this.touchLocked=!1,this.playWhenUnlocked=!1,this.frameReady=!1,this.isStalled=!1,this.failedPlayAttempts=0,this.metadata,this.retry=0,this.retryInterval=500,this._systemMuted=!1,this._codeMuted=!1,this._systemPaused=!1,this._codePaused=!1,this._callbacks={ended:this.completeHandler.bind(this),legacy:this.legacyPlayHandler.bind(this),playing:this.playingHandler.bind(this),seeked:this.seekedHandler.bind(this),seeking:this.seekingHandler.bind(this),stalled:this.stalledHandler.bind(this),suspend:this.stalledHandler.bind(this),waiting:this.stalledHandler.bind(this)},this._loadCallbackHandler=this.loadErrorHandler.bind(this),this._metadataCallbackHandler=this.metadataHandler.bind(this),this._crop=this.resetCropObject(),this.markers={},this._markerIn=0,this._markerOut=0,this._playingMarker=!1,this._lastUpdate=0,this.cacheKey="",this.isSeeking=!1,this._playCalled=!1,this._rfvCallbackId=0;var x=d.sys.game;this._device=x.device.video,this.setPosition(p,g),this.setSize(256,256),this.initPipeline(),this.initPostPipeline(!0),x.events.on(n.PAUSE,this.globalPause,this),x.events.on(n.RESUME,this.globalResume,this);var T=d.sys.sound;T&&T.on(h.GLOBAL_MUTE,this.globalMute,this),y&&this.load(y)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},load:function(u){var d=this.scene.sys.cache.video.get(u);return d?(this.cacheKey=u,this.loadHandler(d.url,d.noAudio,d.crossOrigin)):console.warn("No video in cache for key: "+u),this},changeSource:function(u,d,p,g,y){d===void 0&&(d=!0),p===void 0&&(p=!1),this.cacheKey!==u&&(this.load(u),d&&this.play(p,g,y))},getVideoKey:function(){return this.cacheKey},loadURL:function(u,d,p){d===void 0&&(d=!1);var g=this._device.getVideoURL(u);return g?(this.cacheKey="",this.loadHandler(g.url,d,p)):console.warn("No supported video format found for "+u),this},loadMediaStream:function(u,d,p){return this.loadHandler(null,d,p,u)},loadHandler:function(u,d,p,g){d||(d=!1);var y=this.video;if(y?(this.removeLoadEventHandlers(),this.stop()):(y=document.createElement("video"),y.controls=!1,y.setAttribute("playsinline","playsinline"),y.setAttribute("preload","auto"),y.setAttribute("disablePictureInPicture","true")),d?(y.muted=!0,y.defaultMuted=!0,y.setAttribute("autoplay","autoplay")):(y.muted=!1,y.defaultMuted=!1,y.removeAttribute("autoplay")),p?y.setAttribute("crossorigin",p):y.removeAttribute("crossorigin"),g)if("srcObject"in y)try{y.srcObject=g}catch(T){if(T.name!=="TypeError")throw T;y.src=URL.createObjectURL(g)}else y.src=URL.createObjectURL(g);else y.src=u;this.retry=0,this.video=y,this._playCalled=!1,y.load(),this.addLoadEventHandlers();var x=this.scene.sys.textures.get(this._key);return this.setTexture(x),this},requestVideoFrame:function(u,d){var p=this.video;if(p){var g=d.width,y=d.height,x=this.videoTexture,T=this.videoTextureSource,S=!x||T.source!==p;S?(this._codePaused=p.paused,this._codeMuted=p.muted,x?(T.source=p,T.width=g,T.height=y,x.get().setSize(g,y)):(x=this.scene.sys.textures.create(this._key,p,g,y),x.add("__BASE",0,0,0,g,y),this.setTexture(x),this.videoTexture=x,this.videoTextureSource=x.source[0],this.videoTextureSource.setFlipY(this.flipY),this.emit(r.VIDEO_TEXTURE,this,x)),this.setSizeToFrame(),this.updateDisplayOrigin()):T.update(),this.isStalled=!1,this.metadata=d;var M=d.mediaTime;S&&(this._lastUpdate=M,this.emit(r.VIDEO_CREATED,this,g,y),this.frameReady||(this.frameReady=!0,this.emit(r.VIDEO_PLAY,this))),this._playingMarker?M>=this._markerOut&&(p.loop?(p.currentTime=this._markerIn,this.emit(r.VIDEO_LOOP,this)):(this.stop(!1),this.emit(r.VIDEO_COMPLETE,this))):M-1&&p>d&&p=0&&!isNaN(p)&&p>d&&(this.markers[u]=[d,p]),this},playMarker:function(u,d){var p=this.markers[u];return p&&this.play(d,p[0],p[1]),this},removeMarker:function(u){return delete this.markers[u],this},snapshot:function(u,d){return u===void 0&&(u=this.width),d===void 0&&(d=this.height),this.snapshotArea(0,0,this.width,this.height,u,d)},snapshotArea:function(u,d,p,g,y,x){u===void 0&&(u=0),d===void 0&&(d=0),p===void 0&&(p=this.width),g===void 0&&(g=this.height),y===void 0&&(y=p),x===void 0&&(x=g);var T=this.video,S=this.snapshotTexture;return S?(S.setSize(y,x),T&&S.context.drawImage(T,u,d,p,g,0,0,y,x)):(S=this.scene.sys.textures.createCanvas(s(),y,x),this.snapshotTexture=S,T&&S.context.drawImage(T,u,d,p,g,0,0,y,x)),S.update()},saveSnapshotTexture:function(u){return this.snapshotTexture?this.scene.sys.textures.renameTexture(this.snapshotTexture.key,u):this.snapshotTexture=this.scene.sys.textures.createCanvas(u,this.width,this.height),this.snapshotTexture},playSuccess:function(){if(this._playCalled){this.addEventHandlers(),this._codePaused=!1,this.touchLocked&&(this.touchLocked=!1,this.emit(r.VIDEO_UNLOCKED,this));var u=this.scene.sys.sound;u&&u.mute&&this.setMute(!0),this._markerIn>-1&&(this.video.currentTime=this._markerIn)}},playError:function(u){var d=u.name;d==="NotAllowedError"?(this.touchLocked=!0,this.playWhenUnlocked=!0,this.failedPlayAttempts=1,this.emit(r.VIDEO_LOCKED,this)):d==="NotSupportedError"?(this.stop(!1),this.emit(r.VIDEO_UNSUPPORTED,this,u)):(this.stop(!1),this.emit(r.VIDEO_ERROR,this,u))},legacyPlayHandler:function(){var u=this.video;u&&(this.playSuccess(),u.removeEventListener("playing",this._callbacks.legacy))},playingHandler:function(){this.isStalled=!1,this.emit(r.VIDEO_PLAYING,this)},loadErrorHandler:function(u){this.stop(!1),this.emit(r.VIDEO_ERROR,this,u)},metadataHandler:function(u){this.emit(r.VIDEO_METADATA,this,u)},setSizeToFrame:function(u){u||(u=this.frame),this.width=u.realWidth,this.height=u.realHeight,this.scaleX!==1&&(this.scaleX=this.displayWidth/this.width),this.scaleY!==1&&(this.scaleY=this.displayHeight/this.height);var d=this.input;return d&&!d.customHitArea&&(d.hitArea.width=this.width,d.hitArea.height=this.height),this},stalledHandler:function(u){this.isStalled=!0,this.emit(r.VIDEO_STALLED,this,u)},completeHandler:function(){this._playCalled=!1,this.emit(r.VIDEO_COMPLETE,this)},preUpdate:function(u,d){var p=this.video;!p||!this._playCalled||this.touchLocked&&this.playWhenUnlocked&&(this.retry+=d,this.retry>=this.retryInterval&&(this.createPlayPromise(!1),this.retry=0))},seekTo:function(u){var d=this.video;if(d){var p=d.duration;if(p!==1/0&&!isNaN(p)){var g=p*u;this.setCurrentTime(g)}}return this},getCurrentTime:function(){return this.video?this.video.currentTime:0},setCurrentTime:function(u){var d=this.video;if(d){if(typeof u=="string"){var p=u[0],g=parseFloat(u.substr(1));p==="+"?u=d.currentTime+g:p==="-"&&(u=d.currentTime-g)}d.currentTime=u}return this},seekingHandler:function(){this.isSeeking=!0,this.emit(r.VIDEO_SEEKING,this)},seekedHandler:function(){this.isSeeking=!1,this.emit(r.VIDEO_SEEKED,this)},getProgress:function(){var u=this.video;if(u){var d=u.duration;if(d!==1/0&&!isNaN(d))return u.currentTime/d}return-1},getDuration:function(){return this.video?this.video.duration:0},setMute:function(u){u===void 0&&(u=!0),this._codeMuted=u;var d=this.video;return d&&(d.muted=this._systemMuted?!0:u),this},isMuted:function(){return this._codeMuted},globalMute:function(u,d){this._systemMuted=d;var p=this.video;p&&(p.muted=this._codeMuted?!0:d)},globalPause:function(){this._systemPaused=!0,this.video&&!this.video.ended&&(this.removeEventHandlers(),this.video.pause())},globalResume:function(){this._systemPaused=!1,this.video&&!this._codePaused&&!this.video.ended&&this.createPlayPromise()},setPaused:function(u){u===void 0&&(u=!0);var d=this.video;return this._codePaused=u,d&&!d.ended&&(u?d.paused||(this.removeEventHandlers(),d.pause()):u||(this._playCalled?d.paused&&!this._systemPaused&&this.createPlayPromise():this.play())),this},pause:function(){return this.setPaused(!0)},resume:function(){return this.setPaused(!1)},getVolume:function(){return this.video?this.video.volume:1},setVolume:function(u){return u===void 0&&(u=1),this.video&&(this.video.volume=a(u,0,1)),this},getPlaybackRate:function(){return this.video?this.video.playbackRate:1},setPlaybackRate:function(u){return this.video&&(this.video.playbackRate=u),this},getLoop:function(){return this.video?this.video.loop:!1},setLoop:function(u){return u===void 0&&(u=!0),this.video&&(this.video.loop=u),this},isPlaying:function(){return this.video?!(this.video.paused||this.video.ended):!1},isPaused:function(){return this.video&&this._playCalled&&this.video.paused||this._codePaused||this._systemPaused},saveTexture:function(u,d){return d===void 0&&(d=!1),this.videoTexture&&(this.scene.sys.textures.renameTexture(this._key,u),this.videoTextureSource.setFlipY(d)),this._key=u,this.flipY=d,!!this.videoTexture},stop:function(u){u===void 0&&(u=!0);var d=this.video;return d&&(this.removeEventHandlers(),d.cancelVideoFrameCallback(this._rfvCallbackId),d.pause()),this.retry=0,this._playCalled=!1,u&&this.emit(r.VIDEO_STOP,this),this},removeVideoElement:function(){var u=this.video;if(u){for(u.parentNode&&u.parentNode.removeChild(u);u.hasChildNodes();)u.removeChild(u.firstChild);u.removeAttribute("autoplay"),u.removeAttribute("src"),this.video=null}},preDestroy:function(){this.stop(!1),this.removeLoadEventHandlers(),this.removeVideoElement();var u=this.scene.sys.game.events;u.off(n.PAUSE,this.globalPause,this),u.off(n.RESUME,this.globalResume,this);var d=this.scene.sys.sound;d&&d.off(h.GLOBAL_MUTE,this.globalMute,this)}});v.exports=f},58352:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c,o){a.videoTexture&&(c.addToRenderList(a),t.batchSprite(a,a.frame,c,o))};v.exports=m},11511:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(25305),c=t(44603),o=t(23568),r=t(18471);c.register("video",function(n,e){n===void 0&&(n={});var i=o(n,"key",null),h=new r(this.scene,0,0,i);return e!==void 0&&(n.add=e),a(this.scene,h,n),h})},89025:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(18471),c=t(39429);c.register("video",function(o,r,n){return this.displayList.add(new a(this.scene,o,r,n))})},10247:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),c=a,o=a;c=t(29849),o=t(58352),v.exports={renderWebGL:c,renderCanvas:o}},29849:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c,o){a.videoTexture&&(c.addToRenderList(a),a.pipeline.batchSprite(a,c,o))};v.exports=m},41481:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(10312),c=t(96503),o=t(87902),r=t(83419),n=t(31401),e=t(95643),i=t(87841),h=t(37303),s=new r({Extends:e,Mixins:[n.Depth,n.GetBounds,n.Origin,n.Transform,n.ScrollFactor,n.Visible],initialize:function(f,u,d,p,g){p===void 0&&(p=1),g===void 0&&(g=p),e.call(this,f,"Zone"),this.setPosition(u,d),this.width=p,this.height=g,this.blendMode=a.NORMAL,this.updateDisplayOrigin()},displayWidth:{get:function(){return this.scaleX*this.width},set:function(l){this.scaleX=l/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(l){this.scaleY=l/this.height}},setSize:function(l,f,u){u===void 0&&(u=!0),this.width=l,this.height=f,this.updateDisplayOrigin();var d=this.input;return u&&d&&!d.customHitArea&&(d.hitArea.width=l,d.hitArea.height=f),this},setDisplaySize:function(l,f){return this.displayWidth=l,this.displayHeight=f,this},setCircleDropZone:function(l){return this.setDropZone(new c(0,0,l),o)},setRectangleDropZone:function(l,f){return this.setDropZone(new i(0,0,l,f),h)},setDropZone:function(l,f){return this.input||this.setInteractive(l,f,!0),this},setAlpha:function(){},setBlendMode:function(){},renderCanvas:function(l,f,u){u.addToRenderList(f)},renderWebGL:function(l,f,u){u.addToRenderList(f)}});v.exports=s},95261:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(44603),c=t(23568),o=t(41481);a.register("zone",function(r){var n=c(r,"x",0),e=c(r,"y",0),i=c(r,"width",1),h=c(r,"height",i);return new o(this.scene,n,e,i,h)})},84175:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(41481),c=t(39429);c.register("zone",function(o,r,n,e){return this.displayList.add(new a(this.scene,o,r,n,e))})},95166:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return t.radius>0?Math.PI*t.radius*t.radius:0};v.exports=m},96503:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(87902),o=t(26241),r=t(79124),n=t(23777),e=t(28176),i=new a({initialize:function(s,l,f){s===void 0&&(s=0),l===void 0&&(l=0),f===void 0&&(f=0),this.type=n.CIRCLE,this.x=s,this.y=l,this._radius=f,this._diameter=f*2},contains:function(h,s){return c(this,h,s)},getPoint:function(h,s){return o(this,h,s)},getPoints:function(h,s,l){return r(this,h,s,l)},getRandomPoint:function(h){return e(this,h)},setTo:function(h,s,l){return this.x=h,this.y=s,this._radius=l,this._diameter=l*2,this},setEmpty:function(){return this._radius=0,this._diameter=0,this},setPosition:function(h,s){return s===void 0&&(s=h),this.x=h,this.y=s,this},isEmpty:function(){return this._radius<=0},radius:{get:function(){return this._radius},set:function(h){this._radius=h,this._diameter=h*2}},diameter:{get:function(){return this._diameter},set:function(h){this._diameter=h,this._radius=h*.5}},left:{get:function(){return this.x-this._radius},set:function(h){this.x=h+this._radius}},right:{get:function(){return this.x+this._radius},set:function(h){this.x=h-this._radius}},top:{get:function(){return this.y-this._radius},set:function(h){this.y=h+this._radius}},bottom:{get:function(){return this.y+this._radius},set:function(h){this.y=h-this._radius}}});v.exports=i},71562:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return 2*(Math.PI*t.radius)};v.exports=m},92110:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(2141),c=function(o,r,n){return n===void 0&&(n=new a),n.x=o.x+o.radius*Math.cos(r),n.y=o.y+o.radius*Math.sin(r),n};v.exports=c},42250:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(96503),c=function(o){return new a(o.x,o.y,o.radius)};v.exports=c},87902:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){if(t.radius>0&&a>=t.left&&a<=t.right&&c>=t.top&&c<=t.bottom){var o=(t.x-a)*(t.x-a),r=(t.y-c)*(t.y-c);return o+r<=t.radius*t.radius}else return!1};v.exports=m},5698:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(87902),c=function(o,r){return a(o,r.x,r.y)};v.exports=c},70588:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(87902),c=function(o,r){return a(o,r.x,r.y)&&a(o,r.right,r.y)&&a(o,r.x,r.bottom)&&a(o,r.right,r.bottom)};v.exports=c},26394:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){return a.setTo(t.x,t.y,t.radius)};v.exports=m},76278:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){return t.x===a.x&&t.y===a.y&&t.radius===a.radius};v.exports=m},2074:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(87841),c=function(o,r){return r===void 0&&(r=new a),r.x=o.left,r.y=o.top,r.width=o.diameter,r.height=o.diameter,r};v.exports=c},26241:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(92110),c=t(62945),o=t(36383),r=t(2141),n=function(e,i,h){h===void 0&&(h=new r);var s=c(i,0,o.PI2);return a(e,s,h)};v.exports=n},79124:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(71562),c=t(92110),o=t(62945),r=t(36383),n=function(e,i,h,s){s===void 0&&(s=[]),!i&&h>0&&(i=a(e)/h);for(var l=0;l{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){return t.x+=a,t.y+=c,t};v.exports=m},39212:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){return t.x+=a.x,t.y+=a.y,t};v.exports=m},28176:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(2141),c=function(o,r){r===void 0&&(r=new a);var n=2*Math.PI*Math.random(),e=Math.random()+Math.random(),i=e>1?2-e:e,h=i*Math.cos(n),s=i*Math.sin(n);return r.x=o.x+h*o.radius,r.y=o.y+s*o.radius,r};v.exports=c},88911:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(96503);a.Area=t(95166),a.Circumference=t(71562),a.CircumferencePoint=t(92110),a.Clone=t(42250),a.Contains=t(87902),a.ContainsPoint=t(5698),a.ContainsRect=t(70588),a.CopyFrom=t(26394),a.Equals=t(76278),a.GetBounds=t(2074),a.GetPoint=t(26241),a.GetPoints=t(79124),a.Offset=t(50884),a.OffsetPoint=t(39212),a.Random=t(28176),v.exports=a},23777:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6};v.exports=m},78874:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return t.isEmpty()?0:t.getMajorRadius()*t.getMinorRadius()*Math.PI};v.exports=m},92990:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){var a=t.width/2,c=t.height/2,o=Math.pow(a-c,2)/Math.pow(a+c,2);return Math.PI*(a+c)*(1+3*o/(10+Math.sqrt(4-3*o)))};v.exports=m},79522:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(2141),c=function(o,r,n){n===void 0&&(n=new a);var e=o.width/2,i=o.height/2;return n.x=o.x+e*Math.cos(r),n.y=o.y+i*Math.sin(r),n};v.exports=c},58102:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(8497),c=function(o){return new a(o.x,o.y,o.width,o.height)};v.exports=c},81154:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){if(t.width<=0||t.height<=0)return!1;var o=(a-t.x)/t.width,r=(c-t.y)/t.height;return o*=o,r*=r,o+r<.25};v.exports=m},46662:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(81154),c=function(o,r){return a(o,r.x,r.y)};v.exports=c},1632:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(81154),c=function(o,r){return a(o,r.x,r.y)&&a(o,r.right,r.y)&&a(o,r.x,r.bottom)&&a(o,r.right,r.bottom)};v.exports=c},65534:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){return a.setTo(t.x,t.y,t.width,t.height)};v.exports=m},8497:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(81154),o=t(90549),r=t(48320),n=t(23777),e=t(24820),i=new a({initialize:function(s,l,f,u){s===void 0&&(s=0),l===void 0&&(l=0),f===void 0&&(f=0),u===void 0&&(u=0),this.type=n.ELLIPSE,this.x=s,this.y=l,this.width=f,this.height=u},contains:function(h,s){return c(this,h,s)},getPoint:function(h,s){return o(this,h,s)},getPoints:function(h,s,l){return r(this,h,s,l)},getRandomPoint:function(h){return e(this,h)},setTo:function(h,s,l,f){return this.x=h,this.y=s,this.width=l,this.height=f,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(h,s){return s===void 0&&(s=h),this.x=h,this.y=s,this},setSize:function(h,s){return s===void 0&&(s=h),this.width=h,this.height=s,this},isEmpty:function(){return this.width<=0||this.height<=0},getMinorRadius:function(){return Math.min(this.width,this.height)/2},getMajorRadius:function(){return Math.max(this.width,this.height)/2},left:{get:function(){return this.x-this.width/2},set:function(h){this.x=h+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(h){this.x=h-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(h){this.y=h+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(h){this.y=h-this.height/2}}});v.exports=i},36146:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){return t.x===a.x&&t.y===a.y&&t.width===a.width&&t.height===a.height};v.exports=m},23694:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(87841),c=function(o,r){return r===void 0&&(r=new a),r.x=o.left,r.y=o.top,r.width=o.width,r.height=o.height,r};v.exports=c},90549:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(79522),c=t(62945),o=t(36383),r=t(2141),n=function(e,i,h){h===void 0&&(h=new r);var s=c(i,0,o.PI2);return a(e,s,h)};v.exports=n},48320:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(92990),c=t(79522),o=t(62945),r=t(36383),n=function(e,i,h,s){s===void 0&&(s=[]),!i&&h>0&&(i=a(e)/h);for(var l=0;l{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){return t.x+=a,t.y+=c,t};v.exports=m},44808:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){return t.x+=a.x,t.y+=a.y,t};v.exports=m},24820:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(2141),c=function(o,r){r===void 0&&(r=new a);var n=Math.random()*Math.PI*2,e=Math.sqrt(Math.random());return r.x=o.x+e*Math.cos(n)*o.width/2,r.y=o.y+e*Math.sin(n)*o.height/2,r};v.exports=c},49203:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(8497);a.Area=t(78874),a.Circumference=t(92990),a.CircumferencePoint=t(79522),a.Clone=t(58102),a.Contains=t(81154),a.ContainsPoint=t(46662),a.ContainsRect=t(1632),a.CopyFrom=t(65534),a.Equals=t(36146),a.GetBounds=t(23694),a.GetPoint=t(90549),a.GetPoints=t(48320),a.Offset=t(73424),a.OffsetPoint=t(44808),a.Random=t(24820),v.exports=a},55738:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(23777),c=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=c(!1,o,a),v.exports=o},2044:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(20339),c=function(o,r){return a(o.x,o.y,r.x,r.y)<=o.radius+r.radius};v.exports=c},81491:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){var c=a.width/2,o=a.height/2,r=Math.abs(t.x-a.x-c),n=Math.abs(t.y-a.y-o),e=c+t.radius,i=o+t.radius;if(r>e||n>i)return!1;if(r<=c||n<=o)return!0;var h=r-c,s=n-o,l=h*h,f=s*s,u=t.radius*t.radius;return l+f<=u};v.exports=m},63376:(v,m,t)=>{/** + * @author Florian Vazelle + * @author Geoffrey Glaive + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(2141),c=t(2044),o=function(r,n,e){if(e===void 0&&(e=[]),c(r,n)){var i=r.x,h=r.y,s=r.radius,l=n.x,f=n.y,u=n.radius,d,p,g,y,x;if(h===f)x=(u*u-s*s-l*l+i*i)/(2*(i-l)),d=1,p=-2*f,g=l*l+x*x-2*l*x+f*f-u*u,y=p*p-4*d*g,y===0?e.push(new a(x,-p/(2*d))):y>0&&(e.push(new a(x,(-p+Math.sqrt(y))/(2*d))),e.push(new a(x,(-p-Math.sqrt(y))/(2*d))));else{var T=(i-l)/(h-f),S=(u*u-s*s-l*l+i*i-f*f+h*h)/(2*(h-f));d=T*T+1,p=2*h*T-2*S*T-2*i,g=i*i+h*h+S*S-s*s-2*h*S,y=p*p-4*d*g,y===0?(x=-p/(2*d),e.push(new a(x,S-x*T))):y>0&&(x=(-p+Math.sqrt(y))/(2*d),e.push(new a(x,S-x*T)),x=(-p-Math.sqrt(y))/(2*d),e.push(new a(x,S-x*T)))}}return e};v.exports=o},97439:(v,m,t)=>{/** + * @author Florian Vazelle + * @author Geoffrey Glaive + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(4042),c=t(81491),o=function(r,n,e){if(e===void 0&&(e=[]),c(r,n)){var i=n.getLineA(),h=n.getLineB(),s=n.getLineC(),l=n.getLineD();a(i,r,e),a(h,r,e),a(s,r,e),a(l,r,e)}return e};v.exports=o},4042:(v,m,t)=>{/** + * @author Florian Vazelle + * @author Geoffrey Glaive + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(2141),c=t(80462),o=function(r,n,e){if(e===void 0&&(e=[]),c(r,n)){var i=r.x1,h=r.y1,s=r.x2,l=r.y2,f=n.x,u=n.y,d=n.radius,p=s-i,g=l-h,y=i-f,x=h-u,T=p*p+g*g,S=2*(p*y+g*x),M=y*y+x*x-d*d,w=S*S-4*T*M,L,F;if(w===0){var O=-S/(2*T);L=i+O*p,F=h+O*g,O>=0&&O<=1&&e.push(new a(L,F))}else if(w>0){var b=(-S-Math.sqrt(w))/(2*T);L=i+b*p,F=h+b*g,b>=0&&b<=1&&e.push(new a(L,F));var N=(-S+Math.sqrt(w))/(2*T);L=i+N*p,F=h+N*g,N>=0&&N<=1&&e.push(new a(L,F))}}return e};v.exports=o},36100:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(25836),c=function(o,r,n,e){n===void 0&&(n=!1);var i=o.x1,h=o.y1,s=o.x2,l=o.y2,f=r.x1,u=r.y1,d=r.x2,p=r.y2,g=s-i,y=l-h,x=d-f,T=p-u,S=g*T-y*x;if(S===0)return null;var M,w,L;if(n){if(M=(g*(u-h)+y*(i-f))/(x*y-T*g),w=(f+x*M-i)/g,w<0||M<0||M>1)return null;L=w}else{if(M=((f-i)*T-(u-h)*x)/S,w=((h-u)*g-(i-f)*y)/S,M<0||M>1||w<0||w>1)return null;L=M}return e===void 0&&(e=new a),e.set(i+g*L,h+y*L,L)};v.exports=c},3073:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(36100),c=t(23031),o=t(25836),r=new c,n=new o,e=function(i,h,s,l){s===void 0&&(s=!1),l===void 0&&(l=new o);var f=!1;l.set(),n.set();for(var u=h[h.length-1],d=0;d{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(25836),c=t(61369),o=t(3073),r=new a,n=function(e,i,h,s){s===void 0&&(s=new c),Array.isArray(i)||(i=[i]);var l=!1;s.set(),r.set();for(var f=0;f{/** + * @author Florian Vazelle + * @author Geoffrey Glaive + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(2141),c=t(76112),o=t(92773),r=function(n,e,i){if(i===void 0&&(i=[]),o(n,e))for(var h=e.getLineA(),s=e.getLineB(),l=e.getLineC(),f=e.getLineD(),u=[new a,new a,new a,new a],d=[c(h,n,u[0]),c(s,n,u[1]),c(l,n,u[2]),c(f,n,u[3])],p=0;p<4;p++)d[p]&&i.push(u[p]);return i};v.exports=r},71147:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(61369),c=t(56362),o=t(23031),r=new o;function n(h,s,l,f,u){var d=Math.cos(h),p=Math.sin(h);r.setTo(s,l,s+d,l+p);var g=c(r,f,!0);g&&u.push(new a(g.x,g.y,h,g.w))}function e(h,s){return h.z-s.z}var i=function(h,s,l){Array.isArray(l)||(l=[l]);for(var f=[],u=[],d=0;d{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(87841),c=t(59996),o=function(r,n,e){return e===void 0&&(e=new a),c(r,n)&&(e.x=Math.max(r.x,n.x),e.y=Math.max(r.y,n.y),e.width=Math.min(r.right,n.right)-e.x,e.height=Math.min(r.bottom,n.bottom)-e.y),e};v.exports=o},52784:(v,m,t)=>{/** + * @author Florian Vazelle + * @author Geoffrey Glaive + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(60646),c=t(59996),o=function(r,n,e){if(e===void 0&&(e=[]),c(r,n)){var i=r.getLineA(),h=r.getLineB(),s=r.getLineC(),l=r.getLineD();a(i,n,e),a(h,n,e),a(s,n,e),a(l,n,e)}return e};v.exports=o},26341:(v,m,t)=>{/** + * @author Florian Vazelle + * @author Geoffrey Glaive + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(89265),c=t(60646),o=function(r,n,e){if(e===void 0&&(e=[]),a(r,n)){var i=n.getLineA(),h=n.getLineB(),s=n.getLineC();c(i,r,e),c(h,r,e),c(s,r,e)}return e};v.exports=o},38720:(v,m,t)=>{/** + * @author Florian Vazelle + * @author Geoffrey Glaive + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(4042),c=t(67636),o=function(r,n,e){if(e===void 0&&(e=[]),c(r,n)){var i=r.getLineA(),h=r.getLineB(),s=r.getLineC();a(i,n,e),a(h,n,e),a(s,n,e)}return e};v.exports=o},13882:(v,m,t)=>{/** + * @author Florian Vazelle + * @author Geoffrey Glaive + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(2141),c=t(2822),o=t(76112),r=function(n,e,i){if(i===void 0&&(i=[]),c(n,e))for(var h=n.getLineA(),s=n.getLineB(),l=n.getLineC(),f=[new a,new a,new a],u=[o(h,e,f[0]),o(s,e,f[1]),o(l,e,f[2])],d=0;d<3;d++)u[d]&&i.push(f[d]);return i};v.exports=r},75636:(v,m,t)=>{/** + * @author Florian Vazelle + * @author Geoffrey Glaive + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(82944),c=t(13882),o=function(r,n,e){if(e===void 0&&(e=[]),a(r,n)){var i=n.getLineA(),h=n.getLineB(),s=n.getLineC();c(r,i,e),c(r,h,e),c(r,s,e)}return e};v.exports=o},80462:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(87902),c=t(2141),o=new c,r=function(n,e,i){if(i===void 0&&(i=o),a(e,n.x1,n.y1))return i.x=n.x1,i.y=n.y1,!0;if(a(e,n.x2,n.y2))return i.x=n.x2,i.y=n.y2,!0;var h=n.x2-n.x1,s=n.y2-n.y1,l=e.x-n.x1,f=e.y-n.y1,u=h*h+s*s,d=h,p=s;if(u>0){var g=(l*h+f*s)/u;d*=g,p*=g}i.x=n.x1+d,i.y=n.y1+p;var y=d*d+p*p;return y<=u&&d*h+p*s>=0&&a(e,i.x,i.y)};v.exports=r},76112:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){var o=t.x1,r=t.y1,n=t.x2,e=t.y2,i=a.x1,h=a.y1,s=a.x2,l=a.y2;if(o===n&&r===e||i===s&&h===l)return!1;var f=(l-h)*(n-o)-(s-i)*(e-r);if(f===0)return!1;var u=((s-i)*(r-h)-(l-h)*(o-i))/f,d=((n-o)*(r-h)-(e-r)*(o-i))/f;return u<0||u>1||d<0||d>1?!1:(c&&(c.x=o+u*(n-o),c.y=r+u*(e-r)),!0)};v.exports=m},92773:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){var c=t.x1,o=t.y1,r=t.x2,n=t.y2,e=a.x,i=a.y,h=a.right,s=a.bottom,l=0;if(c>=e&&c<=h&&o>=i&&o<=s||r>=e&&r<=h&&n>=i&&n<=s)return!0;if(c=e){if(l=o+(n-o)*(e-c)/(r-c),l>i&&l<=s)return!0}else if(c>h&&r<=h&&(l=o+(n-o)*(h-c)/(r-c),l>=i&&l<=s))return!0;if(o=i){if(l=c+(r-c)*(i-o)/(n-o),l>=e&&l<=h)return!0}else if(o>s&&n<=s&&(l=c+(r-c)*(s-o)/(n-o),l>=e&&l<=h))return!0;return!1};v.exports=m},16204:v=>{/** + * @author Richard Davey + * @author Florian Mertens + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){c===void 0&&(c=1);var o=a.x1,r=a.y1,n=a.x2,e=a.y2,i=t.x,h=t.y,s=(n-o)*(n-o)+(e-r)*(e-r);if(s===0)return!1;var l=((i-o)*(n-o)+(h-r)*(e-r))/s;if(l<0)return Math.sqrt((o-i)*(o-i)+(r-h)*(r-h))<=c;if(l>=0&&l<=1){var f=((r-h)*(n-o)-(o-i)*(e-r))/s;return Math.abs(f)*Math.sqrt(s)<=c}else return Math.sqrt((n-i)*(n-i)+(e-h)*(e-h))<=c};v.exports=m},14199:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(16204),c=function(o,r){if(!a(o,r))return!1;var n=Math.min(r.x1,r.x2),e=Math.max(r.x1,r.x2),i=Math.min(r.y1,r.y2),h=Math.max(r.y1,r.y2);return o.x>=n&&o.x<=e&&o.y>=i&&o.y<=h};v.exports=c},59996:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){return t.width<=0||t.height<=0||a.width<=0||a.height<=0?!1:!(t.righta.right||t.y>a.bottom)};v.exports=m},89265:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(76112),c=t(37303),o=t(48653),r=t(77493),n=function(e,i){if(i.left>e.right||i.righte.bottom||i.bottom0};v.exports=n},84411:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c,o,r,n){return n===void 0&&(n=0),!(a>t.right+n||ct.bottom+n||r{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(80462),c=t(10690),o=function(r,n){return r.left>n.right||r.rightn.bottom||r.bottom{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(76112),c=function(o,r){return!!(o.contains(r.x1,r.y1)||o.contains(r.x2,r.y2)||a(o.getLineA(),r)||a(o.getLineB(),r)||a(o.getLineC(),r))};v.exports=c},82944:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(48653),c=t(71694),o=t(76112),r=function(n,e){if(n.left>e.right||n.righte.bottom||n.bottom0||(d=c(e),p=a(n,d,!0),p.length>0)};v.exports=r},91865:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.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:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return Math.atan2(t.y2-t.y1,t.x2-t.x1)};v.exports=m},84993:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){a===void 0&&(a=1),c===void 0&&(c=[]);var o=Math.round(t.x1),r=Math.round(t.y1),n=Math.round(t.x2),e=Math.round(t.y2),i=Math.abs(n-o),h=Math.abs(e-r),s=o-h&&(f-=h,o+=s),d{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){var o=a-(t.x1+t.x2)/2,r=c-(t.y1+t.y2)/2;return t.x1+=o,t.y1+=r,t.x2+=o,t.y2+=r,t};v.exports=m},31116:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(23031),c=function(o){return new a(o.x1,o.y1,o.x2,o.y2)};v.exports=c},59944:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){return a.setTo(t.x1,t.y1,t.x2,t.y2)};v.exports=m},59220:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){return t.x1===a.x1&&t.y1===a.y1&&t.x2===a.x2&&t.y2===a.y2};v.exports=m},78177:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(35001),c=function(o,r,n){n===void 0&&(n=r);var e=a(o),i=o.x2-o.x1,h=o.y2-o.y1;return r&&(o.x1=o.x1-i/e*r,o.y1=o.y1-h/e*r),n&&(o.x2=o.x2+i/e*n,o.y2=o.y2+h/e*n),o};v.exports=c},26708:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(52816),c=t(6113),o=t(2141),r=function(n,e,i,h,s){h===void 0&&(h=0),s===void 0&&(s=[]);var l=[],f=n.x1,u=n.y1,d=n.x2-f,p=n.y2-u,g=c(e,s),y,x,T=i-1;for(y=0;y0){var S=l[0],M=[S];for(y=1;y=h&&(M.push(w),S=w)}var L=l[l.length-1];return a(S,L){/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(2141),c=function(o,r){return r===void 0&&(r=new a),r.x=(o.x1+o.x2)/2,r.y=(o.y1+o.y2)/2,r};v.exports=c},99569:(v,m,t)=>{/** + * @author Richard Davey + * @author Florian Mertens + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(2141),c=function(o,r,n){n===void 0&&(n=new a);var e=o.x1,i=o.y1,h=o.x2,s=o.y2,l=(h-e)*(h-e)+(s-i)*(s-i);if(l===0)return n;var f=((r.x-e)*(h-e)+(r.y-i)*(s-i))/l;return n.x=e+f*(h-e),n.y=i+f*(s-i),n};v.exports=c},34638:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(36383),c=t(91938),o=t(2141),r=function(n,e){e===void 0&&(e=new o);var i=c(n)-a.TAU;return e.x=Math.cos(i),e.y=Math.sin(i),e};v.exports=r},13151:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(2141),c=function(o,r,n){return n===void 0&&(n=new a),n.x=o.x1+(o.x2-o.x1)*r,n.y=o.y1+(o.y2-o.y1)*r,n};v.exports=c},15258:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(35001),c=t(2141),o=function(r,n,e,i){i===void 0&&(i=[]),!n&&e>0&&(n=a(r)/e);for(var h=r.x1,s=r.y1,l=r.x2,f=r.y2,u=0;u{/** + * @author Richard Davey + * @author Florian Mertens + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){var c=t.x1,o=t.y1,r=t.x2,n=t.y2,e=(r-c)*(r-c)+(n-o)*(n-o);if(e===0)return!1;var i=((o-a.y)*(r-c)-(c-a.x)*(n-o))/e;return Math.abs(i)*Math.sqrt(e)};v.exports=m},98770:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return Math.abs(t.y1-t.y2)};v.exports=m},35001:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))};v.exports=m},23031:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(13151),o=t(15258),r=t(23777),n=t(65822),e=t(26099),i=new a({initialize:function(s,l,f,u){s===void 0&&(s=0),l===void 0&&(l=0),f===void 0&&(f=0),u===void 0&&(u=0),this.type=r.LINE,this.x1=s,this.y1=l,this.x2=f,this.y2=u},getPoint:function(h,s){return c(this,h,s)},getPoints:function(h,s,l){return o(this,h,s,l)},getRandomPoint:function(h){return n(this,h)},setTo:function(h,s,l,f){return h===void 0&&(h=0),s===void 0&&(s=0),l===void 0&&(l=0),f===void 0&&(f=0),this.x1=h,this.y1=s,this.x2=l,this.y2=f,this},setFromObjects:function(h,s){return this.x1=h.x,this.y1=h.y,this.x2=s.x,this.y2=s.y,this},getPointA:function(h){return h===void 0&&(h=new e),h.set(this.x1,this.y1),h},getPointB:function(h){return h===void 0&&(h=new e),h.set(this.x2,this.y2),h},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(h){this.x1<=this.x2?this.x1=h:this.x2=h}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(h){this.x1>this.x2?this.x1=h:this.x2=h}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(h){this.y1<=this.y2?this.y1=h:this.y2=h}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(h){this.y1>this.y2?this.y1=h:this.y2=h}}});v.exports=i},64795:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(36383),c=t(15994),o=t(91938),r=function(n){var e=o(n)-a.TAU;return c(e,-Math.PI,Math.PI)};v.exports=r},52616:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(36383),c=t(91938),o=function(r){return Math.cos(c(r)-a.TAU)};v.exports=o},87231:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(36383),c=t(91938),o=function(r){return Math.sin(c(r)-a.TAU)};v.exports=o},89662:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){return t.x1+=a,t.y1+=c,t.x2+=a,t.y2+=c,t};v.exports=m},71165:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return-((t.x2-t.x1)/(t.y2-t.y1))};v.exports=m},65822:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(2141),c=function(o,r){r===void 0&&(r=new a);var n=Math.random();return r.x=o.x1+n*(o.x2-o.x1),r.y=o.y1+n*(o.y2-o.y1),r};v.exports=c},69777:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(91938),c=t(64795),o=function(r,n){return 2*c(n)-Math.PI-a(r)};v.exports=o},39706:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(64400),c=function(o,r){var n=(o.x1+o.x2)/2,e=(o.y1+o.y2)/2;return a(o,n,e,r)};v.exports=c},82585:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(64400),c=function(o,r,n){return a(o,r.x,r.y,n)};v.exports=c},64400:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c,o){var r=Math.cos(o),n=Math.sin(o),e=t.x1-a,i=t.y1-c;return t.x1=e*r-i*n+a,t.y1=e*n+i*r+c,e=t.x2-a,i=t.y2-c,t.x2=e*r-i*n+a,t.y2=e*n+i*r+c,t};v.exports=m},62377:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c,o,r){return t.x1=a,t.y1=c,t.x2=a+Math.cos(o)*r,t.y2=c+Math.sin(o)*r,t};v.exports=m},71366:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return(t.y2-t.y1)/(t.x2-t.x1)};v.exports=m},10809:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return Math.abs(t.x1-t.x2)};v.exports=m},2529:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(23031);a.Angle=t(91938),a.BresenhamPoints=t(84993),a.CenterOn=t(36469),a.Clone=t(31116),a.CopyFrom=t(59944),a.Equals=t(59220),a.Extend=t(78177),a.GetEasedPoints=t(26708),a.GetMidPoint=t(32125),a.GetNearestPoint=t(99569),a.GetNormal=t(34638),a.GetPoint=t(13151),a.GetPoints=t(15258),a.GetShortestDistance=t(26408),a.Height=t(98770),a.Length=t(35001),a.NormalAngle=t(64795),a.NormalX=t(52616),a.NormalY=t(87231),a.Offset=t(89662),a.PerpSlope=t(71165),a.Random=t(65822),a.ReflectAngle=t(69777),a.Rotate=t(39706),a.RotateAroundPoint=t(82585),a.RotateAroundXY=t(64400),a.SetToAngle=t(62377),a.Slope=t(71366),a.Width=t(10809),v.exports=a},83997:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(87841),o=t(26099);function r(e,i,h,s){var l=e-h,f=i-s,u=l*l+f*f;return Math.sqrt(u)}var n=new a({initialize:function(i,h,s){this.vertex1=i,this.vertex2=h,this.vertex3=s,this.bounds=new c,this._inCenter=new o},getInCenter:function(e){e===void 0&&(e=!0);var i=this.vertex1,h=this.vertex2,s=this.vertex3,l,f,u,d,p,g;e?(l=i.x,f=i.y,u=h.x,d=h.y,p=s.x,g=s.y):(l=i.vx,f=i.vy,u=h.vx,d=h.vy,p=s.vx,g=s.vy);var y=r(p,g,u,d),x=r(l,f,p,g),T=r(u,d,l,f),S=y+x+T;return this._inCenter.set((l*y+u*x+p*T)/S,(f*y+d*x+g*T)/S)},contains:function(e,i,h){var s=this.vertex1,l=this.vertex2,f=this.vertex3,u=s.vx,d=s.vy,p=l.vx,g=l.vy,y=f.vx,x=f.vy;if(h){var T=h.a,S=h.b,M=h.c,w=h.d,L=h.e,F=h.f;u=s.vx*T+s.vy*M+L,d=s.vx*S+s.vy*w+F,p=l.vx*T+l.vy*M+L,g=l.vx*S+l.vy*w+F,y=f.vx*T+f.vy*M+L,x=f.vx*S+f.vy*w+F}var O=y-u,b=x-d,N=p-u,V=g-d,K=e-u,$=i-d,j=O*O+b*b,X=O*N+b*V,Y=O*K+b*$,D=N*N+V*V,z=N*K+V*$,W=j*D-X*X,H=W===0?0:1/W,J=(D*Y-X*z)*H,Q=(j*z-X*Y)*H;return J>=0&&Q>=0&&J+Q<1},isCounterClockwise:function(e){var i=this.vertex1,h=this.vertex2,s=this.vertex3,l=(h.vx-i.vx)*(s.vy-i.vy)-(h.vy-i.vy)*(s.vx-i.vx);return e<=0?l>=0:l<0},load:function(e,i,h,s,l){return h=this.vertex1.load(e,i,h,s,l),h=this.vertex2.load(e,i,h,s,l),h=this.vertex3.load(e,i,h,s,l),h},transformCoordinatesLocal:function(e,i,h,s){return this.vertex1.transformCoordinatesLocal(e,i,h,s),this.vertex2.transformCoordinatesLocal(e,i,h,s),this.vertex3.transformCoordinatesLocal(e,i,h,s),this},updateBounds:function(){var e=this.vertex1,i=this.vertex2,h=this.vertex3,s=this.bounds;return s.x=Math.min(e.vx,i.vx,h.vx),s.y=Math.min(e.vy,i.vy,h.vy),s.width=Math.max(e.vx,i.vx,h.vx)-s.x,s.height=Math.max(e.vy,i.vy,h.vy)-s.y,this},isInView:function(e,i,h,s,l,f,u,d,p,g,y){this.update(s,l,f,u,d,p,g,y);var x=this.vertex1,T=this.vertex2,S=this.vertex3;if(x.ta<=0&&T.ta<=0&&S.ta<=0||i&&!this.isCounterClockwise(h))return!1;var M=this.bounds;M.x=Math.min(x.tx,T.tx,S.tx),M.y=Math.min(x.ty,T.ty,S.ty),M.width=Math.max(x.tx,T.tx,S.tx)-M.x,M.height=Math.max(x.ty,T.ty,S.ty)-M.y;var w=e.x+e.width,L=e.y+e.height;return M.width<=0||M.height<=0||e.width<=0||e.height<=0?!1:!(M.rightw||M.y>L)},scrollUV:function(e,i){return this.vertex1.scrollUV(e,i),this.vertex2.scrollUV(e,i),this.vertex3.scrollUV(e,i),this},scaleUV:function(e,i){return this.vertex1.scaleUV(e,i),this.vertex2.scaleUV(e,i),this.vertex3.scaleUV(e,i),this},setColor:function(e){return this.vertex1.color=e,this.vertex2.color=e,this.vertex3.color=e,this},update:function(e,i,h,s,l,f,u,d){return this.vertex1.update(i,h,s,l,f,u,d,e),this.vertex2.update(i,h,s,l,f,u,d,e),this.vertex3.update(i,h,s,l,f,u,d,e),this},translate:function(e,i){i===void 0&&(i=0);var h=this.vertex1,s=this.vertex2,l=this.vertex3;return h.x+=e,h.y+=i,s.x+=e,s.y+=i,l.x+=e,l.y+=i,this},x:{get:function(){return this.getInCenter().x},set:function(e){var i=this.getInCenter();this.translate(e-i.x,0)}},y:{get:function(){return this.getInCenter().y},set:function(e){var i=this.getInCenter();this.translate(0,e-i.y)}},alpha:{get:function(){var e=this.vertex1,i=this.vertex2,h=this.vertex3;return(e.alpha+i.alpha+h.alpha)/3},set:function(e){this.vertex1.alpha=e,this.vertex2.alpha=e,this.vertex3.alpha=e}},depth:{get:function(){var e=this.vertex1,i=this.vertex2,h=this.vertex3;return(e.vz+i.vz+h.vz)/3}},destroy:function(){this.vertex1=null,this.vertex2=null,this.vertex3=null}});v.exports=n},48803:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83997),c=t(95540),o=t(37867),r=t(25836),n=t(39318),e=new r,i=new r,h=new o,s=function(l){var f=c(l,"mesh"),u=c(l,"texture",null),d=c(l,"frame"),p=c(l,"width",1),g=c(l,"height",p),y=c(l,"widthSegments",1),x=c(l,"heightSegments",y),T=c(l,"x",0),S=c(l,"y",0),M=c(l,"z",0),w=c(l,"rotateX",0),L=c(l,"rotateY",0),F=c(l,"rotateZ",0),O=c(l,"zIsUp",!0),b=c(l,"isOrtho",f?f.dirtyCache[11]:!1),N=c(l,"colors",[16777215]),V=c(l,"alphas",[1]),K=c(l,"tile",!1),$=c(l,"flipY",!1),j=c(l,"width",null),X={faces:[],verts:[]};e.set(T,S,M),i.set(w,L,F),h.fromRotationXYTranslation(i,e,O);var Y;if(!u&&f)u=f.texture,d||(Y=f.frame);else if(f&&typeof u=="string")u=f.scene.sys.textures.get(u);else if(!u)return X;Y||(Y=u.get(d)),!j&&b&&u&&f&&(p=Y.width/f.height,g=Y.height/f.height);var D=p/2,z=g/2,W=Math.floor(y),H=Math.floor(x),J=W+1,Q=H+1,k=p/W,et=g/H,st=[],rt=[],ot,ft,at=0,ct=1,Et=0,St=1;Y&&(at=Y.u0,ct=Y.u1,$?(Et=Y.v1,St=Y.v0):(Et=Y.v0,St=Y.v1));var Ct=ct-at,vt=St-Et;for(ft=0;ft{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83997),c=t(37867),o=t(25836),r=t(39318),n=new o,e=new o,i=new c,h=function(s,l,f,u,d,p,g,y,x,T){f===void 0&&(f=1),u===void 0&&(u=0),d===void 0&&(d=0),p===void 0&&(p=0),g===void 0&&(g=0),y===void 0&&(y=0),x===void 0&&(x=0),T===void 0&&(T=!0);var S={faces:[],verts:[]},M=s.materials;n.set(u,d,p),e.set(g,y,x),i.fromRotationXYTranslation(e,n,T);for(var w=0;w{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83997),c=t(39318),o=function(r,n,e,i,h,s,l,f){if(i===void 0&&(i=!1),s===void 0&&(s=16777215),l===void 0&&(l=1),f===void 0&&(f=!1),r.length!==n.length&&!i){console.warn("GenerateVerts: vertices and uvs count not equal");return}var u={faces:[],vertices:[]},d,p,g,y,x,T,S,M,w,L,F,O=i?3:2,b=Array.isArray(s),N=Array.isArray(l);if(Array.isArray(e)&&e.length>0)for(d=0;d{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=!0,t="untitled",a="",c="";function o(p){var g=p.indexOf("#");return g>-1?p.substring(0,g):p}function r(p){return p.models.length===0&&p.models.push({faces:[],name:t,textureCoords:[],vertexNormals:[],vertices:[]}),a="",p.models[p.models.length-1]}function n(p,g){var y=p.length>=2?p[1]:t;g.models.push({faces:[],name:y,textureCoords:[],vertexNormals:[],vertices:[]}),a=""}function e(p){p.length===2&&(a=p[1])}function i(p,g){var y=p.length,x=y>=2?parseFloat(p[1]):0,T=y>=3?parseFloat(p[2]):0,S=y>=4?parseFloat(p[3]):0;r(g).vertices.push({x,y:T,z:S})}function h(p,g){var y=p.length,x=y>=2?parseFloat(p[1]):0,T=y>=3?parseFloat(p[2]):0,S=y>=4?parseFloat(p[3]):0;isNaN(x)&&(x=0),isNaN(T)&&(T=0),isNaN(S)&&(S=0),m&&(T=1-T),r(g).textureCoords.push({u:x,v:T,w:S})}function s(p,g){var y=p.length,x=y>=2?parseFloat(p[1]):0,T=y>=3?parseFloat(p[2]):0,S=y>=4?parseFloat(p[3]):0;r(g).vertexNormals.push({x,y:T,z:S})}function l(p,g){var y=p.length-1;if(!(y<3)){for(var x={group:a,material:c,vertices:[]},T=0;T3)){var L=0,F=0,O=0;L=parseInt(M[0],10),w>1&&M[1]!==""&&(F=parseInt(M[1],10)),w>2&&(O=parseInt(M[2],10)),L!==0&&(L<0&&(L=r(g).vertices.length+1+L),F-=1,L-=1,O-=1,x.vertices.push({textureCoordsIndex:F,vertexIndex:L,vertexNormalIndex:O}))}}r(g).faces.push(x)}}function f(p,g){p.length>=2&&g.materialLibraries.push(p[1])}function u(p){p.length>=2&&(c=p[1])}var d=function(p,g){g===void 0&&(g=!0),m=g;var y={materials:{},materialLibraries:[],models:[]};a="",c="";for(var x=p.split(` +`),T=0;T{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(37589),c=function(o){for(var r={},n=o.split(` +`),e="",i=0;i=2?Math.floor(s[2]*255):l,u=s.length>=3?Math.floor(s[3]*255):l;r[e]=a(l,f,u);break}}}}return r};v.exports=c},92570:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c,o){var r,n;if(c===void 0&&o===void 0){var e=t.getInCenter();r=e.x,n=e.y}var i=Math.cos(a),h=Math.sin(a),s=t.vertex1,l=t.vertex2,f=t.vertex3,u=s.x-r,d=s.y-n;s.set(u*i-d*h+r,u*h+d*i+n),u=l.x-r,d=l.y-n,l.set(u*i-d*h+r,u*h+d*i+n),u=f.x-r,d=f.y-n,f.set(u*i-d*h+r,u*h+d*i+n)};v.exports=m},39318:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(70554),o=t(25836),r=new a({Extends:o,initialize:function(e,i,h,s,l,f,u,d,p,g){f===void 0&&(f=16777215),u===void 0&&(u=1),d===void 0&&(d=0),p===void 0&&(p=0),g===void 0&&(g=0),o.call(this,e,i,h),this.vx=0,this.vy=0,this.vz=0,this.nx=d,this.ny=p,this.nz=g,this.u=s,this.v=l,this.color=f,this.alpha=u,this.tx=0,this.ty=0,this.ta=0,this.tu=s,this.tv=l},setUVs:function(n,e){return this.u=n,this.v=e,this.tu=n,this.tv=e,this},scrollUV:function(n,e){return this.tu+=n,this.tv+=e,this},scaleUV:function(n,e){return this.tu=this.u*n,this.tv=this.v*e,this},transformCoordinatesLocal:function(n,e,i,h){var s=this.x,l=this.y,f=this.z,u=n.val,d=s*u[0]+l*u[4]+f*u[8]+u[12],p=s*u[1]+l*u[5]+f*u[9]+u[13],g=s*u[2]+l*u[6]+f*u[10]+u[14],y=s*u[3]+l*u[7]+f*u[11]+u[15];this.vx=d/y*e,this.vy=-(p/y)*i,h<=0?this.vz=g/y:this.vz=-(g/y)},resize:function(n,e,i,h,s,l){return this.x=n,this.y=e,this.vx=this.x*i,this.vy=-this.y*h,this.vz=0,s<.5?this.vx+=i*(.5-s):s>.5&&(this.vx-=i*(s-.5)),l<.5?this.vy+=h*(.5-l):l>.5&&(this.vy-=h*(l-.5)),this},update:function(n,e,i,h,s,l,f,u){var d=this.vx*n+this.vy*i+s,p=this.vx*e+this.vy*h+l;return f&&(d=Math.round(d),p=Math.round(p)),this.tx=d,this.ty=p,this.ta=this.alpha*u,this},load:function(n,e,i,h,s){return n[++i]=this.tx,n[++i]=this.ty,n[++i]=this.tu,n[++i]=this.tv,n[++i]=h,n[++i]=s,e[++i]=c.getTintAppendFloatAlpha(this.color,this.ta),i}});v.exports=r},73090:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a={Face:t(83997),GenerateGridVerts:t(48803),GenerateObjVerts:t(34684),GenerateVerts:t(92515),ParseObj:t(85048),ParseObjMaterial:t(61485),RotateFace:t(92570),Vertex:t(39318)};v.exports=a},96550:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return t.setTo(Math.ceil(t.x),Math.ceil(t.y))};v.exports=m},99706:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(2141),c=function(o){return new a(o.x,o.y)};v.exports=c},68010:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){return a.setTo(t.x,t.y)};v.exports=m},27814:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){return t.x===a.x&&t.y===a.y};v.exports=m},73565:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return t.setTo(Math.floor(t.x),Math.floor(t.y))};v.exports=m},87555:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(2141),c=function(o,r){if(r===void 0&&(r=new a),!Array.isArray(o))throw new Error("GetCentroid points argument must be an array");var n=o.length;if(n<1)throw new Error("GetCentroid points array must not be empty");if(n===1)r.x=o[0].x,r.y=o[0].y;else{for(var e=0;e{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)};v.exports=m},44405:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return t.x*t.x+t.y*t.y};v.exports=m},20873:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(87841),c=function(o,r){r===void 0&&(r=new a);for(var n=Number.NEGATIVE_INFINITY,e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,h=Number.POSITIVE_INFINITY,s=0;sn&&(n=l.x),l.xi&&(i=l.y),l.y{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(2141),c=function(o,r,n,e){return n===void 0&&(n=0),e===void 0&&(e=new a),e.x=o.x+(r.x-o.x)*n,e.y=o.y+(r.y-o.y)*n,e};v.exports=c},55767:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return t.setTo(t.y,t.x)};v.exports=m},79432:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(2141),c=function(o,r){return r===void 0&&(r=new a),r.setTo(-o.x,-o.y)};v.exports=c},2141:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(23777),o=new a({initialize:function(n,e){n===void 0&&(n=0),e===void 0&&(e=n),this.type=c.POINT,this.x=n,this.y=e},setTo:function(r,n){return r===void 0&&(r=0),n===void 0&&(n=r),this.x=r,this.y=n,this}});v.exports=o},72930:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(2141),c=t(44405),o=function(r,n,e){e===void 0&&(e=new a);var i=r.x*n.x+r.y*n.y,h=i/c(n);return h!==0&&(e.x=h*n.x,e.y=h*n.y),e};v.exports=o},62880:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(2141),c=function(o,r,n){n===void 0&&(n=new a);var e=o.x*r.x+o.y*r.y;return e!==0&&(n.x=e*r.x,n.y=e*r.y),n};v.exports=c},15093:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(28793),c=function(o,r){if(o.x!==0||o.y!==0){var n=a(o);o.x/=n,o.y/=n}return o.x*=r,o.y*=r,o};v.exports=c},43711:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(2141);a.Ceil=t(96550),a.Clone=t(99706),a.CopyFrom=t(68010),a.Equals=t(27814),a.Floor=t(73565),a.GetCentroid=t(87555),a.GetMagnitude=t(28793),a.GetMagnitudeSq=t(44405),a.GetRectangleFromPoints=t(20873),a.Interpolate=t(26152),a.Invert=t(55767),a.Negative=t(79432),a.Project=t(72930),a.ProjectUnit=t(62880),a.SetMagnitude=t(15093),v.exports=a},12306:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(25717),c=function(o){return new a(o.points)};v.exports=c},63814:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){for(var o=!1,r=-1,n=t.points.length-1;++r{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(63814),c=function(o,r){return a(o,r.x,r.y)};v.exports=c},94811:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */function m(X,Y,D){D=D||2;var z=Y&&Y.length,W=z?Y[0]*D:X.length,H=t(X,0,W,D,!0),J=[];if(!H||H.next===H.prev)return J;var Q,k,et,st,rt,ot,ft;if(z&&(H=i(X,Y,H,D)),X.length>80*D){Q=et=X[0],k=st=X[1];for(var at=D;atet&&(et=rt),ot>st&&(st=ot);ft=Math.max(et-Q,st-k),ft=ft!==0?32767/ft:0}return c(H,J,D,Q,k,ft,0),J}function t(X,Y,D,z,W){var H,J;if(W===j(X,Y,D,z)>0)for(H=Y;H=Y;H-=z)J=V(H,X[H],X[H+1],J);return J&&S(J,J.next)&&(K(J),J=J.next),J}function a(X,Y){if(!X)return X;Y||(Y=X);var D=X,z;do if(z=!1,!D.steiner&&(S(D,D.next)||T(D.prev,D,D.next)===0)){if(K(D),D=Y=D.prev,D===D.next)break;z=!0}else D=D.next;while(z||D!==Y);return Y}function c(X,Y,D,z,W,H,J){if(X){!J&&H&&u(X,z,W,H);for(var Q=X,k,et;X.prev!==X.next;){if(k=X.prev,et=X.next,H?r(X,z,W,H):o(X)){Y.push(k.i/D|0),Y.push(X.i/D|0),Y.push(et.i/D|0),K(X),X=et.next,Q=et.next;continue}if(X=et,X===Q){J?J===1?(X=n(a(X),Y,D),c(X,Y,D,z,W,H,2)):J===2&&e(X,Y,D,z,W,H):c(a(X),Y,D,z,W,H,1);break}}}}function o(X){var Y=X.prev,D=X,z=X.next;if(T(Y,D,z)>=0)return!1;for(var W=Y.x,H=D.x,J=z.x,Q=Y.y,k=D.y,et=z.y,st=WH?W>J?W:J:H>J?H:J,ft=Q>k?Q>et?Q:et:k>et?k:et,at=z.next;at!==Y;){if(at.x>=st&&at.x<=ot&&at.y>=rt&&at.y<=ft&&y(W,Q,H,k,J,et,at.x,at.y)&&T(at.prev,at,at.next)>=0)return!1;at=at.next}return!0}function r(X,Y,D,z){var W=X.prev,H=X,J=X.next;if(T(W,H,J)>=0)return!1;for(var Q=W.x,k=H.x,et=J.x,st=W.y,rt=H.y,ot=J.y,ft=Qk?Q>et?Q:et:k>et?k:et,Et=st>rt?st>ot?st:ot:rt>ot?rt:ot,St=p(ft,at,Y,D,z),Ct=p(ct,Et,Y,D,z),vt=X.prevZ,Tt=X.nextZ;vt&&vt.z>=St&&Tt&&Tt.z<=Ct;){if(vt.x>=ft&&vt.x<=ct&&vt.y>=at&&vt.y<=Et&&vt!==W&&vt!==J&&y(Q,st,k,rt,et,ot,vt.x,vt.y)&&T(vt.prev,vt,vt.next)>=0||(vt=vt.prevZ,Tt.x>=ft&&Tt.x<=ct&&Tt.y>=at&&Tt.y<=Et&&Tt!==W&&Tt!==J&&y(Q,st,k,rt,et,ot,Tt.x,Tt.y)&&T(Tt.prev,Tt,Tt.next)>=0))return!1;Tt=Tt.nextZ}for(;vt&&vt.z>=St;){if(vt.x>=ft&&vt.x<=ct&&vt.y>=at&&vt.y<=Et&&vt!==W&&vt!==J&&y(Q,st,k,rt,et,ot,vt.x,vt.y)&&T(vt.prev,vt,vt.next)>=0)return!1;vt=vt.prevZ}for(;Tt&&Tt.z<=Ct;){if(Tt.x>=ft&&Tt.x<=ct&&Tt.y>=at&&Tt.y<=Et&&Tt!==W&&Tt!==J&&y(Q,st,k,rt,et,ot,Tt.x,Tt.y)&&T(Tt.prev,Tt,Tt.next)>=0)return!1;Tt=Tt.nextZ}return!0}function n(X,Y,D){var z=X;do{var W=z.prev,H=z.next.next;!S(W,H)&&M(W,z,z.next,H)&&O(W,H)&&O(H,W)&&(Y.push(W.i/D|0),Y.push(z.i/D|0),Y.push(H.i/D|0),K(z),K(z.next),z=X=H),z=z.next}while(z!==X);return a(z)}function e(X,Y,D,z,W,H){var J=X;do{for(var Q=J.next.next;Q!==J.prev;){if(J.i!==Q.i&&x(J,Q)){var k=N(J,Q);J=a(J,J.next),k=a(k,k.next),c(J,Y,D,z,W,H,0),c(k,Y,D,z,W,H,0);return}Q=Q.next}J=J.next}while(J!==X)}function i(X,Y,D,z){var W=[],H,J,Q,k,et;for(H=0,J=Y.length;H=D.next.y&&D.next.y!==D.y){var Q=D.x+(W-D.y)*(D.next.x-D.x)/(D.next.y-D.y);if(Q<=z&&Q>H&&(H=Q,J=D.x=D.x&&D.x>=et&&z!==D.x&&y(WJ.x||D.x===J.x&&f(J,D)))&&(J=D,rt=ot)),D=D.next;while(D!==k);return J}function f(X,Y){return T(X.prev,X,Y.prev)<0&&T(Y.next,X,X.next)<0}function u(X,Y,D,z){var W=X;do W.z===0&&(W.z=p(W.x,W.y,Y,D,z)),W.prevZ=W.prev,W.nextZ=W.next,W=W.next;while(W!==X);W.prevZ.nextZ=null,W.prevZ=null,d(W)}function d(X){var Y,D,z,W,H,J,Q,k,et=1;do{for(D=X,X=null,H=null,J=0;D;){for(J++,z=D,Q=0,Y=0;Y0||k>0&&z;)Q!==0&&(k===0||!z||D.z<=z.z)?(W=D,D=D.nextZ,Q--):(W=z,z=z.nextZ,k--),H?H.nextZ=W:X=W,W.prevZ=H,H=W;D=z}H.nextZ=null,et*=2}while(J>1);return X}function p(X,Y,D,z,W){return X=(X-D)*W|0,Y=(Y-z)*W|0,X=(X|X<<8)&16711935,X=(X|X<<4)&252645135,X=(X|X<<2)&858993459,X=(X|X<<1)&1431655765,Y=(Y|Y<<8)&16711935,Y=(Y|Y<<4)&252645135,Y=(Y|Y<<2)&858993459,Y=(Y|Y<<1)&1431655765,X|Y<<1}function g(X){var Y=X,D=X;do(Y.x=(X-J)*(H-Q)&&(X-J)*(z-Q)>=(D-J)*(Y-Q)&&(D-J)*(H-Q)>=(W-J)*(z-Q)}function x(X,Y){return X.next.i!==Y.i&&X.prev.i!==Y.i&&!F(X,Y)&&(O(X,Y)&&O(Y,X)&&b(X,Y)&&(T(X.prev,X,Y.prev)||T(X,Y.prev,Y))||S(X,Y)&&T(X.prev,X,X.next)>0&&T(Y.prev,Y,Y.next)>0)}function T(X,Y,D){return(Y.y-X.y)*(D.x-Y.x)-(Y.x-X.x)*(D.y-Y.y)}function S(X,Y){return X.x===Y.x&&X.y===Y.y}function M(X,Y,D,z){var W=L(T(X,Y,D)),H=L(T(X,Y,z)),J=L(T(D,z,X)),Q=L(T(D,z,Y));return!!(W!==H&&J!==Q||W===0&&w(X,D,Y)||H===0&&w(X,z,Y)||J===0&&w(D,X,z)||Q===0&&w(D,Y,z))}function w(X,Y,D){return Y.x<=Math.max(X.x,D.x)&&Y.x>=Math.min(X.x,D.x)&&Y.y<=Math.max(X.y,D.y)&&Y.y>=Math.min(X.y,D.y)}function L(X){return X>0?1:X<0?-1:0}function F(X,Y){var D=X;do{if(D.i!==X.i&&D.next.i!==X.i&&D.i!==Y.i&&D.next.i!==Y.i&&M(D,D.next,X,Y))return!0;D=D.next}while(D!==X);return!1}function O(X,Y){return T(X.prev,X,X.next)<0?T(X,Y,X.next)>=0&&T(X,X.prev,Y)>=0:T(X,Y,X.prev)<0||T(X,X.next,Y)<0}function b(X,Y){var D=X,z=!1,W=(X.x+Y.x)/2,H=(X.y+Y.y)/2;do D.y>H!=D.next.y>H&&D.next.y!==D.y&&W<(D.next.x-D.x)*(H-D.y)/(D.next.y-D.y)+D.x&&(z=!z),D=D.next;while(D!==X);return z}function N(X,Y){var D=new $(X.i,X.x,X.y),z=new $(Y.i,Y.x,Y.y),W=X.next,H=Y.prev;return X.next=Y,Y.prev=X,D.next=W,W.prev=D,z.next=D,D.prev=z,H.next=z,z.prev=H,z}function V(X,Y,D,z){var W=new $(X,Y,D);return z?(W.next=z.next,W.prev=z,z.next.prev=W,z.next=W):(W.prev=W,W.next=W),W}function K(X){X.next.prev=X.prev,X.prev.next=X.next,X.prevZ&&(X.prevZ.nextZ=X.nextZ),X.nextZ&&(X.nextZ.prevZ=X.prevZ)}function $(X,Y,D){this.i=X,this.x=Y,this.y=D,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}m.deviation=function(X,Y,D,z){var W=Y&&Y.length,H=W?Y[0]*D:X.length,J=Math.abs(j(X,0,H,D));if(W)for(var Q=0,k=Y.length;Q0&&(z+=X[W-1].length,D.holes.push(z))}return D},v.exports=m},13829:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(87841),c=function(o,r){r===void 0&&(r=new a);for(var n=1/0,e=1/0,i=-n,h=-e,s,l=0;l{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){a===void 0&&(a=[]);for(var c=0;c{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(35001),c=t(23031),o=t(30052),r=function(n,e,i,h){h===void 0&&(h=[]);var s=n.points,l=o(n);!e&&i>0&&(e=l/i);for(var f=0;fd+T){d+=T;continue}var S=x.getPoint((u-d)/T);h.push(S);break}return h};v.exports=r},30052:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(35001),c=t(23031),o=function(r){for(var n=r.points,e=0,i=0;i{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(63814),o=t(9564),r=t(23777),n=new a({initialize:function(i){this.type=r.POLYGON,this.area=0,this.points=[],i&&this.setTo(i)},contains:function(e,i){return c(this,e,i)},setTo:function(e){if(this.area=0,this.points=[],typeof e=="string"&&(e=e.split(" ")),!Array.isArray(e))return this;for(var i,h=0;h{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return t.points.reverse(),t};v.exports=m},29524:v=>{function m(n,e){var i=n.x-e.x,h=n.y-e.y;return i*i+h*h}function t(n,e,i){var h=e.x,s=e.y,l=i.x-h,f=i.y-s;if(l!==0||f!==0){var u=((n.x-h)*l+(n.y-s)*f)/(l*l+f*f);u>1?(h=i.x,s=i.y):u>0&&(h+=l*u,s+=f*u)}return l=n.x-h,f=n.y-s,l*l+f*f}function a(n,e){for(var i=n[0],h=[i],s,l=1,f=n.length;le&&(h.push(s),i=s);return i!==s&&h.push(s),h}function c(n,e,i,h,s){for(var l=h,f,u=e+1;ul&&(f=u,l=d)}l>h&&(f-e>1&&c(n,e,f,h,s),s.push(n[f]),i-f>1&&c(n,f,i,h,s))}function o(n,e){var i=n.length-1,h=[n[0]];return c(n,0,i,e,h),h.push(n[i]),h}var r=function(n,e,i){e===void 0&&(e=1),i===void 0&&(i=!1);var h=n.points;if(h.length>2){var s=e*e;i||(h=a(h,s)),n.setTo(o(h,s))}return n};v.exports=r},5469:v=>{/** + * @author Richard Davey + * @author Igor Ognichenko + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(a,c){return a[0]=c[0],a[1]=c[1],a},t=function(a){var c,o=[],r=a.points;for(c=0;c0&&n.push(m([0,0],o[0])),c=0;c1&&n.push(m([0,0],o[o.length-1])),a.setTo(n)};v.exports=t},24709:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){for(var o=t.points,r=0;r{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(25717);a.Clone=t(12306),a.Contains=t(63814),a.ContainsPoint=t(99338),a.Earcut=t(94811),a.GetAABB=t(13829),a.GetNumberArray=t(26173),a.GetPoints=t(9564),a.Perimeter=t(30052),a.Reverse=t(8133),a.Simplify=t(29524),a.Smooth=t(5469),a.Translate=t(24709),v.exports=a},62224:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return t.width*t.height};v.exports=m},98615:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return t.x=Math.ceil(t.x),t.y=Math.ceil(t.y),t};v.exports=m},31688:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return t.x=Math.ceil(t.x),t.y=Math.ceil(t.y),t.width=Math.ceil(t.width),t.height=Math.ceil(t.height),t};v.exports=m},67502:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){return t.x=a-t.width/2,t.y=c-t.height/2,t};v.exports=m},65085:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(87841),c=function(o){return new a(o.x,o.y,o.width,o.height)};v.exports=c},37303:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){return t.width<=0||t.height<=0?!1:t.x<=a&&t.x+t.width>=a&&t.y<=c&&t.y+t.height>=c};v.exports=m},96553:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(37303),c=function(o,r){return a(o,r.x,r.y)};v.exports=c},70273:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){return a.width*a.height>t.width*t.height?!1:a.x>t.x&&a.xt.x&&a.rightt.y&&a.yt.y&&a.bottom{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){return a.setTo(t.x,t.y,t.width,t.height)};v.exports=m},77493:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){return 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};v.exports=m},9219:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){return t.x===a.x&&t.y===a.y&&t.width===a.width&&t.height===a.height};v.exports=m},53751:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(8249),c=function(o,r){var n=a(o);return n{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(8249),c=function(o,r){var n=a(o);return n>a(r)?o.setSize(r.height*n,r.height):o.setSize(r.width,r.width/n),o.setPosition(r.centerX-o.width/2,r.centerY-o.height/2)};v.exports=c},80774:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t};v.exports=m},83859:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t.width=Math.floor(t.width),t.height=Math.floor(t.height),t};v.exports=m},19217:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(87841),c=t(36383),o=function(r,n){if(n===void 0&&(n=new a),r.length===0)return n;for(var e=Number.MAX_VALUE,i=Number.MAX_VALUE,h=c.MIN_SAFE_INTEGER,s=c.MIN_SAFE_INTEGER,l,f,u,d=0;d{/** + * @author samme + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(87841),c=function(o,r,n,e,i){return i===void 0&&(i=new a),i.setTo(Math.min(o,n),Math.min(r,e),Math.abs(o-n),Math.abs(r-e))};v.exports=c},8249:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return t.height===0?NaN:t.width/t.height};v.exports=m},27165:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(2141),c=function(o,r){return r===void 0&&(r=new a),r.x=o.centerX,r.y=o.centerY,r};v.exports=c},20812:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(13019),c=t(2141),o=function(r,n,e){if(e===void 0&&(e=new c),n<=0||n>=1)return e.x=r.x,e.y=r.y,e;var i=a(r)*n;return n>.5?(i-=r.width+r.height,i<=r.width?(e.x=r.right-i,e.y=r.bottom):(e.x=r.x,e.y=r.bottom-(i-r.width))):i<=r.width?(e.x=r.x+i,e.y=r.y):(e.x=r.right,e.y=r.y+(i-r.width)),e};v.exports=o},34819:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(20812),c=t(13019),o=function(r,n,e,i){i===void 0&&(i=[]),!n&&e>0&&(n=c(r)/e);for(var h=0;h{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(2141),c=function(o,r){return r===void 0&&(r=new a),r.x=o.width,r.y=o.height,r};v.exports=c},86091:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(67502),c=function(o,r,n){var e=o.centerX,i=o.centerY;return o.setSize(o.width+r*2,o.height+n*2),a(o,e,i)};v.exports=c},53951:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(87841),c=t(59996),o=function(r,n,e){return e===void 0&&(e=new a),c(r,n)?(e.x=Math.max(r.x,n.x),e.y=Math.max(r.y,n.y),e.width=Math.min(r.right,n.right)-e.x,e.height=Math.min(r.bottom,n.bottom)-e.y):e.setEmpty(),e};v.exports=o},14649:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(13019),c=t(2141),o=function(r,n,e,i){if(i===void 0&&(i=[]),!n&&!e)return i;n?e=Math.round(a(r)/n):n=a(r)/e;for(var h=r.x,s=r.y,l=0,f=0;f=r.right&&(l=1,s+=h-r.right,h=r.right);break;case 1:s+=n,s>=r.bottom&&(l=2,h-=s-r.bottom,s=r.bottom);break;case 2:h-=n,h<=r.left&&(l=3,s-=r.left-h,h=r.left);break;case 3:s-=n,s<=r.top&&(l=0,s=r.top);break}return i};v.exports=o},33595:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){for(var c=t.x,o=t.right,r=t.y,n=t.bottom,e=0;e{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){var c=Math.min(t.x,a.x),o=Math.max(t.right,a.right);t.x=c,t.width=o-c;var r=Math.min(t.y,a.y),n=Math.max(t.bottom,a.bottom);return t.y=r,t.height=n-r,t};v.exports=m},92171:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){var o=Math.min(t.x,a),r=Math.max(t.right,a);t.x=o,t.width=r-o;var n=Math.min(t.y,c),e=Math.max(t.bottom,c);return t.y=n,t.height=e-n,t};v.exports=m},42981:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){return t.x+=a,t.y+=c,t};v.exports=m},46907:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){return t.x+=a.x,t.y+=a.y,t};v.exports=m},60170:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){return t.xa.x&&t.ya.y};v.exports=m},13019:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return 2*(t.width+t.height)};v.exports=m},85133:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(2141),c=t(39506),o=function(r,n,e){e===void 0&&(e=new a),n=c(n);var i=Math.sin(n),h=Math.cos(n),s=h>0?r.width/2:r.width/-2,l=i>0?r.height/2:r.height/-2;return Math.abs(s*i){/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(2141),c=function(o,r){return r===void 0&&(r=new a),r.x=o.x+Math.random()*o.width,r.y=o.y+Math.random()*o.height,r};v.exports=c},86470:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(30976),c=t(70273),o=t(2141),r=function(n,e,i){if(i===void 0&&(i=new o),c(n,e))switch(a(0,3)){case 0:i.x=n.x+Math.random()*(e.right-n.x),i.y=n.y+Math.random()*(e.top-n.y);break;case 1:i.x=e.x+Math.random()*(n.right-e.x),i.y=e.bottom+Math.random()*(n.bottom-e.bottom);break;case 2:i.x=n.x+Math.random()*(e.x-n.x),i.y=e.y+Math.random()*(n.bottom-e.y);break;case 3:i.x=e.right+Math.random()*(n.right-e.right),i.y=n.y+Math.random()*(e.bottom-n.y);break}return i};v.exports=r},87841:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(37303),o=t(20812),r=t(34819),n=t(23777),e=t(23031),i=t(26597),h=new a({initialize:function(l,f,u,d){l===void 0&&(l=0),f===void 0&&(f=0),u===void 0&&(u=0),d===void 0&&(d=0),this.type=n.RECTANGLE,this.x=l,this.y=f,this.width=u,this.height=d},contains:function(s,l){return c(this,s,l)},getPoint:function(s,l){return o(this,s,l)},getPoints:function(s,l,f){return r(this,s,l,f)},getRandomPoint:function(s){return i(this,s)},setTo:function(s,l,f,u){return this.x=s,this.y=l,this.width=f,this.height=u,this},setEmpty:function(){return this.setTo(0,0,0,0)},setPosition:function(s,l){return l===void 0&&(l=s),this.x=s,this.y=l,this},setSize:function(s,l){return l===void 0&&(l=s),this.width=s,this.height=l,this},isEmpty:function(){return this.width<=0||this.height<=0},getLineA:function(s){return s===void 0&&(s=new e),s.setTo(this.x,this.y,this.right,this.y),s},getLineB:function(s){return s===void 0&&(s=new e),s.setTo(this.right,this.y,this.right,this.bottom),s},getLineC:function(s){return s===void 0&&(s=new e),s.setTo(this.right,this.bottom,this.x,this.bottom),s},getLineD:function(s){return s===void 0&&(s=new e),s.setTo(this.x,this.bottom,this.x,this.y),s},left:{get:function(){return this.x},set:function(s){s>=this.right?this.width=0:this.width=this.right-s,this.x=s}},right:{get:function(){return this.x+this.width},set:function(s){s<=this.x?this.width=0:this.width=s-this.x}},top:{get:function(){return this.y},set:function(s){s>=this.bottom?this.height=0:this.height=this.bottom-s,this.y=s}},bottom:{get:function(){return this.y+this.height},set:function(s){s<=this.y?this.height=0:this.height=s-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(s){this.x=s-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(s){this.y=s-this.height/2}}});v.exports=h},94845:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){return t.width===a.width&&t.height===a.height};v.exports=m},31730:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){return c===void 0&&(c=a),t.width*=a,t.height*=c,t};v.exports=m},36899:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(87841),c=function(o,r,n){n===void 0&&(n=new a);var e=Math.min(o.x,r.x),i=Math.min(o.y,r.y),h=Math.max(o.right,r.right)-e,s=Math.max(o.bottom,r.bottom)-i;return n.setTo(e,i,h,s)};v.exports=c},93232:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(87841);a.Area=t(62224),a.Ceil=t(98615),a.CeilAll=t(31688),a.CenterOn=t(67502),a.Clone=t(65085),a.Contains=t(37303),a.ContainsPoint=t(96553),a.ContainsRect=t(70273),a.CopyFrom=t(43459),a.Decompose=t(77493),a.Equals=t(9219),a.FitInside=t(53751),a.FitOutside=t(16088),a.Floor=t(80774),a.FloorAll=t(83859),a.FromPoints=t(19217),a.FromXY=t(9477),a.GetAspectRatio=t(8249),a.GetCenter=t(27165),a.GetPoint=t(20812),a.GetPoints=t(34819),a.GetSize=t(51313),a.Inflate=t(86091),a.Intersection=t(53951),a.MarchingAnts=t(14649),a.MergePoints=t(33595),a.MergeRect=t(20074),a.MergeXY=t(92171),a.Offset=t(42981),a.OffsetPoint=t(46907),a.Overlaps=t(60170),a.Perimeter=t(13019),a.PerimeterPoint=t(85133),a.Random=t(26597),a.RandomOutside=t(86470),a.SameDimensions=t(94845),a.Scale=t(31730),a.Union=t(36899),v.exports=a},41658:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){var a=t.x1,c=t.y1,o=t.x2,r=t.y2,n=t.x3,e=t.y3;return Math.abs(((n-a)*(r-c)-(o-a)*(e-c))/2)};v.exports=m},39208:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(16483),c=function(o,r,n){var e=n*(Math.sqrt(3)/2),i=o,h=r,s=o+n/2,l=r+e,f=o-n/2,u=r+e;return new a(i,h,s,l,f,u)};v.exports=c},39545:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(94811),c=t(16483),o=function(r,n,e,i,h){n===void 0&&(n=null),e===void 0&&(e=1),i===void 0&&(i=1),h===void 0&&(h=[]);for(var s=a(r,n),l,f,u,d,p,g,y,x,T,S=0;S{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(16483),c=function(o,r,n,e){e===void 0&&(e=n);var i=o,h=r,s=o,l=r-e,f=o+n,u=r;return new a(i,h,s,l,f,u)};v.exports=c},23707:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(97523),c=t(13584),o=function(r,n,e,i){i===void 0&&(i=a);var h=i(r),s=n-h.x,l=e-h.y;return c(r,s,l)};v.exports=o},97523:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(2141),c=function(o,r){return r===void 0&&(r=new a),r.x=(o.x1+o.x2+o.x3)/3,r.y=(o.y1+o.y2+o.y3)/3,r};v.exports=c},24951:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(26099);function c(r,n,e,i){return r*i-n*e}var o=function(r,n){n===void 0&&(n=new a);var e=r.x3,i=r.y3,h=r.x1-e,s=r.y1-i,l=r.x2-e,f=r.y2-i,u=2*c(h,s,l,f),d=c(s,h*h+s*s,f,l*l+f*f),p=c(h,h*h+s*s,l,l*l+f*f);return n.x=e-d/u,n.y=i+p/u,n};v.exports=o},85614:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(96503),c=function(o,r){r===void 0&&(r=new a);var n=o.x1,e=o.y1,i=o.x2,h=o.y2,s=o.x3,l=o.y3,f=i-n,u=h-e,d=s-n,p=l-e,g=f*(n+i)+u*(e+h),y=d*(n+s)+p*(e+l),x=2*(f*(l-h)-u*(s-i)),T,S;if(Math.abs(x)<1e-6){var M=Math.min(n,i,s),w=Math.min(e,h,l);T=(Math.max(n,i,s)-M)*.5,S=(Math.max(e,h,l)-w)*.5,r.x=M+T,r.y=w+S,r.radius=Math.sqrt(T*T+S*S)}else r.x=(p*g-u*y)/x,r.y=(f*y-d*g)/x,T=r.x-n,S=r.y-e,r.radius=Math.sqrt(T*T+S*S);return r};v.exports=c},74422:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(16483),c=function(o){return new a(o.x1,o.y1,o.x2,o.y2,o.x3,o.y3)};v.exports=c},10690:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){var o=t.x3-t.x1,r=t.y3-t.y1,n=t.x2-t.x1,e=t.y2-t.y1,i=a-t.x1,h=c-t.y1,s=o*o+r*r,l=o*n+r*e,f=o*i+r*h,u=n*n+e*e,d=n*i+e*h,p=s*u-l*l,g=p===0?0:1/p,y=(u*f-l*d)*g,x=(s*d-l*f)*g;return y>=0&&x>=0&&y+x<1};v.exports=m},48653:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c,o){c===void 0&&(c=!1),o===void 0&&(o=[]);for(var r=t.x3-t.x1,n=t.y3-t.y1,e=t.x2-t.x1,i=t.y2-t.y1,h=r*r+n*n,s=r*e+n*i,l=e*e+i*i,f=h*l-s*s,u=f===0?0:1/f,d,p,g,y,x,T,S=t.x1,M=t.y1,w=0;w=0&&p>=0&&d+p<1&&(o.push({x:a[w].x,y:a[w].y}),c)));w++);return o};v.exports=m},96006:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(10690),c=function(o,r){return a(o,r.x,r.y)};v.exports=c},71326:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){return a.setTo(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)};v.exports=m},71694:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){return 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};v.exports=m},33522:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){return t.x1===a.x1&&t.y1===a.y1&&t.x2===a.x2&&t.y2===a.y2&&t.x3===a.x3&&t.y3===a.y3};v.exports=m},20437:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(2141),c=t(35001),o=function(r,n,e){e===void 0&&(e=new a);var i=r.getLineA(),h=r.getLineB(),s=r.getLineC();if(n<=0||n>=1)return e.x=i.x1,e.y=i.y1,e;var l=c(i),f=c(h),u=c(s),d=l+f+u,p=d*n,g=0;return pl+f?(p-=l+f,g=p/u,e.x=s.x1+(s.x2-s.x1)*g,e.y=s.y1+(s.y2-s.y1)*g):(p-=l,g=p/f,e.x=h.x1+(h.x2-h.x1)*g,e.y=h.y1+(h.y2-h.y1)*g),e};v.exports=o},80672:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(35001),c=t(2141),o=function(r,n,e,i){i===void 0&&(i=[]);var h=r.getLineA(),s=r.getLineB(),l=r.getLineC(),f=a(h),u=a(s),d=a(l),p=f+u+d;!n&&e>0&&(n=p/e);for(var g=0;gf+u?(y-=f+u,x=y/d,T.x=l.x1+(l.x2-l.x1)*x,T.y=l.y1+(l.y2-l.y1)*x):(y-=f,x=y/u,T.x=s.x1+(s.x2-s.x1)*x,T.y=s.y1+(s.y2-s.y1)*x),i.push(T)}return i};v.exports=o},39757:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(2141);function c(r,n,e,i){var h=r-e,s=n-i,l=h*h+s*s;return Math.sqrt(l)}var o=function(r,n){n===void 0&&(n=new a);var e=r.x1,i=r.y1,h=r.x2,s=r.y2,l=r.x3,f=r.y3,u=c(l,f,h,s),d=c(e,i,l,f),p=c(h,s,e,i),g=u+d+p;return n.x=(e*u+h*d+l*p)/g,n.y=(i*u+s*d+f*p)/g,n};v.exports=o},13584:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){return t.x1+=a,t.y1+=c,t.x2+=a,t.y2+=c,t.x3+=a,t.y3+=c,t};v.exports=m},1376:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(35001),c=function(o){var r=o.getLineA(),n=o.getLineB(),e=o.getLineC();return a(r)+a(n)+a(e)};v.exports=c},90260:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(2141),c=function(o,r){r===void 0&&(r=new a);var n=o.x2-o.x1,e=o.y2-o.y1,i=o.x3-o.x1,h=o.y3-o.y1,s=Math.random(),l=Math.random();return s+l>=1&&(s=1-s,l=1-l),r.x=o.x1+(n*s+i*l),r.y=o.y1+(e*s+h*l),r};v.exports=c},52172:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(99614),c=t(39757),o=function(r,n){var e=c(r);return a(r,e.x,e.y,n)};v.exports=o},49907:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(99614),c=function(o,r,n){return a(o,r.x,r.y,n)};v.exports=c},99614:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c,o){var r=Math.cos(o),n=Math.sin(o),e=t.x1-a,i=t.y1-c;return t.x1=e*r-i*n+a,t.y1=e*n+i*r+c,e=t.x2-a,i=t.y2-c,t.x2=e*r-i*n+a,t.y2=e*n+i*r+c,e=t.x3-a,i=t.y3-c,t.x3=e*r-i*n+a,t.y3=e*n+i*r+c,t};v.exports=m},16483:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(10690),o=t(20437),r=t(80672),n=t(23777),e=t(23031),i=t(90260),h=new a({initialize:function(l,f,u,d,p,g){l===void 0&&(l=0),f===void 0&&(f=0),u===void 0&&(u=0),d===void 0&&(d=0),p===void 0&&(p=0),g===void 0&&(g=0),this.type=n.TRIANGLE,this.x1=l,this.y1=f,this.x2=u,this.y2=d,this.x3=p,this.y3=g},contains:function(s,l){return c(this,s,l)},getPoint:function(s,l){return o(this,s,l)},getPoints:function(s,l,f){return r(this,s,l,f)},getRandomPoint:function(s){return i(this,s)},setTo:function(s,l,f,u,d,p){return s===void 0&&(s=0),l===void 0&&(l=0),f===void 0&&(f=0),u===void 0&&(u=0),d===void 0&&(d=0),p===void 0&&(p=0),this.x1=s,this.y1=l,this.x2=f,this.y2=u,this.x3=d,this.y3=p,this},getLineA:function(s){return s===void 0&&(s=new e),s.setTo(this.x1,this.y1,this.x2,this.y2),s},getLineB:function(s){return s===void 0&&(s=new e),s.setTo(this.x2,this.y2,this.x3,this.y3),s},getLineC:function(s){return s===void 0&&(s=new e),s.setTo(this.x3,this.y3,this.x1,this.y1),s},left:{get:function(){return Math.min(this.x1,this.x2,this.x3)},set:function(s){var l=0;this.x1<=this.x2&&this.x1<=this.x3?l=this.x1-s:this.x2<=this.x1&&this.x2<=this.x3?l=this.x2-s:l=this.x3-s,this.x1-=l,this.x2-=l,this.x3-=l}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(s){var l=0;this.x1>=this.x2&&this.x1>=this.x3?l=this.x1-s:this.x2>=this.x1&&this.x2>=this.x3?l=this.x2-s:l=this.x3-s,this.x1-=l,this.x2-=l,this.x3-=l}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(s){var l=0;this.y1<=this.y2&&this.y1<=this.y3?l=this.y1-s:this.y2<=this.y1&&this.y2<=this.y3?l=this.y2-s:l=this.y3-s,this.y1-=l,this.y2-=l,this.y3-=l}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(s){var l=0;this.y1>=this.y2&&this.y1>=this.y3?l=this.y1-s:this.y2>=this.y1&&this.y2>=this.y3?l=this.y2-s:l=this.y3-s,this.y1-=l,this.y2-=l,this.y3-=l}}});v.exports=h},84435:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(16483);a.Area=t(41658),a.BuildEquilateral=t(39208),a.BuildFromPolygon=t(39545),a.BuildRight=t(90301),a.CenterOn=t(23707),a.Centroid=t(97523),a.CircumCenter=t(24951),a.CircumCircle=t(85614),a.Clone=t(74422),a.Contains=t(10690),a.ContainsArray=t(48653),a.ContainsPoint=t(96006),a.CopyFrom=t(71326),a.Decompose=t(71694),a.Equals=t(33522),a.GetPoint=t(20437),a.GetPoints=t(80672),a.InCenter=t(39757),a.Perimeter=t(1376),a.Offset=t(13584),a.Random=t(90260),a.Rotate=t(52172),a.RotateAroundPoint=t(49907),a.RotateAroundXY=t(99614),v.exports=a},74457:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){return{gameObject:t,enabled:!0,draggable:!1,dropZone:!1,cursor:!1,target:null,camera:null,hitArea:a,hitAreaCallback:c,hitAreaDebug:null,customHitArea:!1,localX:0,localY:0,dragState:0,dragStartX:0,dragStartY:0,dragStartXGlobal:0,dragStartYGlobal:0,dragX:0,dragY:0}};v.exports=m},84409:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){return function(c,o,r,n){var e=t.getPixelAlpha(o,r,n.texture.key,n.frame.name);return e&&e>=a}};v.exports=m},7003:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(93301),o=t(50792),r=t(8214),n=t(8443),e=t(78970),i=t(85098),h=t(42515),s=t(36210),l=t(61340),f=t(85955),u=new a({initialize:function(p,g){this.game=p,this.scaleManager,this.canvas,this.config=g,this.enabled=!0,this.events=new o,this.isOver=!0,this.defaultCursor="",this.keyboard=g.inputKeyboard?new e(this):null,this.mouse=g.inputMouse?new i(this):null,this.touch=g.inputTouch?new s(this):null,this.pointers=[],this.pointersTotal=g.inputActivePointers,g.inputTouch&&this.pointersTotal===1&&(this.pointersTotal=2);for(var y=0;y<=this.pointersTotal;y++){var x=new h(this,y);x.smoothFactor=g.inputSmoothFactor,this.pointers.push(x)}this.mousePointer=g.inputMouse?this.pointers[0]:null,this.activePointer=this.pointers[0],this.globalTopOnly=!0,this.time=0,this._tempPoint={x:0,y:0},this._tempHitTest=[],this._tempMatrix=new l,this._tempMatrix2=new l,this._tempSkip=!1,this.mousePointerContainer=[this.mousePointer],p.events.once(n.BOOT,this.boot,this)},boot:function(){var d=this.game,p=d.events;this.canvas=d.canvas,this.scaleManager=d.scale,this.events.emit(r.MANAGER_BOOT),p.on(n.PRE_RENDER,this.preRender,this),p.once(n.DESTROY,this.destroy,this)},setCanvasOver:function(d){this.isOver=!0,this.events.emit(r.GAME_OVER,d)},setCanvasOut:function(d){this.isOver=!1,this.events.emit(r.GAME_OUT,d)},preRender:function(){var d=this.game.loop.now,p=this.game.loop.delta,g=this.game.scene.getScenes(!0,!0);this.time=d,this.events.emit(r.MANAGER_UPDATE);for(var y=0;y10&&(d=10-this.pointersTotal);for(var g=0;g{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(96503),c=t(87902),o=t(83419),r=t(93301),n=t(74457),e=t(84409),i=t(20339),h=t(8497),s=t(81154),l=t(8214),f=t(50792),u=t(95540),d=t(23777),p=t(89639),g=t(41212),y=t(37277),x=t(87841),T=t(37303),S=t(44594),M=t(16483),w=t(10690),L=new o({Extends:f,initialize:function(O){f.call(this),this.scene=O,this.systems=O.sys,this.settings=O.sys.settings,this.manager=O.sys.game.input,this.pluginEvents=new f,this.enabled=!0,this.displayList,this.cameras,p.install(this),this.mouse=this.manager.mouse,this.topOnly=!0,this.pollRate=-1,this._pollTimer=0;var b={cancelled:!1};this._eventContainer={stopPropagation:function(){b.cancelled=!0}},this._eventData=b,this.dragDistanceThreshold=0,this.dragTimeThreshold=0,this._temp=[],this._tempZones=[],this._list=[],this._pendingInsertion=[],this._pendingRemoval=[],this._draggable=[],this._drag={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._dragState=[],this._over={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._validTypes=["onDown","onUp","onOver","onOut","onMove","onDragStart","onDrag","onDragEnd","onDragEnter","onDragLeave","onDragOver","onDrop"],this._updatedThisFrame=!1,O.sys.events.once(S.BOOT,this.boot,this),O.sys.events.on(S.START,this.start,this)},boot:function(){this.cameras=this.systems.cameras,this.displayList=this.systems.displayList,this.systems.events.once(S.DESTROY,this.destroy,this),this.pluginEvents.emit(l.BOOT)},start:function(){var F=this.systems.events;F.on(S.TRANSITION_START,this.transitionIn,this),F.on(S.TRANSITION_OUT,this.transitionOut,this),F.on(S.TRANSITION_COMPLETE,this.transitionComplete,this),F.on(S.PRE_UPDATE,this.preUpdate,this),F.once(S.SHUTDOWN,this.shutdown,this),this.manager.events.on(l.GAME_OUT,this.onGameOut,this),this.manager.events.on(l.GAME_OVER,this.onGameOver,this),this.enabled=!0,this._dragState=[0,0,0,0,0,0,0,0,0,0],this.pluginEvents.emit(l.START)},onGameOver:function(F){this.isActive()&&this.emit(l.GAME_OVER,F.timeStamp,F)},onGameOut:function(F){this.isActive()&&this.emit(l.GAME_OUT,F.timeStamp,F)},preUpdate:function(){this.pluginEvents.emit(l.PRE_UPDATE);var F=this._pendingRemoval,O=this._pendingInsertion,b=F.length,N=O.length;if(!(b===0&&N===0)){for(var V=this._list,K=0;K-1&&(V.splice(j,1),this.clear($,!0))}this._pendingRemoval.length=0,this._list=V.concat(O.splice(0))}},isActive:function(){return this.enabled&&this.scene.sys.canInput()},updatePoll:function(F,O){if(!this.isActive())return!1;if(this.pluginEvents.emit(l.UPDATE,F,O),this._updatedThisFrame)return this._updatedThisFrame=!1,!1;var b,N=this.manager,V=N.pointers,K=N.pointersTotal;for(b=0;b0)if(this._pollTimer-=O,this._pollTimer<0)this._pollTimer=this.pollRate;else return!1;var j=!1;for(b=0;b0&&(j=!0)}return j},update:function(F,O){if(!this.isActive())return!1;for(var b=O.length,N=!1,V=0;V0&&(N=!0)}return this._updatedThisFrame=!0,N},clear:function(F,O){O===void 0&&(O=!1),this.disable(F);var b=F.input;b&&(this.removeDebug(F),this.manager.resetCursor(b),b.gameObject=void 0,b.target=void 0,b.hitArea=void 0,b.hitAreaCallback=void 0,b.callbackContext=void 0,F.input=null),O||this.queueForRemoval(F);var N=this._draggable.indexOf(F);return N>-1&&this._draggable.splice(N,1),F},disable:function(F){var O=F.input;O&&(O.enabled=!1,O.dragState=0);for(var b=this._drag,N=this._over,V=this.manager,K=0,$;K-1&&b[K].splice($,1),$=N[K].indexOf(F),$>-1&&N[K].splice($,1);return this},enable:function(F,O,b,N){return N===void 0&&(N=!1),F.input?F.input.enabled=!0:this.setHitArea(F,O,b),F.input&&N&&!F.input.dropZone&&(F.input.dropZone=N),this},hitTestPointer:function(F){for(var O=this.cameras.getCamerasBelowPointer(F),b=0;b0)return F.camera=N,V}return F.camera=O[0],[]},processDownEvents:function(F){var O=0,b=this._temp,N=this._eventData,V=this._eventContainer;N.cancelled=!1;for(var K=!1,$=0;$0&&i(F.x,F.y,F.downX,F.downY)>=V||N>0&&O>=F.downTime+N)&&(b=!0),b)return this.setDragState(F,3),this.processDragStartList(F)},processDragStartList:function(F){if(this.getDragState(F)!==3)return 0;for(var O=this._drag[F.id],b=0;b1&&(this.sortGameObjects(b,F),this.topOnly&&b.splice(1)),this._drag[F.id]=b,this.dragDistanceThreshold===0&&this.dragTimeThreshold===0?(this.setDragState(F,3),this.processDragStartList(F)):(this.setDragState(F,2),0))},processDragMoveEvent:function(F){if(this.getDragState(F)===2&&this.processDragThresholdEvent(F,this.manager.game.loop.now),this.getDragState(F)!==4)return 0;for(var O=this._tempZones,b=this._drag[F.id],N=0;N0?(V.emit(l.GAMEOBJECT_DRAG_LEAVE,F,$),this.emit(l.DRAG_LEAVE,F,V,$),K.target=O[0],$=K.target,V.emit(l.GAMEOBJECT_DRAG_ENTER,F,$),this.emit(l.DRAG_ENTER,F,V,$)):(V.emit(l.GAMEOBJECT_DRAG_LEAVE,F,$),this.emit(l.DRAG_LEAVE,F,V,$),O[0]?(K.target=O[0],$=K.target,V.emit(l.GAMEOBJECT_DRAG_ENTER,F,$),this.emit(l.DRAG_ENTER,F,V,$)):K.target=null)}else!$&&O[0]&&(K.target=O[0],$=K.target,V.emit(l.GAMEOBJECT_DRAG_ENTER,F,$),this.emit(l.DRAG_ENTER,F,V,$));var X,Y;if(!V.parentContainer)X=F.worldX-K.dragX,Y=F.worldY-K.dragY;else{var D=F.worldX-K.dragStartXGlobal,z=F.worldY-K.dragStartYGlobal,W=V.getParentRotation(),H=D*Math.cos(W)+z*Math.sin(W),J=z*Math.cos(W)-D*Math.sin(W);H*=1/V.parentContainer.scaleX,J*=1/V.parentContainer.scaleY,X=H+K.dragStartX,Y=J+K.dragStartY}V.emit(l.GAMEOBJECT_DRAG,F,X,Y),this.emit(l.DRAG,F,V,X,Y)}return b.length},processDragUpEvent:function(F){for(var O=this._drag[F.id],b=0;b0){var K=this.manager,$=this._eventData,j=this._eventContainer;$.cancelled=!1;for(var X=!1,Y=0;Y0){var V=this.manager,K=this._eventData,$=this._eventContainer;K.cancelled=!1;var j=!1;this.sortGameObjects(O,F);for(var X=0;X0){for(this.sortGameObjects(V,F),b=0;b0){for(this.sortGameObjects(K,F),b=0;b-1&&this._draggable.splice(V,1)}return this},makePixelPerfect:function(F){F===void 0&&(F=1);var O=this.systems.textures;return e(O,F)},setHitArea:function(F,O,b){if(O===void 0)return this.setHitAreaFromTexture(F);Array.isArray(F)||(F=[F]);var N=!1,V=!1,K=!1,$=!1,j=!1,X=!0;if(g(O)&&Object.keys(O).length){var Y=O,D=F.some(function(Q){return Q.hasOwnProperty("faces")});if(!D){O=u(Y,"hitArea",null),b=u(Y,"hitAreaCallback",null),j=u(Y,"pixelPerfect",!1);var z=u(Y,"alphaTolerance",1);j&&(O={},b=this.makePixelPerfect(z))}N=u(Y,"draggable",!1),V=u(Y,"dropZone",!1),K=u(Y,"cursor",!1),$=u(Y,"useHandCursor",!1),(!O||!b)&&(this.setHitAreaFromTexture(F),X=!1)}else typeof O=="function"&&!b&&(b=O,O={});for(var W=0;W{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(35154),c={},o={};o.register=function(r,n,e,i,h){c[r]={plugin:n,mapping:e,settingsKey:i,configKey:h}},o.getPlugin=function(r){return c[r]},o.install=function(r){var n=r.scene.sys,e=n.settings.input,i=n.game.config;for(var h in c){var s=c[h].plugin,l=c[h].mapping,f=c[h].settingsKey,u=c[h].configKey;a(e,f,i[u])&&(r[l]=new s(r))}},o.remove=function(r){c.hasOwnProperty(r)&&delete c[r]},v.exports=o},42515:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(31040),c=t(83419),o=t(20339),r=t(43855),n=t(47235),e=t(26099),i=t(25892),h=new c({initialize:function(l,f){this.manager=l,this.id=f,this.event,this.downElement,this.upElement,this.camera=null,this.button=0,this.buttons=0,this.position=new e,this.prevPosition=new e,this.midPoint=new e(-1,-1),this.velocity=new e,this.angle=0,this.distance=0,this.smoothFactor=0,this.motionFactor=.2,this.worldX=0,this.worldY=0,this.moveTime=0,this.downX=0,this.downY=0,this.downTime=0,this.upX=0,this.upY=0,this.upTime=0,this.primaryDown=!1,this.isDown=!1,this.wasTouch=!1,this.wasCanceled=!1,this.movementX=0,this.movementY=0,this.identifier=0,this.pointerId=null,this.active=f===0,this.locked=!1,this.deltaX=0,this.deltaY=0,this.deltaZ=0},updateWorldPoint:function(s){var l=s.getWorldPoint(this.x,this.y);return this.worldX=l.x,this.worldY=l.y,this},positionToCamera:function(s,l){return s.getWorldPoint(this.x,this.y,l)},updateMotion:function(){var s=this.position.x,l=this.position.y,f=this.midPoint.x,u=this.midPoint.y;if(!(s===f&&l===u)){var d=n(this.motionFactor,f,s),p=n(this.motionFactor,u,l);r(d,s,.1)&&(d=s),r(p,l,.1)&&(p=l),this.midPoint.set(d,p);var g=s-d,y=l-p;this.velocity.set(g,y),this.angle=a(d,p,s,l),this.distance=Math.sqrt(g*g+y*y)}},up:function(s){"buttons"in s&&(this.buttons=s.buttons),this.event=s,this.button=s.button,this.upElement=s.target,this.manager.transformPointer(this,s.pageX,s.pageY,!1),s.button===0&&(this.primaryDown=!1,this.upX=this.x,this.upY=this.y),this.buttons===0&&(this.isDown=!1,this.upTime=s.timeStamp,this.wasTouch=!1)},down:function(s){"buttons"in s&&(this.buttons=s.buttons),this.event=s,this.button=s.button,this.downElement=s.target,this.manager.transformPointer(this,s.pageX,s.pageY,!1),s.button===0&&(this.primaryDown=!0,this.downX=this.x,this.downY=this.y),i.macOS&&s.ctrlKey&&(this.buttons=2,this.primaryDown=!1),this.isDown||(this.isDown=!0,this.downTime=s.timeStamp),this.wasTouch=!1},move:function(s){"buttons"in s&&(this.buttons=s.buttons),this.event=s,this.manager.transformPointer(this,s.pageX,s.pageY,!0),this.locked&&(this.movementX=s.movementX||s.mozMovementX||s.webkitMovementX||0,this.movementY=s.movementY||s.mozMovementY||s.webkitMovementY||0),this.moveTime=s.timeStamp,this.wasTouch=!1},wheel:function(s){"buttons"in s&&(this.buttons=s.buttons),this.event=s,this.manager.transformPointer(this,s.pageX,s.pageY,!1),this.deltaX=s.deltaX,this.deltaY=s.deltaY,this.deltaZ=s.deltaZ,this.wasTouch=!1},touchstart:function(s,l){s.pointerId&&(this.pointerId=s.pointerId),this.identifier=s.identifier,this.target=s.target,this.active=!0,this.buttons=1,this.event=l,this.downElement=s.target,this.manager.transformPointer(this,s.pageX,s.pageY,!1),this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=l.timeStamp,this.isDown=!0,this.wasTouch=!0,this.wasCanceled=!1,this.updateMotion()},touchmove:function(s,l){this.event=l,this.manager.transformPointer(this,s.pageX,s.pageY,!0),this.moveTime=l.timeStamp,this.wasTouch=!0,this.updateMotion()},touchend:function(s,l){this.buttons=0,this.event=l,this.upElement=s.target,this.manager.transformPointer(this,s.pageX,s.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=l.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!1,this.active=!1,this.updateMotion()},touchcancel:function(s,l){this.buttons=0,this.event=l,this.upElement=s.target,this.manager.transformPointer(this,s.pageX,s.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=l.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!0,this.active=!1},noButtonDown:function(){return this.buttons===0},leftButtonDown:function(){return!!(this.buttons&1)},rightButtonDown:function(){return!!(this.buttons&2)},middleButtonDown:function(){return!!(this.buttons&4)},backButtonDown:function(){return!!(this.buttons&8)},forwardButtonDown:function(){return!!(this.buttons&16)},leftButtonReleased:function(){return this.button===0&&!this.isDown},rightButtonReleased:function(){return this.button===2&&!this.isDown},middleButtonReleased:function(){return this.button===1&&!this.isDown},backButtonReleased:function(){return this.button===3&&!this.isDown},forwardButtonReleased:function(){return this.button===4&&!this.isDown},getDistance:function(){return this.isDown?o(this.downX,this.downY,this.x,this.y):o(this.downX,this.downY,this.upX,this.upY)},getDistanceX:function(){return this.isDown?Math.abs(this.downX-this.x):Math.abs(this.downX-this.upX)},getDistanceY:function(){return this.isDown?Math.abs(this.downY-this.y):Math.abs(this.downY-this.upY)},getDuration:function(){return this.isDown?this.manager.time-this.downTime:this.upTime-this.downTime},getAngle:function(){return this.isDown?a(this.downX,this.downY,this.x,this.y):a(this.downX,this.downY,this.upX,this.upY)},getInterpolatedPosition:function(s,l){s===void 0&&(s=10),l===void 0&&(l=[]);for(var f=this.prevPosition.x,u=this.prevPosition.y,d=this.position.x,p=this.position.y,g=0;g{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m={MOUSE_DOWN:0,MOUSE_MOVE:1,MOUSE_UP:2,TOUCH_START:3,TOUCH_MOVE:4,TOUCH_END:5,POINTER_LOCK_CHANGE:6,TOUCH_CANCEL:7,MOUSE_WHEEL:8};v.exports=m},7179:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="boot"},85375:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="destroy"},39843:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="dragend"},23388:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="dragenter"},16133:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="drag"},27829:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="dragleave"},53904:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="dragover"},56058:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="dragstart"},2642:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="drop"},88171:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="gameobjectdown"},36147:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="dragend"},71692:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="dragenter"},96149:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="drag"},81285:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="dragleave"},74048:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="dragover"},21322:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="dragstart"},49378:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="drop"},86754:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="gameobjectmove"},86433:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="gameobjectout"},60709:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="gameobjectover"},24081:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="pointerdown"},11172:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="pointermove"},18907:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="pointerout"},95579:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="pointerover"},35368:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="pointerup"},26972:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="wheel"},47078:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="gameobjectup"},73802:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="gameobjectwheel"},56718:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="gameout"},25936:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="gameover"},27503:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="boot"},50852:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="process"},96438:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="update"},59152:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="pointerlockchange"},47777:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="pointerdown"},27957:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="pointerdownoutside"},19444:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="pointermove"},54251:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="pointerout"},18667:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="pointerover"},27192:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="pointerup"},24652:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="pointerupoutside"},45132:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="wheel"},44512:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="preupdate"},15757:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="shutdown"},41637:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="start"},93802:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="update"},8214:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.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:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=new a({initialize:function(r,n){this.pad=r,this.events=r.events,this.index=n,this.value=0,this.threshold=.1},update:function(o){this.value=o},getValue:function(){return Math.abs(this.value){/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(92734),o=new a({initialize:function(n,e){this.pad=n,this.events=n.manager,this.index=e,this.value=0,this.threshold=1,this.pressed=!1},update:function(r){this.value=r;var n=this.pad,e=this.index;r>=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(c.BUTTON_DOWN,n,this,r),this.pad.emit(c.GAMEPAD_BUTTON_DOWN,e,r,this)):this.pressed&&(this.pressed=!1,this.events.emit(c.BUTTON_UP,n,this,r),this.pad.emit(c.GAMEPAD_BUTTON_UP,e,r,this))},destroy:function(){this.pad=null,this.events=null}});v.exports=o},99125:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(97421),c=t(28884),o=t(83419),r=t(50792),n=t(26099),e=new o({Extends:r,initialize:function(h,s){r.call(this),this.manager=h,this.pad=s,this.id=s.id,this.index=s.index;for(var l=[],f=0;f=2&&(this.leftStick.set(u[0].getValue(),u[1].getValue()),f>=4&&this.rightStick.set(u[2].getValue(),u[3].getValue()))}},destroy:function(){this.removeAllListeners(),this.manager=null,this.pad=null;var i;for(i=0;i{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(50792),o=t(92734),r=t(99125),n=t(35154),e=t(89639),i=t(8214),h=new a({Extends:c,initialize:function(l){c.call(this),this.scene=l.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=l,this.enabled=!0,this.target,this.gamepads=[],this.queue=[],this.onGamepadHandler,this._pad1,this._pad2,this._pad3,this._pad4,l.pluginEvents.once(i.BOOT,this.boot,this),l.pluginEvents.on(i.START,this.start,this)},boot:function(){var s=this.scene.sys.game,l=this.settings.input,f=s.config;this.enabled=n(l,"gamepad",f.inputGamepad)&&s.device.input.gamepads,this.target=n(l,"gamepad.target",f.inputGamepadEventTarget),this.sceneInputPlugin.pluginEvents.once(i.DESTROY,this.destroy,this)},start:function(){this.enabled&&(this.startListeners(),this.refreshPads()),this.sceneInputPlugin.pluginEvents.once(i.SHUTDOWN,this.shutdown,this)},isActive:function(){return this.enabled&&this.scene.sys.isActive()},startListeners:function(){var s=this,l=this.target,f=function(u){u.defaultPrevented||!s.isActive()||(s.refreshPads(),s.queue.push(u))};this.onGamepadHandler=f,l.addEventListener("gamepadconnected",f,!1),l.addEventListener("gamepaddisconnected",f,!1),this.sceneInputPlugin.pluginEvents.on(i.UPDATE,this.update,this)},stopListeners:function(){this.target.removeEventListener("gamepadconnected",this.onGamepadHandler),this.target.removeEventListener("gamepaddisconnected",this.onGamepadHandler),this.sceneInputPlugin.pluginEvents.off(i.UPDATE,this.update);for(var s=0;s{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.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:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.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:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.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:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={DUALSHOCK_4:t(65294),SNES_USB:t(89651),XBOX_360:t(90089)}},46008:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="down"},7629:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="up"},42206:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="connected"},86544:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="disconnected"},94784:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="down"},14325:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="up"},92734:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.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:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={Axis:t(97421),Button:t(28884),Events:t(92734),Gamepad:t(99125),GamepadPlugin:t(56654),Configs:t(64894)}},14350:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(93301),c=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=c(!1,o,a),v.exports=o},78970:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(72905),c=t(83419),o=t(8443),r=t(8214),n=t(46032),e=t(29747),i=new c({initialize:function(s){this.manager=s,this.queue=[],this.preventDefault=!0,this.captures=[],this.enabled=!1,this.target,this.onKeyDown=e,this.onKeyUp=e,s.events.once(r.MANAGER_BOOT,this.boot,this)},boot:function(){var h=this.manager.config;this.enabled=h.inputKeyboard,this.target=h.inputKeyboardEventTarget,this.addCapture(h.inputKeyboardCapture),!this.target&&window&&(this.target=window),this.enabled&&this.target&&this.startListeners(),this.manager.game.events.on(o.POST_STEP,this.postUpdate,this)},startListeners:function(){var h=this;this.onKeyDown=function(l){if(!(l.defaultPrevented||!h.enabled||!h.manager)){h.queue.push(l),h.manager.events.emit(r.MANAGER_PROCESS);var f=l.altKey||l.ctrlKey||l.shiftKey||l.metaKey;h.preventDefault&&!f&&h.captures.indexOf(l.keyCode)>-1&&l.preventDefault()}},this.onKeyUp=function(l){if(!(l.defaultPrevented||!h.enabled||!h.manager)){h.queue.push(l),h.manager.events.emit(r.MANAGER_PROCESS);var f=l.altKey||l.ctrlKey||l.shiftKey||l.metaKey;h.preventDefault&&!f&&h.captures.indexOf(l.keyCode)>-1&&l.preventDefault()}};var s=this.target;s&&(s.addEventListener("keydown",this.onKeyDown,!1),s.addEventListener("keyup",this.onKeyUp,!1),this.enabled=!0)},stopListeners:function(){var h=this.target;h.removeEventListener("keydown",this.onKeyDown,!1),h.removeEventListener("keyup",this.onKeyUp,!1),this.enabled=!1},postUpdate:function(){this.queue=[]},addCapture:function(h){typeof h=="string"&&(h=h.split(",")),Array.isArray(h)||(h=[h]);for(var s=this.captures,l=0;l0},removeCapture:function(h){typeof h=="string"&&(h=h.split(",")),Array.isArray(h)||(h=[h]);for(var s=this.captures,l=0;l0},clearCaptures:function(){this.captures=[],this.preventDefault=!1},destroy:function(){this.stopListeners(),this.clearCaptures(),this.queue=[],this.manager.game.events.off(o.POST_RENDER,this.postUpdate,this),this.target=null,this.enabled=!1,this.manager=null}});v.exports=i},28846:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(50792),o=t(95922),r=t(8443),n=t(35154),e=t(8214),i=t(89639),h=t(30472),s=t(46032),l=t(87960),f=t(74600),u=t(44594),d=t(56583),p=new a({Extends:c,initialize:function(y){c.call(this),this.game=y.systems.game,this.scene=y.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=y,this.manager=y.manager.keyboard,this.enabled=!0,this.keys=[],this.combos=[],this.prevCode=null,this.prevTime=0,this.prevType=null,y.pluginEvents.once(e.BOOT,this.boot,this),y.pluginEvents.on(e.START,this.start,this)},boot:function(){var g=this.settings.input;this.enabled=n(g,"keyboard",!0);var y=n(g,"keyboard.capture",null);y&&this.addCaptures(y),this.sceneInputPlugin.pluginEvents.once(e.DESTROY,this.destroy,this)},start:function(){this.sceneInputPlugin.manager.events.on(e.MANAGER_PROCESS,this.update,this),this.sceneInputPlugin.pluginEvents.once(e.SHUTDOWN,this.shutdown,this),this.game.events.on(r.BLUR,this.resetKeys,this),this.scene.sys.events.on(u.PAUSE,this.resetKeys,this),this.scene.sys.events.on(u.SLEEP,this.resetKeys,this)},isActive:function(){return this.enabled&&this.scene.sys.canInput()},addCapture:function(g){return this.manager.addCapture(g),this},removeCapture:function(g){return this.manager.removeCapture(g),this},getCaptures:function(){return this.manager.captures},enableGlobalCapture:function(){return this.manager.preventDefault=!0,this},disableGlobalCapture:function(){return this.manager.preventDefault=!1,this},clearCaptures:function(){return this.manager.clearCaptures(),this},createCursorKeys:function(){return this.addKeys({up:s.UP,down:s.DOWN,left:s.LEFT,right:s.RIGHT,space:s.SPACE,shift:s.SHIFT})},addKeys:function(g,y,x){y===void 0&&(y=!0),x===void 0&&(x=!1);var T={};if(typeof g=="string"){g=g.split(",");for(var S=0;S-1?T[S]=g:T[g.keyCode]=g,y&&this.addCapture(g.keyCode),g.setEmitOnRepeat(x),g}return typeof g=="string"&&(g=s[g.toUpperCase()]),T[g]||(T[g]=new h(this,g),y&&this.addCapture(g),T[g].setEmitOnRepeat(x)),T[g]},removeKey:function(g,y,x){y===void 0&&(y=!1),x===void 0&&(x=!1);var T=this.keys,S;if(g instanceof h){var M=T.indexOf(g);M>-1&&(S=this.keys[M],this.keys[M]=void 0)}else typeof g=="string"&&(g=s[g.toUpperCase()]);return T[g]&&(S=T[g],T[g]=void 0),S&&(S.plugin=null,x&&this.removeCapture(S.keyCode),y&&S.destroy()),this},removeAllKeys:function(g,y){g===void 0&&(g=!1),y===void 0&&(y=!1);for(var x=this.keys,T=0;Tg._tick)return g._tick=x,!0}return!1},update:function(){var g=this.manager.queue,y=g.length;if(!(!this.isActive()||y===0))for(var x=this.keys,T=0;T{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){return a.timeLastMatched=t.timeStamp,a.index++,a.index===a.size?!0:(a.current=a.keyCodes[a.index],!1)};v.exports=m},87960:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(95922),o=t(95540),r=t(68769),n=t(92803),e=new a({initialize:function(h,s,l){if(l===void 0&&(l={}),s.length<2)return!1;this.manager=h,this.enabled=!0,this.keyCodes=[];for(var f=0;f{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(66970),c=function(o,r){if(r.matched)return!0;var n=!1,e=!1;if(o.keyCode===r.current)if(r.index>0&&r.maxKeyDelay>0){var i=r.timeLastMatched+r.maxKeyDelay;o.timeStamp<=i&&(e=!0,n=a(o,r))}else e=!0,n=a(o,r);return!e&&r.resetOnWrongKey&&(r.index=0,r.current=r.keyCodes[0]),n&&(r.timeLastMatched=o.timeStamp,r.matched=!0,r.timeMatched=o.timeStamp),n};v.exports=c},92803:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return t.current=t.keyCodes[0],t.index=0,t.timeLastMatched=0,t.matched=!1,t.timeMatched=0,t};v.exports=m},92612:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="keydown"},23345:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="keyup"},21957:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="keycombomatch"},44743:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="down"},3771:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="keydown-"},46358:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="keyup-"},75674:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="up"},95922:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.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:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.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:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){a===void 0&&(a=50);var c=t.plugin.game.loop.time-t.timeDown;return t.isDown&&c{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return t._justDown?(t._justDown=!1,!0):!1};v.exports=m},38796:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return t._justUp?(t._justUp=!1,!0):!1};v.exports=m},30472:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(50792),o=t(95922),r=new a({Extends:c,initialize:function(e,i){c.call(this),this.plugin=e,this.keyCode=i,this.originalEvent=void 0,this.enabled=!0,this.isDown=!1,this.isUp=!0,this.altKey=!1,this.ctrlKey=!1,this.shiftKey=!1,this.metaKey=!1,this.location=0,this.timeDown=0,this.duration=0,this.timeUp=0,this.emitOnRepeat=!1,this.repeats=0,this._justDown=!1,this._justUp=!1,this._tick=-1},setEmitOnRepeat:function(n){return this.emitOnRepeat=n,this},onDown:function(n){this.originalEvent=n,this.enabled&&(this.altKey=n.altKey,this.ctrlKey=n.ctrlKey,this.shiftKey=n.shiftKey,this.metaKey=n.metaKey,this.location=n.location,this.repeats++,this.isDown?this.emitOnRepeat&&this.emit(o.DOWN,this,n):(this.isDown=!0,this.isUp=!1,this.timeDown=n.timeStamp,this.duration=0,this._justDown=!0,this._justUp=!1,this.emit(o.DOWN,this,n)))},onUp:function(n){this.originalEvent=n,this.enabled&&(this.isDown=!1,this.isUp=!0,this.timeUp=n.timeStamp,this.duration=this.timeUp-this.timeDown,this.repeats=0,this._justDown=!1,this._justUp=!0,this._tick=-1,this.emit(o.UP,this,n))},reset:function(){return this.isDown=!1,this.isUp=!0,this.altKey=!1,this.ctrlKey=!1,this.shiftKey=!1,this.metaKey=!1,this.timeDown=0,this.duration=0,this.timeUp=0,this.repeats=0,this._justDown=!1,this._justUp=!1,this._tick=-1,this},getDuration:function(){return this.isDown?this.plugin.game.loop.time-this.timeDown:0},destroy:function(){this.removeAllListeners(),this.originalEvent=null,this.plugin=null}});v.exports=r},46032:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:42,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,NUMPAD_ZERO:96,NUMPAD_ONE:97,NUMPAD_TWO:98,NUMPAD_THREE:99,NUMPAD_FOUR:100,NUMPAD_FIVE:101,NUMPAD_SIX:102,NUMPAD_SEVEN:103,NUMPAD_EIGHT:104,NUMPAD_NINE:105,NUMPAD_ADD:107,NUMPAD_SUBTRACT:109,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,PLUS:187,COMMA:188,MINUS:189,PERIOD:190,FORWARD_SLASH:191,BACK_SLASH:220,QUOTES:222,BACKTICK:192,OPEN_BRACKET:219,CLOSED_BRACKET:221,SEMICOLON_FIREFOX:59,COLON:58,COMMA_FIREFOX_WINDOWS:60,COMMA_FIREFOX:62,BRACKET_RIGHT_FIREFOX:174,BRACKET_LEFT_FIREFOX:175};v.exports=m},74600:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(46032),c={};for(var o in a)c[a[o]]=o;v.exports=c},41170:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){a===void 0&&(a=50);var c=t.plugin.game.loop.time-t.timeUp;return t.isUp&&c{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(89357),o=t(8214),r=t(29747),n=new a({initialize:function(i){this.manager=i,this.preventDefaultDown=!0,this.preventDefaultUp=!0,this.preventDefaultMove=!0,this.preventDefaultWheel=!1,this.enabled=!1,this.target,this.locked=!1,this.onMouseMove=r,this.onMouseDown=r,this.onMouseUp=r,this.onMouseDownWindow=r,this.onMouseUpWindow=r,this.onMouseOver=r,this.onMouseOut=r,this.onMouseWheel=r,this.pointerLockChange=r,this.isTop=!0,i.events.once(o.MANAGER_BOOT,this.boot,this)},boot:function(){var e=this.manager.config;this.enabled=e.inputMouse,this.target=e.inputMouseEventTarget,this.passive=e.inputMousePassive,this.preventDefaultDown=e.inputMousePreventDefaultDown,this.preventDefaultUp=e.inputMousePreventDefaultUp,this.preventDefaultMove=e.inputMousePreventDefaultMove,this.preventDefaultWheel=e.inputMousePreventDefaultWheel,this.target?typeof this.target=="string"&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,e.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return this.target.addEventListener("contextmenu",function(e){return e.preventDefault(),!1}),this},requestPointerLock:function(){if(c.pointerLock){var e=this.target;e.requestPointerLock=e.requestPointerLock||e.mozRequestPointerLock||e.webkitRequestPointerLock,e.requestPointerLock()}},releasePointerLock:function(){c.pointerLock&&(document.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock,document.exitPointerLock())},startListeners:function(){var e=this.target;if(e){var i=this,h=this.manager,s=h.canvas,l=window&&window.focus&&h.game.config.autoFocus;this.onMouseMove=function(u){!u.defaultPrevented&&i.enabled&&h&&h.enabled&&(h.onMouseMove(u),i.preventDefaultMove&&u.preventDefault())},this.onMouseDown=function(u){l&&window.focus(),!u.defaultPrevented&&i.enabled&&h&&h.enabled&&(h.onMouseDown(u),i.preventDefaultDown&&u.target===s&&u.preventDefault())},this.onMouseDownWindow=function(u){u.sourceCapabilities&&u.sourceCapabilities.firesTouchEvents||!u.defaultPrevented&&i.enabled&&h&&h.enabled&&u.target!==s&&h.onMouseDown(u)},this.onMouseUp=function(u){!u.defaultPrevented&&i.enabled&&h&&h.enabled&&(h.onMouseUp(u),i.preventDefaultUp&&u.target===s&&u.preventDefault())},this.onMouseUpWindow=function(u){u.sourceCapabilities&&u.sourceCapabilities.firesTouchEvents||!u.defaultPrevented&&i.enabled&&h&&h.enabled&&u.target!==s&&h.onMouseUp(u)},this.onMouseOver=function(u){!u.defaultPrevented&&i.enabled&&h&&h.enabled&&h.setCanvasOver(u)},this.onMouseOut=function(u){!u.defaultPrevented&&i.enabled&&h&&h.enabled&&h.setCanvasOut(u)},this.onMouseWheel=function(u){!u.defaultPrevented&&i.enabled&&h&&h.enabled&&h.onMouseWheel(u),i.preventDefaultWheel&&u.target===s&&u.preventDefault()};var f={passive:!0};if(e.addEventListener("mousemove",this.onMouseMove),e.addEventListener("mousedown",this.onMouseDown),e.addEventListener("mouseup",this.onMouseUp),e.addEventListener("mouseover",this.onMouseOver,f),e.addEventListener("mouseout",this.onMouseOut,f),this.preventDefaultWheel?e.addEventListener("wheel",this.onMouseWheel,{passive:!1}):e.addEventListener("wheel",this.onMouseWheel,f),window&&h.game.config.inputWindowEvents)try{window.top.addEventListener("mousedown",this.onMouseDownWindow,f),window.top.addEventListener("mouseup",this.onMouseUpWindow,f)}catch{window.addEventListener("mousedown",this.onMouseDownWindow,f),window.addEventListener("mouseup",this.onMouseUpWindow,f),this.isTop=!1}c.pointerLock&&(this.pointerLockChange=function(u){var d=i.target;i.locked=document.pointerLockElement===d||document.mozPointerLockElement===d||document.webkitPointerLockElement===d,h.onPointerLockChange(u)},document.addEventListener("pointerlockchange",this.pointerLockChange,!0),document.addEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.addEventListener("webkitpointerlockchange",this.pointerLockChange,!0)),this.enabled=!0}},stopListeners:function(){var e=this.target;e.removeEventListener("mousemove",this.onMouseMove),e.removeEventListener("mousedown",this.onMouseDown),e.removeEventListener("mouseup",this.onMouseUp),e.removeEventListener("mouseover",this.onMouseOver),e.removeEventListener("mouseout",this.onMouseOut),window&&(e=this.isTop?window.top:window,e.removeEventListener("mousedown",this.onMouseDownWindow),e.removeEventListener("mouseup",this.onMouseUpWindow)),c.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}});v.exports=n},87078:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={MouseManager:t(85098)}},36210:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(8214),o=t(29747),r=new a({initialize:function(e){this.manager=e,this.capture=!0,this.enabled=!1,this.target,this.onTouchStart=o,this.onTouchStartWindow=o,this.onTouchMove=o,this.onTouchEnd=o,this.onTouchEndWindow=o,this.onTouchCancel=o,this.onTouchCancelWindow=o,this.isTop=!0,e.events.once(c.MANAGER_BOOT,this.boot,this)},boot:function(){var n=this.manager.config;this.enabled=n.inputTouch,this.target=n.inputTouchEventTarget,this.capture=n.inputTouchCapture,this.target?typeof this.target=="string"&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,n.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return this.target.addEventListener("contextmenu",function(n){return n.preventDefault(),!1}),this},startListeners:function(){var n=this.target;if(n){var e=this,i=this.manager,h=i.canvas,s=window&&window.focus&&i.game.config.autoFocus;this.onTouchMove=function(d){!d.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onTouchMove(d),e.capture&&d.cancelable&&d.preventDefault())},this.onTouchStart=function(d){s&&window.focus(),!d.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onTouchStart(d),e.capture&&d.cancelable&&d.target===h&&d.preventDefault())},this.onTouchStartWindow=function(d){!d.defaultPrevented&&e.enabled&&i&&i.enabled&&d.target!==h&&i.onTouchStart(d)},this.onTouchEnd=function(d){!d.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onTouchEnd(d),e.capture&&d.cancelable&&d.target===h&&d.preventDefault())},this.onTouchEndWindow=function(d){!d.defaultPrevented&&e.enabled&&i&&i.enabled&&d.target!==h&&i.onTouchEnd(d)},this.onTouchCancel=function(d){!d.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onTouchCancel(d),e.capture&&d.preventDefault())},this.onTouchCancelWindow=function(d){!d.defaultPrevented&&e.enabled&&i&&i.enabled&&i.onTouchCancel(d)};var l=this.capture,f={passive:!0},u={passive:!1};if(n.addEventListener("touchstart",this.onTouchStart,l?u:f),n.addEventListener("touchmove",this.onTouchMove,l?u:f),n.addEventListener("touchend",this.onTouchEnd,l?u:f),n.addEventListener("touchcancel",this.onTouchCancel,l?u:f),window&&i.game.config.inputWindowEvents)try{window.top.addEventListener("touchstart",this.onTouchStartWindow,u),window.top.addEventListener("touchend",this.onTouchEndWindow,u),window.top.addEventListener("touchcancel",this.onTouchCancelWindow,u)}catch{window.addEventListener("touchstart",this.onTouchStartWindow,u),window.addEventListener("touchend",this.onTouchEndWindow,u),window.addEventListener("touchcancel",this.onTouchCancelWindow,u),this.isTop=!1}this.enabled=!0}},stopListeners:function(){var n=this.target;n.removeEventListener("touchstart",this.onTouchStart),n.removeEventListener("touchmove",this.onTouchMove),n.removeEventListener("touchend",this.onTouchEnd),n.removeEventListener("touchcancel",this.onTouchCancel),window&&(n=this.isTop?window.top:window,n.removeEventListener("touchstart",this.onTouchStartWindow),n.removeEventListener("touchend",this.onTouchEndWindow),n.removeEventListener("touchcancel",this.onTouchCancelWindow))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});v.exports=r},95618:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={TouchManager:t(36210)}},41299:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(23906),o=t(54899),r=t(95540),n=t(98356),e=t(3374),i=t(84376),h=t(92638),s=new a({initialize:function(f,u){if(this.loader=f,this.cache=r(u,"cache",!1),this.type=r(u,"type",!1),!this.type)throw new Error("Invalid File type: "+this.type);this.key=r(u,"key",!1);var d=this.key;if(f.prefix&&f.prefix!==""&&(this.key=f.prefix+d),!this.key)throw new Error("Invalid File key: "+this.key);var p=r(u,"url");p===void 0?p=f.path+d+"."+r(u,"extension",""):typeof p=="string"&&!p.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)&&(p=f.path+p),this.url=p,this.src="",this.xhrSettings=h(r(u,"responseType",void 0)),r(u,"xhrSettings",!1)&&(this.xhrSettings=e(this.xhrSettings,r(u,"xhrSettings",{}))),this.xhrLoader=null,this.state=typeof this.url=="function"?c.FILE_POPULATED:c.FILE_PENDING,this.bytesTotal=0,this.bytesLoaded=-1,this.percentComplete=-1,this.crossOrigin=void 0,this.data=void 0,this.config=r(u,"config",{}),this.multiFile,this.linkFile,this.base64=typeof p=="string"&&p.indexOf("data:")===0},setLink:function(l){this.linkFile=l,l.linkFile=this},resetXHR:function(){this.xhrLoader&&(this.xhrLoader.onload=void 0,this.xhrLoader.onerror=void 0,this.xhrLoader.onprogress=void 0)},load:function(){this.state===c.FILE_POPULATED?this.loader.nextFile(this,!0):(this.state=c.FILE_LOADING,this.src=n(this,this.loader.baseURL),this.src.indexOf("data:")===0&&(this.base64=!0),this.xhrLoader=i(this,this.loader.xhr))},onLoad:function(l,f){var u=l.responseURL&&this.loader.localSchemes.some(function(g){return l.responseURL.indexOf(g)===0}),d=u&&f.target.status===0,p=!(f.target&&f.target.status!==200)||d;l.readyState===4&&l.status>=400&&l.status<=599&&(p=!1),this.state=c.FILE_LOADED,this.resetXHR(),this.loader.nextFile(this,p)},onBase64Load:function(l){this.xhrLoader=l,this.state=c.FILE_LOADED,this.percentComplete=1,this.loader.emit(o.FILE_PROGRESS,this,this.percentComplete),this.loader.nextFile(this,!0)},onError:function(){this.resetXHR(),this.loader.nextFile(this,!1)},onProgress:function(l){l.lengthComputable&&(this.bytesLoaded=l.loaded,this.bytesTotal=l.total,this.percentComplete=Math.min(this.bytesLoaded/this.bytesTotal,1),this.loader.emit(o.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=c.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=c.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=c.FILE_ERRORED,this.multiFile&&this.multiFile.onFileFailed(this),this.loader.fileProcessComplete(this)},hasCacheConflict:function(){return this.cache&&this.cache.exists(this.key)},addToCache:function(){this.cache&&this.data&&this.cache.add(this.key,this.data)},pendingDestroy:function(l){if(this.state!==c.FILE_PENDING_DESTROY){l===void 0&&(l=this.data);var f=this.key,u=this.type;this.loader.emit(o.FILE_COMPLETE,f,u,l),this.loader.emit(o.FILE_KEY_COMPLETE+u+"-"+f,f,u,l),this.loader.flagForRemoval(this),this.state=c.FILE_PENDING_DESTROY}},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});s.createObjectURL=function(l,f,u){if(typeof URL=="function")l.src=URL.createObjectURL(f);else{var d=new FileReader;d.onload=function(){l.removeAttribute("crossOrigin"),l.src="data:"+(f.type||u)+";base64,"+d.result.split(",")[1]},d.onerror=l.onerror,d.readAsDataURL(f)}},s.revokeObjectURL=function(l){typeof URL=="function"&&URL.revokeObjectURL(l.src)},v.exports=s},74099:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m={},t={install:function(a){for(var c in m)a[c]=m[c]},register:function(a,c){m[a]=c},destroy:function(){m={}}};v.exports=t},98356:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){return t.url?t.url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)?t.url:a+t.url:!1};v.exports=m},74261:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(23906),o=t(35072),r=t(50792),n=t(54899),e=t(74099),i=t(95540),h=t(35154),s=t(37277),l=t(44594),f=t(92638),u=new a({Extends:r,initialize:function(p){r.call(this);var g=p.sys.game.config,y=p.sys.settings.loader;this.scene=p,this.systems=p.sys,this.cacheManager=p.sys.cache,this.textureManager=p.sys.textures,this.sceneManager=p.sys.game.scene,e.install(this),this.prefix="",this.path="",this.baseURL="",this.setBaseURL(i(y,"baseURL",g.loaderBaseURL)),this.setPath(i(y,"path",g.loaderPath)),this.setPrefix(i(y,"prefix",g.loaderPrefix)),this.maxParallelDownloads=i(y,"maxParallelDownloads",g.loaderMaxParallelDownloads),this.xhr=f(i(y,"responseType",g.loaderResponseType),i(y,"async",g.loaderAsync),i(y,"user",g.loaderUser),i(y,"password",g.loaderPassword),i(y,"timeout",g.loaderTimeout),i(y,"withCredentials",g.loaderWithCredentials)),this.crossOrigin=i(y,"crossOrigin",g.loaderCrossOrigin),this.imageLoadType=i(y,"imageLoadType",g.loaderImageLoadType),this.localSchemes=i(y,"localScheme",g.loaderLocalScheme),this.totalToLoad=0,this.progress=0,this.list=new o,this.inflight=new o,this.queue=new o,this._deleteQueue=new o,this.totalFailed=0,this.totalComplete=0,this.state=c.LOADER_IDLE,this.multiKeyIndex=0,p.sys.events.once(l.BOOT,this.boot,this),p.sys.events.on(l.START,this.pluginStart,this)},boot:function(){this.systems.events.once(l.DESTROY,this.destroy,this)},pluginStart:function(){this.systems.events.once(l.SHUTDOWN,this.shutdown,this)},setBaseURL:function(d){return d===void 0&&(d=""),d!==""&&d.substr(-1)!=="/"&&(d=d.concat("/")),this.baseURL=d,this},setPath:function(d){return d===void 0&&(d=""),d!==""&&d.substr(-1)!=="/"&&(d=d.concat("/")),this.path=d,this},setPrefix:function(d){return d===void 0&&(d=""),this.prefix=d,this},setCORS:function(d){return this.crossOrigin=d,this},addFile:function(d){Array.isArray(d)||(d=[d]);for(var p=0;p0},isLoading:function(){return this.state===c.LOADER_LOADING||this.state===c.LOADER_PROCESSING},isReady:function(){return this.state===c.LOADER_IDLE||this.state===c.LOADER_COMPLETE},start:function(){this.isReady()&&(this.progress=0,this.totalFailed=0,this.totalComplete=0,this.totalToLoad=this.list.size,this.emit(n.START,this),this.list.size===0?this.loadComplete():(this.state=c.LOADER_LOADING,this.inflight.clear(),this.queue.clear(),this.updateProgress(),this.checkLoadQueue(),this.systems.events.on(l.UPDATE,this.update,this)))},updateProgress:function(){this.progress=1-(this.list.size+this.inflight.size)/this.totalToLoad,this.emit(n.PROGRESS,this.progress)},update:function(){this.state===c.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),c=t(92638),o=function(r,n){var e=r===void 0?c():a({},r);if(n)for(var i in n)n[i]!==void 0&&(e[i]=n[i]);return e};v.exports=o},26430:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(23906),o=t(54899),r=new a({initialize:function(e,i,h,s){var l=[];s.forEach(function(d){d&&l.push(d)}),this.loader=e,this.type=i,this.key=h;var f=this.key;e.prefix&&e.prefix!==""&&(this.key=e.prefix+f),this.multiKeyIndex=e.multiKeyIndex++,this.files=l,this.state=c.FILE_PENDING,this.complete=!1,this.pending=l.length,this.failed=0,this.config={},this.baseURL=e.baseURL,this.path=e.path,this.prefix=e.prefix;for(var u=0;u{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(3374),c=function(o,r){var n=a(r,o.xhrSettings);if(o.base64){var e=o.url.split(";base64,").pop()||o.url.split(",").pop(),i={responseText:atob(e)};o.onBase64Load(i);return}var h=new XMLHttpRequest;if(h.open("GET",o.src,n.async,n.user,n.password),h.responseType=o.xhrSettings.responseType,h.timeout=n.timeout,n.headers)for(var s in n.headers)h.setRequestHeader(s,n.headers[s]);return n.header&&n.headerValue&&h.setRequestHeader(n.header,n.headerValue),n.requestedWith&&h.setRequestHeader("X-Requested-With",n.requestedWith),n.overrideMimeType&&h.overrideMimeType(n.overrideMimeType),n.withCredentials&&(h.withCredentials=!0),h.onload=o.onLoad.bind(o,h),h.onerror=o.onError.bind(o,h),h.onprogress=o.onProgress.bind(o),h.ontimeout=o.onError.bind(o,h),h.send(),h};v.exports=c},92638:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c,o,r,n){return t===void 0&&(t=""),a===void 0&&(a=!0),c===void 0&&(c=""),o===void 0&&(o=""),r===void 0&&(r=0),n===void 0&&(n=!1),{responseType:t,async:a,user:c,password:o,timeout:r,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:n}};v.exports=m},23906:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m={LOADER_IDLE:0,LOADER_LOADING:1,LOADER_PROCESSING:2,LOADER_COMPLETE:3,LOADER_SHUTDOWN:4,LOADER_DESTROYED:5,FILE_PENDING:10,FILE_LOADING:11,FILE_LOADED:12,FILE_FAILED:13,FILE_PROCESSING:14,FILE_ERRORED:16,FILE_COMPLETE:17,FILE_DESTROYED:18,FILE_POPULATED:19,FILE_PENDING_DESTROY:20};v.exports=m},42155:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="addfile"},38991:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="complete"},27540:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="filecomplete"},87464:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="filecomplete-"},94486:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="loaderror"},13035:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="load"},38144:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="fileprogress"},97520:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="postprocess"},85595:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="progress"},55680:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="start"},54899:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.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:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(74099),o=t(518),r=t(54899),n=new a({Extends:o,initialize:function(i,h,s,l,f){o.call(this,i,h,s,l,f),this.type="animationJSON"},onProcess:function(){this.loader.once(r.POST_PROCESS,this.onLoadComplete,this),o.prototype.onProcess.call(this)},onLoadComplete:function(){this.loader.systems.anims.fromJSON(this.data)}});c.register("animation",function(e,i,h,s){if(Array.isArray(e))for(var l=0;l{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(74099),o=t(95540),r=t(19550),n=t(41212),e=t(518),i=t(26430),h=new a({Extends:i,initialize:function(l,f,u,d,p,g){var y,x;if(n(f)){var T=f;f=o(T,"key"),y=new r(l,{key:f,url:o(T,"textureURL"),extension:o(T,"textureExtension","png"),normalMap:o(T,"normalMap"),xhrSettings:o(T,"textureXhrSettings")}),x=new e(l,{key:f,url:o(T,"atlasURL"),extension:o(T,"atlasExtension","json"),xhrSettings:o(T,"atlasXhrSettings")})}else y=new r(l,f,u,p),x=new e(l,f,d,g);y.linkFile?i.call(this,l,"atlasjson",f,[y,x,y.linkFile]):i.call(this,l,"atlasjson",f,[y,x])},addToCache:function(){if(this.isReadyToProcess()){var s=this.files[0],l=this.files[1],f=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(s.key,s.data,l.data,f),l.addToCache(),this.complete=!0}}});c.register("aseprite",function(s,l,f,u,d){var p;if(Array.isArray(s))for(var g=0;g{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(74099),o=t(95540),r=t(19550),n=t(41212),e=t(518),i=t(26430),h=new a({Extends:i,initialize:function(l,f,u,d,p,g){var y,x;if(n(f)){var T=f;f=o(T,"key"),y=new r(l,{key:f,url:o(T,"textureURL"),extension:o(T,"textureExtension","png"),normalMap:o(T,"normalMap"),xhrSettings:o(T,"textureXhrSettings")}),x=new e(l,{key:f,url:o(T,"atlasURL"),extension:o(T,"atlasExtension","json"),xhrSettings:o(T,"atlasXhrSettings")})}else y=new r(l,f,u,p),x=new e(l,f,d,g);y.linkFile?i.call(this,l,"atlasjson",f,[y,x,y.linkFile]):i.call(this,l,"atlasjson",f,[y,x])},addToCache:function(){if(this.isReadyToProcess()){var s=this.files[0],l=this.files[1],f=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(s.key,s.data,l.data,f),this.complete=!0}}});c.register("atlas",function(s,l,f,u,d){var p;if(Array.isArray(s))for(var g=0;g{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(74099),o=t(95540),r=t(19550),n=t(41212),e=t(26430),i=t(57318),h=new a({Extends:e,initialize:function(l,f,u,d,p,g){var y,x;if(n(f)){var T=f;f=o(T,"key"),y=new r(l,{key:f,url:o(T,"textureURL"),extension:o(T,"textureExtension","png"),normalMap:o(T,"normalMap"),xhrSettings:o(T,"textureXhrSettings")}),x=new i(l,{key:f,url:o(T,"atlasURL"),extension:o(T,"atlasExtension","xml"),xhrSettings:o(T,"atlasXhrSettings")})}else y=new r(l,f,u,p),x=new i(l,f,d,g);y.linkFile?e.call(this,l,"atlasxml",f,[y,x,y.linkFile]):e.call(this,l,"atlasxml",f,[y,x])},addToCache:function(){if(this.isReadyToProcess()){var s=this.files[0],l=this.files[1],f=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlasXML(s.key,s.data,l.data,f),this.complete=!0}}});c.register("atlasXML",function(s,l,f,u,d){var p;if(Array.isArray(s))for(var g=0;g{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(23906),o=t(41299),r=t(74099),n=t(95540),e=t(89749),i=t(41212),h=new a({Extends:o,initialize:function(l,f,u,d,p){if(i(f)){var g=f;f=n(g,"key"),d=n(g,"xhrSettings"),p=n(g,"context",p)}var y={type:"audio",cache:l.cacheManager.audio,extension:u.type,responseType:"arraybuffer",key:f,url:u.url,xhrSettings:d,config:{context:p}};o.call(this,l,y)},onProcess:function(){this.state=c.FILE_PROCESSING;var s=this;this.config.context.decodeAudioData(this.xhrLoader.response,function(l){s.data=l,s.onProcessComplete()},function(l){console.error("Error decoding audio: "+s.key+" - ",l?l.message:null),s.onProcessError()}),this.config.context=null}});h.create=function(s,l,f,u,d){var p=s.systems.game,g=p.config.audio,y=p.device.audio;i(l)&&(f=n(l,"url",[]),u=n(l,"config",{}));var x=h.getAudioURL(p,f);return x?y.webAudio&&!g.disableWebAudio?new h(s,l,x,d,p.sound.context):new e(s,l,x,u):(console.warn('No audio URLs for "%s" matched this device',l),null)},h.getAudioURL=function(s,l){Array.isArray(l)||(l=[l]);for(var f=0;f{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(21097),c=t(83419),o=t(74099),r=t(95540),n=t(41212),e=t(518),i=t(26430),h=new c({Extends:i,initialize:function(l,f,u,d,p,g,y){if(n(f)){var x=f;f=r(x,"key"),u=r(x,"jsonURL"),d=r(x,"audioURL"),p=r(x,"audioConfig"),g=r(x,"audioXhrSettings"),y=r(x,"jsonXhrSettings")}var T;if(!d)T=new e(l,f,u,y),i.call(this,l,"audiosprite",f,[T]),this.config.resourceLoad=!0,this.config.audioConfig=p,this.config.audioXhrSettings=g;else{var S=a.create(l,f,d,p,g);S&&(T=new e(l,f,u,y),i.call(this,l,"audiosprite",f,[S,T]),this.config.resourceLoad=!1)}},onFileComplete:function(s){var l=this.files.indexOf(s);if(l!==-1&&(this.pending--,this.config.resourceLoad&&s.type==="json"&&s.data.hasOwnProperty("resources"))){var f=s.data.resources,u=r(this.config,"audioConfig"),d=r(this.config,"audioXhrSettings"),p=a.create(this.loader,s.key,f,u,d);p&&(this.addToMultiFile(p),this.loader.addFile(p))}},addToCache:function(){if(this.isReadyToProcess()){var s=this.files[0],l=this.files[1];s.addToCache(),l.addToCache(),this.complete=!0}}});o.register("audioSprite",function(s,l,f,u,d,p){var g=this.systems.game,y=g.config.audio,x=g.device.audio;if(y&&y.noAudio||!x.webAudio&&!x.audioData)return this;var T;if(Array.isArray(s))for(var S=0;S{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(23906),o=t(41299),r=t(74099),n=t(95540),e=t(41212),i=new a({Extends:o,initialize:function(s,l,f,u,d){var p="bin";if(e(l)){var g=l;l=n(g,"key"),f=n(g,"url"),u=n(g,"xhrSettings"),p=n(g,"extension",p),d=n(g,"dataType",d)}var y={type:"binary",cache:s.cacheManager.binary,extension:p,responseType:"arraybuffer",key:l,url:f,xhrSettings:u,config:{dataType:d}};o.call(this,s,y)},onProcess:function(){this.state=c.FILE_PROCESSING;var h=this.config.dataType;this.data=h?new h(this.xhrLoader.response):this.xhrLoader.response,this.onProcessComplete()}});r.register("binary",function(h,s,l,f){if(Array.isArray(h))for(var u=0;u{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(74099),o=t(95540),r=t(19550),n=t(41212),e=t(26430),i=t(21859),h=t(57318),s=new a({Extends:e,initialize:function(f,u,d,p,g,y){var x,T;if(n(u)){var S=u;u=o(S,"key"),x=new r(f,{key:u,url:o(S,"textureURL"),extension:o(S,"textureExtension","png"),normalMap:o(S,"normalMap"),xhrSettings:o(S,"textureXhrSettings")}),T=new h(f,{key:u,url:o(S,"fontDataURL"),extension:o(S,"fontDataExtension","xml"),xhrSettings:o(S,"fontDataXhrSettings")})}else x=new r(f,u,d,g),T=new h(f,u,p,y);x.linkFile?e.call(this,f,"bitmapfont",u,[x,T,x.linkFile]):e.call(this,f,"bitmapfont",u,[x,T])},addToCache:function(){if(this.isReadyToProcess()){var l=this.files[0],f=this.files[1];l.addToCache();var u=l.cache.get(l.key),d=i(f.data,l.cache.getFrame(l.key),0,0,u);this.loader.cacheManager.bitmapFont.add(l.key,{data:d,texture:l.key,frame:null}),this.complete=!0}}});c.register("bitmapFont",function(l,f,u,d,p){var g;if(Array.isArray(l))for(var y=0;y{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(23906),o=t(41299),r=t(74099),n=t(95540),e=t(41212),i=new a({Extends:o,initialize:function(s,l,f,u){var d="css";if(e(l)){var p=l;l=n(p,"key"),f=n(p,"url"),u=n(p,"xhrSettings"),d=n(p,"extension",d)}var g={type:"script",cache:!1,extension:d,responseType:"text",key:l,url:f,xhrSettings:u};o.call(this,s,g)},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=document.createElement("style"),this.data.defer=!1,this.data.innerHTML=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});r.register("css",function(h,s,l){if(Array.isArray(h))for(var f=0;f{/** + * @author Richard Davey + * @copyright 2021 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(38734),c=t(85722),o=t(83419),r=t(74099),n=t(95540),e=t(19550),i=t(41212),h=t(518),s=t(31403),l=t(46975),f=t(59327),u=t(26430),d=t(82038),p=t(55222),g=new o({Extends:u,initialize:function(x,T,S,M){if(S.multiAtlasURL){var w=new h(x,{key:T,url:S.multiAtlasURL,xhrSettings:M,config:S});u.call(this,x,"texture",T,[w])}else{var L=S.textureURL.substr(S.textureURL.length-3);S.type||(S.type=L.toLowerCase()==="ktx"?"KTX":"PVR");var F=new c(x,{key:T,url:S.textureURL,extension:L,xhrSettings:M,config:S});if(S.atlasURL){var O=new h(x,{key:T,url:S.atlasURL,xhrSettings:M,config:S});u.call(this,x,"texture",T,[F,O])}else u.call(this,x,"texture",T,[F])}this.config=S},onFileComplete:function(y){var x=this.files.indexOf(y);if(x!==-1){if(this.pending--,!this.config.multiAtlasURL)return;if(y.type==="json"&&y.data.hasOwnProperty("textures")){var T=y.data.textures,S=this.config,M=this.loader,w=M.baseURL,L=M.path,F=M.prefix,O=n(S,"multiBaseURL",this.baseURL),b=n(S,"multiPath",this.path),N=n(S,"prefix",this.prefix),V=n(S,"textureXhrSettings");O&&M.setBaseURL(O),b&&M.setPath(b),N&&M.setPrefix(N);for(var K=0;K{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(23906),o=t(41299),r=t(74099),n=t(95540),e=t(41212),i=t(73894),h=new a({Extends:o,initialize:function(l,f,u,d,p){var g="glsl";if(e(f)){var y=f;f=n(y,"key"),u=n(y,"url"),d=n(y,"shaderType","fragment"),p=n(y,"xhrSettings"),g=n(y,"extension",g)}else d===void 0&&(d="fragment");var x={type:"glsl",cache:l.cacheManager.shader,extension:g,responseType:"text",key:f,url:u,config:{shaderType:d},xhrSettings:p};o.call(this,l,x)},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var s=this.data.split(` +`),l=this.extractBlock(s,0);if(l)for(;l;){var f=this.getShaderName(l.header),u=this.getShaderType(l.header),d=this.getShaderUniforms(l.header),p=l.shader;if(this.cache.has(f)){var g=this.cache.get(f);u==="fragment"?g.fragmentSrc=p:g.vertexSrc=p,g.uniforms||(g.uniforms=d)}else u==="fragment"?this.cache.add(f,new i(f,p,"",d)):this.cache.add(f,new i(f,"",p,d));l=this.extractBlock(s,l.offset)}else this.config.shaderType==="fragment"?this.cache.add(this.key,new i(this.key,this.data)):this.cache.add(this.key,new i(this.key,"",this.data))},getShaderName:function(s){for(var l=0;l{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(54899),o=t(41299),r=t(95540),n=t(98356),e=t(41212),i=new a({Extends:o,initialize:function(s,l,f,u){if(e(l)){var d=l;l=r(d,"key"),u=r(d,"config",u)}var p={type:"audio",cache:s.cacheManager.audio,extension:f.type,key:l,url:f.url,config:u};o.call(this,s,p),this.locked="ontouchstart"in window,this.loaded=!1,this.filesLoaded=0,this.filesTotal=0},onLoad:function(){this.loaded||(this.loaded=!0,this.loader.nextFile(this,!0))},onError:function(){for(var h=0;h{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(23906),o=t(41299),r=t(74099),n=t(95540),e=t(41212),i=new a({Extends:o,initialize:function(s,l,f,u){var d="html";if(e(l)){var p=l;l=n(p,"key"),f=n(p,"url"),u=n(p,"xhrSettings"),d=n(p,"extension",d)}var g={type:"text",cache:s.cacheManager.html,extension:d,responseType:"text",key:l,url:f,xhrSettings:u};o.call(this,s,g)},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});r.register("html",function(h,s,l){if(Array.isArray(h))for(var f=0;f{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(23906),o=t(41299),r=t(74099),n=t(95540),e=t(41212),i=new a({Extends:o,initialize:function(s,l,f,u,d,p){u===void 0&&(u=512),d===void 0&&(d=512);var g="html";if(e(l)){var y=l;l=n(y,"key"),f=n(y,"url"),p=n(y,"xhrSettings"),g=n(y,"extension",g),u=n(y,"width",u),d=n(y,"height",d)}var x={type:"html",cache:s.textureManager,extension:g,responseType:"text",key:l,url:f,xhrSettings:p,config:{width:u,height:d}};o.call(this,s,x)},onProcess:function(){this.state=c.FILE_PROCESSING;var h=this.config.width,s=this.config.height,l=[];l.push(''),l.push(''),l.push(''),l.push(this.xhrLoader.responseText),l.push(""),l.push(""),l.push("");var f=[l.join(` +`)],u=this;try{var d=new window.Blob(f,{type:"image/svg+xml;charset=utf-8"})}catch{u.state=c.FILE_ERRORED,u.onProcessComplete();return}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){o.revokeObjectURL(u.data),u.onProcessComplete()},this.data.onerror=function(){o.revokeObjectURL(u.data),u.onProcessError()},o.createObjectURL(this.data,d,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});r.register("htmlTexture",function(h,s,l,f,u){if(Array.isArray(h))for(var d=0;d{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(23906),o=t(41299),r=t(74099),n=t(95540),e=t(41212),i=t(98356),h=new a({Extends:o,initialize:function s(l,f,u,d,p){var g="png",y;if(e(f)){var x=f;f=n(x,"key"),u=n(x,"url"),y=n(x,"normalMap"),d=n(x,"xhrSettings"),g=n(x,"extension",g),p=n(x,"frameConfig")}Array.isArray(u)&&(y=u[1],u=u[0]);var T={type:"image",cache:l.textureManager,extension:g,responseType:"blob",key:f,url:u,xhrSettings:d,config:p};if(o.call(this,l,T),y){var S=new s(l,this.key,y,d,p);S.type="normalMap",this.setLink(S),l.addFile(S)}this.useImageElementLoad=l.imageLoadType==="HTMLImageElement"||this.base64,this.useImageElementLoad&&(this.load=this.loadImage,this.onProcess=this.onProcessImage)},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var s=this;this.data.onload=function(){o.revokeObjectURL(s.data),s.onProcessComplete()},this.data.onerror=function(){o.revokeObjectURL(s.data),s.onProcessError()},o.createObjectURL(this.data,this.xhrLoader.response,"image/png")},onProcessImage:function(){var s=this.state;this.state=c.FILE_PROCESSING,s===c.FILE_LOADED?this.onProcessComplete():this.onProcessError()},loadImage:function(){this.state=c.FILE_LOADING,this.src=i(this,this.loader.baseURL),this.data=new Image,this.data.crossOrigin=this.crossOrigin;var s=this;this.data.onload=function(){s.state=c.FILE_LOADED,s.loader.nextFile(s,!0)},this.data.onerror=function(){s.loader.nextFile(s,!1)},this.data.src=this.src},addToCache:function(){var s=this.linkFile;s?s.state>=c.FILE_COMPLETE&&(s.type==="spritesheet"?s.addToCache():this.type==="normalMap"?this.cache.addImage(this.key,s.data,this.data):this.cache.addImage(this.key,this.data,s.data)):this.cache.addImage(this.key,this.data)}});r.register("image",function(s,l,f){if(Array.isArray(s))for(var u=0;u{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(23906),o=t(41299),r=t(74099),n=t(95540),e=t(35154),i=t(41212),h=new a({Extends:o,initialize:function(l,f,u,d,p){var g="json";if(i(f)){var y=f;f=n(y,"key"),u=n(y,"url"),d=n(y,"xhrSettings"),g=n(y,"extension",g),p=n(y,"dataKey",p)}var x={type:"json",cache:l.cacheManager.json,extension:g,responseType:"text",key:f,url:u,xhrSettings:d,config:p};o.call(this,l,x),i(u)&&(p?this.data=e(u,p):this.data=u,this.state=c.FILE_POPULATED)},onProcess:function(){if(this.state!==c.FILE_POPULATED){this.state=c.FILE_PROCESSING;try{var s=JSON.parse(this.xhrLoader.responseText)}catch(f){throw this.onProcessError(),f}var l=this.config;typeof l=="string"?this.data=e(s,l,s):this.data=s}this.onProcessComplete()}});r.register("json",function(s,l,f,u){if(Array.isArray(s))for(var d=0;d{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(74099),o=t(95540),r=t(19550),n=t(41212),e=t(518),i=t(26430),h=new a({Extends:i,initialize:function(l,f,u,d,p,g,y){if(n(f)){var x=f;f=o(x,"key"),o(x,"url",!1)?u=o(x,"url"):u=o(x,"atlasURL"),g=o(x,"xhrSettings"),d=o(x,"path"),p=o(x,"baseURL"),y=o(x,"textureXhrSettings")}var T=new e(l,f,u,g);i.call(this,l,"multiatlas",f,[T]),this.config.path=d,this.config.baseURL=p,this.config.textureXhrSettings=y},onFileComplete:function(s){var l=this.files.indexOf(s);if(l!==-1&&(this.pending--,s.type==="json"&&s.data.hasOwnProperty("textures"))){var f=s.data.textures,u=this.config,d=this.loader,p=d.baseURL,g=d.path,y=d.prefix,x=o(u,"baseURL",this.baseURL),T=o(u,"path",this.path),S=o(u,"prefix",this.prefix),M=o(u,"textureXhrSettings");d.setBaseURL(x),d.setPath(T),d.setPrefix(S);for(var w=0;w{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(74099),o=t(95540),r=t(41212),n=t(26430),e=t(34328),i=new a({Extends:n,initialize:function(s,l,f,u){var d="js",p=[];if(r(l)){var g=l;l=o(g,"key"),f=o(g,"url"),u=o(g,"xhrSettings"),d=o(g,"extension",d)}Array.isArray(f)||(f=[f]);for(var y=0;y{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(74099),o=t(95540),r=t(41212),n=t(26430),e=t(85048),i=t(61485),h=t(78776),s=new a({Extends:n,initialize:function(f,u,d,p,g,y){var x,T,S=f.cacheManager.obj;if(r(u)){var M=u;u=o(M,"key"),x=new h(f,{key:u,type:"obj",cache:S,url:o(M,"url"),extension:o(M,"extension","obj"),xhrSettings:o(M,"xhrSettings"),config:{flipUV:o(M,"flipUV",g)}}),p=o(M,"matURL"),p&&(T=new h(f,{key:u,type:"mat",cache:S,url:p,extension:o(M,"matExtension","mat"),xhrSettings:o(M,"xhrSettings")}))}else x=new h(f,{key:u,url:d,type:"obj",cache:S,extension:"obj",xhrSettings:y,config:{flipUV:g}}),p&&(T=new h(f,{key:u,url:p,type:"mat",cache:S,extension:"mat",xhrSettings:y}));n.call(this,f,"obj",u,[x,T])},addToCache:function(){if(this.isReadyToProcess()){var l=this.files[0],f=this.files[1],u=e(l.data,l.config.flipUV);f&&(u.materials=i(f.data)),l.cache.add(l.key,u),this.complete=!0}}});c.register("obj",function(l,f,u,d,p){var g;if(Array.isArray(l))for(var y=0;y{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(23906),o=t(74099),r=t(518),n=new a({Extends:r,initialize:function(i,h,s,l,f){r.call(this,i,h,s,l,f),this.type="packfile"},onProcess:function(){if(this.state!==c.FILE_POPULATED&&(this.state=c.FILE_PROCESSING,this.data=JSON.parse(this.xhrLoader.responseText)),this.data.hasOwnProperty("files")&&this.config){var e={};e[this.config]=this.data,this.data=e}this.loader.addPack(this.data,this.config),this.onProcessComplete()}});o.register("pack",function(e,i,h,s){if(Array.isArray(e))for(var l=0;l{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(23906),o=t(41299),r=t(74099),n=t(95540),e=t(41212),i=new a({Extends:o,initialize:function(s,l,f,u,d,p){var g="js";if(e(l)){var y=l;l=n(y,"key"),f=n(y,"url"),p=n(y,"xhrSettings"),g=n(y,"extension",g),u=n(y,"start"),d=n(y,"mapping")}var x={type:"plugin",cache:!1,extension:g,responseType:"text",key:l,url:f,xhrSettings:p,config:{start:u,mapping:d}};o.call(this,s,x),typeof f=="function"&&(this.data=f,this.state=c.FILE_POPULATED)},onProcess:function(){var h=this.loader.systems.plugins,s=this.config,l=n(s,"start",!1),f=n(s,"mapping",null);if(this.state===c.FILE_POPULATED)h.install(this.key,this.data,l,f);else{this.state=c.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data);var u=h.install(this.key,window[this.key],l,f);(l||f)&&(this.loader.systems[f]=u,this.loader.scene[f]=u)}this.onProcessComplete()}});r.register("plugin",function(h,s,l,f,u){if(Array.isArray(h))for(var d=0;d{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(23906),o=t(41299),r=t(74099),n=t(95540),e=t(41212),i=new a({Extends:o,initialize:function(s,l,f,u,d){var p="svg";if(e(l)){var g=l;l=n(g,"key"),f=n(g,"url"),u=n(g,"svgConfig",{}),d=n(g,"xhrSettings"),p=n(g,"extension",p)}var y={type:"svg",cache:s.textureManager,extension:p,responseType:"text",key:l,url:f,xhrSettings:d,config:{width:n(u,"width"),height:n(u,"height"),scale:n(u,"scale")}};o.call(this,s,y)},onProcess:function(){this.state=c.FILE_PROCESSING;var h=this.xhrLoader.responseText,s=[h],l=this.config.width,f=this.config.height,u=this.config.scale;t:if(l&&f||u){var d=null,p=new DOMParser;d=p.parseFromString(h,"text/xml");var g=d.getElementsByTagName("svg")[0],y=g.hasAttribute("viewBox"),x=parseFloat(g.getAttribute("width")),T=parseFloat(g.getAttribute("height"));if(!y&&x&&T)g.setAttribute("viewBox","0 0 "+x+" "+T);else if(y&&!x&&!T){var S=g.getAttribute("viewBox").split(/\s+|,/);x=S[2],T=S[3]}if(u)if(x&&T)l=x*u,f=T*u;else break t;g.setAttribute("width",l.toString()+"px"),g.setAttribute("height",f.toString()+"px"),s=[new XMLSerializer().serializeToString(g)]}try{var M=new window.Blob(s,{type:"image/svg+xml;charset=utf-8"})}catch{this.onProcessError();return}this.data=new Image,this.data.crossOrigin=this.crossOrigin;var w=this,L=!1;this.data.onload=function(){L||o.revokeObjectURL(w.data),w.onProcessComplete()},this.data.onerror=function(){L?w.onProcessError():(L=!0,o.revokeObjectURL(w.data),w.data.src="data:image/svg+xml,"+encodeURIComponent(s.join("")))},o.createObjectURL(this.data,M,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});r.register("svg",function(h,s,l,f){if(Array.isArray(h))for(var u=0;u{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(23906),o=t(41299),r=t(74099),n=t(95540),e=t(41212),i=new a({Extends:o,initialize:function(s,l,f,u){var d="js";if(e(l)){var p=l;l=n(p,"key"),f=n(p,"url"),u=n(p,"xhrSettings"),d=n(p,"extension",d)}var g={type:"text",extension:d,responseType:"text",key:l,url:f,xhrSettings:u};o.call(this,s,g)},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var h=this.data.concat(`(function(){ +return new `+this.key+`(); +}).call(this);`),s=eval;this.loader.sceneManager.add(this.key,s(h)),this.complete=!0}});r.register("sceneFile",function(h,s,l){if(Array.isArray(h))for(var f=0;f{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(23906),o=t(41299),r=t(74099),n=t(95540),e=t(41212),i=new a({Extends:o,initialize:function(s,l,f,u,d,p){var g="js";if(e(l)){var y=l;l=n(y,"key"),f=n(y,"url"),p=n(y,"xhrSettings"),g=n(y,"extension",g),u=n(y,"systemKey"),d=n(y,"sceneKey")}var x={type:"scenePlugin",cache:!1,extension:g,responseType:"text",key:l,url:f,xhrSettings:p,config:{systemKey:u,sceneKey:d}};o.call(this,s,x),typeof f=="function"&&(this.data=f,this.state=c.FILE_POPULATED)},onProcess:function(){var h=this.loader.systems.plugins,s=this.config,l=this.key,f=n(s,"systemKey",l),u=n(s,"sceneKey",l);this.state===c.FILE_POPULATED?h.installScenePlugin(f,this.data,u,this.loader.scene,!0):(this.state=c.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data),h.installScenePlugin(f,window[this.key],u,this.loader.scene,!0)),this.onProcessComplete()}});r.register("scenePlugin",function(h,s,l,f,u){if(Array.isArray(h))for(var d=0;d{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(23906),o=t(41299),r=t(74099),n=t(95540),e=t(41212),i=new a({Extends:o,initialize:function(s,l,f,u,d){var p="js";if(e(l)){var g=l;l=n(g,"key"),f=n(g,"url"),u=n(g,"type","script"),d=n(g,"xhrSettings"),p=n(g,"extension",p)}else u===void 0&&(u="script");var y={type:u,cache:!1,extension:p,responseType:"text",key:l,url:f,xhrSettings:d};o.call(this,s,y)},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});r.register("script",function(h,s,l,f){if(Array.isArray(h))for(var u=0;u{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(23906),o=t(74099),r=t(19550),n=new a({Extends:r,initialize:function(i,h,s,l,f){r.call(this,i,h,s,f,l),this.type="spritesheet"},addToCache:function(){var e=this.linkFile;e?e.state>=c.FILE_COMPLETE&&(this.type==="normalMap"?this.cache.addSpriteSheet(this.key,e.data,this.config,this.data):this.cache.addSpriteSheet(this.key,this.data,this.config,e.data)):this.cache.addSpriteSheet(this.key,this.data,this.config)}});o.register("spritesheet",function(e,i,h,s){if(Array.isArray(e))for(var l=0;l{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(23906),o=t(41299),r=t(74099),n=t(95540),e=t(41212),i=new a({Extends:o,initialize:function(s,l,f,u){var d="text",p="txt",g=s.cacheManager.text;if(e(l)){var y=l;l=n(y,"key"),f=n(y,"url"),u=n(y,"xhrSettings"),p=n(y,"extension",p),d=n(y,"type",d),g=n(y,"cache",g)}var x={type:d,cache:g,extension:p,responseType:"text",key:l,url:f,xhrSettings:u};o.call(this,s,x)},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});r.register("text",function(h,s,l){if(Array.isArray(h))for(var f=0;f{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(23906),o=t(41299),r=t(74099),n=t(95540),e=t(41212),i=t(80341),h=new a({Extends:o,initialize:function(l,f,u,d){var p="csv";if(e(f)){var g=f;f=n(g,"key"),u=n(g,"url"),d=n(g,"xhrSettings"),p=n(g,"extension",p)}var y={type:"tilemapCSV",cache:l.cacheManager.tilemap,extension:p,responseType:"text",key:f,url:u,xhrSettings:d};o.call(this,l,y),this.tilemapFormat=i.CSV},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var s={format:this.tilemapFormat,data:this.data};this.cache.add(this.key,s)}});r.register("tilemapCSV",function(s,l,f){if(Array.isArray(s))for(var u=0;u{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(74099),o=t(518),r=t(80341),n=new a({Extends:o,initialize:function(i,h,s,l){o.call(this,i,h,s,l),this.type="tilemapJSON",this.cache=i.cacheManager.tilemap},addToCache:function(){var e={format:r.WELTMEISTER,data:this.data};this.cache.add(this.key,e)}});c.register("tilemapImpact",function(e,i,h){if(Array.isArray(e))for(var s=0;s{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(74099),o=t(518),r=t(80341),n=new a({Extends:o,initialize:function(i,h,s,l){o.call(this,i,h,s,l),this.type="tilemapJSON",this.cache=i.cacheManager.tilemap},addToCache:function(){var e={format:r.TILED_JSON,data:this.data};this.cache.add(this.key,e)}});c.register("tilemapTiledJSON",function(e,i,h){if(Array.isArray(e))for(var s=0;s{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(74099),o=t(95540),r=t(19550),n=t(41212),e=t(26430),i=t(78776),h=new a({Extends:e,initialize:function(l,f,u,d,p,g){var y,x;if(n(f)){var T=f;f=o(T,"key"),y=new r(l,{key:f,url:o(T,"textureURL"),extension:o(T,"textureExtension","png"),normalMap:o(T,"normalMap"),xhrSettings:o(T,"textureXhrSettings")}),x=new i(l,{key:f,url:o(T,"atlasURL"),extension:o(T,"atlasExtension","txt"),xhrSettings:o(T,"atlasXhrSettings")})}else y=new r(l,f,u,p),x=new i(l,f,d,g);y.linkFile?e.call(this,l,"unityatlas",f,[y,x,y.linkFile]):e.call(this,l,"unityatlas",f,[y,x])},addToCache:function(){if(this.isReadyToProcess()){var s=this.files[0],l=this.files[1],f=this.files[2]?this.files[2].data:null;this.loader.textureManager.addUnityAtlas(s.key,s.data,l.data,f),this.complete=!0}}});c.register("unityAtlas",function(s,l,f,u,d){var p;if(Array.isArray(s))for(var g=0;g{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(23906),o=t(41299),r=t(74099),n=t(98356),e=t(95540),i=t(41212),h=new a({Extends:o,initialize:function(l,f,u,d){if(d===void 0&&(d=!1),i(f)){var p=f;f=e(p,"key"),u=e(p,"url",[]),d=e(p,"noAudio",!1)}var g=l.systems.game.device.video.getVideoURL(u);g||console.warn("VideoFile: No supported format for "+f);var y={type:"video",cache:l.cacheManager.video,extension:g.type,key:f,url:g.url,config:{noAudio:d}};o.call(this,l,y)},onProcess:function(){this.data={url:this.src,noAudio:this.config.noAudio,crossOrigin:this.crossOrigin},this.onProcessComplete()},load:function(){this.src=n(this,this.loader.baseURL),this.state=c.FILE_LOADED,this.loader.nextFile(this,!0)}});r.register("video",function(s,l,f){if(Array.isArray(s))for(var u=0;u{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(23906),o=t(41299),r=t(74099),n=t(95540),e=t(41212),i=t(56836),h=new a({Extends:o,initialize:function(l,f,u,d){var p="xml";if(e(f)){var g=f;f=n(g,"key"),u=n(g,"url"),d=n(g,"xhrSettings"),p=n(g,"extension",p)}var y={type:"xml",cache:l.cacheManager.xml,extension:p,responseType:"text",key:f,url:u,xhrSettings:d};o.call(this,l,y)},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=i(this.xhrLoader.responseText),this.data?this.onProcessComplete():this.onProcessError()}});r.register("xml",function(s,l,f){if(Array.isArray(s))for(var u=0;u{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.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:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(23906),c=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=c(!1,o,a),v.exports=o},53307:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){for(var a=0,c=0;c{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(6411),c=function(o,r){return a(o)/a(r)/a(o-r)};v.exports=c},30976:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){return Math.floor(Math.random()*(a-t+1)+t)};v.exports=m},87842:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c,o,r){var n=(o-a)*.5,e=(r-c)*.5,i=t*t,h=t*i;return(2*c-2*o+n+e)*h+(-3*c+3*o-2*n-e)*i+n*t+c};v.exports=m},26302:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){a===void 0&&(a=0),c===void 0&&(c=10);var o=Math.pow(c,-a);return Math.ceil(t*o)/o};v.exports=m},45319:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){return Math.max(a,Math.min(c,t))};v.exports=m},39506:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(36383),c=function(o){return o*a.DEG_TO_RAD};v.exports=c},61241:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){return Math.abs(t-a)};v.exports=m},38857:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(45319),c=t(83419),o=t(37867),r=t(29747),n=new o,e=new c({initialize:function i(h,s,l,f){h===void 0&&(h=0),s===void 0&&(s=0),l===void 0&&(l=0),f===void 0&&(f=i.DefaultOrder),this._x=h,this._y=s,this._z=l,this._order=f,this.onChangeCallback=r},x:{get:function(){return this._x},set:function(i){this._x=i,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(i){this._y=i,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(i){this._z=i,this.onChangeCallback(this)}},order:{get:function(){return this._order},set:function(i){this._order=i,this.onChangeCallback(this)}},set:function(i,h,s,l){return l===void 0&&(l=this._order),this._x=i,this._y=h,this._z=s,this._order=l,this.onChangeCallback(this),this},copy:function(i){return this.set(i.x,i.y,i.z,i.order)},setFromQuaternion:function(i,h,s){return h===void 0&&(h=this._order),s===void 0&&(s=!1),n.fromQuat(i),this.setFromRotationMatrix(n,h,s)},setFromRotationMatrix:function(i,h,s){h===void 0&&(h=this._order),s===void 0&&(s=!1);var l=i.val,f=l[0],u=l[4],d=l[8],p=l[1],g=l[5],y=l[9],x=l[2],T=l[6],S=l[10],M=0,w=0,L=0,F=.99999;switch(h){case"XYZ":{w=Math.asin(a(d,-1,1)),Math.abs(d){/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){if(t===0)return 1;for(var a=t;--t;)a*=t;return a};v.exports=m},99472:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){return Math.random()*(a-t)+t};v.exports=m},77623:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){a===void 0&&(a=0),c===void 0&&(c=10);var o=Math.pow(c,-a);return Math.floor(t*o)/o};v.exports=m},62945:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(45319),c=function(o,r,n){return o=a(o,0,1),(n-r)*o+r};v.exports=c},38265:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){return t/a/1e3};v.exports=m},78702:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return t==parseFloat(t)?!(t%2):void 0};v.exports=m},94883:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return t===parseFloat(t)?!(t%2):void 0};v.exports=m},28915:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){return(a-t)*c+t};v.exports=m},94908:v=>{/** + * @author Greg McLean + * @copyright 2021 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){return c===void 0&&(c=0),t.clone().lerp(a,c)};v.exports=m},94434:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=new a({initialize:function(r){this.val=new Float32Array(9),r?this.copy(r):this.identity()},clone:function(){return new c(this)},set:function(o){return this.copy(o)},copy:function(o){var r=this.val,n=o.val;return r[0]=n[0],r[1]=n[1],r[2]=n[2],r[3]=n[3],r[4]=n[4],r[5]=n[5],r[6]=n[6],r[7]=n[7],r[8]=n[8],this},fromMat4:function(o){var r=o.val,n=this.val;return n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=r[4],n[4]=r[5],n[5]=r[6],n[6]=r[8],n[7]=r[9],n[8]=r[10],this},fromArray:function(o){var r=this.val;return r[0]=o[0],r[1]=o[1],r[2]=o[2],r[3]=o[3],r[4]=o[4],r[5]=o[5],r[6]=o[6],r[7]=o[7],r[8]=o[8],this},identity:function(){var o=this.val;return o[0]=1,o[1]=0,o[2]=0,o[3]=0,o[4]=1,o[5]=0,o[6]=0,o[7]=0,o[8]=1,this},transpose:function(){var o=this.val,r=o[1],n=o[2],e=o[5];return o[1]=o[3],o[2]=o[6],o[3]=r,o[5]=o[7],o[6]=n,o[7]=e,this},invert:function(){var o=this.val,r=o[0],n=o[1],e=o[2],i=o[3],h=o[4],s=o[5],l=o[6],f=o[7],u=o[8],d=u*h-s*f,p=-u*i+s*l,g=f*i-h*l,y=r*d+n*p+e*g;return y?(y=1/y,o[0]=d*y,o[1]=(-u*n+e*f)*y,o[2]=(s*n-e*h)*y,o[3]=p*y,o[4]=(u*r-e*l)*y,o[5]=(-s*r+e*i)*y,o[6]=g*y,o[7]=(-f*r+n*l)*y,o[8]=(h*r-n*i)*y,this):null},adjoint:function(){var o=this.val,r=o[0],n=o[1],e=o[2],i=o[3],h=o[4],s=o[5],l=o[6],f=o[7],u=o[8];return o[0]=h*u-s*f,o[1]=e*f-n*u,o[2]=n*s-e*h,o[3]=s*l-i*u,o[4]=r*u-e*l,o[5]=e*i-r*s,o[6]=i*f-h*l,o[7]=n*l-r*f,o[8]=r*h-n*i,this},determinant:function(){var o=this.val,r=o[0],n=o[1],e=o[2],i=o[3],h=o[4],s=o[5],l=o[6],f=o[7],u=o[8];return r*(u*h-s*f)+n*(-u*i+s*l)+e*(f*i-h*l)},multiply:function(o){var r=this.val,n=r[0],e=r[1],i=r[2],h=r[3],s=r[4],l=r[5],f=r[6],u=r[7],d=r[8],p=o.val,g=p[0],y=p[1],x=p[2],T=p[3],S=p[4],M=p[5],w=p[6],L=p[7],F=p[8];return r[0]=g*n+y*h+x*f,r[1]=g*e+y*s+x*u,r[2]=g*i+y*l+x*d,r[3]=T*n+S*h+M*f,r[4]=T*e+S*s+M*u,r[5]=T*i+S*l+M*d,r[6]=w*n+L*h+F*f,r[7]=w*e+L*s+F*u,r[8]=w*i+L*l+F*d,this},translate:function(o){var r=this.val,n=o.x,e=o.y;return r[6]=n*r[0]+e*r[3]+r[6],r[7]=n*r[1]+e*r[4]+r[7],r[8]=n*r[2]+e*r[5]+r[8],this},rotate:function(o){var r=this.val,n=r[0],e=r[1],i=r[2],h=r[3],s=r[4],l=r[5],f=Math.sin(o),u=Math.cos(o);return r[0]=u*n+f*h,r[1]=u*e+f*s,r[2]=u*i+f*l,r[3]=u*h-f*n,r[4]=u*s-f*e,r[5]=u*l-f*i,this},scale:function(o){var r=this.val,n=o.x,e=o.y;return r[0]=n*r[0],r[1]=n*r[1],r[2]=n*r[2],r[3]=e*r[3],r[4]=e*r[4],r[5]=e*r[5],this},fromQuat:function(o){var r=o.x,n=o.y,e=o.z,i=o.w,h=r+r,s=n+n,l=e+e,f=r*h,u=r*s,d=r*l,p=n*s,g=n*l,y=e*l,x=i*h,T=i*s,S=i*l,M=this.val;return M[0]=1-(p+y),M[3]=u+S,M[6]=d-T,M[1]=u-S,M[4]=1-(f+y),M[7]=g+x,M[2]=d+T,M[5]=g-x,M[8]=1-(f+p),this},normalFromMat4:function(o){var r=o.val,n=this.val,e=r[0],i=r[1],h=r[2],s=r[3],l=r[4],f=r[5],u=r[6],d=r[7],p=r[8],g=r[9],y=r[10],x=r[11],T=r[12],S=r[13],M=r[14],w=r[15],L=e*f-i*l,F=e*u-h*l,O=e*d-s*l,b=i*u-h*f,N=i*d-s*f,V=h*d-s*u,K=p*S-g*T,$=p*M-y*T,j=p*w-x*T,X=g*M-y*S,Y=g*w-x*S,D=y*w-x*M,z=L*D-F*Y+O*X+b*j-N*$+V*K;return z?(z=1/z,n[0]=(f*D-u*Y+d*X)*z,n[1]=(u*j-l*D-d*$)*z,n[2]=(l*Y-f*j+d*K)*z,n[3]=(h*Y-i*D-s*X)*z,n[4]=(e*D-h*j+s*$)*z,n[5]=(i*j-e*Y-s*K)*z,n[6]=(S*V-M*N+w*b)*z,n[7]=(M*O-T*V-w*F)*z,n[8]=(T*N-S*O+w*L)*z,this):null}});v.exports=c},37867:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(25836),o=1e-6,r=new a({initialize:function(f){this.val=new Float32Array(16),f?this.copy(f):this.identity()},clone:function(){return new r(this)},set:function(l){return this.copy(l)},setValues:function(l,f,u,d,p,g,y,x,T,S,M,w,L,F,O,b){var N=this.val;return N[0]=l,N[1]=f,N[2]=u,N[3]=d,N[4]=p,N[5]=g,N[6]=y,N[7]=x,N[8]=T,N[9]=S,N[10]=M,N[11]=w,N[12]=L,N[13]=F,N[14]=O,N[15]=b,this},copy:function(l){var f=l.val;return this.setValues(f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7],f[8],f[9],f[10],f[11],f[12],f[13],f[14],f[15])},fromArray:function(l){return this.setValues(l[0],l[1],l[2],l[3],l[4],l[5],l[6],l[7],l[8],l[9],l[10],l[11],l[12],l[13],l[14],l[15])},zero:function(){return this.setValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)},transform:function(l,f,u){var d=n.fromQuat(u),p=d.val,g=f.x,y=f.y,x=f.z;return this.setValues(p[0]*g,p[1]*g,p[2]*g,0,p[4]*y,p[5]*y,p[6]*y,0,p[8]*x,p[9]*x,p[10]*x,0,l.x,l.y,l.z,1)},xyz:function(l,f,u){this.identity();var d=this.val;return d[12]=l,d[13]=f,d[14]=u,this},scaling:function(l,f,u){this.zero();var d=this.val;return d[0]=l,d[5]=f,d[10]=u,d[15]=1,this},identity:function(){return this.setValues(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)},transpose:function(){var l=this.val,f=l[1],u=l[2],d=l[3],p=l[6],g=l[7],y=l[11];return l[1]=l[4],l[2]=l[8],l[3]=l[12],l[4]=f,l[6]=l[9],l[7]=l[13],l[8]=u,l[9]=p,l[11]=l[14],l[12]=d,l[13]=g,l[14]=y,this},getInverse:function(l){return this.copy(l),this.invert()},invert:function(){var l=this.val,f=l[0],u=l[1],d=l[2],p=l[3],g=l[4],y=l[5],x=l[6],T=l[7],S=l[8],M=l[9],w=l[10],L=l[11],F=l[12],O=l[13],b=l[14],N=l[15],V=f*y-u*g,K=f*x-d*g,$=f*T-p*g,j=u*x-d*y,X=u*T-p*y,Y=d*T-p*x,D=S*O-M*F,z=S*b-w*F,W=S*N-L*F,H=M*b-w*O,J=M*N-L*O,Q=w*N-L*b,k=V*Q-K*J+$*H+j*W-X*z+Y*D;return k?(k=1/k,this.setValues((y*Q-x*J+T*H)*k,(d*J-u*Q-p*H)*k,(O*Y-b*X+N*j)*k,(w*X-M*Y-L*j)*k,(x*W-g*Q-T*z)*k,(f*Q-d*W+p*z)*k,(b*$-F*Y-N*K)*k,(S*Y-w*$+L*K)*k,(g*J-y*W+T*D)*k,(u*W-f*J-p*D)*k,(F*X-O*$+N*V)*k,(M*$-S*X-L*V)*k,(y*z-g*H-x*D)*k,(f*H-u*z+d*D)*k,(O*K-F*j-b*V)*k,(S*j-M*K+w*V)*k)):this},adjoint:function(){var l=this.val,f=l[0],u=l[1],d=l[2],p=l[3],g=l[4],y=l[5],x=l[6],T=l[7],S=l[8],M=l[9],w=l[10],L=l[11],F=l[12],O=l[13],b=l[14],N=l[15];return this.setValues(y*(w*N-L*b)-M*(x*N-T*b)+O*(x*L-T*w),-(u*(w*N-L*b)-M*(d*N-p*b)+O*(d*L-p*w)),u*(x*N-T*b)-y*(d*N-p*b)+O*(d*T-p*x),-(u*(x*L-T*w)-y*(d*L-p*w)+M*(d*T-p*x)),-(g*(w*N-L*b)-S*(x*N-T*b)+F*(x*L-T*w)),f*(w*N-L*b)-S*(d*N-p*b)+F*(d*L-p*w),-(f*(x*N-T*b)-g*(d*N-p*b)+F*(d*T-p*x)),f*(x*L-T*w)-g*(d*L-p*w)+S*(d*T-p*x),g*(M*N-L*O)-S*(y*N-T*O)+F*(y*L-T*M),-(f*(M*N-L*O)-S*(u*N-p*O)+F*(u*L-p*M)),f*(y*N-T*O)-g*(u*N-p*O)+F*(u*T-p*y),-(f*(y*L-T*M)-g*(u*L-p*M)+S*(u*T-p*y)),-(g*(M*b-w*O)-S*(y*b-x*O)+F*(y*w-x*M)),f*(M*b-w*O)-S*(u*b-d*O)+F*(u*w-d*M),-(f*(y*b-x*O)-g*(u*b-d*O)+F*(u*x-d*y)),f*(y*w-x*M)-g*(u*w-d*M)+S*(u*x-d*y))},determinant:function(){var l=this.val,f=l[0],u=l[1],d=l[2],p=l[3],g=l[4],y=l[5],x=l[6],T=l[7],S=l[8],M=l[9],w=l[10],L=l[11],F=l[12],O=l[13],b=l[14],N=l[15],V=f*y-u*g,K=f*x-d*g,$=f*T-p*g,j=u*x-d*y,X=u*T-p*y,Y=d*T-p*x,D=S*O-M*F,z=S*b-w*F,W=S*N-L*F,H=M*b-w*O,J=M*N-L*O,Q=w*N-L*b;return V*Q-K*J+$*H+j*W-X*z+Y*D},multiply:function(l){var f=this.val,u=f[0],d=f[1],p=f[2],g=f[3],y=f[4],x=f[5],T=f[6],S=f[7],M=f[8],w=f[9],L=f[10],F=f[11],O=f[12],b=f[13],N=f[14],V=f[15],K=l.val,$=K[0],j=K[1],X=K[2],Y=K[3];return f[0]=$*u+j*y+X*M+Y*O,f[1]=$*d+j*x+X*w+Y*b,f[2]=$*p+j*T+X*L+Y*N,f[3]=$*g+j*S+X*F+Y*V,$=K[4],j=K[5],X=K[6],Y=K[7],f[4]=$*u+j*y+X*M+Y*O,f[5]=$*d+j*x+X*w+Y*b,f[6]=$*p+j*T+X*L+Y*N,f[7]=$*g+j*S+X*F+Y*V,$=K[8],j=K[9],X=K[10],Y=K[11],f[8]=$*u+j*y+X*M+Y*O,f[9]=$*d+j*x+X*w+Y*b,f[10]=$*p+j*T+X*L+Y*N,f[11]=$*g+j*S+X*F+Y*V,$=K[12],j=K[13],X=K[14],Y=K[15],f[12]=$*u+j*y+X*M+Y*O,f[13]=$*d+j*x+X*w+Y*b,f[14]=$*p+j*T+X*L+Y*N,f[15]=$*g+j*S+X*F+Y*V,this},multiplyLocal:function(l){var f=this.val,u=l.val;return this.setValues(f[0]*u[0]+f[1]*u[4]+f[2]*u[8]+f[3]*u[12],f[0]*u[1]+f[1]*u[5]+f[2]*u[9]+f[3]*u[13],f[0]*u[2]+f[1]*u[6]+f[2]*u[10]+f[3]*u[14],f[0]*u[3]+f[1]*u[7]+f[2]*u[11]+f[3]*u[15],f[4]*u[0]+f[5]*u[4]+f[6]*u[8]+f[7]*u[12],f[4]*u[1]+f[5]*u[5]+f[6]*u[9]+f[7]*u[13],f[4]*u[2]+f[5]*u[6]+f[6]*u[10]+f[7]*u[14],f[4]*u[3]+f[5]*u[7]+f[6]*u[11]+f[7]*u[15],f[8]*u[0]+f[9]*u[4]+f[10]*u[8]+f[11]*u[12],f[8]*u[1]+f[9]*u[5]+f[10]*u[9]+f[11]*u[13],f[8]*u[2]+f[9]*u[6]+f[10]*u[10]+f[11]*u[14],f[8]*u[3]+f[9]*u[7]+f[10]*u[11]+f[11]*u[15],f[12]*u[0]+f[13]*u[4]+f[14]*u[8]+f[15]*u[12],f[12]*u[1]+f[13]*u[5]+f[14]*u[9]+f[15]*u[13],f[12]*u[2]+f[13]*u[6]+f[14]*u[10]+f[15]*u[14],f[12]*u[3]+f[13]*u[7]+f[14]*u[11]+f[15]*u[15])},premultiply:function(l){return this.multiplyMatrices(l,this)},multiplyMatrices:function(l,f){var u=l.val,d=f.val,p=u[0],g=u[4],y=u[8],x=u[12],T=u[1],S=u[5],M=u[9],w=u[13],L=u[2],F=u[6],O=u[10],b=u[14],N=u[3],V=u[7],K=u[11],$=u[15],j=d[0],X=d[4],Y=d[8],D=d[12],z=d[1],W=d[5],H=d[9],J=d[13],Q=d[2],k=d[6],et=d[10],st=d[14],rt=d[3],ot=d[7],ft=d[11],at=d[15];return this.setValues(p*j+g*z+y*Q+x*rt,T*j+S*z+M*Q+w*rt,L*j+F*z+O*Q+b*rt,N*j+V*z+K*Q+$*rt,p*X+g*W+y*k+x*ot,T*X+S*W+M*k+w*ot,L*X+F*W+O*k+b*ot,N*X+V*W+K*k+$*ot,p*Y+g*H+y*et+x*ft,T*Y+S*H+M*et+w*ft,L*Y+F*H+O*et+b*ft,N*Y+V*H+K*et+$*ft,p*D+g*J+y*st+x*at,T*D+S*J+M*st+w*at,L*D+F*J+O*st+b*at,N*D+V*J+K*st+$*at)},translate:function(l){return this.translateXYZ(l.x,l.y,l.z)},translateXYZ:function(l,f,u){var d=this.val;return d[12]=d[0]*l+d[4]*f+d[8]*u+d[12],d[13]=d[1]*l+d[5]*f+d[9]*u+d[13],d[14]=d[2]*l+d[6]*f+d[10]*u+d[14],d[15]=d[3]*l+d[7]*f+d[11]*u+d[15],this},scale:function(l){return this.scaleXYZ(l.x,l.y,l.z)},scaleXYZ:function(l,f,u){var d=this.val;return d[0]=d[0]*l,d[1]=d[1]*l,d[2]=d[2]*l,d[3]=d[3]*l,d[4]=d[4]*f,d[5]=d[5]*f,d[6]=d[6]*f,d[7]=d[7]*f,d[8]=d[8]*u,d[9]=d[9]*u,d[10]=d[10]*u,d[11]=d[11]*u,this},makeRotationAxis:function(l,f){var u=Math.cos(f),d=Math.sin(f),p=1-u,g=l.x,y=l.y,x=l.z,T=p*g,S=p*y;return this.setValues(T*g+u,T*y-d*x,T*x+d*y,0,T*y+d*x,S*y+u,S*x-d*g,0,T*x-d*y,S*x+d*g,p*x*x+u,0,0,0,0,1)},rotate:function(l,f){var u=this.val,d=f.x,p=f.y,g=f.z,y=Math.sqrt(d*d+p*p+g*g);if(Math.abs(y){/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){return Math.min(t+a,c)};v.exports=m},50040:v=>{/** + * @author Vladislav Forsh + * @copyright 2021 RoboWhale + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){var a=t.length;if(a===0)return 0;t.sort(function(o,r){return o-r});var c=Math.floor(a/2);return a%2===0?(t[c]+t[c-1])/2:t[c]};v.exports=m},37204:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){return Math.max(t-a,c)};v.exports=m},65201:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c,o){c===void 0&&(c=a+1);var r=(t-a)/(c-a);return r>1?o!==void 0?(r=(o-t)/(o-c),r<0&&(r=0)):r=1:r<0&&(r=0),r};v.exports=m},15746:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(94434),o=t(29747),r=t(25836),n=1e-6,e=new Int8Array([1,2,0]),i=new Float32Array([0,0,0]),h=new r(1,0,0),s=new r(0,1,0),l=new r,f=new c,u=new a({initialize:function(p,g,y,x){this.onChangeCallback=o,this.set(p,g,y,x)},x:{get:function(){return this._x},set:function(d){this._x=d,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(d){this._y=d,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(d){this._z=d,this.onChangeCallback(this)}},w:{get:function(){return this._w},set:function(d){this._w=d,this.onChangeCallback(this)}},copy:function(d){return this.set(d)},set:function(d,p,g,y,x){return x===void 0&&(x=!0),typeof d=="object"?(this._x=d.x||0,this._y=d.y||0,this._z=d.z||0,this._w=d.w||0):(this._x=d||0,this._y=p||0,this._z=g||0,this._w=y||0),x&&this.onChangeCallback(this),this},add:function(d){return this._x+=d.x,this._y+=d.y,this._z+=d.z,this._w+=d.w,this.onChangeCallback(this),this},subtract:function(d){return this._x-=d.x,this._y-=d.y,this._z-=d.z,this._w-=d.w,this.onChangeCallback(this),this},scale:function(d){return this._x*=d,this._y*=d,this._z*=d,this._w*=d,this.onChangeCallback(this),this},length:function(){var d=this.x,p=this.y,g=this.z,y=this.w;return Math.sqrt(d*d+p*p+g*g+y*y)},lengthSq:function(){var d=this.x,p=this.y,g=this.z,y=this.w;return d*d+p*p+g*g+y*y},normalize:function(){var d=this.x,p=this.y,g=this.z,y=this.w,x=d*d+p*p+g*g+y*y;return x>0&&(x=1/Math.sqrt(x),this._x=d*x,this._y=p*x,this._z=g*x,this._w=y*x),this.onChangeCallback(this),this},dot:function(d){return this.x*d.x+this.y*d.y+this.z*d.z+this.w*d.w},lerp:function(d,p){p===void 0&&(p=0);var g=this.x,y=this.y,x=this.z,T=this.w;return this.set(g+p*(d.x-g),y+p*(d.y-y),x+p*(d.z-x),T+p*(d.w-T))},rotationTo:function(d,p){var g=d.x*p.x+d.y*p.y+d.z*p.z;return g<-.999999?(l.copy(h).cross(d).length().999999?this.set(0,0,0,1):(l.copy(d).cross(p),this._x=l.x,this._y=l.y,this._z=l.z,this._w=1+g,this.normalize())},setAxes:function(d,p,g){var y=f.val;return y[0]=p.x,y[3]=p.y,y[6]=p.z,y[1]=g.x,y[4]=g.y,y[7]=g.z,y[2]=-d.x,y[5]=-d.y,y[8]=-d.z,this.fromMat3(f).normalize()},identity:function(){return this.set(0,0,0,1)},setAxisAngle:function(d,p){p=p*.5;var g=Math.sin(p);return this.set(g*d.x,g*d.y,g*d.z,Math.cos(p))},multiply:function(d){var p=this.x,g=this.y,y=this.z,x=this.w,T=d.x,S=d.y,M=d.z,w=d.w;return this.set(p*w+x*T+g*M-y*S,g*w+x*S+y*T-p*M,y*w+x*M+p*S-g*T,x*w-p*T-g*S-y*M)},slerp:function(d,p){var g=this.x,y=this.y,x=this.z,T=this.w,S=d.x,M=d.y,w=d.z,L=d.w,F=g*S+y*M+x*w+T*L;F<0&&(F=-F,S=-S,M=-M,w=-w,L=-L);var O=1-p,b=p;if(1-F>n){var N=Math.acos(F),V=Math.sin(N);O=Math.sin((1-p)*N)/V,b=Math.sin(p*N)/V}return this.set(O*g+b*S,O*y+b*M,O*x+b*w,O*T+b*L)},invert:function(){var d=this.x,p=this.y,g=this.z,y=this.w,x=d*d+p*p+g*g+y*y,T=x?1/x:0;return this.set(-d*T,-p*T,-g*T,y*T)},conjugate:function(){return this._x=-this.x,this._y=-this.y,this._z=-this.z,this.onChangeCallback(this),this},rotateX:function(d){d*=.5;var p=this.x,g=this.y,y=this.z,x=this.w,T=Math.sin(d),S=Math.cos(d);return this.set(p*S+x*T,g*S+y*T,y*S-g*T,x*S-p*T)},rotateY:function(d){d*=.5;var p=this.x,g=this.y,y=this.z,x=this.w,T=Math.sin(d),S=Math.cos(d);return this.set(p*S-y*T,g*S+x*T,y*S+p*T,x*S-g*T)},rotateZ:function(d){d*=.5;var p=this.x,g=this.y,y=this.z,x=this.w,T=Math.sin(d),S=Math.cos(d);return this.set(p*S+g*T,g*S-p*T,y*S+x*T,x*S-y*T)},calculateW:function(){var d=this.x,p=this.y,g=this.z;return this.w=-Math.sqrt(1-d*d-p*p-g*g),this},setFromEuler:function(d,p){var g=d.x/2,y=d.y/2,x=d.z/2,T=Math.cos(g),S=Math.cos(y),M=Math.cos(x),w=Math.sin(g),L=Math.sin(y),F=Math.sin(x);switch(d.order){case"XYZ":{this.set(w*S*M+T*L*F,T*L*M-w*S*F,T*S*F+w*L*M,T*S*M-w*L*F,p);break}case"YXZ":{this.set(w*S*M+T*L*F,T*L*M-w*S*F,T*S*F-w*L*M,T*S*M+w*L*F,p);break}case"ZXY":{this.set(w*S*M-T*L*F,T*L*M+w*S*F,T*S*F+w*L*M,T*S*M-w*L*F,p);break}case"ZYX":{this.set(w*S*M-T*L*F,T*L*M+w*S*F,T*S*F-w*L*M,T*S*M+w*L*F,p);break}case"YZX":{this.set(w*S*M+T*L*F,T*L*M+w*S*F,T*S*F-w*L*M,T*S*M-w*L*F,p);break}case"XZY":{this.set(w*S*M-T*L*F,T*L*M-w*S*F,T*S*F+w*L*M,T*S*M+w*L*F,p);break}}return this},setFromRotationMatrix:function(d){var p=d.val,g=p[0],y=p[4],x=p[8],T=p[1],S=p[5],M=p[9],w=p[2],L=p[6],F=p[10],O=g+S+F,b;return O>0?(b=.5/Math.sqrt(O+1),this.set((L-M)*b,(x-w)*b,(T-y)*b,.25/b)):g>S&&g>F?(b=2*Math.sqrt(1+g-S-F),this.set(.25*b,(y+T)/b,(x+w)/b,(L-M)/b)):S>F?(b=2*Math.sqrt(1+S-g-F),this.set((y+T)/b,.25*b,(M+L)/b,(x-w)/b)):(b=2*Math.sqrt(1+F-g-S),this.set((x+w)/b,(M+L)/b,.25*b,(T-y)/b)),this},fromMat3:function(d){var p=d.val,g=p[0]+p[4]+p[8],y;if(g>0)y=Math.sqrt(g+1),this.w=.5*y,y=.5/y,this._x=(p[7]-p[5])*y,this._y=(p[2]-p[6])*y,this._z=(p[3]-p[1])*y;else{var x=0;p[4]>p[0]&&(x=1),p[8]>p[x*3+x]&&(x=2);var T=e[x],S=e[T];y=Math.sqrt(p[x*3+x]-p[T*3+T]-p[S*3+S]+1),i[x]=.5*y,y=.5/y,i[T]=(p[T*3+x]+p[x*3+T])*y,i[S]=(p[S*3+x]+p[x*3+S])*y,this._x=i[0],this._y=i[1],this._z=i[2],this._w=(p[S*3+T]-p[T*3+S])*y}return this.onChangeCallback(this),this}});v.exports=u},43396:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(36383),c=function(o){return o*a.RAD_TO_DEG};v.exports=c},74362:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){a===void 0&&(a=1);var c=Math.random()*2*Math.PI;return t.x=Math.cos(c)*a,t.y=Math.sin(c)*a,t};v.exports=m},60706:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){a===void 0&&(a=1);var c=Math.random()*2*Math.PI,o=Math.random()*2-1,r=Math.sqrt(1-o*o)*a;return t.x=Math.cos(c)*r,t.y=Math.sin(c)*r,t.z=o*a,t};v.exports=m},67421:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){return 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};v.exports=m},36305:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){var c=t.x,o=t.y;return t.x=c*Math.cos(a)-o*Math.sin(a),t.y=c*Math.sin(a)+o*Math.cos(a),t};v.exports=m},11520:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c,o){var r=Math.cos(o),n=Math.sin(o),e=t.x-a,i=t.y-c;return t.x=e*r-i*n+a,t.y=e*n+i*r+c,t};v.exports=m},1163:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c,o,r){var n=o+Math.atan2(t.y-c,t.x-a);return t.x=a+r*Math.cos(n),t.y=c+r*Math.sin(n),t};v.exports=m},70336:v=>{/** + * @author samme + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c,o,r){return t.x=a+r*Math.cos(o),t.y=c+r*Math.sin(o),t};v.exports=m},72678:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(25836),c=t(37867),o=t(15746),r=new c,n=new o,e=new a,i=function(h,s,l){return n.setAxisAngle(s,l),r.fromRotationTranslation(n,e.set(0,0,0)),h.transformMat4(r)};v.exports=i},2284:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return t>0?Math.ceil(t):Math.floor(t)};v.exports=m},41013:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){a===void 0&&(a=0),c===void 0&&(c=10);var o=Math.pow(c,-a);return Math.round(t*o)/o};v.exports=m},16922:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c,o){a===void 0&&(a=1),c===void 0&&(c=1),o===void 0&&(o=1),o*=Math.PI/t;for(var r=[],n=[],e=0;e{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){return t<=a?0:t>=c?1:(t=(t-a)/(c-a),t*t*(3-2*t))};v.exports=m},54261:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){return t=Math.max(0,Math.min(1,(t-a)/(c-a))),t*t*t*(t*(t*6-15)+10)};v.exports=m},44408:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(26099),c=function(o,r,n,e){e===void 0&&(e=new a);var i=0,h=0,s=r*n;return o>0&&o<=s&&(o>r-1?(h=Math.floor(o/r),i=o-h*r):i=o),e.set(i,h)};v.exports=c},85955:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(26099),c=function(o,r,n,e,i,h,s,l){l===void 0&&(l=new a);var f=Math.sin(i),u=Math.cos(i),d=u*h,p=f*h,g=-f*s,y=u*s,x=1/(d*y+g*-p);return l.x=y*x*o+-g*x*r+(e*g-n*y)*x,l.y=d*x*r+-p*x*o+(-e*d+n*p)*x,l};v.exports=c},26099:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(43855),o=new a({initialize:function(n,e){this.x=0,this.y=0,typeof n=="object"?(this.x=n.x||0,this.y=n.y||0):(e===void 0&&(e=n),this.x=n||0,this.y=e||0)},clone:function(){return new o(this.x,this.y)},copy:function(r){return this.x=r.x||0,this.y=r.y||0,this},setFromObject:function(r){return this.x=r.x||0,this.y=r.y||0,this},set:function(r,n){return n===void 0&&(n=r),this.x=r,this.y=n,this},setTo:function(r,n){return this.set(r,n)},setToPolar:function(r,n){return n==null&&(n=1),this.x=Math.cos(r)*n,this.y=Math.sin(r)*n,this},equals:function(r){return this.x===r.x&&this.y===r.y},fuzzyEquals:function(r,n){return c(this.x,r.x,n)&&c(this.y,r.y,n)},angle:function(){var r=Math.atan2(this.y,this.x);return r<0&&(r+=2*Math.PI),r},setAngle:function(r){return this.setToPolar(r,this.length())},add:function(r){return this.x+=r.x,this.y+=r.y,this},subtract:function(r){return this.x-=r.x,this.y-=r.y,this},multiply:function(r){return this.x*=r.x,this.y*=r.y,this},scale:function(r){return isFinite(r)?(this.x*=r,this.y*=r):(this.x=0,this.y=0),this},divide:function(r){return this.x/=r.x,this.y/=r.y,this},negate:function(){return this.x=-this.x,this.y=-this.y,this},distance:function(r){var n=r.x-this.x,e=r.y-this.y;return Math.sqrt(n*n+e*e)},distanceSq:function(r){var n=r.x-this.x,e=r.y-this.y;return n*n+e*e},length:function(){var r=this.x,n=this.y;return Math.sqrt(r*r+n*n)},setLength:function(r){return this.normalize().scale(r)},lengthSq:function(){var r=this.x,n=this.y;return r*r+n*n},normalize:function(){var r=this.x,n=this.y,e=r*r+n*n;return e>0&&(e=1/Math.sqrt(e),this.x=r*e,this.y=n*e),this},normalizeRightHand:function(){var r=this.x;return this.x=this.y*-1,this.y=r,this},normalizeLeftHand:function(){var r=this.x;return this.x=this.y,this.y=r*-1,this},dot:function(r){return this.x*r.x+this.y*r.y},cross:function(r){return this.x*r.y-this.y*r.x},lerp:function(r,n){n===void 0&&(n=0);var e=this.x,i=this.y;return this.x=e+n*(r.x-e),this.y=i+n*(r.y-i),this},transformMat3:function(r){var n=this.x,e=this.y,i=r.val;return this.x=i[0]*n+i[3]*e+i[6],this.y=i[1]*n+i[4]*e+i[7],this},transformMat4:function(r){var n=this.x,e=this.y,i=r.val;return this.x=i[0]*n+i[4]*e+i[12],this.y=i[1]*n+i[5]*e+i[13],this},reset:function(){return this.x=0,this.y=0,this},limit:function(r){var n=this.length();return n&&n>r&&this.scale(r/n),this},reflect:function(r){return r=r.clone().normalize(),this.subtract(r.scale(2*this.dot(r)))},mirror:function(r){return this.reflect(r).negate()},rotate:function(r){var n=Math.cos(r),e=Math.sin(r);return this.set(n*this.x-e*this.y,e*this.x+n*this.y)},project:function(r){var n=this.dot(r)/r.dot(r);return this.copy(r).scale(n)}});o.ZERO=new o,o.RIGHT=new o(1,0),o.LEFT=new o(-1,0),o.UP=new o(0,-1),o.DOWN=new o(0,1),o.ONE=new o(1,1),v.exports=o},25836:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=new a({initialize:function(r,n,e){this.x=0,this.y=0,this.z=0,typeof r=="object"?(this.x=r.x||0,this.y=r.y||0,this.z=r.z||0):(this.x=r||0,this.y=n||0,this.z=e||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},min:function(o){return this.x=Math.min(this.x,o.x),this.y=Math.min(this.y,o.y),this.z=Math.min(this.z,o.z),this},max:function(o){return this.x=Math.max(this.x,o.x),this.y=Math.max(this.y,o.y),this.z=Math.max(this.z,o.z),this},clone:function(){return new c(this.x,this.y,this.z)},addVectors:function(o,r){return this.x=o.x+r.x,this.y=o.y+r.y,this.z=o.z+r.z,this},crossVectors:function(o,r){var n=o.x,e=o.y,i=o.z,h=r.x,s=r.y,l=r.z;return this.x=e*l-i*s,this.y=i*h-n*l,this.z=n*s-e*h,this},equals:function(o){return this.x===o.x&&this.y===o.y&&this.z===o.z},copy:function(o){return this.x=o.x,this.y=o.y,this.z=o.z||0,this},set:function(o,r,n){return typeof o=="object"?(this.x=o.x||0,this.y=o.y||0,this.z=o.z||0):(this.x=o||0,this.y=r||0,this.z=n||0),this},setFromMatrixPosition:function(o){return this.fromArray(o.val,12)},setFromMatrixColumn:function(o,r){return this.fromArray(o.val,r*4)},fromArray:function(o,r){return r===void 0&&(r=0),this.x=o[r],this.y=o[r+1],this.z=o[r+2],this},add:function(o){return this.x+=o.x,this.y+=o.y,this.z+=o.z||0,this},addScalar:function(o){return this.x+=o,this.y+=o,this.z+=o,this},addScale:function(o,r){return this.x+=o.x*r,this.y+=o.y*r,this.z+=o.z*r||0,this},subtract:function(o){return this.x-=o.x,this.y-=o.y,this.z-=o.z||0,this},multiply:function(o){return this.x*=o.x,this.y*=o.y,this.z*=o.z||1,this},scale:function(o){return isFinite(o)?(this.x*=o,this.y*=o,this.z*=o):(this.x=0,this.y=0,this.z=0),this},divide:function(o){return this.x/=o.x,this.y/=o.y,this.z/=o.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(o){var r=o.x-this.x,n=o.y-this.y,e=o.z-this.z||0;return Math.sqrt(r*r+n*n+e*e)},distanceSq:function(o){var r=o.x-this.x,n=o.y-this.y,e=o.z-this.z||0;return r*r+n*n+e*e},length:function(){var o=this.x,r=this.y,n=this.z;return Math.sqrt(o*o+r*r+n*n)},lengthSq:function(){var o=this.x,r=this.y,n=this.z;return o*o+r*r+n*n},normalize:function(){var o=this.x,r=this.y,n=this.z,e=o*o+r*r+n*n;return e>0&&(e=1/Math.sqrt(e),this.x=o*e,this.y=r*e,this.z=n*e),this},dot:function(o){return this.x*o.x+this.y*o.y+this.z*o.z},cross:function(o){var r=this.x,n=this.y,e=this.z,i=o.x,h=o.y,s=o.z;return this.x=n*s-e*h,this.y=e*i-r*s,this.z=r*h-n*i,this},lerp:function(o,r){r===void 0&&(r=0);var n=this.x,e=this.y,i=this.z;return this.x=n+r*(o.x-n),this.y=e+r*(o.y-e),this.z=i+r*(o.z-i),this},applyMatrix3:function(o){var r=this.x,n=this.y,e=this.z,i=o.val;return this.x=i[0]*r+i[3]*n+i[6]*e,this.y=i[1]*r+i[4]*n+i[7]*e,this.z=i[2]*r+i[5]*n+i[8]*e,this},applyMatrix4:function(o){var r=this.x,n=this.y,e=this.z,i=o.val,h=1/(i[3]*r+i[7]*n+i[11]*e+i[15]);return this.x=(i[0]*r+i[4]*n+i[8]*e+i[12])*h,this.y=(i[1]*r+i[5]*n+i[9]*e+i[13])*h,this.z=(i[2]*r+i[6]*n+i[10]*e+i[14])*h,this},transformMat3:function(o){var r=this.x,n=this.y,e=this.z,i=o.val;return this.x=r*i[0]+n*i[3]+e*i[6],this.y=r*i[1]+n*i[4]+e*i[7],this.z=r*i[2]+n*i[5]+e*i[8],this},transformMat4:function(o){var r=this.x,n=this.y,e=this.z,i=o.val;return this.x=i[0]*r+i[4]*n+i[8]*e+i[12],this.y=i[1]*r+i[5]*n+i[9]*e+i[13],this.z=i[2]*r+i[6]*n+i[10]*e+i[14],this},transformCoordinates:function(o){var r=this.x,n=this.y,e=this.z,i=o.val,h=r*i[0]+n*i[4]+e*i[8]+i[12],s=r*i[1]+n*i[5]+e*i[9]+i[13],l=r*i[2]+n*i[6]+e*i[10]+i[14],f=r*i[3]+n*i[7]+e*i[11]+i[15];return this.x=h/f,this.y=s/f,this.z=l/f,this},transformQuat:function(o){var r=this.x,n=this.y,e=this.z,i=o.x,h=o.y,s=o.z,l=o.w,f=l*r+h*e-s*n,u=l*n+s*r-i*e,d=l*e+i*n-h*r,p=-i*r-h*n-s*e;return this.x=f*l+p*-i+u*-s-d*-h,this.y=u*l+p*-h+d*-i-f*-s,this.z=d*l+p*-s+f*-h-u*-i,this},project:function(o){var r=this.x,n=this.y,e=this.z,i=o.val,h=i[0],s=i[1],l=i[2],f=i[3],u=i[4],d=i[5],p=i[6],g=i[7],y=i[8],x=i[9],T=i[10],S=i[11],M=i[12],w=i[13],L=i[14],F=i[15],O=1/(r*f+n*g+e*S+F);return this.x=(r*h+n*u+e*y+M)*O,this.y=(r*s+n*d+e*x+w)*O,this.z=(r*l+n*p+e*T+L)*O,this},projectViewMatrix:function(o,r){return this.applyMatrix4(o).applyMatrix4(r)},unprojectViewMatrix:function(o,r){return this.applyMatrix4(o).applyMatrix4(r)},unproject:function(o,r){var n=o.x,e=o.y,i=o.z,h=o.w,s=this.x-n,l=h-this.y-1-e,f=this.z;return this.x=2*s/i-1,this.y=2*l/h-1,this.z=2*f-1,this.project(r)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});c.ZERO=new c,c.RIGHT=new c(1,0,0),c.LEFT=new c(-1,0,0),c.UP=new c(0,-1,0),c.DOWN=new c(0,1,0),c.FORWARD=new c(0,0,1),c.BACK=new c(0,0,-1),c.ONE=new c(1,1,1),v.exports=c},61369:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=new a({initialize:function(r,n,e,i){this.x=0,this.y=0,this.z=0,this.w=0,typeof r=="object"?(this.x=r.x||0,this.y=r.y||0,this.z=r.z||0,this.w=r.w||0):(this.x=r||0,this.y=n||0,this.z=e||0,this.w=i||0)},clone:function(){return new c(this.x,this.y,this.z,this.w)},copy:function(o){return this.x=o.x,this.y=o.y,this.z=o.z||0,this.w=o.w||0,this},equals:function(o){return this.x===o.x&&this.y===o.y&&this.z===o.z&&this.w===o.w},set:function(o,r,n,e){return typeof o=="object"?(this.x=o.x||0,this.y=o.y||0,this.z=o.z||0,this.w=o.w||0):(this.x=o||0,this.y=r||0,this.z=n||0,this.w=e||0),this},add:function(o){return this.x+=o.x,this.y+=o.y,this.z+=o.z||0,this.w+=o.w||0,this},subtract:function(o){return this.x-=o.x,this.y-=o.y,this.z-=o.z||0,this.w-=o.w||0,this},scale:function(o){return this.x*=o,this.y*=o,this.z*=o,this.w*=o,this},length:function(){var o=this.x,r=this.y,n=this.z,e=this.w;return Math.sqrt(o*o+r*r+n*n+e*e)},lengthSq:function(){var o=this.x,r=this.y,n=this.z,e=this.w;return o*o+r*r+n*n+e*e},normalize:function(){var o=this.x,r=this.y,n=this.z,e=this.w,i=o*o+r*r+n*n+e*e;return i>0&&(i=1/Math.sqrt(i),this.x=o*i,this.y=r*i,this.z=n*i,this.w=e*i),this},dot:function(o){return this.x*o.x+this.y*o.y+this.z*o.z+this.w*o.w},lerp:function(o,r){r===void 0&&(r=0);var n=this.x,e=this.y,i=this.z,h=this.w;return this.x=n+r*(o.x-n),this.y=e+r*(o.y-e),this.z=i+r*(o.z-i),this.w=h+r*(o.w-h),this},multiply:function(o){return this.x*=o.x,this.y*=o.y,this.z*=o.z||1,this.w*=o.w||1,this},divide:function(o){return this.x/=o.x,this.y/=o.y,this.z/=o.z||1,this.w/=o.w||1,this},distance:function(o){var r=o.x-this.x,n=o.y-this.y,e=o.z-this.z||0,i=o.w-this.w||0;return Math.sqrt(r*r+n*n+e*e+i*i)},distanceSq:function(o){var r=o.x-this.x,n=o.y-this.y,e=o.z-this.z||0,i=o.w-this.w||0;return r*r+n*n+e*e+i*i},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(o){var r=this.x,n=this.y,e=this.z,i=this.w,h=o.val;return this.x=h[0]*r+h[4]*n+h[8]*e+h[12]*i,this.y=h[1]*r+h[5]*n+h[9]*e+h[13]*i,this.z=h[2]*r+h[6]*n+h[10]*e+h[14]*i,this.w=h[3]*r+h[7]*n+h[11]*e+h[15]*i,this},transformQuat:function(o){var r=this.x,n=this.y,e=this.z,i=o.x,h=o.y,s=o.z,l=o.w,f=l*r+h*e-s*n,u=l*n+s*r-i*e,d=l*e+i*n-h*r,p=-i*r-h*n-s*e;return this.x=f*l+p*-i+u*-s-d*-h,this.y=u*l+p*-h+d*-i-f*-s,this.z=d*l+p*-s+f*-h-u*-i,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});c.prototype.sub=c.prototype.subtract,c.prototype.mul=c.prototype.multiply,c.prototype.div=c.prototype.divide,c.prototype.dist=c.prototype.distance,c.prototype.distSq=c.prototype.distanceSq,c.prototype.len=c.prototype.length,c.prototype.lenSq=c.prototype.lengthSq,v.exports=c},60417:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){return Math.abs(t-a)<=c};v.exports=m},15994:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){var o=c-a;return a+((t-a)%o+o)%o};v.exports=m},31040:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c,o){return Math.atan2(o-a,c-t)};v.exports=m},55495:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){return Math.atan2(a.y-t.y,a.x-t.x)};v.exports=m},128:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){return Math.atan2(a.x-t.x,a.y-t.y)};v.exports=m},41273:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c,o){return Math.atan2(c-t,o-a)};v.exports=m},1432:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(36383),c=function(o){return o>Math.PI&&(o-=a.PI2),Math.abs(((o+a.TAU)%a.PI2-a.PI2)%a.PI2)};v.exports=c},12407:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return t=t%(2*Math.PI),t>=0?t:t+2*Math.PI};v.exports=m},53993:(v,m,t)=>{/** + * @author Richard Davey + * @author @samme + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(99472),c=function(){return a(-Math.PI,Math.PI)};v.exports=c},86564:(v,m,t)=>{/** + * @author Richard Davey + * @author @samme + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(99472),c=function(){return a(-180,180)};v.exports=c},90154:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(12407),c=function(o){return a(o+Math.PI)};v.exports=c},48736:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(36383),c=function(o,r,n){return n===void 0&&(n=.05),o===r||(Math.abs(r-o)<=n||Math.abs(r-o)>=a.PI2-n?o=r:(Math.abs(r-o)>Math.PI&&(ro?o+=n:r{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){var c=a-t;if(c===0)return 0;var o=Math.floor((c- -180)/360);return c-o*360};v.exports=m},86554:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(15994),c=function(o){return a(o,-Math.PI,Math.PI)};v.exports=c},30954:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(15994),c=function(o){return a(o,-180,180)};v.exports=c},25588:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.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:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m={PI2:Math.PI*2,TAU:Math.PI*.5,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:null,MIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER||-9007199254740991,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991};v.exports=m},20339:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c,o){var r=t-c,n=a-o;return Math.sqrt(r*r+n*n)};v.exports=m},52816:v=>{/** + * @author samme + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){var c=t.x-a.x,o=t.y-a.y;return Math.sqrt(c*c+o*o)};v.exports=m},64559:v=>{/** + * @author samme + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){var c=t.x-a.x,o=t.y-a.y;return c*c+o*o};v.exports=m},82340:v=>{/** + * @author samme + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c,o){return Math.max(Math.abs(t-c),Math.abs(a-o))};v.exports=m},14390:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c,o,r){return r===void 0&&(r=2),Math.sqrt(Math.pow(c-t,r)+Math.pow(o-a,r))};v.exports=m},2243:v=>{/** + * @author samme + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c,o){return Math.abs(t-c)+Math.abs(a-o)};v.exports=m},89774:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c,o){var r=t-c,n=a-o;return r*r+n*n};v.exports=m},50994:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={Between:t(20339),BetweenPoints:t(52816),BetweenPointsSquared:t(64559),Chebyshev:t(82340),Power:t(14390),Snake:t(2243),Squared:t(89774)}},62640:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(54178),c=t(41521),o=t(79980),r=t(85433),n=t(99140),e=t(48857),i=t(81596),h=t(59133),s=t(98516),l=t(35248),f=t(82500),u=t(49752);v.exports={Power0:i,Power1:h.Out,Power2:r.Out,Power3:s.Out,Power4:l.Out,Linear:i,Quad:h.Out,Cubic:r.Out,Quart:s.Out,Quint:l.Out,Sine:f.Out,Expo:e.Out,Circ:o.Out,Elastic:n.Out,Back:a.Out,Bounce:c.Out,Stepped:u,"Quad.easeIn":h.In,"Cubic.easeIn":r.In,"Quart.easeIn":s.In,"Quint.easeIn":l.In,"Sine.easeIn":f.In,"Expo.easeIn":e.In,"Circ.easeIn":o.In,"Elastic.easeIn":n.In,"Back.easeIn":a.In,"Bounce.easeIn":c.In,"Quad.easeOut":h.Out,"Cubic.easeOut":r.Out,"Quart.easeOut":s.Out,"Quint.easeOut":l.Out,"Sine.easeOut":f.Out,"Expo.easeOut":e.Out,"Circ.easeOut":o.Out,"Elastic.easeOut":n.Out,"Back.easeOut":a.Out,"Bounce.easeOut":c.Out,"Quad.easeInOut":h.InOut,"Cubic.easeInOut":r.InOut,"Quart.easeInOut":s.InOut,"Quint.easeInOut":l.InOut,"Sine.easeInOut":f.InOut,"Expo.easeInOut":e.InOut,"Circ.easeInOut":o.InOut,"Elastic.easeInOut":n.InOut,"Back.easeInOut":a.InOut,"Bounce.easeInOut":c.InOut}},1639:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){return a===void 0&&(a=1.70158),t*t*((a+1)*t-a)};v.exports=m},50099:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){a===void 0&&(a=1.70158);var c=a*1.525;return(t*=2)<1?.5*(t*t*((c+1)*t-c)):.5*((t-=2)*t*((c+1)*t+c)+2)};v.exports=m},41286:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){return a===void 0&&(a=1.70158),--t*t*((a+1)*t+a)+1};v.exports=m},54178:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={In:t(1639),Out:t(41286),InOut:t(50099)}},59590:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return t=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)};v.exports=m},41788:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){var a=!1;return t<.5?(t=1-t*2,a=!0):t=t*2-1,t<.36363636363636365?t=7.5625*t*t:t<.7272727272727273?t=7.5625*(t-=.5454545454545454)*t+.75:t<.9090909090909091?t=7.5625*(t-=.8181818181818182)*t+.9375:t=7.5625*(t-=.9545454545454546)*t+.984375,a?(1-t)*.5:t*.5+.5};v.exports=m},69905:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return t<.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};v.exports=m},41521:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={In:t(59590),Out:t(69905),InOut:t(41788)}},91861:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return 1-Math.sqrt(1-t*t)};v.exports=m},4177:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)};v.exports=m},57512:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return Math.sqrt(1- --t*t)};v.exports=m},79980:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={In:t(91861),Out:t(57512),InOut:t(4177)}},51150:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return t*t*t};v.exports=m},82820:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)};v.exports=m},35033:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return--t*t*t+1};v.exports=m},85433:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={In:t(51150),Out:t(35033),InOut:t(82820)}},69965:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){if(a===void 0&&(a=.1),c===void 0&&(c=.1),t===0)return 0;if(t===1)return 1;var o=c/4;return a<1?a=1:o=c*Math.asin(1/a)/(2*Math.PI),-(a*Math.pow(2,10*(t-=1))*Math.sin((t-o)*(2*Math.PI)/c))};v.exports=m},50665:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){if(a===void 0&&(a=.1),c===void 0&&(c=.1),t===0)return 0;if(t===1)return 1;var o=c/4;return a<1?a=1:o=c*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)/c)):a*Math.pow(2,-10*(t-=1))*Math.sin((t-o)*(2*Math.PI)/c)*.5+1};v.exports=m},7744:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){if(a===void 0&&(a=.1),c===void 0&&(c=.1),t===0)return 0;if(t===1)return 1;var o=c/4;return a<1?a=1:o=c*Math.asin(1/a)/(2*Math.PI),a*Math.pow(2,-10*t)*Math.sin((t-o)*(2*Math.PI)/c)+1};v.exports=m},99140:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={In:t(69965),Out:t(7744),InOut:t(50665)}},24590:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return Math.pow(2,10*(t-1))-.001};v.exports=m},87844:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))};v.exports=m},89433:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return 1-Math.pow(2,-10*t)};v.exports=m},48857:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={In:t(24590),Out:t(89433),InOut:t(87844)}},48820:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.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:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return t};v.exports=m},81596:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports=t(7147)},34826:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return t*t};v.exports=m},20544:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)};v.exports=m},92029:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return t*(2-t)};v.exports=m},59133:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={In:t(34826),Out:t(92029),InOut:t(20544)}},64413:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return t*t*t*t};v.exports=m},78137:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)};v.exports=m},45840:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return 1- --t*t*t*t};v.exports=m},98516:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={In:t(64413),Out:t(45840),InOut:t(78137)}},87745:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return t*t*t*t*t};v.exports=m},16509:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)};v.exports=m},17868:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return--t*t*t*t*t+1};v.exports=m},35248:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={In:t(87745),Out:t(17868),InOut:t(16509)}},80461:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return t===0?0:t===1?1:1-Math.cos(t*Math.PI/2)};v.exports=m},34025:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return t===0?0:t===1?1:.5*(1-Math.cos(Math.PI*t))};v.exports=m},52768:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return t===0?0:t===1?1:Math.sin(t*Math.PI/2)};v.exports=m},82500:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={In:t(80461),Out:t(52768),InOut:t(34025)}},72251:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){return a===void 0&&(a=1),t<=0?0:t>=1?1:((a*t|0)+1)*(1/a)};v.exports=m},49752:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports=t(72251)},75698:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){return a===void 0&&(a=1e-4),Math.ceil(t-a)};v.exports=m},43855:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){return c===void 0&&(c=1e-4),Math.abs(t-a){/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){return a===void 0&&(a=1e-4),Math.floor(t+a)};v.exports=m},5470:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){return c===void 0&&(c=1e-4),t>a-c};v.exports=m},94977:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){return c===void 0&&(c=1e-4),t{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={Ceil:t(75698),Equal:t(43855),Floor:t(25777),GreaterThan:t(5470),LessThan:t(94977)}},75508:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(36383),c=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=c(!1,o,a),v.exports=o},89318:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(85710),c=function(o,r){for(var n=0,e=o.length-1,i=0;i<=e;i++)n+=Math.pow(1-r,e-i)*Math.pow(r,i)*o[i]*a(e,i);return n};v.exports=c},77259:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(87842),c=function(o,r){var n=o.length-1,e=n*r,i=Math.floor(e);return o[0]===o[n]?(r<0&&(i=Math.floor(e=n*(1+r))),a(e-i,o[(i-1+n)%n],o[i],o[(i+1)%n],o[(i+2)%n])):r<0?o[0]-(a(-e,o[0],o[0],o[1],o[1])-o[0]):r>1?o[n]-(a(e-n,o[n],o[n],o[n-1],o[n-1])-o[n]):a(e-i,o[i?i-1:0],o[i],o[n{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */function m(r,n){var e=1-r;return e*e*e*n}function t(r,n){var e=1-r;return 3*e*e*r*n}function a(r,n){return 3*(1-r)*r*r*n}function c(r,n){return r*r*r*n}var o=function(r,n,e,i,h){return m(r,n)+t(r,e)+a(r,i)+c(r,h)};v.exports=o},28392:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(28915),c=function(o,r){var n=o.length-1,e=n*r,i=Math.floor(e);return r<0?a(o[0],o[1],e):r>1?a(o[n],o[n-1],n-e):a(o[i],o[i+1>n?n:i+1],e-i)};v.exports=c},32112:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */function m(o,r){var n=1-o;return n*n*r}function t(o,r){return 2*(1-o)*o*r}function a(o,r){return o*o*r}var c=function(o,r,n,e){return m(o,r)+t(o,n)+a(o,e)};v.exports=c},47235:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(7602),c=function(o,r,n){return r+(n-r)*a(o,0,1)};v.exports=c},50178:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(54261),c=function(o,r,n){return r+(n-r)*a(o,0,1)};v.exports=c},38289:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={Bezier:t(89318),CatmullRom:t(77259),CubicBezier:t(36316),Linear:t(28392),QuadraticBezier:t(32112),SmoothStep:t(47235),SmootherStep:t(50178)}},98439:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){var a=Math.log(t)/.6931471805599453;return 1<{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){return t>0&&(t&t-1)===0&&a>0&&(a&a-1)===0};v.exports=m},81230:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return t>0&&(t&t-1)===0};v.exports=m},49001:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={GetNext:t(98439),IsSize:t(50030),IsValue:t(81230)}},28453:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=new a({initialize:function(r){r===void 0&&(r=[(Date.now()*Math.random()).toString()]),this.c=1,this.s0=0,this.s1=0,this.s2=0,this.n=0,this.signs=[-1,1],r&&this.init(r)},rnd:function(){var o=2091639*this.s0+this.c*23283064365386963e-26;return this.c=o|0,this.s0=this.s1,this.s1=this.s2,this.s2=o-this.c,this.s2},hash:function(o){var r,n=this.n;o=o.toString();for(var e=0;e>>0,r-=n,r*=n,n=r>>>0,r-=n,n+=r*4294967296;return this.n=n,(n>>>0)*23283064365386963e-26},init:function(o){typeof o=="string"?this.state(o):this.sow(o)},sow:function(o){if(this.n=4022871197,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,!!o)for(var r=0;r0;n--){var e=Math.floor(this.frac()*(n+1)),i=o[e];o[e]=o[n],o[n]=i}return o}});v.exports=c},63448:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c,o){return c===void 0&&(c=0),a===0?t:(t-=c,t=a*Math.ceil(t/a),o?(c+t)/a:c+t)};v.exports=m},56583:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c,o){return c===void 0&&(c=0),a===0?t:(t-=c,t=a*Math.floor(t/a),o?(c+t)/a:c+t)};v.exports=m},77720:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c,o){return c===void 0&&(c=0),a===0?t:(t-=c,t=a*Math.round(t/a),o?(c+t)/a:c+t)};v.exports=m},73697:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={Ceil:t(63448),Floor:t(56583),To:t(77720)}},85454:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */t(63595);var a=t(8054),c=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=c(!1,o,a),v.exports=o,t.g.Phaser=o},71289:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(92209),o=t(88571),r=new a({Extends:o,Mixins:[c.Acceleration,c.Angular,c.Bounce,c.Collision,c.Debug,c.Drag,c.Enable,c.Friction,c.Gravity,c.Immovable,c.Mass,c.Pushable,c.Size,c.Velocity],initialize:function(e,i,h,s,l){o.call(this,e,i,h,s,l),this.body=null}});v.exports=r},86689:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(39506),o=t(20339),r=t(89774),n=t(66022),e=t(95540),i=t(46975),h=t(72441),s=t(47956),l=t(37277),f=t(44594),u=t(26099),d=t(82248),p=new a({initialize:function(y){this.scene=y,this.systems=y.sys,this.config=this.getConfig(),this.world,this.add,this._category=1,y.sys.events.once(f.BOOT,this.boot,this),y.sys.events.on(f.START,this.start,this)},boot:function(){this.world=new d(this.scene,this.config),this.add=new n(this.world),this.systems.events.once(f.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new d(this.scene,this.config),this.add=new n(this.world));var g=this.systems.events;e(this.config,"customUpdate",!1)||g.on(f.UPDATE,this.world.update,this.world),g.on(f.POST_UPDATE,this.world.postUpdate,this.world),g.once(f.SHUTDOWN,this.shutdown,this)},enableUpdate:function(){this.systems.events.on(f.UPDATE,this.world.update,this.world)},disableUpdate:function(){this.systems.events.off(f.UPDATE,this.world.update,this.world)},getConfig:function(){var g=this.systems.game.config.physics,y=this.systems.settings.physics,x=i(e(y,"arcade",{}),e(g,"arcade",{}));return x},nextCategory:function(){return this._category=this._category<<1,this._category},overlap:function(g,y,x,T,S){return x===void 0&&(x=null),T===void 0&&(T=null),S===void 0&&(S=x),this.world.collideObjects(g,y,x,T,S,!0)},collide:function(g,y,x,T,S){return x===void 0&&(x=null),T===void 0&&(T=null),S===void 0&&(S=x),this.world.collideObjects(g,y,x,T,S,!1)},collideTiles:function(g,y,x,T,S){return this.world.collideTiles(g,y,x,T,S)},overlapTiles:function(g,y,x,T,S){return this.world.overlapTiles(g,y,x,T,S)},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},accelerateTo:function(g,y,x,T,S,M){T===void 0&&(T=60);var w=Math.atan2(x-g.y,y-g.x);return g.body.acceleration.setToPolar(w,T),S!==void 0&&M!==void 0&&g.body.maxVelocity.set(S,M),w},accelerateToObject:function(g,y,x,T,S){return this.accelerateTo(g,y.x,y.y,x,T,S)},closest:function(g,y){y||(y=this.world.bodies.entries);for(var x=Number.MAX_VALUE,T=null,S=g.x,M=g.y,w=y.length,L=0;Lx&&(T=F,x=b)}}return T},moveTo:function(g,y,x,T,S){T===void 0&&(T=60),S===void 0&&(S=0);var M=Math.atan2(x-g.y,y-g.x);return S>0&&(T=o(g.x,g.y,y,x)/(S/1e3)),g.body.velocity.setToPolar(M,T),M},moveToObject:function(g,y,x,T){return this.moveTo(g,y.x,y.y,x,T)},velocityFromAngle:function(g,y,x){return y===void 0&&(y=60),x===void 0&&(x=new u),x.setToPolar(c(g),y)},velocityFromRotation:function(g,y,x){return y===void 0&&(y=60),x===void 0&&(x=new u),x.setToPolar(g,y)},overlapRect:function(g,y,x,T,S,M){return s(this.world,g,y,x,T,S,M)},overlapCirc:function(g,y,x,T,S){return h(this.world,g,y,x,T,S)},shutdown:function(){if(this.world){var g=this.systems.events;g.off(f.UPDATE,this.world.update,this.world),g.off(f.POST_UPDATE,this.world.postUpdate,this.world),g.off(f.SHUTDOWN,this.shutdown,this),this.add.destroy(),this.world.destroy(),this.add=null,this.world=null,this._category=1}},destroy:function(){this.shutdown(),this.scene.sys.events.off(f.START,this.start,this),this.scene=null,this.systems=null}});l.register("ArcadePhysics",p,"arcadePhysics"),v.exports=p},13759:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(92209),o=t(68287),r=new a({Extends:o,Mixins:[c.Acceleration,c.Angular,c.Bounce,c.Collision,c.Debug,c.Drag,c.Enable,c.Friction,c.Gravity,c.Immovable,c.Mass,c.Pushable,c.Size,c.Velocity],initialize:function(e,i,h,s,l){o.call(this,e,i,h,s,l),this.body=null}});v.exports=r},37742:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(78389),o=t(37747),r=t(63012),n=t(43396),e=t(87841),i=t(37303),h=t(95829),s=t(26099),l=new a({Mixins:[c],initialize:function(u,d){var p=64,g=64,y={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0},x=d!==void 0;x&&d.displayWidth&&(p=d.displayWidth,g=d.displayHeight),x||(d=y),this.world=u,this.gameObject=x?d:void 0,this.isBody=!0,this.transform={x:d.x,y:d.y,rotation:d.angle,scaleX:d.scaleX,scaleY:d.scaleY,displayOriginX:d.displayOriginX,displayOriginY:d.displayOriginY},this.debugShowBody=u.defaults.debugShowBody,this.debugShowVelocity=u.defaults.debugShowVelocity,this.debugBodyColor=u.defaults.bodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new s,this.position=new s(d.x-d.scaleX*d.displayOriginX,d.y-d.scaleY*d.displayOriginY),this.prev=this.position.clone(),this.prevFrame=this.position.clone(),this.allowRotation=!0,this.rotation=d.angle,this.preRotation=d.angle,this.width=p,this.height=g,this.sourceWidth=p,this.sourceHeight=g,d.frame&&(this.sourceWidth=d.frame.realWidth,this.sourceHeight=d.frame.realHeight),this.halfWidth=Math.abs(p/2),this.halfHeight=Math.abs(g/2),this.center=new s(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=new s,this.newVelocity=new s,this.deltaMax=new s,this.acceleration=new s,this.allowDrag=!0,this.drag=new s,this.allowGravity=!0,this.gravity=new s,this.bounce=new s,this.worldBounce=null,this.customBoundsRectangle=u.bounds,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.maxVelocity=new s(1e4,1e4),this.maxSpeed=-1,this.friction=new s(1,0),this.useDamping=!1,this.angularVelocity=0,this.angularAcceleration=0,this.angularDrag=0,this.maxAngular=1e3,this.mass=1,this.angle=0,this.speed=0,this.facing=o.FACING_NONE,this.immovable=!1,this.pushable=!0,this.slideFactor=new s(1,1),this.moves=!0,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision=h(!1),this.touching=h(!0),this.wasTouching=h(!0),this.blocked=h(!0),this.syncBounds=!1,this.physicsType=o.DYNAMIC_BODY,this.collisionCategory=1,this.collisionMask=1,this._sx=d.scaleX,this._sy=d.scaleY,this._dx=0,this._dy=0,this._tx=0,this._ty=0,this._bounds=new e,this.directControl=!1,this.autoFrame=this.position.clone()},updateBounds:function(){var f=this.gameObject,u=this.transform;if(f.parentContainer){var d=f.getWorldTransformMatrix(this.world._tempMatrix,this.world._tempMatrix2);u.x=d.tx,u.y=d.ty,u.rotation=n(d.rotation),u.scaleX=d.scaleX,u.scaleY=d.scaleY,u.displayOriginX=f.displayOriginX,u.displayOriginY=f.displayOriginY}else u.x=f.x,u.y=f.y,u.rotation=f.angle,u.scaleX=f.scaleX,u.scaleY=f.scaleY,u.displayOriginX=f.displayOriginX,u.displayOriginY=f.displayOriginY;var p=!1;if(this.syncBounds){var g=f.getBounds(this._bounds);this.width=g.width,this.height=g.height,p=!0}else{var y=Math.abs(u.scaleX),x=Math.abs(u.scaleY);(this._sx!==y||this._sy!==x)&&(this.width=this.sourceWidth*y,this.height=this.sourceHeight*x,this._sx=y,this._sy=x,p=!0)}p&&(this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter())},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},updateFromGameObject:function(){this.updateBounds();var f=this.transform;this.position.x=f.x+f.scaleX*(this.offset.x-f.displayOriginX),this.position.y=f.y+f.scaleY*(this.offset.y-f.displayOriginY),this.updateCenter()},resetFlags:function(f){f===void 0&&(f=!1);var u=this.wasTouching,d=this.touching,p=this.blocked;f?h(!0,u):(u.none=d.none,u.up=d.up,u.down=d.down,u.left=d.left,u.right=d.right),h(!0,d),h(!0,p),this.overlapR=0,this.overlapX=0,this.overlapY=0,this.embedded=!1},preUpdate:function(f,u){if(f&&this.resetFlags(),this.gameObject&&this.updateFromGameObject(),this.rotation=this.transform.rotation,this.preRotation=this.rotation,this.moves){var d=this.position;this.prev.x=d.x,this.prev.y=d.y,this.prevFrame.x=d.x,this.prevFrame.y=d.y}f&&this.update(u)},update:function(f){var u=this.prev,d=this.position,p=this.velocity;if(u.set(d.x,d.y),!this.moves){this._dx=d.x-u.x,this._dy=d.y-u.y;return}if(this.directControl){var g=this.autoFrame;p.set((d.x-g.x)/f,(d.y-g.y)/f),this.world.updateMotion(this,f),this._dx=d.x-g.x,this._dy=d.y-g.y}else this.world.updateMotion(this,f),this.newVelocity.set(p.x*f,p.y*f),d.add(this.newVelocity),this._dx=d.x-u.x,this._dy=d.y-u.y;var y=p.x,x=p.y;if(this.updateCenter(),this.angle=Math.atan2(x,y),this.speed=Math.sqrt(y*y+x*x),this.collideWorldBounds&&this.checkWorldBounds()&&this.onWorldBounds){var T=this.blocked;this.world.emit(r.WORLD_BOUNDS,this,T.up,T.down,T.left,T.right)}},postUpdate:function(){var f=this.position,u=f.x-this.prevFrame.x,d=f.y-this.prevFrame.y,p=this.gameObject;if(this.moves){var g=this.deltaMax.x,y=this.deltaMax.y;g!==0&&u!==0&&(u<0&&u<-g?u=-g:u>0&&u>g&&(u=g)),y!==0&&d!==0&&(d<0&&d<-y?d=-y:d>0&&d>y&&(d=y)),p&&(p.x+=u,p.y+=d)}u<0?this.facing=o.FACING_LEFT:u>0&&(this.facing=o.FACING_RIGHT),d<0?this.facing=o.FACING_UP:d>0&&(this.facing=o.FACING_DOWN),this.allowRotation&&p&&(p.angle+=this.deltaZ()),this._tx=u,this._ty=d,this.autoFrame.set(f.x,f.y)},setBoundsRectangle:function(f){return this.customBoundsRectangle=f||this.world.bounds,this},checkWorldBounds:function(){var f=this.position,u=this.velocity,d=this.blocked,p=this.customBoundsRectangle,g=this.world.checkCollision,y=this.worldBounce?-this.worldBounce.x:-this.bounce.x,x=this.worldBounce?-this.worldBounce.y:-this.bounce.y,T=!1;return f.xp.right&&g.right&&(f.x=p.right-this.width,u.x*=y,d.right=!0,T=!0),f.yp.bottom&&g.down&&(f.y=p.bottom-this.height,u.y*=x,d.down=!0,T=!0),T&&(this.blocked.none=!1,this.updateCenter()),T},setOffset:function(f,u){return u===void 0&&(u=f),this.offset.set(f,u),this},setGameObject:function(f,u){return u===void 0&&(u=!0),this.world.remove(this),this.gameObject&&this.gameObject.body&&(this.gameObject.body=null),this.gameObject=f,f.body&&(f.body=this),this.setSize(),this.world.add(this),this.enable=u,this},setSize:function(f,u,d){d===void 0&&(d=!0);var p=this.gameObject;if(p&&(!f&&p.frame&&(f=p.frame.realWidth),!u&&p.frame&&(u=p.frame.realHeight)),this.sourceWidth=f,this.sourceHeight=u,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter(),d&&p&&p.getCenter){var g=(p.width-f)/2,y=(p.height-u)/2;this.offset.set(g,y)}return this.isCircle=!1,this.radius=0,this},setCircle:function(f,u,d){return u===void 0&&(u=this.offset.x),d===void 0&&(d=this.offset.y),f>0?(this.isCircle=!0,this.radius=f,this.sourceWidth=f*2,this.sourceHeight=f*2,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(u,d),this.updateCenter()):this.isCircle=!1,this},reset:function(f,u){this.stop();var d=this.gameObject;d&&(d.setPosition(f,u),this.rotation=d.angle,this.preRotation=d.angle);var p=this.position;d&&d.getTopLeft?d.getTopLeft(p):p.set(f,u),this.prev.copy(p),this.prevFrame.copy(p),this.autoFrame.copy(p),d&&this.updateBounds(),this.updateCenter(),this.collideWorldBounds&&this.checkWorldBounds(),this.resetFlags(!0)},stop:function(){return this.velocity.set(0),this.acceleration.set(0),this.speed=0,this.angularVelocity=0,this.angularAcceleration=0,this},getBounds:function(f){return f.x=this.x,f.y=this.y,f.right=this.right,f.bottom=this.bottom,f},hitTest:function(f,u){if(!this.isCircle)return i(this,f,u);if(this.radius>0&&f>=this.left&&f<=this.right&&u>=this.top&&u<=this.bottom){var d=(this.center.x-f)*(this.center.x-f),p=(this.center.y-u)*(this.center.y-u);return d+p<=this.radius*this.radius}return!1},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return this._dx>0?this._dx:-this._dx},deltaAbsY:function(){return this._dy>0?this._dy:-this._dy},deltaX:function(){return this._dx},deltaY:function(){return this._dy},deltaXFinal:function(){return this._tx},deltaYFinal:function(){return this._ty},deltaZ:function(){return this.rotation-this.preRotation},destroy:function(){this.enable=!1,this.world&&this.world.pendingDestroy.set(this)},drawDebug:function(f){var u=this.position,d=u.x+this.halfWidth,p=u.y+this.halfHeight;this.debugShowBody&&(f.lineStyle(f.defaultStrokeWidth,this.debugBodyColor),this.isCircle?f.strokeCircle(d,p,this.width/2):(this.checkCollision.up&&f.lineBetween(u.x,u.y,u.x+this.width,u.y),this.checkCollision.right&&f.lineBetween(u.x+this.width,u.y,u.x+this.width,u.y+this.height),this.checkCollision.down&&f.lineBetween(u.x,u.y+this.height,u.x+this.width,u.y+this.height),this.checkCollision.left&&f.lineBetween(u.x,u.y,u.x,u.y+this.height))),this.debugShowVelocity&&(f.lineStyle(f.defaultStrokeWidth,this.world.defaults.velocityDebugColor,1),f.lineBetween(d,p,d+this.velocity.x/2,p+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setDirectControl:function(f){return f===void 0&&(f=!0),this.directControl=f,this},setCollideWorldBounds:function(f,u,d,p){f===void 0&&(f=!0),this.collideWorldBounds=f;var g=u!==void 0,y=d!==void 0;return(g||y)&&(this.worldBounce||(this.worldBounce=new s),g&&(this.worldBounce.x=u),y&&(this.worldBounce.y=d)),p!==void 0&&(this.onWorldBounds=p),this},setVelocity:function(f,u){return this.velocity.set(f,u),f=this.velocity.x,u=this.velocity.y,this.speed=Math.sqrt(f*f+u*u),this},setVelocityX:function(f){return this.setVelocity(f,this.velocity.y)},setVelocityY:function(f){return this.setVelocity(this.velocity.x,f)},setMaxVelocity:function(f,u){return this.maxVelocity.set(f,u),this},setMaxVelocityX:function(f){return this.maxVelocity.x=f,this},setMaxVelocityY:function(f){return this.maxVelocity.y=f,this},setMaxSpeed:function(f){return this.maxSpeed=f,this},setSlideFactor:function(f,u){return this.slideFactor.set(f,u),this},setBounce:function(f,u){return this.bounce.set(f,u),this},setBounceX:function(f){return this.bounce.x=f,this},setBounceY:function(f){return this.bounce.y=f,this},setAcceleration:function(f,u){return this.acceleration.set(f,u),this},setAccelerationX:function(f){return this.acceleration.x=f,this},setAccelerationY:function(f){return this.acceleration.y=f,this},setAllowDrag:function(f){return f===void 0&&(f=!0),this.allowDrag=f,this},setAllowGravity:function(f){return f===void 0&&(f=!0),this.allowGravity=f,this},setAllowRotation:function(f){return f===void 0&&(f=!0),this.allowRotation=f,this},setDrag:function(f,u){return this.drag.set(f,u),this},setDamping:function(f){return this.useDamping=f,this},setDragX:function(f){return this.drag.x=f,this},setDragY:function(f){return this.drag.y=f,this},setGravity:function(f,u){return this.gravity.set(f,u),this},setGravityX:function(f){return this.gravity.x=f,this},setGravityY:function(f){return this.gravity.y=f,this},setFriction:function(f,u){return this.friction.set(f,u),this},setFrictionX:function(f){return this.friction.x=f,this},setFrictionY:function(f){return this.friction.y=f,this},setAngularVelocity:function(f){return this.angularVelocity=f,this},setAngularAcceleration:function(f){return this.angularAcceleration=f,this},setAngularDrag:function(f){return this.angularDrag=f,this},setMass:function(f){return this.mass=f,this},setImmovable:function(f){return f===void 0&&(f=!0),this.immovable=f,this},setEnable:function(f){return f===void 0&&(f=!0),this.enable=f,this},processX:function(f,u,d,p){this.x+=f,this.updateCenter(),u!==null&&(this.velocity.x=u*this.slideFactor.x);var g=this.blocked;d&&(g.left=!0,g.none=!1),p&&(g.right=!0,g.none=!1)},processY:function(f,u,d,p){this.y+=f,this.updateCenter(),u!==null&&(this.velocity.y=u*this.slideFactor.y);var g=this.blocked;d&&(g.up=!0,g.none=!1),p&&(g.down=!0,g.none=!1)},x:{get:function(){return this.position.x},set:function(f){this.position.x=f}},y:{get:function(){return this.position.y},set:function(f){this.position.y=f}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});v.exports=l},79342:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=new a({initialize:function(r,n,e,i,h,s,l){this.world=r,this.name="",this.active=!0,this.overlapOnly=n,this.object1=e,this.object2=i,this.collideCallback=h,this.processCallback=s,this.callbackContext=l},setName:function(o){return this.name=o,this},update:function(){this.world.collideObjects(this.object1,this.object2,this.collideCallback,this.processCallback,this.callbackContext,this.overlapOnly)},destroy:function(){this.world.removeCollider(this),this.active=!1,this.world=null,this.object1=null,this.object2=null,this.collideCallback=null,this.processCallback=null,this.callbackContext=null}});v.exports=c},66022:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(71289),c=t(13759),o=t(37742),r=t(83419),n=t(37747),e=t(60758),i=t(72624),h=t(71464),s=new r({initialize:function(f){this.world=f,this.scene=f.scene,this.sys=f.scene.sys},collider:function(l,f,u,d,p){return this.world.addCollider(l,f,u,d,p)},overlap:function(l,f,u,d,p){return this.world.addOverlap(l,f,u,d,p)},existing:function(l,f){var u=f?n.STATIC_BODY:n.DYNAMIC_BODY;return this.world.enableBody(l,u),l},staticImage:function(l,f,u,d){var p=new a(this.scene,l,f,u,d);return this.sys.displayList.add(p),this.world.enableBody(p,n.STATIC_BODY),p},image:function(l,f,u,d){var p=new a(this.scene,l,f,u,d);return this.sys.displayList.add(p),this.world.enableBody(p,n.DYNAMIC_BODY),p},staticSprite:function(l,f,u,d){var p=new c(this.scene,l,f,u,d);return this.sys.displayList.add(p),this.sys.updateList.add(p),this.world.enableBody(p,n.STATIC_BODY),p},sprite:function(l,f,u,d){var p=new c(this.scene,l,f,u,d);return this.sys.displayList.add(p),this.sys.updateList.add(p),this.world.enableBody(p,n.DYNAMIC_BODY),p},staticGroup:function(l,f){return this.sys.updateList.add(new h(this.world,this.world.scene,l,f))},group:function(l,f){return this.sys.updateList.add(new e(this.world,this.world.scene,l,f))},body:function(l,f,u,d){var p=new o(this.world);return p.position.set(l,f),u&&d&&p.setSize(u,d),this.world.add(p,n.DYNAMIC_BODY),p},staticBody:function(l,f,u,d){var p=new i(this.world);return p.position.set(l,f),u&&d&&p.setSize(u,d),this.world.add(p,n.STATIC_BODY),p},destroy:function(){this.world=null,this.scene=null,this.sys=null}});v.exports=s},79599:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){var a=0;if(!Array.isArray(t))a=t;else for(var c=0;c{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(37747),c=function(o,r,n,e){var i=0,h=o.deltaAbsX()+r.deltaAbsX()+e;return o._dx===0&&r._dx===0?(o.embedded=!0,r.embedded=!0):o._dx>r._dx?(i=o.right-r.x,i>h&&!n||o.checkCollision.right===!1||r.checkCollision.left===!1?i=0:(o.touching.none=!1,o.touching.right=!0,r.touching.none=!1,r.touching.left=!0,r.physicsType===a.STATIC_BODY&&!n&&(o.blocked.none=!1,o.blocked.right=!0),o.physicsType===a.STATIC_BODY&&!n&&(r.blocked.none=!1,r.blocked.left=!0))):o._dxh&&!n||o.checkCollision.left===!1||r.checkCollision.right===!1?i=0:(o.touching.none=!1,o.touching.left=!0,r.touching.none=!1,r.touching.right=!0,r.physicsType===a.STATIC_BODY&&!n&&(o.blocked.none=!1,o.blocked.left=!0),o.physicsType===a.STATIC_BODY&&!n&&(r.blocked.none=!1,r.blocked.right=!0))),o.overlapX=i,r.overlapX=i,i};v.exports=c},45170:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(37747),c=function(o,r,n,e){var i=0,h=o.deltaAbsY()+r.deltaAbsY()+e;return o._dy===0&&r._dy===0?(o.embedded=!0,r.embedded=!0):o._dy>r._dy?(i=o.bottom-r.y,i>h&&!n||o.checkCollision.down===!1||r.checkCollision.up===!1?i=0:(o.touching.none=!1,o.touching.down=!0,r.touching.none=!1,r.touching.up=!0,r.physicsType===a.STATIC_BODY&&!n&&(o.blocked.none=!1,o.blocked.down=!0),o.physicsType===a.STATIC_BODY&&!n&&(r.blocked.none=!1,r.blocked.up=!0))):o._dyh&&!n||o.checkCollision.up===!1||r.checkCollision.down===!1?i=0:(o.touching.none=!1,o.touching.up=!0,r.touching.none=!1,r.touching.down=!0,r.physicsType===a.STATIC_BODY&&!n&&(o.blocked.none=!1,o.blocked.up=!0),o.physicsType===a.STATIC_BODY&&!n&&(r.blocked.none=!1,r.blocked.down=!0))),o.overlapY=i,r.overlapY=i,i};v.exports=c},60758:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(13759),c=t(83419),o=t(78389),r=t(37747),n=t(95540),e=t(26479),i=t(41212),h=new c({Extends:e,Mixins:[o],initialize:function(l,f,u,d){if(!u&&!d)d={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};else if(i(u))d=u,u=null,d.internalCreateCallback=this.createCallbackHandler,d.internalRemoveCallback=this.removeCallbackHandler;else if(Array.isArray(u)&&i(u[0])){var p=this;u.forEach(function(g){g.internalCreateCallback=p.createCallbackHandler,g.internalRemoveCallback=p.removeCallbackHandler,g.classType=n(g,"classType",a)}),d=null}else d={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};this.world=l,d&&(d.classType=n(d,"classType",a)),this.physicsType=r.DYNAMIC_BODY,this.collisionCategory=1,this.collisionMask=1,this.defaults={setCollideWorldBounds:n(d,"collideWorldBounds",!1),setBoundsRectangle:n(d,"customBoundsRectangle",null),setAccelerationX:n(d,"accelerationX",0),setAccelerationY:n(d,"accelerationY",0),setAllowDrag:n(d,"allowDrag",!0),setAllowGravity:n(d,"allowGravity",!0),setAllowRotation:n(d,"allowRotation",!0),setDamping:n(d,"useDamping",!1),setBounceX:n(d,"bounceX",0),setBounceY:n(d,"bounceY",0),setDragX:n(d,"dragX",0),setDragY:n(d,"dragY",0),setEnable:n(d,"enable",!0),setGravityX:n(d,"gravityX",0),setGravityY:n(d,"gravityY",0),setFrictionX:n(d,"frictionX",0),setFrictionY:n(d,"frictionY",0),setMaxSpeed:n(d,"maxSpeed",-1),setMaxVelocityX:n(d,"maxVelocityX",1e4),setMaxVelocityY:n(d,"maxVelocityY",1e4),setVelocityX:n(d,"velocityX",0),setVelocityY:n(d,"velocityY",0),setAngularVelocity:n(d,"angularVelocity",0),setAngularAcceleration:n(d,"angularAcceleration",0),setAngularDrag:n(d,"angularDrag",0),setMass:n(d,"mass",1),setImmovable:n(d,"immovable",!1)},e.call(this,f,u,d),this.type="PhysicsGroup"},createCallbackHandler:function(s){s.body||this.world.enableBody(s,r.DYNAMIC_BODY);var l=s.body;for(var f in this.defaults)l[f](this.defaults[f])},removeCallbackHandler:function(s){s.body&&this.world.disableBody(s)},setVelocity:function(s,l,f){f===void 0&&(f=0);for(var u=this.getChildren(),d=0;d{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m,t,a,c,o,r,n,e,i,h,s,l,f,u,d,p,g,y=function(L,F,O){m=L,t=F;var b=m.velocity.x,N=t.velocity.x;return a=m.pushable,i=m._dx<0,h=m._dx>0,s=m._dx===0,d=Math.abs(m.right-t.x)<=Math.abs(t.right-m.x),n=N-b*m.bounce.x,c=t.pushable,l=t._dx<0,f=t._dx>0,u=t._dx===0,p=!d,e=b-N*t.bounce.x,g=Math.abs(O),x()},x=function(){return h&&d&&t.blocked.right?(m.processX(-g,n,!1,!0),1):i&&p&&t.blocked.left?(m.processX(g,n,!0),1):f&&p&&m.blocked.right?(t.processX(-g,e,!1,!0),2):l&&d&&m.blocked.left?(t.processX(g,e,!0),2):0},T=function(){var L=m.velocity.x,F=t.velocity.x,O=Math.sqrt(F*F*t.mass/m.mass)*(F>0?1:-1),b=Math.sqrt(L*L*m.mass/t.mass)*(L>0?1:-1),N=(O+b)*.5;return O-=N,b-=N,o=N+O*m.bounce.x,r=N+b*t.bounce.x,i&&p?S(0):l&&d?S(1):h&&d?S(2):f&&p?S(3):!1},S=function(L){if(a&&c)g*=.5,L===0||L===3?(m.processX(g,o),t.processX(-g,r)):(m.processX(-g,o),t.processX(g,r));else if(a&&!c)L===0||L===3?m.processX(g,n,!0):m.processX(-g,n,!1,!0);else if(!a&&c)L===0||L===3?t.processX(-g,e,!1,!0):t.processX(g,e,!0);else{var F=g*.5;L===0?u?(m.processX(g,0,!0),t.processX(0,null,!1,!0)):f?(m.processX(F,0,!0),t.processX(-F,0,!1,!0)):(m.processX(F,t.velocity.x,!0),t.processX(-F,null,!1,!0)):L===1?s?(m.processX(0,null,!1,!0),t.processX(g,0,!0)):h?(m.processX(-F,0,!1,!0),t.processX(F,0,!0)):(m.processX(-F,null,!1,!0),t.processX(F,m.velocity.x,!0)):L===2?u?(m.processX(-g,0,!1,!0),t.processX(0,null,!0)):l?(m.processX(-F,0,!1,!0),t.processX(F,0,!0)):(m.processX(-F,t.velocity.x,!1,!0),t.processX(F,null,!0)):L===3&&(s?(m.processX(0,null,!0),t.processX(-g,0,!1,!0)):i?(m.processX(F,0,!0),t.processX(-F,0,!1,!0)):(m.processX(F,t.velocity.y,!0),t.processX(-F,null,!1,!0)))}return!0},M=function(L){L===1?t.velocity.x=0:d?t.processX(g,e,!0):t.processX(-g,e,!1,!0),m.moves&&(t.y+=(m.y-m.prev.y)*m.friction.y,t._dy=t.y-t.prev.y)},w=function(L){L===2?m.velocity.x=0:p?m.processX(g,n,!0):m.processX(-g,n,!1,!0),t.moves&&(m.y+=(t.y-t.prev.y)*t.friction.y,m._dy=m.y-m.prev.y)};v.exports={BlockCheck:x,Check:T,Set:y,Run:S,RunImmovableBody1:M,RunImmovableBody2:w}},47962:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m,t,a,c,o,r,n,e,i,h,s,l,f,u,d,p,g,y=function(L,F,O){m=L,t=F;var b=m.velocity.y,N=t.velocity.y;return a=m.pushable,i=m._dy<0,h=m._dy>0,s=m._dy===0,d=Math.abs(m.bottom-t.y)<=Math.abs(t.bottom-m.y),n=N-b*m.bounce.y,c=t.pushable,l=t._dy<0,f=t._dy>0,u=t._dy===0,p=!d,e=b-N*t.bounce.y,g=Math.abs(O),x()},x=function(){return h&&d&&t.blocked.down?(m.processY(-g,n,!1,!0),1):i&&p&&t.blocked.up?(m.processY(g,n,!0),1):f&&p&&m.blocked.down?(t.processY(-g,e,!1,!0),2):l&&d&&m.blocked.up?(t.processY(g,e,!0),2):0},T=function(){var L=m.velocity.y,F=t.velocity.y,O=Math.sqrt(F*F*t.mass/m.mass)*(F>0?1:-1),b=Math.sqrt(L*L*m.mass/t.mass)*(L>0?1:-1),N=(O+b)*.5;return O-=N,b-=N,o=N+O*m.bounce.y,r=N+b*t.bounce.y,i&&p?S(0):l&&d?S(1):h&&d?S(2):f&&p?S(3):!1},S=function(L){if(a&&c)g*=.5,L===0||L===3?(m.processY(g,o),t.processY(-g,r)):(m.processY(-g,o),t.processY(g,r));else if(a&&!c)L===0||L===3?m.processY(g,n,!0):m.processY(-g,n,!1,!0);else if(!a&&c)L===0||L===3?t.processY(-g,e,!1,!0):t.processY(g,e,!0);else{var F=g*.5;L===0?u?(m.processY(g,0,!0),t.processY(0,null,!1,!0)):f?(m.processY(F,0,!0),t.processY(-F,0,!1,!0)):(m.processY(F,t.velocity.y,!0),t.processY(-F,null,!1,!0)):L===1?s?(m.processY(0,null,!1,!0),t.processY(g,0,!0)):h?(m.processY(-F,0,!1,!0),t.processY(F,0,!0)):(m.processY(-F,null,!1,!0),t.processY(F,m.velocity.y,!0)):L===2?u?(m.processY(-g,0,!1,!0),t.processY(0,null,!0)):l?(m.processY(-F,0,!1,!0),t.processY(F,0,!0)):(m.processY(-F,t.velocity.y,!1,!0),t.processY(F,null,!0)):L===3&&(s?(m.processY(0,null,!0),t.processY(-g,0,!1,!0)):i?(m.processY(F,0,!0),t.processY(-F,0,!1,!0)):(m.processY(F,t.velocity.y,!0),t.processY(-F,null,!1,!0)))}return!0},M=function(L){L===1?t.velocity.y=0:d?t.processY(g,e,!0):t.processY(-g,e,!1,!0),m.moves&&(t.x+=(m.x-m.prev.x)*m.friction.x,t._dx=t.x-t.prev.x)},w=function(L){L===2?m.velocity.y=0:p?m.processY(g,n,!0):m.processY(-g,n,!1,!0),t.moves&&(m.x+=(t.x-t.prev.x)*t.friction.x,m._dx=m.x-m.prev.x)};v.exports={BlockCheck:x,Check:T,Set:y,Run:S,RunImmovableBody1:M,RunImmovableBody2:w}},14087:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(64897),c=t(3017),o=function(r,n,e,i,h){h===void 0&&(h=a(r,n,e,i));var s=r.immovable,l=n.immovable;if(e||h===0||s&&l||r.customSeparateX||n.customSeparateX)return h!==0||r.embedded&&n.embedded;var f=c.Set(r,n,h);return!s&&!l?f>0?!0:c.Check():(s?c.RunImmovableBody1(f):l&&c.RunImmovableBody2(f),!0)};v.exports=o},89936:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(45170),c=t(47962),o=function(r,n,e,i,h){h===void 0&&(h=a(r,n,e,i));var s=r.immovable,l=n.immovable;if(e||h===0||s&&l||r.customSeparateY||n.customSeparateY)return h!==0||r.embedded&&n.embedded;var f=c.Set(r,n,h);return!s&&!l?f>0?!0:c.Check():(s?c.RunImmovableBody1(f):l&&c.RunImmovableBody2(f),!0)};v.exports=o},95829:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){return 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};v.exports=m},72624:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(87902),c=t(83419),o=t(78389),r=t(37747),n=t(37303),e=t(95829),i=t(26099),h=new c({Mixins:[o],initialize:function(l,f){var u=64,d=64,p={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0},g=f!==void 0;g&&f.displayWidth&&(u=f.displayWidth,d=f.displayHeight),g||(f=p),this.world=l,this.gameObject=g?f:void 0,this.isBody=!0,this.debugShowBody=l.defaults.debugShowStaticBody,this.debugBodyColor=l.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new i,this.position=new i(f.x-u*f.originX,f.y-d*f.originY),this.width=u,this.height=d,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center=new i(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=i.ZERO,this.allowGravity=!1,this.gravity=i.ZERO,this.bounce=i.ZERO,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.mass=1,this.immovable=!0,this.pushable=!1,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision=e(!1),this.touching=e(!0),this.wasTouching=e(!0),this.blocked=e(!0),this.physicsType=r.STATIC_BODY,this.collisionCategory=1,this.collisionMask=1,this._dx=0,this._dy=0},setGameObject:function(s,l){return s&&s!==this.gameObject&&(this.gameObject.body=null,s.body=this,this.gameObject=s),l&&this.updateFromGameObject(),this},updateFromGameObject:function(){this.world.staticTree.remove(this);var s=this.gameObject;return s.getTopLeft(this.position),this.width=s.displayWidth,this.height=s.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.world.staticTree.insert(this),this},setOffset:function(s,l){return l===void 0&&(l=s),this.world.staticTree.remove(this),this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(s,l),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this),this},setSize:function(s,l,f){f===void 0&&(f=!0);var u=this.gameObject;if(u&&u.frame&&(s||(s=u.frame.realWidth),l||(l=u.frame.realHeight)),this.world.staticTree.remove(this),this.width=s,this.height=l,this.halfWidth=Math.floor(s/2),this.halfHeight=Math.floor(l/2),f&&u&&u.getCenter){var d=u.displayWidth/2,p=u.displayHeight/2;this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(d-this.halfWidth,p-this.halfHeight),this.position.x+=this.offset.x,this.position.y+=this.offset.y}return this.updateCenter(),this.isCircle=!1,this.radius=0,this.world.staticTree.insert(this),this},setCircle:function(s,l,f){return l===void 0&&(l=this.offset.x),f===void 0&&(f=this.offset.y),s>0?(this.world.staticTree.remove(this),this.isCircle=!0,this.radius=s,this.width=s*2,this.height=s*2,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(l,f),this.updateCenter(),this.world.staticTree.insert(this)):this.isCircle=!1,this},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},reset:function(s,l){var f=this.gameObject;s===void 0&&(s=f.x),l===void 0&&(l=f.y),this.world.staticTree.remove(this),f.setPosition(s,l),f.getTopLeft(this.position),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this)},stop:function(){return this},getBounds:function(s){return s.x=this.x,s.y=this.y,s.right=this.right,s.bottom=this.bottom,s},hitTest:function(s,l){return this.isCircle?a(this,s,l):n(this,s,l)},postUpdate:function(){},deltaAbsX:function(){return 0},deltaAbsY:function(){return 0},deltaX:function(){return 0},deltaY:function(){return 0},deltaZ:function(){return 0},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(s){var l=this.position,f=l.x+this.halfWidth,u=l.y+this.halfHeight;this.debugShowBody&&(s.lineStyle(s.defaultStrokeWidth,this.debugBodyColor,1),this.isCircle?s.strokeCircle(f,u,this.width/2):s.strokeRect(l.x,l.y,this.width,this.height))},willDrawDebug:function(){return this.debugShowBody},setMass:function(s){return s<=0&&(s=.1),this.mass=s,this},x:{get:function(){return this.position.x},set:function(s){this.world.staticTree.remove(this),this.position.x=s,this.world.staticTree.insert(this)}},y:{get:function(){return this.position.y},set:function(s){this.world.staticTree.remove(this),this.position.y=s,this.world.staticTree.insert(this)}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});v.exports=h},71464:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(13759),c=t(83419),o=t(78389),r=t(37747),n=t(95540),e=t(26479),i=t(41212),h=new c({Extends:e,Mixins:[o],initialize:function(l,f,u,d){!u&&!d?d={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler,createMultipleCallback:this.createMultipleCallbackHandler,classType:a}:i(u)?(d=u,u=null,d.internalCreateCallback=this.createCallbackHandler,d.internalRemoveCallback=this.removeCallbackHandler,d.createMultipleCallback=this.createMultipleCallbackHandler,d.classType=n(d,"classType",a)):Array.isArray(u)&&i(u[0])?(d=u,u=null,d.forEach(function(p){p.internalCreateCallback=this.createCallbackHandler,p.internalRemoveCallback=this.removeCallbackHandler,p.createMultipleCallback=this.createMultipleCallbackHandler,p.classType=n(p,"classType",a)})):d={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler},this.world=l,this.physicsType=r.STATIC_BODY,this.collisionCategory=1,this.collisionMask=1,e.call(this,f,u,d),this.type="StaticPhysicsGroup"},createCallbackHandler:function(s){s.body||this.world.enableBody(s,r.STATIC_BODY)},removeCallbackHandler:function(s){s.body&&this.world.disableBody(s)},createMultipleCallbackHandler:function(){this.refresh()},refresh:function(){for(var s=this.children.entries,l=0;l{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(55495),c=t(37742),o=t(45319),r=t(83419),n=t(79342),e=t(37747),i=t(20339),h=t(52816),s=t(50792),l=t(63012),f=t(43855),u=t(5470),d=t(94977),p=t(64897),g=t(45170),y=t(96523),x=t(35154),T=t(36383),S=t(25774),M=t(96602),w=t(87841),L=t(59542),F=t(40012),O=t(14087),b=t(89936),N=t(35072),V=t(72624),K=t(2483),$=t(61340),j=t(26099),X=t(15994),Y=new r({Extends:s,initialize:function(z,W){s.call(this),this.scene=z,this.bodies=new N,this.staticBodies=new N,this.pendingDestroy=new N,this.colliders=new S,this.gravity=new j(x(W,"gravity.x",0),x(W,"gravity.y",0)),this.bounds=new w(x(W,"x",0),x(W,"y",0),x(W,"width",z.sys.scale.width),x(W,"height",z.sys.scale.height)),this.checkCollision={up:x(W,"checkCollision.up",!0),down:x(W,"checkCollision.down",!0),left:x(W,"checkCollision.left",!0),right:x(W,"checkCollision.right",!0)},this.fps=x(W,"fps",60),this.fixedStep=x(W,"fixedStep",!0),this._elapsed=0,this._frameTime=1/this.fps,this._frameTimeMS=1e3*this._frameTime,this.stepsLastFrame=0,this.timeScale=x(W,"timeScale",1),this.OVERLAP_BIAS=x(W,"overlapBias",4),this.TILE_BIAS=x(W,"tileBias",16),this.forceX=x(W,"forceX",!1),this.isPaused=x(W,"isPaused",!1),this._total=0,this.drawDebug=x(W,"debug",!1),this.debugGraphic,this.defaults={debugShowBody:x(W,"debugShowBody",!0),debugShowStaticBody:x(W,"debugShowStaticBody",!0),debugShowVelocity:x(W,"debugShowVelocity",!0),bodyDebugColor:x(W,"debugBodyColor",16711935),staticBodyDebugColor:x(W,"debugStaticBodyColor",255),velocityDebugColor:x(W,"debugVelocityColor",65280)},this.maxEntries=x(W,"maxEntries",16),this.useTree=x(W,"useTree",!0),this.tree=new L(this.maxEntries),this.staticTree=new L(this.maxEntries),this.treeMinMax={minX:0,minY:0,maxX:0,maxY:0},this._tempMatrix=new $,this._tempMatrix2=new $,this.tileFilterOptions={isColliding:!0,isNotEmpty:!0,hasInterestingFace:!0},this.drawDebug&&this.createDebugGraphic()},enable:function(D,z){z===void 0&&(z=e.DYNAMIC_BODY),Array.isArray(D)||(D=[D]);for(var W=0;W=J;for(this.fixedStep||(H=z*.001,et=!0,this._elapsed=0),W=0;W=J;)this._elapsed-=J,this.step(H)}},step:function(D){var z,W,H=this.bodies.entries,J=H.length;for(z=0;z0){var st=this.tree,rt=this.staticTree;for(W=et.entries,H=W.length,D=0;D-1&&D.velocity.length()>ft&&(D.velocity.normalize().scale(ft),ot=ft),D.speed=ot},separate:function(D,z,W,H,J){var Q,k,et=!1,st=!0;if(!D.enable||!z.enable||D.checkCollision.none||z.checkCollision.none||!this.intersects(D,z)||W&&W.call(H,D.gameObject,z.gameObject)===!1)return et;if(D.isCircle||z.isCircle){var rt=this.separateCircle(D,z,J);rt.result?(et=!0,st=!1):(Q=rt.x,k=rt.y,st=!0)}if(st){var ot=!1,ft=!1,at=this.OVERLAP_BIAS;J?(ot=O(D,z,J,at,Q),ft=b(D,z,J,at,k)):this.forceX||Math.abs(this.gravity.y+D.gravity.y)Tt&&(ft=i(ct,Et,Tt,vt)-St):Et>pt&&(ctTt&&(ft=i(ct,Et,Tt,pt)-St)),ft*=-1}else ft=D.halfWidth+z.halfWidth-h(Q,k);D.overlapR=ft,z.overlapR=ft;var At=a(Q,k),Dt=(ft+T.EPSILON)*Math.cos(At),Ht=(ft+T.EPSILON)*Math.sin(At),Gt={overlap:ft,result:!1,x:Dt,y:Ht};if(W&&(!at||at&&ft!==0))return Gt.result=!0,Gt;if(!at&&ft===0||et&&st||D.customSeparateX||z.customSeparateX)return Gt.x=void 0,Gt.y=void 0,Gt;var Vt=!D.pushable&&!z.pushable;if(at){var It=Q.x-k.x,te=Q.y-k.y,$t=Math.sqrt(Math.pow(It,2)+Math.pow(te,2)),oe=(k.x-Q.x)/$t||0,le=(k.y-Q.y)/$t||0,ye=2*(rt.x*oe+rt.y*le-ot.x*oe-ot.y*le)/(D.mass+z.mass);(et||st)&&(ye*=2),et||(rt.x=rt.x-ye/D.mass*oe,rt.y=rt.y-ye/D.mass*le,rt.multiply(D.bounce)),st||(ot.x=ot.x+ye/z.mass*oe,ot.y=ot.y+ye/z.mass*le,ot.multiply(z.bounce)),!et&&!st&&(Dt*=.5,Ht*=.5),et||(D.x-=Dt,D.y-=Ht,D.updateCenter()),st||(z.x+=Dt,z.y+=Ht,z.updateCenter()),Gt.result=!0}else!et||D.pushable||Vt?(D.x-=Dt,D.y-=Ht,D.updateCenter()):(!st||z.pushable||Vt)&&(z.x+=Dt,z.y+=Ht,z.updateCenter()),Gt.x=void 0,Gt.y=void 0;return Gt},intersects:function(D,z){return D===z?!1:!D.isCircle&&!z.isCircle?!(D.right<=z.left||D.bottom<=z.top||D.left>=z.right||D.top>=z.bottom):D.isCircle?z.isCircle?h(D.center,z.center)<=D.halfWidth+z.halfWidth:this.circleBodyIntersects(D,z):this.circleBodyIntersects(z,D)},circleBodyIntersects:function(D,z){var W=o(D.center.x,z.left,z.right),H=o(D.center.y,z.top,z.bottom),J=(D.center.x-W)*(D.center.x-W),Q=(D.center.y-H)*(D.center.y-H);return J+Q<=D.halfWidth*D.halfWidth},overlap:function(D,z,W,H,J){return W===void 0&&(W=null),H===void 0&&(H=null),J===void 0&&(J=W),this.collideObjects(D,z,W,H,J,!0)},collide:function(D,z,W,H,J){return W===void 0&&(W=null),H===void 0&&(H=null),J===void 0&&(J=W),this.collideObjects(D,z,W,H,J,!1)},collideObjects:function(D,z,W,H,J,Q){var k,et;D.isParent&&(D.physicsType===void 0||z===void 0||D===z)&&(D=D.children.entries),z&&z.isParent&&z.physicsType===void 0&&(z=z.children.entries);var st=Array.isArray(D),rt=Array.isArray(z);if(this._total=0,!st&&!rt)this.collideHandler(D,z,W,H,J,Q);else if(!st&&rt)for(k=0;k0},collideHandler:function(D,z,W,H,J,Q){if(z===void 0&&D.isParent)return this.collideGroupVsGroup(D,D,W,H,J,Q);if(!D||!z)return!1;if(D.body||D.isBody){if(z.body||z.isBody)return this.collideSpriteVsSprite(D,z,W,H,J,Q);if(z.isParent)return this.collideSpriteVsGroup(D,z,W,H,J,Q);if(z.isTilemap)return this.collideSpriteVsTilemapLayer(D,z,W,H,J,Q)}else if(D.isParent){if(z.body||z.isBody)return this.collideSpriteVsGroup(z,D,W,H,J,Q);if(z.isParent)return this.collideGroupVsGroup(D,z,W,H,J,Q);if(z.isTilemap)return this.collideGroupVsTilemapLayer(D,z,W,H,J,Q)}else if(D.isTilemap){if(z.body||z.isBody)return this.collideSpriteVsTilemapLayer(z,D,W,H,J,Q);if(z.isParent)return this.collideGroupVsTilemapLayer(z,D,W,H,J,Q)}},canCollide:function(D,z){return D&&z&&(D.collisionMask&z.collisionCategory)!==0&&(z.collisionMask&D.collisionCategory)!==0},collideSpriteVsSprite:function(D,z,W,H,J,Q){var k=D.isBody?D:D.body,et=z.isBody?z:z.body;return this.canCollide(k,et)?(this.separate(k,et,H,J,Q)&&(W&&W.call(J,D,z),this._total++),!0):!1},collideSpriteVsGroup:function(D,z,W,H,J,Q){var k=D.isBody?D:D.body;if(!(z.length===0||!k||!k.enable||k.checkCollision.none||!this.canCollide(k,z))){var et,st,rt;if(this.useTree||z.physicsType===e.STATIC_BODY){var ot=this.treeMinMax;ot.minX=k.left,ot.minY=k.top,ot.maxX=k.right,ot.maxY=k.bottom;var ft=z.physicsType===e.DYNAMIC_BODY?this.tree.search(ot):this.staticTree.search(ot);for(st=ft.length,et=0;et{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m={setAcceleration:function(t,a){return this.body.acceleration.set(t,a),this},setAccelerationX:function(t){return this.body.acceleration.x=t,this},setAccelerationY:function(t){return this.body.acceleration.y=t,this}};v.exports=m},59023:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m={setAngularVelocity:function(t){return this.body.angularVelocity=t,this},setAngularAcceleration:function(t){return this.body.angularAcceleration=t,this},setAngularDrag:function(t){return this.body.angularDrag=t,this}};v.exports=m},62069:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m={setBounce:function(t,a){return this.body.bounce.set(t,a),this},setBounceX:function(t){return this.body.bounce.x=t,this},setBounceY:function(t){return this.body.bounce.y=t,this},setCollideWorldBounds:function(t,a,c,o){return this.body.setCollideWorldBounds(t,a,c,o),this}};v.exports=m},78389:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(79599),c={setCollisionCategory:function(o){var r=this.body?this.body:this;return r.collisionCategory=o,this},willCollideWith:function(o){var r=this.body?this.body:this;return(r.collisionMask&o)!==0},addCollidesWith:function(o){var r=this.body?this.body:this;return r.collisionMask=r.collisionMask|o,this},removeCollidesWith:function(o){var r=this.body?this.body:this;return r.collisionMask=r.collisionMask&~o,this},setCollidesWith:function(o){var r=this.body?this.body:this;return r.collisionMask=a(o),this},resetCollisionCategory:function(){var o=this.body?this.body:this;return o.collisionCategory=1,o.collisionMask=1,this}};v.exports=c},87118:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m={setDebug:function(t,a,c){return this.debugShowBody=t,this.debugShowVelocity=a,this.debugBodyColor=c,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}}};v.exports=m},52819:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m={setDrag:function(t,a){return this.body.drag.set(t,a),this},setDragX:function(t){return this.body.drag.x=t,this},setDragY:function(t){return this.body.drag.y=t,this},setDamping:function(t){return this.body.useDamping=t,this}};v.exports=m},4074:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m={setDirectControl:function(t){return this.body.setDirectControl(t),this},enableBody:function(t,a,c,o,r){return t&&this.body.reset(a,c),o&&(this.body.gameObject.active=!0),r&&(this.body.gameObject.visible=!0),this.body.enable=!0,this},disableBody:function(t,a){return t===void 0&&(t=!1),a===void 0&&(a=!1),this.body.stop(),this.body.enable=!1,t&&(this.body.gameObject.active=!1),a&&(this.body.gameObject.visible=!1),this},refreshBody:function(){return this.body.updateFromGameObject(),this}};v.exports=m},40831:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m={setFriction:function(t,a){return this.body.friction.set(t,a),this},setFrictionX:function(t){return this.body.friction.x=t,this},setFrictionY:function(t){return this.body.friction.y=t,this}};v.exports=m},26775:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m={setGravity:function(t,a){return this.body.gravity.set(t,a),this},setGravityX:function(t){return this.body.gravity.x=t,this},setGravityY:function(t){return this.body.gravity.y=t,this}};v.exports=m},9437:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m={setImmovable:function(t){return t===void 0&&(t=!0),this.body.immovable=t,this}};v.exports=m},30621:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m={setMass:function(t){return this.body.mass=t,this}};v.exports=m},72441:(v,m,t)=>{var a=t(47956),c=t(96503),o=t(2044),r=t(81491),n=function(e,i,h,s,l,f){var u=a(e,i-s,h-s,2*s,2*s,l,f);if(u.length===0)return u;for(var d=new c(i,h,s),p=new c,g=[],y=0;y{var m=function(t,a,c,o,r,n,e){n===void 0&&(n=!0),e===void 0&&(e=!1);var i=[],h=[],s=t.treeMinMax;if(s.minX=a,s.minY=c,s.maxX=a+o,s.maxY=c+r,e&&(h=t.staticTree.search(s)),n&&t.useTree)i=t.tree.search(s);else if(n){var l=t.bodies,f={position:{x:a,y:c},left:a,top:c,right:a+o,bottom:c+r,isCircle:!1},u=t.intersects;l.iterate(function(d){u(d,f)&&i.push(d)})}return h.concat(i)};v.exports=m},62121:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m={setPushable:function(t){return t===void 0&&(t=!0),this.body.pushable=t,this}};v.exports=m},29384:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m={setOffset:function(t,a){return this.body.setOffset(t,a),this},setSize:function(t,a,c){return this.body.setSize(t,a,c),this},setBodySize:function(t,a,c){return this.body.setSize(t,a,c),this},setCircle:function(t,a,c){return this.body.setCircle(t,a,c),this}};v.exports=m},15098:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m={setVelocity:function(t,a){return this.body.setVelocity(t,a),this},setVelocityX:function(t){return this.body.setVelocityX(t),this},setVelocityY:function(t){return this.body.setVelocityY(t),this},setMaxVelocity:function(t,a){return this.body.maxVelocity.set(t,a),this}};v.exports=m},92209:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.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:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m={DYNAMIC_BODY:0,STATIC_BODY:1,GROUP:2,TILEMAPLAYER:3,FACING_NONE:10,FACING_UP:11,FACING_DOWN:12,FACING_LEFT:13,FACING_RIGHT:14};v.exports=m},20009:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="collide"},36768:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="overlap"},60473:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="pause"},89954:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="resume"},61804:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="tilecollide"},7161:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="tileoverlap"},34689:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="worldbounds"},16006:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="worldstep"},63012:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.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:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(37747),c=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=c(!1,o,a),v.exports=o},96602:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){return t.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};v.exports=m},36294:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){a<0?(t.blocked.none=!1,t.blocked.left=!0):a>0&&(t.blocked.none=!1,t.blocked.right=!0),t.position.x-=a,t.updateCenter(),t.bounce.x===0?t.velocity.x=0:t.velocity.x=-t.velocity.x*t.bounce.x};v.exports=m},67013:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){a<0?(t.blocked.none=!1,t.blocked.up=!0):a>0&&(t.blocked.none=!1,t.blocked.down=!0),t.position.y-=a,t.updateCenter(),t.bounce.y===0?t.velocity.y=0:t.velocity.y=-t.velocity.y*t.bounce.y};v.exports=m},40012:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(21329),c=t(53442),o=t(2483),r=function(n,e,i,h,s,l,f){var u=h.left,d=h.top,p=h.right,g=h.bottom,y=i.faceLeft||i.faceRight,x=i.faceTop||i.faceBottom;if(f||(y=!0,x=!0),!y&&!x)return!1;var T=0,S=0,M=0,w=1;if(e.deltaAbsX()>e.deltaAbsY()?M=-1:e.deltaAbsX(){/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(36294),c=function(o,r,n,e,i,h){var s=0,l=r.faceLeft,f=r.faceRight,u=r.collideLeft,d=r.collideRight;return h||(l=!0,f=!0,u=!0,d=!0),o.deltaX()<0&&d&&o.checkCollision.left?f&&o.x0&&u&&o.checkCollision.right&&l&&o.right>n&&(s=o.right-n,s>i&&(s=0)),s!==0&&(o.customSeparateX?o.overlapX=s:a(o,s)),s};v.exports=c},53442:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(67013),c=function(o,r,n,e,i,h){var s=0,l=r.faceTop,f=r.faceBottom,u=r.collideUp,d=r.collideDown;return h||(l=!0,f=!0,u=!0,d=!0),o.deltaY()<0&&d&&o.checkCollision.up?f&&o.y0&&u&&o.checkCollision.down&&l&&o.bottom>n&&(s=o.bottom-n,s>i&&(s=0)),s!==0&&(o.customSeparateY?o.overlapY=s:a(o,s)),s};v.exports=c},2483:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){return!(a.right<=t.left||a.bottom<=t.top||a.position.x>=t.right||a.position.y>=t.bottom)};v.exports=m},55173:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a={ProcessTileCallbacks:t(96602),ProcessTileSeparationX:t(36294),ProcessTileSeparationY:t(67013),SeparateTile:t(40012),TileCheckX:t(21329),TileCheckY:t(53442),TileIntersectsBody:t(2483)};v.exports=a},44563:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={Arcade:t(27064),Matter:t(3875)}},68174:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(26099),o=new a({initialize:function(){this.boundsCenter=new c,this.centerDiff=new c},parseBody:function(r){if(r=r.hasOwnProperty("body")?r.body:r,!r.hasOwnProperty("bounds")||!r.hasOwnProperty("centerOfMass"))return!1;var n=this.boundsCenter,e=this.centerDiff,i=r.bounds.max.x-r.bounds.min.x,h=r.bounds.max.y-r.bounds.min.y,s=i*r.centerOfMass.x,l=h*r.centerOfMass.y;return n.set(i/2,h/2),e.set(s-n.x,l-n.y),!0},getTopLeft:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var i=this.boundsCenter,h=this.centerDiff;return new c(n+i.x+h.x,e+i.y+h.y)}return!1},getTopCenter:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var i=this.boundsCenter,h=this.centerDiff;return new c(n+h.x,e+i.y+h.y)}return!1},getTopRight:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var i=this.boundsCenter,h=this.centerDiff;return new c(n-(i.x-h.x),e+i.y+h.y)}return!1},getLeftCenter:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var i=this.boundsCenter,h=this.centerDiff;return new c(n+i.x+h.x,e+h.y)}return!1},getCenter:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var i=this.centerDiff;return new c(n+i.x,e+i.y)}return!1},getRightCenter:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var i=this.boundsCenter,h=this.centerDiff;return new c(n-(i.x-h.x),e+h.y)}return!1},getBottomLeft:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var i=this.boundsCenter,h=this.centerDiff;return new c(n+i.x+h.x,e-(i.y-h.y))}return!1},getBottomCenter:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var i=this.boundsCenter,h=this.centerDiff;return new c(n+h.x,e-(i.y-h.y))}return!1},getBottomRight:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var i=this.boundsCenter,h=this.centerDiff;return new c(n-(i.x-h.x),e-(i.y-h.y))}return!1}});v.exports=o},19933:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(6790);a.Body=t(22562),a.Composite=t(69351),a.World=t(4372),a.Collision=t(52284),a.Detector=t(81388),a.Pairs=t(99561),a.Pair=t(4506),a.Query=t(73296),a.Resolver=t(66272),a.Constraint=t(48140),a.Common=t(53402),a.Engine=t(48413),a.Events=t(35810),a.Sleeping=t(53614),a.Plugin=t(73832),a.Bodies=t(66280),a.Composites=t(74116),a.Axes=t(66615),a.Bounds=t(15647),a.Svg=t(74058),a.Vector=t(31725),a.Vertices=t(41598),a.World.add=a.Composite.add,a.World.remove=a.Composite.remove,a.World.addComposite=a.Composite.addComposite,a.World.addBody=a.Composite.addBody,a.World.addConstraint=a.Composite.addConstraint,a.World.clear=a.Composite.clear,v.exports=a},28137:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(66280),c=t(83419),o=t(74116),r=t(48140),n=t(74058),e=t(75803),i=t(23181),h=t(34803),s=t(73834),l=t(19496),f=t(85791),u=t(98713),d=t(41598),p=new c({initialize:function(y){this.world=y,this.scene=y.scene,this.sys=y.scene.sys},rectangle:function(g,y,x,T,S){var M=a.rectangle(g,y,x,T,S);return this.world.add(M),M},trapezoid:function(g,y,x,T,S,M){var w=a.trapezoid(g,y,x,T,S,M);return this.world.add(w),w},circle:function(g,y,x,T,S){var M=a.circle(g,y,x,T,S);return this.world.add(M),M},polygon:function(g,y,x,T,S){var M=a.polygon(g,y,x,T,S);return this.world.add(M),M},fromVertices:function(g,y,x,T,S,M,w){typeof x=="string"&&(x=d.fromPath(x));var L=a.fromVertices(g,y,x,T,S,M,w);return this.world.add(L),L},fromPhysicsEditor:function(g,y,x,T,S){S===void 0&&(S=!0);var M=l.parseBody(g,y,x,T);return S&&!this.world.has(M)&&this.world.add(M),M},fromSVG:function(g,y,x,T,S,M){T===void 0&&(T=1),S===void 0&&(S={}),M===void 0&&(M=!0);for(var w=x.getElementsByTagName("path"),L=[],F=0;F{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(31884),c=t(95540),o=t(26099);function r(e){return!!e.get&&typeof e.get=="function"||!!e.set&&typeof e.set=="function"}var n=function(e,i,h,s){h===void 0&&(h={}),s===void 0&&(s=!0);var l=i.x,f=i.y;i.body={temp:!0,position:{x:l,y:f}};var u=[a.Bounce,a.Collision,a.Force,a.Friction,a.Gravity,a.Mass,a.Sensor,a.SetBody,a.Sleep,a.Static,a.Transform,a.Velocity];if(u.forEach(function(p){for(var g in p)r(p[g])?Object.defineProperty(i,g,{get:p[g].get,set:p[g].set}):Object.defineProperty(i,g,{value:p[g]})}),i.world=e,i._tempVec2=new o(l,f),h.hasOwnProperty("type")&&h.type==="body")i.setExistingBody(h,s);else{var d=c(h,"shape",null);d||(d="rectangle"),h.addToWorld=s,i.setBody(d,h)}return i};v.exports=n},23181:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(31884),o=t(95643),r=t(95540),n=t(88571),e=t(72699),i=t(26099),h=new a({Extends:n,Mixins:[c.Bounce,c.Collision,c.Force,c.Friction,c.Gravity,c.Mass,c.Sensor,c.SetBody,c.Sleep,c.Static,c.Transform,c.Velocity,e],initialize:function(l,f,u,d,p,g){o.call(this,l.scene,"Image"),this._crop=this.resetCropObject(),this.setTexture(d,p),this.setSizeToFrame(),this.setOrigin(),this.world=l,this._tempVec2=new i(f,u);var y=r(g,"shape",null);y?this.setBody(y,g):this.setRectangle(this.width,this.height,g),this.setPosition(f,u),this.initPipeline(),this.initPostPipeline(!0)}});v.exports=h},42045:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(60461),c=t(66615),o=t(66280),r=t(22562),n=t(68174),e=t(15647),i=t(83419),h=t(52284),s=t(53402),l=t(69351),f=t(74116),u=t(48140),d=t(81388),p=t(20339),g=t(28137),y=t(95540),x=t(35154),T=t(18210),S=t(40178),M=t(6790),w=t(74507),L=t(46975),F=t(4506),O=t(99561),b=t(73832),N=t(37277),V=t(73296),K=t(66272),$=t(44594),j=t(74058),X=t(31725),Y=t(41598),D=t(68243);s.setDecomp(t(55973));var z=new i({initialize:function(H){this.scene=H,this.systems=H.sys,this.config=this.getConfig(),this.world,this.add,this.bodyBounds,this.body=r,this.composite=l,this.collision=h,this.detector=d,this.pair=F,this.pairs=O,this.query=V,this.resolver=K,this.constraint=u,this.bodies=o,this.composites=f,this.axes=c,this.bounds=e,this.svg=j,this.vector=X,this.vertices=Y,this.verts=Y,this._tempVec2=X.create(),x(this.config,"plugins.collisionevents",!0)&&this.enableCollisionEventsPlugin(),x(this.config,"plugins.attractors",!1)&&this.enableAttractorPlugin(),x(this.config,"plugins.wrap",!1)&&this.enableWrapPlugin(),K._restingThresh=x(this.config,"restingThresh",4),K._restingThreshTangent=x(this.config,"restingThreshTangent",6),K._positionDampen=x(this.config,"positionDampen",.9),K._positionWarming=x(this.config,"positionWarming",.8),K._frictionNormalMultiplier=x(this.config,"frictionNormalMultiplier",5),H.sys.events.once($.BOOT,this.boot,this),H.sys.events.on($.START,this.start,this)},boot:function(){this.world=new D(this.scene,this.config),this.add=new g(this.world),this.bodyBounds=new n,this.systems.events.once($.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new D(this.scene,this.config),this.add=new g(this.world));var W=this.systems.events;W.on($.UPDATE,this.world.update,this.world),W.on($.POST_UPDATE,this.world.postUpdate,this.world),W.once($.SHUTDOWN,this.shutdown,this)},getConfig:function(){var W=this.systems.game.config.physics,H=this.systems.settings.physics,J=L(y(H,"matter",{}),y(W,"matter",{}));return J},enableAttractorPlugin:function(){return b.register(T),b.use(M,T),this},enableWrapPlugin:function(){return b.register(w),b.use(M,w),this},enableCollisionEventsPlugin:function(){return b.register(S),b.use(M,S),this},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},set60Hz:function(){return this.world.getDelta=this.world.update60Hz,this.world.autoUpdate=!0,this},set30Hz:function(){return this.world.getDelta=this.world.update30Hz,this.world.autoUpdate=!0,this},step:function(W,H){this.world.step(W,H)},containsPoint:function(W,H,J){W=this.getMatterBodies(W);var Q=X.create(H,J),k=V.point(W,Q);return k.length>0},intersectPoint:function(W,H,J){J=this.getMatterBodies(J);var Q=X.create(W,H),k=[],et=V.point(J,Q);return et.forEach(function(st){k.indexOf(st)===-1&&k.push(st)}),k},intersectRect:function(W,H,J,Q,k,et){k===void 0&&(k=!1),et=this.getMatterBodies(et);var st={min:{x:W,y:H},max:{x:W+J,y:H+Q}},rt=[],ot=V.region(et,st,k);return ot.forEach(function(ft){rt.indexOf(ft)===-1&&rt.push(ft)}),rt},intersectRay:function(W,H,J,Q,k,et){k===void 0&&(k=1),et=this.getMatterBodies(et);for(var st=[],rt=V.ray(et,X.create(W,H),X.create(J,Q),k),ot=0;ot{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(9674),c=t(83419),o=t(31884),r=t(95643),n=t(95540),e=t(72699),i=t(68287),h=t(26099),s=new c({Extends:i,Mixins:[o.Bounce,o.Collision,o.Force,o.Friction,o.Gravity,o.Mass,o.Sensor,o.SetBody,o.Sleep,o.Static,o.Transform,o.Velocity,e],initialize:function(f,u,d,p,g,y){r.call(this,f.scene,"Sprite"),this._crop=this.resetCropObject(),this.anims=new a(this),this.setTexture(p,g),this.setSizeToFrame(),this.setOrigin(),this.world=f,this._tempVec2=new h(u,d);var x=n(y,"shape",null);x?this.setBody(x,y):this.setRectangle(this.width,this.height,y),this.setPosition(u,d),this.initPipeline(),this.initPostPipeline(!0)}});v.exports=s},73834:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(66280),c=t(22562),o=t(83419),r=t(31884),n=t(62644),e=t(50792),i=t(95540),h=t(97022),s=t(41598),l=new o({Extends:e,Mixins:[r.Bounce,r.Collision,r.Friction,r.Gravity,r.Mass,r.Sensor,r.Sleep,r.Static],initialize:function(u,d,p){e.call(this),this.tile=d,this.world=u,d.physics.matterBody&&d.physics.matterBody.destroy(),d.physics.matterBody=this;var g=i(p,"body",null),y=i(p,"addToWorld",!0);if(g)this.setBody(g,y);else{var x=d.getCollisionGroup(),T=i(x,"objects",[]);T.length>0?this.setFromTileCollision(p):this.setFromTileRectangle(p)}if(d.flipX||d.flipY){var S={x:d.getCenterX(),y:d.getCenterY()},M=d.flipX?-1:1,w=d.flipY?-1:1;c.scale(g,M,w,S)}},setFromTileRectangle:function(f){f===void 0&&(f={}),h(f,"isStatic")||(f.isStatic=!0),h(f,"addToWorld")||(f.addToWorld=!0);var u=this.tile.getBounds(),d=u.x+u.width/2,p=u.y+u.height/2,g=a.rectangle(d,p,u.width,u.height,f);return this.setBody(g,f.addToWorld),this},setFromTileCollision:function(f){f===void 0&&(f={}),h(f,"isStatic")||(f.isStatic=!0),h(f,"addToWorld")||(f.addToWorld=!0);for(var u=this.tile.tilemapLayer.scaleX,d=this.tile.tilemapLayer.scaleY,p=this.tile.getLeft(),g=this.tile.getTop(),y=this.tile.getCollisionGroup(),x=i(y,"objects",[]),T=[],S=0;S1){var j=n(f);j.parts=T,this.setBody(c.create(j),j.addToWorld)}return this},setBody:function(f,u){return u===void 0&&(u=!0),this.body&&this.removeBody(),this.body=f,this.body.gameObject=this,u&&this.world.add(this.body),this},removeBody:function(){return this.body&&(this.world.remove(this.body),this.body.gameObject=void 0,this.body=void 0),this},destroy:function(){this.removeBody(),this.tile.physics.matterBody=void 0,this.removeAllListeners()}});v.exports=l},19496:(v,m,t)=>{/** + * @author Joachim Grill + * @author Richard Davey + * @copyright 2018 CodeAndWeb GmbH + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(66280),c=t(22562),o=t(53402),r=t(95540),n=t(41598),e={parseBody:function(i,h,s,l){l===void 0&&(l={});for(var f=r(s,"fixtures",[]),u=[],d=0;d{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(66280),c=t(22562),o={parseBody:function(r,n,e,i){i===void 0&&(i={});var h,s=e.vertices;if(s.length===1)i.vertices=s[0],h=c.create(i),a.flagCoincidentParts(h.parts);else{for(var l=[],f=0;f{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(15647),c=t(83419),o=t(69351),r=t(48140),n=t(81388),e=t(1121),i=t(8214),h=t(46975),s=t(53614),l=t(26099),f=t(41598),u=new c({initialize:function(p,g,y){y===void 0&&(y={});var x={label:"Pointer Constraint",pointA:{x:0,y:0},pointB:{x:0,y:0},length:.01,stiffness:.1,angularStiffness:1,collisionFilter:{category:1,mask:4294967295,group:0}};this.scene=p,this.world=g,this.camera=null,this.pointer=null,this.active=!0,this.position=new l,this.body=null,this.part=null,this.constraint=r.create(h(y,x)),this.world.on(e.BEFORE_UPDATE,this.update,this),p.sys.input.on(i.POINTER_DOWN,this.onDown,this),p.sys.input.on(i.POINTER_UP,this.onUp,this)},onDown:function(d){this.pointer||(this.pointer=d,this.camera=d.camera)},onUp:function(d){d===this.pointer&&(this.pointer=null)},getBody:function(d){var p=this.position,g=this.constraint;this.camera.getWorldPoint(d.x,d.y,p);for(var y=o.allBodies(this.world.localWorld),x=0;x1?1:0,T=x;T{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(66280),c=t(22562),o=t(83419),r=t(53402),n=t(69351),e=t(48413),i=t(50792),h=t(1121),s=t(95540),l=t(35154),f=t(22562),u=t(35810),d=t(73834),p=t(4372),g=t(31725),y=new o({Extends:i,initialize:function(T,S){i.call(this),this.scene=T,this.engine=e.create(S),this.localWorld=this.engine.world;var M=l(S,"gravity",null);M?this.setGravity(M.x,M.y,M.scale):M===!1&&this.setGravity(0,0,0),this.walls={left:null,right:null,top:null,bottom:null},this.enabled=l(S,"enabled",!0),this.getDelta=l(S,"getDelta",this.update60Hz);var w=s(S,"runner",{}),L=s(w,"fps",!1),F=s(w,"fps",60),O=s(w,"delta",1e3/F),b=s(w,"deltaMin",1e3/F),N=s(w,"deltaMax",1e3/(F*.5));L||(F=1e3/O),this.runner={fps:F,deltaSampleSize:s(w,"deltaSampleSize",60),counterTimestamp:0,frameCounter:0,deltaHistory:[],timePrev:null,timeScalePrev:1,frameRequestId:null,isFixed:s(w,"isFixed",!1),delta:O,deltaMin:b,deltaMax:N},this.autoUpdate=l(S,"autoUpdate",!0);var V=l(S,"debug",!1);if(this.drawDebug=typeof V=="object"?!0:V,this.debugGraphic,this.debugConfig={showAxes:s(V,"showAxes",!1),showAngleIndicator:s(V,"showAngleIndicator",!1),angleColor:s(V,"angleColor",15208787),showBroadphase:s(V,"showBroadphase",!1),broadphaseColor:s(V,"broadphaseColor",16757760),showBounds:s(V,"showBounds",!1),boundsColor:s(V,"boundsColor",16777215),showVelocity:s(V,"showVelocity",!1),velocityColor:s(V,"velocityColor",44783),showCollisions:s(V,"showCollisions",!1),collisionColor:s(V,"collisionColor",16094476),showSeparations:s(V,"showSeparations",!1),separationColor:s(V,"separationColor",16753920),showBody:s(V,"showBody",!0),showStaticBody:s(V,"showStaticBody",!0),showInternalEdges:s(V,"showInternalEdges",!1),renderFill:s(V,"renderFill",!1),renderLine:s(V,"renderLine",!0),fillColor:s(V,"fillColor",1075465),fillOpacity:s(V,"fillOpacity",1),lineColor:s(V,"lineColor",2678297),lineOpacity:s(V,"lineOpacity",1),lineThickness:s(V,"lineThickness",1),staticFillColor:s(V,"staticFillColor",857979),staticLineColor:s(V,"staticLineColor",1255396),showSleeping:s(V,"showSleeping",!1),staticBodySleepOpacity:s(V,"staticBodySleepOpacity",.7),sleepFillColor:s(V,"sleepFillColor",4605510),sleepLineColor:s(V,"sleepLineColor",10066585),showSensors:s(V,"showSensors",!0),sensorFillColor:s(V,"sensorFillColor",857979),sensorLineColor:s(V,"sensorLineColor",1255396),showPositions:s(V,"showPositions",!0),positionSize:s(V,"positionSize",4),positionColor:s(V,"positionColor",14697178),showJoint:s(V,"showJoint",!0),jointColor:s(V,"jointColor",14737474),jointLineOpacity:s(V,"jointLineOpacity",1),jointLineThickness:s(V,"jointLineThickness",2),pinSize:s(V,"pinSize",4),pinColor:s(V,"pinColor",4382944),springColor:s(V,"springColor",14697184),anchorColor:s(V,"anchorColor",15724527),anchorSize:s(V,"anchorSize",4),showConvexHulls:s(V,"showConvexHulls",!1),hullColor:s(V,"hullColor",14091216)},this.drawDebug&&this.createDebugGraphic(),this.setEventsProxy(),s(S,"setBounds",!1)){var K=S.setBounds;if(typeof K=="boolean")this.setBounds();else{var $=s(K,"x",0),j=s(K,"y",0),X=s(K,"width",T.sys.scale.width),Y=s(K,"height",T.sys.scale.height),D=s(K,"thickness",64),z=s(K,"left",!0),W=s(K,"right",!0),H=s(K,"top",!0),J=s(K,"bottom",!0);this.setBounds($,j,X,Y,D,z,W,H,J)}}},setCompositeRenderStyle:function(x){var T=x.bodies,S=x.constraints,M=x.composites,w,L,F;for(w=0;w0&&(L=w[0].bodyA,F=w[0].bodyB),x.emit(h.COLLISION_START,M,L,F)}),u.on(T,"collisionActive",function(M){var w=M.pairs,L,F;w.length>0&&(L=w[0].bodyA,F=w[0].bodyB),x.emit(h.COLLISION_ACTIVE,M,L,F)}),u.on(T,"collisionEnd",function(M){var w=M.pairs,L,F;w.length>0&&(L=w[0].bodyA,F=w[0].bodyB),x.emit(h.COLLISION_END,M,L,F)})},setBounds:function(x,T,S,M,w,L,F,O,b){return x===void 0&&(x=0),T===void 0&&(T=0),S===void 0&&(S=this.scene.sys.scale.width),M===void 0&&(M=this.scene.sys.scale.height),w===void 0&&(w=64),L===void 0&&(L=!0),F===void 0&&(F=!0),O===void 0&&(O=!0),b===void 0&&(b=!0),this.updateWall(L,"left",x-w,T-w,w,M+w*2),this.updateWall(F,"right",x+S,T-w,w,M+w*2),this.updateWall(O,"top",x,T-w,S,w),this.updateWall(b,"bottom",x,T+M,S,w),this},updateWall:function(x,T,S,M,w,L){var F=this.walls[T];x?(F&&p.remove(this.localWorld,F),S+=w/2,M+=L/2,this.walls[T]=this.create(S,M,w,L,{isStatic:!0,friction:0,frictionStatic:0})):(F&&p.remove(this.localWorld,F),this.walls[T]=null)},createDebugGraphic:function(){var x=this.scene.sys.add.graphics({x:0,y:0});return x.setDepth(Number.MAX_VALUE),this.debugGraphic=x,this.drawDebug=!0,x},disableGravity:function(){return this.localWorld.gravity.x=0,this.localWorld.gravity.y=0,this.localWorld.gravity.scale=0,this},setGravity:function(x,T,S){return x===void 0&&(x=0),T===void 0&&(T=1),S===void 0&&(S=.001),this.localWorld.gravity.x=x,this.localWorld.gravity.y=T,this.localWorld.gravity.scale=S,this},create:function(x,T,S,M,w){var L=a.rectangle(x,T,S,M,w);return p.add(this.localWorld,L),L},add:function(x){return p.add(this.localWorld,x),this},remove:function(x,T){Array.isArray(x)||(x=[x]);for(var S=0;SM.deltaMax?M.deltaMax:T,M.delta=T),M.timeScalePrev=w.timeScale,M.frameCounter+=1,x-M.counterTimestamp>=1e3&&(M.fps=M.frameCounter*((x-M.counterTimestamp)/1e3),M.counterTimestamp=x,M.frameCounter=0),e.update(S,T)}},step:function(x){e.update(this.engine,x)},update60Hz:function(){return 1e3/60},update30Hz:function(){return 1e3/30},has:function(x){var T=x.hasOwnProperty("body")?x.body:x;return n.get(this.localWorld,T.id,T.type)!==null},getAllBodies:function(){return n.allBodies(this.localWorld)},getAllConstraints:function(){return n.allConstraints(this.localWorld)},getAllComposites:function(){return n.allComposites(this.localWorld)},postUpdate:function(){if(this.drawDebug){var x=this.debugConfig,T=this.engine,S=this.debugGraphic,M=n.allBodies(this.localWorld);this.debugGraphic.clear(),x.showBroadphase&&T.broadphase.controller&&this.renderGrid(T.broadphase,S,x.broadphaseColor,.5),x.showBounds&&this.renderBodyBounds(M,S,x.boundsColor,.5),(x.showBody||x.showStaticBody)&&this.renderBodies(M),x.showJoint&&this.renderJoints(),(x.showAxes||x.showAngleIndicator)&&this.renderBodyAxes(M,S,x.showAxes,x.angleColor,.5),x.showVelocity&&this.renderBodyVelocity(M,S,x.velocityColor,1,2),x.showSeparations&&this.renderSeparations(T.pairs.list,S,x.separationColor),x.showCollisions&&this.renderCollisions(T.pairs.list,S,x.collisionColor)}},renderGrid:function(x,T,S,M){T.lineStyle(1,S,M);for(var w=r.keys(x.buckets),L=0;L0){var V=N[0].vertex.x,K=N[0].vertex.y;N.length===2&&(V=(N[0].vertex.x+N[1].vertex.x)/2,K=(N[0].vertex.y+N[1].vertex.y)/2),b.bodyB===b.supports[0].body||b.bodyA.isStatic?T.lineBetween(V-b.normal.x*8,K-b.normal.y*8,V,K):T.lineBetween(V+b.normal.x*8,K+b.normal.y*8,V,K)}}return this},renderBodyBounds:function(x,T,S,M){T.lineStyle(1,S,M);for(var w=0;w1?1:0;b1?1:0;N1?1:0;N1&&this.renderConvexHull(Y,T,j,W)}}},renderBody:function(x,T,S,M,w,L,F,O){M===void 0&&(M=null),w===void 0&&(w=null),L===void 0&&(L=1),F===void 0&&(F=null),O===void 0&&(O=null);for(var b=this.debugConfig,N=b.sensorFillColor,V=b.sensorLineColor,K=x.parts,$=K.length,j=$>1?1:0;j<$;j++){var X=K[j],Y=X.render,D=Y.opacity;if(!(!Y.visible||D===0||X.isSensor&&!b.showSensors)){var z=X.circleRadius;if(T.beginPath(),X.isSensor?(F!==null&&T.fillStyle(N,O*D),M!==null&&T.lineStyle(L,V,w*D)):(F!==null&&T.fillStyle(F,O*D),M!==null&&T.lineStyle(L,M,w*D)),z)T.arc(X.position.x,X.position.y,z,0,2*Math.PI);else{var W=X.vertices,H=W.length;T.moveTo(W[0].x,W[0].y);for(var J=1;J1){var F=x.vertices;T.lineStyle(M,S),T.beginPath(),T.moveTo(F[0].x,F[0].y);for(var O=1;O0&&(T.fillStyle(F),T.fillCircle(K.x,K.y,O),T.fillCircle($.x,$.y,O)),this},resetCollisionIDs:function(){return c._nextCollidingGroupId=1,c._nextNonCollidingGroupId=-1,c._nextCategory=1,this},shutdown:function(){u.off(this.engine),this.removeAllListeners(),p.clear(this.localWorld,!1),e.clear(this.engine),this.drawDebug&&this.debugGraphic.destroy()},destroy:function(){this.shutdown()}});v.exports=y},70410:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m={setBounce:function(t){return this.body.restitution=t,this}};v.exports=m},66968:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m={setCollisionCategory:function(t){return this.body.collisionFilter.category=t,this},setCollisionGroup:function(t){return this.body.collisionFilter.group=t,this},setCollidesWith:function(t){var a=0;if(!Array.isArray(t))a=t;else for(var c=0;c{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(22562),c={applyForce:function(o){return this._tempVec2.set(this.body.position.x,this.body.position.y),a.applyForce(this.body,this._tempVec2,o),this},applyForceFrom:function(o,r){return a.applyForce(this.body,o,r),this},thrust:function(o){var r=this.body.angle;return this._tempVec2.set(o*Math.cos(r),o*Math.sin(r)),a.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustLeft:function(o){var r=this.body.angle-Math.PI/2;return this._tempVec2.set(o*Math.cos(r),o*Math.sin(r)),a.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustRight:function(o){var r=this.body.angle+Math.PI/2;return this._tempVec2.set(o*Math.cos(r),o*Math.sin(r)),a.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustBack:function(o){var r=this.body.angle-Math.PI;return this._tempVec2.set(o*Math.cos(r),o*Math.sin(r)),a.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this}};v.exports=c},5436:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m={setFriction:function(t,a,c){return this.body.friction=t,a!==void 0&&(this.body.frictionAir=a),c!==void 0&&(this.body.frictionStatic=c),this},setFrictionAir:function(t){return this.body.frictionAir=t,this},setFrictionStatic:function(t){return this.body.frictionStatic=t,this}};v.exports=m},39858:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m={setIgnoreGravity:function(t){return this.body.ignoreGravity=t,this}};v.exports=m},37302:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(22562),c=t(26099),o={setMass:function(r){return a.setMass(this.body,r),this},setDensity:function(r){return a.setDensity(this.body,r),this},centerOfMass:{get:function(){return new c(this.body.centerOfMass.x,this.body.centerOfMass.y)}}};v.exports=o},39132:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m={setSensor:function(t){return this.body.isSensor=t,this},isSensor:function(){return this.body.isSensor}};v.exports=m},57772:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(66280),c=t(22562),o=t(43855),r=t(95540),n=t(19496),e=t(85791),i=t(41598),h={setRectangle:function(s,l,f){return this.setBody({type:"rectangle",width:s,height:l},f)},setCircle:function(s,l){return this.setBody({type:"circle",radius:s},l)},setPolygon:function(s,l,f){return this.setBody({type:"polygon",sides:l,radius:s},f)},setTrapezoid:function(s,l,f,u){return this.setBody({type:"trapezoid",width:s,height:l,slope:f},u)},setExistingBody:function(s,l){l===void 0&&(l=!0),this.body&&this.world.remove(this.body,!0),this.body=s;for(var f=0;f{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(1121),c=t(53614),o=t(35810),r={setToSleep:function(){return c.set(this.body,!0),this},setAwake:function(){return c.set(this.body,!1),this},setSleepThreshold:function(n){return n===void 0&&(n=60),this.body.sleepThreshold=n,this},setSleepEvents:function(n,e){return this.setSleepStartEvent(n),this.setSleepEndEvent(e),this},setSleepStartEvent:function(n){if(n){var e=this.world;o.on(this.body,"sleepStart",function(i){e.emit(a.SLEEP_START,i,this)})}else o.off(this.body,"sleepStart");return this},setSleepEndEvent:function(n){if(n){var e=this.world;o.on(this.body,"sleepEnd",function(i){e.emit(a.SLEEP_END,i,this)})}else o.off(this.body,"sleepEnd");return this}};v.exports=r},90556:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(22562),c={setStatic:function(o){return a.setStatic(this.body,o),this},isStatic:function(){return this.body.isStatic}};v.exports=c},85436:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(22562),c=t(36383),o=t(86554),r=t(30954),n=4,e={x:{get:function(){return this.body.position.x},set:function(i){this._tempVec2.set(i,this.y),a.setPosition(this.body,this._tempVec2)}},y:{get:function(){return this.body.position.y},set:function(i){this._tempVec2.set(this.x,i),a.setPosition(this.body,this._tempVec2)}},scaleX:{get:function(){return this._scaleX},set:function(i){var h=1/this._scaleX,s=1/this._scaleY;this._scaleX=i,this._scaleX===0?this.renderFlags&=~n:this.renderFlags|=n,a.scale(this.body,h,s),a.scale(this.body,i,this._scaleY)}},scaleY:{get:function(){return this._scaleY},set:function(i){var h=1/this._scaleX,s=1/this._scaleY;this._scaleY=i,this._scaleY===0?this.renderFlags&=~n:this.renderFlags|=n,a.scale(this.body,h,s),a.scale(this.body,this._scaleX,i)}},angle:{get:function(){return r(this.body.angle*c.RAD_TO_DEG)},set:function(i){this.rotation=r(i)*c.DEG_TO_RAD}},rotation:{get:function(){return this.body.angle},set:function(i){this._rotation=o(i),a.setAngle(this.body,this._rotation)}},setPosition:function(i,h){return i===void 0&&(i=0),h===void 0&&(h=i),this._tempVec2.set(i,h),a.setPosition(this.body,this._tempVec2),this},setRotation:function(i){return i===void 0&&(i=0),this._rotation=o(i),a.setAngle(this.body,i),this},setFixedRotation:function(){return a.setInertia(this.body,1/0),this},setAngle:function(i){return i===void 0&&(i=0),this.angle=i,a.setAngle(this.body,this.rotation),this},setScale:function(i,h,s){i===void 0&&(i=1),h===void 0&&(h=i);var l=1/this._scaleX,f=1/this._scaleY;return this._scaleX=i,this._scaleY=h,a.scale(this.body,l,f,s),a.scale(this.body,i,h,s),this}};v.exports=e},42081:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(22562),c={setVelocityX:function(o){return this._tempVec2.set(o,this.body.velocity.y),a.setVelocity(this.body,this._tempVec2),this},setVelocityY:function(o){return this._tempVec2.set(this.body.velocity.x,o),a.setVelocity(this.body,this._tempVec2),this},setVelocity:function(o,r){return this._tempVec2.set(o,r),a.setVelocity(this.body,this._tempVec2),this},getVelocity:function(){return a.getVelocity(this.body)},setAngularVelocity:function(o){return a.setAngularVelocity(this.body,o),this},getAngularVelocity:function(){return a.getAngularVelocity(this.body)},setAngularSpeed:function(o){return a.setAngularSpeed(this.body,o),this},getAngularSpeed:function(){return a.getAngularSpeed(this.body)}};v.exports=c},31884:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.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:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="afteradd"},1213:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="afterremove"},25968:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="afterupdate"},67205:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="beforeadd"},39438:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="beforeremove"},44823:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="beforeupdate"},92593:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="collisionactive"},60128:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="collisionend"},76861:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="collisionstart"},92362:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="dragend"},76408:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="drag"},93971:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="dragstart"},5656:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="pause"},47861:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="resume"},79099:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="sleepend"},35906:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="sleepstart"},1121:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.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:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.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:(v,m,t)=>{var a={};v.exports=a;var c=t(41598),o=t(31725),r=t(53614),n=t(53402),e=t(15647),i=t(66615);(function(){a._timeCorrection=!0,a._inertiaScale=4,a._nextCollidingGroupId=1,a._nextNonCollidingGroupId=-1,a._nextCategory=1,a._baseDelta=16.666666666666668,a.create=function(s){var l={id:n.nextId(),type:"body",label:"Body",parts:[],plugin:{},angle:0,vertices:null,position:{x:0,y:0},force:{x:0,y:0},torque:0,positionImpulse:{x:0,y:0},constraintImpulse:{x:0,y:0,angle:0},totalContacts:0,speed:0,angularSpeed:0,velocity:{x:0,y:0},angularVelocity:0,isSensor:!1,isStatic:!1,isSleeping:!1,motion:0,sleepThreshold:60,density:.001,restitution:0,friction:.1,frictionStatic:.5,frictionAir:.01,collisionFilter:{category:1,mask:4294967295,group:0},slop:.05,timeScale:1,events:null,bounds:null,chamfer:null,circleRadius:0,positionPrev:null,anglePrev:0,parent:null,axes:null,area:0,mass:0,inverseMass:0,inertia:0,deltaTime:16.666666666666668,inverseInertia:0,_original:null,render:{visible:!0,opacity:1,sprite:{xOffset:0,yOffset:0},fillColor:null,fillOpacity:null,lineColor:null,lineOpacity:null,lineThickness:null},gameObject:null,scale:{x:1,y:1},centerOfMass:{x:0,y:0},centerOffset:{x:0,y:0},gravityScale:{x:1,y:1},ignoreGravity:!1,ignorePointer:!1,onCollideCallback:null,onCollideEndCallback:null,onCollideActiveCallback:null,onCollideWith:{}};!s.hasOwnProperty("position")&&s.hasOwnProperty("vertices")?s.position=c.centre(s.vertices):s.hasOwnProperty("vertices")||(l.vertices=c.fromPath("L 0 0 L 40 0 L 40 40 L 0 40"));var f=n.extend(l,s);return h(f,s),f.setOnCollideWith=function(u,d){return d?this.onCollideWith[u.id]=d:delete this.onCollideWith[u.id],this},f},a.nextGroup=function(s){return s?a._nextNonCollidingGroupId--:a._nextCollidingGroupId++},a.nextCategory=function(){return a._nextCategory=a._nextCategory<<1,a._nextCategory};var h=function(s,l){if(l=l||{},a.set(s,{bounds:s.bounds||e.create(s.vertices),positionPrev:s.positionPrev||o.clone(s.position),anglePrev:s.anglePrev||s.angle,vertices:s.vertices,parts:s.parts||[s],isStatic:s.isStatic,isSleeping:s.isSleeping,parent:s.parent||s}),c.rotate(s.vertices,s.angle,s.position),i.rotate(s.axes,s.angle),e.update(s.bounds,s.vertices,s.velocity),a.set(s,{axes:l.axes||s.axes,area:l.area||s.area,mass:l.mass||s.mass,inertia:l.inertia||s.inertia}),s.parts.length===1){var f=s.bounds,u=s.centerOfMass,d=s.centerOffset,p=f.max.x-f.min.x,g=f.max.y-f.min.y;u.x=-(f.min.x-s.position.x)/p,u.y=-(f.min.y-s.position.y)/g,d.x=p*u.x,d.y=g*u.y}};a.set=function(s,l,f){var u;typeof l=="string"&&(u=l,l={},l[u]=f);for(u in l)if(Object.prototype.hasOwnProperty.call(l,u))switch(f=l[u],u){case"isStatic":a.setStatic(s,f);break;case"isSleeping":r.set(s,f);break;case"mass":a.setMass(s,f);break;case"density":a.setDensity(s,f);break;case"inertia":a.setInertia(s,f);break;case"vertices":a.setVertices(s,f);break;case"position":a.setPosition(s,f);break;case"angle":a.setAngle(s,f);break;case"velocity":a.setVelocity(s,f);break;case"angularVelocity":a.setAngularVelocity(s,f);break;case"speed":a.setSpeed(s,f);break;case"angularSpeed":a.setAngularSpeed(s,f);break;case"parts":a.setParts(s,f);break;case"centre":a.setCentre(s,f);break;default:s[u]=f}},a.setStatic=function(s,l){for(var f=0;f0&&o.rotateAbout(p.position,u,s.position,p.position)}},a.setVelocity=function(s,l){var f=s.deltaTime/a._baseDelta;s.positionPrev.x=s.position.x-l.x*f,s.positionPrev.y=s.position.y-l.y*f,s.velocity.x=(s.position.x-s.positionPrev.x)/f,s.velocity.y=(s.position.y-s.positionPrev.y)/f,s.speed=o.magnitude(s.velocity)},a.getVelocity=function(s){var l=a._baseDelta/s.deltaTime;return{x:(s.position.x-s.positionPrev.x)*l,y:(s.position.y-s.positionPrev.y)*l}},a.getSpeed=function(s){return o.magnitude(a.getVelocity(s))},a.setSpeed=function(s,l){a.setVelocity(s,o.mult(o.normalise(a.getVelocity(s)),l))},a.setAngularVelocity=function(s,l){var f=s.deltaTime/a._baseDelta;s.anglePrev=s.angle-l*f,s.angularVelocity=(s.angle-s.anglePrev)/f,s.angularSpeed=Math.abs(s.angularVelocity)},a.getAngularVelocity=function(s){return(s.angle-s.anglePrev)*a._baseDelta/s.deltaTime},a.getAngularSpeed=function(s){return Math.abs(a.getAngularVelocity(s))},a.setAngularSpeed=function(s,l){a.setAngularVelocity(s,n.sign(a.getAngularVelocity(s))*l)},a.translate=function(s,l,f){a.setPosition(s,o.add(s.position,l),f)},a.rotate=function(s,l,f,u){if(!f)a.setAngle(s,s.angle+l,u);else{var d=Math.cos(l),p=Math.sin(l),g=s.position.x-f.x,y=s.position.y-f.y;a.setPosition(s,{x:f.x+(g*d-y*p),y:f.y+(g*p+y*d)},u),a.setAngle(s,s.angle+l,u)}},a.scale=function(s,l,f,u){var d=0,p=0;u=u||s.position;for(var g=s.inertia===1/0,y=0;y0&&(d+=x.area,p+=x.inertia),x.position.x=u.x+(x.position.x-u.x)*l,x.position.y=u.y+(x.position.y-u.y)*f,e.update(x.bounds,x.vertices,s.velocity)}s.parts.length>1&&(s.area=d,s.isStatic||(a.setMass(s,s.density*d),a.setInertia(s,p))),s.circleRadius&&(l===f?s.circleRadius*=l:s.circleRadius=null),g&&a.setInertia(s,1/0)},a.update=function(s,l){l=(typeof l<"u"?l:16.666666666666668)*s.timeScale;var f=l*l,u=a._timeCorrection?l/(s.deltaTime||l):1,d=1-s.frictionAir*(l/n._baseDelta),p=(s.position.x-s.positionPrev.x)*u,g=(s.position.y-s.positionPrev.y)*u;s.velocity.x=p*d+s.force.x/s.mass*f,s.velocity.y=g*d+s.force.y/s.mass*f,s.positionPrev.x=s.position.x,s.positionPrev.y=s.position.y,s.position.x+=s.velocity.x,s.position.y+=s.velocity.y,s.deltaTime=l,s.angularVelocity=(s.angle-s.anglePrev)*d*u+s.torque/s.inertia*f,s.anglePrev=s.angle,s.angle+=s.angularVelocity,s.speed=o.magnitude(s.velocity),s.angularSpeed=Math.abs(s.angularVelocity);for(var y=0;y0&&(x.position.x+=s.velocity.x,x.position.y+=s.velocity.y),s.angularVelocity!==0&&(c.rotate(x.vertices,s.angularVelocity,s.position),i.rotate(x.axes,s.angularVelocity),y>0&&o.rotateAbout(x.position,s.angularVelocity,s.position,x.position)),e.update(x.bounds,x.vertices,s.velocity)}},a.updateVelocities=function(s){var l=a._baseDelta/s.deltaTime,f=s.velocity;f.x=(s.position.x-s.positionPrev.x)*l,f.y=(s.position.y-s.positionPrev.y)*l,s.speed=Math.sqrt(f.x*f.x+f.y*f.y),s.angularVelocity=(s.angle-s.anglePrev)*l,s.angularSpeed=Math.abs(s.angularVelocity)},a.applyForce=function(s,l,f){var u={x:l.x-s.position.x,y:l.y-s.position.y};s.force.x+=f.x,s.force.y+=f.y,s.torque+=u.x*f.y-u.y*f.x},a._totalProperties=function(s){for(var l={mass:0,area:0,inertia:0,centre:{x:0,y:0}},f=s.parts.length===1?0:1;f{var a={};v.exports=a;var c=t(35810),o=t(53402),r=t(15647),n=t(22562);(function(){a.create=function(e){return o.extend({id:o.nextId(),type:"composite",parent:null,isModified:!1,bodies:[],constraints:[],composites:[],label:"Composite",plugin:{},cache:{allBodies:null,allConstraints:null,allComposites:null}},e)},a.setModified=function(e,i,h,s){if(c.trigger(e,"compositeModified",e),e.isModified=i,i&&e.cache&&(e.cache.allBodies=null,e.cache.allConstraints=null,e.cache.allComposites=null),h&&e.parent&&a.setModified(e.parent,i,h,s),s)for(var l=0;l{var a={};v.exports=a;var c=t(69351);(function(){a.create=c.create,a.add=c.add,a.remove=c.remove,a.clear=c.clear,a.addComposite=c.addComposite,a.addBody=c.addBody,a.addConstraint=c.addConstraint})()},52284:(v,m,t)=>{var a={};v.exports=a;var c=t(41598),o=t(4506);(function(){var r=[],n={overlap:0,axis:null},e={overlap:0,axis:null};a.create=function(i,h){return{pair:null,collided:!1,bodyA:i,bodyB:h,parentA:i.parent,parentB:h.parent,depth:0,normal:{x:0,y:0},tangent:{x:0,y:0},penetration:{x:0,y:0},supports:[]}},a.collides=function(i,h,s){if(a._overlapAxes(n,i.vertices,h.vertices,i.axes),n.overlap<=0||(a._overlapAxes(e,h.vertices,i.vertices,h.axes),e.overlap<=0))return null;var l=s&&s.table[o.id(i,h)],f;l?f=l.collision:(f=a.create(i,h),f.collided=!0,f.bodyA=i.idX?X=F:F<$&&($=F);for(b=1;bY?Y=F:Ff?f=d:d{var m={};v.exports=m,function(){m.create=function(t){return{vertex:t,normalImpulse:0,tangentImpulse:0}}}()},81388:(v,m,t)=>{var a={};v.exports=a;var c=t(53402),o=t(52284);(function(){a.create=function(r){var n={bodies:[],pairs:null};return c.extend(n,r)},a.setBodies=function(r,n){r.bodies=n.slice(0)},a.clear=function(r){r.bodies=[]},a.collisions=function(r){var n=[],e=r.pairs,i=r.bodies,h=i.length,s=a.canCollide,l=o.collides,f,u;for(i.sort(a._compareBoundsX),f=0;fg)break;if(!(yL.max.y)&&!(T&&(w.isStatic||w.isSleeping))&&s(d.collisionFilter,w.collisionFilter)){var F=w.parts.length;if(M&&F===1){var O=l(d,w,e);O&&n.push(O)}else for(var b=S>1?1:0,N=F>1?1:0,V=b;VL.max.x||p.max.xL.max.y)){var O=l(K,j,e);O&&n.push(O)}}}}}return n},a.canCollide=function(r,n){return r.group===n.group&&r.group!==0?r.group>0:(r.mask&n.category)!==0&&(n.mask&r.category)!==0},a._compareBoundsX=function(r,n){return r.bounds.min.x-n.bounds.min.x}})()},4506:(v,m,t)=>{var a={};v.exports=a;var c=t(43424);(function(){a.create=function(o,r){var n=o.bodyA,e=o.bodyB,i={id:a.id(n,e),bodyA:n,bodyB:e,collision:o,contacts:[],activeContacts:[],separation:0,isActive:!0,confirmedActive:!0,isSensor:n.isSensor||e.isSensor,timeCreated:r,timeUpdated:r,inverseMass:0,friction:0,frictionStatic:0,restitution:0,slop:0};return a.update(i,o,r),i},a.update=function(o,r,n){var e=o.contacts,i=r.supports,h=o.activeContacts,s=r.parentA,l=r.parentB,f=s.vertices.length;o.isActive=!0,o.timeUpdated=n,o.collision=r,o.separation=r.depth,o.inverseMass=s.inverseMass+l.inverseMass,o.friction=s.frictionl.frictionStatic?s.frictionStatic:l.frictionStatic,o.restitution=s.restitution>l.restitution?s.restitution:l.restitution,o.slop=s.slop>l.slop?s.slop:l.slop,r.pair=o,h.length=0;for(var u=0;u{var a={};v.exports=a;var c=t(4506),o=t(53402);(function(){a.create=function(r){return o.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},r)},a.update=function(r,n,e){var i=r.list,h=i.length,s=r.table,l=n.length,f=r.collisionStart,u=r.collisionEnd,d=r.collisionActive,p,g,y,x;for(f.length=0,u.length=0,d.length=0,x=0;x{var a={};v.exports=a;var c=t(31725),o=t(52284),r=t(15647),n=t(66280),e=t(41598);(function(){a.collides=function(i,h){for(var s=[],l=h.length,f=i.bounds,u=o.collides,d=r.overlaps,p=0;p{var a={};v.exports=a;var c=t(41598),o=t(53402),r=t(15647);(function(){a._restingThresh=2,a._restingThreshTangent=Math.sqrt(6),a._positionDampen=.9,a._positionWarming=.8,a._frictionNormalMultiplier=5,a._frictionMaxStatic=Number.MAX_VALUE,a.preSolvePosition=function(n){var e,i,h,s=n.length;for(e=0;evt?(y=Et>0?Et:-Et,g=S.friction*(Et>0?1:-1)*s,g<-y?g=-y:g>y&&(g=y)):(g=Et,y=d);var Tt=H*N-J*b,pt=Q*N-k*b,At=X/(Y+w.inverseInertia*Tt*Tt+L.inverseInertia*pt*pt),Dt=(1+S.restitution)*ct*At;if(g*=At,ct0&&(z.normalImpulse=0),Dt=z.normalImpulse-Ht}if(Et<-f||Et>f)z.tangentImpulse=0;else{var Gt=z.tangentImpulse;z.tangentImpulse+=g,z.tangentImpulse<-y&&(z.tangentImpulse=-y),z.tangentImpulse>y&&(z.tangentImpulse=y),g=z.tangentImpulse-Gt}var Vt=b*Dt+V*g,It=N*Dt+K*g;w.isStatic||w.isSleeping||(w.positionPrev.x+=Vt*w.inverseMass,w.positionPrev.y+=It*w.inverseMass,w.anglePrev+=(H*It-J*Vt)*w.inverseInertia),L.isStatic||L.isSleeping||(L.positionPrev.x-=Vt*L.inverseMass,L.positionPrev.y-=It*L.inverseMass,L.anglePrev-=(Q*It-k*Vt)*L.inverseInertia)}}}}})()},48140:(v,m,t)=>{var a={};v.exports=a;var c=t(41598),o=t(31725),r=t(53614),n=t(15647),e=t(66615),i=t(53402);(function(){a._warming=.4,a._torqueDampen=1,a._minLength=1e-6,a.create=function(h){var s=h;s.bodyA&&!s.pointA&&(s.pointA={x:0,y:0}),s.bodyB&&!s.pointB&&(s.pointB={x:0,y:0});var l=s.bodyA?o.add(s.bodyA.position,s.pointA):s.pointA,f=s.bodyB?o.add(s.bodyB.position,s.pointB):s.pointB,u=o.magnitude(o.sub(l,f));s.length=typeof s.length<"u"?s.length:u,s.id=s.id||i.nextId(),s.label=s.label||"Constraint",s.type="constraint",s.stiffness=s.stiffness||(s.length>0?1:.7),s.damping=s.damping||0,s.angularStiffness=s.angularStiffness||0,s.angleA=s.bodyA?s.bodyA.angle:s.angleA,s.angleB=s.bodyB?s.bodyB.angle:s.angleB,s.plugin={};var d={visible:!0,type:"line",anchors:!0,lineColor:null,lineOpacity:null,lineThickness:null,pinSize:null,anchorColor:null,anchorSize:null};return s.length===0&&s.stiffness>.1?(d.type="pin",d.anchors=!1):s.stiffness<.9&&(d.type="spring"),s.render=i.extend(d,s.render),s},a.preSolveAll=function(h){for(var s=0;s=1||h.length===0,M=S?h.stiffness*s:h.stiffness*s*s,w=h.damping*s,L=o.mult(y,T*M),F=(l?l.inverseMass:0)+(f?f.inverseMass:0),O=(l?l.inverseInertia:0)+(f?f.inverseInertia:0),b=F+O,N,V,K,$,j;if(w>0){var X=o.create();K=o.div(y,x),j=o.sub(f&&o.sub(f.position,f.positionPrev)||X,l&&o.sub(l.position,l.positionPrev)||X),$=o.dot(K,j)}l&&!l.isStatic&&(V=l.inverseMass/F,l.constraintImpulse.x-=L.x*V,l.constraintImpulse.y-=L.y*V,l.position.x-=L.x*V,l.position.y-=L.y*V,w>0&&(l.positionPrev.x-=w*K.x*$*V,l.positionPrev.y-=w*K.y*$*V),N=o.cross(u,L)/b*a._torqueDampen*l.inverseInertia*(1-h.angularStiffness),l.constraintImpulse.angle-=N,l.angle-=N),f&&!f.isStatic&&(V=f.inverseMass/F,f.constraintImpulse.x+=L.x*V,f.constraintImpulse.y+=L.y*V,f.position.x+=L.x*V,f.position.y+=L.y*V,w>0&&(f.positionPrev.x+=w*K.x*$*V,f.positionPrev.y+=w*K.y*$*V),N=o.cross(d,L)/b*a._torqueDampen*f.inverseInertia*(1-h.angularStiffness),f.constraintImpulse.angle+=N,f.angle+=N)}}},a.postSolveAll=function(h){for(var s=0;s0&&(d.position.x+=f.x,d.position.y+=f.y),f.angle!==0&&(c.rotate(d.vertices,f.angle,l.position),e.rotate(d.axes,f.angle),u>0&&o.rotateAbout(d.position,f.angle,l.position,d.position)),n.update(d.bounds,d.vertices,l.velocity)}f.angle*=a._warming,f.x*=a._warming,f.y*=a._warming}}},a.pointAWorld=function(h){return{x:(h.bodyA?h.bodyA.position.x:0)+(h.pointA?h.pointA.x:0),y:(h.bodyA?h.bodyA.position.y:0)+(h.pointA?h.pointA.y:0)}},a.pointBWorld=function(h){return{x:(h.bodyB?h.bodyB.position.x:0)+(h.pointB?h.pointB.x:0),y:(h.bodyB?h.bodyB.position.y:0)+(h.pointB?h.pointB.y:0)}},a.currentLength=function(h){var s=(h.bodyA?h.bodyA.position.x:0)+(h.pointA?h.pointA.x:0),l=(h.bodyA?h.bodyA.position.y:0)+(h.pointA?h.pointA.y:0),f=(h.bodyB?h.bodyB.position.x:0)+(h.pointB?h.pointB.x:0),u=(h.bodyB?h.bodyB.position.y:0)+(h.pointB?h.pointB.y:0),d=s-f,p=l-u;return Math.sqrt(d*d+p*p)}})()},53402:(v,m,t)=>{var a={};v.exports=a,function(){a._baseDelta=16.666666666666668,a._nextId=0,a._seed=0,a._nowStartTime=+new Date,a._warnedOnce={},a._decomp=null,a.extend=function(o,r){var n,e;typeof r=="boolean"?(n=2,e=r):(n=1,e=!0);for(var i=n;i0;r--){var n=Math.floor(a.random()*(r+1)),e=o[r];o[r]=o[n],o[n]=e}return o},a.choose=function(o){return o[Math.floor(a.random()*o.length)]},a.isElement=function(o){return typeof HTMLElement<"u"?o instanceof HTMLElement:!!(o&&o.nodeType&&o.nodeName)},a.isArray=function(o){return Object.prototype.toString.call(o)==="[object Array]"},a.isFunction=function(o){return typeof o=="function"},a.isPlainObject=function(o){return typeof o=="object"&&o.constructor===Object},a.isString=function(o){return toString.call(o)==="[object String]"},a.clamp=function(o,r,n){return on?n:o},a.sign=function(o){return o<0?-1:1},a.now=function(){if(typeof window<"u"&&window.performance){if(window.performance.now)return window.performance.now();if(window.performance.webkitNow)return window.performance.webkitNow()}return Date.now?Date.now():new Date-a._nowStartTime},a.random=function(o,r){return o=typeof o<"u"?o:0,r=typeof r<"u"?r:1,o+c()*(r-o)};var c=function(){return a._seed=(a._seed*9301+49297)%233280,a._seed/233280};a.colorToNumber=function(o){return o=o.replace("#",""),o.length==3&&(o=o.charAt(0)+o.charAt(0)+o.charAt(1)+o.charAt(1)+o.charAt(2)+o.charAt(2)),parseInt(o,16)},a.logLevel=1,a.log=function(){console&&a.logLevel>0&&a.logLevel<=3&&console.log.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},a.info=function(){console&&a.logLevel>0&&a.logLevel<=2&&console.info.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},a.warn=function(){console&&a.logLevel>0&&a.logLevel<=3&&console.warn.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},a.warnOnce=function(){var o=Array.prototype.slice.call(arguments).join(" ");a._warnedOnce[o]||(a.warn(o),a._warnedOnce[o]=!0)},a.deprecated=function(o,r,n){o[r]=a.chain(function(){a.warnOnce("🔅 deprecated 🔅",n)},o[r])},a.nextId=function(){return a._nextId++},a.indexOf=function(o,r){if(o.indexOf)return o.indexOf(r);for(var n=0;n{var a={};v.exports=a;var c=t(53614),o=t(66272),r=t(81388),n=t(99561),e=t(35810),i=t(69351),h=t(48140),s=t(53402),l=t(22562);(function(){a.create=function(f){f=f||{};var u={positionIterations:6,velocityIterations:4,constraintIterations:2,enableSleeping:!1,events:[],plugin:{},gravity:{x:0,y:1,scale:.001},timing:{timestamp:0,timeScale:1,lastDelta:0,lastElapsed:0}},d=s.extend(u,f);return d.world=f.world||i.create({label:"World"}),d.pairs=f.pairs||n.create(),d.detector=f.detector||r.create(),d.grid={buckets:[]},d.world.gravity=d.gravity,d.broadphase=d.grid,d.metrics={},d},a.update=function(f,u){var d=s.now(),p=f.world,g=f.detector,y=f.pairs,x=f.timing,T=x.timestamp,S;u=typeof u<"u"?u:s._baseDelta,u*=x.timeScale,x.timestamp+=u,x.lastDelta=u;var M={timestamp:x.timestamp,delta:u};e.trigger(f,"beforeUpdate",M);var w=i.allBodies(p),L=i.allConstraints(p);for(p.isModified&&(r.setBodies(g,w),i.setModified(p,!1,!1,!0)),f.enableSleeping&&c.update(w,u),a._bodiesApplyGravity(w,f.gravity),u>0&&a._bodiesUpdate(w,u),e.trigger(f,"beforeSolve",M),h.preSolveAll(w),S=0;S0&&e.trigger(f,"collisionStart",{pairs:y.collisionStart,timestamp:x.timestamp,delta:u});var O=s.clamp(20/f.positionIterations,0,1);for(o.preSolvePosition(y.list),S=0;S0&&e.trigger(f,"collisionActive",{pairs:y.collisionActive,timestamp:x.timestamp,delta:u}),y.collisionEnd.length>0&&e.trigger(f,"collisionEnd",{pairs:y.collisionEnd,timestamp:x.timestamp,delta:u}),a._bodiesClearForces(w),e.trigger(f,"afterUpdate",M),f.timing.lastElapsed=s.now()-d,f},a.merge=function(f,u){if(s.extend(f,u),u.world){f.world=u.world,a.clear(f);for(var d=i.allBodies(f.world),p=0;p{var a={};v.exports=a;var c=t(53402);(function(){a.on=function(o,r,n){for(var e=r.split(" "),i,h=0;h0){n||(n={}),e=r.split(" ");for(var f=0;f{var a={};v.exports=a;var c=t(73832),o=t(53402);(function(){a.name="matter-js",a.version="0.19.0",a.uses=[],a.used=[],a.use=function(){c.use(a,Array.prototype.slice.call(arguments))},a.before=function(r,n){return r=r.replace(/^Matter./,""),o.chainPathBefore(a,r,n)},a.after=function(r,n){return r=r.replace(/^Matter./,""),o.chainPathAfter(a,r,n)}})()},73832:(v,m,t)=>{var a={};v.exports=a;var c=t(53402);(function(){a._registry={},a.register=function(o){if(a.isPlugin(o)||c.warn("Plugin.register:",a.toString(o),"does not implement all required fields."),o.name in a._registry){var r=a._registry[o.name],n=a.versionParse(o.version).number,e=a.versionParse(r.version).number;n>e?(c.warn("Plugin.register:",a.toString(r),"was upgraded to",a.toString(o)),a._registry[o.name]=o):n-1},a.isFor=function(o,r){var n=o.for&&a.dependencyParse(o.for);return!o.for||r.name===n.name&&a.versionSatisfies(r.version,n.range)},a.use=function(o,r){if(o.uses=(o.uses||[]).concat(r||[]),o.uses.length===0){c.warn("Plugin.use:",a.toString(o),"does not specify any dependencies to install.");return}for(var n=a.dependencies(o),e=c.topologicalSort(n),i=[],h=0;h0&&!s.silent&&c.info(i.join(" "))},a.dependencies=function(o,r){var n=a.dependencyParse(o),e=n.name;if(r=r||{},!(e in r)){o=a.resolve(o)||o,r[e]=c.map(o.uses||[],function(h){a.isPlugin(h)&&a.register(h);var s=a.dependencyParse(h),l=a.resolve(h);return l&&!a.versionSatisfies(l.version,s.range)?(c.warn("Plugin.dependencies:",a.toString(l),"does not satisfy",a.toString(s),"used by",a.toString(n)+"."),l._warned=!0,o._warned=!0):l||(c.warn("Plugin.dependencies:",a.toString(h),"used by",a.toString(n),"could not be resolved."),o._warned=!0),s.name});for(var i=0;i=|>)?\s*((\d+)\.(\d+)\.(\d+))(-[0-9A-Za-z-+]+)?$/;r.test(o)||c.warn("Plugin.versionParse:",o,"is not a valid version or range.");var n=r.exec(o),e=Number(n[4]),i=Number(n[5]),h=Number(n[6]);return{isRange:!!(n[1]||n[2]),version:n[3],range:o,operator:n[1]||n[2]||"",major:e,minor:i,patch:h,parts:[e,i,h],prerelease:n[7],number:e*1e8+i*1e4+h}},a.versionSatisfies=function(o,r){r=r||"*";var n=a.versionParse(r),e=a.versionParse(o);if(n.isRange){if(n.operator==="*"||o==="*")return!0;if(n.operator===">")return e.number>n.number;if(n.operator===">=")return e.number>=n.number;if(n.operator==="~")return e.major===n.major&&e.minor===n.minor&&e.patch>=n.patch;if(n.operator==="^")return n.major>0?e.major===n.major&&e.number>=n.number:n.minor>0?e.minor===n.minor&&e.patch>=n.patch:e.patch===n.patch}return o===r||o==="*"}})()},53614:(v,m,t)=>{var a={};v.exports=a;var c=t(22562),o=t(35810),r=t(53402);(function(){a._motionWakeThreshold=.18,a._motionSleepThreshold=.08,a._minBias=.9,a.update=function(n,e){for(var i=e/r._baseDelta,h=a._motionSleepThreshold,s=0;s0&&l.motion=l.sleepThreshold/i&&a.set(l,!0)):l.sleepCounter>0&&(l.sleepCounter-=1)}},a.afterCollisions=function(n){for(var e=a._motionSleepThreshold,i=0;ie&&a.set(u,!1)}}}},a.set=function(n,e){var i=n.isSleeping;e?(n.isSleeping=!0,n.sleepCounter=n.sleepThreshold,n.positionImpulse.x=0,n.positionImpulse.y=0,n.positionPrev.x=n.position.x,n.positionPrev.y=n.position.y,n.anglePrev=n.angle,n.speed=0,n.angularSpeed=0,n.motion=0,i||o.trigger(n,"sleepStart")):(n.isSleeping=!1,n.sleepCounter=0,i&&o.trigger(n,"sleepEnd"))}})()},66280:(v,m,t)=>{var a={};v.exports=a;var c=t(41598),o=t(53402),r=t(22562),n=t(15647),e=t(31725);(function(){a.rectangle=function(i,h,s,l,f){f=f||{};var u={label:"Rectangle Body",position:{x:i,y:h},vertices:c.fromPath("L 0 0 L "+s+" 0 L "+s+" "+l+" L 0 "+l)};if(f.chamfer){var d=f.chamfer;u.vertices=c.chamfer(u.vertices,d.radius,d.quality,d.qualityMin,d.qualityMax),delete f.chamfer}return r.create(o.extend({},u,f))},a.trapezoid=function(i,h,s,l,f,u){u=u||{},f*=.5;var d=(1-f*2)*s,p=s*f,g=p+d,y=g+p,x;f<.5?x="L 0 0 L "+p+" "+-l+" L "+g+" "+-l+" L "+y+" 0":x="L 0 0 L "+g+" "+-l+" L "+y+" 0";var T={label:"Trapezoid Body",position:{x:i,y:h},vertices:c.fromPath(x)};if(u.chamfer){var S=u.chamfer;T.vertices=c.chamfer(T.vertices,S.radius,S.quality,S.qualityMin,S.qualityMax),delete u.chamfer}return r.create(o.extend({},T,u))},a.circle=function(i,h,s,l,f){l=l||{};var u={label:"Circle Body",circleRadius:s};f=f||25;var d=Math.ceil(Math.max(10,Math.min(f,s)));return d%2===1&&(d+=1),a.polygon(i,h,d,s,o.extend({},u,l))},a.polygon=function(i,h,s,l,f){if(f=f||{},s<3)return a.circle(i,h,l,f);for(var u=2*Math.PI/s,d="",p=u*.5,g=0;g0&&c.area(j)1?(x=r.create(o.extend({parts:T.slice(0)},l)),r.setPosition(x,{x:i,y:h}),x):T[0]},a.flagCoincidentParts=function(i,h){h===void 0&&(h=5);for(var s=0;s{var a={};v.exports=a;var c=t(69351),o=t(48140),r=t(53402),n=t(22562),e=t(66280);(function(){a.stack=function(i,h,s,l,f,u,d){for(var p=c.create({label:"Stack"}),g=i,y=h,x,T=0,S=0;SM&&(M=F),n.translate(L,{x:O*.5,y:F*.5}),g=L.bounds.max.x+f,c.addBody(p,L),x=L,T+=1}else g+=f}y+=M+u,g=i}return p},a.chain=function(i,h,s,l,f,u){for(var d=i.bodies,p=1;p0)for(p=0;p0&&(x=u[p-1+(d-1)*h],c.addConstraint(i,o.create(r.extend({bodyA:x,bodyB:y},f)))),l&&pM)){x=M-x;var L=x,F=s-1-x;if(!(yF)){S===1&&n.translate(T,{x:(y+(s%2===1?1:-1))*w,y:0});var O=T?y*w:0;return d(i+O+y*f,g,y,x,T,S)}}})},a.newtonsCradle=function(i,h,s,l,f){for(var u=c.create({label:"Newtons Cradle"}),d=0;d{var a={};v.exports=a;var c=t(31725),o=t(53402);(function(){a.fromVertices=function(r){for(var n={},e=0;e{var m={};v.exports=m,function(){m.create=function(t){var a={min:{x:0,y:0},max:{x:0,y:0}};return t&&m.update(a,t),a},m.update=function(t,a,c){t.min.x=1/0,t.max.x=-1/0,t.min.y=1/0,t.max.y=-1/0;for(var o=0;ot.max.x&&(t.max.x=r.x),r.xt.max.y&&(t.max.y=r.y),r.y0?t.max.x+=c.x:t.min.x+=c.x,c.y>0?t.max.y+=c.y:t.min.y+=c.y)},m.contains=function(t,a){return a.x>=t.min.x&&a.x<=t.max.x&&a.y>=t.min.y&&a.y<=t.max.y},m.overlaps=function(t,a){return t.min.x<=a.max.x&&t.max.x>=a.min.x&&t.max.y>=a.min.y&&t.min.y<=a.max.y},m.translate=function(t,a){t.min.x+=a.x,t.max.x+=a.x,t.min.y+=a.y,t.max.y+=a.y},m.shift=function(t,a){var c=t.max.x-t.min.x,o=t.max.y-t.min.y;t.min.x=a.x,t.max.x=a.x+c,t.min.y=a.y,t.max.y=a.y+o}}()},74058:(v,m,t)=>{var a={};v.exports=a,t(15647);var c=t(53402);(function(){a.pathToVertices=function(o,r){typeof window<"u"&&!("SVGPathSeg"in window)&&c.warn("Svg.pathToVertices: SVGPathSeg not defined, a polyfill is required.");var n,e,i,h,s,l,f,u,d,p,g=[],y,x,T=0,S=0,M=0;r=r||15;var w=function(F,O,b){var N=b%2===1&&b>1;if(!d||F!=d.x||O!=d.y){d&&N?(y=d.x,x=d.y):(y=0,x=0);var V={x:y+F,y:x+O};(N||!d)&&(d=V),g.push(V),S=y+F,M=x+O}},L=function(F){var O=F.pathSegTypeAsLetter.toUpperCase();if(O!=="Z"){switch(O){case"M":case"L":case"T":case"C":case"S":case"Q":S=F.x,M=F.y;break;case"H":S=F.x;break;case"V":M=F.y;break}w(S,M,F.pathSegType)}};for(a._svgPathToAbsolute(o),i=o.getTotalLength(),l=[],n=0;n{var m={};v.exports=m,function(){m.create=function(t,a){return{x:t||0,y:a||0}},m.clone=function(t){return{x:t.x,y:t.y}},m.magnitude=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},m.magnitudeSquared=function(t){return t.x*t.x+t.y*t.y},m.rotate=function(t,a,c){var o=Math.cos(a),r=Math.sin(a);c||(c={});var n=t.x*o-t.y*r;return c.y=t.x*r+t.y*o,c.x=n,c},m.rotateAbout=function(t,a,c,o){var r=Math.cos(a),n=Math.sin(a);o||(o={});var e=c.x+((t.x-c.x)*r-(t.y-c.y)*n);return o.y=c.y+((t.x-c.x)*n+(t.y-c.y)*r),o.x=e,o},m.normalise=function(t){var a=m.magnitude(t);return a===0?{x:0,y:0}:{x:t.x/a,y:t.y/a}},m.dot=function(t,a){return t.x*a.x+t.y*a.y},m.cross=function(t,a){return t.x*a.y-t.y*a.x},m.cross3=function(t,a,c){return(a.x-t.x)*(c.y-t.y)-(a.y-t.y)*(c.x-t.x)},m.add=function(t,a,c){return c||(c={}),c.x=t.x+a.x,c.y=t.y+a.y,c},m.sub=function(t,a,c){return c||(c={}),c.x=t.x-a.x,c.y=t.y-a.y,c},m.mult=function(t,a){return{x:t.x*a,y:t.y*a}},m.div=function(t,a){return{x:t.x/a,y:t.y/a}},m.perp=function(t,a){return a=a===!0?-1:1,{x:a*-t.y,y:a*t.x}},m.neg=function(t){return{x:-t.x,y:-t.y}},m.angle=function(t,a){return Math.atan2(a.y-t.y,a.x-t.x)},m._temp=[m.create(),m.create(),m.create(),m.create(),m.create(),m.create()]}()},41598:(v,m,t)=>{var a={};v.exports=a;var c=t(31725),o=t(53402);(function(){a.create=function(r,n){for(var e=[],i=0;i0)return!1;s=l}return!0},a.scale=function(r,n,e,i){if(n===1&&e===1)return r;i=i||a.centre(r);for(var h,s,l=0;l=0?l-1:r.length-1],u=r[l],d=r[(l+1)%r.length],p=n[l0&&(n|=2),n===3)return!1;return n!==0?!0:null},a.hull=function(r){var n=[],e=[],i,h;for(r=r.slice(0),r.sort(function(s,l){var f=s.x-l.x;return f!==0?f:s.y-l.y}),h=0;h=2&&c.cross3(e[e.length-2],e[e.length-1],i)<=0;)e.pop();e.push(i)}for(h=r.length-1;h>=0;h-=1){for(i=r[h];n.length>=2&&c.cross3(n[n.length-2],n[n.length-1],i)<=0;)n.pop();n.push(i)}return n.pop(),e.pop(),n.concat(e)}})()},18210:(v,m,t)=>{var a=t(19933),c={name:"matter-attractors",version:"0.1.7",for:"matter-js@^0.19.0",silent:!0,install:function(o){o.after("Body.create",function(){c.Body.init(this)}),o.before("Engine.update",function(r){c.Engine.update(r)})},Body:{init:function(o){o.plugin.attractors=o.plugin.attractors||[]}},Engine:{update:function(o){for(var r=a.Composite.allBodies(o.world),n=0;n0)for(var h=0;h{/** + * @author @dxu https://github.com/dxu/matter-collision-events + * @author Richard Davey + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m={name:"matter-collision-events",version:"0.1.6",for:"matter-js@^0.19.0",silent:!0,install:function(t){t.after("Engine.create",function(){t.Events.on(this,"collisionStart",function(a){a.pairs.map(function(c){var o=c.bodyA,r=c.bodyB;o.gameObject&&o.gameObject.emit("collide",o,r,c),r.gameObject&&r.gameObject.emit("collide",r,o,c),t.Events.trigger(o,"onCollide",{pair:c}),t.Events.trigger(r,"onCollide",{pair:c}),o.onCollideCallback&&o.onCollideCallback(c),r.onCollideCallback&&r.onCollideCallback(c),o.onCollideWith[r.id]&&o.onCollideWith[r.id](r,c),r.onCollideWith[o.id]&&r.onCollideWith[o.id](o,c)})}),t.Events.on(this,"collisionActive",function(a){a.pairs.map(function(c){var o=c.bodyA,r=c.bodyB;o.gameObject&&o.gameObject.emit("collideActive",o,r,c),r.gameObject&&r.gameObject.emit("collideActive",r,o,c),t.Events.trigger(o,"onCollideActive",{pair:c}),t.Events.trigger(r,"onCollideActive",{pair:c}),o.onCollideActiveCallback&&o.onCollideActiveCallback(c),r.onCollideActiveCallback&&r.onCollideActiveCallback(c)})}),t.Events.on(this,"collisionEnd",function(a){a.pairs.map(function(c){var o=c.bodyA,r=c.bodyB;o.gameObject&&o.gameObject.emit("collideEnd",o,r,c),r.gameObject&&r.gameObject.emit("collideEnd",r,o,c),t.Events.trigger(o,"onCollideEnd",{pair:c}),t.Events.trigger(r,"onCollideEnd",{pair:c}),o.onCollideEndCallback&&o.onCollideEndCallback(c),r.onCollideEndCallback&&r.onCollideEndCallback(c)})})})}};v.exports=m},74507:(v,m,t)=>{var a=t(19933),c={name:"matter-wrap",version:"0.1.4",for:"matter-js@^0.19.0",silent:!0,install:function(o){o.after("Engine.update",function(){c.Engine.update(this)})},Engine:{update:function(o){for(var r=o.world,n=a.Composite.allBodies(r),e=a.Composite.allComposites(r),i=0;ir.max.x?n=r.min.x-o.max.x:o.max.xr.max.y?e=r.min.y-o.max.y:o.max.y{/** + * @author Stefan Hedman (http://steffe.se) + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={decomp:L,quickDecomp:N,isSimple:O,removeCollinearPoints:V,removeDuplicatePoints:K,makeCCW:d};function m(X,Y,D){D=D||0;var z=[0,0],W,H,J,Q,k,et,st;return W=X[1][1]-X[0][1],H=X[0][0]-X[1][0],J=W*X[0][0]+H*X[0][1],Q=Y[1][1]-Y[0][1],k=Y[0][0]-Y[1][0],et=Q*Y[0][0]+k*Y[0][1],st=W*k-Q*H,$(st,0,D)||(z[0]=(k*J-H*et)/st,z[1]=(W*et-Q*J)/st),z}function t(X,Y,D,z){var W=Y[0]-X[0],H=Y[1]-X[1],J=z[0]-D[0],Q=z[1]-D[1];if(J*H-Q*W===0)return!1;var k=(W*(D[1]-X[1])+H*(X[0]-D[0]))/(J*H-Q*W),et=(J*(X[1]-D[1])+Q*(D[0]-X[0]))/(Q*W-J*H);return k>=0&&k<=1&&et>=0&&et<=1}function a(X,Y,D){return(Y[0]-X[0])*(D[1]-X[1])-(D[0]-X[0])*(Y[1]-X[1])}function c(X,Y,D){return a(X,Y,D)>0}function o(X,Y,D){return a(X,Y,D)>=0}function r(X,Y,D){return a(X,Y,D)<0}function n(X,Y,D){return a(X,Y,D)<=0}var e=[],i=[];function h(X,Y,D,z){if(z){var W=e,H=i;W[0]=Y[0]-X[0],W[1]=Y[1]-X[1],H[0]=D[0]-Y[0],H[1]=D[1]-Y[1];var J=W[0]*H[0]+W[1]*H[1],Q=Math.sqrt(W[0]*W[0]+W[1]*W[1]),k=Math.sqrt(H[0]*H[0]+H[1]*H[1]),et=Math.acos(J/(Q*k));return etD[Y][0])&&(Y=z);return c(l(X,Y-1),l(X,Y),l(X,Y+1))?!1:(p(X),!0)}function p(X){for(var Y=[],D=X.length,z=0;z!==D;z++)Y.push(X.pop());for(var z=0;z!==D;z++)X[z]=Y[z]}function g(X,Y){return r(l(X,Y-1),l(X,Y),l(X,Y+1))}var y=[],x=[];function T(X,Y,D){var z,W,H=y,J=x;if(o(l(X,Y+1),l(X,Y),l(X,D))&&n(l(X,Y-1),l(X,Y),l(X,D)))return!1;W=s(l(X,Y),l(X,D));for(var Q=0;Q!==X.length;++Q)if(!((Q+1)%X.length===Y||Q===Y)&&o(l(X,Y),l(X,D),l(X,Q+1))&&n(l(X,Y),l(X,D),l(X,Q))&&(H[0]=l(X,Y),H[1]=l(X,D),J[0]=l(X,Q),J[1]=l(X,Q+1),z=m(H,J),s(l(X,Y),z)0?F(X,Y):[X]}function F(X,Y){if(Y.length===0)return[X];if(Y instanceof Array&&Y.length&&Y[0]instanceof Array&&Y[0].length===2&&Y[0][0]instanceof Array){for(var D=[X],z=0;zH)return console.warn("quickDecomp: max level ("+H+") reached."),Y;for(var pt=0;ptat&&(at+=X.length),ft=Number.MAX_VALUE,at3&&z>=0;--z)h(l(X,z-1),l(X,z),l(X,z+1),Y)&&(X.splice(z%X.length,1),D++);return D}function K(X,Y){for(var D=X.length-1;D>=1;--D)for(var z=X[D],W=D-1;W>=0;--W)if(j(z,X[W],Y)){X.splice(D,1);continue}}function $(X,Y,D){return D=D||0,Math.abs(X-Y)<=D}function j(X,Y,D){return $(X[0],Y[0],D)&&$(X[1],Y[1],D)}},52018:(v,m,t)=>{/** +* @author Richard Davey +* @copyright 2013-2024 Phaser Studio Inc. +* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} +*/var a=t(83419),c=new a({initialize:function(r){this.pluginManager=r,this.game=r.game},init:function(){},start:function(){},stop:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});v.exports=c},42363:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m={Global:["game","anims","cache","plugins","registry","scale","sound","textures","renderer"],CoreScene:["EventEmitter","CameraManager","GameObjectCreator","GameObjectFactory","ScenePlugin","DisplayList","UpdateList"],DefaultScene:["Clock","DataManagerPlugin","InputPlugin","Loader","TweenManager","LightsPlugin"]};v.exports=m},37277:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m={},t={},a={};a.register=function(c,o,r,n){n===void 0&&(n=!1),m[c]={plugin:o,mapping:r,custom:n}},a.registerCustom=function(c,o,r,n){t[c]={plugin:o,mapping:r,data:n}},a.hasCore=function(c){return m.hasOwnProperty(c)},a.hasCustom=function(c){return t.hasOwnProperty(c)},a.getCore=function(c){return m[c]},a.getCustom=function(c){return t[c]},a.getCustomClass=function(c){return t.hasOwnProperty(c)?t[c].plugin:null},a.remove=function(c){m.hasOwnProperty(c)&&delete m[c]},a.removeCustom=function(c){t.hasOwnProperty(c)&&delete t[c]},a.destroyCorePlugins=function(){for(var c in m)m.hasOwnProperty(c)&&delete m[c]},a.destroyCustomPlugins=function(){for(var c in t)t.hasOwnProperty(c)&&delete t[c]},v.exports=a},77332:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(8443),o=t(50792),r=t(74099),n=t(44603),e=t(39429),i=t(95540),h=t(37277),s=t(72905),l=new a({Extends:o,initialize:function(u){o.call(this),this.game=u,this.plugins=[],this.scenePlugins=[],this._pendingGlobal=[],this._pendingScene=[],u.isBooted?this.boot():u.events.once(c.BOOT,this.boot,this)},boot:function(){var f,u,d,p,g,y,x,T=this.game.config,S=T.installGlobalPlugins;for(S=S.concat(this._pendingGlobal),f=0;f{/** +* @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),c=t(83419),o=t(44594),r=new c({Extends:a,initialize:function(e,i,h){a.call(this,i),this.scene=e,this.systems=e.sys,this.pluginKey=h,e.sys.events.once(o.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});v.exports=r},18922:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.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(v){const m=performance.now(),t=this.getVideoPlaybackQuality(),a=this.mozPresentedFrames||this.mozPaintedFrames||t.totalVideoFrames-t.droppedVideoFrames,c=(o,r)=>{const n=this.getVideoPlaybackQuality(),e=this.mozPresentedFrames||this.mozPaintedFrames||n.totalVideoFrames-n.droppedVideoFrames;if(e>a){const i=this.mozFrameDelay||n.totalFrameDelay-t.totalFrameDelay||0,h=r-o;v(r,{presentationTime:r+i*1e3,expectedDisplayTime:r+h,width:this.videoWidth,height:this.videoHeight,mediaTime:Math.max(0,this.currentTime||0)+h/1e3,presentedFrames:e,processingDuration:i}),delete this._rvfcpolyfillmap[m]}else this._rvfcpolyfillmap[m]=requestAnimationFrame(i=>c(r,i))};return this._rvfcpolyfillmap[m]=requestAnimationFrame(o=>c(m,o)),m},HTMLVideoElement.prototype.cancelVideoFrameCallback=function(v){cancelAnimationFrame(this._rvfcpolyfillmap[v]),delete this._rvfcpolyfillmap[v]})},10312:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.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:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m={DEFAULT:0,LINEAR:0,NEAREST:1};v.exports=m},68627:(v,m,t)=>{/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(19715),c=t(32880),o=t(83419),r=t(8054),n=t(50792),e=t(92503),i=t(56373),h=t(97480),s=t(69442),l=t(61340),f=new o({Extends:n,initialize:function(d){n.call(this);var p=d.config;this.config={clearBeforeRender:p.clearBeforeRender,backgroundColor:p.backgroundColor,antialias:p.antialias,roundPixels:p.roundPixels},this.game=d,this.type=r.CANVAS,this.drawCount=0,this.width=0,this.height=0,this.gameCanvas=d.canvas;var g={alpha:d.config.transparent,desynchronized:d.config.desynchronized,willReadFrequently:!1};this.gameContext=p.context?p.context:this.gameCanvas.getContext("2d",g),this.currentContext=this.gameContext,this.antialias=d.config.antialias,this.blendModes=i(),this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92},this._tempMatrix1=new l,this._tempMatrix2=new l,this._tempMatrix3=new l,this.isBooted=!1,this.init()},init:function(){this.game.textures.once(s.READY,this.boot,this)},boot:function(){var u=this.game,d=u.scale.baseSize;this.width=d.width,this.height=d.height,this.isBooted=!0,u.scale.on(h.RESIZE,this.onResize,this),this.resize(d.width,d.height)},onResize:function(u,d){(d.width!==this.width||d.height!==this.height)&&this.resize(d.width,d.height)},resize:function(u,d){this.width=u,this.height=d,this.emit(e.RESIZE,u,d)},resetTransform:function(){this.currentContext.setTransform(1,0,0,1,0,0)},setBlendMode:function(u){return this.currentContext.globalCompositeOperation=u,this},setContext:function(u){return this.currentContext=u||this.gameContext,this},setAlpha:function(u){return this.currentContext.globalAlpha=u,this},preRender:function(){var u=this.gameContext,d=this.config,p=this.width,g=this.height;u.globalAlpha=1,u.globalCompositeOperation="source-over",u.setTransform(1,0,0,1,0,0),d.clearBeforeRender&&(u.clearRect(0,0,p,g),d.transparent||(u.fillStyle=d.backgroundColor.rgba,u.fillRect(0,0,p,g))),u.save(),this.drawCount=0,this.emit(e.PRE_RENDER)},render:function(u,d,p){var g=d.length;this.emit(e.RENDER,u,p);var y=p.x,x=p.y,T=p.width,S=p.height,M=p.renderToTexture?p.context:u.sys.context;M.save(),this.game.scene.customViewports&&(M.beginPath(),M.rect(y,x,T,S),M.clip()),p.emit(a.PRE_RENDER,p),this.currentContext=M;var w=p.mask;w&&w.preRenderCanvas(this,null,p._maskCamera),p.transparent||(M.fillStyle=p.backgroundColor.rgba,M.fillRect(y,x,T,S)),M.globalAlpha=p.alpha,M.globalCompositeOperation="source-over",this.drawCount+=g,p.renderToTexture&&p.emit(a.PRE_RENDER,p),p.matrix.copyToContext(M);for(var L=0;L=0?$=-($+F):$<0&&($=Math.abs($)-F)),u.flipY&&(j>=0?j=-(j+O):j<0&&(j=Math.abs(j)-O))}var Y=1,D=1;u.flipX&&(b||($+=-d.realWidth+V*2),Y=-1),u.flipY&&(b||(j+=-d.realHeight+K*2),D=-1);var z=u.x,W=u.y;S.applyITRS(z,W,u.rotation,u.scaleX*Y,u.scaleY*D),T.copyFrom(p.matrix),g?(T.multiplyWithOffset(g,-p.scrollX*u.scrollFactorX,-p.scrollY*u.scrollFactorY),S.e=z,S.f=W):(S.e-=p.scrollX*u.scrollFactorX,S.f-=p.scrollY*u.scrollFactorY),T.multiply(S),p.roundPixels&&(T.e=Math.round(T.e),T.f=Math.round(T.f)),x.save(),T.setToContext(x),x.globalCompositeOperation=this.blendModes[u.blendMode],x.globalAlpha=y,x.imageSmoothingEnabled=!d.source.scaleMode,u.mask&&u.mask.preRenderCanvas(this,u,p),F>0&&O>0&&(p.roundPixels?x.drawImage(d.source.image,w,L,F,O,Math.round($),Math.round(j),Math.round(F/N),Math.round(O/N)):x.drawImage(d.source.image,w,L,F,O,$,j,F/N,O/N)),u.mask&&u.mask.postRenderCanvas(this,u,p),x.restore()}},destroy:function(){this.removeAllListeners(),this.game=null,this.gameCanvas=null,this.gameContext=null}});v.exports=f},55830:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={CanvasRenderer:t(68627),GetBlendModes:t(56373),SetTransform:t(20926)}},56373:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(10312),c=t(89289),o=function(){var r=[],n=c.supportNewBlendModes,e="source-over";return r[a.NORMAL]=e,r[a.ADD]="lighter",r[a.MULTIPLY]=n?"multiply":e,r[a.SCREEN]=n?"screen":e,r[a.OVERLAY]=n?"overlay":e,r[a.DARKEN]=n?"darken":e,r[a.LIGHTEN]=n?"lighten":e,r[a.COLOR_DODGE]=n?"color-dodge":e,r[a.COLOR_BURN]=n?"color-burn":e,r[a.HARD_LIGHT]=n?"hard-light":e,r[a.SOFT_LIGHT]=n?"soft-light":e,r[a.DIFFERENCE]=n?"difference":e,r[a.EXCLUSION]=n?"exclusion":e,r[a.HUE]=n?"hue":e,r[a.SATURATION]=n?"saturation":e,r[a.COLOR]=n?"color":e,r[a.LUMINOSITY]=n?"luminosity":e,r[a.ERASE]="destination-out",r[a.SOURCE_IN]="source-in",r[a.SOURCE_OUT]="source-out",r[a.SOURCE_ATOP]="source-atop",r[a.DESTINATION_OVER]="destination-over",r[a.DESTINATION_IN]="destination-in",r[a.DESTINATION_OUT]="destination-out",r[a.DESTINATION_ATOP]="destination-atop",r[a.LIGHTER]="lighter",r[a.COPY]="copy",r[a.XOR]="xor",r};v.exports=o},20926:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(91296),c=function(o,r,n,e,i){var h=e.alpha*n.alpha;if(h<=0)return!1;var s=a(n,e,i).calc;return r.globalCompositeOperation=o.blendModes[n.blendMode],r.globalAlpha=h,r.save(),s.setToContext(r),r.imageSmoothingEnabled=n.frame?!n.frame.source.scaleMode:o.antialias,!0};v.exports=c},63899:v=>{/** + * @author Benjamin D. Richards + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="losewebgl"},6119:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="postrender"},48070:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="prerender"},15640:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="render"},8912:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="resize"},87124:v=>{/** + * @author Benjamin D. Richards + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="restorewebgl"},92503:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={LOSE_WEBGL:t(63899),POST_RENDER:t(6119),PRE_RENDER:t(48070),RENDER:t(15640),RESIZE:t(8912),RESTORE_WEBGL:t(87124)}},36909:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={Events:t(92503),Snapshot:t(89966)},v.exports.Canvas=t(55830),v.exports.WebGL=t(4159)},32880:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(27919),c=t(40987),o=t(95540),r=function(n,e){var i=o(e,"callback"),h=o(e,"type","image/png"),s=o(e,"encoder",.92),l=Math.abs(Math.round(o(e,"x",0))),f=Math.abs(Math.round(o(e,"y",0))),u=Math.floor(o(e,"width",n.width)),d=Math.floor(o(e,"height",n.height)),p=o(e,"getPixel",!1);if(p){var g=n.getContext("2d",{willReadFrequently:!1}),y=g.getImageData(l,f,1,1),x=y.data;i.call(null,new c(x[0],x[1],x[2],x[3]))}else if(l!==0||f!==0||u!==n.width||d!==n.height){var T=a.createWebGL(this,u,d),S=T.getContext("2d",{willReadFrequently:!0});u>0&&d>0&&S.drawImage(n,l,f,u,d,0,0,u,d);var M=new Image;M.onerror=function(){i.call(null),a.remove(T)},M.onload=function(){i.call(null,M),a.remove(T)},M.src=T.toDataURL(h,s)}else{var w=new Image;w.onerror=function(){i.call(null)},w.onload=function(){i.call(null,w)},w.src=n.toDataURL(h,s)}};v.exports=r},88815:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(27919),c=t(40987),o=t(95540),r=function(n,e){var i=n,h=o(e,"callback"),s=o(e,"type","image/png"),l=o(e,"encoder",.92),f=Math.abs(Math.round(o(e,"x",0))),u=Math.abs(Math.round(o(e,"y",0))),d=o(e,"getPixel",!1),p=o(e,"isFramebuffer",!1),g=p?o(e,"bufferWidth",1):i.drawingBufferWidth,y=p?o(e,"bufferHeight",1):i.drawingBufferHeight;if(d){var x=new Uint8Array(4),T=p?u:y-u;i.readPixels(f,T,1,1,i.RGBA,i.UNSIGNED_BYTE,x),h.call(null,new c(x[0],x[1],x[2],x[3]))}else{var S=Math.floor(o(e,"width",g)),M=Math.floor(o(e,"height",y)),w=S*M*4,L=new Uint8Array(w);i.readPixels(f,y-u-M,S,M,i.RGBA,i.UNSIGNED_BYTE,L);for(var F=a.createWebGL(this,S,M),O=F.getContext("2d",{willReadFrequently:!0}),b=O.getImageData(0,0,S,M),N=b.data,V=0;V{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={Canvas:t(32880),WebGL:t(88815)}},7530:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(36060),o=t(90330),r=t(82264),n=t(95540),e=t(32302),i=t(63448),h=t(31302),s=t(58918),l=t(14811),f=t(92651),u=t(96569),d=t(56527),p=t(57516),g=t(43439),y=t(81041),x=t(12385),T=t(7589),S=t(95428),M=t(72905),w=new a({initialize:function(F){this.game=F.game,this.renderer=F,this.classes=new o([[c.UTILITY_PIPELINE,T],[c.MULTI_PIPELINE,p],[c.BITMAPMASK_PIPELINE,h],[c.SINGLE_PIPELINE,x],[c.ROPE_PIPELINE,y],[c.LIGHT_PIPELINE,u],[c.POINTLIGHT_PIPELINE,g],[c.MOBILE_PIPELINE,d]]),this.postPipelineClasses=new o,this.pipelines=new o,this.postPipelineInstances=[],this.default=null,this.current=null,this.previous=null,this.MULTI_PIPELINE=null,this.BITMAPMASK_PIPELINE=null,this.UTILITY_PIPELINE=null,this.MOBILE_PIPELINE=null,this.FX_PIPELINE=null,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2,this.renderTargets=[],this.maxDimension=0,this.frameInc=32,this.targetIndex=0},boot:function(L,F,O){var b=this.renderer,N=this.renderTargets;this.frameInc=Math.floor(n(L,"frameInc",32));var V=b.width,K=b.height,$=this.game.config.disablePreFX,j=this.game.config.disablePostFX;if(j||this.postPipelineClasses.setAll([[String(l.BARREL),s.Barrel],[String(l.BLOOM),s.Bloom],[String(l.BLUR),s.Blur],[String(l.BOKEH),s.Bokeh],[String(l.CIRCLE),s.Circle],[String(l.COLOR_MATRIX),s.ColorMatrix],[String(l.DISPLACEMENT),s.Displacement],[String(l.GLOW),s.Glow],[String(l.GRADIENT),s.Gradient],[String(l.PIXELATE),s.Pixelate],[String(l.SHADOW),s.Shadow],[String(l.SHINE),s.Shine],[String(l.VIGNETTE),s.Vignette],[String(l.WIPE),s.Wipe]]),!$){this.classes.set(c.FX_PIPELINE,f);for(var X=Math.min(V,K),Y=Math.ceil(X/this.frameInc),D=1;D=0;O--){var b=F[O];b.active&&b.preBatch(L)}}},postBatch:function(L){if(L.hasPostPipeline){this.flush();for(var F=L.postPipelines,O=0;O=0;O--){var b=F[O];b.active&&b.preBatch(L)}}},postBatchCamera:function(L){if(L.hasPostPipeline){this.flush();for(var F=L.postPipelines,O=0;Othis.maxDimension)return this.targetIndex=F.length-O,F[this.targetIndex];var b=(i(L,this.frameInc,0,!0)-1)*O;return this.targetIndex=b,F[b]},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}});v.exports=w},32302:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(92503),o=new a({initialize:function(n,e,i,h,s,l,f,u,d){h===void 0&&(h=1),s===void 0&&(s=0),l===void 0&&(l=!0),f===void 0&&(f=!1),u===void 0&&(u=!0),d===void 0&&(d=!0),this.renderer=n,this.framebuffer=null,this.texture=null,this.width=0,this.height=0,this.scale=h,this.minFilter=s,this.autoClear=l,this.autoResize=!0,this.hasDepthBuffer=u,this.forceClamp=d,this.resize(e,i),f?this.setAutoResize(!0):this.autoResize=!1},setAutoResize:function(r){return r&&!this.autoResize?(this.renderer.on(c.RESIZE,this.resize,this),this.autoResize=!0):!r&&this.autoResize&&(this.renderer.off(c.RESIZE,this.resize,this),this.autoResize=!1),this},resize:function(r,n){if(r=Math.round(r*this.scale),n=Math.round(n*this.scale),r<=0&&(r=1),n<=0&&(n=1),this.autoResize&&(r!==this.width||n!==this.height)){var e=this.renderer;e.deleteFramebuffer(this.framebuffer),e.deleteTexture(this.texture),this.texture=e.createTextureFromSource(null,r,n,this.minFilter,this.forceClamp),this.framebuffer=e.createFramebuffer(r,n,this.texture,this.hasDepthBuffer),this.width=r,this.height=n}return this},willResize:function(r,n){return r=Math.round(r*this.scale),n=Math.round(n*this.scale),r<=0&&(r=1),n<=0&&(n=1),r!==this.width||n!==this.height},bind:function(r,n,e){r===void 0&&(r=!1);var i=this.renderer;if(r&&i.flush(),n&&e&&this.resize(n,e),i.pushFramebuffer(this.framebuffer,!1,!1),r&&this.adjustViewport(),this.autoClear){var h=this.renderer.gl;h.clearColor(0,0,0,0),h.clear(h.COLOR_BUFFER_BIT)}i.clearStencilMask()},adjustViewport:function(){var r=this.renderer.gl;r.viewport(0,0,this.width,this.height),r.disable(r.SCISSOR_TEST)},clear:function(){var r=this.renderer,n=r.gl;r.pushFramebuffer(this.framebuffer),n.disable(n.SCISSOR_TEST),n.clearColor(0,0,0,0),n.clear(n.COLOR_BUFFER_BIT),r.popFramebuffer(),r.resetScissor()},unbind:function(r){r===void 0&&(r=!1);var n=this.renderer;return r&&n.flush(),n.popFramebuffer()},destroy:function(){var r=this.renderer;r.off(c.RESIZE,this.resize,this),r.deleteFramebuffer(this.framebuffer),r.deleteTexture(this.texture),this.renderer=null,this.framebuffer=null,this.texture=null}});v.exports=o},70554:v=>{/** + * @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} + */v.exports={getTintFromFloats:function(m,t,a,c){var o=(m*255|0)&255,r=(t*255|0)&255,n=(a*255|0)&255,e=(c*255|0)&255;return(e<<24|o<<16|r<<8|n)>>>0},getTintAppendFloatAlpha:function(m,t){var a=(t*255|0)&255;return(a<<24|m)>>>0},getTintAppendFloatAlphaAndSwap:function(m,t){var a=(m>>16|0)&255,c=(m>>8|0)&255,o=(m|0)&255,r=(t*255|0)&255;return(r<<24|o<<16|c<<8|a)>>>0},getFloatsFromUintRGB:function(m){var t=(m>>16|0)&255,a=(m>>8|0)&255,c=(m|0)&255;return[t/255,a/255,c/255]},checkShaderMax:function(m,t){var a=Math.min(16,m.getParameter(m.MAX_TEXTURE_IMAGE_UNITS));return!t||t===-1?a:Math.min(a,t)},parseFragmentShaderMaxTextures:function(m,t){if(!m)return"";for(var a="",c=0;c0&&(a+=` + else `),c{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(62644),o=t(50792),r=t(77085),n=t(95540),e=t(37867),i=t(92503),h=t(32302),s=t(70554),l=t(38683),f=new a({Extends:o,initialize:function(d){o.call(this);var p=d.game,g=p.renderer,y=g.gl;this.name=n(d,"name","WebGLPipeline"),this.game=p,this.renderer=g,this.manager,this.gl=y,this.view=p.canvas,this.width=0,this.height=0,this.vertexCount=0,this.vertexCapacity=0,this.vertexData,this.vertexBuffer,this.activeBuffer,this.topology=n(d,"topology",y.TRIANGLES),this.bytes,this.vertexViewF32,this.vertexViewU32,this.active=!0,this.forceZero=n(d,"forceZero",!1),this.hasBooted=!1,this.isPostFX=!1,this.isPreFX=!1,this.renderTargets=[],this.currentRenderTarget,this.shaders=[],this.currentShader,this.projectionMatrix,this.projectionWidth=0,this.projectionHeight=0,this.config=d,this.glReset=!1,this.batch=[],this.currentBatch=null,this.currentTexture=null,this.currentUnit=0,this.activeTextures=[],this.resizeUniform=n(d,"resizeUniform","")},boot:function(){var u,d=this.gl,p=this.config,g=this.renderer;this.isPostFX||(this.projectionMatrix=new e().identity());var y=this.renderTargets,x=n(p,"renderTarget",!1);typeof x=="boolean"&&x&&(x=1);var T=g.width,S=g.height;if(typeof x=="number")for(u=0;uV&&(V=N[u].vertexSize);var K=n(p,"batchSize",g.config.batchSize);this.vertexCapacity=K*6;var $=new ArrayBuffer(this.vertexCapacity*V);this.vertexData=$,this.bytes=new Uint8Array($),this.vertexViewF32=new Float32Array($),this.vertexViewU32=new Uint32Array($);var j=n(p,"vertices",null);for(j?(this.vertexViewF32.set(j),this.vertexBuffer=g.createVertexBuffer($,d.STATIC_DRAW)):this.vertexBuffer=g.createVertexBuffer($.byteLength,d.DYNAMIC_DRAW),this.setVertexBuffer(),u=N.length-1;u>=0;u--)N[u].rebind();this.hasBooted=!0,g.on(i.RESIZE,this.resize,this),g.on(i.PRE_RENDER,this.onPreRender,this),g.on(i.RENDER,this.onRender,this),g.on(i.POST_RENDER,this.onPostRender,this),this.emit(r.BOOT,this),this.onBoot()},onBoot:function(){},onResize:function(){},setShader:function(u,d,p){var g=this.renderer;if(u!==this.currentShader||g.currentProgram!==this.currentShader.program){this.flush();var y=this.setVertexBuffer(p);y&&!d&&(d=!0),u.bind(d,!1),this.currentShader=u}return this},getShaderByName:function(u){for(var d=this.shaders,p=0;p-1&&(N=X.substring(20))}V&&K&&O.push(new l(this,N,V,K,c($)))}this.shaders=O}return this.shaders.length===0?console.warn("Pipeline: "+this.name+" - Invalid shader config"):this.currentShader=this.shaders[0],this},createBatch:function(u){return this.currentBatch={start:this.vertexCount,count:0,texture:[u],unit:0,maxUnit:0},this.currentUnit=0,this.currentTexture=u,this.batch.push(this.currentBatch),0},addTextureToBatch:function(u){var d=this.currentBatch;d&&(d.texture.push(u),d.unit++,d.maxUnit++)},pushBatch:function(u){if(!this.currentBatch||this.forceZero&&u!==this.currentTexture)return this.createBatch(u);if(u===this.currentTexture)return this.currentUnit;var d=this.currentBatch,p=d.texture.indexOf(u);return p===-1?d.texture.length===this.renderer.maxTextures?this.createBatch(u):(d.unit++,d.maxUnit++,d.texture.push(u),this.currentUnit=d.unit,this.currentTexture=u,d.unit):(this.currentUnit=p,this.currentTexture=u,p)},setGameObject:function(u,d){return d===void 0&&(d=u.frame),this.pushBatch(d.source.glTexture)},shouldFlush:function(u){return u===void 0&&(u=0),this.vertexCount+u>this.vertexCapacity},vertexAvailable:function(){return this.vertexCapacity-this.vertexCount},resize:function(u,d){(u!==this.width||d!==this.height)&&this.flush(),this.width=u,this.height=d;for(var p=this.renderTargets,g=0;g=0;p--){var g=d[p].rebind();(!u||g===u)&&(this.currentShader=g)}return this.activeTextures.length=0,this.emit(r.REBIND,this.currentShader),this.onActive(this.currentShader),this.onRebind(),this.glReset=!1,this},restoreContext:function(){var u=this.shaders,d=!!this.vertexBuffer;this.activeBuffer=null,this.activeTextures.length=0,this.batch.length=0,this.currentBatch=null,this.currentTexture=null,this.currentUnit=0,d&&this.setVertexBuffer();for(var p=0;p0){this.emit(r.BEFORE_FLUSH,this,u),this.onBeforeFlush(u);var d=this.gl,p=this.vertexCount,g=this.currentShader.vertexSize,y=this.topology;if(this.active){this.setVertexBuffer(),p===this.vertexCapacity?d.bufferData(d.ARRAY_BUFFER,this.vertexData,d.DYNAMIC_DRAW):d.bufferSubData(d.ARRAY_BUFFER,0,this.bytes.subarray(0,p*g));var x,T,S,M=this.batch,w=this.activeTextures;if(this.forceZero)for(w[0]||d.activeTexture(d.TEXTURE0),x=0;x{/** + * @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),c=t(72905),o=t(19715),r=t(83419),n=t(8054),e=t(50792),i=t(92503),h=t(50030),s=t(37867),l=t(29747),f=t(7530),u=t(32302),d=t(97480),p=t(69442),g=t(70554),y=t(88815),x=t(26128),T=t(1482),S=t(82751),M=t(84387),w=t(93567),L=t(57183),F=new r({Extends:e,initialize:function(b){e.call(this);var N=b.config,V={alpha:N.transparent,desynchronized:N.desynchronized,depth:!0,antialias:N.antialiasGL,premultipliedAlpha:N.premultipliedAlpha,stencil:!0,failIfMajorPerformanceCaveat:N.failIfMajorPerformanceCaveat,powerPreference:N.powerPreference,preserveDrawingBuffer:N.preserveDrawingBuffer,willReadFrequently:!1};this.config={clearBeforeRender:N.clearBeforeRender,antialias:N.antialias,backgroundColor:N.backgroundColor,contextCreation:V,roundPixels:N.roundPixels,maxTextures:N.maxTextures,maxTextureSize:N.maxTextureSize,batchSize:N.batchSize,maxLights:N.maxLights,mipmapFilter:N.mipmapFilter},this.game=b,this.type=n.WEBGL,this.pipelines=null,this.width=0,this.height=0,this.canvas=b.canvas,this.blendModes=[],this.contextLost=!1,this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92,isFramebuffer:!1,bufferWidth:0,bufferHeight:0},this.maxTextures=0,this.textureIndexes,this.glBufferWrappers=[],this.glProgramWrappers=[],this.glTextureWrappers=[],this.glFramebufferWrappers=[],this.glAttribLocationWrappers=[],this.glUniformLocationWrappers=[],this.currentFramebuffer=null,this.fboStack=[],this.currentProgram=null,this.currentBlendMode=1/0,this.currentScissorEnabled=!1,this.currentScissor=null,this.scissorStack=[],this.contextLostHandler=l,this.contextRestoredHandler=l,this.gl=null,this.supportedExtensions=null,this.instancedArraysExtension=null,this.vaoExtension=null,this.extensions={},this.glFormats,this.compression,this.drawingBufferHeight=0,this.blankTexture=null,this.normalTexture=null,this.whiteTexture=null,this.maskCount=0,this.maskStack=[],this.currentMask={mask:null,camera:null},this.currentCameraMask={mask:null,camera:null},this.glFuncMap=null,this.currentType="",this.newType=!1,this.nextTypeMatch=!1,this.finalType=!1,this.mipmapFilter=null,this.defaultScissor=[0,0,0,0],this.isBooted=!1,this.renderTarget=null,this.projectionMatrix,this.projectionWidth=0,this.projectionHeight=0,this.maskSource=null,this.maskTarget=null,this.spector=null,this._debugCapture=!1,this.init(this.config)},init:function(O){var b,N=this.game,V=this.canvas,K=O.backgroundColor;if(N.config.context?b=N.config.context:b=V.getContext("webgl",O.contextCreation)||V.getContext("experimental-webgl",O.contextCreation),!b||b.isContextLost())throw this.contextLost=!0,new Error("WebGL unsupported");this.gl=b;var $=this,j=function(){var D=b.getSupportedExtensions();$.supportedExtensions=D;var z="ANGLE_instanced_arrays";$.instancedArraysExtension=D.indexOf(z)>-1?b.getExtension(z):null;var W="OES_vertex_array_object";$.vaoExtension=D.indexOf(W)>-1?b.getExtension(W):null};j(),this.contextLostHandler=function(D){$.contextLost=!0,console&&console.warn("WebGL Context lost. Renderer disabled"),$.emit(i.LOSE_WEBGL,$),D.preventDefault()},V.addEventListener("webglcontextlost",this.contextLostHandler,!1),this.contextRestoredHandler=function(D){if(b.isContextLost()){console&&console.log("WebGL Context restored, but context is still lost");return}$.currentProgram=null,$.currentFramebuffer=null,$.setBlendMode(n.BlendModes.NORMAL),b.disable(b.BLEND),b.disable(b.DEPTH_TEST),b.enable(b.CULL_FACE),$.compression=$.getCompressedTextures();var z=function(W){W.createResource()};a($.glTextureWrappers,z),a($.glBufferWrappers,z),a($.glFramebufferWrappers,z),a($.glProgramWrappers,z),a($.glAttribLocationWrappers,z),a($.glUniformLocationWrappers,z),$.createTemporaryTextures(),$.pipelines.restoreContext(),$.resize($.game.scale.baseSize.width,$.game.scale.baseSize.height),j(),$.contextLost=!1,console&&console.warn("WebGL Context restored. Renderer running again."),$.emit(i.RESTORE_WEBGL,$),D.preventDefault()},V.addEventListener("webglcontextrestored",this.contextRestoredHandler,!1),N.context=b;for(var X=0;X<=27;X++)this.blendModes.push({func:[b.ONE,b.ONE_MINUS_SRC_ALPHA],equation:b.FUNC_ADD});this.blendModes[1].func=[b.ONE,b.DST_ALPHA],this.blendModes[2].func=[b.DST_COLOR,b.ONE_MINUS_SRC_ALPHA],this.blendModes[3].func=[b.ONE,b.ONE_MINUS_SRC_COLOR],this.blendModes[17]={func:[b.ZERO,b.ONE_MINUS_SRC_ALPHA],equation:b.FUNC_REVERSE_SUBTRACT},this.glFormats=[b.BYTE,b.SHORT,b.UNSIGNED_BYTE,b.UNSIGNED_SHORT,b.FLOAT],this.glFuncMap={mat2:{func:b.uniformMatrix2fv,length:1,matrix:!0},mat3:{func:b.uniformMatrix3fv,length:1,matrix:!0},mat4:{func:b.uniformMatrix4fv,length:1,matrix:!0},"1f":{func:b.uniform1f,length:1},"1fv":{func:b.uniform1fv,length:1},"1i":{func:b.uniform1i,length:1},"1iv":{func:b.uniform1iv,length:1},"2f":{func:b.uniform2f,length:2},"2fv":{func:b.uniform2fv,length:1},"2i":{func:b.uniform2i,length:2},"2iv":{func:b.uniform2iv,length:1},"3f":{func:b.uniform3f,length:3},"3fv":{func:b.uniform3fv,length:1},"3i":{func:b.uniform3i,length:3},"3iv":{func:b.uniform3iv,length:1},"4f":{func:b.uniform4f,length:4},"4fv":{func:b.uniform4fv,length:1},"4i":{func:b.uniform4i,length:4},"4iv":{func:b.uniform4iv,length:1}},(!O.maxTextures||O.maxTextures===-1)&&(O.maxTextures=b.getParameter(b.MAX_TEXTURE_IMAGE_UNITS)),O.maxTextureSize||(O.maxTextureSize=b.getParameter(b.MAX_TEXTURE_SIZE)),this.compression=this.getCompressedTextures(),b.disable(b.DEPTH_TEST),b.disable(b.CULL_FACE),b.enable(b.BLEND),b.clearColor(K.redGL,K.greenGL,K.blueGL,K.alphaGL);var Y=["NEAREST","LINEAR","NEAREST_MIPMAP_NEAREST","LINEAR_MIPMAP_NEAREST","NEAREST_MIPMAP_LINEAR","LINEAR_MIPMAP_LINEAR"];return Y.indexOf(O.mipmapFilter)!==-1&&(this.mipmapFilter=b[O.mipmapFilter]),this.maxTextures=g.checkShaderMax(b,O.maxTextures),this.textureIndexes=[],this.createTemporaryTextures(),this.pipelines=new f(this),this.setBlendMode(n.BlendModes.NORMAL),this.projectionMatrix=new s().identity(),N.textures.once(p.READY,this.boot,this),this},boot:function(){var O=this.game,b=this.pipelines,N=O.scale.baseSize,V=N.width,K=N.height;this.width=V,this.height=K,this.isBooted=!0,this.renderTarget=new u(this,V,K,1,0,!0,!0),this.maskTarget=new u(this,V,K,1,0,!0,!0),this.maskSource=new u(this,V,K,1,0,!0,!0);var $=O.config;b.boot($.pipeline,$.defaultPipeline,$.autoMobilePipeline),this.blankTexture=O.textures.getFrame("__DEFAULT").glTexture,this.normalTexture=O.textures.getFrame("__NORMAL").glTexture,this.whiteTexture=O.textures.getFrame("__WHITE").glTexture;var j=this.gl;j.bindFramebuffer(j.FRAMEBUFFER,null),j.enable(j.SCISSOR_TEST),O.scale.on(d.RESIZE,this.onResize,this),this.resize(V,K)},createTemporaryTextures:function(){for(var O=this.gl,b=0;b0&&V>0;if(j&&X){var Y=j[0],D=j[1],z=j[2],W=j[3];X=Y!==O||D!==b||z!==N||W!==V}X&&(this.flush(),$.scissor(O,K-b-V,N,V))},resetScissor:function(){var O=this.gl;O.enable(O.SCISSOR_TEST);var b=this.currentScissor;if(b){var N=b[0],V=b[1],K=b[2],$=b[3];K>0&&$>0&&O.scissor(N,this.drawingBufferHeight-V-$,K,$)}},popScissor:function(){var O=this.scissorStack;O.pop();var b=O[O.length-1];b&&this.setScissor(b[0],b[1],b[2],b[3]),this.currentScissor=b},hasActiveStencilMask:function(){var O=this.currentMask.mask,b=this.currentCameraMask.mask;return O&&O.isStencil||b&&b.isStencil},resetViewport:function(){var O=this.gl;O.viewport(0,0,this.width,this.height),this.drawingBufferHeight=O.drawingBufferHeight},setBlendMode:function(O,b){b===void 0&&(b=!1);var N=this.gl,V=this.blendModes[O];return b||O!==n.BlendModes.SKIP_CHECK&&this.currentBlendMode!==O?(this.flush(),N.enable(N.BLEND),N.blendEquation(V.equation),V.func.length>2?N.blendFuncSeparate(V.func[0],V.func[1],V.func[2],V.func[3]):N.blendFunc(V.func[0],V.func[1]),this.currentBlendMode=O,!0):!1},addBlendMode:function(O,b){var N=this.blendModes.push({func:O,equation:b});return N-1},updateBlendMode:function(O,b,N){return this.blendModes[O]&&(this.blendModes[O].func=b,N&&(this.blendModes[O].equation=N)),this},removeBlendMode:function(O){return O>17&&this.blendModes[O]&&this.blendModes.splice(O,1),this},pushFramebuffer:function(O,b,N,V,K){return O===this.currentFramebuffer?this:(this.fboStack.push(O),this.setFramebuffer(O,b,N,V,K))},setFramebuffer:function(O,b,N,V,K){if(b===void 0&&(b=!1),N===void 0&&(N=!0),V===void 0&&(V=null),K===void 0&&(K=!1),O===this.currentFramebuffer)return this;var $=this.gl,j=this.width,X=this.height;return O&&O.renderTexture&&N?(j=O.renderTexture.width,X=O.renderTexture.height):this.flush(),O?$.bindFramebuffer($.FRAMEBUFFER,O.webGLFramebuffer):$.bindFramebuffer($.FRAMEBUFFER,null),N&&$.viewport(0,0,j,X),V&&$.framebufferTexture2D($.FRAMEBUFFER,$.COLOR_ATTACHMENT0,$.TEXTURE_2D,V.webGLTexture,0),K&&($.clearColor(0,0,0,0),$.clear($.COLOR_BUFFER_BIT)),b&&(O?(this.drawingBufferHeight=X,this.pushScissor(0,0,j,X)):(this.drawingBufferHeight=this.height,this.popScissor())),this.currentFramebuffer=O,this},popFramebuffer:function(O,b){O===void 0&&(O=!1),b===void 0&&(b=!0);var N=this.fboStack;N.pop();var V=N[N.length-1];return V||(V=null),this.setFramebuffer(V,O,b),V},restoreFramebuffer:function(O,b){O===void 0&&(O=!1),b===void 0&&(b=!0);var N=this.fboStack,V=N[N.length-1];V||(V=null),this.currentFramebuffer=null,this.setFramebuffer(V,O,b)},setProgram:function(O){return O!==this.currentProgram?(this.flush(),this.gl.useProgram(O.webGLProgram),this.currentProgram=O,!0):!1},resetProgram:function(){return this.gl.useProgram(this.currentProgram.webGLProgramWrapper),this},createTextureFromSource:function(O,b,N,V,K){K===void 0&&(K=!1);var $=this.gl,j=$.NEAREST,X=$.NEAREST,Y=$.CLAMP_TO_EDGE,D=null;b=O?O.width:b,N=O?O.height:N;var z=h(b,N);if(z&&!K&&(Y=$.REPEAT),V===n.ScaleModes.LINEAR&&this.config.antialias){var W=O&&O.compressed,H=!W&&z||W&&O.mipmaps.length>1;j=this.mipmapFilter&&H?this.mipmapFilter:$.LINEAR,X=$.LINEAR}return!O&&typeof b=="number"&&typeof N=="number"?D=this.createTexture2D(0,j,X,Y,Y,$.RGBA,null,b,N):D=this.createTexture2D(0,j,X,Y,Y,$.RGBA,O),D},createTexture2D:function(O,b,N,V,K,$,j,X,Y,D,z,W){typeof X!="number"&&(X=j?j.width:1),typeof Y!="number"&&(Y=j?j.height:1);var H=new S(this.gl,O,b,N,V,K,$,j,X,Y,D,z,W);return this.glTextureWrappers.push(H),H},createFramebuffer:function(O,b,N,V){this.currentFramebuffer=null;var K=new M(this.gl,O,b,N,V);return this.glFramebufferWrappers.push(K),K},beginBitmapMask:function(O,b){var N=this.gl;N&&(this.flush(),this.maskTarget.bind(!0),this.currentCameraMask.mask!==O&&(this.currentMask.mask=O,this.currentMask.camera=b))},drawBitmapMask:function(O,b,N){this.flush(),this.maskSource.bind(),this.setBlendMode(0,!0),O.renderWebGL(this,O,b),this.maskSource.unbind(!0),this.maskTarget.unbind();var V=this.gl,K=this.getCurrentStencilMask();K?(V.enable(V.STENCIL_TEST),K.mask.applyStencil(this,K.camera,!0)):this.currentMask.mask=null,this.pipelines.set(N),V.activeTexture(V.TEXTURE0),V.bindTexture(V.TEXTURE_2D,this.maskTarget.texture.webGLTexture),V.activeTexture(V.TEXTURE1),V.bindTexture(V.TEXTURE_2D,this.maskSource.texture.webGLTexture)},createProgram:function(O,b){var N=new T(this.gl,O,b);return this.glProgramWrappers.push(N),N},createVertexBuffer:function(O,b){var N=this.gl,V=new x(N,O,N.ARRAY_BUFFER,b);return this.glBufferWrappers.push(V),V},createAttribLocation:function(O,b){var N=new w(this.gl,O,b);return this.glAttribLocationWrappers.push(N),N},createUniformLocation:function(O,b){var N=new L(this.gl,O,b);return this.glUniformLocationWrappers.push(N),N},createIndexBuffer:function(O,b){var N=this.gl,V=new x(N,O,N.ELEMENT_ARRAY_BUFFER,b);return this.glBufferWrappers.push(V),V},deleteTexture:function(O){if(O)return c(this.glTextureWrappers,O),O.destroy(),this},deleteFramebuffer:function(O){return O?(c(this.fboStack,O),c(this.glFramebufferWrappers,O),O.destroy(),this):this},deleteProgram:function(O){return O&&(c(this.glProgramWrappers,O),O.destroy()),this},deleteAttribLocation:function(O){return O&&(c(this.glAttribLocationWrappers,O),O.destroy()),this},deleteUniformLocation:function(O){return O&&(c(this.glUniformLocationWrappers,O),O.destroy()),this},deleteBuffer:function(O){return O?(c(this.glBufferWrappers,O),O.destroy(),this):this},preRenderCamera:function(O){var b=O.x,N=O.y,V=O.width,K=O.height,$=O.backgroundColor;if(O.emit(o.PRE_RENDER,O),this.pipelines.preBatchCamera(O),this.pushScissor(b,N,V,K),O.mask&&(this.currentCameraMask.mask=O.mask,this.currentCameraMask.camera=O._maskCamera,O.mask.preRenderWebGL(this,O,O._maskCamera)),$.alphaGL>0){var j=this.pipelines.setMulti();j.drawFillRect(b,N,V,K,g.getTintFromFloats($.blueGL,$.greenGL,$.redGL,1),$.alphaGL)}},getCurrentStencilMask:function(){var O=null,b=this.maskStack,N=this.currentCameraMask;return b.length>0?O=b[b.length-1]:N.mask&&N.mask.isStencil&&(O=N),O},postRenderCamera:function(O){var b=O.flashEffect,N=O.fadeEffect;if(b.isRunning||N.isRunning||N.isComplete){var V=this.pipelines.setMulti();b.postRenderWebGL(V,g.getTintFromFloats),N.postRenderWebGL(V,g.getTintFromFloats)}O.dirty=!1,this.popScissor(),O.mask&&(this.currentCameraMask.mask=null,O.mask.postRenderWebGL(this,O._maskCamera)),this.pipelines.postBatchCamera(O),O.emit(o.POST_RENDER,O)},preRender:function(){if(!this.contextLost){var O=this.gl;if(O.bindFramebuffer(O.FRAMEBUFFER,null),this.config.clearBeforeRender){var b=this.config.backgroundColor;O.clearColor(b.redGL,b.greenGL,b.blueGL,b.alphaGL),O.clear(O.COLOR_BUFFER_BIT|O.DEPTH_BUFFER_BIT|O.STENCIL_BUFFER_BIT)}O.enable(O.SCISSOR_TEST),this.currentScissor=this.defaultScissor,this.scissorStack.length=0,this.scissorStack.push(this.currentScissor),this.game.scene.customViewports&&O.scissor(0,this.drawingBufferHeight-this.height,this.width,this.height),this.currentMask.mask=null,this.currentCameraMask.mask=null,this.maskStack.length=0,this.emit(i.PRE_RENDER)}},render:function(O,b,N){if(!this.contextLost){var V=b.length;if(this.emit(i.RENDER,O,N),this.preRenderCamera(N),V===0){this.setBlendMode(n.BlendModes.NORMAL),this.postRenderCamera(N);return}this.currentType="";for(var K=this.currentMask,$=0;${/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(95428),o=t(95540),r=t(14500),n=new a({initialize:function(i,h,s,l,f){this.pipeline=i,this.name=h,this.renderer=i.renderer,this.gl=this.renderer.gl,this.fragSrc=l,this.vertSrc=s,this.program=this.renderer.createProgram(s,l),this.attributes,this.vertexComponentCount=0,this.vertexSize=0,this.uniforms={},this.createAttributes(f),this.createUniforms()},createAttributes:function(e){var i=0,h=0,s=[];this.vertexComponentCount=0;for(var l=0;l=0?(i.enableVertexAttribArray(M.webGLAttribLocation),i.vertexAttribPointer(M.webGLAttribLocation,p,g,S,s,y),d.enabled=!0,d.location=M):M.webGLAttribLocation!==-1&&i.disableVertexAttribArray(M.webGLAttribLocation)}else x?i.vertexAttribPointer(T.webGLAttribLocation,p,g,S,s,y):!x&&T!==-1&&T.webGLAttribLocation>-1&&(i.disableVertexAttribArray(T.webGLAttribLocation),d.location=-1)}return this},createUniforms:function(){var e=this.gl,i=this.program,h=this.uniforms,s,l,f,u=e.getProgramParameter(i.webGLProgram,e.ACTIVE_UNIFORMS);for(s=0;s0&&(l=l.substr(0,p),h.hasOwnProperty(l)||(f=this.renderer.createUniformLocation(i,l),f!==null&&(h[l]={name:l,location:f,setter:null,value1:null,value2:null,value3:null,value4:null})))}}return this},syncUniforms:function(){var e=this.gl;this.renderer.setProgram(this.program);for(var i in this.uniforms){var h=this.uniforms[i];h.setter&&h.setter.call(e,h.location.webGLUniformLocation,h.value1,h.value2,h.value3,h.value4)}},hasUniform:function(e){return this.uniforms.hasOwnProperty(e)},resetUniform:function(e){var i=this.uniforms[e];return i&&(i.value1=null,i.value2=null,i.value3=null,i.value4=null),this},setUniform1:function(e,i,h,s){var l=this.uniforms[i];return l?((s||l.value1!==h)&&(l.setter||(l.setter=e),l.value1=h,this.renderer.setProgram(this.program),e.call(this.gl,l.location.webGLUniformLocation,h),this.pipeline.currentShader=this),this):this},setUniform2:function(e,i,h,s,l){var f=this.uniforms[i];return f?((l||f.value1!==h||f.value2!==s)&&(f.setter||(f.setter=e),f.value1=h,f.value2=s,this.renderer.setProgram(this.program),e.call(this.gl,f.location.webGLUniformLocation,h,s),this.pipeline.currentShader=this),this):this},setUniform3:function(e,i,h,s,l,f){var u=this.uniforms[i];return u?((f||u.value1!==h||u.value2!==s||u.value3!==l)&&(u.setter||(u.setter=e),u.value1=h,u.value2=s,u.value3=l,this.renderer.setProgram(this.program),e.call(this.gl,u.location.webGLUniformLocation,h,s,l),this.pipeline.currentShader=this),this):this},setUniform4:function(e,i,h,s,l,f,u){var d=this.uniforms[i];return d?((u||d.value1!==h||d.value2!==s||d.value3!==l||d.value4!==f)&&(d.setter||(d.setter=e),d.value1=h,d.value2=s,d.value3=l,d.value4=f,this.renderer.setProgram(this.program),e.call(this.gl,d.location.webGLUniformLocation,h,s,l,f),this.pipeline.currentShader=this),this):this},setBoolean:function(e,i){return this.setUniform1(this.gl.uniform1i,e,Number(i))},set1f:function(e,i){return this.setUniform1(this.gl.uniform1f,e,i)},set2f:function(e,i,h){return this.setUniform2(this.gl.uniform2f,e,i,h)},set3f:function(e,i,h,s){return this.setUniform3(this.gl.uniform3f,e,i,h,s)},set4f:function(e,i,h,s,l){return this.setUniform4(this.gl.uniform4f,e,i,h,s,l)},set1fv:function(e,i){return this.setUniform1(this.gl.uniform1fv,e,i,!0)},set2fv:function(e,i){return this.setUniform1(this.gl.uniform2fv,e,i,!0)},set3fv:function(e,i){return this.setUniform1(this.gl.uniform3fv,e,i,!0)},set4fv:function(e,i){return this.setUniform1(this.gl.uniform4fv,e,i,!0)},set1iv:function(e,i){return this.setUniform1(this.gl.uniform1iv,e,i,!0)},set2iv:function(e,i){return this.setUniform1(this.gl.uniform2iv,e,i,!0)},set3iv:function(e,i){return this.setUniform1(this.gl.uniform3iv,e,i,!0)},set4iv:function(e,i){return this.setUniform1(this.gl.uniform4iv,e,i,!0)},set1i:function(e,i){return this.setUniform1(this.gl.uniform1i,e,i)},set2i:function(e,i,h){return this.setUniform2(this.gl.uniform2i,e,i,h)},set3i:function(e,i,h,s){return this.setUniform3(this.gl.uniform3i,e,i,h,s)},set4i:function(e,i,h,s,l){return this.setUniform4(this.gl.uniform4i,e,i,h,s,l)},setMatrix2fv:function(e,i,h){return this.setUniform2(this.gl.uniformMatrix2fv,e,i,h,!0)},setMatrix3fv:function(e,i,h){return this.setUniform2(this.gl.uniformMatrix3fv,e,i,h,!0)},setMatrix4fv:function(e,i,h){return this.setUniform2(this.gl.uniformMatrix4fv,e,i,h,!0)},createProgram:function(e,i){return e===void 0&&(e=this.vertSrc),i===void 0&&(i=this.fragSrc),this.program&&this.renderer.deleteProgram(this.program),this.vertSrc=e,this.fragSrc=i,this.program=this.renderer.createProgram(e,i),this.createUniforms(),this.rebind()},destroy:function(){var e=this.renderer;c(this.uniforms,function(i){e.deleteUniformLocation(i.location)}),this.uniforms=null,c(this.attributes,function(i){e.deleteAttribLocation(i.location)}),this.attributes=null,e.deleteProgram(this.program),this.pipeline=null,this.renderer=null,this.gl=null,this.program=null}});v.exports=n},14500:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m={BYTE:{enum:5120,size:1},UNSIGNED_BYTE:{enum:5121,size:1},SHORT:{enum:5122,size:2},UNSIGNED_SHORT:{enum:5123,size:2},INT:{enum:5124,size:4},UNSIGNED_INT:{enum:5125,size:4},FLOAT:{enum:5126,size:4}};v.exports=m},4159:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(14500),c=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=c(!1,o,a),v.exports=o},31302:(v,m,t)=>{/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(95540),o=t(78908),r=t(85191),n=t(14500),e=t(29100),i=new a({Extends:e,initialize:function(s){s.fragShader=c(s,"fragShader",o),s.vertShader=c(s,"vertShader",r),s.batchSize=c(s,"batchSize",1),s.vertices=c(s,"vertices",[-1,1,-1,-7,7,1]),s.attributes=c(s,"attributes",[{name:"inPosition",size:2,type:n.FLOAT}]),e.call(this,s)},boot:function(){e.prototype.boot.call(this),this.set1i("uMainSampler",0),this.set1i("uMaskSampler",1)},resize:function(h,s){e.prototype.resize.call(this,h,s),this.set2f("uResolution",h,s)},beginMask:function(h,s,l){this.renderer.beginBitmapMask(h,l)},endMask:function(h,s,l){var f=this.gl,u=this.renderer,d=h.bitmapMask;d&&f&&(u.drawBitmapMask(d,s,this),l&&this.set2f("uResolution",l.width,l.height),this.set1i("uInvertMaskAlpha",h.invertAlpha),f.drawArrays(this.topology,0,3),l&&this.set2f("uResolution",this.width,this.height),f.bindTexture(f.TEXTURE_2D,null))}});v.exports=i},92651:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(58918),o=t(14811),r=t(95540),n=t(43558),e=t(89350),i=t(70554),h=new a({Extends:n,initialize:function(l){l.shaders=[i.setGlowQuality(e.FXGlowFrag,l.game),e.FXShadowFrag,e.FXPixelateFrag,e.FXVignetteFrag,e.FXShineFrag,e.FXBlurLowFrag,e.FXBlurMedFrag,e.FXBlurHighFrag,e.FXGradientFrag,e.FXBloomFrag,e.ColorMatrixFrag,e.FXCircleFrag,e.FXBarrelFrag,e.FXDisplacementFrag,e.FXWipeFrag,e.FXBokehFrag],n.call(this,l);var f=this.game;this.glow=new c.Glow(f),this.shadow=new c.Shadow(f),this.pixelate=new c.Pixelate(f),this.vignette=new c.Vignette(f),this.shine=new c.Shine(f),this.gradient=new c.Gradient(f),this.circle=new c.Circle(f),this.barrel=new c.Barrel(f),this.wipe=new c.Wipe(f),this.bokeh=new c.Bokeh(f);var u=[];u[o.GLOW]=this.onGlow,u[o.SHADOW]=this.onShadow,u[o.PIXELATE]=this.onPixelate,u[o.VIGNETTE]=this.onVignette,u[o.SHINE]=this.onShine,u[o.BLUR]=this.onBlur,u[o.GRADIENT]=this.onGradient,u[o.BLOOM]=this.onBloom,u[o.COLOR_MATRIX]=this.onColorMatrix,u[o.CIRCLE]=this.onCircle,u[o.BARREL]=this.onBarrel,u[o.DISPLACEMENT]=this.onDisplacement,u[o.WIPE]=this.onWipe,u[o.BOKEH]=this.onBokeh,this.fxHandlers=u,this.source,this.target,this.swap},onDraw:function(s,l,f){this.source=s,this.target=l,this.swap=f;var u=s.width,d=s.height,p=this.tempSprite,g=this.fxHandlers;if(p&&p.preFX)for(var y=p.preFX.list,x=0;x{/** + * @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),c=t(95540),o=t(31063),r=t(57516),n=t(61340),e=t(26099),i=t(29100),h=new a({Extends:r,initialize:function(l){var f=c(l,"fragShader",o);l.fragShader=f.replace("%LIGHT_COUNT%",l.game.renderer.config.maxLights),r.call(this,l),this.inverseRotationMatrix=new Float32Array([1,0,0,0,1,0,0,0,1]),this.currentNormalMap,this.lightsActive=!0,this.tempVec2=new e,this._tempMatrix=new n,this._tempMatrix2=new n},boot:function(){i.prototype.boot.call(this)},onRender:function(s,l){var f=s.sys.lights;if(this.lightsActive=!1,!(!f||!f.active)){var u=f.getLights(l),d=u.length;this.lightsActive=!0;var p,g=this.renderer,y=g.height,x=l.matrix,T=this.tempVec2;for(this.set1i("uMainSampler",0),this.set1i("uNormSampler",1),this.set2f("uResolution",this.width/2,this.height/2),this.set4f("uCamera",l.x,l.y,l.rotation,l.zoom),this.set3f("uAmbientLightColor",f.ambientColor.r,f.ambientColor.g,f.ambientColor.b),this.set1i("uLightCount",d),p=0;p0&&this.flush();var l=this.inverseRotationMatrix;if(s){var f=-s,u=Math.cos(f),d=Math.sin(f);l[1]=d,l[3]=-d,l[0]=l[4]=u}else l[0]=l[4]=1,l[1]=l[3]=0;this.setMatrix3fv("uInverseRotationMatrix",!1,l),this.currentNormalMapRotation=s}},setTexture2D:function(s,l){var f=this.renderer;s===void 0&&(s=f.whiteTexture);var u=this.getNormalMap(l);this.isNewNormalMap(s,u)&&(this.flush(),this.createBatch(s),this.addTextureToBatch(u),this.currentNormalMap=u);var d=0;if(l&&l.parentContainer){var p=l.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2);d=p.rotationNormalized}else l&&(d=l.rotation);return this.setNormalMapRotation(d),0},setGameObject:function(s,l){l===void 0&&(l=s.frame);var f=l.glTexture,u=this.getNormalMap(s);if(this.isNewNormalMap(f,u)&&(this.flush(),this.createBatch(f),this.addTextureToBatch(u),this.currentNormalMap=u),s.parentContainer){var d=s.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2);this.setNormalMapRotation(d.rotationNormalized)}else this.setNormalMapRotation(s.rotation);return 0},isNewNormalMap:function(s,l){return this.currentTexture!==s||this.currentNormalMap!==l},getNormalMap:function(s){var l;if(s)s.displayTexture?l=s.displayTexture.dataSource[s.displayFrame.sourceIndex]:s.texture?l=s.texture.dataSource[s.frame.sourceIndex]:s.tileset&&(Array.isArray(s.tileset)?l=s.tileset[0].image.dataSource[0]:l=s.tileset.image.dataSource[0]);else return this.renderer.normalTexture;return l?l.glTexture:this.renderer.normalTexture},batchSprite:function(s,l,f){this.lightsActive&&r.prototype.batchSprite.call(this,s,l,f)},batchTexture:function(s,l,f,u,d,p,g,y,x,T,S,M,w,L,F,O,b,N,V,K,$,j,X,Y,D,z,W,H,J,Q,k,et){this.lightsActive&&r.prototype.batchTexture.call(this,s,l,f,u,d,p,g,y,x,T,S,M,w,L,F,O,b,N,V,K,$,j,X,Y,D,z,W,H,J,Q,k,et)},batchTextureFrame:function(s,l,f,u,d,p,g){this.lightsActive&&r.prototype.batchTextureFrame.call(this,s,l,f,u,d,p,g)}});v.exports=h},56527:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(95540),o=t(57516),r=t(45561),n=t(60722),e=t(14500),i=t(29100),h=new a({Extends:o,initialize:function(l){l.fragShader=c(l,"fragShader",r),l.vertShader=c(l,"vertShader",n),l.attributes=c(l,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:e.UNSIGNED_BYTE,normalized:!0}]),l.forceZero=!0,l.resizeUniform="uResolution",o.call(this,l)},boot:function(){i.prototype.boot.call(this);var s=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",s.width,s.height),this.set1i("uRoundPixels",s.config.roundPixels)}});v.exports=h},57516:(v,m,t)=>{/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(94811),o=t(95540),r=t(98840),n=t(44667),e=t(61340),i=t(70554),h=t(14500),s=t(29100),l=new a({Extends:s,initialize:function(u){var d=u.game.renderer,p=o(u,"fragShader",r);u.fragShader=i.parseFragmentShaderMaxTextures(p,d.maxTextures),u.vertShader=o(u,"vertShader",n),u.attributes=o(u,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:h.UNSIGNED_BYTE,normalized:!0}]),u.resizeUniform="uResolution",s.call(this,u),this._tempMatrix1=new e,this._tempMatrix2=new e,this._tempMatrix3=new e,this.calcMatrix=new e,this.tempTriangle=[{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0}],this.strokeTint={TL:0,TR:0,BL:0,BR:0},this.fillTint={TL:0,TR:0,BL:0,BR:0},this.currentFrame={u0:0,v0:0,u1:1,v1:1},this.firstQuad=[0,0,0,0,0],this.prevQuad=[0,0,0,0,0],this.polygonCache=[]},boot:function(){s.prototype.boot.call(this);var f=this.renderer;this.set1iv("uMainSampler",f.textureIndexes),this.set2f("uResolution",f.width,f.height),this.set1i("uRoundPixels",f.config.roundPixels)},batchSprite:function(f,u,d){this.manager.set(this,f);var p=this._tempMatrix1,g=this._tempMatrix2,y=this._tempMatrix3,x=f.frame,T=x.glTexture,S=x.u0,M=x.v0,w=x.u1,L=x.v1,F=x.x,O=x.y,b=x.cutWidth,N=x.cutHeight,V=x.customPivot,K=f.displayOriginX,$=f.displayOriginY,j=-K+F,X=-$+O;if(f.isCropped){var Y=f._crop;(Y.flipX!==f.flipX||Y.flipY!==f.flipY)&&x.updateCropUVs(Y,f.flipX,f.flipY),S=Y.u0,M=Y.v0,w=Y.u1,L=Y.v1,b=Y.width,N=Y.height,F=Y.x,O=Y.y,j=-K+F,X=-$+O}var D=1,z=1;f.flipX&&(V||(j+=-x.realWidth+K*2),D=-1),f.flipY&&(V||(X+=-x.realHeight+$*2),z=-1);var W=f.x,H=f.y;g.applyITRS(W,H,f.rotation,f.scaleX*D,f.scaleY*z),p.copyFrom(u.matrix),d?(p.multiplyWithOffset(d,-u.scrollX*f.scrollFactorX,-u.scrollY*f.scrollFactorY),g.e=W,g.f=H):(g.e-=u.scrollX*f.scrollFactorX,g.f-=u.scrollY*f.scrollFactorY),p.multiply(g,y);var J=y.setQuad(j,X,j+b,X+N),Q=i.getTintAppendFloatAlpha,k=u.alpha,et=Q(f.tintTopLeft,k*f._alphaTL),st=Q(f.tintTopRight,k*f._alphaTR),rt=Q(f.tintBottomLeft,k*f._alphaBL),ot=Q(f.tintBottomRight,k*f._alphaBR);this.shouldFlush(6)&&this.flush();var ft=this.setGameObject(f,x);this.manager.preBatch(f),this.currentShader.set1i("uRoundPixels",u.roundPixels),this.batchQuad(f,J[0],J[1],J[2],J[3],J[4],J[5],J[6],J[7],S,M,w,L,et,st,rt,ot,f.tintFill,T,ft),this.manager.postBatch(f)},batchTexture:function(f,u,d,p,g,y,x,T,S,M,w,L,F,O,b,N,V,K,$,j,X,Y,D,z,W,H,J,Q,k,et,st,rt,ot){ot===void 0&&(ot=!1),this.manager.set(this,f);var ft=this._tempMatrix1,at=this._tempMatrix2,ct=this._tempMatrix3,Et=K/d+J,St=$/p+Q,Ct=(K+j)/d+J,vt=($+X)/p+Q,Tt=x,pt=T,At=-N,Dt=-V;if(f.isCropped){var Ht=f._crop,Gt=Ht.width,Vt=Ht.height;Tt=Gt,pt=Vt,x=Gt,T=Vt,K=Ht.x,$=Ht.y;var It=K,te=$;L&&(It=j-Ht.x-Gt),F&&(te=X-Ht.y-Vt),Et=It/d+J,St=te/p+Q,Ct=(It+Gt)/d+J,vt=(te+Vt)/p+Q,At=-N+K,Dt=-V+$}F=F^(!st&&u.isRenderTexture?1:0),L&&(Tt*=-1,At+=x),F&&(pt*=-1,Dt+=T),at.applyITRS(g,y,w,S,M),ft.copyFrom(k.matrix),et?(ft.multiplyWithOffset(et,-k.scrollX*O,-k.scrollY*b),at.e=g,at.f=y):(at.e-=k.scrollX*O,at.f-=k.scrollY*b),ft.multiply(at,ct);var $t=ct.setQuad(At,Dt,At+Tt,Dt+pt);rt==null&&(rt=this.setTexture2D(u)),f&&!ot&&this.manager.preBatch(f),this.currentShader.set1i("uRoundPixels",k.roundPixels),this.batchQuad(f,$t[0],$t[1],$t[2],$t[3],$t[4],$t[5],$t[6],$t[7],Et,St,Ct,vt,Y,D,z,W,H,u,rt),f&&!ot&&this.manager.postBatch(f)},batchTextureFrame:function(f,u,d,p,g,y,x){this.manager.set(this);var T=this._tempMatrix1.copyFrom(y),S=this._tempMatrix2;x?T.multiply(x,S):S=T;var M=S.setQuad(u,d,u+f.width,d+f.height),w=this.setTexture2D(f.source.glTexture);p=i.getTintAppendFloatAlpha(p,g),this.batchQuad(null,M[0],M[1],M[2],M[3],M[4],M[5],M[6],M[7],f.u0,f.v0,f.u1,f.v1,p,p,p,p,0,f.glTexture,w)},batchFillRect:function(f,u,d,p,g,y){this.renderer.pipelines.set(this);var x=this.calcMatrix;y&&y.multiply(g,x);var T=x.setQuad(f,u,f+d,u+p),S=this.fillTint;this.batchQuad(null,T[0],T[1],T[2],T[3],T[4],T[5],T[6],T[7],0,0,1,1,S.TL,S.TR,S.BL,S.BR,2)},batchFillTriangle:function(f,u,d,p,g,y,x,T){this.renderer.pipelines.set(this);var S=this.calcMatrix;T&&T.multiply(x,S);var M=S.getX(f,u),w=S.getY(f,u),L=S.getX(d,p),F=S.getY(d,p),O=S.getX(g,y),b=S.getY(g,y),N=this.fillTint;this.currentShader.set1i("uRoundPixels",!1),this.batchTri(null,M,w,L,F,O,b,0,0,1,1,N.TL,N.TR,N.BL,2)},batchStrokeTriangle:function(f,u,d,p,g,y,x,T,S){var M=this.tempTriangle;M[0].x=f,M[0].y=u,M[0].width=x,M[1].x=d,M[1].y=p,M[1].width=x,M[2].x=g,M[2].y=y,M[2].width=x,M[3].x=f,M[3].y=u,M[3].width=x,this.batchStrokePath(M,x,!1,T,S)},batchFillPath:function(f,u,d){this.renderer.pipelines.set(this);var p=this.calcMatrix;d&&d.multiply(u,p);for(var g=f.length,y=this.polygonCache,x,T,S=this.fillTint.TL,M=this.fillTint.TR,w=this.fillTint.BL,L=0;L0&&Tt[4]?this.batchQuad(null,ft,at,et,st,Tt[0],Tt[1],Tt[2],Tt[3],0,0,1,1,Et,St,Ct,vt,2):(pt[0]=ft,pt[1]=at,pt[2]=et,pt[3]=st,pt[4]=1),S&&pt[4]?this.batchQuad(null,Q,k,rt,ot,pt[0],pt[1],pt[2],pt[3],0,0,1,1,Et,St,Ct,vt,2):(Tt[0]=Q,Tt[1]=k,Tt[2]=rt,Tt[3]=ot,Tt[4]=1)}}},destroy:function(){return this._tempMatrix1.destroy(),this._tempMatrix2.destroy(),this._tempMatrix3.destroy(),this._tempMatrix1=null,this._tempMatrix1=null,this._tempMatrix1=null,s.prototype.destroy.call(this),this}});v.exports=l},43439:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(95540),o=t(4127),r=t(89924),n=t(29100),e=new a({Extends:n,initialize:function(h){h.vertShader=c(h,"vertShader",r),h.fragShader=c(h,"fragShader",o),h.attributes=c(h,"attributes",[{name:"inPosition",size:2},{name:"inLightPosition",size:2},{name:"inLightRadius"},{name:"inLightAttenuation"},{name:"inLightColor",size:4}]),n.call(this,h)},onRender:function(i,h){this.set2f("uResolution",this.width,this.height),this.set1f("uCameraZoom",h.zoom)},batchPointLight:function(i,h,s,l,f,u,d,p,g,y,x,T){var S=i.color,M=i.intensity,w=i.radius,L=i.attenuation,F=S.r*M,O=S.g*M,b=S.b*M,N=h.alpha*i.alpha;this.shouldFlush(6)&&this.flush(),this.currentBatch||this.setTexture2D(),this.batchLightVert(s,l,x,T,w,L,F,O,b,N),this.batchLightVert(f,u,x,T,w,L,F,O,b,N),this.batchLightVert(d,p,x,T,w,L,F,O,b,N),this.batchLightVert(s,l,x,T,w,L,F,O,b,N),this.batchLightVert(d,p,x,T,w,L,F,O,b,N),this.batchLightVert(g,y,x,T,w,L,F,O,b,N),this.currentBatch.count=this.vertexCount-this.currentBatch.start},batchLightVert:function(i,h,s,l,f,u,d,p,g,y){var x=this.vertexViewF32,T=this.vertexCount*this.currentShader.vertexComponentCount-1;x[++T]=i,x[++T]=h,x[++T]=s,x[++T]=l,x[++T]=f,x[++T]=u,x[++T]=d,x[++T]=p,x[++T]=g,x[++T]=y,this.vertexCount++}});v.exports=e},84057:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(89422),o=t(95540),r=t(27681),n=t(49627),e=t(29100),i=new a({Extends:e,initialize:function(s){s.renderTarget=o(s,"renderTarget",1),s.fragShader=o(s,"fragShader",r),s.vertShader=o(s,"vertShader",n),s.attributes=o(s,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),s.batchSize=1,s.vertices=[-1,-1,0,0,-1,1,0,1,1,1,1,1,-1,-1,0,0,1,1,1,1,1,-1,1,0],e.call(this,s),this.isPostFX=!0,this.gameObject,this.controller,this.colorMatrix=new c,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2,this.renderer.isBooted&&(this.manager=this.renderer.pipelines)},bootFX:function(){e.prototype.boot.call(this);var h=this.manager.UTILITY_PIPELINE;this.fullFrame1=h.fullFrame1,this.fullFrame2=h.fullFrame2,this.halfFrame1=h.halfFrame1,this.halfFrame2=h.halfFrame2;var s=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",s.width,s.height),this.set1i("uRoundPixels",s.config.roundPixels);for(var l=this.renderTargets,f=0;f{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(10312),c=t(67502),o=t(83419),r=t(96293),n=t(95540),e=t(57516),i=t(27681),h=t(87841),s=t(32302),l=t(45561),f=t(60722),u=t(29100),d=new o({Extends:e,initialize:function(g){var y=n(g,"fragShader",i),x=n(g,"vertShader",f),T=n(g,"drawShader",i),S=[{name:"DrawSprite",fragShader:l,vertShader:f},{name:"CopySprite",fragShader:y,vertShader:x},{name:"DrawGame",fragShader:T,vertShader:f},{name:"ColorMatrix",fragShader:r}],M=n(g,"shaders",[]);g.shaders=S.concat(M),g.vertShader||(g.vertShader=x),g.batchSize=1,e.call(this,g),this.isPreFX=!0,this.customMainSampler=null,this.drawSpriteShader,this.copyShader,this.gameShader,this.colorMatrixShader,this.quadVertexData,this.quadVertexBuffer,this.quadVertexViewF32,this.spriteBounds=new h,this.targetBounds=new h,this.fsTarget,this.tempSprite,this.renderer.isBooted&&(this.manager=this.renderer.pipelines,this.boot())},boot:function(){u.prototype.boot.call(this);var p=this.shaders,g=this.renderer;this.drawSpriteShader=p[0],this.copyShader=p[1],this.gameShader=p[2],this.colorMatrixShader=p[3],this.fsTarget=new s(g,g.width,g.height,1,0,!0,!0),this.renderTargets=this.manager.renderTargets.concat(this.fsTarget);var y=new ArrayBuffer(168);this.quadVertexData=y,this.quadVertexViewF32=new Float32Array(y),this.quadVertexBuffer=g.createVertexBuffer(y,this.gl.STATIC_DRAW),this.onResize(g.width,g.height),this.currentShader=this.copyShader,this.set2f("uResolution",g.width,g.height),this.set1i("uRoundPixels",g.config.roundPixels)},onResize:function(p,g){var y=this.quadVertexViewF32;y[1]=g,y[22]=g,y[14]=p,y[28]=p,y[35]=p,y[36]=g},batchQuad:function(p,g,y,x,T,S,M,w,L,F,O,b,N,V,K,$,j,X,Y){var D=Math.min(g,x,S,w),z=Math.min(y,T,M,L),W=Math.max(g,x,S,w),H=Math.max(y,T,M,L),J=W-D,Q=H-z,k=this.spriteBounds.setTo(D,z,J,Q),et=p?p.preFX.padding:0,st=J+et*2,rt=Q+et*2,ot=Math.abs(Math.max(st,rt)),ft=this.manager.getRenderTarget(ot),at=this.targetBounds.setTo(0,0,ft.width,ft.height);c(at,k.centerX,k.centerY),this.tempSprite=p;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),p&&(this.onDrawSprite(p,ft),p.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(Y),this.batchVert(g,y,F,O,0,X,V),this.batchVert(x,T,F,N,0,X,$),this.batchVert(S,M,b,N,0,X,j),this.batchVert(g,y,F,O,0,X,V),this.batchVert(S,M,b,N,0,X,j),this.batchVert(w,L,b,O,0,X,K),this.flush(),this.flipProjectionMatrix(!1),ct.activeTexture(ct.TEXTURE0),ct.bindTexture(ct.TEXTURE_2D,ft.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(p),this.currentShader=this.copyShader,this.onDraw(ft,this.manager.getSwapRenderTarget(),this.manager.getAltSwapRenderTarget()),!0},onDrawSprite:function(){},onCopySprite:function(){},copySprite:function(p,g,y,x,T,S,M){y===void 0&&(y=!0),x===void 0&&(x=!0),T===void 0&&(T=!1),M===void 0&&(M=this.copyShader);var w=this.gl,L=this.tempSprite;S&&(M=this.colorMatrixShader),this.currentShader=M;var F=this.setVertexBuffer(this.quadVertexBuffer);M.bind(F,!1);var O=this.renderer;if(this.set1i("uMainSampler",0),this.set2f("uResolution",O.width,O.height),this.set1i("uRoundPixels",O.config.roundPixels),L.preFX.onFXCopy(this),this.onCopySprite(p,g,L),S&&(this.set1fv("uColorMatrix",S.getData()),this.set1f("uAlpha",S.alpha)),w.activeTexture(w.TEXTURE0),w.bindTexture(w.TEXTURE_2D,p.texture.webGLTexture),p.height>g.height)w.viewport(0,0,p.width,p.height),this.setTargetUVs(p,g);else{var b=g.height-p.height;w.viewport(0,b,p.width,p.height),this.resetUVs()}if(w.bindFramebuffer(w.FRAMEBUFFER,g.framebuffer.webGLFramebuffer),w.framebufferTexture2D(w.FRAMEBUFFER,w.COLOR_ATTACHMENT0,w.TEXTURE_2D,g.texture.webGLTexture,0),y&&(w.clearColor(0,0,0,+!x),w.clear(w.COLOR_BUFFER_BIT)),T){var N=this.renderer.currentBlendMode;this.renderer.setBlendMode(a.ERASE)}w.bufferData(w.ARRAY_BUFFER,this.quadVertexData,w.STATIC_DRAW),w.drawArrays(w.TRIANGLES,0,6),T&&this.renderer.setBlendMode(N),w.bindFramebuffer(w.FRAMEBUFFER,null)},copy:function(p,g){var y=this.gl;this.set1i("uMainSampler",0),y.activeTexture(y.TEXTURE0),y.bindTexture(y.TEXTURE_2D,p.texture.webGLTexture),y.viewport(0,0,p.width,p.height),this.setUVs(0,0,0,1,1,1,1,0),y.bindFramebuffer(y.FRAMEBUFFER,g.framebuffer.webGLFramebuffer),y.framebufferTexture2D(y.FRAMEBUFFER,y.COLOR_ATTACHMENT0,y.TEXTURE_2D,g.texture.webGLTexture,0),y.clearColor(0,0,0,0),y.clear(y.COLOR_BUFFER_BIT),y.bufferData(y.ARRAY_BUFFER,this.quadVertexData,y.STATIC_DRAW),y.drawArrays(y.TRIANGLES,0,6),y.bindFramebuffer(y.FRAMEBUFFER,null)},blendFrames:function(p,g,y,x,T){this.manager.blendFrames(p,g,y,x,T)},blendFramesAdditive:function(p,g,y,x,T){this.manager.blendFramesAdditive(p,g,y,x,T)},drawToGame:function(p){this.currentShader=null,this.setShader(this.copyShader),this.bindAndDraw(p)},copyToGame:function(p){this.currentShader=null,this.setShader(this.gameShader),this.bindAndDraw(p)},bindAndDraw:function(p){var g=this.gl,y=this.renderer;this.set1i("uMainSampler",0),this.customMainSampler?this.setTexture2D(this.customMainSampler):this.setTexture2D(p.texture);var x=this._tempMatrix1.loadIdentity(),T=this.targetBounds.x,S=this.targetBounds.y,M=T+p.width,w=S+p.height,L=x.getX(T,S),F=x.getX(T,w),O=x.getX(M,w),b=x.getX(M,S),N=x.getY(T,S),V=x.getY(T,w),K=x.getY(M,w),$=x.getY(M,S),j=16777215;this.batchVert(L,N,0,0,0,0,j),this.batchVert(F,V,0,1,0,0,j),this.batchVert(O,K,1,1,0,0,j),this.batchVert(L,N,0,0,0,0,j),this.batchVert(O,K,1,1,0,0,j),this.batchVert(b,$,1,0,0,0,j),y.restoreFramebuffer(!1,!0),y.currentFramebuffer||g.viewport(0,0,y.width,y.height),y.restoreStencilMask(),this.flush(),this.tempSprite=null},onDraw:function(p){this.drawToGame(p)},setUVs:function(p,g,y,x,T,S,M,w){var L=this.quadVertexViewF32;L[2]=p,L[3]=g,L[9]=y,L[10]=x,L[16]=T,L[17]=S,L[23]=p,L[24]=g,L[30]=T,L[31]=S,L[37]=M,L[38]=w},setTargetUVs:function(p,g){var y=g.height/p.height;y>.5?y=.5-(y-.5):y=.5+(.5-y),this.setUVs(0,y,0,1+y,1,1+y,1,y)},resetUVs:function(){this.setUVs(0,0,0,1,1,1,1,0)},destroy:function(){return this.renderer.deleteBuffer(this.quadVertexBuffer),this.drawSpriteShader=null,this.copyShader=null,this.gameShader=null,this.colorMatrixShader=null,this.quadVertexData=null,this.quadVertexBuffer=null,this.quadVertexViewF32=null,this.fsTarget=null,this.tempSprite=null,e.prototype.destroy.call(this),this}});v.exports=d},81041:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(95540),o=t(57516),r=new a({Extends:o,initialize:function(e){e.topology=5,e.batchSize=c(e,"batchSize",256),o.call(this,e)}});v.exports=r},12385:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(95540),o=t(57516),r=t(45561),n=t(60722),e=t(29100),i=new a({Extends:o,initialize:function(s){s.fragShader=c(s,"fragShader",r),s.vertShader=c(s,"vertShader",n),s.forceZero=!0,o.call(this,s)},boot:function(){e.prototype.boot.call(this);var h=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",h.width,h.height),this.set1i("uRoundPixels",h.config.roundPixels)}});v.exports=i},7589:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(35407),c=t(10312),o=t(83419),r=t(89422),n=t(96293),e=t(36682),i=t(95540),h=t(48247),s=t(49627),l=t(29100),f=new o({Extends:l,initialize:function(d){d.renderTarget=i(d,"renderTarget",[{scale:1,autoResize:!0},{scale:1,autoResize:!0},{scale:.5,autoResize:!0},{scale:.5,autoResize:!0}]),d.vertShader=i(d,"vertShader",s),d.shaders=i(d,"shaders",[{name:"Copy",fragShader:e},{name:"AddBlend",fragShader:a},{name:"LinearBlend",fragShader:h},{name:"ColorMatrix",fragShader:n}]),d.attributes=i(d,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),d.vertices=[-1,-1,0,0,-1,1,0,1,1,1,1,1,-1,-1,0,0,1,1,1,1,1,-1,1,0],d.batchSize=1,l.call(this,d),this.colorMatrix=new r,this.copyShader,this.addShader,this.linearShader,this.colorMatrixShader,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2},boot:function(){l.prototype.boot.call(this);var u=this.shaders,d=this.renderTargets;this.copyShader=u[0],this.addShader=u[1],this.linearShader=u[2],this.colorMatrixShader=u[3],this.fullFrame1=d[0],this.fullFrame2=d[1],this.halfFrame1=d[2],this.halfFrame2=d[3]},copyFrame:function(u,d,p,g,y){p===void 0&&(p=1),g===void 0&&(g=!0),y===void 0&&(y=!0);var x=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",p),x.activeTexture(x.TEXTURE0),x.bindTexture(x.TEXTURE_2D,u.texture.webGLTexture),d?(x.viewport(0,0,d.width,d.height),x.bindFramebuffer(x.FRAMEBUFFER,d.framebuffer.webGLFramebuffer),x.framebufferTexture2D(x.FRAMEBUFFER,x.COLOR_ATTACHMENT0,x.TEXTURE_2D,d.texture.webGLTexture,0)):x.viewport(0,0,u.width,u.height),g&&(y?x.clearColor(0,0,0,0):x.clearColor(0,0,0,1),x.clear(x.COLOR_BUFFER_BIT)),x.bufferData(x.ARRAY_BUFFER,this.vertexData,x.STATIC_DRAW),x.drawArrays(x.TRIANGLES,0,6),x.bindFramebuffer(x.FRAMEBUFFER,null),x.bindTexture(x.TEXTURE_2D,null)},blitFrame:function(u,d,p,g,y,x,T){p===void 0&&(p=1),g===void 0&&(g=!0),y===void 0&&(y=!0),x===void 0&&(x=!1),T===void 0&&(T=!1);var S=this.gl;if(this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",p),S.activeTexture(S.TEXTURE0),S.bindTexture(S.TEXTURE_2D,u.texture.webGLTexture),u.height>d.height)S.viewport(0,0,u.width,u.height),this.setTargetUVs(u,d);else{var M=d.height-u.height;S.viewport(0,M,u.width,u.height)}if(S.bindFramebuffer(S.FRAMEBUFFER,d.framebuffer.webGLFramebuffer),S.framebufferTexture2D(S.FRAMEBUFFER,S.COLOR_ATTACHMENT0,S.TEXTURE_2D,d.texture.webGLTexture,0),g&&(y?S.clearColor(0,0,0,0):S.clearColor(0,0,0,1),S.clear(S.COLOR_BUFFER_BIT)),x){var w=this.renderer.currentBlendMode;this.renderer.setBlendMode(c.ERASE)}T&&this.flipY(),S.bufferData(S.ARRAY_BUFFER,this.vertexData,S.STATIC_DRAW),S.drawArrays(S.TRIANGLES,0,6),x&&this.renderer.setBlendMode(w),S.bindFramebuffer(S.FRAMEBUFFER,null),S.bindTexture(S.TEXTURE_2D,null),this.resetUVs()},copyFrameRect:function(u,d,p,g,y,x,T,S){T===void 0&&(T=!0),S===void 0&&(S=!0);var M=this.gl;M.bindFramebuffer(M.FRAMEBUFFER,u.framebuffer.webGLFramebuffer),M.framebufferTexture2D(M.FRAMEBUFFER,M.COLOR_ATTACHMENT0,M.TEXTURE_2D,u.texture.webGLTexture,0),T&&(S?M.clearColor(0,0,0,0):M.clearColor(0,0,0,1),M.clear(M.COLOR_BUFFER_BIT)),M.activeTexture(M.TEXTURE0),M.bindTexture(M.TEXTURE_2D,d.texture.webGLTexture),M.copyTexSubImage2D(M.TEXTURE_2D,0,0,0,p,g,y,x),M.bindFramebuffer(M.FRAMEBUFFER,null),M.bindTexture(M.TEXTURE_2D,null)},copyToGame:function(u){var d=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",1),this.renderer.popFramebuffer(),d.activeTexture(d.TEXTURE0),d.bindTexture(d.TEXTURE_2D,u.texture.webGLTexture),d.bufferData(d.ARRAY_BUFFER,this.vertexData,d.STATIC_DRAW),d.drawArrays(d.TRIANGLES,0,6)},drawFrame:function(u,d,p,g){p===void 0&&(p=!0),g===void 0&&(g=this.colorMatrix);var y=this.gl;this.setShader(this.colorMatrixShader),this.set1i("uMainSampler",0),this.set1fv("uColorMatrix",g.getData()),this.set1f("uAlpha",g.alpha),y.activeTexture(y.TEXTURE0),y.bindTexture(y.TEXTURE_2D,u.texture.webGLTexture),d?(y.viewport(0,0,d.width,d.height),y.bindFramebuffer(y.FRAMEBUFFER,d.framebuffer.webGLFramebuffer),y.framebufferTexture2D(y.FRAMEBUFFER,y.COLOR_ATTACHMENT0,y.TEXTURE_2D,d.texture.webGLTexture,0)):y.viewport(0,0,u.width,u.height),p?y.clearColor(0,0,0,0):y.clearColor(0,0,0,1),y.clear(y.COLOR_BUFFER_BIT),y.bufferData(y.ARRAY_BUFFER,this.vertexData,y.STATIC_DRAW),y.drawArrays(y.TRIANGLES,0,6),y.bindFramebuffer(y.FRAMEBUFFER,null),y.bindTexture(y.TEXTURE_2D,null)},blendFrames:function(u,d,p,g,y,x){g===void 0&&(g=1),y===void 0&&(y=!0),x===void 0&&(x=this.linearShader);var T=this.gl;this.setShader(x),this.set1i("uMainSampler1",0),this.set1i("uMainSampler2",1),this.set1f("uStrength",g),T.activeTexture(T.TEXTURE0),T.bindTexture(T.TEXTURE_2D,u.texture.webGLTexture),T.activeTexture(T.TEXTURE1),T.bindTexture(T.TEXTURE_2D,d.texture.webGLTexture),p?(T.bindFramebuffer(T.FRAMEBUFFER,p.framebuffer.webGLFramebuffer),T.framebufferTexture2D(T.FRAMEBUFFER,T.COLOR_ATTACHMENT0,T.TEXTURE_2D,p.texture.webGLTexture,0),T.viewport(0,0,p.width,p.height)):T.viewport(0,0,u.width,u.height),y?T.clearColor(0,0,0,0):T.clearColor(0,0,0,1),T.clear(T.COLOR_BUFFER_BIT),T.bufferData(T.ARRAY_BUFFER,this.vertexData,T.STATIC_DRAW),T.drawArrays(T.TRIANGLES,0,6),T.bindFramebuffer(T.FRAMEBUFFER,null),T.bindTexture(T.TEXTURE_2D,null)},blendFramesAdditive:function(u,d,p,g,y){this.blendFrames(u,d,p,g,y,this.addShader)},clearFrame:function(u,d){d===void 0&&(d=!0);var p=this.gl;p.viewport(0,0,u.width,u.height),p.bindFramebuffer(p.FRAMEBUFFER,u.framebuffer.webGLFramebuffer),d?p.clearColor(0,0,0,0):p.clearColor(0,0,0,1),p.clear(p.COLOR_BUFFER_BIT);var g=this.renderer.currentFramebuffer;p.bindFramebuffer(p.FRAMEBUFFER,g.webGLFramebuffer)},setUVs:function(u,d,p,g,y,x,T,S){var M=this.vertexViewF32;M[2]=u,M[3]=d,M[6]=p,M[7]=g,M[10]=y,M[11]=x,M[14]=u,M[15]=d,M[18]=y,M[19]=x,M[22]=T,M[23]=S},setTargetUVs:function(u,d){var p=d.height/u.height;p>.5?p=.5-(p-.5):p=.5+(.5-p),this.setUVs(0,p,0,1+p,1,1+p,1,p)},flipX:function(){this.setUVs(1,0,1,1,0,1,0,0)},flipY:function(){this.setUVs(0,1,0,0,1,0,1,1)},resetUVs:function(){this.setUVs(0,0,0,1,1,1,1,0)}});v.exports=f},36060:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m={BITMAPMASK_PIPELINE:"BitmapMaskPipeline",LIGHT_PIPELINE:"Light2D",POINTLIGHT_PIPELINE:"PointLightPipeline",SINGLE_PIPELINE:"SinglePipeline",MULTI_PIPELINE:"MultiPipeline",ROPE_PIPELINE:"RopePipeline",GRAPHICS_PIPELINE:"GraphicsPipeline",POSTFX_PIPELINE:"PostFXPipeline",UTILITY_PIPELINE:"UtilityPipeline",MOBILE_PIPELINE:"MobilePipeline",FX_PIPELINE:"FxPipeline"};v.exports=m},84817:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="pipelineafterflush"},36712:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="pipelinebeforeflush"},40285:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="pipelinebind"},65918:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="pipelineboot"},92852:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="pipelinedestroy"},56072:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="pipelinerebind"},57566:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="pipelineresize"},77085:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.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:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(99155),o=t(84057),r=new a({Extends:o,initialize:function(e){o.call(this,{game:e,fragShader:c}),this.amount=1},onPreRender:function(n,e){n=this.getController(n),this.set1f("amount",n.amount,e)}});v.exports=r},67329:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(24400),o=t(84057),r=new a({Extends:o,initialize:function(e){o.call(this,{game:e,fragShader:c}),this.steps=4,this.offsetX=1,this.offsetY=1,this.blurStrength=1,this.strength=1,this.glcolor=[1,1,1]},onPreRender:function(n){n=this.getController(n),this.set1f("strength",n.blurStrength),this.set3fv("color",n.glcolor)},onDraw:function(n){var e=this.getController(),i=this.fullFrame1,h=this.fullFrame2;this.copyFrame(n,h);for(var s=2/n.width*e.offsetX,l=2/n.height*e.offsetY,f=0;f{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(41514),o=t(51078),r=t(94328),n=t(84057),e=new a({Extends:n,initialize:function(h){n.call(this,{game:h,shaders:[{name:"Gaussian5",fragShader:c},{name:"Gaussian9",fragShader:o},{name:"Gaussian13",fragShader:r}]}),this.activeShader=this.shaders[0],this.x=2,this.y=2,this.steps=4,this.strength=1,this.glcolor=[1,1,1]},setQualityLow:function(){return this.activeShader=this.shaders[0],this},setQualityMedium:function(){return this.activeShader=this.shaders[1],this},setQualityHigh:function(){return this.activeShader=this.shaders[2],this},onDraw:function(i){var h=this.getController(),s=this.gl,l=this.fullFrame1,f=s.getParameter(s.FRAMEBUFFER_BINDING);this.bind(this.shaders[h.quality]),s.activeTexture(s.TEXTURE0),s.viewport(0,0,i.width,i.height),this.set1i("uMainSampler",0),this.set2f("resolution",i.width,i.height),this.set1f("strength",h.strength),this.set3fv("color",h.glcolor);for(var u=0;u{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(90610),o=t(84057),r=new a({Extends:o,initialize:function(e){o.call(this,{game:e,fragShader:c}),this.isTiltShift=!1,this.strength=1,this.blurX=1,this.blurY=1,this.radius=.5,this.amount=1,this.contrast=.2},onPreRender:function(n,e,i,h){n=this.getController(n),this.set1f("radius",n.radius,e),this.set1f("amount",n.amount,e),this.set1f("contrast",n.contrast,e),this.set1f("strength",n.strength,e),this.set2f("blur",n.blurX,n.blurY,e),this.setBoolean("isTiltShift",n.isTiltShift,e),i&&h&&this.set2f("resolution",i,h,e)},onDraw:function(n){this.set2f("resolution",n.width,n.height),this.bindAndDraw(n)}});v.exports=r},89428:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(91899),o=t(84057),r=new a({Extends:o,initialize:function(e){o.call(this,{game:e,fragShader:c}),this.scale=1,this.feather=.005,this.thickness=8,this.glcolor=[1,.2,.7],this.glcolor2=[1,0,0,.4]},onPreRender:function(n,e,i,h){n=this.getController(n),this.set1f("scale",n.scale,e),this.set1f("feather",n.feather,e),this.set1f("thickness",n.thickness,e),this.set3fv("color",n.glcolor,e),this.set4fv("backgroundColor",n.glcolor2,e),i&&h&&this.set2f("resolution",i,h,e)},onDraw:function(n){this.set2f("resolution",n.width,n.height),this.bindAndDraw(n)}});v.exports=r},88904:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(84057),o=new a({Extends:c,initialize:function(n){c.call(this,{game:n})},onDraw:function(r){var n=this.fullFrame1;this.controller?this.manager.drawFrame(r,n,!0,this.controller):this.drawFrame(r,n),this.copyToGame(n)}});v.exports=o},63563:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(47838),o=t(84057),r=new a({Extends:o,initialize:function(e){o.call(this,{game:e,fragShader:c}),this.x=.005,this.y=.005,this.glTexture},onBoot:function(){this.setTexture("__WHITE")},setTexture:function(n){var e=this.game.textures.getFrame(n);e&&(this.glTexture=e.glTexture)},onDraw:function(n){var e=this.getController(),i=this.fullFrame1;this.bind(),this.set1i("uMainSampler",0),this.set1i("uDisplacementSampler",1),this.set2f("amount",e.x,e.y),this.bindTexture(e.glTexture,1),this.copySprite(n,i),this.copyToGame(i)}});v.exports=r},94045:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(95540),o=t(98656),r=t(84057),n=t(70554),e=new a({Extends:r,initialize:function(h,s){var l=c(s,"quality",.1),f=c(s,"distance",10);r.call(this,{game:h,fragShader:n.setGlowQuality(o,h,l,f)}),this.outerStrength=4,this.innerStrength=0,this.knockout=!1,this.glcolor=[1,1,1,1]},onPreRender:function(i,h,s,l){i=this.getController(i),this.set1f("outerStrength",i.outerStrength,h),this.set1f("innerStrength",i.innerStrength,h),this.set4fv("glowColor",i.glcolor,h),this.setBoolean("knockout",i.knockout,h),s&&l&&this.set2f("resolution",s,l,h)},onDraw:function(i){this.set2f("resolution",i.width,i.height),this.bindAndDraw(i)}});v.exports=e},74088:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(70463),o=t(84057),r=new a({Extends:o,initialize:function(e){o.call(this,{game:e,fragShader:c}),this.alpha=.2,this.size=0,this.fromX=0,this.fromY=0,this.toX=0,this.toY=1,this.glcolor1=[255,0,0],this.glcolor2=[0,255,0]},onPreRender:function(n,e){n=this.getController(n),this.set1f("alpha",n.alpha,e),this.set1i("size",n.size,e),this.set3fv("color1",n.glcolor1,e),this.set3fv("color2",n.glcolor2,e),this.set2f("positionFrom",n.fromX,n.fromY,e),this.set2f("positionTo",n.toX,n.toY,e)}});v.exports=r},99636:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(50831),o=t(84057),r=new a({Extends:o,initialize:function(e){o.call(this,{game:e,fragShader:c}),this.amount=1},onPreRender:function(n,e,i,h){n=this.getController(n),this.set1f("amount",n.amount,e),i&&h&&this.set2f("resolution",i,h,e)},onDraw:function(n){this.set2f("resolution",n.width,n.height),this.bindAndDraw(n)}});v.exports=r},34700:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(92595),o=t(84057),r=new a({Extends:o,initialize:function(e){o.call(this,{game:e,fragShader:c}),this.x=0,this.y=0,this.decay=.1,this.power=1,this.glcolor=[0,0,0,1],this.samples=6,this.intensity=1},onPreRender:function(n,e){n=this.getController(n);var i=n.samples;this.set1i("samples",i,e),this.set1f("intensity",n.intensity,e),this.set1f("decay",n.decay,e),this.set1f("power",n.power/i,e),this.set2f("lightPosition",n.x,n.y,e),this.set4fv("color",n.glcolor,e)}});v.exports=r},91157:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(72464),o=t(84057),r=new a({Extends:o,initialize:function(e){o.call(this,{game:e,fragShader:c}),this.speed=.5,this.lineWidth=.5,this.gradient=3,this.reveal=!1},onPreRender:function(n,e,i,h){n=this.getController(n),this.setTime("time",e),this.set1f("speed",n.speed,e),this.set1f("lineWidth",n.lineWidth,e),this.set1f("gradient",n.gradient,e),this.setBoolean("reveal",n.reveal,e),i&&h&&this.set2f("resolution",i,h,e)},onDraw:function(n){this.set2f("resolution",n.width,n.height),this.bindAndDraw(n)}});v.exports=r},27797:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(39249),o=t(84057),r=new a({Extends:o,initialize:function(e){o.call(this,{game:e,fragShader:c}),this.x=.5,this.y=.5,this.radius=.5,this.strength=.5},onPreRender:function(n,e){n=this.getController(n),this.set1f("radius",n.radius,e),this.set1f("strength",n.strength,e),this.set2f("position",n.x,n.y,e)}});v.exports=r},67603:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(2878),o=t(84057),r=new a({Extends:o,initialize:function(e){o.call(this,{game:e,fragShader:c}),this.progress=0,this.wipeWidth=.1,this.direction=0,this.axis=0,this.reveal=!1},onPreRender:function(n,e){n=this.getController(n);var i=n.progress,h=n.wipeWidth,s=n.direction,l=n.axis;this.set4f("config",i,h,s,l,e),this.setBoolean("reveal",n.reveal,e)}});v.exports=r},58918:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a={Barrel:t(54812),Bloom:t(67329),Blur:t(8861),Bokeh:t(51051),Circle:t(89428),ColorMatrix:t(88904),Displacement:t(63563),Glow:t(94045),Gradient:t(74088),Pixelate:t(99636),Shadow:t(34700),Shine:t(91157),Vignette:t(27797),Wipe:t(67603)};v.exports=a},96615:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(36060),c=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=c(!1,o,a),v.exports=o},35407:v=>{v.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:v=>{v.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:v=>{v.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:v=>{v.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:v=>{v.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:v=>{v.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:v=>{v.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:v=>{v.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:v=>{v.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:v=>{v.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:v=>{v.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:v=>{v.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:v=>{v.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:v=>{v.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:v=>{v.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:v=>{v.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:v=>{v.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:v=>{v.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:v=>{v.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:v=>{v.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:v=>{v.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:v=>{v.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:v=>{v.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:v=>{v.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:v=>{v.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:v=>{v.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:v=>{v.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:v=>{v.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:v=>{v.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:v=>{v.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:v=>{v.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:v=>{v.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:v=>{v.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:v=>{v.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:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.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:(v,m,t)=>{/** + * @author Benjamin D. Richards + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=new a({initialize:function(r,n,e){this.webGLAttribLocation=-1,this.gl=r,this.program=n,this.name=e,this.createResource()},createResource:function(){if(this.program.webGLProgram===null){this.webGLAttribLocation=-1;return}var o=this.gl;o.isContextLost()||(this.webGLAttribLocation=o.getAttribLocation(this.program.webGLProgram,this.name))},destroy:function(){this.gl=null,this.program=null,this.name=null,this.webGLAttribLocation=-1}});v.exports=c},26128:(v,m,t)=>{/** + * @author Benjamin D. Richards + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=new a({initialize:function(r,n,e,i){this.webGLBuffer=null,this.gl=r,this.initialDataOrSize=n,this.bufferType=e,this.bufferUsage=i,this.createResource()},createResource:function(){if(this.initialDataOrSize!==null){var o=this.gl;if(!o.isContextLost()){var r=this.bufferType,n=o.createBuffer();this.webGLBuffer=n,o.bindBuffer(r,this.webGLBuffer),o.bufferData(r,this.initialDataOrSize,this.bufferUsage),o.bindBuffer(r,null)}}},destroy:function(){var o=this.gl;o.isContextLost()||o.deleteBuffer(this.webGLBuffer),this.webGLBuffer=null,this.initialDataOrSize=null,this.gl=null}});v.exports=c},84387:(v,m,t)=>{/** + * @author Benjamin D. Richards + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c={36054:"Incomplete Attachment",36055:"Missing Attachment",36057:"Incomplete Dimensions",36061:"Framebuffer Unsupported"},o=new a({initialize:function(n,e,i,h,s){this.webGLFramebuffer=null,this.gl=n,this.width=e,this.height=i,this.renderTexture=h,this.addDepthStencilBuffer=!!s,this.createResource()},createResource:function(){var r=this.gl;if(!r.isContextLost()){var n=this.renderTexture,e=0,i=r.createFramebuffer();if(this.webGLFramebuffer=i,r.bindFramebuffer(r.FRAMEBUFFER,i),n.isRenderTexture=!0,n.isAlphaPremultiplied=!1,r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,n.webGLTexture,0),e=r.checkFramebufferStatus(r.FRAMEBUFFER),e!==r.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer status: "+(c[e]||e));if(this.addDepthStencilBuffer){var h=r.createRenderbuffer();r.bindRenderbuffer(r.RENDERBUFFER,h),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,this.width,this.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,h)}r.bindFramebuffer(r.FRAMEBUFFER,null)}},destroy:function(){if(this.webGLFramebuffer!==null){var r=this.gl;if(!r.isContextLost()){r.bindFramebuffer(r.FRAMEBUFFER,this.webGLFramebuffer);var n=r.getFramebufferAttachmentParameter(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME);n!==null&&(r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,null,0),r.deleteTexture(n));var e=r.getFramebufferAttachmentParameter(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME);e!==null&&r.deleteRenderbuffer(e),r.bindFramebuffer(r.FRAMEBUFFER,null),r.deleteFramebuffer(this.webGLFramebuffer)}this.renderTexture=null,this.webGLFramebuffer=null,this.gl=null}}});v.exports=o},1482:(v,m,t)=>{/** + * @author Benjamin D. Richards + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=new a({initialize:function(r,n,e){this.webGLProgram=null,this.gl=r,this.vertexSource=n,this.fragmentSource=e,this.createResource()},createResource:function(){var o=this.gl;if(!o.isContextLost()){var r=o.createProgram(),n=o.createShader(o.VERTEX_SHADER),e=o.createShader(o.FRAGMENT_SHADER);o.shaderSource(n,this.vertexSource),o.shaderSource(e,this.fragmentSource),o.compileShader(n),o.compileShader(e);var i=`Shader failed: +`;if(!o.getShaderParameter(n,o.COMPILE_STATUS))throw new Error("Vertex "+i+o.getShaderInfoLog(n));if(!o.getShaderParameter(e,o.COMPILE_STATUS))throw new Error("Fragment "+i+o.getShaderInfoLog(e));if(o.attachShader(r,n),o.attachShader(r,e),o.linkProgram(r),!o.getProgramParameter(r,o.LINK_STATUS))throw new Error("Link "+i+o.getProgramInfoLog(r));o.useProgram(r),this.webGLProgram=r}},destroy:function(){this.webGLProgram&&(this.gl.isContextLost()||this.gl.deleteProgram(this.webGLProgram),this.webGLProgram=null,this.gl=null)}});v.exports=c},82751:(v,m,t)=>{/** + * @author Benjamin D. Richards + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(50030),o=new a({initialize:function(n,e,i,h,s,l,f,u,d,p,g,y,x){this.webGLTexture=null,this.isRenderTexture=!1,this.gl=n,this.mipLevel=e,this.minFilter=i,this.magFilter=h,this.wrapT=s,this.wrapS=l,this.format=f,this.pixels=u,this.width=d,this.height=p,this.pma=g??!0,this.forceSize=!!y,this.flipY=!!x,this.__SPECTOR_Metadata={},this.createResource()},createResource:function(){var r=this.gl;if(!r.isContextLost()){if(this.pixels instanceof o){this.webGLTexture=this.pixels.webGLTexture;return}var n=r.createTexture();n.__SPECTOR_Metadata=this.__SPECTOR_Metadata,this.webGLTexture=n,this._processTexture()}},update:function(r,n,e,i,h,s,l,f,u){if(!(n===0||e===0)){this.pixels=r,this.width=n,this.height=e,this.flipY=i,this.wrapS=h,this.wrapT=s,this.minFilter=l,this.magFilter=f,this.format=u;var d=this.gl;d.isContextLost()||this._processTexture()}},_processTexture:function(){var r=this.gl;r.activeTexture(r.TEXTURE0);var n=r.getParameter(r.TEXTURE_BINDING_2D);r.bindTexture(r.TEXTURE_2D,this.webGLTexture),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,this.minFilter),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,this.magFilter),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,this.wrapS),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,this.wrapT),r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.pma),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,this.flipY);var e=this.pixels,i=this.mipLevel,h=this.width,s=this.height,l=this.format,f=!1;if(e==null)r.texImage2D(r.TEXTURE_2D,i,l,h,s,0,l,r.UNSIGNED_BYTE,null),f=c(h,s);else if(e.compressed){h=e.width,s=e.height,f=e.generateMipmap;for(var u=0;u{/** + * @author Benjamin D. Richards + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=new a({initialize:function(r,n,e){this.webGLUniformLocation=null,this.gl=r,this.program=n,this.name=e,this.createResource()},createResource:function(){if(this.program.webGLProgram===null){this.webGLUniformLocation=null;return}var o=this.gl;o.isContextLost()||(this.webGLUniformLocation=o.getUniformLocation(this.program.webGLProgram,this.name))},destroy:function(){this.gl=null,this.program=null,this.name=null,this.webGLUniformLocation=null}});v.exports=c},9503:(v,m,t)=>{/** + * @author Benjamin D. Richards + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a={WebGLAttribLocationWrapper:t(93567),WebGLBufferWrapper:t(26128),WebGLProgramWrapper:t(1482),WebGLTextureWrapper:t(82751),WebGLFramebufferWrapper:t(84387),WebGLUniformLocationWrapper:t(57183)};v.exports=a},76531:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(13560),c=t(83419),o=t(50792),r=t(97480),n=t(8443),e=t(57811),i=t(74403),h=t(45818),s=t(29747),l=t(87841),f=t(86555),u=t(56583),d=t(26099),p=t(38058),g=new c({Extends:o,initialize:function(x){o.call(this),this.game=x,this.canvas,this.canvasBounds=new l,this.parent=null,this.parentIsWindow=!1,this.parentSize=new f,this.gameSize=new f,this.baseSize=new f,this.displaySize=new f,this.scaleMode=a.SCALE_MODE.NONE,this.zoom=1,this._resetZoom=!1,this.displayScale=new d(1,1),this.autoRound=!1,this.autoCenter=a.CENTER.NO_CENTER,this.orientation=a.ORIENTATION.LANDSCAPE,this.fullscreen,this.fullscreenTarget=null,this._createdFullscreenTarget=!1,this.dirty=!1,this.resizeInterval=500,this._lastCheck=0,this._checkOrientation=!1,this.domlisteners={orientationChange:s,windowResize:s,fullScreenChange:s,fullScreenError:s}},preBoot:function(){this.parseConfig(this.game.config),this.game.events.once(n.BOOT,this.boot,this)},boot:function(){var y=this.game;this.canvas=y.canvas,this.fullscreen=y.device.fullscreen,this.scaleMode!==a.SCALE_MODE.RESIZE&&this.scaleMode!==a.SCALE_MODE.EXPAND&&this.displaySize.setAspectMode(this.scaleMode),this.scaleMode===a.SCALE_MODE.NONE?this.resize(this.width,this.height):(this.getParentBounds(),this.parentSize.width>0&&this.parentSize.height>0&&this.displaySize.setParent(this.parentSize),this.refresh()),y.events.on(n.PRE_STEP,this.step,this),y.events.once(n.READY,this.refresh,this),y.events.once(n.DESTROY,this.destroy,this),this.startListeners()},parseConfig:function(y){this.getParent(y),this.getParentBounds();var x=y.width,T=y.height,S=y.scaleMode,M=y.zoom,w=y.autoRound;if(typeof x=="string")if(x.substr(-1)!=="%")x=parseInt(x,10);else{var L=this.parentSize.width;L===0&&(L=window.innerWidth);var F=parseInt(x,10)/100;x=Math.floor(L*F)}if(typeof T=="string")if(T.substr(-1)!=="%")T=parseInt(T,10);else{var O=this.parentSize.height;O===0&&(O=window.innerHeight);var b=parseInt(T,10)/100;T=Math.floor(O*b)}this.scaleMode=S,this.autoRound=w,this.autoCenter=y.autoCenter,this.resizeInterval=y.resizeInterval,w&&(x=Math.floor(x),T=Math.floor(T)),this.gameSize.setSize(x,T),M===a.ZOOM.MAX_ZOOM&&(M=this.getMaxZoom()),this.zoom=M,M!==1&&(this._resetZoom=!0),this.baseSize.setSize(x,T),w&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),y.minWidth>0&&this.displaySize.setMin(y.minWidth*M,y.minHeight*M),y.maxWidth>0&&this.displaySize.setMax(y.maxWidth*M,y.maxHeight*M),this.displaySize.setSize(x,T),(y.snapWidth>0||y.snapHeight>0)&&this.displaySize.setSnap(y.snapWidth,y.snapHeight),this.orientation=h(x,T)},getParent:function(y){var x=y.parent;if(x!==null){if(this.parent=i(x),this.parentIsWindow=this.parent===document.body,y.expandParent&&y.scaleMode!==a.SCALE_MODE.NONE){var T=this.parent.getBoundingClientRect();(this.parentIsWindow||T.height===0)&&(document.documentElement.style.height="100%",document.body.style.height="100%",T=this.parent.getBoundingClientRect(),!this.parentIsWindow&&T.height===0&&(this.parent.style.overflow="hidden",this.parent.style.width="100%",this.parent.style.height="100%"))}y.fullscreenTarget&&!this.fullscreenTarget&&(this.fullscreenTarget=i(y.fullscreenTarget))}},getParentBounds:function(){if(!this.parent)return!1;var y=this.parentSize,x=this.parent.getBoundingClientRect();this.parentIsWindow&&this.game.device.os.iOS&&(x.height=e(!0));var T=x.width,S=x.height;if(y.width!==T||y.height!==S)return y.setSize(T,S),!0;if(this.canvas){var M=this.canvasBounds,w=this.canvas.getBoundingClientRect();if(w.x!==M.x||w.y!==M.y)return!0}return!1},lockOrientation:function(y){var x=screen.lockOrientation||screen.mozLockOrientation||screen.msLockOrientation;return x?x.call(screen,y):!1},setParentSize:function(y,x){return this.parentSize.setSize(y,x),this.refresh()},setGameSize:function(y,x){var T=this.autoRound;T&&(y=Math.floor(y),x=Math.floor(x));var S=this.width,M=this.height;return this.gameSize.resize(y,x),this.baseSize.resize(y,x),T&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setAspectRatio(y/x),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height,this.refresh(S,M)},resize:function(y,x){var T=this.zoom,S=this.autoRound;S&&(y=Math.floor(y),x=Math.floor(x));var M=this.width,w=this.height;this.gameSize.resize(y,x),this.baseSize.resize(y,x),S&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setSize(y*T,x*T),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height;var L=this.canvas.style,F=y*T,O=x*T;return S&&(F=Math.floor(F),O=Math.floor(O)),(F!==y||O!==x)&&(L.width=F+"px",L.height=O+"px"),this.refresh(M,w)},setZoom:function(y){return this.zoom=y,this._resetZoom=!0,this.refresh()},setMaxZoom:function(){return this.zoom=this.getMaxZoom(),this._resetZoom=!0,this.refresh()},setSnap:function(y,x){return y===void 0&&(y=0),x===void 0&&(x=y),this.displaySize.setSnap(y,x),this.refresh()},refresh:function(y,x){y===void 0&&(y=this.width),x===void 0&&(x=this.height),this.updateScale(),this.updateBounds(),this.updateOrientation(),this.displayScale.set(this.baseSize.width/this.canvasBounds.width,this.baseSize.height/this.canvasBounds.height);var T=this.game.domContainer;if(T){this.baseSize.setCSS(T);var S=this.canvas.style,M=T.style;M.transform="scale("+this.displaySize.width/this.baseSize.width+","+this.displaySize.height/this.baseSize.height+")",M.marginLeft=S.marginLeft,M.marginTop=S.marginTop}return this.emit(r.RESIZE,this.gameSize,this.baseSize,this.displaySize,y,x),this},updateOrientation:function(){if(this._checkOrientation){this._checkOrientation=!1;var y=h(this.width,this.height);y!==this.orientation&&(this.orientation=y,this.emit(r.ORIENTATION_CHANGE,y))}},updateScale:function(){var y=this.canvas.style,x=this.gameSize.width,T=this.gameSize.height,S,M,w=this.zoom,L=this.autoRound;if(this.scaleMode===a.SCALE_MODE.NONE)this.displaySize.setSize(x*w,T*w),S=this.displaySize.width,M=this.displaySize.height,L&&(S=Math.floor(S),M=Math.floor(M)),this._resetZoom&&(y.width=S+"px",y.height=M+"px",this._resetZoom=!1);else if(this.scaleMode===a.SCALE_MODE.RESIZE)this.displaySize.setSize(this.parentSize.width,this.parentSize.height),this.gameSize.setSize(this.displaySize.width,this.displaySize.height),this.baseSize.setSize(this.displaySize.width,this.displaySize.height),S=this.displaySize.width,M=this.displaySize.height,L&&(S=Math.floor(S),M=Math.floor(M)),this.canvas.width=S,this.canvas.height=M;else if(this.scaleMode===a.SCALE_MODE.EXPAND){this.displaySize.setSize(this.parentSize.width,this.parentSize.height),S=this.displaySize.width,M=this.displaySize.height,L&&(S=Math.floor(S),M=Math.floor(M)),y.width=S+"px",y.height=M+"px";var F=this.parentSize.width/this.gameSize.width,O=this.parentSize.height/this.gameSize.height;F=0?0:-(M.x*w.x),F=M.y>=0?0:-(M.y*w.y),O;S.width>=M.width?O=T.width:O=T.width-(M.width-S.width)*w.x;var b;return S.height>=M.height?b=T.height:b=T.height-(M.height-S.height)*w.y,x.setTo(L,F,O,b),y&&(x.width/=y.zoomX,x.height/=y.zoomY,x.centerX=y.centerX+y.scrollX,x.centerY=y.centerY+y.scrollY),x},step:function(y,x){this.parent&&(this._lastCheck+=x,(this.dirty||this._lastCheck>this.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0))},stopListeners:function(){var y=this.domlisteners;window.removeEventListener("orientationchange",y.orientationChange,!1),window.removeEventListener("resize",y.windowResize,!1);var x=["webkit","moz",""];x.forEach(function(T){document.removeEventListener(T+"fullscreenchange",y.fullScreenChange,!1),document.removeEventListener(T+"fullscreenerror",y.fullScreenError,!1)}),document.removeEventListener("MSFullscreenChange",y.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",y.fullScreenError,!1)},destroy:function(){this.removeAllListeners(),this.stopListeners(),this.game=null,this.canvas=null,this.canvasBounds=null,this.parent=null,this.fullscreenTarget=null,this.parentSize.destroy(),this.gameSize.destroy(),this.baseSize.destroy(),this.displaySize.destroy()},isFullscreen:{get:function(){return this.fullscreen.active}},width:{get:function(){return this.gameSize.width}},height:{get:function(){return this.gameSize.height}},isPortrait:{get:function(){return this.orientation===a.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===a.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});v.exports=g},64743:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={NO_CENTER:0,CENTER_BOTH:1,CENTER_HORIZONTALLY:2,CENTER_VERTICALLY:3}},39218:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={LANDSCAPE:"landscape-primary",PORTRAIT:"portrait-primary"}},81050:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={NONE:0,WIDTH_CONTROLS_HEIGHT:1,HEIGHT_CONTROLS_WIDTH:2,FIT:3,ENVELOP:4,RESIZE:5,EXPAND:6}},80805:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={NO_ZOOM:1,ZOOM_2X:2,ZOOM_4X:4,MAX_ZOOM:-1}},13560:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a={CENTER:t(64743),ORIENTATION:t(39218),SCALE_MODE:t(81050),ZOOM:t(80805)};v.exports=a},56139:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="enterfullscreen"},2336:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="fullscreenfailed"},47412:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="fullscreenunsupported"},51452:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="leavefullscreen"},20666:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="orientationchange"},47945:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="resize"},97480:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.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:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(79291),c=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,c.CENTER),o=a(!1,o,c.ORIENTATION),o=a(!1,o,c.SCALE_MODE),o=a(!1,o,c.ZOOM),v.exports=o},27397:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(95540),c=t(35355),o=function(r){var n=r.game.config.defaultPhysicsSystem,e=a(r.settings,"physics",!1);if(!(!n&&!e)){var i=[];if(n&&i.push(c(n+"Physics")),e)for(var h in e)h=c(h.concat("Physics")),i.indexOf(h)===-1&&i.push(h);return i}};v.exports=o},52106:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(95540),c=function(o){var r=o.plugins.getDefaultScenePlugins(),n=a(o.settings,"plugins",!1);return Array.isArray(n)?n:r||[]};v.exports=c},87033:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m={game:"game",renderer:"renderer",anims:"anims",cache:"cache",plugins:"plugins",registry:"registry",scale:"scale",sound:"sound",textures:"textures",events:"events",cameras:"cameras",add:"add",make:"make",scenePlugin:"scene",displayList:"children",lights:"lights",data:"data",input:"input",load:"load",time:"time",tweens:"tweens",arcadePhysics:"physics",impactPhysics:"impact",matterPhysics:"matter"};v.exports=m},97482:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(2368),o=new a({initialize:function(n){this.sys=new c(this,n),this.game,this.anims,this.cache,this.registry,this.sound,this.textures,this.events,this.cameras,this.add,this.make,this.scene,this.children,this.lights,this.data,this.input,this.load,this.time,this.tweens,this.physics,this.matter,this.scale,this.plugins,this.renderer},update:function(){}});v.exports=o},60903:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(89993),o=t(44594),r=t(8443),n=t(35154),e=t(54899),i=t(29747),h=t(97482),s=t(2368),l=new a({initialize:function(u,d){if(this.game=u,this.keys={},this.scenes=[],this._pending=[],this._start=[],this._queue=[],this._data={},this.isProcessing=!1,this.isBooted=!1,this.customViewports=0,this.systemScene,d){Array.isArray(d)||(d=[d]);for(var p=0;p-1&&(delete this.keys[p],this.scenes.splice(d,1),this._start.indexOf(p)>-1&&(d=this._start.indexOf(p),this._start.splice(d,1)),u.sys.destroy())}return this},bootScene:function(f){var u=f.sys,d=u.settings;u.sceneUpdate=i,f.init&&(f.init.call(f,d.data),d.status=c.INIT,d.isTransition&&u.events.emit(o.TRANSITION_INIT,d.transitionFrom,d.transitionDuration));var p;u.load&&(p=u.load,p.reset()),p&&f.preload?(f.preload.call(f),d.status=c.LOADING,p.once(e.COMPLETE,this.loadComplete,this),p.start()):this.create(f)},loadComplete:function(f){this.game.sound&&this.game.sound.onBlurPausedSounds&&this.game.sound.unlock(),this.create(f.scene)},payloadComplete:function(f){this.bootScene(f.scene)},update:function(f,u){this.processQueue(),this.isProcessing=!0;for(var d=this.scenes.length-1;d>=0;d--){var p=this.scenes[d].sys;p.settings.status>c.START&&p.settings.status<=c.RUNNING&&p.step(f,u),p.scenePlugin&&p.scenePlugin._target&&p.scenePlugin.step(f,u)}},render:function(f){for(var u=0;u=c.LOADING&&d.settings.status=c.START&&g<=c.CREATING)return this;if(g>=c.RUNNING&&g<=c.SLEEPING)p.shutdown(),p.sceneUpdate=i,p.start(u);else{p.sceneUpdate=i,p.start(u);var y;if(p.load&&(y=p.load),y&&p.settings.hasOwnProperty("pack")&&(y.reset(),y.addPack({payload:p.settings.pack})))return p.settings.status=c.LOADING,y.once(e.COMPLETE,this.payloadComplete,this),y.start(),this}return this.bootScene(d),this},stop:function(f,u){var d=this.getScene(f);if(d&&!d.sys.isTransitioning()&&d.sys.settings.status!==c.SHUTDOWN){var p=d.sys.load;p&&(p.off(e.COMPLETE,this.loadComplete,this),p.off(e.COMPLETE,this.payloadComplete,this)),d.sys.shutdown(u)}return this},switch:function(f,u){var d=this.getScene(f),p=this.getScene(u);return d&&p&&d!==p&&(this.sleep(f),this.isSleeping(u)?this.wake(u):this.start(u)),this},getAt:function(f){return this.scenes[f]},getIndex:function(f){var u=this.getScene(f);return this.scenes.indexOf(u)},bringToTop:function(f){if(this.isProcessing)this._queue.push({op:"bringToTop",keyA:f,keyB:null});else{var u=this.getIndex(f);if(u!==-1&&u0){var d=this.getScene(f);this.scenes.splice(u,1),this.scenes.unshift(d)}}return this},moveDown:function(f){if(this.isProcessing)this._queue.push({op:"moveDown",keyA:f,keyB:null});else{var u=this.getIndex(f);if(u>0){var d=u-1,p=this.getScene(f),g=this.getAt(d);this.scenes[u]=g,this.scenes[d]=p}}return this},moveUp:function(f){if(this.isProcessing)this._queue.push({op:"moveUp",keyA:f,keyB:null});else{var u=this.getIndex(f);if(ud),0,g)}}return this},moveBelow:function(f,u){if(f===u)return this;if(this.isProcessing)this._queue.push({op:"moveBelow",keyA:f,keyB:u});else{var d=this.getIndex(f),p=this.getIndex(u);if(d!==-1&&p!==-1&&p>d){var g=this.getAt(p);this.scenes.splice(p,1),d===0?this.scenes.unshift(g):this.scenes.splice(d-(p{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(45319),c=t(83419),o=t(44594),r=t(95540),n=t(37277),e=new c({initialize:function(h){this.scene=h,this.systems=h.sys,this.settings=h.sys.settings,this.key=h.sys.settings.key,this.manager=h.sys.game.scene,this.transitionProgress=0,this._elapsed=0,this._target=null,this._duration=0,this._onUpdate,this._onUpdateScope,this._willSleep=!1,this._willRemove=!1,h.sys.events.once(o.BOOT,this.boot,this),h.sys.events.on(o.START,this.pluginStart,this)},boot:function(){this.systems.events.once(o.DESTROY,this.destroy,this)},pluginStart:function(){this._target=null,this.systems.events.once(o.SHUTDOWN,this.shutdown,this)},start:function(i,h){return i===void 0&&(i=this.key),this.manager.queueOp("stop",this.key),this.manager.queueOp("start",i,h),this},restart:function(i){var h=this.key;return this.manager.queueOp("stop",h),this.manager.queueOp("start",h,i),this},transition:function(i){i===void 0&&(i={});var h=r(i,"target",!1),s=this.manager.getScene(h);if(!h||!this.checkValidTransition(s))return!1;var l=r(i,"duration",1e3);this._elapsed=0,this._target=s,this._duration=l,this._willSleep=r(i,"sleep",!1),this._willRemove=r(i,"remove",!1);var f=r(i,"onUpdate",null);f&&(this._onUpdate=f,this._onUpdateScope=r(i,"onUpdateScope",this.scene));var u=r(i,"allowInput",!1);this.settings.transitionAllowInput=u;var d=s.sys.settings;d.isTransition=!0,d.transitionFrom=this.scene,d.transitionDuration=l,d.transitionAllowInput=u,r(i,"moveAbove",!1)?this.manager.moveAbove(this.key,h):r(i,"moveBelow",!1)&&this.manager.moveBelow(this.key,h),s.sys.isSleeping()?s.sys.wake(r(i,"data")):this.manager.start(h,r(i,"data"));var p=r(i,"onStart",null),g=r(i,"onStartScope",this.scene);return p&&p.call(g,this.scene,s,l),this.systems.events.emit(o.TRANSITION_OUT,s,l),!0},checkValidTransition:function(i){return!(!i||i.sys.isActive()||i.sys.isTransitioning()||i===this.scene||this.systems.isTransitioning())},step:function(i,h){this._elapsed+=h,this.transitionProgress=a(this._elapsed/this._duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.transitionProgress),this._elapsed>=this._duration&&this.transitionComplete()},transitionComplete:function(){var i=this._target.sys,h=this._target.sys.settings;i.events.emit(o.TRANSITION_COMPLETE,this.scene),h.isTransition=!1,h.transitionFrom=null,this._duration=0,this._target=null,this._onUpdate=null,this._onUpdateScope=null,this._willRemove?this.manager.remove(this.key):this._willSleep?this.systems.sleep():this.manager.stop(this.key)},add:function(i,h,s,l){return this.manager.add(i,h,s,l)},launch:function(i,h){return i&&i!==this.key&&this.manager.queueOp("start",i,h),this},run:function(i,h){return i&&i!==this.key&&this.manager.queueOp("run",i,h),this},pause:function(i,h){return i===void 0&&(i=this.key),this.manager.queueOp("pause",i,h),this},resume:function(i,h){return i===void 0&&(i=this.key),this.manager.queueOp("resume",i,h),this},sleep:function(i,h){return i===void 0&&(i=this.key),this.manager.queueOp("sleep",i,h),this},wake:function(i,h){return i===void 0&&(i=this.key),this.manager.queueOp("wake",i,h),this},switch:function(i){return i!==this.key&&this.manager.queueOp("switch",this.key,i),this},stop:function(i,h){return i===void 0&&(i=this.key),this.manager.queueOp("stop",i,h),this},setActive:function(i,h,s){h===void 0&&(h=this.key);var l=this.manager.getScene(h);return l&&l.sys.setActive(i,s),this},setVisible:function(i,h){h===void 0&&(h=this.key);var s=this.manager.getScene(h);return s&&s.sys.setVisible(i),this},isSleeping:function(i){return i===void 0&&(i=this.key),this.manager.isSleeping(i)},isActive:function(i){return i===void 0&&(i=this.key),this.manager.isActive(i)},isPaused:function(i){return i===void 0&&(i=this.key),this.manager.isPaused(i)},isVisible:function(i){return i===void 0&&(i=this.key),this.manager.isVisible(i)},swapPosition:function(i,h){return h===void 0&&(h=this.key),i!==h&&this.manager.swapPosition(i,h),this},moveAbove:function(i,h){return h===void 0&&(h=this.key),i!==h&&this.manager.moveAbove(i,h),this},moveBelow:function(i,h){return h===void 0&&(h=this.key),i!==h&&this.manager.moveBelow(i,h),this},remove:function(i){return i===void 0&&(i=this.key),this.manager.remove(i),this},moveUp:function(i){return i===void 0&&(i=this.key),this.manager.moveUp(i),this},moveDown:function(i){return i===void 0&&(i=this.key),this.manager.moveDown(i),this},bringToTop:function(i){return i===void 0&&(i=this.key),this.manager.bringToTop(i),this},sendToBack:function(i){return i===void 0&&(i=this.key),this.manager.sendToBack(i),this},get:function(i){return this.manager.getScene(i)},getStatus:function(i){var h=this.manager.getScene(i);if(h)return h.sys.getStatus()},getIndex:function(i){return i===void 0&&(i=this.key),this.manager.getIndex(i)},shutdown:function(){var i=this.systems.events;i.off(o.SHUTDOWN,this.shutdown,this),i.off(o.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(o.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});n.register("ScenePlugin",e,"scenePlugin"),v.exports=e},55681:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(89993),c=t(35154),o=t(46975),r=t(87033),n={create:function(e){return typeof e=="string"?e={key:e}:e===void 0&&(e={}),{status:a.PENDING,key:c(e,"key",""),active:c(e,"active",!1),visible:c(e,"visible",!0),isBooted:!1,isTransition:!1,transitionFrom:null,transitionDuration:0,transitionAllowInput:!0,data:{},pack:c(e,"pack",!1),cameras:c(e,"cameras",null),map:c(e,"map",o(r,c(e,"mapAdd",{}))),physics:c(e,"physics",{}),loader:c(e,"loader",{}),plugins:c(e,"plugins",!1),input:c(e,"input",{})}}};v.exports=n},2368:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(89993),o=t(42363),r=t(44594),n=t(27397),e=t(52106),i=t(29747),h=t(55681),s=new a({initialize:function(f,u){this.scene=f,this.game,this.renderer,this.config=u,this.settings=h.create(u),this.canvas,this.context,this.anims,this.cache,this.plugins,this.registry,this.scale,this.sound,this.textures,this.add,this.cameras,this.displayList,this.events,this.make,this.scenePlugin,this.updateList,this.sceneUpdate=i},init:function(l){this.settings.status=c.INIT,this.sceneUpdate=i,this.game=l,this.renderer=l.renderer,this.canvas=l.canvas,this.context=l.context;var f=l.plugins;this.plugins=f,f.addToScene(this,o.Global,[o.CoreScene,e(this),n(this)]),this.events.emit(r.BOOT,this),this.settings.isBooted=!0},step:function(l,f){var u=this.events;u.emit(r.PRE_UPDATE,l,f),u.emit(r.UPDATE,l,f),this.sceneUpdate.call(this.scene,l,f),u.emit(r.POST_UPDATE,l,f)},render:function(l){var f=this.displayList;f.depthSort(),this.events.emit(r.PRE_RENDER,l),this.cameras.render(l,f),this.events.emit(r.RENDER,l)},queueDepthSort:function(){this.displayList.queueDepthSort()},depthSort:function(){this.displayList.depthSort()},pause:function(l){var f=this.settings,u=this.getStatus();return u!==c.CREATING&&u!==c.RUNNING?console.warn("Cannot pause non-running Scene",f.key):this.settings.active&&(f.status=c.PAUSED,f.active=!1,this.events.emit(r.PAUSE,this,l)),this},resume:function(l){var f=this.events,u=this.settings;return this.settings.active||(u.status=c.RUNNING,u.active=!0,f.emit(r.RESUME,this,l)),this},sleep:function(l){var f=this.settings,u=this.getStatus();return u!==c.CREATING&&u!==c.RUNNING?console.warn("Cannot sleep non-running Scene",f.key):(f.status=c.SLEEPING,f.active=!1,f.visible=!1,this.events.emit(r.SLEEP,this,l)),this},wake:function(l){var f=this.events,u=this.settings;return u.status=c.RUNNING,u.active=!0,u.visible=!0,f.emit(r.WAKE,this,l),u.isTransition&&f.emit(r.TRANSITION_WAKE,u.transitionFrom,u.transitionDuration),this},getData:function(){return this.settings.data},getStatus:function(){return this.settings.status},canInput:function(){var l=this.settings.status;return l>c.PENDING&&l<=c.RUNNING},isSleeping:function(){return this.settings.status===c.SLEEPING},isActive:function(){return this.settings.status===c.RUNNING},isPaused:function(){return this.settings.status===c.PAUSED},isTransitioning:function(){return this.settings.isTransition||this.scenePlugin._target!==null},isTransitionOut:function(){return this.scenePlugin._target!==null&&this.scenePlugin._duration>0},isTransitionIn:function(){return this.settings.isTransition},isVisible:function(){return this.settings.visible},setVisible:function(l){return this.settings.visible=l,this},setActive:function(l,f){return l?this.resume(f):this.pause(f)},start:function(l){var f=this.events,u=this.settings;l&&(u.data=l),u.status=c.START,u.active=!0,u.visible=!0,f.emit(r.START,this),f.emit(r.READY,this,l)},shutdown:function(l){var f=this.events,u=this.settings;f.off(r.TRANSITION_INIT),f.off(r.TRANSITION_START),f.off(r.TRANSITION_COMPLETE),f.off(r.TRANSITION_OUT),u.status=c.SHUTDOWN,u.active=!1,u.visible=!1,f.emit(r.SHUTDOWN,this,l)},destroy:function(){var l=this.events,f=this.settings;f.status=c.DESTROYED,f.active=!1,f.visible=!1,l.emit(r.DESTROY,this),l.removeAllListeners();for(var u=["scene","game","anims","cache","plugins","registry","sound","textures","add","camera","displayList","events","make","scenePlugin","updateList"],d=0;d{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9};v.exports=m},69830:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="addedtoscene"},7919:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="boot"},46763:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="create"},11763:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="destroy"},71555:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="pause"},36735:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="postupdate"},3809:v=>{/** + * @author samme + * @copyright 2021 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="prerender"},90716:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="preupdate"},58262:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="ready"},91633:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="removedfromscene"},10319:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="render"},87132:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="resume"},81961:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="shutdown"},90194:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="sleep"},6265:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="start"},33178:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="transitioncomplete"},43063:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="transitioninit"},11259:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="transitionout"},61611:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="transitionstart"},45209:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="transitionwake"},22966:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="update"},21747:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="wake"},44594:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.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:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(89993),c=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=c(!1,o,a),v.exports=o},30341:(v,m,t)=>{/** + * @author Richard Davey + * @author Pavle Goloskokovic (http://prunegames.com) + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(50792),o=t(14463),r=t(79291),n=t(29747),e=new a({Extends:c,initialize:function(h,s,l){c.call(this),this.manager=h,this.key=s,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=this.duration||0,this.totalDuration=this.totalDuration||0,this.config={mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0},this.currentConfig=this.config,this.config=r(this.config,l),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(i){return!i||!i.name||typeof i.name!="string"?!1:this.markers[i.name]?(console.error("addMarker "+i.name+" already exists in Sound"),!1):(i=r(!0,{name:"",start:0,duration:this.totalDuration-(i.start||0),config:{mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0}},i),this.markers[i.name]=i,!0)},updateMarker:function(i){return!i||!i.name||typeof i.name!="string"?!1:this.markers[i.name]?(this.markers[i.name]=r(!0,this.markers[i.name],i),!0):(console.warn("Audio Marker: "+i.name+" missing in Sound: "+this.key),!1)},removeMarker:function(i){var h=this.markers[i];return h?(this.markers[i]=null,h):null},play:function(i,h){if(i===void 0&&(i=""),typeof i=="object"&&(h=i,i=""),typeof i!="string")return!1;if(!i)this.currentMarker=null,this.currentConfig=this.config,this.duration=this.totalDuration;else{if(!this.markers[i])return console.warn("Marker: "+i+" missing in Sound: "+this.key),!1;this.currentMarker=this.markers[i],this.currentConfig=this.currentMarker.config,this.duration=this.currentMarker.duration}return this.resetConfig(),this.currentConfig=r(this.currentConfig,h),this.isPlaying=!0,this.isPaused=!1,!0},pause:function(){return this.isPaused||!this.isPlaying?!1:(this.isPlaying=!1,this.isPaused=!0,!0)},resume:function(){return!this.isPaused||this.isPlaying?!1:(this.isPlaying=!0,this.isPaused=!1,!0)},stop:function(){return!this.isPaused&&!this.isPlaying?!1:(this.isPlaying=!1,this.isPaused=!1,this.resetConfig(),!0)},applyConfig:function(){this.mute=this.currentConfig.mute,this.volume=this.currentConfig.volume,this.rate=this.currentConfig.rate,this.detune=this.currentConfig.detune,this.loop=this.currentConfig.loop,this.pan=this.currentConfig.pan},resetConfig:function(){this.currentConfig.seek=0,this.currentConfig.delay=0},update:n,calculateRate:function(){var i=1.0005777895065548,h=this.currentConfig.detune+this.manager.detune,s=Math.pow(i,h);this.totalRate=this.currentConfig.rate*this.manager.rate*s},destroy:function(){this.pendingRemove||(this.stop(),this.emit(o.DESTROY,this),this.removeAllListeners(),this.pendingRemove=!0,this.manager=null,this.config=null,this.currentConfig=null,this.markers=null,this.currentMarker=null)}});v.exports=e},85034:(v,m,t)=>{/** + * @author Richard Davey + * @author Pavle Goloskokovic (http://prunegames.com) + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(41786),o=t(50792),r=t(14463),n=t(8443),e=t(46710),i=t(58731),h=t(29747),s=t(26099),l=new a({Extends:o,initialize:function(u){o.call(this),this.game=u,this.jsonCache=u.cache.json,this.sounds=[],this.mute=!1,this.volume=1,this.pauseOnBlur=!0,this._rate=1,this._detune=0,this.locked=this.locked||!1,this.unlocked=!1,this.gameLostFocus=!1,this.listenerPosition=new s,u.events.on(n.BLUR,this.onGameBlur,this),u.events.on(n.FOCUS,this.onGameFocus,this),u.events.on(n.PRE_STEP,this.update,this),u.events.once(n.DESTROY,this.destroy,this)},add:h,addAudioSprite:function(f,u){u===void 0&&(u={});var d=this.add(f,u);d.spritemap=this.jsonCache.get(f).spritemap;for(var p in d.spritemap)if(d.spritemap.hasOwnProperty(p)){var g=c(u),y=d.spritemap[p];g.loop=y.hasOwnProperty("loop")?y.loop:!1,d.addMarker({name:p,start:y.start,duration:y.end-y.start,config:g})}return d},get:function(f){return i(this.sounds,"key",f)},getAll:function(f){return f?e(this.sounds,"key",f):e(this.sounds)},getAllPlaying:function(){return e(this.sounds,"isPlaying",!0)},play:function(f,u){var d=this.add(f);return d.once(r.COMPLETE,d.destroy,d),u?u.name?(d.addMarker(u),d.play(u.name)):d.play(u):d.play()},playAudioSprite:function(f,u,d){var p=this.addAudioSprite(f);return p.once(r.COMPLETE,p.destroy,p),p.play(u,d)},remove:function(f){var u=this.sounds.indexOf(f);return u!==-1?(f.destroy(),this.sounds.splice(u,1),!0):!1},removeAll:function(){this.sounds.forEach(function(f){f.destroy()}),this.sounds.length=0},removeByKey:function(f){for(var u=0,d=this.sounds.length-1;d>=0;d--){var p=this.sounds[d];p.key===f&&(p.destroy(),this.sounds.splice(d,1),u++)}return u},pauseAll:function(){this.forEachActiveSound(function(f){f.pause()}),this.emit(r.PAUSE_ALL,this)},resumeAll:function(){this.forEachActiveSound(function(f){f.resume()}),this.emit(r.RESUME_ALL,this)},setListenerPosition:h,stopAll:function(){this.forEachActiveSound(function(f){f.stop()}),this.emit(r.STOP_ALL,this)},stopByKey:function(f){var u=0;return this.getAll(f).forEach(function(d){d.stop()&&u++}),u},unlock:h,onBlur:h,onFocus:h,onGameBlur:function(){this.gameLostFocus=!0,this.pauseOnBlur&&this.onBlur()},onGameFocus:function(){this.gameLostFocus=!1,this.pauseOnBlur&&this.onFocus()},update:function(f,u){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit(r.UNLOCKED,this));for(var d=this.sounds.length-1;d>=0;d--)this.sounds[d].pendingRemove&&this.sounds.splice(d,1);this.sounds.forEach(function(p){p.update(f,u)})},destroy:function(){this.game.events.off(n.BLUR,this.onGameBlur,this),this.game.events.off(n.FOCUS,this.onGameFocus,this),this.game.events.off(n.PRE_STEP,this.update,this),this.removeAllListeners(),this.removeAll(),this.sounds.length=0,this.sounds=null,this.listenerPosition=null,this.game=null},forEachActiveSound:function(f,u){var d=this;this.sounds.forEach(function(p,g){p&&!p.pendingRemove&&f.call(u||d,p,g,d.sounds)})},setRate:function(f){return this.rate=f,this},rate:{get:function(){return this._rate},set:function(f){this._rate=f,this.forEachActiveSound(function(u){u.calculateRate()}),this.emit(r.GLOBAL_RATE,this,f)}},setDetune:function(f){return this.detune=f,this},detune:{get:function(){return this._detune},set:function(f){this._detune=f,this.forEachActiveSound(function(u){u.calculateRate()}),this.emit(r.GLOBAL_DETUNE,this,f)}}});v.exports=l},14747:(v,m,t)=>{/** + * @author Richard Davey + * @author Pavle Goloskokovic (http://prunegames.com) + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(33684),c=t(25960),o=t(57490),r={create:function(n){var e=n.config.audio,i=n.device.audio;return e.noAudio||!i.webAudio&&!i.audioData?new c(n):i.webAudio&&!e.disableWebAudio?new o(n):new a(n)}};v.exports=r},19723:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="complete"},98882:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="decodedall"},57506:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="decoded"},73146:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="destroy"},11305:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="detune"},40577:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="detune"},30333:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="mute"},20394:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="rate"},21802:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="volume"},1299:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="looped"},99190:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="loop"},97125:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="mute"},89259:v=>{/** + * @author pi-kei + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="pan"},79986:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="pauseall"},17586:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="pause"},19618:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="play"},42306:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="rate"},10387:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="resumeall"},48959:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="resume"},9960:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="seek"},19180:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="stopall"},98328:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="stop"},50401:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="unlocked"},52498:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="volume"},14463:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.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:(v,m,t)=>{/** + * @author Richard Davey + * @author Pavle Goloskokovic (http://prunegames.com) + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(30341),c=t(83419),o=t(14463),r=t(45319),n=new c({Extends:a,initialize:function(i,h,s){if(s===void 0&&(s={}),this.tags=i.game.cache.audio.get(h),!this.tags)throw new Error('No cached audio asset with key "'+h);this.audio=null,this.startTime=0,this.previousTime=0,this.duration=this.tags[0].duration,this.totalDuration=this.tags[0].duration,a.call(this,i,h,s)},play:function(e,i){return this.manager.isLocked(this,"play",[e,i])||!a.prototype.play.call(this,e,i)||!this.pickAndPlayAudioTag()?!1:(this.emit(o.PLAY,this),!0)},pause:function(){return this.manager.isLocked(this,"pause")||this.startTime>0||!a.prototype.pause.call(this)?!1:(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit(o.PAUSE,this),!0)},resume:function(){return this.manager.isLocked(this,"resume")||this.startTime>0||!a.prototype.resume.call(this)||!this.pickAndPlayAudioTag()?!1:(this.emit(o.RESUME,this),!0)},stop:function(){return this.manager.isLocked(this,"stop")||!a.prototype.stop.call(this)?!1:(this.stopAndReleaseAudioTag(),this.emit(o.STOP,this),!0)},pickAndPlayAudioTag:function(){if(!this.pickAudioTag())return this.reset(),!1;var e=this.currentConfig.seek,i=this.currentConfig.delay,h=(this.currentMarker?this.currentMarker.start:0)+e;return this.previousTime=h,this.audio.currentTime=h,this.applyConfig(),i===0?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+i*1e3,this.audio.paused||this.audio.pause()),this.resetConfig(),!0},pickAudioTag:function(){if(this.audio)return!0;for(var e=0;e0){this.startTime=h-this.manager.loopEndOffset?(this.audio.currentTime=i+Math.max(0,s-h),s=this.audio.currentTime):s=h){this.reset(),this.stopAndReleaseAudioTag(),this.emit(o.COMPLETE,this);return}this.previousTime=s}},destroy:function(){a.prototype.destroy.call(this),this.tags=null,this.audio&&this.stopAndReleaseAudioTag()},updateMute:function(){this.audio&&(this.audio.muted=this.currentConfig.mute||this.manager.mute)},updateVolume:function(){this.audio&&(this.audio.volume=r(this.currentConfig.volume*this.manager.volume,0,1))},calculateRate:function(){a.prototype.calculateRate.call(this),this.audio&&(this.audio.playbackRate=this.totalRate)},mute:{get:function(){return this.currentConfig.mute},set:function(e){this.currentConfig.mute=e,!this.manager.isLocked(this,"mute",e)&&(this.updateMute(),this.emit(o.MUTE,this,e))}},setMute:function(e){return this.mute=e,this},volume:{get:function(){return this.currentConfig.volume},set:function(e){this.currentConfig.volume=e,!this.manager.isLocked(this,"volume",e)&&(this.updateVolume(),this.emit(o.VOLUME,this,e))}},setVolume:function(e){return this.volume=e,this},rate:{get:function(){return this.currentConfig.rate},set:function(e){this.currentConfig.rate=e,!this.manager.isLocked(this,o.RATE,e)&&(this.calculateRate(),this.emit(o.RATE,this,e))}},setRate:function(e){return this.rate=e,this},detune:{get:function(){return this.currentConfig.detune},set:function(e){this.currentConfig.detune=e,!this.manager.isLocked(this,o.DETUNE,e)&&(this.calculateRate(),this.emit(o.DETUNE,this,e))}},setDetune:function(e){return this.detune=e,this},seek:{get:function(){return this.isPlaying?this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0):this.isPaused?this.currentConfig.seek:0},set:function(e){this.manager.isLocked(this,"seek",e)||this.startTime>0||(this.isPlaying||this.isPaused)&&(e=Math.min(Math.max(0,e),this.duration),this.isPlaying?(this.previousTime=e,this.audio.currentTime=e):this.isPaused&&(this.currentConfig.seek=e),this.emit(o.SEEK,this,e))}},setSeek:function(e){return this.seek=e,this},loop:{get:function(){return this.currentConfig.loop},set:function(e){this.currentConfig.loop=e,!this.manager.isLocked(this,"loop",e)&&(this.audio&&(this.audio.loop=e),this.emit(o.LOOP,this,e))}},setLoop:function(e){return this.loop=e,this},pan:{get:function(){return this.currentConfig.pan},set:function(e){this.currentConfig.pan=e,this.emit(o.PAN,this,e)}},setPan:function(e){return this.pan=e,this}});v.exports=n},33684:(v,m,t)=>{/** + * @author Richard Davey + * @author Pavle Goloskokovic (http://prunegames.com) + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(85034),c=t(83419),o=t(14463),r=t(64895),n=new c({Extends:a,initialize:function(i){this.override=!0,this.audioPlayDelay=.1,this.loopEndOffset=.05,this.onBlurPausedSounds=[],this.locked="ontouchstart"in window,this.lockedActionsQueue=this.locked?[]:null,this._mute=!1,this._volume=1,a.call(this,i)},add:function(e,i){var h=new r(this,e,i);return this.sounds.push(h),h},unlock:function(){this.locked=!1;var e=this;if(this.game.cache.audio.entries.each(function(l,f){for(var u=0;u{/** + * @author Richard Davey + * @author Pavle Goloskokovic (http://prunegames.com) + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.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:(v,m,t)=>{/** + * @author Richard Davey + * @author Pavle Goloskokovic (http://prunegames.com) + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(30341),c=t(83419),o=t(50792),r=t(79291),n=t(29747),e=function(){return!1},i=function(){return null},h=function(){return this},s=new c({Extends:o,initialize:function(f,u,d){d===void 0&&(d={}),o.call(this),this.manager=f,this.key=u,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=0,this.totalDuration=0,this.config=r({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0},d),this.currentConfig=this.config,this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.seek=0,this.loop=!1,this.pan=0,this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:e,updateMarker:e,removeMarker:i,play:e,pause:e,resume:e,stop:e,setMute:h,setVolume:h,setRate:h,setDetune:h,setSeek:h,setLoop:h,setPan:h,applyConfig:i,resetConfig:i,update:n,calculateRate:i,destroy:function(){a.prototype.destroy.call(this)}});v.exports=s},25960:(v,m,t)=>{/** + * @author Richard Davey + * @author Pavle Goloskokovic (http://prunegames.com) + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(85034),c=t(83419),o=t(50792),r=t(4603),n=t(29747),e=new c({Extends:o,initialize:function(h){o.call(this),this.game=h,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(i,h){var s=new r(this,i,h);return this.sounds.push(s),s},addAudioSprite:function(i,h){var s=this.add(i,h);return s.spritemap={},s},get:function(i){return a.prototype.get.call(this,i)},getAll:function(i){return a.prototype.getAll.call(this,i)},play:function(i,h){return!1},playAudioSprite:function(i,h,s){return!1},remove:function(i){return a.prototype.remove.call(this,i)},removeAll:function(){return a.prototype.removeAll.call(this)},removeByKey:function(i){return a.prototype.removeByKey.call(this,i)},stopByKey:function(i){return a.prototype.stopByKey.call(this,i)},onBlur:n,onFocus:n,onGameBlur:n,onGameFocus:n,pauseAll:n,resumeAll:n,stopAll:n,update:n,setRate:n,setDetune:n,setMute:n,setVolume:n,unlock:n,forEachActiveSound:function(i,h){a.prototype.forEachActiveSound.call(this,i,h)},destroy:function(){a.prototype.destroy.call(this)}});v.exports=e},71741:(v,m,t)=>{/** + * @author Richard Davey + * @author Pavle Goloskokovic (http://prunegames.com) + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(30341),c=t(83419),o=t(14463),r=t(95540),n=new c({Extends:a,initialize:function(i,h,s){if(s===void 0&&(s={}),this.audioBuffer=i.game.cache.audio.get(h),!this.audioBuffer)throw new Error('Audio key "'+h+'" missing from cache');this.source=null,this.loopSource=null,this.muteNode=i.context.createGain(),this.volumeNode=i.context.createGain(),this.pannerNode=null,this.spatialNode=null,this.spatialSource=null,this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),i.context.createPanner&&(this.spatialNode=i.context.createPanner(),this.volumeNode.connect(this.spatialNode)),i.context.createStereoPanner?(this.pannerNode=i.context.createStereoPanner(),i.context.createPanner?this.spatialNode.connect(this.pannerNode):this.volumeNode.connect(this.pannerNode),this.pannerNode.connect(i.destination)):i.context.createPanner?this.spatialNode.connect(i.destination):this.volumeNode.connect(i.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,a.call(this,i,h,s)},play:function(e,i){return a.prototype.play.call(this,e,i)?(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(o.PLAY,this),!0):!1},pause:function(){return this.manager.context.currentTime{/** + * @author Richard Davey + * @author Pavle Goloskokovic (http://prunegames.com) + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(53134),c=t(85034),o=t(83419),r=t(14463),n=t(8443),e=t(71741),i=t(95540),h=new o({Extends:c,initialize:function(l){this.context=this.createAudioContext(l),this.masterMuteNode=this.context.createGain(),this.masterVolumeNode=this.context.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(this.context.destination),this.destination=this.masterMuteNode,this.locked=this.context.state==="suspended"&&("ontouchstart"in window||"onclick"in window),c.call(this,l),this.locked&&l.isBooted?this.unlock():l.events.once(n.BOOT,this.unlock,this)},createAudioContext:function(s){var l=s.config.audio;if(l.context)return l.context.resume(),l.context;if(window.hasOwnProperty("AudioContext"))return new AudioContext;if(window.hasOwnProperty("webkitAudioContext"))return new window.webkitAudioContext},setAudioContext:function(s){return this.context&&this.context.close(),this.masterMuteNode&&this.masterMuteNode.disconnect(),this.masterVolumeNode&&this.masterVolumeNode.disconnect(),this.context=s,this.masterMuteNode=s.createGain(),this.masterVolumeNode=s.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(s.destination),this.destination=this.masterMuteNode,this},add:function(s,l){var f=new e(this,s,l);return this.sounds.push(f),f},decodeAudio:function(s,l){var f;Array.isArray(s)?f=s:f=[{key:s,data:l}];for(var u=this.game.cache.audio,d=f.length,p=0;p{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(37105),c=t(83419),o=t(29747),r=t(19186),n=new c({initialize:function(i){this.parent=i,this.list=[],this.position=0,this.addCallback=o,this.removeCallback=o,this._sortKey=""},add:function(e,i){return i?a.Add(this.list,e):a.Add(this.list,e,0,this.addCallback,this)},addAt:function(e,i,h){return h?a.AddAt(this.list,e,i):a.AddAt(this.list,e,i,0,this.addCallback,this)},getAt:function(e){return this.list[e]},getIndex:function(e){return this.list.indexOf(e)},sort:function(e,i){return e?(i===void 0&&(i=function(h,s){return h[e]-s[e]}),r(this.list,i),this):this},getByName:function(e){return a.GetFirst(this.list,"name",e)},getRandom:function(e,i){return a.GetRandom(this.list,e,i)},getFirst:function(e,i,h,s){return a.GetFirst(this.list,e,i,h,s)},getAll:function(e,i,h,s){return a.GetAll(this.list,e,i,h,s)},count:function(e,i){return a.CountAllMatching(this.list,e,i)},swap:function(e,i){a.Swap(this.list,e,i)},moveTo:function(e,i){return a.MoveTo(this.list,e,i)},moveAbove:function(e,i){return a.MoveAbove(this.list,e,i)},moveBelow:function(e,i){return a.MoveBelow(this.list,e,i)},remove:function(e,i){return i?a.Remove(this.list,e):a.Remove(this.list,e,this.removeCallback,this)},removeAt:function(e,i){return i?a.RemoveAt(this.list,e):a.RemoveAt(this.list,e,this.removeCallback,this)},removeBetween:function(e,i,h){return h?a.RemoveBetween(this.list,e,i):a.RemoveBetween(this.list,e,i,this.removeCallback,this)},removeAll:function(e){for(var i=this.list.length;i--;)this.remove(this.list[i],e);return this},bringToTop:function(e){return a.BringToTop(this.list,e)},sendToBack:function(e){return a.SendToBack(this.list,e)},moveUp:function(e){return a.MoveUp(this.list,e),e},moveDown:function(e){return a.MoveDown(this.list,e),e},reverse:function(){return this.list.reverse(),this},shuffle:function(){return a.Shuffle(this.list),this},replace:function(e,i){return a.Replace(this.list,e,i)},exists:function(e){return this.list.indexOf(e)>-1},setAll:function(e,i,h,s){return a.SetAll(this.list,e,i,h,s),this},each:function(e,i){for(var h=[null],s=2;s0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}}});v.exports=n},90330:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=new a({initialize:function(r){this.entries={},this.size=0,this.setAll(r)},setAll:function(o){if(Array.isArray(o))for(var r=0;r{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(50792),o=t(82348),r=new a({Extends:c,initialize:function(){c.call(this),this._pending=[],this._active=[],this._destroy=[],this._toProcess=0,this.checkQueue=!1},isActive:function(n){return this._active.indexOf(n)>-1},isPending:function(n){return this._toProcess>0&&this._pending.indexOf(n)>-1},isDestroying:function(n){return this._destroy.indexOf(n)>-1},add:function(n){return this.checkQueue&&this.isActive(n)&&!this.isDestroying(n)||this.isPending(n)||(this._pending.push(n),this._toProcess++),n},remove:function(n){if(this.isPending(n)){var e=this._pending,i=e.indexOf(n);i!==-1&&e.splice(i,1)}else this.isActive(n)&&(this._destroy.push(n),this._toProcess++);return n},removeAll:function(){for(var n=this._active,e=this._destroy,i=n.length;i--;)e.push(n[i]),this._toProcess++;return this},update:function(){if(this._toProcess===0)return this._active;var n=this._destroy,e=this._active,i,h;for(i=0;i{/** + * @author Vladimir Agafonkin + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(43886);function c(x){if(!(this instanceof c))return new c(x);this._maxEntries=Math.max(4,x||9),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}c.prototype={all:function(){return this._all(this.data,[])},search:function(x){var T=this.data,S=[],M=this.toBBox;if(!p(x,T))return S;for(var w=[],L,F,O,b;T;){for(L=0,F=T.children.length;L=0&&L[T].children.length>this._maxEntries;)this._split(L,T),T--;this._adjustParentBBoxes(w,L,T)},_split:function(x,T){var S=x[T],M=S.children.length,w=this._minEntries;this._chooseSplitAxis(S,w,M);var L=this._chooseSplitIndex(S,w,M),F=g(S.children.splice(L,S.children.length-L));F.height=S.height,F.leaf=S.leaf,r(S,this.toBBox),r(F,this.toBBox),T?x[T-1].children.push(F):this._splitRoot(S,F)},_splitRoot:function(x,T){this.data=g([x,T]),this.data.height=x.height+1,this.data.leaf=!1,r(this.data,this.toBBox)},_chooseSplitIndex:function(x,T,S){var M,w,L,F,O,b,N,V;for(b=N=1/0,M=T;M<=S-T;M++)w=n(x,0,M,this.toBBox),L=n(x,M,S,this.toBBox),F=u(w,L),O=s(w)+s(L),F=T;b--)N=x.children[b],e(F,x.leaf?w(N):N),O+=l(F);return O},_adjustParentBBoxes:function(x,T,S){for(var M=S;M>=0;M--)e(T[M],x)},_condense:function(x){for(var T=x.length-1,S;T>=0;T--)x[T].children.length===0?T>0?(S=x[T-1].children,S.splice(S.indexOf(x[T]),1)):this.clear():r(x[T],this.toBBox)},compareMinX:function(x,T){return x.left-T.left},compareMinY:function(x,T){return x.top-T.top},toBBox:function(x){return{minX:x.left,minY:x.top,maxX:x.right,maxY:x.bottom}}};function o(x,T,S){if(!S)return T.indexOf(x);for(var M=0;M=x.minX&&T.maxY>=x.minY}function g(x){return{children:x,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function y(x,T,S,M,w){for(var L=[T,S],F;L.length;)S=L.pop(),T=L.pop(),!(S-T<=M)&&(F=T+Math.ceil((S-T)/M/2)*M,a(x,F,T,S,w),L.push(T,F,F,S))}v.exports=c},35072:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=new a({initialize:function(r){if(this.entries=[],Array.isArray(r))for(var n=0;n-1&&this.entries.splice(r,1),this},dump:function(){console.group("Set");for(var o=0;o-1},union:function(o){var r=new c;return o.entries.forEach(function(n){r.set(n)}),this.entries.forEach(function(n){r.set(n)}),r},intersect:function(o){var r=new c;return this.entries.forEach(function(n){o.contains(n)&&r.set(n)}),r},difference:function(o){var r=new c;return this.entries.forEach(function(n){o.contains(n)||r.set(n)}),r},size:{get:function(){return this.entries.length},set:function(o){return o{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(45319),c=t(83419),o=t(56583),r=t(26099),n=new c({initialize:function(i,h,s,l){i===void 0&&(i=0),h===void 0&&(h=i),s===void 0&&(s=0),l===void 0&&(l=null),this._width=i,this._height=h,this._parent=l,this.aspectMode=s,this.aspectRatio=h===0?1:i/h,this.minWidth=0,this.minHeight=0,this.maxWidth=Number.MAX_VALUE,this.maxHeight=Number.MAX_VALUE,this.snapTo=new r},setAspectMode:function(e){return e===void 0&&(e=0),this.aspectMode=e,this.setSize(this._width,this._height)},setSnap:function(e,i){return e===void 0&&(e=0),i===void 0&&(i=e),this.snapTo.set(e,i),this.setSize(this._width,this._height)},setParent:function(e){return this._parent=e,this.setSize(this._width,this._height)},setMin:function(e,i){return e===void 0&&(e=0),i===void 0&&(i=e),this.minWidth=a(e,0,this.maxWidth),this.minHeight=a(i,0,this.maxHeight),this.setSize(this._width,this._height)},setMax:function(e,i){return e===void 0&&(e=Number.MAX_VALUE),i===void 0&&(i=e),this.maxWidth=a(e,this.minWidth,Number.MAX_VALUE),this.maxHeight=a(i,this.minHeight,Number.MAX_VALUE),this.setSize(this._width,this._height)},setSize:function(e,i){switch(e===void 0&&(e=0),i===void 0&&(i=e),this.aspectMode){case n.NONE:this._width=this.getNewWidth(o(e,this.snapTo.x)),this._height=this.getNewHeight(o(i,this.snapTo.y)),this.aspectRatio=this._height===0?1:this._width/this._height;break;case n.WIDTH_CONTROLS_HEIGHT:this._width=this.getNewWidth(o(e,this.snapTo.x)),this._height=this.getNewHeight(this._width*(1/this.aspectRatio),!1);break;case n.HEIGHT_CONTROLS_WIDTH:this._height=this.getNewHeight(o(i,this.snapTo.y)),this._width=this.getNewWidth(this._height*this.aspectRatio,!1);break;case n.FIT:this.constrain(e,i,!0);break;case n.ENVELOP:this.constrain(e,i,!1);break}return this},setAspectRatio:function(e){return this.aspectRatio=e,this.setSize(this._width,this._height)},resize:function(e,i){return this._width=this.getNewWidth(o(e,this.snapTo.x)),this._height=this.getNewHeight(o(i,this.snapTo.y)),this.aspectRatio=this._height===0?1:this._width/this._height,this},getNewWidth:function(e,i){return i===void 0&&(i=!0),e=a(e,this.minWidth,this.maxWidth),i&&this._parent&&e>this._parent.width&&(e=Math.max(this.minWidth,this._parent.width)),e},getNewHeight:function(e,i){return i===void 0&&(i=!0),e=a(e,this.minHeight,this.maxHeight),i&&this._parent&&e>this._parent.height&&(e=Math.max(this.minHeight,this._parent.height)),e},constrain:function(e,i,h){e===void 0&&(e=0),i===void 0&&(i=e),h===void 0&&(h=!0),e=this.getNewWidth(e),i=this.getNewHeight(i);var s=this.snapTo,l=i===0?1:e/i;return h&&this.aspectRatio>l||!h&&this.aspectRatio0&&(i=o(i,s.y),e=i*this.aspectRatio)):(h&&this.aspectRatiol)&&(i=o(i,s.y),e=i*this.aspectRatio,s.x>0&&(e=o(e,s.x),i=e*(1/this.aspectRatio))),this._width=e,this._height=i,this},fitTo:function(e,i){return this.constrain(e,i,!0)},envelop:function(e,i){return this.constrain(e,i,!1)},setWidth:function(e){return this.setSize(e,this._height)},setHeight:function(e){return this.setSize(this._width,e)},toString:function(){return"[{ Size (width="+this._width+" height="+this._height+" aspectRatio="+this.aspectRatio+" aspectMode="+this.aspectMode+") }]"},setCSS:function(e){e&&e.style&&(e.style.width=this._width+"px",e.style.height=this._height+"px")},copy:function(e){return e.setAspectMode(this.aspectMode),e.aspectRatio=this.aspectRatio,e.setSize(this.width,this.height)},destroy:function(){this._parent=null,this.snapTo=null},width:{get:function(){return this._width},set:function(e){this.setSize(e,this._height)}},height:{get:function(){return this._height},set:function(e){this.setSize(this._width,e)}}});n.NONE=0,n.WIDTH_CONTROLS_HEIGHT=1,n.HEIGHT_CONTROLS_WIDTH=2,n.FIT=3,n.ENVELOP=4,v.exports=n},15238:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="add"},56187:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="remove"},82348:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={PROCESS_QUEUE_ADD:t(15238),PROCESS_QUEUE_REMOVE:t(56187)}},41392:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={Events:t(82348),List:t(73162),Map:t(90330),ProcessQueue:t(25774),RTree:t(59542),Set:t(35072),Size:t(86555)}},57382:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(45319),o=t(40987),r=t(8054),n=t(50030),e=t(79237),i=new a({Extends:e,initialize:function(s,l,f,u,d){e.call(this,s,l,f,u,d),this.add("__BASE",0,0,0,u,d),this._source=this.frames.__BASE.source,this.canvas=this._source.image,this.context=this.canvas.getContext("2d",{willReadFrequently:!0}),this.width=u,this.height=d,this.imageData=this.context.getImageData(0,0,u,d),this.data=null,this.imageData&&(this.data=this.imageData.data),this.pixels=null,this.buffer,this.data&&(this.imageData.data.buffer?(this.buffer=this.imageData.data.buffer,this.pixels=new Uint32Array(this.buffer)):window.ArrayBuffer?(this.buffer=new ArrayBuffer(this.imageData.data.length),this.pixels=new Uint32Array(this.buffer)):this.pixels=this.imageData.data)},update:function(){return this.imageData=this.context.getImageData(0,0,this.width,this.height),this.data=this.imageData.data,this.imageData.data.buffer?(this.buffer=this.imageData.data.buffer,this.pixels=new Uint32Array(this.buffer)):window.ArrayBuffer?(this.buffer=new ArrayBuffer(this.imageData.data.length),this.pixels=new Uint32Array(this.buffer)):this.pixels=this.imageData.data,this.manager.game.config.renderType===r.WEBGL&&this.refresh(),this},draw:function(h,s,l,f){return f===void 0&&(f=!0),this.context.drawImage(l,h,s),f&&this.update(),this},drawFrame:function(h,s,l,f,u){l===void 0&&(l=0),f===void 0&&(f=0),u===void 0&&(u=!0);var d=this.manager.getFrame(h,s);if(d){var p=d.canvasData,g=d.cutWidth,y=d.cutHeight,x=d.source.resolution;this.context.drawImage(d.source.image,p.x,p.y,g,y,l,f,g/x,y/x),u&&this.update()}return this},setPixel:function(h,s,l,f,u,d){d===void 0&&(d=255),h=Math.abs(Math.floor(h)),s=Math.abs(Math.floor(s));var p=this.getIndex(h,s);if(p>-1){var g=this.context.getImageData(h,s,1,1);g.data[0]=l,g.data[1]=f,g.data[2]=u,g.data[3]=d,this.context.putImageData(g,h,s)}return this},putData:function(h,s,l,f,u,d,p){return f===void 0&&(f=0),u===void 0&&(u=0),d===void 0&&(d=h.width),p===void 0&&(p=h.height),this.context.putImageData(h,s,l,f,u,d,p),this},getData:function(h,s,l,f){h=c(Math.floor(h),0,this.width-1),s=c(Math.floor(s),0,this.height-1),l=c(l,1,this.width-h),f=c(f,1,this.height-s);var u=this.context.getImageData(h,s,l,f);return u},getPixel:function(h,s,l){l||(l=new o);var f=this.getIndex(h,s);if(f>-1){var u=this.data,d=u[f+0],p=u[f+1],g=u[f+2],y=u[f+3];l.setTo(d,p,g,y)}return l},getPixels:function(h,s,l,f){h===void 0&&(h=0),s===void 0&&(s=0),l===void 0&&(l=this.width),f===void 0&&(f=l),h=Math.abs(Math.round(h)),s=Math.abs(Math.round(s));for(var u=c(h,0,this.width),d=c(h+l,0,this.width),p=c(s,0,this.height),g=c(s+f,0,this.height),y=new o,x=[],T=p;T{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(10312),c=t(71911),o=t(27919),r=t(83419),n=t(8054),e=t(4327),i=t(95540),h=t(36060),s=t(32302),l=t(79237),f=t(70554),u=new r({Extends:l,initialize:function(p,g,y,x){y===void 0&&(y=256),x===void 0&&(x=256),this.type="DynamicTexture";var T=p.game.renderer,S=T&&T.type===n.CANVAS,M=S?o.create2D(this,y,x):[this];l.call(this,p,g,M,y,x),this.add("__BASE",0,0,0,y,x),this.renderer=T,this.width=-1,this.height=-1,this.isDrawing=!1,this.canvas=S?M:null,this.context=S?M.getContext("2d",{willReadFrequently:!0}):null,this.dirty=!1,this.isSpriteTexture=!0,this._eraseMode=!1,this.camera=new c(0,0,y,x).setScene(p.game.scene.systemScene,!1),this.renderTarget=S?null:new s(T,y,x,1,0,!1,!0,!0,!1),this.pipeline=S?null:T.pipelines.get(h.SINGLE_PIPELINE),this.setSize(y,x)},setSize:function(d,p){p===void 0&&(p=d);var g=this.get(),y=g.source;if(d!==this.width||p!==this.height){this.canvas&&(this.canvas.width=d,this.canvas.height=p);var x=this.renderTarget;x&&(x.willResize(d,p)&&x.resize(d,p),x.texture!==y.glTexture&&this.renderer.deleteTexture(y.glTexture),this.setFromRenderTarget()),this.camera.setSize(d,p),y.width=d,y.height=p,g.setSize(d,p),this.width=d,this.height=p}else{var T=this.getSourceImage();g.cutX+d>T.width&&(d=T.width-g.cutX),g.cutY+p>T.height&&(p=T.height-g.cutY),g.setSize(d,p,g.cutX,g.cutY)}return this},setFromRenderTarget:function(){var d=this.get(),p=d.source,g=this.renderTarget;return p.isRenderTexture=!0,p.isGLTexture=!0,p.glTexture=g.texture,this},setIsSpriteTexture:function(d){return this.isSpriteTexture=d,this},fill:function(d,p,g,y,x,T){var S=this.camera,M=this.renderer;p===void 0&&(p=1),g===void 0&&(g=0),y===void 0&&(y=0),x===void 0&&(x=this.width),T===void 0&&(T=this.height);var w=d>>16&255,L=d>>8&255,F=d&255,O=this.renderTarget;if(S.preRender(),O){O.bind(!0);var b=this.pipeline.manager.set(this.pipeline),N=M.width/O.width,V=M.height/O.height,K=O.height-(y+T);b.drawFillRect(g*N,K*V,x*N,T*V,f.getTintFromFloats(F/255,L/255,w/255,1),p),O.unbind(!0)}else{var $=this.context;M.setContext($),$.globalCompositeOperation="source-over",$.fillStyle="rgba("+w+","+L+","+F+","+p+")",$.fillRect(g,y,x,T),M.setContext()}return this.dirty=!0,this},clear:function(){if(this.dirty){var d=this.context,p=this.renderTarget;p?p.clear():d&&(d.save(),d.setTransform(1,0,0,1,0,0),d.clearRect(0,0,this.width,this.height),d.restore()),this.dirty=!1}return this},stamp:function(d,p,g,y,x){g===void 0&&(g=0),y===void 0&&(y=0);var T=i(x,"alpha",1),S=i(x,"tint",16777215),M=i(x,"angle",0),w=i(x,"rotation",0),L=i(x,"scale",1),F=i(x,"scaleX",L),O=i(x,"scaleY",L),b=i(x,"originX",.5),N=i(x,"originY",.5),V=i(x,"blendMode",0),K=i(x,"erase",!1),$=i(x,"skipBatch",!1),j=this.manager.resetStamp(T,S);return j.setAngle(0),M!==0?j.setAngle(M):w!==0&&j.setRotation(w),j.setScale(F,O),j.setTexture(d,p),j.setOrigin(b,N),j.setBlendMode(V),K&&(this._eraseMode=!0),$?this.batchGameObject(j,g,y):this.draw(j,g,y),K&&(this._eraseMode=!1),this},erase:function(d,p,g){return this._eraseMode=!0,this.draw(d,p,g),this._eraseMode=!1,this},draw:function(d,p,g,y,x){return this.beginDraw(),this.batchDraw(d,p,g,y,x),this.endDraw(),this},drawFrame:function(d,p,g,y,x,T){return this.beginDraw(),this.batchDrawFrame(d,p,g,y,x,T),this.endDraw(),this},repeat:function(d,p,g,y,x,T,S,M,w){if(g===void 0&&(g=0),y===void 0&&(y=0),x===void 0&&(x=this.width),T===void 0&&(T=this.height),S===void 0&&(S=1),M===void 0&&(M=16777215),w===void 0&&(w=!1),d instanceof e?p=d:p=this.manager.getFrame(d,p),!p)return this;var L=this.manager.resetStamp(S,M);L.setFrame(p),L.setOrigin(0);var F=p.width,O=p.height;x=Math.floor(x),T=Math.floor(T);var b=Math.ceil(x/F),N=Math.ceil(T/O),V=b*F-x,K=N*O-T;V>0&&(V=F-V),K>0&&(K=O-K),g<0&&(b+=Math.ceil(Math.abs(g)/F)),y<0&&(N+=Math.ceil(Math.abs(y)/O));var $=g,j=y,X=!1,Y=this.manager.stampCrop.setTo(0,0,F,O);w||this.beginDraw();for(var D=0;D0&&z===b-1&&(X=!0,Y.width=V),K>0&&D===N-1&&(X=!0,Y.height=K),X&&L.setCrop(Y),this.batchGameObject(L,$,j),L.isCropped=!1,Y.setTo(0,0,F,O),$+=F}$=g,j+=O}return w||this.endDraw(),this},beginDraw:function(){if(!this.isDrawing){var d=this.camera,p=this.renderer,g=this.renderTarget;d.preRender(),g?p.beginCapture(g.width,g.height):p.setContext(this.context),this.isDrawing=!0}return this},batchDraw:function(d,p,g,y,x){return Array.isArray(d)||(d=[d]),this.batchList(d,p,g,y,x),this},batchDrawFrame:function(d,p,g,y,x,T){g===void 0&&(g=0),y===void 0&&(y=0),x===void 0&&(x=1),T===void 0&&(T=16777215);var S=this.manager.getFrame(d,p);return S&&(this.renderTarget?this.pipeline.batchTextureFrame(S,g,y,T,x,this.camera.matrix,null):this.batchTextureFrame(S,g,y,x,T)),this},endDraw:function(d){if(d===void 0&&(d=this._eraseMode),this.isDrawing){var p=this.renderer,g=this.renderTarget;if(g){var y=p.endCapture(),x=p.pipelines.setUtility();x.blitFrame(y,g,1,!1,!1,d,this.isSpriteTexture),p.resetScissor(),p.resetViewport()}else p.setContext();this.dirty=!0,this.isDrawing=!1}return this},batchList:function(d,p,g,y,x){var T=d.length;if(T!==0)for(var S=0;S0&&w.height>0&&M.drawImage(L,w.x,w.y,w.width,w.height,p,g,w.width,w.height),M.restore()}},snapshotArea:function(d,p,g,y,x,T,S){return this.renderTarget?this.renderer.snapshotFramebuffer(this.renderTarget.framebuffer,this.width,this.height,x,!1,d,p,g,y,T,S):this.renderer.snapshotCanvas(this.canvas,x,!1,d,p,g,y,T,S),this},snapshot:function(d,p,g){return this.snapshotArea(0,0,this.width,this.height,d,p,g)},snapshotPixel:function(d,p,g){return this.snapshotArea(d,p,1,1,g,"pixel")},getWebGLTexture:function(){if(this.renderTarget)return this.renderTarget.texture},renderWebGL:function(d,p,g,y){var x=this.manager.resetStamp();x.setTexture(this),x.setOrigin(0),x.renderWebGL(d,x,g,y)},renderCanvas:function(){},destroy:function(){var d=this.manager.stamp;d&&d.texture===this&&this.manager.resetStamp(),l.prototype.destroy.call(this),o.remove(this.canvas),this.renderTarget&&this.renderTarget.destroy(),this.camera.destroy(),this.canvas=null,this.context=null,this.renderer=null}});v.exports=u},4327:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(45319),o=t(79291),r=new a({initialize:function(e,i,h,s,l,f,u){this.texture=e,this.name=i,this.source=e.source[h],this.sourceIndex=h,this.cutX,this.cutY,this.cutWidth,this.cutHeight,this.x=0,this.y=0,this.width,this.height,this.halfWidth,this.halfHeight,this.centerX,this.centerY,this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.u0=0,this.v0=0,this.u1=0,this.v1=0,this.data={cut:{x:0,y:0,w:0,h:0,r:0,b:0},trim:!1,sourceSize:{w:0,h:0},spriteSourceSize:{x:0,y:0,w:0,h:0,r:0,b:0},radius:0,drawImage:{x:0,y:0,width:0,height:0},is3Slice:!1,scale9:!1,scale9Borders:{x:0,y:0,w:0,h:0}},this.setSize(f,u,s,l)},setSize:function(n,e,i,h){i===void 0&&(i=0),h===void 0&&(h=0),this.cutX=i,this.cutY=h,this.cutWidth=n,this.cutHeight=e,this.width=n,this.height=e,this.halfWidth=Math.floor(n*.5),this.halfHeight=Math.floor(e*.5),this.centerX=Math.floor(n/2),this.centerY=Math.floor(e/2);var s=this.data,l=s.cut;l.x=i,l.y=h,l.w=n,l.h=e,l.r=i+n,l.b=h+e,s.sourceSize.w=n,s.sourceSize.h=e,s.spriteSourceSize.w=n,s.spriteSourceSize.h=e,s.radius=.5*Math.sqrt(n*n+e*e);var f=s.drawImage;return f.x=i,f.y=h,f.width=n,f.height=e,this.updateUVs()},setTrim:function(n,e,i,h,s,l){var f=this.data,u=f.spriteSourceSize;return f.trim=!0,f.sourceSize.w=n,f.sourceSize.h=e,u.x=i,u.y=h,u.w=s,u.h=l,u.r=i+s,u.b=h+l,this.x=i,this.y=h,this.width=s,this.height=l,this.halfWidth=s*.5,this.halfHeight=l*.5,this.centerX=Math.floor(s/2),this.centerY=Math.floor(l/2),this.updateUVs()},setScale9:function(n,e,i,h){var s=this.data;return s.scale9=!0,s.is3Slice=e===0&&h===this.height,s.scale9Borders.x=n,s.scale9Borders.y=e,s.scale9Borders.w=i,s.scale9Borders.h=h,this},setCropUVs:function(n,e,i,h,s,l,f){var u=this.cutX,d=this.cutY,p=this.cutWidth,g=this.cutHeight,y=this.realWidth,x=this.realHeight;e=c(e,0,y),i=c(i,0,x),h=c(h,0,y-e),s=c(s,0,x-i);var T=u+e,S=d+i,M=h,w=s,L=this.data;if(L.trim){var F=L.spriteSourceSize;h=c(h,0,p-e),s=c(s,0,g-i);var O=e+h,b=i+s,N=!(F.rO||F.y>b);if(N){var V=Math.max(F.x,e),K=Math.max(F.y,i),$=Math.min(F.r,O)-V,j=Math.min(F.b,b)-K;M=$,w=j,l?T=u+(p-(V-F.x)-$):T=u+(V-F.x),f?S=d+(g-(K-F.y)-j):S=d+(K-F.y),e=V,i=K,h=$,s=j}else T=0,S=0,M=0,w=0}else l&&(T=u+(p-e-h)),f&&(S=d+(g-i-s));var X=this.source.width,Y=this.source.height;return n.u0=Math.max(0,T/X),n.v0=Math.max(0,S/Y),n.u1=Math.min(1,(T+M)/X),n.v1=Math.min(1,(S+w)/Y),n.x=e,n.y=i,n.cx=T,n.cy=S,n.cw=M,n.ch=w,n.width=h,n.height=s,n.flipX=l,n.flipY=f,n},updateCropUVs:function(n,e,i){return this.setCropUVs(n,n.x,n.y,n.width,n.height,e,i)},setUVs:function(n,e,i,h,s,l){var f=this.data.drawImage;return f.width=n,f.height=e,this.u0=i,this.v0=h,this.u1=s,this.v1=l,this},updateUVs:function(){var n=this.cutX,e=this.cutY,i=this.cutWidth,h=this.cutHeight,s=this.data.drawImage;s.width=i,s.height=h;var l=this.source.width,f=this.source.height;return this.u0=n/l,this.v0=e/f,this.u1=(n+i)/l,this.v1=(e+h)/f,this},updateUVsInverted:function(){var n=this.source.width,e=this.source.height;return this.u0=(this.cutX+this.cutHeight)/n,this.v0=this.cutY/e,this.u1=this.cutX/n,this.v1=(this.cutY+this.cutWidth)/e,this},clone:function(){var n=new r(this.texture,this.name,this.sourceIndex);return n.cutX=this.cutX,n.cutY=this.cutY,n.cutWidth=this.cutWidth,n.cutHeight=this.cutHeight,n.x=this.x,n.y=this.y,n.width=this.width,n.height=this.height,n.halfWidth=this.halfWidth,n.halfHeight=this.halfHeight,n.centerX=this.centerX,n.centerY=this.centerY,n.rotated=this.rotated,n.data=o(!0,n.data,this.data),n.updateUVs(),n},destroy:function(){this.texture=null,this.source=null,this.customData=null,this.data=null},glTexture:{get:function(){return this.source.glTexture}},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},scale9:{get:function(){return this.data.scale9}},is3Slice:{get:function(){return this.data.is3Slice}},canvasData:{get:function(){return this.data.drawImage}}});v.exports=r},79237:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(4327),o=t(11876),r='Texture "%s" has no frame "%s"',n=new a({initialize:function(i,h,s,l,f){Array.isArray(s)||(s=[s]),this.manager=i,this.key=h,this.source=[],this.dataSource=[],this.frames={},this.customData={},this.firstFrame="__BASE",this.frameTotal=0;for(var u=0;ul&&(l=d.cutX+d.cutWidth),d.cutY+d.cutHeight>f&&(f=d.cutY+d.cutHeight)}return{x:h,y:s,width:l-h,height:f-s}},getFrameNames:function(e){e===void 0&&(e=!1);var i=Object.keys(this.frames);if(!e){var h=i.indexOf("__BASE");h!==-1&&i.splice(h,1)}return i},getSourceImage:function(e){(e==null||this.frameTotal===1)&&(e="__BASE");var i=this.frames[e];return i?i.source.image:(console.warn(r,this.key,e),this.frames.__BASE.source.image)},getDataSourceImage:function(e){(e==null||this.frameTotal===1)&&(e="__BASE");var i=this.frames[e],h;return i?h=i.sourceIndex:(console.warn(r,this.key,e),h=this.frames.__BASE.sourceIndex),this.dataSource[h].image},setDataSource:function(e){Array.isArray(e)||(e=[e]);for(var i=0;i{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(27919),c=t(57382),o=t(83419),r=t(40987),n=t(8054),e=t(81320),i=t(50792),h=t(69442),s=t(4327),l=t(8443),f=t(99584),u=t(35154),d=t(88571),p=t(41212),g=t(61309),y=t(87841),x=t(79237),T=new o({Extends:i,initialize:function(M){i.call(this),this.game=M,this.name="TextureManager",this.list={},this._tempCanvas=a.create2D(this),this._tempContext=this._tempCanvas.getContext("2d",{willReadFrequently:!0}),this._pending=0,this.stamp,this.stampCrop=new y,this.silentWarnings=!1,M.events.once(l.BOOT,this.boot,this)},boot:function(){this._pending=3,this.on(h.LOAD,this.updatePending,this),this.on(h.ERROR,this.updatePending,this);var S=this.game.config;this.addBase64("__DEFAULT",S.defaultImage),this.addBase64("__MISSING",S.missingImage),this.addBase64("__WHITE",S.whiteImage),this.game.renderer&&this.game.renderer.gl&&this.addUint8Array("__NORMAL",new Uint8Array([127,127,255,255]),1,1),this.game.events.once(l.DESTROY,this.destroy,this),this.game.events.once(l.SYSTEM_READY,function(M){this.stamp=new d(M).setOrigin(0)},this)},updatePending:function(){this._pending--,this._pending===0&&(this.off(h.LOAD),this.off(h.ERROR),this.emit(h.READY))},checkKey:function(S){return this.exists(S)?(this.silentWarnings||console.error("Texture key already in use: "+S),!1):!0},remove:function(S){if(typeof S=="string")if(this.exists(S))S=this.get(S);else return this.silentWarnings||console.warn("No texture found matching key: "+S),this;var M=S.key;return this.list.hasOwnProperty(M)&&(S.destroy(),this.emit(h.REMOVE,M),this.emit(h.REMOVE_KEY+M)),this},removeKey:function(S){return this.list.hasOwnProperty(S)&&delete this.list[S],this},addBase64:function(S,M){if(this.checkKey(S)){var w=this,L=new Image;L.onerror=function(){w.emit(h.ERROR,S)},L.onload=function(){var F=w.create(S,L);g.Image(F,0),w.emit(h.ADD,S,F),w.emit(h.ADD_KEY+S,F),w.emit(h.LOAD,S,F)},L.src=M}return this},getBase64:function(S,M,w,L){w===void 0&&(w="image/png"),L===void 0&&(L=.92);var F="",O=this.getFrame(S,M);if(O&&(O.source.isRenderTexture||O.source.isGLTexture))this.silentWarnings||console.warn("Cannot getBase64 from WebGL Texture");else if(O){var b=O.canvasData,N=a.create2D(this,b.width,b.height),V=N.getContext("2d",{willReadFrequently:!0});b.width>0&&b.height>0&&V.drawImage(O.source.image,b.x,b.y,b.width,b.height,0,0,b.width,b.height),F=N.toDataURL(w,L),a.remove(N)}return F},addImage:function(S,M,w){var L=null;return this.checkKey(S)&&(L=this.create(S,M),g.Image(L,0),w&&L.setDataSource(w),this.emit(h.ADD,S,L),this.emit(h.ADD_KEY+S,L)),L},addGLTexture:function(S,M){var w=null;if(this.checkKey(S)){var L=M.width,F=M.height;w=this.create(S,M,L,F),w.add("__BASE",0,0,0,L,F),this.emit(h.ADD,S,w),this.emit(h.ADD_KEY+S,w)}return w},addCompressedTexture:function(S,M,w){var L=null;if(this.checkKey(S)){if(L=this.create(S,M),L.add("__BASE",0,0,0,M.width,M.height),w){var F=function(b,N,V){Array.isArray(V.textures)||Array.isArray(V.frames)?g.JSONArray(b,N,V):g.JSONHash(b,N,V)};if(Array.isArray(w))for(var O=0;O=O.x&&S=O.y&&M=O.x&&S=O.y&&M{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(27919),c=t(83419),o=t(50030),r=t(29795),n=t(82751),e=new c({initialize:function(h,s,l,f,u){u===void 0&&(u=!1);var d=h.manager.game;this.renderer=d.renderer,this.texture=h,this.source=s,this.image=s.compressed?null:s,this.compressionAlgorithm=s.compressed?s.format:null,this.resolution=1,this.width=l||s.naturalWidth||s.videoWidth||s.width||0,this.height=f||s.naturalHeight||s.videoHeight||s.height||0,this.scaleMode=r.DEFAULT,this.isCanvas=s instanceof HTMLCanvasElement,this.isVideo=window.hasOwnProperty("HTMLVideoElement")&&s instanceof HTMLVideoElement,this.isRenderTexture=s.type==="RenderTexture"||s.type==="DynamicTexture",this.isGLTexture=s instanceof n,this.isPowerOf2=o(this.width,this.height),this.glTexture=null,this.flipY=u,this.init(d)},init:function(i){var h=this.renderer;if(h){var s=this.source;if(h.gl){var l=this.image,f=this.flipY,u=this.width,d=this.height,p=this.scaleMode;this.isCanvas?this.glTexture=h.createCanvasTexture(l,!1,f):this.isVideo?this.glTexture=h.createVideoTexture(l,!1,f):this.isRenderTexture?this.glTexture=h.createTextureFromSource(null,u,d,p):this.isGLTexture?this.glTexture=s:this.compressionAlgorithm?this.glTexture=h.createTextureFromSource(s,void 0,void 0,p):s instanceof Uint8Array?this.glTexture=h.createUint8ArrayTexture(s,u,d,p):this.glTexture=h.createTextureFromSource(l,u,d,p)}else this.isRenderTexture&&(this.image=s.canvas)}i.config.antialias||this.setFilter(1)},setFilter:function(i){this.renderer&&this.renderer.gl&&this.renderer.setTextureFilter(this.glTexture,i),this.scaleMode=i},setFlipY:function(i){return i===void 0&&(i=!0),i===this.flipY?this:(this.flipY=i,this.update(),this)},update:function(){var i=this.renderer,h=this.image,s=this.flipY,l=i.gl;l&&this.isCanvas?i.updateCanvasTexture(h,this.glTexture,s):l&&this.isVideo&&i.updateVideoTexture(h,this.glTexture,s)},destroy:function(){this.glTexture&&this.renderer.deleteTexture(this.glTexture),this.isCanvas&&a.remove(this.image),this.renderer=null,this.texture=null,this.source=null,this.image=null,this.glTexture=null}});v.exports=e},19673:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m={LINEAR:0,NEAREST:1};v.exports=m},44538:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="addtexture"},63486:v=>{/** + * @author samme + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="addtexture-"},94851:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="onerror"},29099:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="onload"},8678:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="ready"},86415:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="removetexture"},30879:v=>{/** + * @author samme + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="removetexture-"},69442:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.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:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(79291),c=t(19673),o={CanvasTexture:t(57382),DynamicTexture:t(81320),Events:t(69442),FilterMode:c,Frame:t(4327),Parsers:t(61309),Texture:t(79237),TextureManager:t(17130),TextureSource:t(11876)};o=a(!1,o,c),v.exports=o},89905:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){if(!c.getElementsByTagName("TextureAtlas")){console.warn("Invalid Texture Atlas XML given");return}var o=t.source[a];t.add("__BASE",a,0,0,o.width,o.height);for(var r=c.getElementsByTagName("SubTexture"),n,e=0;e{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){var c=t.source[a];return t.add("__BASE",a,0,0,c.width,c.height),t};v.exports=m},4832:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){var c=t.source[a];return t.add("__BASE",a,0,0,c.width,c.height),t};v.exports=m},78566:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(41786),c=function(o,r,n){if(!n.frames&&!n.textures){console.warn("Invalid Texture Atlas JSON Array");return}var e=o.source[r];o.add("__BASE",r,0,0,e.width,e.height);for(var i=Array.isArray(n.textures)?n.textures[r].frames:n.frames,h,s=0;s{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(41786),c=function(o,r,n){if(!n.frames){console.warn("Invalid Texture Atlas JSON Hash given, missing 'frames' Object");return}var e=o.source[r];o.add("__BASE",r,0,0,e.width,e.height);var i=n.frames,h;for(var s in i)if(i.hasOwnProperty(s)){var l=i[s];if(h=o.add(s,r,l.frame.x,l.frame.y,l.frame.w,l.frame.h),!h){console.warn("Invalid atlas json, frame already exists: "+s);continue}l.trimmed&&h.setTrim(l.sourceSize.w,l.sourceSize.h,l.spriteSourceSize.x,l.spriteSourceSize.y,l.spriteSourceSize.w,l.spriteSourceSize.h),l.rotated&&(h.rotated=!0,h.updateUVsInverted());var f=l.anchor||l.pivot;f&&(h.customPivot=!0,h.pivotX=f.x,h.pivotY=f.y),l.scale9Borders&&h.setScale9(l.scale9Borders.x,l.scale9Borders.y,l.scale9Borders.w,l.scale9Borders.h),h.customData=a(l)}for(var u in n)u!=="frames"&&(Array.isArray(n[u])?o.customData[u]=n[u].slice(0):o.customData[u]=n[u]);return o};v.exports=c},31403:v=>{/** + * @author Richard Davey + * @copyright 2021 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){var a=[171,75,84,88,32,49,49,187,13,10,26,10],c,o=new Uint8Array(t,0,12);for(c=0;c>1),y=Math.max(1,y>>1),p+=x}return{mipmaps:d,width:s,height:l,internalFormat:h,compressed:!0,generateMipmap:!1}};v.exports=m},82038:v=>{/** + * @author Richard Davey + * @copyright 2021 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */function m(M,w,L,F,O,b,N){return N===void 0&&(N=16),Math.floor((M+L)/O)*Math.floor((w+F)/b)*N}function t(M,w){return M=Math.max(M,16),w=Math.max(w,8),M*w/4}function a(M,w){return M=Math.max(M,8),w=Math.max(w,8),M*w/2}function c(M,w){return Math.ceil(M/4)*Math.ceil(w/4)*16}function o(M,w){return m(M,w,3,3,4,4,8)}function r(M,w){return m(M,w,3,3,4,4)}function n(M,w){return m(M,w,4,3,5,4)}function e(M,w){return m(M,w,4,4,5,5)}function i(M,w){return m(M,w,5,4,6,5)}function h(M,w){return m(M,w,5,5,6,6)}function s(M,w){return m(M,w,7,4,8,5)}function l(M,w){return m(M,w,7,5,8,6)}function f(M,w){return m(M,w,7,7,8,8)}function u(M,w){return m(M,w,9,4,10,5)}function d(M,w){return m(M,w,9,5,10,6)}function p(M,w){return m(M,w,9,7,10,8)}function g(M,w){return m(M,w,9,9,10,10)}function y(M,w){return m(M,w,11,9,12,10)}function x(M,w){return m(M,w,11,11,12,12)}var T={0:{sizeFunc:t,glFormat:[35841]},1:{sizeFunc:t,glFormat:[35843]},2:{sizeFunc:a,glFormat:[35840]},3:{sizeFunc:a,glFormat:[35842]},6:{sizeFunc:o,glFormat:[36196]},7:{sizeFunc:o,glFormat:[33776,35916]},8:{sizeFunc:r,glFormat:[33777,35917]},9:{sizeFunc:r,glFormat:[33778,35918]},11:{sizeFunc:r,glFormat:[33779,35919]},14:{sizeFunc:c,glFormat:[36494,36495]},15:{sizeFunc:c,glFormat:[36492,36493]},22:{sizeFunc:o,glFormat:[37492,37493]},23:{sizeFunc:r,glFormat:[37496,37497]},24:{sizeFunc:o,glFormat:[37494,37495]},25:{sizeFunc:o,glFormat:[37488]},26:{sizeFunc:r,glFormat:[37490]},27:{sizeFunc:r,glFormat:[37808,37840]},28:{sizeFunc:n,glFormat:[37809,37841]},29:{sizeFunc:e,glFormat:[37810,37842]},30:{sizeFunc:i,glFormat:[37811,37843]},31:{sizeFunc:h,glFormat:[37812,37844]},32:{sizeFunc:s,glFormat:[37813,37845]},33:{sizeFunc:l,glFormat:[37814,37846]},34:{sizeFunc:f,glFormat:[37815,37847]},35:{sizeFunc:u,glFormat:[37816,37848]},36:{sizeFunc:d,glFormat:[37817,37849]},37:{sizeFunc:p,glFormat:[37818,37850]},38:{sizeFunc:g,glFormat:[37819,37851]},39:{sizeFunc:y,glFormat:[37820,37852]},40:{sizeFunc:x,glFormat:[37821,37853]}},S=function(M){for(var w=new Uint32Array(M,0,13),L=w[0],F=L===55727696,O=F?w[2]:w[3],b=w[4],N=T[O].glFormat[b],V=T[O].sizeFunc,K=w[11],$=w[7],j=w[6],X=52+w[12],Y=new Uint8Array(M,X),D=new Array(K),z=0,W=$,H=j,J=0;J>1),H=Math.max(1,H>>1),z+=Q}return{mipmaps:D,width:$,height:j,internalFormat:N,compressed:!0,generateMipmap:!1}};v.exports=S},75549:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(95540),c=function(o,r,n,e,i,h,s){var l=a(s,"frameWidth",null),f=a(s,"frameHeight",l);if(l===null)throw new Error("TextureManager.SpriteSheet: Invalid frameWidth given.");var u=o.source[r];o.add("__BASE",r,0,0,u.width,u.height);var d=a(s,"startFrame",0),p=a(s,"endFrame",-1),g=a(s,"margin",0),y=a(s,"spacing",0),x=Math.floor((i-g+y)/(l+y)),T=Math.floor((h-g+y)/(f+y)),S=x*T;S===0&&console.warn("SpriteSheet frame dimensions will result in zero frames for texture:",o.key),(d>S||d<-S)&&(d=0),d<0&&(d=S+d),(p===-1||p>S||pi&&(L=N-i),V>h&&(F=V-h),b>=d&&b<=p&&(o.add(O,r,n+M,e+w,l-L,f-F),O++),M+=l+y,M+l>i&&(M=g,w+=f+y)}return o};v.exports=c},47534:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(95540),c=function(o,r,n){var e=a(n,"frameWidth",null),i=a(n,"frameHeight",e);if(!e)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var h=o.source[0];o.add("__BASE",0,0,0,h.width,h.height),a(n,"startFrame",0),a(n,"endFrame",-1);for(var s=a(n,"margin",0),l=a(n,"spacing",0),f=r.cutX,u=r.cutY,d=r.cutWidth,p=r.cutHeight,g=r.realWidth,y=r.realHeight,x=Math.floor((g-s+l)/(e+l)),T=Math.floor((y-s+l)/(i+l)),S=r.x,M=e-S,w=e-(g-d-S),L=r.y,F=i-L,O=i-(y-p-L),b,N=s,V=s,K=0,$=0,j=0;j{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=0,t=function(c,o,r,n){var e=m-n.y-n.height;c.add(r,o,n.x,e,n.width,n.height)},a=function(c,o,r){var n=c.source[o];c.add("__BASE",o,0,0,n.width,n.height),m=n.height;for(var e=r.split(` +`),i=/^[ ]*(- )*(\w+)+[: ]+(.*)/,h="",s="",l={x:0,y:0,width:0,height:0},f=0;f{/** + * @author Ben Richards + * @copyright 2024 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(50030),c=function(h){for(var s=h.mipmaps,l=1;l{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.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:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={CSV:0,TILED_JSON:1,ARRAY_2D:2,WELTMEISTER:3}},16536:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=new a({initialize:function(r,n,e,i,h,s,l){(e===void 0||e<=0)&&(e=32),(i===void 0||i<=0)&&(i=32),h===void 0&&(h=0),s===void 0&&(s=0),this.name=r,this.firstgid=n|0,this.imageWidth=e|0,this.imageHeight=i|0,this.imageMargin=h|0,this.imageSpacing=s|0,this.properties=l||{},this.images=[],this.total=0},containsImageIndex:function(o){return o>=this.firstgid&&o{/** + * @author Richard Davey + * @copyright 2021 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=new a({initialize:function(r){if(this.gids=[],r!==void 0)for(var n=0;n{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(80341),c=t(87010),o=t(46177),r=t(49075),n=function(e,i,h,s,l,f,u,d){h===void 0&&(h=32),s===void 0&&(s=32),l===void 0&&(l=10),f===void 0&&(f=10),d===void 0&&(d=!1);var p=null;if(Array.isArray(u)){var g=i!==void 0?i:"map";p=o(g,a.ARRAY_2D,u,h,s,d)}else if(i!==void 0){var y=e.cache.tilemap.get(i);y?p=o(i,y.format,y.data,h,s,d):console.warn("No map data found for key "+i)}return p===null&&(p=new c({tileWidth:h,tileHeight:s,width:l,height:f})),new r(e,p)};v.exports=n},23029:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(31401),o=t(91907),r=t(62644),n=t(93232),e=new a({Mixins:[c.AlphaSingle,c.Flip,c.Visible],initialize:function(h,s,l,f,u,d,p,g){this.layer=h,this.index=s,this.x=l,this.y=f,this.width=u,this.height=d,this.right,this.bottom,this.baseWidth=p!==void 0?p:u,this.baseHeight=g!==void 0?g:d,this.pixelX=0,this.pixelY=0,this.updatePixelXY(),this.properties={},this.rotation=0,this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceLeft=!1,this.faceRight=!1,this.faceTop=!1,this.faceBottom=!1,this.collisionCallback=void 0,this.collisionCallbackContext=this,this.tint=16777215,this.tintFill=!1,this.physics={}},containsPoint:function(i,h){return!(ithis.right||h>this.bottom)},copy:function(i){return this.index=i.index,this.alpha=i.alpha,this.properties=r(i.properties),this.visible=i.visible,this.setFlip(i.flipX,i.flipY),this.tint=i.tint,this.rotation=i.rotation,this.collideUp=i.collideUp,this.collideDown=i.collideDown,this.collideLeft=i.collideLeft,this.collideRight=i.collideRight,this.collisionCallback=i.collisionCallback,this.collisionCallbackContext=i.collisionCallbackContext,this},getCollisionGroup:function(){return this.tileset?this.tileset.getTileCollisionGroup(this.index):null},getTileData:function(){return this.tileset?this.tileset.getTileData(this.index):null},getLeft:function(i){var h=this.tilemapLayer;if(h){var s=h.tileToWorldXY(this.x,this.y,void 0,i);return s.x}return this.x*this.baseWidth},getRight:function(i){var h=this.tilemapLayer;return h?this.getLeft(i)+this.width*h.scaleX:this.getLeft(i)+this.width},getTop:function(i){var h=this.tilemapLayer;if(h){var s=h.tileToWorldXY(this.x,this.y,void 0,i);return s.y}return this.y*this.baseWidth-(this.height-this.baseHeight)},getBottom:function(i){var h=this.tilemapLayer;return h?this.getTop(i)+this.height*h.scaleY:this.getTop(i)+this.height},getBounds:function(i,h){return h===void 0&&(h=new n),h.x=this.getLeft(i),h.y=this.getTop(i),h.width=this.getRight(i)-h.x,h.height=this.getBottom(i)-h.y,h},getCenterX:function(i){return(this.getLeft(i)+this.getRight(i))/2},getCenterY:function(i){return(this.getTop(i)+this.getBottom(i))/2},intersects:function(i,h,s,l){return!(s<=this.pixelX||l<=this.pixelY||i>=this.right||h>=this.bottom)},isInteresting:function(i,h){return i&&h?this.canCollide||this.hasInterestingFace:i?this.collides:h?this.hasInterestingFace:!1},resetCollision:function(i){if(i===void 0&&(i=!0),this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,i){var h=this.tilemapLayer;h&&this.tilemapLayer.calculateFacesAt(this.x,this.y)}return this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(i,h,s,l,f){if(h===void 0&&(h=i),s===void 0&&(s=i),l===void 0&&(l=i),f===void 0&&(f=!0),this.collideLeft=i,this.collideRight=h,this.collideUp=s,this.collideDown=l,this.faceLeft=i,this.faceRight=h,this.faceTop=s,this.faceBottom=l,f){var u=this.tilemapLayer;u&&this.tilemapLayer.calculateFacesAt(this.x,this.y)}return this},setCollisionCallback:function(i,h){return i===null?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=i,this.collisionCallbackContext=h),this},setSize:function(i,h,s,l){return i!==void 0&&(this.width=i),h!==void 0&&(this.height=h),s!==void 0&&(this.baseWidth=s),l!==void 0&&(this.baseHeight=l),this.updatePixelXY(),this},updatePixelXY:function(){var i=this.layer.orientation;if(i===o.ORTHOGONAL)this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight;else if(i===o.ISOMETRIC)this.pixelX=(this.x-this.y)*this.baseWidth*.5,this.pixelY=(this.x+this.y)*this.baseHeight*.5;else if(i===o.STAGGERED)this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2),this.pixelY=this.y*(this.baseHeight/2);else if(i===o.HEXAGONAL){var h=this.layer.staggerAxis,s=this.layer.staggerIndex,l=this.layer.hexSideLength,f,u;h==="y"?(u=(this.baseHeight-l)/2+l,s==="odd"?this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2):this.pixelX=this.x*this.baseWidth-this.y%2*(this.baseWidth/2),this.pixelY=this.y*u):h==="x"&&(f=(this.baseWidth-l)/2+l,this.pixelX=this.x*f,s==="odd"?this.pixelY=this.y*this.baseHeight+this.x%2*(this.baseHeight/2):this.pixelY=this.y*this.baseHeight-this.x%2*(this.baseHeight/2))}return this.right=this.pixelX+this.baseWidth,this.bottom=this.pixelY+this.baseHeight,this},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||this.collisionCallback!==void 0}},collides:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}},hasInterestingFace:{get:function(){return this.faceTop||this.faceBottom||this.faceLeft||this.faceRight}},tileset:{get:function(){var i=this.layer.tilemapLayer;if(i){var h=i.gidMap[this.index];if(h)return h}return null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var i=this.tilemapLayer;return i?i.tilemap:null}}});v.exports=e},49075:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(84101),c=t(83419),o=t(39506),r=t(80341),n=t(95540),e=t(14977),i=t(27462),h=t(91907),s=t(36305),l=t(19133),f=t(68287),u=t(23029),d=t(81086),p=t(20442),g=t(33629),y=new c({initialize:function(T,S){this.scene=T,this.tileWidth=S.tileWidth,this.tileHeight=S.tileHeight,this.width=S.width,this.height=S.height,this.orientation=S.orientation,this.renderOrder=S.renderOrder,this.format=S.format,this.version=S.version,this.properties=S.properties,this.widthInPixels=S.widthInPixels,this.heightInPixels=S.heightInPixels,this.imageCollections=S.imageCollections,this.images=S.images,this.layers=S.layers,this.tiles=S.tiles,this.tilesets=S.tilesets,this.objects=S.objects,this.currentLayerIndex=0,this.hexSideLength=S.hexSideLength;var M=this.orientation;this._convert={WorldToTileXY:d.GetWorldToTileXYFunction(M),WorldToTileX:d.GetWorldToTileXFunction(M),WorldToTileY:d.GetWorldToTileYFunction(M),TileToWorldXY:d.GetTileToWorldXYFunction(M),TileToWorldX:d.GetTileToWorldXFunction(M),TileToWorldY:d.GetTileToWorldYFunction(M),GetTileCorners:d.GetTileCornersFunction(M)}},setRenderOrder:function(x){var T=["right-down","left-down","right-up","left-up"];return typeof x=="number"&&(x=T[x]),T.indexOf(x)>-1&&(this.renderOrder=x),this},addTilesetImage:function(x,T,S,M,w,L,F,O){if(x===void 0)return null;T==null&&(T=x);var b=this.scene.sys.textures;if(!b.exists(T))return console.warn('Texture key "%s" not found',T),null;var N=b.get(T),V=this.getTilesetIndex(x);if(V===null&&this.format===r.TILED_JSON)return console.warn('Tilemap has no tileset "%s". Its tilesets are %o',x,this.tilesets),null;var K=this.tilesets[V];return K?(K.setTileSize(S,M),K.setSpacing(w,L),K.setImage(N),K):(S===void 0&&(S=this.tileWidth),M===void 0&&(M=this.tileHeight),w===void 0&&(w=0),L===void 0&&(L=0),F===void 0&&(F=0),O===void 0&&(O={x:0,y:0}),K=new g(x,F,S,M,w,L,void 0,void 0,O),K.setImage(N),this.tilesets.push(K),this.tiles=a(this),K)},copy:function(x,T,S,M,w,L,F,O){return O=this.getLayer(O),O!==null?(d.Copy(x,T,S,M,w,L,F,O),this):null},createBlankLayer:function(x,T,S,M,w,L,F,O){S===void 0&&(S=0),M===void 0&&(M=0),w===void 0&&(w=this.width),L===void 0&&(L=this.height),F===void 0&&(F=this.tileWidth),O===void 0&&(O=this.tileHeight);var b=this.getLayerIndex(x);if(b!==null)return console.warn("Invalid Tilemap Layer ID: "+x),null;for(var N=new e({name:x,tileWidth:F,tileHeight:O,width:w,height:L,orientation:this.orientation}),V,K=0;K-1&&this.putTileAt(T,L.x,L.y,S,L.tilemapLayer)}return M},removeTileAt:function(x,T,S,M,w){return S===void 0&&(S=!0),M===void 0&&(M=!0),w=this.getLayer(w),w===null?null:d.RemoveTileAt(x,T,S,M,w)},removeTileAtWorldXY:function(x,T,S,M,w,L){return S===void 0&&(S=!0),M===void 0&&(M=!0),L=this.getLayer(L),L===null?null:d.RemoveTileAtWorldXY(x,T,S,M,w,L)},renderDebug:function(x,T,S){return S=this.getLayer(S),S===null?null:(this.orientation===h.ORTHOGONAL&&d.RenderDebug(x,T,S),this)},renderDebugFull:function(x,T){for(var S=this.layers,M=0;M{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(44603),c=t(31989);a.register("tilemap",function(o){var r=o!==void 0?o:{};return c(this.scene,r.key,r.tileWidth,r.tileHeight,r.width,r.height,r.data,r.insertNull)})},46029:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(39429),c=t(31989);a.register("tilemap",function(o,r,n,e,i,h,s){return o===null&&(o=void 0),r===null&&(r=void 0),n===null&&(n=void 0),e===null&&(e=void 0),i===null&&(i=void 0),c(this.scene,o,r,n,e,i,h,s)})},20442:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(78389),o=t(31401),r=t(95643),n=t(81086),e=t(19218),i=t(26099),h=new a({Extends:r,Mixins:[o.Alpha,o.BlendMode,o.ComputedSize,o.Depth,o.Flip,o.GetBounds,o.Mask,o.Origin,o.Pipeline,o.PostPipeline,o.Transform,o.Visible,o.ScrollFactor,c,e],initialize:function(l,f,u,d,p,g){r.call(this,l,"TilemapLayer"),this.isTilemap=!0,this.tilemap=f,this.layerIndex=u,this.layer=f.layers[u],this.layer.tilemapLayer=this,this.tileset=[],this.tilesDrawn=0,this.tilesTotal=this.layer.width*this.layer.height,this.culledTiles=[],this.skipCull=!1,this.cullPaddingX=1,this.cullPaddingY=1,this.cullCallback=n.GetCullTilesFunction(this.layer.orientation),this._renderOrder=0,this.gidMap=[],this.tempVec=new i,this.collisionCategory=1,this.collisionMask=1,this.setTilesets(d),this.setAlpha(this.layer.alpha),this.setPosition(p,g),this.setOrigin(0,0),this.setSize(f.tileWidth*this.layer.width,f.tileHeight*this.layer.height),this.initPipeline(),this.initPostPipeline(!1)},setTilesets:function(s){var l=[],f=[],u=this.tilemap;Array.isArray(s)||(s=[s]);for(var d=0;d=0&&s<4&&(this._renderOrder=s),this},calculateFacesAt:function(s,l){return n.CalculateFacesAt(s,l,this.layer),this},calculateFacesWithin:function(s,l,f,u){return n.CalculateFacesWithin(s,l,f,u,this.layer),this},createFromTiles:function(s,l,f,u,d){return n.CreateFromTiles(s,l,f,u,d,this.layer)},cull:function(s){return this.cullCallback(this.layer,s,this.culledTiles,this._renderOrder)},copy:function(s,l,f,u,d,p,g){return n.Copy(s,l,f,u,d,p,g,this.layer),this},fill:function(s,l,f,u,d,p){return n.Fill(s,l,f,u,d,p,this.layer),this},filterTiles:function(s,l,f,u,d,p,g){return n.FilterTiles(s,l,f,u,d,p,g,this.layer)},findByIndex:function(s,l,f){return n.FindByIndex(s,l,f,this.layer)},findTile:function(s,l,f,u,d,p,g){return n.FindTile(s,l,f,u,d,p,g,this.layer)},forEachTile:function(s,l,f,u,d,p,g){return n.ForEachTile(s,l,f,u,d,p,g,this.layer),this},setTint:function(s,l,f,u,d,p){s===void 0&&(s=16777215);var g=function(y){y.tint=s,y.tintFill=!1};return this.forEachTile(g,this,l,f,u,d,p)},setTintFill:function(s,l,f,u,d,p){s===void 0&&(s=16777215);var g=function(y){y.tint=s,y.tintFill=!0};return this.forEachTile(g,this,l,f,u,d,p)},getTileAt:function(s,l,f){return n.GetTileAt(s,l,f,this.layer)},getTileAtWorldXY:function(s,l,f,u){return n.GetTileAtWorldXY(s,l,f,u,this.layer)},getIsoTileAtWorldXY:function(s,l,f,u,d){f===void 0&&(f=!0);var p=this.tempVec;return n.IsometricWorldToTileXY(s,l,!0,p,d,this.layer,f),this.getTileAt(p.x,p.y,u)},getTilesWithin:function(s,l,f,u,d){return n.GetTilesWithin(s,l,f,u,d,this.layer)},getTilesWithinShape:function(s,l,f){return n.GetTilesWithinShape(s,l,f,this.layer)},getTilesWithinWorldXY:function(s,l,f,u,d,p){return n.GetTilesWithinWorldXY(s,l,f,u,d,p,this.layer)},hasTileAt:function(s,l){return n.HasTileAt(s,l,this.layer)},hasTileAtWorldXY:function(s,l,f){return n.HasTileAtWorldXY(s,l,f,this.layer)},putTileAt:function(s,l,f,u){return n.PutTileAt(s,l,f,u,this.layer)},putTileAtWorldXY:function(s,l,f,u,d){return n.PutTileAtWorldXY(s,l,f,u,d,this.layer)},putTilesAt:function(s,l,f,u){return n.PutTilesAt(s,l,f,u,this.layer),this},randomize:function(s,l,f,u,d){return n.Randomize(s,l,f,u,d,this.layer),this},removeTileAt:function(s,l,f,u){return n.RemoveTileAt(s,l,f,u,this.layer)},removeTileAtWorldXY:function(s,l,f,u,d){return n.RemoveTileAtWorldXY(s,l,f,u,d,this.layer)},renderDebug:function(s,l){return n.RenderDebug(s,l,this.layer),this},replaceByIndex:function(s,l,f,u,d,p){return n.ReplaceByIndex(s,l,f,u,d,p,this.layer),this},setSkipCull:function(s){return s===void 0&&(s=!0),this.skipCull=s,this},setCullPadding:function(s,l){return s===void 0&&(s=1),l===void 0&&(l=1),this.cullPaddingX=s,this.cullPaddingY=l,this},setCollision:function(s,l,f,u){return n.SetCollision(s,l,f,this.layer,u),this},setCollisionBetween:function(s,l,f,u){return n.SetCollisionBetween(s,l,f,u,this.layer),this},setCollisionByProperty:function(s,l,f){return n.SetCollisionByProperty(s,l,f,this.layer),this},setCollisionByExclusion:function(s,l,f){return n.SetCollisionByExclusion(s,l,f,this.layer),this},setCollisionFromCollisionGroup:function(s,l){return n.SetCollisionFromCollisionGroup(s,l,this.layer),this},setTileIndexCallback:function(s,l,f){return n.SetTileIndexCallback(s,l,f,this.layer),this},setTileLocationCallback:function(s,l,f,u,d,p){return n.SetTileLocationCallback(s,l,f,u,d,p,this.layer),this},shuffle:function(s,l,f,u){return n.Shuffle(s,l,f,u,this.layer),this},swapByIndex:function(s,l,f,u,d,p){return n.SwapByIndex(s,l,f,u,d,p,this.layer),this},tileToWorldX:function(s,l){return this.tilemap.tileToWorldX(s,l,this)},tileToWorldY:function(s,l){return this.tilemap.tileToWorldY(s,l,this)},tileToWorldXY:function(s,l,f,u){return this.tilemap.tileToWorldXY(s,l,f,u,this)},getTileCorners:function(s,l,f){return this.tilemap.getTileCorners(s,l,f,this)},weightedRandomize:function(s,l,f,u,d){return n.WeightedRandomize(l,f,u,d,s,this.layer),this},worldToTileX:function(s,l,f){return this.tilemap.worldToTileX(s,l,f,this)},worldToTileY:function(s,l,f){return this.tilemap.worldToTileY(s,l,f,this)},worldToTileXY:function(s,l,f,u,d){return this.tilemap.worldToTileXY(s,l,f,u,d,this)},destroy:function(s){s===void 0&&(s=!0),this.tilemap&&(this.layer.tilemapLayer===this&&(this.layer.tilemapLayer=void 0),s&&this.tilemap.removeLayer(this),this.tilemap=void 0,this.layer=void 0,this.culledTiles.length=0,this.cullCallback=null,this.gidMap=[],this.tileset=[],r.prototype.destroy.call(this))}});v.exports=h},16153:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(61340),c=new a,o=new a,r=new a,n=function(e,i,h,s){var l=i.cull(h),f=l.length,u=h.alpha*i.alpha;if(!(f===0||u<=0)){var d=c,p=o,g=r;p.applyITRS(i.x,i.y,i.rotation,i.scaleX,i.scaleY),d.copyFrom(h.matrix);var y=e.currentContext,x=i.gidMap;y.save(),s?(d.multiplyWithOffset(s,-h.scrollX*i.scrollFactorX,-h.scrollY*i.scrollFactorY),p.e=i.x,p.f=i.y,d.multiply(p,g),g.copyToContext(y)):(p.e-=h.scrollX*i.scrollFactorX,p.f-=h.scrollY*i.scrollFactorY,p.copyToContext(y)),(!e.antialias||i.scaleX>1||i.scaleY>1)&&(y.imageSmoothingEnabled=!1);for(var T=0;T{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(29747),c=a,o=a;c=t(99558),o=t(16153),v.exports={renderWebGL:c,renderCanvas:o}},99558:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(70554),c=function(o,r,n){var e=r.cull(n),i=e.length,h=n.alpha*r.alpha;if(!(i===0||h<=0)){var s=r.gidMap,l=o.pipelines.set(r.pipeline,r),f=a.getTintAppendFloatAlpha,u=r.scrollFactorX,d=r.scrollFactorY,p=r.x,g=r.y,y=r.scaleX,x=r.scaleY;o.pipelines.preBatch(r);for(var T=0;T{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(26099),o=new a({initialize:function(n,e,i,h,s,l,f,u,d){(i===void 0||i<=0)&&(i=32),(h===void 0||h<=0)&&(h=32),s===void 0&&(s=0),l===void 0&&(l=0),f===void 0&&(f={}),u===void 0&&(u={}),this.name=n,this.firstgid=e,this.tileWidth=i,this.tileHeight=h,this.tileMargin=s,this.tileSpacing=l,this.tileProperties=f,this.tileData=u,this.tileOffset=new c,d!==void 0&&this.tileOffset.set(d.x,d.y),this.image=null,this.glTexture=null,this.rows=0,this.columns=0,this.total=0,this.texCoordinates=[]},getTileProperties:function(r){return this.containsTileIndex(r)?this.tileProperties[r-this.firstgid]:null},getTileData:function(r){return this.containsTileIndex(r)?this.tileData[r-this.firstgid]:null},getTileCollisionGroup:function(r){var n=this.getTileData(r);return n&&n.objectgroup?n.objectgroup:null},containsTileIndex:function(r){return r>=this.firstgid&&re.width||n.height>e.height?this.updateTileData(n.width,n.height):this.updateTileData(e.width,e.height,e.x,e.y),this},setTileSize:function(r,n){return r!==void 0&&(this.tileWidth=r),n!==void 0&&(this.tileHeight=n),this.image&&this.updateTileData(this.image.source[0].width,this.image.source[0].height),this},setSpacing:function(r,n){return r!==void 0&&(this.tileMargin=r),n!==void 0&&(this.tileSpacing=n),this.image&&this.updateTileData(this.image.source[0].width,this.image.source[0].height),this},updateTileData:function(r,n,e,i){e===void 0&&(e=0),i===void 0&&(i=0);var h=(n-this.tileMargin*2+this.tileSpacing)/(this.tileHeight+this.tileSpacing),s=(r-this.tileMargin*2+this.tileSpacing)/(this.tileWidth+this.tileSpacing);(h%1!==0||s%1!==0)&&console.warn("Image tile area not tile size multiple in: "+this.name),h=Math.floor(h),s=Math.floor(s),this.rows=h,this.columns=s,this.total=h*s,this.texCoordinates.length=0;for(var l=this.tileMargin+e,f=this.tileMargin+i,u=0;u{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(7423),c=function(o,r,n){var e=a(o,r,!0,n),i=a(o,r-1,!0,n),h=a(o,r+1,!0,n),s=a(o-1,r,!0,n),l=a(o+1,r,!0,n),f=e&&e.collides;return f&&(e.faceTop=!0,e.faceBottom=!0,e.faceLeft=!0,e.faceRight=!0),i&&i.collides&&(f&&(e.faceTop=!1),i.faceBottom=!f),h&&h.collides&&(f&&(e.faceBottom=!1),h.faceTop=!f),s&&s.collides&&(f&&(e.faceLeft=!1),s.faceRight=!f),l&&l.collides&&(f&&(e.faceRight=!1),l.faceLeft=!f),e&&!e.collides&&e.resetFaces(),e};v.exports=c},42573:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(7423),c=t(7386),o=function(r,n,e,i,h){for(var s=null,l=null,f=null,u=null,d=c(r,n,e,i,null,h),p=0;p{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(26099),c=new a,o=function(r,n,e,i){var h=e.tilemapLayer,s=h.cullPaddingX,l=h.cullPaddingY,f=h.tilemap.tileToWorldXY(r,n,c,i,h);return f.x>i.worldView.x+h.scaleX*e.tileWidth*(-s-.5)&&f.xi.worldView.y+h.scaleY*e.tileHeight*(-l-1)&&f.y{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(42573),c=t(7386),o=t(62991),r=t(23029),n=function(e,i,h,s,l,f,u,d){u===void 0&&(u=!0);var p=c(e,i,h,s,null,d),g=[];p.forEach(function(L){var F=new r(L.layer,L.index,L.x,L.y,L.width,L.height,L.baseWidth,L.baseHeight);F.copy(L),g.push(F)});for(var y=l-e,x=f-i,T=0;T{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(62644),c=t(7386),o=t(27987),r=function(n,e,i,h,s,l){i||(i={}),Array.isArray(n)||(n=[n]);var f=l.tilemapLayer;h||(h=f.scene),s||(s=h.cameras.main);var u=l.width,d=l.height,p=c(0,0,u,d,null,l),g=[],y,x=function(w,L,F){for(var O=0;O{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(87841),c=t(63448),o=t(56583),r=new a,n=function(e,i){var h=e.tilemapLayer.tilemap,s=e.tilemapLayer,l=Math.floor(h.tileWidth*s.scaleX),f=Math.floor(h.tileHeight*s.scaleY),u=o(i.worldView.x-s.x,l,0,!0)-s.cullPaddingX,d=c(i.worldView.right-s.x,l,0,!0)+s.cullPaddingX,p=o(i.worldView.y-s.y,f,0,!0)-s.cullPaddingY,g=c(i.worldView.bottom-s.y,f,0,!0)+s.cullPaddingY;return r.setTo(u,p,d-u,g-p)};v.exports=n},30003:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(19545),c=t(32483),o=function(r,n,e,i){e===void 0&&(e=[]),i===void 0&&(i=0),e.length=0;var h=r.tilemapLayer,s=a(r,n);return(h.skipCull||h.scrollFactorX!==1||h.scrollFactorY!==1)&&(s.left=0,s.right=r.width,s.top=0,s.bottom=r.height),c(r,s,i,e),e};v.exports=o},35137:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(7386),c=t(42573),o=t(20576),r=function(n,e,i,h,s,l,f){for(var u=f.collideIndexes.indexOf(n)!==-1,d=a(e,i,h,s,null,f),p=0;p{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(7386),c=function(o,r,n,e,i,h,s,l){var f=a(n,e,i,h,s,l);return f.filter(o,r)};v.exports=c},52692:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c,o){a===void 0&&(a=0),c===void 0&&(c=!1);var r=0,n,e,i;if(c){for(e=o.height-1;e>=0;e--)for(n=o.width-1;n>=0;n--)if(i=o.data[e][n],i&&i.index===t){if(r===a)return i;r+=1}}else for(e=0;e{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(7386),c=function(o,r,n,e,i,h,s,l){var f=a(n,e,i,h,s,l);return f.find(o,r)||null};v.exports=c},97560:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(7386),c=function(o,r,n,e,i,h,s,l){var f=a(n,e,i,h,s,l);f.forEach(o,r)};v.exports=c},43305:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(91907),c=t(30003),o=t(9474),r=t(14018),n=t(29747),e=t(54503),i=function(h){return h===a.ORTHOGONAL?c:h===a.HEXAGONAL?o:h===a.STAGGERED?e:h===a.ISOMETRIC?r:n};v.exports=i},7423:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(62991),c=function(o,r,n,e){if(n===void 0&&(n=!1),a(o,r,e)){var i=e.data[r][o]||null;return i?i.index===-1?n?i:null:i:null}else return null};v.exports=c},60540:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(7423),c=t(26099),o=new c,r=function(n,e,i,h,s){return s.tilemapLayer.worldToTileXY(n,e,!0,o,h),a(o.x,o.y,i,s)};v.exports=r},55826:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(26099),c=function(o,r,n,e){var i=e.baseTileWidth,h=e.baseTileHeight,s=e.tilemapLayer,l=0,f=0;s&&(n||(n=s.scene.cameras.main),l=s.x+n.scrollX*(1-s.scrollFactorX),f=s.y+n.scrollY*(1-s.scrollFactorY),i*=s.scaleX,h*=s.scaleY);var u=l+o*i,d=f+r*h;return[new a(u,d),new a(u+i,d),new a(u+i,d+h),new a(u,d+h)]};v.exports=c},11758:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(91907),c=t(27229),o=t(29747),r=t(55826),n=function(e){return e===a.ORTHOGONAL?r:e===a.ISOMETRIC?o:e===a.HEXAGONAL?c:(e===a.STAGGERED,o)};v.exports=n},39167:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(91907),c=t(29747),o=t(97281),r=function(n){return n===a.ORTHOGONAL?o:c};v.exports=r},62e3:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(91907),c=t(19951),o=t(14127),r=t(29747),n=t(97202),e=t(70326),i=function(h){return h===a.ORTHOGONAL?e:h===a.ISOMETRIC?o:h===a.HEXAGONAL?c:h===a.STAGGERED?n:r};v.exports=i},5984:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(91907),c=t(29747),o=t(28054),r=t(29650),n=function(e){return e===a.ORTHOGONAL?r:e===a.STAGGERED?o:c};v.exports=n},7386:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(95540),c=function(o,r,n,e,i,h){o===void 0&&(o=0),r===void 0&&(r=0),n===void 0&&(n=h.width),e===void 0&&(e=h.height),i||(i={});var s=a(i,"isNotEmpty",!1),l=a(i,"isColliding",!1),f=a(i,"hasInterestingFace",!1);o<0&&(n+=o,o=0),r<0&&(e+=r,r=0),o+n>h.width&&(n=Math.max(h.width-o,0)),r+e>h.height&&(e=Math.max(h.height-r,0));for(var u=[],d=r;d{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(55738),c=t(7386),o=t(91865),r=t(29747),n=t(26099),e=function(f,u){return o.RectangleToTriangle(u,f)},i=new n,h=new n,s=new n,l=function(f,u,d,p){if(f===void 0)return[];var g=r;f instanceof a.Circle?g=o.CircleToRectangle:f instanceof a.Rectangle?g=o.RectangleToRectangle:f instanceof a.Triangle?g=e:f instanceof a.Line&&(g=o.LineToRectangle),p.tilemapLayer.worldToTileXY(f.left,f.top,!0,h,d);var y=h.x,x=h.y;p.tilemapLayer.worldToTileXY(f.right,f.bottom,!1,s,d);var T=Math.ceil(s.x),S=Math.ceil(s.y),M=Math.max(T-y,1),w=Math.max(S-x,1),L=c(y,x,M,w,u,p),F=p.tileWidth,O=p.tileHeight;p.tilemapLayer&&(F*=p.tilemapLayer.scaleX,O*=p.tilemapLayer.scaleY);for(var b=[],N=new a.Rectangle(0,0,F,O),V=0;V{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(7386),c=t(26099),o=new c,r=new c,n=function(e,i,h,s,l,f,u){var d=u.tilemapLayer.tilemap._convert.WorldToTileXY;d(e,i,!0,o,f,u);var p=o.x,g=o.y;d(e+h,i+s,!1,r,f,u);var y=Math.ceil(r.x),x=Math.ceil(r.y);return a(p,g,y-p,x-g,l,u)};v.exports=n},96113:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(91907),c=t(20242),o=t(10095),r=function(n){return n===a.ORTHOGONAL?o:c};v.exports=r},16926:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(91907),c=t(86625),o=t(96897),r=t(29747),n=t(15108),e=t(85896),i=function(h){return h===a.ORTHOGONAL?e:h===a.ISOMETRIC?o:h===a.HEXAGONAL?c:h===a.STAGGERED?n:r};v.exports=i},55762:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(91907),c=t(20242),o=t(51900),r=t(63288),n=function(e){return e===a.ORTHOGONAL?r:e===a.STAGGERED?o:c};v.exports=n},45091:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(62991),c=function(o,r,n){if(a(o,r,n)){var e=n.data[r][o];return e!==null&&e.index>-1}else return!1};v.exports=c},24152:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(45091),c=t(26099),o=new c,r=function(n,e,i,h){h.tilemapLayer.worldToTileXY(n,e,!0,o,i);var s=o.x,l=o.y;return a(s,l,h)};v.exports=r},90454:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(63448),c=t(56583),o=function(r,n){var e=r.tilemapLayer.tilemap,i=r.tilemapLayer,h=Math.floor(e.tileWidth*i.scaleX),s=Math.floor(e.tileHeight*i.scaleY),l=r.hexSideLength,f,u,d,p;if(r.staggerAxis==="y"){var g=(s-l)/2+l;f=c(n.worldView.x-i.x,h,0,!0)-i.cullPaddingX,u=a(n.worldView.right-i.x,h,0,!0)+i.cullPaddingX,d=c(n.worldView.y-i.y,g,0,!0)-i.cullPaddingY,p=a(n.worldView.bottom-i.y,g,0,!0)+i.cullPaddingY}else{var y=(h-l)/2+l;f=c(n.worldView.x-i.x,y,0,!0)-i.cullPaddingX,u=a(n.worldView.right-i.x,y,0,!0)+i.cullPaddingX,d=c(n.worldView.y-i.y,s,0,!0)-i.cullPaddingY,p=a(n.worldView.bottom-i.y,s,0,!0)+i.cullPaddingY}return{left:f,right:u,top:d,bottom:p}};v.exports=o},9474:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(90454),c=t(32483),o=function(r,n,e,i){e===void 0&&(e=[]),i===void 0&&(i=0),e.length=0;var h=r.tilemapLayer,s=a(r,n);return h.skipCull&&h.scrollFactorX===1&&h.scrollFactorY===1&&(s.left=0,s.right=r.width,s.top=0,s.bottom=r.height),c(r,s,i,e),e};v.exports=o},27229:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(19951),c=t(26099),o=new c,r=function(n,e,i,h){var s=h.baseTileWidth,l=h.baseTileHeight,f=h.tilemapLayer;f&&(s*=f.scaleX,l*=f.scaleY);var u=a(n,e,o,i,h),d=[],p=.5773502691896257,g,y;h.staggerAxis==="y"?(g=p*s,y=l/2):(g=s/2,y=p*l);for(var x=0;x<6;x++){var T=2*Math.PI*(.5-x)/6;d.push(new c(u.x+g*Math.cos(T),u.y+y*Math.sin(T)))}return d};v.exports=r},19951:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(26099),c=function(o,r,n,e,i){n||(n=new a);var h=i.baseTileWidth,s=i.baseTileHeight,l=i.tilemapLayer,f=0,u=0;l&&(e||(e=l.scene.cameras.main),f=l.x+e.scrollX*(1-l.scrollFactorX),u=l.y+e.scrollY*(1-l.scrollFactorY),h*=l.scaleX,s*=l.scaleY);var d=h/2,p=s/2,g,y;return i.staggerAxis==="y"?(g=f+h*o+h,y=u+1.5*r*p+p,r%2===0&&(this.staggerIndex==="odd"?g-=d:g+=d)):this.staggerAxis==="x"&&this.staggerIndex==="odd"&&(g=f+1.5*o*d+d,y=u+s*o+s,o%2===0&&(this.staggerIndex==="odd"?y-=p:y+=p)),n.set(g,y)};v.exports=c},86625:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(26099),c=function(o,r,n,e,i,h){e||(e=new a);var s=h.baseTileWidth,l=h.baseTileHeight,f=h.tilemapLayer;f&&(i||(i=f.scene.cameras.main),o=o-(f.x+i.scrollX*(1-f.scrollFactorX)),r=r-(f.y+i.scrollY*(1-f.scrollFactorY)),s*=f.scaleX,l*=f.scaleY);var u=.5773502691896257,d=-.3333333333333333,p=0,g=.6666666666666666,y=s/2,x=l/2,T,S,M,w,L;h.staggerAxis==="y"?(T=(o-y)/(u*s),S=(r-x)/x,M=u*T+d*S,w=p*T+g*S):(T=(o-y)/y,S=(r-x)/(u*l),M=d*T+u*S,w=g*T+p*S),L=-M-w;var F=Math.round(M),O=Math.round(w),b=Math.round(L),N=Math.abs(F-M),V=Math.abs(O-w),K=Math.abs(b-L);N>V&&N>K?F=-O-b:V>K&&(O=-F-b);var $,j=O;return h.staggerIndex==="odd"?$=j%2===0?O/2+F:O/2+F-.5:$=j%2===0?O/2+F:O/2+F+.5,e.set($,j)};v.exports=c},62991:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){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),c=function(o,r,n,e){n===void 0&&(n=[]),e===void 0&&(e=0),n.length=0;var i=o.tilemapLayer,h=o.data,s=o.width,l=o.height,f=i.skipCull,u=0,d=s,p=0,g=l,y,x,T;if(e===0)for(x=p;x=u;y--)T=h[x][y],!(!T||T.index===-1||!T.visible||T.alpha===0)&&(!f&&!a(y,x,o,r)||n.push(T));else if(e===2)for(x=g;x>=p;x--)for(y=u;y=p;x--)for(y=d;y>=u;y--)T=h[x][y],!(!T||T.index===-1||!T.visible||T.alpha===0)&&(!f&&!a(y,x,o,r)||n.push(T));return i.tilesDrawn=n.length,i.tilesTotal=s*l,n};v.exports=c},14127:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(26099),c=function(o,r,n,e,i){n||(n=new a);var h=i.baseTileWidth,s=i.baseTileHeight,l=i.tilemapLayer,f=0,u=0;l&&(e||(e=l.scene.cameras.main),f=l.x+e.scrollX*(1-l.scrollFactorX),h*=l.scaleX,u=l.y+e.scrollY*(1-l.scrollFactorY),s*=l.scaleY);var d=f+(o-r)*(h/2),p=u+(o+r)*(s/2);return n.set(d,p)};v.exports=c},96897:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(26099),c=function(o,r,n,e,i,h,s){e||(e=new a);var l=h.baseTileWidth,f=h.baseTileHeight,u=h.tilemapLayer;u&&(i||(i=u.scene.cameras.main),r=r-(u.y+i.scrollY*(1-u.scrollFactorY)),f*=u.scaleY,o=o-(u.x+i.scrollX*(1-u.scrollFactorX)),l*=u.scaleX);var d=l/2,p=f/2;o=o-d,s||(r=r-f);var g=.5*(o/d+r/p),y=.5*(-o/d+r/p);return n&&(g=Math.floor(g),y=Math.floor(y)),e.set(g,y)};v.exports=c},71558:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(23029),c=t(62991),o=t(72023),r=t(20576),n=function(e,i,h,s,l){if(s===void 0&&(s=!0),!c(i,h,l))return null;var f,u=l.data[h][i],d=u&&u.collides;e instanceof a?(l.data[h][i]===null&&(l.data[h][i]=new a(l,e.index,i,h,l.tileWidth,l.tileHeight)),l.data[h][i].copy(e)):(f=e,l.data[h][i]===null?l.data[h][i]=new a(l,f,i,h,l.tileWidth,l.tileHeight):l.data[h][i].index=f);var p=l.data[h][i],g=l.collideIndexes.indexOf(p.index)!==-1;if(f=e instanceof a?e.index:e,f===-1)p.width=l.tileWidth,p.height=l.tileHeight;else{var y=l.tilemapLayer.tilemap,x=y.tiles,T=x[f][2],S=y.tilesets[T];p.width=S.tileWidth,p.height=S.tileHeight}return r(p,g),s&&d!==p.collides&&o(i,h,l),p};v.exports=n},26303:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(71558),c=t(26099),o=new c,r=function(n,e,i,h,s,l){return l.tilemapLayer.worldToTileXY(e,i,!0,o,s,l),a(n,o.x,o.y,h,l)};v.exports=r},14051:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(42573),c=t(71558),o=function(r,n,e,i,h){if(i===void 0&&(i=!0),!Array.isArray(r))return null;Array.isArray(r[0])||(r=[r]);for(var s=r.length,l=r[0].length,f=0;f{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(7386),c=t(26546),o=function(r,n,e,i,h,s){var l,f=a(r,n,e,i,{},s);if(!h)for(h=[],l=0;l{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(23029),c=t(62991),o=t(72023),r=function(n,e,i,h,s){if(i===void 0&&(i=!0),h===void 0&&(h=!0),!c(n,e,s))return null;var l=s.data[e][n];if(l)s.data[e][n]=i?null:new a(s,-1,n,e,s.tileWidth,s.tileHeight);else return null;return h&&l&&l.collides&&o(n,e,s),l};v.exports=r},94178:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(63557),c=t(26099),o=new c,r=function(n,e,i,h,s,l){return l.tilemapLayer.worldToTileXY(n,e,!0,o,s,l),a(o.x,o.y,i,h,l)};v.exports=r},15533:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(7386),c=t(3956),o=new c(105,210,231,150),r=new c(243,134,48,200),n=new c(40,39,37,150),e=function(i,h,s){h===void 0&&(h={});var l=h.tileColor!==void 0?h.tileColor:o,f=h.collidingTileColor!==void 0?h.collidingTileColor:r,u=h.faceColor!==void 0?h.faceColor:n,d=a(0,0,s.width,s.height,null,s);i.translateCanvas(s.tilemapLayer.x,s.tilemapLayer.y),i.scaleCanvas(s.tilemapLayer.scaleX,s.tilemapLayer.scaleY);for(var p=0;p{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(7386),c=function(o,r,n,e,i,h,s){for(var l=a(n,e,i,h,null,s),f=0;f{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c,o){var r=t.data,n=t.width,e=t.height,i=t.tilemapLayer,h=Math.max(0,a.left),s=Math.min(n,a.right),l=Math.max(0,a.top),f=Math.min(e,a.bottom),u,d,p;if(c===0)for(d=l;d=h;u--)p=r[d][u],!(!p||p.index===-1||!p.visible||p.alpha===0)&&o.push(p);else if(c===2)for(d=f;d>=l;d--)for(u=h;r[d]&&u=l;d--)for(u=s;r[d]&&u>=h;u--)p=r[d][u],!(!p||p.index===-1||!p.visible||p.alpha===0)&&o.push(p);return i.tilesDrawn=o.length,i.tilesTotal=n*e,o};v.exports=m},57068:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(20576),c=t(42573),o=t(9589),r=function(n,e,i,h,s){e===void 0&&(e=!0),i===void 0&&(i=!0),s===void 0&&(s=!0),Array.isArray(n)||(n=[n]);for(var l=0;l{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(20576),c=t(42573),o=t(9589),r=function(n,e,i,h,s,l){if(i===void 0&&(i=!0),h===void 0&&(h=!0),l===void 0&&(l=!0),!(n>e)){for(var f=n;f<=e;f++)o(f,i,s);if(l)for(var u=0;u=n&&p.index<=e&&a(p,i)}h&&c(0,0,s.width,s.height,s)}};v.exports=r},75661:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(20576),c=t(42573),o=t(9589),r=function(n,e,i,h){e===void 0&&(e=!0),i===void 0&&(i=!0),Array.isArray(n)||(n=[n]);for(var s=0;s{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(20576),c=t(42573),o=t(97022),r=function(n,e,i,h){e===void 0&&(e=!0),i===void 0&&(i=!0);for(var s=0;s{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(20576),c=t(42573),o=function(r,n,e){r===void 0&&(r=!0),n===void 0&&(n=!0);for(var i=0;i0&&a(s,r)}}n&&c(0,0,e.width,e.height,e)};v.exports=o},9589:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){var o=c.collideIndexes.indexOf(t);a&&o===-1?c.collideIndexes.push(t):!a&&o!==-1&&c.collideIndexes.splice(o,1)};v.exports=m},20576:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){a?t.setCollision(!0,!0,!0,!0,!1):t.resetCollision(!1)};v.exports=m},79583:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c,o){if(typeof t=="number")o.callbacks[t]=a!==null?{callback:a,callbackContext:c}:void 0;else for(var r=0,n=t.length;r{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(7386),c=function(o,r,n,e,i,h,s){for(var l=a(o,r,n,e,null,s),f=0;f{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(7386),c=t(33680),o=function(r,n,e,i,h){var s=a(r,n,e,i,null,h),l=s.map(function(u){return u.index});c(l);for(var f=0;f{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(63448),c=t(56583),o=function(r,n){var e=r.tilemapLayer.tilemap,i=r.tilemapLayer,h=Math.floor(e.tileWidth*i.scaleX),s=Math.floor(e.tileHeight*i.scaleY),l=c(n.worldView.x-i.x,h,0,!0)-i.cullPaddingX,f=a(n.worldView.right-i.x,h,0,!0)+i.cullPaddingX,u=c(n.worldView.y-i.y,s/2,0,!0)-i.cullPaddingY,d=a(n.worldView.bottom-i.y,s/2,0,!0)+i.cullPaddingY;return{left:l,right:f,top:u,bottom:d}};v.exports=o},54503:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(61325),c=t(32483),o=function(r,n,e,i){e===void 0&&(e=[]),i===void 0&&(i=0),e.length=0;var h=r.tilemapLayer,s=a(r,n);return h.skipCull&&h.scrollFactorX===1&&h.scrollFactorY===1&&(s.left=0,s.right=r.width,s.top=0,s.bottom=r.height),c(r,s,i,e),e};v.exports=o},97202:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(26099),c=function(o,r,n,e,i){n||(n=new a);var h=i.baseTileWidth,s=i.baseTileHeight,l=i.tilemapLayer,f=0,u=0;l&&(e||(e=l.scene.cameras.main),f=l.x+e.scrollX*(1-l.scrollFactorX),h*=l.scaleX,u=l.y+e.scrollY*(1-l.scrollFactorY),s*=l.scaleY);var d=f+o*h+r%2*(h/2),p=u+r*(s/2);return n.set(d,p)};v.exports=c},28054:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){var o=c.baseTileHeight,r=c.tilemapLayer,n=0;return r&&(a===void 0&&(a=r.scene.cameras.main),n=r.y+a.scrollY*(1-r.scrollFactorY),o*=r.scaleY),n+t*(o/2)+o};v.exports=m},15108:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(26099),c=function(o,r,n,e,i,h){e||(e=new a);var s=h.baseTileWidth,l=h.baseTileHeight,f=h.tilemapLayer;f&&(i||(i=f.scene.cameras.main),r=r-(f.y+i.scrollY*(1-f.scrollFactorY)),l*=f.scaleY,o=o-(f.x+i.scrollX*(1-f.scrollFactorX)),s*=f.scaleX);var u=n?Math.floor(r/(l/2)):r/(l/2),d=n?Math.floor((o+u%2*.5*s)/s):(o+u%2*.5*s)/s;return e.set(d,u)};v.exports=c},51900:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c,o){var r=o.baseTileHeight,n=o.tilemapLayer;return n&&(c||(c=n.scene.cameras.main),t=t-(n.y+c.scrollY*(1-n.scrollFactorY)),r*=n.scaleY),a?Math.floor(t/(r/2)):t/(r/2)};v.exports=m},86560:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(7386),c=function(o,r,n,e,i,h,s){for(var l=a(n,e,i,h,null,s),f=0;f{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){var o=c.baseTileWidth,r=c.tilemapLayer,n=0;return r&&(a||(a=r.scene.cameras.main),n=r.x+a.scrollX*(1-r.scrollFactorX),o*=r.scaleX),n+t*o};v.exports=m},70326:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(97281),c=t(29650),o=t(26099),r=function(n,e,i,h,s){return i||(i=new o(0,0)),i.x=a(n,h,s),i.y=c(e,h,s),i};v.exports=r},29650:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){var o=c.baseTileHeight,r=c.tilemapLayer,n=0;return r&&(a||(a=r.scene.cameras.main),n=r.y+a.scrollY*(1-r.scrollFactorY),o*=r.scaleY),n+t*o};v.exports=m},77366:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(7386),c=t(75508),o=function(r,n,e,i,h,s){if(h){var l,f=a(r,n,e,i,null,s),u=0;for(l=0;l{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(85896),c=t(26099),o=new c,r=function(n,e,i,h){return a(n,0,e,o,i,h),o.x};v.exports=r},85896:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(26099),c=function(o,r,n,e,i,h){n===void 0&&(n=!0),e||(e=new a);var s=h.baseTileWidth,l=h.baseTileHeight,f=h.tilemapLayer;f&&(i||(i=f.scene.cameras.main),o=o-(f.x+i.scrollX*(1-f.scrollFactorX)),r=r-(f.y+i.scrollY*(1-f.scrollFactorY)),s*=f.scaleX,l*=f.scaleY);var u=o/s,d=r/l;return n&&(u=Math.floor(u),d=Math.floor(d)),e.set(u,d)};v.exports=c},63288:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(85896),c=t(26099),o=new c,r=function(n,e,i,h){return a(0,n,e,o,i,h),o.y};v.exports=r},81086:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.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:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={ORTHOGONAL:0,ISOMETRIC:1,STAGGERED:2,HEXAGONAL:3}},21829:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a={ORIENTATION:t(91907)};v.exports=a},62501:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(79291),c=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,c.ORIENTATION),v.exports=o},14977:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(91907),o=t(95540),r=new a({initialize:function(e){e===void 0&&(e={}),this.name=o(e,"name","layer"),this.id=o(e,"id",0),this.x=o(e,"x",0),this.y=o(e,"y",0),this.width=o(e,"width",0),this.height=o(e,"height",0),this.tileWidth=o(e,"tileWidth",0),this.tileHeight=o(e,"tileHeight",0),this.baseTileWidth=o(e,"baseTileWidth",this.tileWidth),this.baseTileHeight=o(e,"baseTileHeight",this.tileHeight),this.orientation=o(e,"orientation",c.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")}});v.exports=r},87010:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(91907),o=t(95540),r=new a({initialize:function(e){e===void 0&&(e={}),this.name=o(e,"name","map"),this.width=o(e,"width",0),this.height=o(e,"height",0),this.infinite=o(e,"infinite",!1),this.tileWidth=o(e,"tileWidth",0),this.tileHeight=o(e,"tileHeight",0),this.widthInPixels=o(e,"widthInPixels",this.width*this.tileWidth),this.heightInPixels=o(e,"heightInPixels",this.height*this.tileHeight),this.format=o(e,"format",null),this.orientation=o(e,"orientation",c.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")}});v.exports=r},48700:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(95540),o=new a({initialize:function(n){n===void 0&&(n={}),this.name=c(n,"name","object layer"),this.id=c(n,"id",0),this.opacity=c(n,"opacity",1),this.properties=c(n,"properties",{}),this.propertyTypes=c(n,"propertytypes",{}),this.type=c(n,"type","objectgroup"),this.visible=c(n,"visible",!0),this.objects=c(n,"objects",[]),Array.isArray(this.objects)||(this.objects=[])}});v.exports=o},6641:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(91907),c=function(o){return o=o.toLowerCase(),o==="isometric"?a.ISOMETRIC:o==="staggered"?a.STAGGERED:o==="hexagonal"?a.HEXAGONAL:a.ORTHOGONAL};v.exports=c},46177:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(80341),c=t(2342),o=t(82593),r=t(46594),n=t(87021),e=function(i,h,s,l,f,u){var d;switch(h){case a.ARRAY_2D:d=c(i,s,l,f,u);break;case a.CSV:d=o(i,s,l,f,u);break;case a.TILED_JSON:d=r(i,s,u);break;case a.WELTMEISTER:d=n(i,s,u);break;default:console.warn("Unrecognized tilemap data format: "+h),d=null}return d};v.exports=e},2342:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(80341),c=t(14977),o=t(87010),r=t(23029),n=function(e,i,h,s,l){for(var f=new c({tileWidth:h,tileHeight:s}),u=new o({name:e,tileWidth:h,tileHeight:s,format:a.ARRAY_2D,layers:[f]}),d=[],p=i.length,g=0,y=0;y{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(80341),c=t(2342),o=function(r,n,e,i,h){var s=n.trim().split(` +`).map(function(f){return f.split(",")}),l=c(r,s,e,i,h);return l.format=a.CSV,l};v.exports=o},6656:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(14977),c=t(23029),o=function(r,n){for(var e=[],i=0;i-1?g=new c(s,p,d,u,h.tilesize,h.tilesize):g=n?null:new c(s,-1,d,u,h.tilesize,h.tilesize),l.push(g)}f.push(l),l=[]}s.data=f,e.push(s)}return e};v.exports=o},96483:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(33629),c=function(o){for(var r=[],n=[],e=0;e{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(80341),c=t(87010),o=t(6656),r=t(96483),n=function(e,i,h){if(i.layer.length===0)return console.warn("No layers found in the Weltmeister map: "+e),null;for(var s=0,l=0,f=0;fs&&(s=i.layer[f].width),i.layer[f].height>l&&(l=i.layer[f].height);var u=new c({width:s,height:l,name:e,tileWidth:i.layer[0].tilesize,tileHeight:i.layer[0].tilesize,format:a.WELTMEISTER});return u.layers=o(i,h),u.tilesets=r(i),u};v.exports=n},52833:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={ParseTileLayers:t(6656),ParseTilesets:t(96483),ParseWeltmeister:t(87021)}},57442:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={FromOrientationString:t(6641),Parse:t(46177),Parse2DArray:t(2342),ParseCSV:t(82593),Impact:t(52833),Tiled:t(96761)}},51233:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(79291),c=function(o){for(var r,n,e,i,h,s=0;s{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){for(var a=window.atob(t),c=a.length,o=new Array(c/4),r=0;r>>0;return o};v.exports=m},84101:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(33629),c=function(o){var r,n,e=[];for(r=0;r{/** + * @author Seth Berrier + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(95540),c=function(o,r,n){if(!r)return{i:0,layers:o.layers,name:"",opacity:1,visible:!0,x:0,y:0};var e=r.x+a(r,"startx",0)*o.tilewidth+a(r,"offsetx",0),i=r.y+a(r,"starty",0)*o.tileheight+a(r,"offsety",0);return{i:0,layers:r.layers,name:n.name+r.name+"/",opacity:n.opacity*r.opacity,visible:n.visible&&r.visible,x:n.x+e,y:n.y+i}};v.exports=c},29920:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=2147483648,t=1073741824,a=536870912,c=function(o){var r=!!(o&m),n=!!(o&t),e=!!(o&a);o=o&~(m|t|a);var i=0,h=!1;return r&&n&&e?(i=Math.PI/2,h=!0):r&&n&&!e?(i=Math.PI,h=!1):r&&!n&&e?(i=Math.PI/2,h=!1):r&&!n&&!e?(i=0,h=!0):!r&&n&&e?(i=3*Math.PI/2,h=!1):!r&&n&&!e?(i=Math.PI,h=!0):!r&&!n&&e?(i=3*Math.PI/2,h=!0):!r&&!n&&!e&&(i=0,h=!1),{gid:o,flippedHorizontal:r,flippedVertical:n,flippedAntiDiagonal:e,rotation:i,flipped:h}};v.exports=c},12635:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(95540),c=t(79677),o=function(r){for(var n=[],e=[],i=c(r);i.i0;){if(i.i>=i.layers.length){if(e.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}i=e.pop();continue}var h=i.layers[i.i];if(i.i++,h.type!=="imagelayer"){if(h.type==="group"){var s=c(r,h,i);e.push(i),i=s}continue}var l=a(h,"offsetx",0)+a(h,"startx",0),f=a(h,"offsety",0)+a(h,"starty",0);n.push({name:i.name+h.name,image:h.image,x:i.x+l+h.x,y:i.y+f+h.y,alpha:i.opacity*h.opacity,visible:i.visible&&h.visible,properties:a(h,"properties",{})})}return n};v.exports=o},46594:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(51233),c=t(84101),o=t(91907),r=t(62644),n=t(80341),e=t(6641),i=t(87010),h=t(12635),s=t(22611),l=t(28200),f=t(24619),u=function(d,p,g){var y=r(p),x=new i({width:y.width,height:y.height,name:d,tileWidth:y.tilewidth,tileHeight:y.tileheight,orientation:e(y.orientation),format:n.TILED_JSON,version:y.version,properties:y.properties,renderOrder:y.renderorder,infinite:y.infinite});x.orientation===o.HEXAGONAL&&(x.hexSideLength=y.hexsidelength,x.staggerAxis=y.staggeraxis,x.staggerIndex=y.staggerindex),x.layers=l(y,g),x.images=h(y);var T=f(y);return x.tilesets=T.tilesets,x.imageCollections=T.imageCollections,x.objects=s(y),x.tiles=c(x),a(x),x};v.exports=u},52205:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(18254),c=t(29920),o=function(e){return{x:e.x,y:e.y}},r=["id","name","type","rotation","properties","visible","x","y","width","height"],n=function(e,i,h){i===void 0&&(i=0),h===void 0&&(h=0);var s=a(e,r);if(s.x+=i,s.y+=h,e.gid){var l=c(e.gid);s.gid=l.gid,s.flippedHorizontal=l.flippedHorizontal,s.flippedVertical=l.flippedVertical,s.flippedAntiDiagonal=l.flippedAntiDiagonal}else e.polyline?s.polyline=e.polyline.map(o):e.polygon?s.polygon=e.polygon.map(o):e.ellipse?s.ellipse=e.ellipse:e.text?s.text=e.text:e.point?s.point=!0:s.rectangle=!0;return s};v.exports=n},22611:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(95540),c=t(52205),o=t(48700),r=t(79677),n=function(e){for(var i=[],h=[],s=r(e);s.i0;){if(s.i>=s.layers.length){if(h.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}s=h.pop();continue}var l=s.layers[s.i];if(s.i++,l.opacity*=s.opacity,l.visible=s.visible&&l.visible,l.type!=="objectgroup"){if(l.type==="group"){var f=r(e,l,s);h.push(s),s=f}continue}l.name=s.name+l.name;for(var u=s.x+a(l,"startx",0)+a(l,"offsetx",0),d=s.y+a(l,"starty",0)+a(l,"offsety",0),p=[],g=0;g{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(41868),c=t(91907),o=t(79677),r=t(6641),n=t(95540),e=t(14977),i=t(29920),h=t(23029),s=function(l,f){for(var u=n(l,"infinite",!1),d=[],p=[],g=o(l);g.i0;){if(g.i>=g.layers.length){if(p.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}g=p.pop();continue}var y=g.layers[g.i];if(g.i++,y.type!=="tilelayer"){if(y.type==="group"){var x=o(l,y,g);p.push(g),g=x}continue}if(y.compression){console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+y.name+"'");continue}else if(y.encoding&&y.encoding==="base64"){if(y.chunks)for(var T=0;T0?(w=new h(S,M.gid,W,H,l.tilewidth,l.tileheight),w.rotation=M.rotation,w.flipX=M.flipped,F[H][W]=w):(L=f?null:new h(S,-1,W,H,l.tilewidth,l.tileheight),F[H][W]=L),O++,O===$.width&&(Y++,O=0)}}else{S=new e({name:g.name+y.name,id:y.id,x:g.x+n(y,"offsetx",0)+y.x,y:g.y+n(y,"offsety",0)+y.y,width:y.width,height:y.height,tileWidth:l.tilewidth,tileHeight:l.tileheight,alpha:g.opacity*y.opacity,visible:g.visible&&y.visible,properties:n(y,"properties",[]),orientation:r(l.orientation)}),S.orientation===c.HEXAGONAL&&(S.hexSideLength=l.hexsidelength,S.staggerAxis=l.staggeraxis,S.staggerIndex=l.staggerindex);for(var J=[],Q=0,k=y.data.length;Q0?(w=new h(S,M.gid,O,F.length,l.tilewidth,l.tileheight),w.rotation=M.rotation,w.flipX=M.flipped,J.push(w)):(L=f?null:new h(S,-1,O,F.length,l.tilewidth,l.tileheight),J.push(L)),O++,O===y.width&&(F.push(J),O=0,J=[])}S.data=F,d.push(S)}return d};v.exports=s},24619:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(33629),c=t(16536),o=t(52205),r=t(57880),n=function(e){for(var i=[],h=[],s=null,l,f=0;f1){var p=void 0,g=void 0;if(Array.isArray(u.tiles)){p=p||{},g=g||{};for(var y=0;y{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){for(var c=0;c0){var n={},e={},i,h,s;if(Array.isArray(o.edgecolors))for(i=0;i{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.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:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(37277),o=t(44594),r=t(94880),n=t(72905),e=new a({initialize:function(h){this.scene=h,this.systems=h.sys,this.now=0,this.startTime=0,this.timeScale=1,this.paused=!1,this._active=[],this._pendingInsertion=[],this._pendingRemoval=[],h.sys.events.once(o.BOOT,this.boot,this),h.sys.events.on(o.START,this.start,this)},boot:function(){this.now=this.systems.game.loop.time,this.systems.events.once(o.DESTROY,this.destroy,this)},start:function(){this.startTime=this.systems.game.loop.time;var i=this.systems.events;i.on(o.PRE_UPDATE,this.preUpdate,this),i.on(o.UPDATE,this.update,this),i.once(o.SHUTDOWN,this.shutdown,this)},addEvent:function(i){var h;return i instanceof r?(h=i,this.removeEvent(h),h.elapsed=h.startAt,h.hasDispatched=!1,h.repeatCount=h.repeat===-1||h.loop?999999999999:h.repeat):h=new r(i),this._pendingInsertion.push(h),h},delayedCall:function(i,h,s,l){return this.addEvent({delay:i,callback:h,args:s,callbackScope:l})},clearPendingEvents:function(){return this._pendingInsertion=[],this},removeEvent:function(i){Array.isArray(i)||(i=[i]);for(var h=0;h-1&&this._active.splice(f,1),l.destroy()}for(s=0;s=l.delay)){var f=l.elapsed-l.delay;if(l.elapsed=l.delay,!l.hasDispatched&&l.callback&&(l.hasDispatched=!0,l.callback.apply(l.callbackScope,l.args)),l.repeatCount>0){if(l.repeatCount--,f>=l.delay)for(;f>=l.delay&&l.repeatCount>0;)l.callback&&l.callback.apply(l.callbackScope,l.args),f-=l.delay,l.repeatCount--;l.elapsed=f,l.hasDispatched=!1}else l.hasDispatched&&this._pendingRemoval.push(l)}}}},shutdown:function(){var i;for(i=0;i{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(50792),o=t(39429),r=t(95540),n=t(44594),e=t(89809),i=new a({Extends:c,initialize:function(s,l){c.call(this),this.scene=s,this.systems=s.sys,this.elapsed=0,this.paused=!0,this.complete=!1,this.totalComplete=0,this.loop=0,this.iteration=0,this.events=[];var f=this.systems.events;f.on(n.PRE_UPDATE,this.preUpdate,this),f.on(n.UPDATE,this.update,this),f.once(n.SHUTDOWN,this.destroy,this),l&&this.add(l)},preUpdate:function(h,s){this.paused||(this.elapsed+=s)},update:function(){if(!(this.paused||this.complete)){var h,s=this.events,l=!1,f=this.systems,u;for(h=0;h=s.length&&(this.loop!==0&&(this.loop===-1||this.loop>this.iteration)?(this.iteration++,this.reset(!0)):this.complete=!0),this.complete&&this.emit(e.COMPLETE,this)}},play:function(h){return h===void 0&&(h=!0),this.paused=!1,this.complete=!1,this.totalComplete=0,h&&this.reset(),this},pause:function(){return this.paused=!0,this},repeat:function(h){return(h===void 0||h===!0)&&(h=-1),h===!1&&(h=0),this.loop=h,this},resume:function(){return this.paused=!1,this},stop:function(){return this.paused=!0,this.complete=!0,this},reset:function(h){h===void 0&&(h=!1),this.elapsed=0,h||(this.iteration=0);for(var s=0;s0&&(l=s[s.length-1].time);for(var f=0;f{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(95540),o=new a({initialize:function(n){this.delay=0,this.repeat=0,this.repeatCount=0,this.loop=!1,this.callback,this.callbackScope,this.args,this.timeScale=1,this.startAt=0,this.elapsed=0,this.paused=!1,this.hasDispatched=!1,this.reset(n)},reset:function(r){if(this.delay=c(r,"delay",0),this.repeat=c(r,"repeat",0),this.loop=c(r,"loop",!1),this.callback=c(r,"callback",void 0),this.callbackScope=c(r,"callbackScope",this),this.args=c(r,"args",[]),this.timeScale=c(r,"timeScale",1),this.startAt=c(r,"startAt",0),this.paused=c(r,"paused",!1),this.elapsed=this.startAt,this.hasDispatched=!1,this.repeatCount=this.repeat===-1||this.loop?999999999999:this.repeat,this.delay===0&&(this.repeat>0||this.loop))throw new Error("TimerEvent infinite loop created via zero delay");return this},getProgress:function(){return this.elapsed/this.delay},getOverallProgress:function(){if(this.repeat>0){var r=this.delay+this.delay*this.repeat,n=this.elapsed+this.delay*(this.repeat-this.repeatCount);return n/r}else return this.getProgress()},getRepeatCount:function(){return this.repeatCount},getElapsed:function(){return this.elapsed},getElapsedSeconds:function(){return this.elapsed*.001},getRemaining:function(){return this.delay-this.elapsed},getRemainingSeconds:function(){return this.getRemaining()*.001},getOverallRemaining:function(){return this.delay*(1+this.repeatCount)-this.elapsed},getOverallRemainingSeconds:function(){return this.getOverallRemaining()*.001},remove:function(r){r===void 0&&(r=!1),this.elapsed=this.delay,this.hasDispatched=!r,this.repeatCount=0},destroy:function(){this.callback=void 0,this.callbackScope=void 0,this.args=[]}});v.exports=o},35945:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="complete"},89809:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={COMPLETE:t(35945)}},90291:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={Clock:t(33385),Events:t(89809),Timeline:t(96120),TimerEvent:t(94880)}},40382:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(72905),c=t(83419),o=t(43491),r=t(88032),n=t(37277),e=t(44594),i=t(93109),h=t(86081),s=t(8357),l=t(43960),f=t(26012),u=new c({initialize:function(p){this.scene=p,this.events=p.sys.events,this.timeScale=1,this.paused=!1,this.processing=!1,this.tweens=[],this.time=0,this.startTime=0,this.nextTime=0,this.prevTime=0,this.maxLag=500,this.lagSkip=33,this.gap=1e3/240,this.events.once(e.BOOT,this.boot,this),this.events.on(e.START,this.start,this)},boot:function(){this.events.once(e.DESTROY,this.destroy,this)},start:function(){this.timeScale=1,this.paused=!1,this.startTime=Date.now(),this.prevTime=this.startTime,this.nextTime=this.gap,this.events.on(e.UPDATE,this.update,this),this.events.once(e.SHUTDOWN,this.shutdown,this)},create:function(d){Array.isArray(d)||(d=[d]);for(var p=[],g=0;g-1},existing:function(d){return this.has(d)||this.tweens.push(d.reset()),this},addCounter:function(d){var p=r(this,d);return this.tweens.push(p.reset()),p},stagger:function(d,p){return i(d,p)},setLagSmooth:function(d,p){return d===void 0&&(d=1/1e-8),p===void 0&&(p=0),this.maxLag=d,this.lagSkip=Math.min(p,this.maxLag),this},setFps:function(d){return d===void 0&&(d=240),this.gap=1e3/d,this.nextTime=this.time*1e3+this.gap,this},getDelta:function(d){var p=Date.now()-this.prevTime;p>this.maxLag&&(this.startTime+=p-this.lagSkip),this.prevTime+=p;var g=this.prevTime-this.startTime,y=g-this.nextTime,x=g-this.time*1e3;return y>0||d?(g/=1e3,this.time=g,this.nextTime+=y+(y>=this.gap?4:this.gap-y)):x=0,x},tick:function(){return this.step(!0),this},update:function(){this.paused||this.step(!1)},step:function(d){d===void 0&&(d=!1);var p=this.getDelta(d);if(!(p<=0)){this.processing=!0;var g,y,x=[],T=this.tweens;for(g=0;g0){for(g=0;g-1&&(y.isPendingRemove()||y.isDestroyed())&&(T.splice(M,1),y.destroy())}x.length=0}this.processing=!1}},remove:function(d){return this.processing?d.setPendingRemoveState():(a(this.tweens,d),d.setRemovedState()),this},reset:function(d){return this.existing(d),d.seek(),d.setActiveState(),this},makeActive:function(d){return this.existing(d),d.setActiveState(),this},each:function(d,p){var g,y=[null];for(g=1;g{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){return t&&t.hasOwnProperty(a)?t[a]:c};v.exports=m},6113:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(62640),c=t(35355),o=function(r,n){var e=a.Power0;if(typeof r=="string")if(a.hasOwnProperty(r))e=a[r];else{var i="";if(r.indexOf(".")){i=r.substring(r.indexOf(".")+1);var h=i.toLowerCase();h==="in"?i="easeIn":h==="out"?i="easeOut":h==="inout"&&(i="easeInOut")}r=c(r.substring(0,r.indexOf(".")+1)+i),a.hasOwnProperty(r)&&(e=a[r])}else typeof r=="function"&&(e=r);if(!n)return e;var s=n.slice(0);return s.unshift(0),function(l){return s[0]=l,e.apply(this,s)}};v.exports=o},91389:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(89318),c=t(77259),o=t(28392),r={bezier:a,catmull:c,catmullrom:c,linear:o},n=function(e){if(e===null)return null;var i=r.linear;return typeof e=="string"?r.hasOwnProperty(e)&&(i=r[e]):typeof e=="function"&&(i=e),i};v.exports=n},55292:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){var o;if(t.hasOwnProperty(a)){var r=typeof t[a];r==="function"?o=function(n,e,i,h,s,l){return t[a](n,e,i,h,s,l)}:o=function(){return t[a]}}else typeof c=="function"?o=c:o=function(){return c};return o};v.exports=m},82985:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(81076),c=function(o){var r,n=[];if(o.hasOwnProperty("props"))for(r in o.props)r.substring(0,1)!=="_"&&n.push({key:r,value:o.props[r]});else for(r in o)a.indexOf(r)===-1&&r.substring(0,1)!=="_"&&n.push({key:r,value:o[r]});return n};v.exports=c},62329:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(35154),c=function(o){var r=a(o,"targets",null);return r===null||(typeof r=="function"&&(r=r.call()),Array.isArray(r)||(r=[r])),r};v.exports=c},17777:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(30976),c=t(99472);function o(h){return!!h.getActive&&typeof h.getActive=="function"}function r(h){return!!h.getStart&&typeof h.getStart=="function"}function n(h){return!!h.getEnd&&typeof h.getEnd=="function"}function e(h){return r(h)||n(h)||o(h)}var i=function(h,s){var l,f=function($,j,X){return X},u=function($,j,X){return X},d=null,p=typeof s;if(p==="number")f=function(){return s};else if(Array.isArray(s))u=function(){return s[0]},f=function(){return s[s.length-1]};else if(p==="string"){var g=s.toLowerCase(),y=g.substring(0,6)==="random",x=g.substring(0,3)==="int";if(y||x){var T=g.indexOf("("),S=g.indexOf(")"),M=g.indexOf(",");if(T&&S&&M){var w=parseFloat(g.substring(T+1,M)),L=parseFloat(g.substring(M+1,S));y?f=function(){return c(w,L)}:f=function(){return a(w,L)}}else throw new Error("invalid random() format")}else{g=g[0];var F=parseFloat(s.substr(2));switch(g){case"+":f=function($,j,X){return X+F};break;case"-":f=function($,j,X){return X-F};break;case"*":f=function($,j,X){return X*F};break;case"/":f=function($,j,X){return X/F};break;default:f=function(){return parseFloat(s)}}}}else if(p==="function")f=s;else if(p==="object")if(e(s))o(s)&&(d=s.getActive),n(s)&&(f=s.getEnd),r(s)&&(u=s.getStart);else if(s.hasOwnProperty("value"))l=i(h,s.value);else{var O=s.hasOwnProperty("to"),b=s.hasOwnProperty("from"),N=s.hasOwnProperty("start");if(O&&(b||N)){if(l=i(h,s.to),N){var V=i(h,s.start);l.getActive=V.getEnd}if(b){var K=i(h,s.from);l.getStart=K.getEnd}}}return l||(l={getActive:d,getEnd:f,getStart:u}),l};v.exports=i},88032:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(70402),c=t(69902),o=t(23568),r=t(57355),n=t(6113),e=t(55292),i=t(35154),h=t(17777),s=t(269),l=t(86081),f=function(u,d,p){if(d instanceof l)return d.parent=u,d;p===void 0?p=c:p=s(c,p);var g=i(d,"from",0),y=i(d,"to",1),x=[{value:g}],T=i(d,"delay",p.delay),S=i(d,"easeParams",p.easeParams),M=i(d,"ease",p.ease),w=h("value",y),L=new l(u,x),F=L.add(0,"value",w.getEnd,w.getStart,w.getActive,n(i(d,"ease",M),i(d,"easeParams",S)),e(d,"delay",T),i(d,"duration",p.duration),r(d,"yoyo",p.yoyo),i(d,"hold",p.hold),i(d,"repeat",p.repeat),i(d,"repeatDelay",p.repeatDelay),!1,!1);F.start=g,F.current=g,L.completeDelay=o(d,"completeDelay",0),L.loop=Math.round(o(d,"loop",0)),L.loopDelay=Math.round(o(d,"loopDelay",0)),L.paused=r(d,"paused",!1),L.persist=r(d,"persist",!1),L.callbackScope=i(d,"callbackScope",L);for(var O=a.TYPES,b=0;b{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(6113),c=t(35154),o=t(36383),r=function(n,e){e===void 0&&(e={});var i,h=c(e,"start",0),s=c(e,"ease",null),l=c(e,"grid",null),f=c(e,"from",0),u=f==="first",d=f==="center",p=f==="last",g=typeof f=="number",y=Array.isArray(n),x=parseFloat(y?n[0]:n),T=y?parseFloat(n[1]):0,S=Math.max(x,T);if(y&&(h+=x),l){var M=l[0],w=l[1],L=0,F=0,O=0,b=0,N=[];p?(L=M-1,F=w-1):g?(L=f%M,F=Math.floor(f/M)):d&&(L=(M-1)/2,F=(w-1)/2);for(var V=o.MIN_SAFE_INTEGER,K=0;KV&&(V=j),N[K][$]=j}}}var X=s?a(s):null;return l?i=function(Y,D,z,W){var H=0,J=W%M,Q=Math.floor(W/M);J>=0&&J=0&&Q{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(70402),c=t(69902),o=t(23568),r=t(57355),n=t(6113),e=t(91389),i=t(55292),h=t(82985),s=t(62329),l=t(35154),f=t(17777),u=t(269),d=t(86081),p=function(g,y,x){if(y instanceof d)return y.parent=g,y;x===void 0?x=c:x=u(c,x);var T=s(y);!T&&x.targets&&(T=x.targets);for(var S=h(y),M=l(y,"delay",x.delay),w=l(y,"duration",x.duration),L=l(y,"easeParams",x.easeParams),F=l(y,"ease",x.ease),O=l(y,"hold",x.hold),b=l(y,"repeat",x.repeat),N=l(y,"repeatDelay",x.repeatDelay),V=r(y,"yoyo",x.yoyo),K=r(y,"flipX",x.flipX),$=r(y,"flipY",x.flipY),j=l(y,"interpolation",x.interpolation),X=function(rt,ot,ft,at){if(ft==="texture"){var 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),rt.addFrame(ot,ct,Et,i(at,"delay",M),l(at,"duration",w),l(at,"hold",O),l(at,"repeat",b),l(at,"repeatDelay",N),r(at,"flipX",K),r(at,"flipY",$))}else{var St=f(ft,at),Ct=e(l(at,"interpolation",j));rt.add(ot,ft,St.getEnd,St.getStart,St.getActive,n(l(at,"ease",F),l(at,"easeParams",L)),i(at,"delay",M),l(at,"duration",w),r(at,"yoyo",V),l(at,"hold",O),l(at,"repeat",b),l(at,"repeatDelay",N),r(at,"flipX",K),r(at,"flipY",$),Ct,Ct?at:null)}},Y=new d(g,T),D=0;D{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(70402),c=t(23568),o=t(57355),r=t(62329),n=t(35154),e=t(8357),i=t(43960),h=function(s,l){if(l instanceof i)return l.parent=s,l;var f=new i(s);f.startDelay=n(l,"delay",0),f.completeDelay=c(l,"completeDelay",0),f.loop=Math.round(c(l,"loop",n(l,"repeat",0))),f.loopDelay=Math.round(c(l,"loopDelay",n(l,"repeatDelay",0))),f.paused=o(l,"paused",!1),f.persist=o(l,"persist",!1),f.callbackScope=n(l,"callbackScope",f);var u,d=a.TYPES;for(u=0;u{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.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:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="active"},98540:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="complete"},67233:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="loop"},2859:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="pause"},98336:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="repeat"},25764:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="resume"},32193:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="start"},84371:v=>{/** + * @author samme + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="stop"},70766:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="update"},55659:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports="yoyo"},842:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.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:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a={States:t(86353),Builders:t(30231),Events:t(842),TweenManager:t(40382),Tween:t(86081),TweenData:t(48177),TweenFrameData:t(42220),BaseTween:t(70402),TweenChain:t(43960)};v.exports=a},70402:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(50792),o=t(842),r=t(86353),n=new a({Extends:c,initialize:function(i){c.call(this),this.parent=i,this.data=[],this.totalData=0,this.startDelay=0,this.hasStarted=!1,this.timeScale=1,this.loop=0,this.loopDelay=0,this.loopCounter=0,this.completeDelay=0,this.countdown=0,this.state=r.PENDING,this.paused=!1,this.callbacks={onActive:null,onComplete:null,onLoop:null,onPause:null,onRepeat:null,onResume:null,onStart:null,onStop:null,onUpdate:null,onYoyo:null},this.callbackScope,this.persist=!1},setTimeScale:function(e){return this.timeScale=e,this},getTimeScale:function(){return this.timeScale},isPlaying:function(){return!this.paused&&this.isActive()},isPaused:function(){return this.paused},pause:function(){return this.paused||(this.paused=!0,this.dispatchEvent(o.TWEEN_PAUSE,"onPause")),this},resume:function(){return this.paused&&(this.paused=!1,this.dispatchEvent(o.TWEEN_RESUME,"onResume")),this},makeActive:function(){this.parent.makeActive(this),this.dispatchEvent(o.TWEEN_ACTIVE,"onActive")},onCompleteHandler:function(){this.setPendingRemoveState(),this.dispatchEvent(o.TWEEN_COMPLETE,"onComplete")},complete:function(e){return e===void 0&&(e=0),e?(this.setCompleteDelayState(),this.countdown=e):this.onCompleteHandler(),this},completeAfterLoop:function(e){return e===void 0&&(e=0),this.loopCounter>e&&(this.loopCounter=e),this},remove:function(){return this.parent&&this.parent.remove(this),this},stop:function(){return this.parent&&!this.isRemoved()&&!this.isPendingRemove()&&!this.isDestroyed()&&(this.dispatchEvent(o.TWEEN_STOP,"onStop"),this.setPendingRemoveState()),this},updateLoopCountdown:function(e){this.countdown-=e,this.countdown<=0&&(this.setActiveState(),this.dispatchEvent(o.TWEEN_LOOP,"onLoop"))},updateStartCountdown:function(e){return this.countdown-=e,this.countdown<=0&&(this.hasStarted=!0,this.setActiveState(),this.dispatchEvent(o.TWEEN_START,"onStart"),e=0),e},updateCompleteDelay:function(e){this.countdown-=e,this.countdown<=0&&this.onCompleteHandler()},setCallback:function(e,i,h){return h===void 0&&(h=[]),this.callbacks.hasOwnProperty(e)&&(this.callbacks[e]={func:i,params:h}),this},setPendingState:function(){this.state=r.PENDING},setActiveState:function(){this.state=r.ACTIVE},setLoopDelayState:function(){this.state=r.LOOP_DELAY},setCompleteDelayState:function(){this.state=r.COMPLETE_DELAY},setStartDelayState:function(){this.state=r.START_DELAY,this.countdown=this.startDelay,this.hasStarted=!1},setPendingRemoveState:function(){this.state=r.PENDING_REMOVE},setRemovedState:function(){this.state=r.REMOVED},setFinishedState:function(){this.state=r.FINISHED},setDestroyedState:function(){this.state=r.DESTROYED},isPending:function(){return this.state===r.PENDING},isActive:function(){return this.state===r.ACTIVE},isLoopDelayed:function(){return this.state===r.LOOP_DELAY},isCompleteDelayed:function(){return this.state===r.COMPLETE_DELAY},isStartDelayed:function(){return this.state===r.START_DELAY},isPendingRemove:function(){return this.state===r.PENDING_REMOVE},isRemoved:function(){return this.state===r.REMOVED},isFinished:function(){return this.state===r.FINISHED},isDestroyed:function(){return this.state===r.DESTROYED},destroy:function(){this.data&&this.data.forEach(function(e){e.destroy()}),this.removeAllListeners(),this.callbacks=null,this.data=null,this.parent=null,this.setDestroyedState()}});n.TYPES=["onActive","onComplete","onLoop","onPause","onRepeat","onResume","onStart","onStop","onUpdate","onYoyo"],v.exports=n},95042:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(83419),c=t(842),o=t(86353),r=new a({initialize:function(e,i,h,s,l,f,u,d,p,g){this.tween=e,this.targetIndex=i,this.duration=s,this.totalDuration=0,this.delay=0,this.getDelay=h,this.yoyo=l,this.hold=f,this.repeat=u,this.repeatDelay=d,this.repeatCounter=0,this.flipX=p,this.flipY=g,this.progress=0,this.elapsed=0,this.state=0,this.isCountdown=!1},getTarget:function(){return this.tween.targets[this.targetIndex]},setTargetValue:function(n){n===void 0&&(n=this.current),this.tween.targets[this.targetIndex][this.key]=n},setCreatedState:function(){this.state=o.CREATED,this.isCountdown=!1},setDelayState:function(){this.state=o.DELAY,this.isCountdown=!0},setPendingRenderState:function(){this.state=o.PENDING_RENDER,this.isCountdown=!1},setPlayingForwardState:function(){this.state=o.PLAYING_FORWARD,this.isCountdown=!1},setPlayingBackwardState:function(){this.state=o.PLAYING_BACKWARD,this.isCountdown=!1},setHoldState:function(){this.state=o.HOLD_DELAY,this.isCountdown=!0},setRepeatState:function(){this.state=o.REPEAT_DELAY,this.isCountdown=!0},setCompleteState:function(){this.state=o.COMPLETE,this.isCountdown=!1},isCreated:function(){return this.state===o.CREATED},isDelayed:function(){return this.state===o.DELAY},isPendingRender:function(){return this.state===o.PENDING_RENDER},isPlayingForward:function(){return this.state===o.PLAYING_FORWARD},isPlayingBackward:function(){return this.state===o.PLAYING_BACKWARD},isHolding:function(){return this.state===o.HOLD_DELAY},isRepeating:function(){return this.state===o.REPEAT_DELAY},isComplete:function(){return this.state===o.COMPLETE},setStateFromEnd:function(n){this.yoyo?this.onRepeat(n,!0,!0):this.repeatCounter>0?this.onRepeat(n,!0,!1):this.setCompleteState()},setStateFromStart:function(n){this.repeatCounter>0?this.onRepeat(n,!1):this.setCompleteState()},reset:function(){var n=this.tween,e=n.totalTargets,i=this.targetIndex,h=n.targets[i],s=this.key;this.progress=0,this.elapsed=0,this.delay=this.getDelay(h,s,0,i,e,n),this.repeatCounter=this.repeat===-1?o.MAX:this.repeat,this.setPendingRenderState();var l=this.duration+this.hold;this.yoyo&&(l+=this.duration);var f=l+this.repeatDelay;this.totalDuration=this.delay+l,this.repeat===-1?(this.totalDuration+=f*o.MAX,n.isInfinite=!0):this.repeat>0&&(this.totalDuration+=f*this.repeat),this.totalDuration>n.duration&&(n.duration=this.totalDuration),this.delay0&&(this.elapsed=this.delay,this.setDelayState())},onRepeat:function(n,e,i){var h=this.tween,s=h.totalTargets,l=this.targetIndex,f=h.targets[l],u=this.key,d=u!=="texture";if(this.elapsed=n,this.progress=n/this.duration,this.flipX&&f.toggleFlipX(),this.flipY&&f.toggleFlipY(),d&&(e||i)&&(this.start=this.getStartValue(f,u,this.start,l,s,h)),i){this.setPlayingBackwardState(),this.dispatchEvent(c.TWEEN_YOYO,"onYoyo");return}this.repeatCounter--,d&&(this.end=this.getEndValue(f,u,this.start,l,s,h)),this.repeatDelay>0?(this.elapsed=this.repeatDelay-n,d&&(this.current=this.start,f[u]=this.current),this.setRepeatState()):(this.setPlayingForwardState(),this.dispatchEvent(c.TWEEN_REPEAT,"onRepeat"))},destroy:function(){this.tween=null,this.getDelay=null,this.setCompleteState()}});v.exports=r},69902:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m={targets:null,delay:0,duration:1e3,ease:"Power0",easeParams:null,hold:0,repeat:0,repeatDelay:0,yoyo:!1,flipX:!1,flipY:!1,persist:!1,interpolation:null};v.exports=m},81076:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.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:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(70402),c=t(83419),o=t(842),r=t(44603),n=t(39429),e=t(36383),i=t(86353),h=t(48177),s=t(42220),l=new c({Extends:a,initialize:function(u,d){a.call(this,u),this.targets=d,this.totalTargets=d.length,this.isSeeking=!1,this.isInfinite=!1,this.elapsed=0,this.totalElapsed=0,this.duration=0,this.progress=0,this.totalDuration=0,this.totalProgress=0},add:function(f,u,d,p,g,y,x,T,S,M,w,L,F,O,b,N){var V=new h(this,f,u,d,p,g,y,x,T,S,M,w,L,F,O,b,N);return this.totalData=this.data.push(V),V},addFrame:function(f,u,d,p,g,y,x,T,S,M){var w=new s(this,f,u,d,p,g,y,x,T,S,M);return this.totalData=this.data.push(w),w},getValue:function(f){f===void 0&&(f=0);var u=null;return this.data&&(u=this.data[f].current),u},hasTarget:function(f){return this.targets&&this.targets.indexOf(f)!==-1},updateTo:function(f,u,d){if(d===void 0&&(d=!1),f!=="texture")for(var p=0;p0)this.elapsed=0,this.progress=0,this.loopCounter--,this.initTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.setLoopDelayState()):(this.setActiveState(),this.dispatchEvent(o.TWEEN_LOOP,"onLoop"));else if(this.completeDelay>0)this.countdown=this.completeDelay,this.setCompleteDelayState();else return this.onCompleteHandler(),!0;return!1},onCompleteHandler:function(){this.progress=1,this.totalProgress=1,a.prototype.onCompleteHandler.call(this)},play:function(){return this.isDestroyed()?(console.warn("Cannot play destroyed Tween",this),this):((this.isPendingRemove()||this.isFinished())&&this.seek(),this.paused=!1,this.setActiveState(),this)},seek:function(f,u,d){if(f===void 0&&(f=0),u===void 0&&(u=16.6),d===void 0&&(d=!1),this.isDestroyed())return console.warn("Cannot seek destroyed Tween",this),this;d||(this.isSeeking=!0),this.reset(!0),this.initTweenData(!0),this.setActiveState(),this.dispatchEvent(o.TWEEN_ACTIVE,"onActive");var p=this.paused;if(this.paused=!1,f>0){for(var g=Math.floor(f/u),y=f-g*u,x=0;x0&&this.update(y)}return this.paused=p,this.isSeeking=!1,this},initTweenData:function(f){f===void 0&&(f=!1),this.duration=0,this.startDelay=e.MAX_SAFE_INTEGER;for(var u=this.data,d=0;d0?this.totalDuration=p+g+(p+x)*y:this.totalDuration=p+g},reset:function(f){return f===void 0&&(f=!1),this.elapsed=0,this.totalElapsed=0,this.progress=0,this.totalProgress=0,this.loopCounter=this.loop,this.loop===-1&&(this.isInfinite=!0,this.loopCounter=i.MAX),f||(this.initTweenData(),this.setActiveState(),this.dispatchEvent(o.TWEEN_ACTIVE,"onActive")),this},update:function(f){if(this.isPendingRemove()||this.isDestroyed())return!0;if(this.paused||this.isFinished())return!1;if(f*=this.timeScale*this.parent.timeScale,this.isLoopDelayed())return this.updateLoopCountdown(f),!1;if(this.isCompleteDelayed())return this.updateCompleteDelay(f),!1;this.hasStarted||(this.startDelay-=f,this.startDelay<=0&&(this.hasStarted=!0,this.dispatchEvent(o.TWEEN_START,"onStart"),f=0));var u=!1;if(this.isActive())for(var d=this.data,p=0;p{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(72905),c=t(70402),o=t(83419),r=t(842),n=t(44603),e=t(39429),i=t(86353),h=new o({Extends:c,initialize:function(l){c.call(this,l),this.currentTween=null,this.currentIndex=0},init:function(){return this.loopCounter=this.loop===-1?i.MAX:this.loop,this.setCurrentTween(0),this.startDelay>0&&!this.isStartDelayed()?this.setStartDelayState():this.setActiveState(),this.dispatchEvent(r.TWEEN_ACTIVE,"onActive"),this},add:function(s){var l=this.parent.create(s);Array.isArray(l)||(l=[l]);for(var f=this.data,u=0;u0)this.loopCounter--,this.resetTweens(),this.loopDelay>0?(this.countdown=this.loopDelay,this.setLoopDelayState()):(this.setActiveState(),this.dispatchEvent(r.TWEEN_LOOP,"onLoop"));else if(this.completeDelay>0)this.countdown=this.completeDelay,this.setCompleteDelayState();else return this.onCompleteHandler(),!0;return!1},play:function(){return this.isDestroyed()?(console.warn("Cannot play destroyed TweenChain",this),this):((this.isPendingRemove()||this.isPending())&&this.resetTweens(),this.paused=!1,this.startDelay>0&&!this.isStartDelayed()?this.setStartDelayState():this.setActiveState(),this)},resetTweens:function(){for(var s=this.data,l=this.totalData,f=0;f{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(95042),c=t(45319),o=t(83419),r=t(842),n=new o({Extends:a,initialize:function(i,h,s,l,f,u,d,p,g,y,x,T,S,M,w,L,F){a.call(this,i,h,p,g,y,x,T,S,M,w),this.key=s,this.getActiveValue=u,this.getEndValue=l,this.getStartValue=f,this.ease=d,this.start=0,this.previous=0,this.current=0,this.end=0,this.interpolation=L,this.interpolationData=F},reset:function(e){a.prototype.reset.call(this);var i=this.tween.targets[this.targetIndex],h=this.key;e&&(i[h]=this.start),this.start=0,this.previous=0,this.current=0,this.end=0,this.getActiveValue&&(i[h]=this.getActiveValue(i,h,0))},update:function(e){var i=this.tween,h=i.totalTargets,s=this.targetIndex,l=i.targets[s],f=this.key;if(!l)return this.setCompleteState(),!1;if(this.isCountdown&&(this.elapsed-=e,this.elapsed<=0&&(this.elapsed=0,e=0,this.isDelayed()?this.setPendingRenderState():this.isRepeating()?(this.setPlayingForwardState(),this.dispatchEvent(r.TWEEN_REPEAT,"onRepeat")):this.isHolding()&&this.setStateFromEnd(0))),this.isPendingRender())return this.start=this.getStartValue(l,f,l[f],s,h,i),this.end=this.getEndValue(l,f,this.start,s,h,i),this.current=this.start,l[f]=this.start,this.setPlayingForwardState(),!0;var u=this.isPlayingForward(),d=this.isPlayingBackward();if(u||d){var p=this.elapsed,g=this.duration,y=0,x=!1;p+=e,p>=g?(y=p-g,p=g,x=!0):p<0&&(p=0);var T=c(p/g,0,1);if(this.elapsed=p,this.progress=T,this.previous=this.current,x)u?(this.current=this.end,l[f]=this.end,this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(y)):(this.current=this.start,l[f]=this.start,this.setStateFromStart(y));else{u||(T=1-T);var S=this.ease(T);this.interpolation?this.current=this.interpolation(this.interpolationData,S):this.current=this.start+(this.end-this.start)*S,l[f]=this.current}this.dispatchEvent(r.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(e,i){var h=this.tween;if(!h.isSeeking){var s=h.targets[this.targetIndex],l=this.key,f=this.current,u=this.previous;h.emit(e,h,l,s,f,u);var d=h.callbacks[i];d&&d.func.apply(h.callbackScope,[h,s,l,f,u].concat(d.params))}},destroy:function(){a.prototype.destroy.call(this),this.getActiveValue=null,this.getEndValue=null,this.getStartValue=null,this.ease=null}});v.exports=n},42220:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(95042),c=t(45319),o=t(83419),r=t(842),n=new o({Extends:a,initialize:function(i,h,s,l,f,u,d,p,g,y,x){a.call(this,i,h,f,u,!1,d,p,g,y,x),this.key="texture",this.startTexture=null,this.endTexture=s,this.startFrame=null,this.endFrame=l,this.yoyo=p!==0},reset:function(e){a.prototype.reset.call(this);var i=this.tween.targets[this.targetIndex];this.startTexture||(this.startTexture=i.texture.key,this.startFrame=i.frame.name),e&&i.setTexture(this.startTexture,this.startFrame)},update:function(e){var i=this.tween,h=this.targetIndex,s=i.targets[h];if(!s)return this.setCompleteState(),!1;if(this.isCountdown&&(this.elapsed-=e,this.elapsed<=0&&(this.elapsed=0,e=0,this.isDelayed()?this.setPendingRenderState():this.isRepeating()?(this.setPlayingForwardState(),this.dispatchEvent(r.TWEEN_REPEAT,"onRepeat")):this.isHolding()&&this.setStateFromEnd(0))),this.isPendingRender())return this.startTexture&&s.setTexture(this.startTexture,this.startFrame),this.setPlayingForwardState(),!0;var l=this.isPlayingForward(),f=this.isPlayingBackward();if(l||f){var u=this.elapsed,d=this.duration,p=0,g=!1;u+=e,u>=d?(p=u-d,u=d,g=!0):u<0&&(u=0);var y=c(u/d,0,1);this.elapsed=u,this.progress=y,g&&(l?(s.setTexture(this.endTexture,this.endFrame),this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(p)):(s.setTexture(this.startTexture,this.startFrame),this.setStateFromStart(p))),this.dispatchEvent(r.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(e,i){var h=this.tween;if(!h.isSeeking){var s=h.targets[this.targetIndex],l=this.key;h.emit(e,h,l,s);var f=h.callbacks[i];f&&f.func.apply(h.callbackScope,[h,s,l].concat(f.params))}},destroy:function(){a.prototype.destroy.call(this),this.startTexture=null,this.endTexture=null,this.startFrame=null,this.endFrame=null}});v.exports=n},86353:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m={CREATED:0,DELAY:2,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING:20,ACTIVE:21,LOOP_DELAY:22,COMPLETE_DELAY:23,START_DELAY:24,PENDING_REMOVE:25,REMOVED:26,FINISHED:27,DESTROYED:28,MAX:999999999999};v.exports=m},83419:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */function m(n){return!!n.get&&typeof n.get=="function"||!!n.set&&typeof n.set=="function"}function t(n,e,i){var h=i?n[e]:Object.getOwnPropertyDescriptor(n,e);return!i&&h.value&&typeof h.value=="object"&&(h=h.value),h&&m(h)?(typeof h.enumerable>"u"&&(h.enumerable=!0),typeof h.configurable>"u"&&(h.configurable=!0),h):!1}function a(n,e){var i=Object.getOwnPropertyDescriptor(n,e);return i?(i.value&&typeof i.value=="object"&&(i=i.value),i.configurable===!1):!1}function c(n,e,i,h){for(var s in e)if(e.hasOwnProperty(s)){var l=t(e,s,i);if(l!==!1){var f=h||n;if(a(f.prototype,s)){if(r.ignoreFinals)continue;throw new Error("cannot override final property '"+s+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(n.prototype,s,l)}else n.prototype[s]=e[s]}}function o(n,e){if(e){Array.isArray(e)||(e=[e]);for(var i=0;i{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(){};v.exports=m},20242:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(){return null};v.exports=m},71146:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c,o,r){if(r===void 0&&(r=t),c>0){var n=c-t.length;if(n<=0)return null}if(!Array.isArray(a))return t.indexOf(a)===-1?(t.push(a),o&&o.call(r,a),a):null;for(var e=a.length-1;e>=0;)t.indexOf(a[e])!==-1&&a.splice(e,1),e--;if(e=a.length,e===0)return null;c>0&&e>n&&(a.splice(n),e=n);for(var i=0;i{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c,o,r,n){if(c===void 0&&(c=0),n===void 0&&(n=t),o>0){var e=o-t.length;if(e<=0)return null}if(!Array.isArray(a))return t.indexOf(a)===-1?(t.splice(c,0,a),r&&r.call(n,a),a):null;for(var i=a.length-1;i>=0;)t.indexOf(a[i])!==-1&&a.pop(),i--;if(i=a.length,i===0)return null;o>0&&i>e&&(a.splice(e),i=e);for(var h=i-1;h>=0;h--){var s=a[h];t.splice(c,0,s),r&&r.call(n,s)}return a};v.exports=m},66905:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){var c=t.indexOf(a);return c!==-1&&c{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(82011),c=function(o,r,n,e,i){e===void 0&&(e=0),i===void 0&&(i=o.length);var h=0;if(a(o,e,i))for(var s=e;s{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){var o,r=[null];for(o=3;o{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(82011),c=function(o,r,n,e,i){if(e===void 0&&(e=0),i===void 0&&(i=o.length),a(o,e,i)){var h,s=[null];for(h=5;h{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){if(a.length){if(a.length===1)return a[0]}else return NaN;var o=1,r,n;if(c){if(ta.length&&(o=a.length),c?(r=a[o-1][c],n=a[o][c],n-t<=t-r?a[o]:a[o-1]):(r=a[o-1],n=a[o],n-t<=t-r?n:r)};v.exports=m},43491:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){a===void 0&&(a=[]);for(var c=0;c{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(82011),c=function(o,r,n,e,i){e===void 0&&(e=0),i===void 0&&(i=o.length);var h=[];if(a(o,e,i))for(var s=e;s{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(82011),c=function(o,r,n,e,i){if(e===void 0&&(e=0),i===void 0&&(i=o.length),a(o,e,i))for(var h=e;h{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){a===void 0&&(a=0),c===void 0&&(c=t.length);var o=a+Math.floor(Math.random()*c);return t[o]===void 0?null:t[o]};v.exports=m},85835:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){if(a===c)return t;var o=t.indexOf(a),r=t.indexOf(c);if(o<0||r<0)throw new Error("Supplied items must be elements of the same array");return o>r||(t.splice(o,1),r===t.length-1?t.push(a):t.splice(r,0,a)),t};v.exports=m},83371:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){if(a===c)return t;var o=t.indexOf(a),r=t.indexOf(c);if(o<0||r<0)throw new Error("Supplied items must be elements of the same array");return o{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){var c=t.indexOf(a);if(c>0){var o=t[c-1],r=t.indexOf(o);t[c]=o,t[r]=a}return t};v.exports=m},69693:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){var o=t.indexOf(a);if(o===-1||c<0||c>=t.length)throw new Error("Supplied index out of bounds");return o!==c&&(t.splice(o,1),t.splice(c,0,a)),a};v.exports=m},40853:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){var c=t.indexOf(a);if(c!==-1&&c{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c,o){var r=[],n,e=!1;if((c||o)&&(e=!0,c||(c=""),o||(o="")),a=a;n--)e?r.push(c+n.toString()+o):r.push(n);else for(n=t;n<=a;n++)e?r.push(c+n.toString()+o):r.push(n);return r};v.exports=m},593:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(2284),c=function(o,r,n){o===void 0&&(o=0),r===void 0&&(r=null),n===void 0&&(n=1),r===null&&(r=o,o=0);for(var e=[],i=Math.max(a((r-o)/(n||1)),0),h=0;h{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */function m(c,o,r){var n=c[o];c[o]=c[r],c[r]=n}function t(c,o){return co?1:0}var a=function(c,o,r,n,e){for(r===void 0&&(r=0),n===void 0&&(n=c.length-1),e===void 0&&(e=t);n>r;){if(n-r>600){var i=n-r+1,h=o-r+1,s=Math.log(i),l=.5*Math.exp(2*s/3),f=.5*Math.sqrt(s*l*(i-l)/i)*(h-i/2<0?-1:1),u=Math.max(r,Math.floor(o-h*l/i+f)),d=Math.min(n,Math.floor(o+(i-h)*l/i+f));a(c,o,u,d,e)}var p=c[o],g=r,y=n;for(m(c,r,o),e(c[n],p)>0&&m(c,r,n);g0;)y--}e(c[r],p)===0?m(c,r,y):(y++,m(c,y,n)),y<=o&&(r=y+1),o<=y&&(n=y-1)}};v.exports=a},88492:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(35154),c=t(33680),o=function(n,e,i){for(var h=[],s=0;s{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(19133),c=function(o,r,n,e){e===void 0&&(e=o);var i;if(!Array.isArray(r))return i=o.indexOf(r),i!==-1?(a(o,i),n&&n.call(e,r),r):null;for(var h=r.length-1,s=[];h>=0;){var l=r[h];i=o.indexOf(l),i!==-1&&(a(o,i),s.push(l),n&&n.call(e,l)),h--}return s};v.exports=c},60248:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(19133),c=function(o,r,n,e){if(e===void 0&&(e=o),r<0||r>o.length-1)throw new Error("Index out of bounds");var i=a(o,r);return n&&n.call(e,i),i};v.exports=c},81409:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(82011),c=function(o,r,n,e,i){if(r===void 0&&(r=0),n===void 0&&(n=o.length),i===void 0&&(i=o),a(o,r,n)){var h=n-r,s=o.splice(r,h);if(e)for(var l=0;l{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(19133),c=function(o,r,n){r===void 0&&(r=0),n===void 0&&(n=o.length);var e=r+Math.floor(Math.random()*n);return a(o,e)};v.exports=c},42169:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){var o=t.indexOf(a),r=t.indexOf(c);return o!==-1&&r===-1?(t[o]=c,!0):!1};v.exports=m},86003:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){a===void 0&&(a=1);for(var c=null,o=0;o{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){a===void 0&&(a=1);for(var c=null,o=0;o{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c,o){var r=t.length;if(a<0||a>r||a>=c||c>r){if(o)throw new Error("Range Error: Values outside acceptable range");return!1}else return!0};v.exports=m},89545:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){var c=t.indexOf(a);return c!==-1&&c>0&&(t.splice(c,1),t.unshift(a)),a};v.exports=m},17810:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(82011),c=function(o,r,n,e,i){if(e===void 0&&(e=0),i===void 0&&(i=o.length),a(o,e,i))for(var h=e;h{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){for(var a=t.length-1;a>0;a--){var c=Math.floor(Math.random()*(a+1)),o=t[a];t[a]=t[c],t[c]=o}return t};v.exports=m},90126:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){var a=/\D/g;return t.sort(function(c,o){return parseInt(c.replace(a,""),10)-parseInt(o.replace(a,""),10)}),t};v.exports=m},19133:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){if(!(a>=t.length)){for(var c=t.length-1,o=t[a],r=a;r{/** + * @author Richard Davey + * @author Angry Bytes (and contributors) + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(82264);function c(e,i){return String(e).localeCompare(i)}function o(e,i){var h=e.length;if(h<=1)return e;for(var s=new Array(h),l=1;ll&&(p=l),g>l&&(g=l),y=d,x=p;;)if(y{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){if(a===c)return t;var o=t.indexOf(a),r=t.indexOf(c);if(o<0||r<0)throw new Error("Supplied items must be elements of the same array");return t[o]=c,t[r]=a,t};v.exports=m},37105:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.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:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){if(!Array.isArray(t)||!Array.isArray(t[0]))return!1;for(var a=t[0].length,c=1;c{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(41836),c=t(86922),o=function(r){var n="";if(!c(r))return n;for(var e=0;e{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return t.reverse()};v.exports=m},21224:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){for(var a=0;a{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(37829),c=function(o){return a(o,180)};v.exports=c},44657:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(37829),c=function(o,r){r===void 0&&(r=1);for(var n=0;n{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(86922),c=t(2429),o=function(r,n){if(n===void 0&&(n=90),!a(r))return null;if(typeof n!="string"&&(n=(n%360+360)%360),n===90||n===-270||n==="rotateLeft")r=c(r),r.reverse();else if(n===-90||n===270||n==="rotateRight")r.reverse(),r=c(r);else if(Math.abs(n)===180||n==="rotate180"){for(var e=0;e{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(37829),c=function(o,r){r===void 0&&(r=1);for(var n=0;n{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(86003),c=t(49498),o=function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),e!==0&&(e<0?a(r,Math.abs(e)):c(r,e)),n!==0)for(var i=0;i{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){for(var a=t.length,c=t[0].length,o=new Array(c),r=0;r-1;n--)o[r][n]=t[n][r]}return o};v.exports=m},54915:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.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:v=>{/** + * @author Niklas von Hertzen (https://github.com/niklasvh/base64-arraybuffer) + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=function(a,c){for(var o=new Uint8Array(a),r=o.length,n=c?"data:"+c+";base64,":"",e=0;e>2],n+=m[(o[e]&3)<<4|o[e+1]>>4],n+=m[(o[e+1]&15)<<2|o[e+2]>>6],n+=m[o[e+2]&63];return r%3===2?n=n.substring(0,n.length-1)+"=":r%3===1&&(n=n.substring(0,n.length-2)+"=="),n};v.exports=t},53134:v=>{/** + * @author Niklas von Hertzen (https://github.com/niklasvh/base64-arraybuffer) + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */for(var m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=new Uint8Array(256),a=0;a>4,u[e++]=(h&15)<<4|s>>2,u[e++]=(s&3)<<6|l&63;return f};v.exports=c},65839:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={ArrayBufferToBase64:t(71334),Base64ToArrayBuffer:t(53134)}},91799:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={Array:t(37105),Base64:t(65839),Objects:t(1183),String:t(31749),NOOP:t(29747),NULL:t(20242)}},41786:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){var a={};for(var c in t)Array.isArray(t[c])?a[c]=t[c].slice(0):a[c]=t[c];return a};v.exports=m},62644:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){var a,c,o;if(typeof t!="object"||t===null)return t;a=Array.isArray(t)?[]:{};for(o in t)c=t[o],a[o]=m(c);return a};v.exports=m},79291:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(41212),c=function(){var o,r,n,e,i,h,s=arguments[0]||{},l=1,f=arguments.length,u=!1;for(typeof s=="boolean"&&(u=s,s=arguments[1]||{},l=2),f===l&&(s=this,--l);l{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(75508),c=t(35154),o=function(r,n,e){var i=c(r,n,null);if(i===null)return e;if(Array.isArray(i))return a.RND.pick(i);if(typeof i=="object"){if(i.hasOwnProperty("randInt"))return a.RND.integerInRange(i.randInt[0],i.randInt[1]);if(i.hasOwnProperty("randFloat"))return a.RND.realInRange(i.randFloat[0],i.randFloat[1])}else if(typeof i=="function")return i(n);return i};v.exports=o},95540:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){var o=typeof t;return!t||o==="number"||o==="string"?c:t.hasOwnProperty(a)&&t[a]!==void 0?t[a]:c};v.exports=m},82840:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(35154),c=t(45319),o=function(r,n,e,i,h){h===void 0&&(h=e);var s=a(r,n,h);return c(s,e,i)};v.exports=o},35154:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c,o){if(!t&&!o||typeof t=="number")return c;if(t&&t.hasOwnProperty(a))return t[a];if(o&&o.hasOwnProperty(a))return o[a];if(a.indexOf(".")!==-1){for(var r=a.split("."),n=t,e=o,i=c,h=c,s=!0,l=!0,f=0;f{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){for(var c=0;c{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){for(var c=0;c{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){return t.hasOwnProperty(a)};v.exports=m},41212:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){if(!t||typeof t!="object"||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch{return!1}return!0};v.exports=m},46975:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(41786),c=function(o,r){var n=a(o);for(var e in r)n.hasOwnProperty(e)||(n[e]=r[e]);return n};v.exports=c},269:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(41786),c=function(o,r){var n=a(o);for(var e in r)n.hasOwnProperty(e)&&(n[e]=r[e]);return n};v.exports=c},18254:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var a=t(97022),c=function(o,r){for(var n={},e=0;e{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c){if(!t||typeof t=="number")return!1;if(t.hasOwnProperty(a))return t[a]=c,!0;if(a.indexOf(".")!==-1){for(var o=a.split("."),r=t,n=t,e=0;e{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.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:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){return t.replace(/%([0-9]+)/g,function(c,o){return a[Number(o)-1]})};v.exports=m},41836:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a,c,o){a===void 0&&(a=0),c===void 0&&(c=" "),o===void 0&&(o=3),t=t.toString();var r=0;if(a+1>=t.length)switch(o){case 1:t=new Array(a+1-t.length).join(c)+t;break;case 3:var n=Math.ceil((r=a-t.length)/2),e=r-n;t=new Array(e+1).join(c)+t+new Array(n+1).join(c);break;default:t=t+new Array(a+1-t.length).join(c);break}return t};v.exports=m},33628:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t,a){return a===0?t.slice(1):t.slice(0,a-1)+t.slice(a)};v.exports=m},27671:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return t.split("").reverse().join("")};v.exports=m},45650:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var a=Math.random()*16|0,c=t==="x"?a:a&3|8;return c.toString(16)})};v.exports=m},35355:v=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */var m=function(t){return t&&t[0].toUpperCase()+t.slice(1)};v.exports=m},31749:(v,m,t)=>{/** + * @author Richard Davey + * @copyright 2013-2024 Phaser Studio Inc. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */v.exports={Format:t(27902),Pad:t(41836),RemoveAt:t(33628),Reverse:t(27671),UppercaseFirst:t(35355),UUID:t(45650)}}},I={};function B(v){var m=I[v];if(m!==void 0)return m.exports;var t=I[v]={exports:{}};return A[v](t,t.exports,B),t.exports}B.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}();var G=B(85454);return G})())})(Vu);var uo=Vu.exports;const Wn=Au(uo);var Ey=Object.create,fo=Object.defineProperty,Py=Object.defineProperties,Ay=Object.getOwnPropertyDescriptor,My=Object.getOwnPropertyDescriptors,wy=Object.getOwnPropertyNames,lu=Object.getOwnPropertySymbols,Ry=Object.getPrototypeOf,Wu=Object.prototype.hasOwnProperty,Fy=Object.prototype.propertyIsEnumerable,uu=(P,C,A)=>C in P?fo(P,C,{enumerable:!0,configurable:!0,writable:!0,value:A}):P[C]=A,se=(P,C)=>{for(var A in C||(C={}))Wu.call(C,A)&&uu(P,A,C[A]);if(lu)for(var A of lu(C))Fy.call(C,A)&&uu(P,A,C[A]);return P},Bi=(P,C)=>Py(P,My(C)),Rt=(P,C)=>()=>(C||P((C={exports:{}}).exports,C),C.exports),Ly=(P,C,A,I)=>{if(C&&typeof C=="object"||typeof C=="function")for(let B of wy(C))!Wu.call(P,B)&&B!==A&&fo(P,B,{get:()=>C[B],enumerable:!(I=Ay(C,B))||I.enumerable});return P},Yu=(P,C,A)=>(A=P!=null?Ey(Ry(P)):{},Ly(C||!P||!P.__esModule?fo(A,"default",{value:P,enumerable:!0}):A,P)),yr=Rt(P=>{var C=function(G,v){return Gv?1:0},A=function(G,v){return Gv?-1:0};function I(G){return function(v,m){return G(m,v)}}function B(G){return G===2?function(v,m){return v[0]m[0]?1:v[1]m[1]?1:0}:function(v,m){for(var t=0;tm[t])return 1;t++}return 0}}P.DEFAULT_COMPARATOR=C,P.DEFAULT_REVERSE_COMPARATOR=A,P.reverseComparator=I,P.createTupleComparator=B}),Oy=Rt(P=>{P.ARRAY_BUFFER_SUPPORT=typeof ArrayBuffer<"u",P.SYMBOL_SUPPORT=typeof Symbol<"u"}),ae=Rt((P,C)=>{var A=Oy(),I=A.ARRAY_BUFFER_SUPPORT,B=A.SYMBOL_SUPPORT;C.exports=function(G,v){var m,t,a,c,o;if(!G)throw new Error("obliterator/forEach: invalid iterable.");if(typeof v!="function")throw new Error("obliterator/forEach: expecting a callback.");if(Array.isArray(G)||I&&ArrayBuffer.isView(G)||typeof G=="string"||G.toString()==="[object Arguments]"){for(a=0,c=G.length;a{var A=yr(),I=ae(),B=A.DEFAULT_COMPARATOR,G=A.reverseComparator;function v(i){if(this.clear(),this.comparator=i||B,typeof this.comparator!="function")throw new Error("mnemonist/FibonacciHeap.constructor: given comparator should be a function.")}v.prototype.clear=function(){this.root=null,this.min=null,this.size=0};function m(i){return{item:i,degree:0}}function t(i,h){i.root?(h.right=i.root.right,h.left=i.root,i.root.right.left=h,i.root.right=h):i.root=h}v.prototype.push=function(i){var h=m(i);return h.left=h,h.right=h,t(this,h),(!this.min||this.comparator(h.item,this.min.item)<=0)&&(this.min=h),++this.size},v.prototype.peek=function(){return this.min?this.min.item:void 0};function a(i){for(var h=[],s=i,l=!1;!(s===i&&l);)s===i&&(l=!0),h.push(s),s=s.right;return h}function c(i,h){i.root===h&&(i.root=h.right),h.left.right=h.right,h.right.left=h.left}function o(i,h){i.child?(h.right=i.child.right,h.left=i.child,i.child.right.left=h,i.child.right=h):i.child=h}function r(i,h,s){c(i,h),h.left=h,h.right=h,o(s,h),s.degree++,h.parent=s}function n(i){var h=new Array(i.size),s=a(i.root),l,f,u,d,p,g;for(l=0,f=s.length;l0&&(g=u,u=d,d=g),r(i,d,u),h[p]=null,p++;h[p]=u}for(l=0;l{var C=Math.pow(2,8)-1,A=Math.pow(2,16)-1,I=Math.pow(2,32)-1,B=Math.pow(2,7)-1,G=Math.pow(2,15)-1,v=Math.pow(2,31)-1;P.getPointerArray=function(t){var a=t-1;if(a<=C)return Uint8Array;if(a<=A)return Uint16Array;if(a<=I)return Uint32Array;throw new Error("mnemonist: Pointer Array of size > 4294967295 is not supported.")},P.getSignedPointerArray=function(t){var a=t-1;return a<=B?Int8Array:a<=G?Int16Array:a<=v?Int32Array:Float64Array},P.getNumberType=function(t){return t===(t|0)?Math.sign(t)===-1?t<=127&&t>=-128?Int8Array:t<=32767&&t>=-32768?Int16Array:Int32Array:t<=255?Uint8Array:t<=65535?Uint16Array:Uint32Array:Float64Array};var m={Uint8Array:1,Int8Array:2,Uint16Array:3,Int16Array:4,Uint32Array:5,Int32Array:6,Float32Array:7,Float64Array:8};P.getMinimalRepresentation=function(t,a){var c=null,o=0,r,n,e,i,h;for(i=0,h=t.length;io&&(o=r,c=n);return c},P.isTypedArray=function(t){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView(t)},P.concat=function(){var t=0,a,c,o;for(a=0,o=arguments.length;a{var C=ae(),A=Oe();function I(m){return Array.isArray(m)||A.isTypedArray(m)}function B(m){if(typeof m.length=="number")return m.length;if(typeof m.size=="number")return m.size}function G(m){var t=B(m),a=typeof t=="number"?new Array(t):[],c=0;return C(m,function(o){a[c++]=o}),a}function v(m){var t=B(m),a=typeof t=="number"?A.getPointerArray(t):Array,c=typeof t=="number"?new Array(t):[],o=typeof t=="number"?new a(t):[],r=0;return C(m,function(n){c[r]=n,o[r]=r++}),[c,o]}P.isArrayLike=I,P.guessLength=B,P.toArray=G,P.toArrayWithIndices=v}),co=Rt((P,C)=>{var A=ae(),I=yr(),B=Ue(),G=I.DEFAULT_COMPARATOR,v=I.reverseComparator;function m(f,u,d,p){for(var g=u[p],y,x;p>d;){if(y=p-1>>1,x=u[y],f(g,x)<0){u[p]=x,p=y;continue}break}u[p]=g}function t(f,u,d){for(var p=u.length,g=d,y=u[d],x=2*d+1,T;x=0&&(x=T),u[d]=u[x],d=x,x=2*d+1;u[d]=y,m(f,u,g,d)}function a(f,u,d){u.push(d),m(f,u,0,u.length-1)}function c(f,u){var d=u.pop();if(u.length!==0){var p=u[0];return u[0]=d,t(f,u,0),p}return d}function o(f,u,d){if(u.length===0)throw new Error("mnemonist/heap.replace: cannot pop an empty heap.");var p=u[0];return u[0]=d,t(f,u,0),p}function r(f,u,d){var p;return u.length!==0&&f(u[0],d)<0&&(p=u[0],u[0]=d,d=p,t(f,u,0)),d}function n(f,u){for(var d=u.length,p=d>>1,g=p;--g>=0;)t(f,u,g)}function e(f,u){for(var d=u.length,p=0,g=new Array(d);p=d.length)return d.slice().sort(f);for(S=d.slice(0,u),n(p,S),g=u,y=d.length;g0&&o(p,S,d[g]);return S.sort(f)}var M=B.guessLength(d);return M!==null&&M0&&o(p,S,w)),g++}),S.length>g&&(S.length=g),S.sort(f)}function h(f,u,d){arguments.length===2&&(d=u,u=f,f=G);var p=v(f),g,y,x,T=-1/0,S;if(u===1){if(B.isArrayLike(d)){for(g=0,y=d.length;g0)&&(T=x);return S=new d.constructor(1),S[0]=T,S}return A(d,function(w){(T===-1/0||f(w,T)>0)&&(T=w)}),[T]}if(B.isArrayLike(d)){if(u>=d.length)return d.slice().sort(p);for(S=d.slice(0,u),n(f,S),g=u,y=d.length;g0&&o(f,S,d[g]);return S.sort(p)}var M=B.guessLength(d);return M!==null&&M0&&o(f,S,w)),g++}),S.length>g&&(S.length=g),S.sort(p)}function s(f){if(this.clear(),this.comparator=f||G,typeof this.comparator!="function")throw new Error("mnemonist/Heap.constructor: given comparator should be a function.")}s.prototype.clear=function(){this.items=[],this.size=0},s.prototype.push=function(f){return a(this.comparator,this.items,f),++this.size},s.prototype.peek=function(){return this.items[0]},s.prototype.pop=function(){return this.size!==0&&this.size--,c(this.comparator,this.items)},s.prototype.replace=function(f){return o(this.comparator,this.items,f)},s.prototype.pushpop=function(f){return r(this.comparator,this.items,f)},s.prototype.consume=function(){return this.size=0,e(this.comparator,this.items)},s.prototype.toArray=function(){return e(this.comparator,this.items.slice())},s.prototype.inspect=function(){var f=this.toArray();return Object.defineProperty(f,"constructor",{value:s,enumerable:!1}),f},typeof Symbol<"u"&&(s.prototype[Symbol.for("nodejs.util.inspect.custom")]=s.prototype.inspect);function l(f){if(this.clear(),this.comparator=f||G,typeof this.comparator!="function")throw new Error("mnemonist/MaxHeap.constructor: given comparator should be a function.");this.comparator=v(this.comparator)}l.prototype=s.prototype,s.from=function(f,u){var d=new s(u),p;return B.isArrayLike(f)?p=f.slice():p=B.toArray(f),n(d.comparator,p),d.items=p,d.size=p.length,d},l.from=function(f,u){var d=new l(u),p;return B.isArrayLike(f)?p=f.slice():p=B.toArray(f),n(d.comparator,p),d.items=p,d.size=p.length,d},s.siftUp=t,s.siftDown=m,s.push=a,s.pop=c,s.replace=o,s.pushpop=r,s.heapify=n,s.consume=e,s.nsmallest=i,s.nlargest=h,s.MinHeap=s,s.MaxHeap=l,C.exports=s}),Dy=Rt((P,C)=>{var A="";function I(a,c,o){for(var r=c.length,n=[],e=r,i=-1,h,s=0,l;e--;)i=Math.max(a[c[e]+o],i);for(l=i>>24&&32||i>>16&&24||i>>8&&16||8;s>s&15].push(c[e]);for(h=0;h<16;h++)for(i=n[h].length;i--;)c[++e]=n[h][i]}}function B(a,c,o,r){return a[o]-a[r]||(o%3===2?a[o+1]-a[r+1]||c[o+2]-c[r+2]:c[o+1]-c[r+1])}function G(a,c){var o=[],r=[],n=2*c/3|0,e=c-n,i=n+1>>1,h=n,s=0,l,f=[],u=[];if(c===1)return[0];for(;h--;)o[h]=(h*3>>1)+1;for(h=3;h--;)I(a,o,h);for(s=r[(o[0]/3|0)+(o[0]%3===1?0:i)]=1,h=1;hthis.firstLength&&e>this.firstLength)){for(c=Math.min(this.length-n,this.length-e),r=0;ra.length&&(a=this.text.slice(n,n+c))}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),c=0;c{var A=ae();function I(a){this.size=0,this.items=new Map,this.inverse=a}function B(){this.size=0,this.items=new Map,this.inverse=new I(this)}function G(){this.size=0,this.items.clear(),this.inverse.items.clear()}B.prototype.clear=G,I.prototype.clear=G;function v(a,c){if(this.items.has(a)){var o=this.items.get(a);if(o===c)return this;this.inverse.items.delete(o)}if(this.inverse.items.has(c)){var r=this.inverse.items.get(c);if(r===a)return this;this.items.delete(r)}return this.items.set(a,c),this.inverse.items.set(c,a),this.size=this.items.size,this.inverse.size=this.inverse.items.size,this}B.prototype.set=v,I.prototype.set=v;function m(a){if(this.items.has(a)){var c=this.items.get(a);return this.items.delete(a),this.inverse.items.delete(c),this.size=this.items.size,this.inverse.size=this.inverse.items.size,!0}return!1}B.prototype.delete=m,I.prototype.delete=m;var t=["has","get","forEach","keys","values","entries"];t.forEach(function(a){B.prototype[a]=I.prototype[a]=function(){return Map.prototype[a].apply(this.items,arguments)}}),typeof Symbol<"u"&&(B.prototype[Symbol.iterator]=B.prototype.entries,I.prototype[Symbol.iterator]=I.prototype.entries),B.prototype.inspect=function(){var a={left:this.items,right:this.inverse.items};return Object.defineProperty(a,"constructor",{value:B,enumerable:!1}),a},typeof Symbol<"u"&&(B.prototype[Symbol.for("nodejs.util.inspect.custom")]=B.prototype.inspect),I.prototype.inspect=function(){var a={left:this.inverse.items,right:this.items};return Object.defineProperty(a,"constructor",{value:I,enumerable:!1}),a},typeof Symbol<"u"&&(I.prototype[Symbol.for("nodejs.util.inspect.custom")]=I.prototype.inspect),B.from=function(a){var c=new B;return A(a,function(o,r){c.set(r,o)}),c},C.exports=B}),Se=Rt((P,C)=>{function A(I){if(typeof I!="function")throw new Error("obliterator/iterator: expecting a function!");this.next=I}typeof Symbol<"u"&&(A.prototype[Symbol.iterator]=function(){return this}),A.of=function(){var I=arguments,B=I.length,G=0;return new A(function(){return G>=B?{done:!0}:{done:!1,value:I[G++]}})},A.empty=function(){var I=new A(function(){return{done:!0}});return I},A.fromSequence=function(I){var B=0,G=I.length;return new A(function(){return B>=G?{done:!0}:{done:!1,value:I[B++]}})},A.is=function(I){return I instanceof A?!0:typeof I=="object"&&I!==null&&typeof I.next=="function"},C.exports=A}),Hu=Rt(P=>{function C(v){return v|=v>>1,v|=v>>2,v|=v>>4,v|=v>>8,v|=v>>16,v&~(v>>1)}P.msb32=C;function A(v){return v|=v>>1,v|=v>>2,v|=v>>4,v&~(v>>1)}P.msb8=A,P.test=function(v,m){return v>>m&1},P.criticalBit8=function(v,m){return A(v^m)},P.criticalBit8Mask=function(v,m){return~A(v^m)>>>0&255},P.testCriticalBit8=function(v,m){return 1+(v|m)>>8},P.criticalBit32Mask=function(v,m){return~C(v^m)>>>0&4294967295},P.popcount=function(v){return v-=v>>1&1431655765,v=(v&858993459)+(v>>2&858993459),v=v+(v>>4)&252645135,v+=v>>8,v+=v>>16,v&127};var I=new Uint8Array(Math.pow(2,8));for(B=0,G=I.length;B>8&255]+I[v>>16&255]+I[v>>24&255]}}),By=Rt((P,C)=>{var A=Se(),I=Hu();function B(G){this.length=G,this.clear()}B.prototype.clear=function(){this.size=0,this.array=new Uint32Array(Math.ceil(this.length/32))},B.prototype.set=function(G,v){var m=G>>5,t=G&31,a=this.array[m],c;return v===0||v===!1?c=this.array[m]&=~(1<>>0,c>a?this.size++:c>5,m=G&31,t=this.array[v],a;return a=this.array[v]&=~(1<>5,m=G&31,t=this.array[v],a=this.array[v]^=1<>>0,a>t?this.size++:a>5,m=G&31;return this.array[v]>>m&1},B.prototype.test=function(G){return!!this.get(G)},B.prototype.rank=function(G){if(this.size===0)return 0;for(var v=G>>5,m=G&31,t=0,a=0;a=this.length)return-1;for(var v,m=32,t=0,a=0,c=0,o=this.array.length;c>r&1,a===G)return t}},B.prototype.forEach=function(G,v){v=arguments.length>1?v:this;for(var m=this.length,t,a,c=32,o=0,r=this.array.length;o>n&1,G.call(v,a,o*32+n)}},B.prototype.values=function(){var G=this.length,v=!1,m,t,a=this.array,c=a.length,o=0,r=-1,n=32;return new A(function e(){if(!v){if(o>=c)return{done:!0};o===c-1&&(n=G%32||32),m=a[o++],v=!0,r=-1}return r++,r>=n?(v=!1,e()):(t=m>>r&1,{value:t})})},B.prototype.entries=function(){var G=this.length,v=!1,m,t,a=this.array,c,o=a.length,r=0,n=-1,e=32;return new A(function i(){if(!v){if(r>=o)return{done:!0};r===o-1&&(e=G%32||32),m=a[r++],v=!0,n=-1}return n++,c=~-r*32+n,n>=e?(v=!1,i()):(t=m>>n&1,{value:[c,t]})})},typeof Symbol<"u"&&(B.prototype[Symbol.iterator]=B.prototype.values),B.prototype.inspect=function(){var G=new Uint8Array(this.length);return this.forEach(function(v,m){G[m]=v}),Object.defineProperty(G,"constructor",{value:B,enumerable:!1}),G},typeof Symbol<"u"&&(B.prototype[Symbol.for("nodejs.util.inspect.custom")]=B.prototype.inspect),B.prototype.toJSON=function(){return Array.from(this.array)},C.exports=B}),by=Rt((P,C)=>{var A=Se(),I=Hu(),B=function(m){return Math.max(1,Math.ceil(m*1.5))};function G(m){return new Uint32Array(Math.ceil(m/32))}function v(m){var t=m||0,a=B;typeof m=="object"&&(t=m.initialLength||m.initialCapacity||0,a=m.policy||a),this.size=0,this.length=t,this.capacity=Math.ceil(this.length/32)*32,this.policy=a,this.array=G(this.capacity)}v.prototype.set=function(m,t){if(this.length>5,c=m&31,o=this.array[a],r;return t===0||t===!1?r=this.array[a]&=~(1<>>0,r>o?this.size++:r>5,a=m&31,c=this.array[t],o;return o=this.array[t]&=~(1<>5,a=m&31,c=this.array[t],o=this.array[t]^=1<>>0,o>c?this.size++:othis.array.length?(this.array=new Uint32Array(c),this.array.set(a,0)):this.array=a.slice(0,c),this.capacity=m,this)},v.prototype.grow=function(m){var t;if(typeof m=="number"){if(this.capacity>=m)return this;for(t=this.capacity;t>5,c=t&31;return this.array[a]|=1<>5,a=m&31;return this.array[t]>>a&1}},v.prototype.get=function(m){if(!(this.length>5,a=m&31;return this.array[t]>>a&1}},v.prototype.test=function(m){return this.length>5,a=m&31,c=0,o=0;o=this.length)return-1;for(var t,a=32,c=0,o=0,r=0,n=this.array.length;r>e&1,o===m)return c}},v.prototype.forEach=function(m,t){t=arguments.length>1?t:this;for(var a=this.length,c,o,r=32,n=0,e=this.array.length;n>i&1,m.call(t,o,n*32+i)}},v.prototype.values=function(){var m=this.length,t=!1,a,c,o=this.array,r=o.length,n=0,e=-1,i=32;return new A(function h(){if(!t){if(n>=r)return{done:!0};n===r-1&&(i=m%32||32),a=o[n++],t=!0,e=-1}return e++,e>=i?(t=!1,h()):(c=a>>e&1,{value:c})})},v.prototype.entries=function(){var m=this.length,t=!1,a,c,o=this.array,r,n=o.length,e=0,i=-1,h=32;return new A(function s(){if(!t){if(e>=n)return{done:!0};e===n-1&&(h=m%32||32),a=o[e++],t=!0,i=-1}return i++,r=~-e*32+i,i>=h?(t=!1,s()):(c=a>>i&1,{value:[r,c]})})},typeof Symbol<"u"&&(v.prototype[Symbol.iterator]=v.prototype.values),v.prototype.inspect=function(){var m=new Uint8Array(this.length);return this.forEach(function(t,a){m[a]=t}),Object.defineProperty(m,"constructor",{value:v,enumerable:!1}),m},typeof Symbol<"u"&&(v.prototype[Symbol.for("nodejs.util.inspect.custom")]=v.prototype.inspect),v.prototype.toJSON=function(){return Array.from(this.array.slice(0,(this.length>>5)+1))},C.exports=v}),Gy=Rt((P,C)=>{function A(G,v){return(G&65535)*v+(((G>>>16)*v&65535)<<16)&4294967295}function I(G,v){return(G&65535)+(v>>>16)+(((G>>>16)+v&65535)<<16)&4294967295}function B(G,v){return G<>>32-v}C.exports=function(G,v){var m=3432918353,t=461845907,a=15,c=13,o=5,r=1801774676,n=G,e,i,h;for(i=0,h=v.length-4;i<=h;i+=4)e=v[i]|v[i+1]<<8|v[i+2]<<16|v[i+3]<<24,e=A(e,m),e=B(e,a),e=A(e,t),n^=e,n=B(n,c),n=A(n,o),n=I(n,r);switch(e=0,v.length&3){case 3:e^=v[i+2]<<16;case 2:e^=v[i+1]<<8;case 1:e^=v[i],e=A(e,m),e=B(e,a),e=A(e,t),n^=e}return n^=v.length,n^=n>>>16,n=A(n,2246822507),n^=n>>>13,n=A(n,3266489909),n^=n>>>16,n>>>0}}),Ny=Rt((P,C)=>{var A=Gy(),I=ae(),B=Math.LN2*Math.LN2,G={errorRate:.005};function v(a){var c=new Uint16Array(a.length),o,r;for(o=0,r=a.length;o>3]|=e}return this},t.prototype.test=function(a){for(var c=v(a),o=0,r=this.hashFunctions;o>3]&1<<(7&n)))return!1}return!0},t.prototype.toJSON=function(){return this.data},t.from=function(a,c){if(!c&&(c=a.length||a.size,typeof c!="number"))throw new Error("BloomFilter.from: could not infer the filter's capacity. Try passing it as second argument.");var o=new t(c);return I(a,function(r){o.add(r)}),o},C.exports=t}),zy=Rt((P,C)=>{var A=ae();function I(B){if(typeof B!="function")throw new Error("mnemonist/BKTree.constructor: given `distance` should be a function.");this.distance=B,this.clear()}I.prototype.add=function(B){if(!this.root)return this.root={item:B,children:{}},this.size++,this;for(var G=this.root,v;v=this.distance(B,G.item),!!G.children[v];)G=G.children[v];return G.children[v]={item:B,children:{}},this.size++,this},I.prototype.search=function(B,G){if(!this.root)return[];for(var v=[],m=[this.root],t,a,c,o,r;m.length;)for(t=m.pop(),c=this.distance(G,t.item),c<=B&&v.push({item:t.item,distance:c}),o=c-B,r=c+B+1;o{var A=Ue(),I=Se();function B(G,v){if(arguments.length<2)throw new Error("mnemonist/fixed-deque: expecting an Array class and a capacity.");if(typeof v!="number"||v<=0)throw new Error("mnemonist/fixed-deque: `capacity` should be a positive number.");this.ArrayClass=G,this.capacity=v,this.items=new G(this.capacity),this.clear()}B.prototype.clear=function(){this.start=0,this.size=0},B.prototype.push=function(G){if(this.size===this.capacity)throw new Error("mnemonist/fixed-deque.push: deque capacity ("+this.capacity+") exceeded!");var v=this.start+this.size;return v>=this.capacity&&(v-=this.capacity),this.items[v]=G,++this.size},B.prototype.unshift=function(G){if(this.size===this.capacity)throw new Error("mnemonist/fixed-deque.unshift: deque capacity ("+this.capacity+") exceeded!");var v=this.start-1;return this.start===0&&(v=this.capacity-1),this.items[v]=G,this.start=v,++this.size},B.prototype.pop=function(){if(this.size!==0){this.size--;var G=this.start+this.size;return G>=this.capacity&&(G-=this.capacity),this.items[G]}},B.prototype.shift=function(){if(this.size!==0){var G=this.start;return this.size--,this.start++,this.start===this.capacity&&(this.start=0),this.items[G]}},B.prototype.peekFirst=function(){if(this.size!==0)return this.items[this.start]},B.prototype.peekLast=function(){if(this.size!==0){var G=this.start+this.size-1;return G>=this.capacity&&(G-=this.capacity),this.items[G]}},B.prototype.get=function(G){if(!(this.size===0||G>=this.capacity))return G=this.start+G,G>=this.capacity&&(G-=this.capacity),this.items[G]},B.prototype.forEach=function(G,v){v=arguments.length>1?v:this;for(var m=this.capacity,t=this.size,a=this.start,c=0;c=m)return{done:!0};var c=G[t];return t++,a++,t===v&&(t=0),{value:c,done:!1}})},B.prototype.entries=function(){var G=this.items,v=this.capacity,m=this.size,t=this.start,a=0;return new I(function(){if(a>=m)return{done:!0};var c=G[t];return t++,t===v&&(t=0),{value:[a++,c],done:!1}})},typeof Symbol<"u"&&(B.prototype[Symbol.iterator]=B.prototype.values),B.prototype.inspect=function(){var G=this.toArray();return G.type=this.ArrayClass.name,G.capacity=this.capacity,Object.defineProperty(G,"constructor",{value:B,enumerable:!1}),G},typeof Symbol<"u"&&(B.prototype[Symbol.for("nodejs.util.inspect.custom")]=B.prototype.inspect),B.from=function(G,v,m){if(arguments.length<3&&(m=A.guessLength(G),typeof m!="number"))throw new Error("mnemonist/fixed-deque.from: could not guess iterable length. Please provide desired capacity as last argument.");var t=new B(v,m);if(A.isArrayLike(G)){var a,c;for(a=0,c=G.length;a{var A=Ue(),I=Ku();function B(v,m){if(arguments.length<2)throw new Error("mnemonist/circular-buffer: expecting an Array class and a capacity.");if(typeof m!="number"||m<=0)throw new Error("mnemonist/circular-buffer: `capacity` should be a positive number.");this.ArrayClass=v,this.capacity=m,this.items=new v(this.capacity),this.clear()}function G(v){B.prototype[v]=I.prototype[v]}Object.keys(I.prototype).forEach(G),typeof Symbol<"u"&&Object.getOwnPropertySymbols(I.prototype).forEach(G),B.prototype.push=function(v){var m=this.start+this.size;return m>=this.capacity&&(m-=this.capacity),this.items[m]=v,this.size===this.capacity?(m++,m>=this.capacity?this.start=0:this.start=m,this.size):++this.size},B.prototype.unshift=function(v){var m=this.start-1;return this.start===0&&(m=this.capacity-1),this.items[m]=v,this.size===this.capacity?(this.start=m,this.size):(this.start=m,++this.size)},B.from=function(v,m,t){if(arguments.length<3&&(t=A.guessLength(v),typeof t!="number"))throw new Error("mnemonist/circular-buffer.from: could not guess iterable length. Please provide desired capacity as last argument.");var a=new B(m,t);if(A.isArrayLike(v)){var c,o;for(c=0,o=v.length;c{function A(I){if(typeof I!="function")throw new Error("mnemonist/DefaultMap.constructor: expecting a function.");this.items=new Map,this.factory=I,this.size=0}A.prototype.clear=function(){this.items.clear(),this.size=0},A.prototype.get=function(I){var B=this.items.get(I);return typeof B>"u"&&(B=this.factory(I,this.size),this.items.set(I,B),this.size++),B},A.prototype.peek=function(I){return this.items.get(I)},A.prototype.set=function(I,B){return this.items.set(I,B),this.size=this.items.size,this},A.prototype.has=function(I){return this.items.has(I)},A.prototype.delete=function(I){var B=this.items.delete(I);return this.size=this.items.size,B},A.prototype.forEach=function(I,B){B=arguments.length>1?B:this,this.items.forEach(I,B)},A.prototype.entries=function(){return this.items.entries()},A.prototype.keys=function(){return this.items.keys()},A.prototype.values=function(){return this.items.values()},typeof Symbol<"u"&&(A.prototype[Symbol.iterator]=A.prototype.entries),A.prototype.inspect=function(){return this.items},typeof Symbol<"u"&&(A.prototype[Symbol.for("nodejs.util.inspect.custom")]=A.prototype.inspect),A.autoIncrement=function(){var I=0;return function(){return I++}},C.exports=A}),Vy=Rt((P,C)=>{function A(I){if(typeof I!="function")throw new Error("mnemonist/DefaultWeakMap.constructor: expecting a function.");this.items=new WeakMap,this.factory=I}A.prototype.clear=function(){this.items=new WeakMap},A.prototype.get=function(I){var B=this.items.get(I);return typeof B>"u"&&(B=this.factory(I),this.items.set(I,B)),B},A.prototype.peek=function(I){return this.items.get(I)},A.prototype.set=function(I,B){return this.items.set(I,B),this},A.prototype.has=function(I){return this.items.has(I)},A.prototype.delete=function(I){return this.items.delete(I)},A.prototype.inspect=function(){return this.items},typeof Symbol<"u"&&(A.prototype[Symbol.for("nodejs.util.inspect.custom")]=A.prototype.inspect),C.exports=A}),Wy=Rt((P,C)=>{var A=Oe();function I(B){var G=A.getPointerArray(B),v=A.getPointerArray(Math.log2(B));this.size=B,this.dimension=B,this.parents=new G(B),this.ranks=new v(B);for(var m=0;ma?this.parents[m]=v:(this.parents[m]=v,this.ranks[v]++),this},I.prototype.connected=function(B,G){var v=this.find(B);return v===this.find(G)},I.prototype.mapping=function(){for(var B=A.getPointerArray(this.dimension),G={},v=new B(this.size),m=0,t,a=0,c=this.parents.length;a"u"?(v[a]=m,G[t]=m++):v[a]=G[t];return v},I.prototype.compile=function(){for(var B={},G=new Array(this.dimension),v=0,m,t=0,a=this.parents.length;t"u"?(G[v]=[t],B[m]=v++):G[B[m]].push(t);return G},I.prototype.inspect=function(){var B=this.compile();return Object.defineProperty(B,"constructor",{value:I,enumerable:!1}),B},typeof Symbol<"u"&&(I.prototype[Symbol.for("nodejs.util.inspect.custom")]=I.prototype.inspect),C.exports=I}),po=Rt((P,C)=>{var A=yr(),I=co(),B=A.DEFAULT_COMPARATOR,G=A.reverseComparator;function v(a,c,o,r){for(var n=o,e=r,i=c[r],h=2*r+1,s;h=0&&(h=s),c[r]=c[h],r=h,h=2*r+1;c[r]=i,I.siftDown(a,c,e,r)}function m(a,c,o,r){for(var n=r,e=n,i=new a(r),h,s;e>0;)h=o[--e],e!==0&&(s=o[0],o[0]=h,v(c,o,--r,0),h=s),i[e]=h;return i}function t(a,c,o){if(arguments.length===2&&(o=c,c=null),this.ArrayClass=a,this.capacity=o,this.items=new a(o),this.clear(),this.comparator=c||B,typeof o!="number"&&o<=0)throw new Error("mnemonist/FixedReverseHeap.constructor: capacity should be a number > 0.");if(typeof this.comparator!="function")throw new Error("mnemonist/FixedReverseHeap.constructor: given comparator should be a function.");this.comparator=G(this.comparator)}t.prototype.clear=function(){this.size=0},t.prototype.push=function(a){return this.size0&&I.replace(this.comparator,this.items,a),this.size},t.prototype.peek=function(){return this.items[0]},t.prototype.consume=function(){var a=m(this.ArrayClass,this.comparator,this.items,this.size);return this.size=0,a},t.prototype.toArray=function(){return m(this.ArrayClass,this.comparator,this.items.slice(0,this.size),this.size)},t.prototype.inspect=function(){var a=this.toArray();return Object.defineProperty(a,"constructor",{value:t,enumerable:!1}),a},typeof Symbol<"u"&&(t.prototype[Symbol.for("nodejs.util.inspect.custom")]=t.prototype.inspect),C.exports=t}),Yy=Rt((P,C)=>{var A=ae(),I=function(G){return G};function B(G){if(this.items=new Map,this.clear(),Array.isArray(G)?(this.writeHashFunction=G[0],this.readHashFunction=G[1]):(this.writeHashFunction=G,this.readHashFunction=G),this.writeHashFunction||(this.writeHashFunction=I),this.readHashFunction||(this.readHashFunction=I),typeof this.writeHashFunction!="function")throw new Error("mnemonist/FuzzyMap.constructor: invalid hash function given.");if(typeof this.readHashFunction!="function")throw new Error("mnemonist/FuzzyMap.constructor: invalid hash function given.")}B.prototype.clear=function(){this.items.clear(),this.size=0},B.prototype.add=function(G){var v=this.writeHashFunction(G);return this.items.set(v,G),this.size=this.items.size,this},B.prototype.set=function(G,v){return G=this.writeHashFunction(G),this.items.set(G,v),this.size=this.items.size,this},B.prototype.get=function(G){return G=this.readHashFunction(G),this.items.get(G)},B.prototype.has=function(G){return G=this.readHashFunction(G),this.items.has(G)},B.prototype.forEach=function(G,v){v=arguments.length>1?v:this,this.items.forEach(function(m){G.call(v,m,m)})},B.prototype.values=function(){return this.items.values()},typeof Symbol<"u"&&(B.prototype[Symbol.iterator]=B.prototype.values),B.prototype.inspect=function(){var G=Array.from(this.items.values());return Object.defineProperty(G,"constructor",{value:B,enumerable:!1}),G},typeof Symbol<"u"&&(B.prototype[Symbol.for("nodejs.util.inspect.custom")]=B.prototype.inspect),B.from=function(G,v,m){var t=new B(v);return A(G,function(a,c){m?t.set(c,a):t.add(a)}),t},C.exports=B}),$u=Rt((P,C)=>{var A=Se(),I=ae();function B(G){this.Container=G||Array,this.items=new Map,this.clear(),Object.defineProperty(this.items,"constructor",{value:B,enumerable:!1})}B.prototype.clear=function(){this.size=0,this.dimension=0,this.items.clear()},B.prototype.set=function(G,v){var m=this.items.get(G),t;return m||(this.dimension++,m=new this.Container,this.items.set(G,m)),this.Container===Set?(t=m.size,m.add(v),t"u"?0:this.Container===Set?v.size:v.length},B.prototype.count=B.prototype.multiplicity,B.prototype.forEach=function(G,v){v=arguments.length>1?v:this;var m;function t(a){G.call(v,a,m)}this.items.forEach(function(a,c){m=c,a.forEach(t)})},B.prototype.forEachAssociation=function(G,v){v=arguments.length>1?v:this,this.items.forEach(G,v)},B.prototype.keys=function(){return this.items.keys()},B.prototype.values=function(){var G=this.items.values(),v=!1,m,t,a,c;return this.Container===Set?new A(function o(){if(!v){if(t=G.next(),t.done)return{done:!0};v=!0,m=t.value.values()}return t=m.next(),t.done?(v=!1,o()):{done:!1,value:t.value}}):new A(function o(){if(!v){if(t=G.next(),t.done)return{done:!0};v=!0,m=t.value,a=0,c=m.length}return a>=c?(v=!1,o()):{done:!1,value:m[a++]}})},B.prototype.entries=function(){var G=this.items.entries(),v=!1,m,t,a,c,o;return this.Container===Set?new A(function r(){if(!v){if(t=G.next(),t.done)return{done:!0};v=!0,a=t.value[0],m=t.value[1].values()}return t=m.next(),t.done?(v=!1,r()):{done:!1,value:[a,t.value]}}):new A(function r(){if(!v){if(t=G.next(),t.done)return{done:!0};v=!0,a=t.value[0],m=t.value[1],c=0,o=m.length}return c>=o?(v=!1,r()):{done:!1,value:[a,m[c++]]}})},B.prototype.containers=function(){return this.items.values()},B.prototype.associations=function(){return this.items.entries()},typeof Symbol<"u"&&(B.prototype[Symbol.iterator]=B.prototype.entries),B.prototype.inspect=function(){return this.items},typeof Symbol<"u"&&(B.prototype[Symbol.for("nodejs.util.inspect.custom")]=B.prototype.inspect),B.prototype.toJSON=function(){return this.items},B.from=function(G,v){var m=new B(v);return I(G,function(t,a){m.set(a,t)}),m},C.exports=B}),Hy=Rt((P,C)=>{var A=$u(),I=ae(),B=function(v){return v};function G(v,m){if(this.items=new A(m),this.clear(),Array.isArray(v)?(this.writeHashFunction=v[0],this.readHashFunction=v[1]):(this.writeHashFunction=v,this.readHashFunction=v),this.writeHashFunction||(this.writeHashFunction=B),this.readHashFunction||(this.readHashFunction=B),typeof this.writeHashFunction!="function")throw new Error("mnemonist/FuzzyMultiMap.constructor: invalid hash function given.");if(typeof this.readHashFunction!="function")throw new Error("mnemonist/FuzzyMultiMap.constructor: invalid hash function given.")}G.prototype.clear=function(){this.items.clear(),this.size=0,this.dimension=0},G.prototype.add=function(v){var m=this.writeHashFunction(v);return this.items.set(m,v),this.size=this.items.size,this.dimension=this.items.dimension,this},G.prototype.set=function(v,m){return v=this.writeHashFunction(v),this.items.set(v,m),this.size=this.items.size,this.dimension=this.items.dimension,this},G.prototype.get=function(v){return v=this.readHashFunction(v),this.items.get(v)},G.prototype.has=function(v){return v=this.readHashFunction(v),this.items.has(v)},G.prototype.forEach=function(v,m){m=arguments.length>1?m:this,this.items.forEach(function(t){v.call(m,t,t)})},G.prototype.values=function(){return this.items.values()},typeof Symbol<"u"&&(G.prototype[Symbol.iterator]=G.prototype.values),G.prototype.inspect=function(){var v=Array.from(this);return Object.defineProperty(v,"constructor",{value:G,enumerable:!1}),v},typeof Symbol<"u"&&(G.prototype[Symbol.for("nodejs.util.inspect.custom")]=G.prototype.inspect),G.from=function(v,m,t,a){arguments.length===3&&typeof t=="boolean"&&(a=t,t=Array);var c=new G(m,t);return I(v,function(o,r){a?c.set(r,o):c.add(o)}),c},C.exports=G}),Ky=Rt((P,C)=>{var A=1024;function I(G){return(G&G-1)===0}function B(G,v){if(arguments.length<1)throw new Error("mnemonist/hashed-array-tree: expecting at least a byte array constructor.");var m=v||0,t=A,a=0;if(typeof v=="object"&&(m=v.initialCapacity||0,a=v.initialLength||0,t=v.blockSize||A),!t||!I(t))throw new Error("mnemonist/hashed-array-tree: block size should be a power of two.");var c=Math.max(a,m),o=Math.ceil(c/t);this.ArrayClass=G,this.length=a,this.capacity=o*t,this.blockSize=t,this.offsetMask=t-1,this.blockMask=Math.log2(t),this.blocks=new Array(o);for(var r=0;r>this.blockMask,t=G&this.offsetMask;return this.blocks[m][t]=v,this},B.prototype.get=function(G){if(!(this.length>this.blockMask,m=G&this.offsetMask;return this.blocks[v][m]}},B.prototype.grow=function(G){if(typeof G!="number"&&(G=this.capacity+this.blockSize),this.capacity>=G)return this;for(;this.capacity>this.blockMask,t=v&this.offsetMask;return this.blocks[m][t]=G,++this.length},B.prototype.pop=function(){if(this.length!==0){var G=this.blocks[this.blocks.length-1],v=--this.length&this.offsetMask;return G[v]}},B.prototype.inspect=function(){for(var G=new this.ArrayClass(this.length),v,m=0,t=this.length;m>this.blockMask,G[m]=this.blocks[v][m&this.offsetMask];return G.type=this.ArrayClass.name,G.items=this.length,G.capacity=this.capacity,G.blockSize=this.blockSize,Object.defineProperty(G,"constructor",{value:B,enumerable:!1}),G},typeof Symbol<"u"&&(B.prototype[Symbol.for("nodejs.util.inspect.custom")]=B.prototype.inspect),C.exports=B}),Zu=Rt((P,C)=>{var A=Se(),I=Ue();function B(G,v){if(arguments.length<2)throw new Error("mnemonist/fixed-stack: expecting an Array class and a capacity.");if(typeof v!="number"||v<=0)throw new Error("mnemonist/fixed-stack: `capacity` should be a positive number.");this.capacity=v,this.ArrayClass=G,this.items=new this.ArrayClass(this.capacity),this.clear()}B.prototype.clear=function(){this.size=0},B.prototype.push=function(G){if(this.size===this.capacity)throw new Error("mnemonist/fixed-stack.push: stack capacity ("+this.capacity+") exceeded!");return this.items[this.size++]=G,this.size},B.prototype.pop=function(){if(this.size!==0)return this.items[--this.size]},B.prototype.peek=function(){return this.items[this.size-1]},B.prototype.forEach=function(G,v){v=arguments.length>1?v:this;for(var m=0,t=this.items.length;m=v)return{done:!0};var t=G[v-m-1];return m++,{value:t,done:!1}})},B.prototype.entries=function(){var G=this.items,v=this.size,m=0;return new A(function(){if(m>=v)return{done:!0};var t=G[v-m-1];return{value:[m++,t],done:!1}})},typeof Symbol<"u"&&(B.prototype[Symbol.iterator]=B.prototype.values),B.prototype.toString=function(){return this.toArray().join(",")},B.prototype.toJSON=function(){return this.toArray()},B.prototype.inspect=function(){var G=this.toArray();return G.type=this.ArrayClass.name,G.capacity=this.capacity,Object.defineProperty(G,"constructor",{value:B,enumerable:!1}),G},typeof Symbol<"u"&&(B.prototype[Symbol.for("nodejs.util.inspect.custom")]=B.prototype.inspect),B.from=function(G,v,m){if(arguments.length<3&&(m=I.guessLength(G),typeof m!="number"))throw new Error("mnemonist/fixed-stack.from: could not guess iterable length. Please provide desired capacity as last argument.");var t=new B(v,m);if(I.isArrayLike(G)){var a,c;for(a=0,c=G.length;a{var A=Ue(),I=Oe(),B=Zu();function G(m,t,a,c,o,r,n,e){var i=n+(e-n)/2|0,h=~-i,s=-~i,l=a[i];c[r]=l+1;var f=t?t(m[l]):m[l][1],u=r*2+1,d=r*2+2,p=-1/0,g=-1/0;n<=h&&(p=G(m,t,a,c,o,u,n,h)),s<=e&&(g=G(m,t,a,c,o,d,s,e));var y=Math.max(f,p,g),x=l;return y===p?x=o[c[u]-1]:y===g&&(x=o[c[d]-1]),o[l]=x,y}function v(m,t){this.size=m.length,this.intervals=m;var a=null,c=null;Array.isArray(t)&&(a=t[0],c=t[1]);var o=m.length,r=I.getPointerArray(o+1),n=new r(o),e;for(e=1;eu?1:0});var i=Math.ceil(Math.log2(o+1)),h=Math.pow(2,i)-1,s=new r(h),l=new r(o);G(m,c,n,s,l,0,0,o-1),n=null,this.height=i,this.tree=s,this.augmentations=l,this.startGetter=a,this.endGetter=c,this.stack=new B(r,this.height)}v.prototype.intervalsContainingPoint=function(m){var t=[],a=this.stack;a.clear(),a.push(0);for(var c=this.tree.length,o,r,n,e,i,h,s,l,f;a.size;)o=a.pop(),r=this.tree[o]-1,n=this.intervals[r],e=this.intervals[this.augmentations[r]],s=this.endGetter?this.endGetter(e):e[1],!(m>s)&&(l=o*2+1,l=i&&m<=h&&t.push(n),!(mf)&&(u=n*2+1,u=s&&t<=l&&c.push(i),!(a{P.search=function(C,A,I,B){var G=0;I=typeof I<"u"?I:0,B=typeof B<"u"?B:C.length,B--;for(var v;I<=B;)if(G=I+B>>>1,v=C[G],v>A)B=~-G;else if(v>>1,m=C(A[B],I),m>0)v=~-B;else if(m<0)G=-~B;else return B;return-1},P.lowerBound=function(C,A,I,B){var G=0;for(I=typeof I<"u"?I:0,B=typeof B<"u"?B:C.length;I>>1,A<=C[G]?B=G:I=-~G;return I},P.lowerBoundWithComparator=function(C,A,I){for(var B=0,G=0,v=A.length;G>>1,C(I,A[B])<=0?v=B:G=-~B;return G},P.lowerBoundIndices=function(C,A,I,B,G){var v=0;for(B=typeof B<"u"?B:0,G=typeof G<"u"?G:C.length;B>>1,I<=C[A[v]]?G=v:B=-~v;return B},P.upperBound=function(C,A,I,B){var G=0;for(I=typeof I<"u"?I:0,B=typeof B<"u"?B:C.length;I>>1,A>=C[G]?I=-~G:B=G;return I},P.upperBoundWithComparator=function(C,A,I){for(var B=0,G=0,v=A.length;G>>1,C(I,A[B])>=0?G=-~B:v=B;return G}}),Zy=Rt(P=>{var C=Oe(),A=Ue().isArrayLike,I=Ju(),B=vo();function G(a,c){if(a.length===0)return c.slice();if(c.length===0)return a.slice();var o;a[0]>c[0]&&(o=a,a=c,c=o);var r=a[a.length-1],n=c[0];if(r<=n)return C.isTypedArray(a)?C.concat(a,c):a.concat(c);var e=new a.constructor(a.length+c.length),i,h,s;for(i=0,h=a.length;ic[0]&&(o=a,a=c,c=o);var r=a[a.length-1],n=c[0];if(rc[0]&&(o=a,a=c,c=o);var r=a[a.length-1],n=c[0];if(ru?s=I.lowerBound(c,f,s+1):(e.push(f),i++,s++);return e};function m(a){var c=0,o=-1/0,r,n,e,i=[];for(n=0,e=a.length;no&&(o=r));if(i.length===0)return new a[0].constructor(0);if(i.length===1)return i[0].slice();if(i.length===2)return G(i[0],i[1]);a=i;var h=new a[0].constructor(c),s=C.getPointerArray(o),l=new s(a.length),f=new B(function(p,g){return p=a[p][l[p]],g=a[g][l[g]],pg?1:0});for(n=0;nc&&(c=o));if(e.length===0)return new a[0].constructor(0);if(e.length===1)return e[0].slice();if(e.length===2)return v(e[0],e[1]);a=e;var i=new a[0].constructor,h=C.getPointerArray(c),s=new h(a.length),l=new B(function(d,p){return d=a[d][s[d]],p=a[p][s[p]],dp?1:0});for(r=0;rc&&(c=r),no)return[];if(c===o)return[c];var s,l,f=a[0],u,d,p,g,y,x,T=c;for(i=1;ix?d=I.lowerBound(l,y,d+1):(f.push(y),u++,d++);if(f.length===0)return f;T=f[0]}return f},P.merge=function(){if(arguments.length===2){if(A(arguments[0]))return G(arguments[0],arguments[1])}else if(A(arguments[0]))return m(arguments);return null},P.unionUnique=function(){if(arguments.length===2){if(A(arguments[0]))return v(arguments[0],arguments[1])}else if(A(arguments[0]))return t(arguments);return null},P.intersectionUnique=function(){if(arguments.length===2){if(A(arguments[0]))return P.intersectionUniqueArrays(arguments[0],arguments[1])}else if(A(arguments[0]))return P.kWayIntersectionUniqueArrays(arguments);return null}}),Jy=Rt((P,C)=>{var A=Se(),I=ae(),B=Zy();function G(m){return m}function v(m){if(this.clear(),Array.isArray(m)?(this.documentTokenizer=m[0],this.queryTokenizer=m[1]):(this.documentTokenizer=m,this.queryTokenizer=m),this.documentTokenizer||(this.documentTokenizer=G),this.queryTokenizer||(this.queryTokenizer=G),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.")}v.prototype.clear=function(){this.items=[],this.mapping=new Map,this.size=0,this.dimension=0},v.prototype.add=function(m){this.size++;var t=this.items.length;this.items.push(m);var a=this.documentTokenizer(m);if(!Array.isArray(a))throw new Error("mnemonist/InvertedIndex.add: tokenizer function should return an array of tokens.");for(var c=new Set,o,r,n=0,e=a.length;n"u"||a.length===0)return[];if(t.length>1)for(o=1,r=t.length;o"u"||c.length===0)return[];a=B.intersectionUniqueArrays(a,c)}var n=new Array(a.length);for(o=0,r=n.length;o1?t:this;for(var a=0,c=this.documents.length;a=t)return{done:!0};var c=m[a++];return{value:c,done:!1}})},v.prototype.tokens=function(){return this.mapping.keys()},typeof Symbol<"u"&&(v.prototype[Symbol.iterator]=v.prototype.documents),v.prototype.inspect=function(){var m=this.items.slice();return Object.defineProperty(m,"constructor",{value:v,enumerable:!1}),m},typeof Symbol<"u"&&(v.prototype[Symbol.for("nodejs.util.inspect.custom")]=v.prototype.inspect),v.from=function(m,t){var a=new v(t);return I(m,function(c){a.add(c)}),a},C.exports=v}),ju=Rt(P=>{var C=new Float64Array(64),A=new Float64Array(64);function I(G,v,m){var t,a,c,o,r;for(C[0]=v,A[0]=m,a=0;a>=0;)if(c=C[a],o=A[a]-1,c=t&&cA[a-1]-C[a-1]&&(r=C[a],C[a]=C[a-1],C[a-1]=r,r=A[a],A[a]=A[a-1],A[a-1]=r)}else a--;return G}P.inplaceQuickSort=I;function B(G,v,m,t){var a,c,o,r,n,e;for(C[0]=m,A[0]=t,c=0;c>=0;)if(o=C[c],r=A[c]-1,o=a&&oA[c-1]-C[c-1]&&(e=C[c],C[c]=C[c-1],C[c-1]=e,e=A[c],A[c]=A[c-1],A[c-1]=e)}else c--;return v}P.inplaceQuickSortIndices=B}),jy=Rt((P,C)=>{var A=Ue(),I=Oe(),B=yr().createTupleComparator,G=po(),v=ju().inplaceQuickSortIndices;function m(n,e,i,h){var s,l=0,f;for(s=0;s>>1),S=i[T],f[F]=S,y>-1&&(x===0?u[y]=F+1:d[y]=F+1),L=(L+1)%n,T!==M&&T!==w-1&&p.push([L,T+1,w,F,1]),T!==M&&p.push([L,M,T,F,0]),F++;return{axes:e,labels:h,pivots:f,lefts:u,rights:d}}function c(n,e){this.dimensions=n,this.visited=0,this.axes=e.axes,this.labels=e.labels,this.pivots=e.pivots,this.lefts=e.lefts,this.rights=e.rights,this.size=this.labels.length}c.prototype.nearestNeighbor=function(n){var e=1/0,i=null,h=this.dimensions,s=this.axes,l=this.pivots,f=this.lefts,u=this.rights,d=0;function p(g,y){d++;var x=f[y],T=u[y],S=l[y],M=m(h,s,S,n);if(!(M0?x!==0&&p(g,x-1):T!==0&&p(g,T-1),w*w0?T!==0&&p(g,T-1):x!==0&&p(g,x-1))}}return p(0,0),this.visited=d,this.labels[i]};var o=B(3),r=B(2);c.prototype.kNearestNeighbors=function(n,e){if(n<=0)throw new Error("mnemonist/kd-tree.kNearestNeighbors: k should be a positive number.");if(n=Math.min(n,this.size),n===1)return[this.nearestNeighbor(e)];var i=new G(Array,o,n),h=this.dimensions,s=this.axes,l=this.pivots,f=this.lefts,u=this.rights,d=0;function p(x,T){var S=f[T],M=u[T],w=l[T],L=m(h,s,w,e);i.push([L,d++,w]);var F=e[x],O=s[x][w],b=F-O;x=(x+1)%h,F{var A=Se(),I=ae();function B(){this.clear()}B.prototype.clear=function(){this.head=null,this.tail=null,this.size=0},B.prototype.first=function(){return this.head?this.head.item:void 0},B.prototype.peek=B.prototype.first,B.prototype.last=function(){return this.tail?this.tail.item:void 0},B.prototype.push=function(G){var v={item:G,next:null};return this.head?(this.tail.next=v,this.tail=v):(this.head=v,this.tail=v),this.size++,this.size},B.prototype.unshift=function(G){var v={item:G,next:null};return this.head?(this.head.next||(this.tail=this.head),v.next=this.head,this.head=v):(this.head=v,this.tail=v),this.size++,this.size},B.prototype.shift=function(){if(this.size){var G=this.head;return this.head=G.next,this.size--,G.item}},B.prototype.forEach=function(G,v){if(this.size){v=arguments.length>1?v:this;for(var m=this.head,t=0;m;)G.call(v,m.item,t,this),m=m.next,t++}},B.prototype.toArray=function(){if(!this.size)return[];for(var G=new Array(this.size),v=0,m=this.size,t=this.head;v{var A=Se(),I=ae(),B=Oe(),G=Ue();function v(m,t,a){if(arguments.length<2&&(a=m,m=null,t=null),this.capacity=a,typeof this.capacity!="number"||this.capacity<=0)throw new Error("mnemonist/lru-cache: capacity should be positive number.");if(!isFinite(this.capacity)||Math.floor(this.capacity)!==this.capacity)throw new Error("mnemonist/lru-cache: capacity should be a finite positive integer.");var c=B.getPointerArray(a);this.forward=new c(a),this.backward=new c(a),this.K=typeof m=="function"?new m(a):new Array(a),this.V=typeof t=="function"?new t(a):new Array(a),this.size=0,this.head=0,this.tail=0,this.items={}}v.prototype.clear=function(){this.size=0,this.head=0,this.tail=0,this.items={}},v.prototype.splayOnTop=function(m){var t=this.head;if(this.head===m)return this;var a=this.backward[m],c=this.forward[m];return this.tail===m?this.tail=a:this.backward[c]=a,this.forward[a]=c,this.backward[t]=m,this.head=m,this.forward[m]=t,this},v.prototype.set=function(m,t){var a=this.items[m];if(typeof a<"u"){this.splayOnTop(a),this.V[a]=t;return}this.size1?t:this;for(var a=0,c=this.size,o=this.head,r=this.K,n=this.V,e=this.forward;a=t)return{done:!0};var r=c[a];return m++,m=t)return{done:!0};var r=c[a];return m++,m=t)return{done:!0};var n=c[a],e=o[a];return m++,m{var A=go(),I=ae(),B=Oe(),G=Ue();function v(t,a,c){arguments.length<2?A.call(this,t):A.call(this,t,a,c);var o=B.getPointerArray(this.capacity);this.deleted=new o(this.capacity),this.deletedSize=0}for(m in A.prototype)v.prototype[m]=A.prototype[m];var m;typeof Symbol<"u"&&(v.prototype[Symbol.iterator]=A.prototype[Symbol.iterator]),v.prototype.clear=function(){A.prototype.clear.call(this),this.deletedSize=0},v.prototype.set=function(t,a){var c=this.items[t];if(typeof c<"u"){this.splayOnTop(c),this.V[c]=a;return}this.size0?c=this.deleted[--this.deletedSize]:c=this.size,this.size++):(c=this.tail,this.tail=this.backward[c],delete this.items[this.K[c]]),this.items[t]=c,this.K[c]=t,this.V[c]=a,this.forward[c]=this.head,this.backward[this.head]=c,this.head=c},v.prototype.setpop=function(t,a){var c=null,o=null,r=this.items[t];return typeof r<"u"?(this.splayOnTop(r),c=this.V[r],this.V[r]=a,{evicted:!1,key:t,value:c}):(this.size0?r=this.deleted[--this.deletedSize]:r=this.size,this.size++):(r=this.tail,this.tail=this.backward[r],c=this.V[r],o=this.K[r],delete this.items[o]),this.items[t]=r,this.K[r]=t,this.V[r]=a,this.forward[r]=this.head,this.backward[this.head]=r,this.head=r,o?{evicted:!0,key:o,value:c}:null)},v.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 c=this.backward[a],o=this.forward[a];return this.head===a&&(this.head=o),this.tail===a&&(this.tail=c),this.forward[c]=o,this.backward[o]=c,this.size--,this.deleted[this.deletedSize++]=a,!0},v.prototype.remove=function(t,a=void 0){var c=this.items[t];if(typeof c>"u")return a;var o=this.V[c];if(delete this.items[t],this.size===1)return this.size=0,this.head=0,this.tail=0,this.deletedSize=0,o;var r=this.backward[c],n=this.forward[c];return this.head===c&&(this.head=n),this.tail===c&&(this.tail=r),this.forward[r]=n,this.backward[n]=r,this.size--,this.deleted[this.deletedSize++]=c,o},v.from=function(t,a,c,o){if(arguments.length<2){if(o=G.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,c=null);var r=new v(a,c,o);return I(t,function(n,e){r.set(e,n)}),r},C.exports=v}),Qu=Rt((P,C)=>{var A=go(),I=ae(),B=Oe(),G=Ue();function v(m,t,a){if(arguments.length<2&&(a=m,m=null,t=null),this.capacity=a,typeof this.capacity!="number"||this.capacity<=0)throw new Error("mnemonist/lru-map: capacity should be positive number.");if(!isFinite(this.capacity)||Math.floor(this.capacity)!==this.capacity)throw new Error("mnemonist/lru-map: capacity should be a finite positive integer.");var c=B.getPointerArray(a);this.forward=new c(a),this.backward=new c(a),this.K=typeof m=="function"?new m(a):new Array(a),this.V=typeof t=="function"?new t(a):new Array(a),this.size=0,this.head=0,this.tail=0,this.items=new Map}v.prototype.clear=function(){this.size=0,this.head=0,this.tail=0,this.items.clear()},v.prototype.set=function(m,t){var a=this.items.get(m);if(typeof a<"u"){this.splayOnTop(a),this.V[a]=t;return}this.size{var A=Qu(),I=ae(),B=Oe(),G=Ue();function v(t,a,c){arguments.length<2?A.call(this,t):A.call(this,t,a,c);var o=B.getPointerArray(this.capacity);this.deleted=new o(this.capacity),this.deletedSize=0}for(m in A.prototype)v.prototype[m]=A.prototype[m];var m;typeof Symbol<"u"&&(v.prototype[Symbol.iterator]=A.prototype[Symbol.iterator]),v.prototype.clear=function(){A.prototype.clear.call(this),this.deletedSize=0},v.prototype.set=function(t,a){var c=this.items.get(t);if(typeof c<"u"){this.splayOnTop(c),this.V[c]=a;return}this.size0?c=this.deleted[--this.deletedSize]:c=this.size,this.size++):(c=this.tail,this.tail=this.backward[c],this.items.delete(this.K[c])),this.items.set(t,c),this.K[c]=t,this.V[c]=a,this.forward[c]=this.head,this.backward[this.head]=c,this.head=c},v.prototype.setpop=function(t,a){var c=null,o=null,r=this.items.get(t);return typeof r<"u"?(this.splayOnTop(r),c=this.V[r],this.V[r]=a,{evicted:!1,key:t,value:c}):(this.size0?r=this.deleted[--this.deletedSize]:r=this.size,this.size++):(r=this.tail,this.tail=this.backward[r],c=this.V[r],o=this.K[r],this.items.delete(o)),this.items.set(t,r),this.K[r]=t,this.V[r]=a,this.forward[r]=this.head,this.backward[this.head]=r,this.head=r,o?{evicted:!0,key:o,value:c}:null)},v.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 c=this.backward[a],o=this.forward[a];return this.head===a&&(this.head=o),this.tail===a&&(this.tail=c),this.forward[c]=o,this.backward[o]=c,this.size--,this.deleted[this.deletedSize++]=a,!0},v.prototype.remove=function(t,a=void 0){var c=this.items.get(t);if(typeof c>"u")return a;var o=this.V[c];if(this.items.delete(t),this.size===1)return this.size=0,this.head=0,this.tail=0,this.deletedSize=0,o;var r=this.backward[c],n=this.forward[c];return this.head===c&&(this.head=n),this.tail===c&&(this.tail=r),this.forward[r]=n,this.backward[n]=r,this.size--,this.deleted[this.deletedSize++]=c,o},v.from=function(t,a,c,o){if(arguments.length<2){if(o=G.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,c=null);var r=new v(a,c,o);return I(t,function(n,e){r.set(e,n)}),r},C.exports=v}),_y=Rt((P,C)=>{var A=Se(),I=ae(),B=po(),G=function(m,t){return m[1]>t[1]?-1:m[1]"u"?0:t},v.prototype.get=v.prototype.multiplicity,v.prototype.count=v.prototype.multiplicity,v.prototype.frequency=function(m){if(this.size===0)return 0;var t=this.multiplicity(m);return t/this.size},v.prototype.top=function(m){if(typeof m!="number"||m<=0)throw new Error("mnemonist/multi-set.top: n must be a number > 0.");for(var t=new B(Array,G,m),a=this.items.entries(),c;c=a.next(),!c.done;)t.push(c.value);return t.consume()},v.prototype.forEach=function(m,t){t=arguments.length>1?t:this;var a;this.items.forEach(function(c,o){for(a=0;a1?t:this,this.items.forEach(m,t)},v.prototype.keys=function(){return this.items.keys()},v.prototype.values=function(){var m=this.items.entries(),t=!1,a,c,o,r;return new A(function n(){if(!t){if(a=m.next(),a.done)return{done:!0};t=!0,c=a.value[0],o=a.value[1],r=0}return r>=o?(t=!1,n()):(r++,{done:!1,value:c})})},v.prototype.multiplicities=function(){return this.items.entries()},typeof Symbol<"u"&&(v.prototype[Symbol.iterator]=v.prototype.values),v.prototype.inspect=function(){return this.items},typeof Symbol<"u"&&(v.prototype[Symbol.for("nodejs.util.inspect.custom")]=v.prototype.inspect),v.prototype.toJSON=function(){return this.items},v.from=function(m){var t=new v;return I(m,function(a){t.add(a)}),t},v.isSubset=function(m,t){var a=m.multiplicities(),c,o,r;if(m===t)return!0;if(m.dimension>t.dimension)return!1;for(;c=a.next(),!c.done;)if(o=c.value[0],r=c.value[1],t.multiplicity(o){var A=Se(),I=ae();function B(n,e,i){return((Math.pow(n,2)-Math.pow(Math.abs(e-i),2))/2|0)+n+1}function G(n,e){for(var i=0,h=0,s=e+1;he.length?-1:n.lengthe?1:0}function m(n,e){var i=n+1,h=e/i|0,s=h+1,l,f,u=e-h*i,d=i-u,p=new Array(n+1);for(l=0;l 0");this.levenshtein=n,this.k=e,this.clear()}r.prototype.clear=function(){this.size=0,this.strings=[],this.invertedIndices={}},r.prototype.add=function(n){var e=n.length,i=this.size;this.strings.push(n),this.size++;var h=t(this.k,n),s=this.invertedIndices[e];typeof s>"u"&&(s={},this.invertedIndices[e]=s);var l,f,u,d,p;for(d=0,p=h.length;d"u"?(f=[i],s[u]=f):f.push(i);return this},r.prototype.search=function(n){var e=n.length,i=this.k,h=new Set,s,l,f,u,d,p,g,y,x,T,S,M,w,L,F;for(y=Math.max(0,e-i),x=e+i+1;y1?e:this;for(var i=0,h=this.strings.length;i=e)return{done:!0};var h=n[i];return i++,{value:h,done:!1}})},typeof Symbol<"u"&&(r.prototype[Symbol.iterator]=r.prototype.values),r.prototype.inspect=function(){var n=this.strings.slice();return Object.defineProperty(n,"constructor",{value:r,enumerable:!1}),n},typeof Symbol<"u"&&(r.prototype[Symbol.for("nodejs.util.inspect.custom")]=r.prototype.inspect),r.from=function(n,e,i){var h=new r(e,i);return I(n,function(s){h.add(s)}),h},r.countKeys=G,r.comparator=v,r.partition=m,r.segments=t,r.segmentPos=a,r.multiMatchAwareInterval=c,r.multiMatchAwareSubstrings=o,C.exports=r}),e1=Rt((P,C)=>{var A=Se(),I=ae();function B(){this.clear()}B.prototype.clear=function(){this.items=[],this.offset=0,this.size=0},B.prototype.enqueue=function(G){return this.items.push(G),++this.size},B.prototype.dequeue=function(){if(this.size){var G=this.items[this.offset];return++this.offset*2>=this.items.length&&(this.items=this.items.slice(this.offset),this.offset=0),this.size--,G}},B.prototype.peek=function(){if(this.size)return this.items[this.offset]},B.prototype.forEach=function(G,v){v=arguments.length>1?v:this;for(var m=this.offset,t=0,a=this.items.length;m=G.length)return{done:!0};var m=G[v];return v++,{value:m,done:!1}})},B.prototype.entries=function(){var G=this.items,v=this.offset,m=0;return new A(function(){if(v>=G.length)return{done:!0};var t=G[v];return v++,{value:[m++,t],done:!1}})},typeof Symbol<"u"&&(B.prototype[Symbol.iterator]=B.prototype.values),B.prototype.toString=function(){return this.toArray().join(",")},B.prototype.toJSON=function(){return this.toArray()},B.prototype.inspect=function(){var G=this.toArray();return Object.defineProperty(G,"constructor",{value:B,enumerable:!1}),G},typeof Symbol<"u"&&(B.prototype[Symbol.for("nodejs.util.inspect.custom")]=B.prototype.inspect),B.from=function(G){var v=new B;return I(G,function(m){v.enqueue(m)}),v},B.of=function(){return B.from(arguments)},C.exports=B}),i1=Rt((P,C)=>{var A=Se(),I=ae();function B(){this.clear()}B.prototype.clear=function(){this.items=[],this.size=0},B.prototype.push=function(G){return this.items.push(G),++this.size},B.prototype.pop=function(){if(this.size!==0)return this.size--,this.items.pop()},B.prototype.peek=function(){return this.items[this.size-1]},B.prototype.forEach=function(G,v){v=arguments.length>1?v:this;for(var m=0,t=this.items.length;m=v)return{done:!0};var t=G[v-m-1];return m++,{value:t,done:!1}})},B.prototype.entries=function(){var G=this.items,v=G.length,m=0;return new A(function(){if(m>=v)return{done:!0};var t=G[v-m-1];return{value:[m++,t],done:!1}})},typeof Symbol<"u"&&(B.prototype[Symbol.iterator]=B.prototype.values),B.prototype.toString=function(){return this.toArray().join(",")},B.prototype.toJSON=function(){return this.toArray()},B.prototype.inspect=function(){var G=this.toArray();return Object.defineProperty(G,"constructor",{value:B,enumerable:!1}),G},typeof Symbol<"u"&&(B.prototype[Symbol.for("nodejs.util.inspect.custom")]=B.prototype.inspect),B.from=function(G){var v=new B;return I(G,function(m){v.push(m)}),v},B.of=function(){return B.from(arguments)},C.exports=B}),s1=Rt(P=>{P.intersection=function(){if(arguments.length<2)throw new Error("mnemonist/Set.intersection: needs at least two arguments.");var C=new Set,A=1/0,I=null,B,G,v=arguments.length;for(G=0;GA.size)return!1;for(;B=I.next(),!B.done;)if(!A.has(B.value))return!1;return!0},P.isSuperset=function(C,A){return P.isSubset(A,C)},P.add=function(C,A){for(var I=A.values(),B;B=I.next(),!B.done;)C.add(B.value)},P.subtract=function(C,A){for(var I=A.values(),B;B=I.next(),!B.done;)C.delete(B.value)},P.intersect=function(C,A){for(var I=C.values(),B;B=I.next(),!B.done;)A.has(B.value)||C.delete(B.value)},P.disjunct=function(C,A){for(var I=C.values(),B,G=[];B=I.next(),!B.done;)A.has(B.value)&&G.push(B.value);for(I=A.values();B=I.next(),!B.done;)C.has(B.value)||C.add(B.value);for(var v=0,m=G.length;vA.size&&(I=C,C=A,A=I),C.size===0)return 0;if(C===A)return C.size;for(var B=C.values(),G,v=0;G=B.next(),!G.done;)A.has(G.value)&&v++;return v},P.unionSize=function(C,A){var I=P.intersectionSize(C,A);return C.size+A.size-I},P.jaccard=function(C,A){var I=P.intersectionSize(C,A);if(I===0)return 0;var B=C.size+A.size-I;return I/B},P.overlap=function(C,A){var I=P.intersectionSize(C,A);return I===0?0:I/Math.min(C.size,A.size)}}),n1=Rt((P,C)=>{var A=Se(),I=Oe().getPointerArray;function B(G){var v=I(G);this.start=0,this.size=0,this.capacity=G,this.dense=new v(G),this.sparse=new v(G)}B.prototype.clear=function(){this.start=0,this.size=0},B.prototype.has=function(G){if(this.size===0)return!1;var v=this.sparse[G],m=v=this.start&&v=this.start&&v1?v:this;for(var m=this.capacity,t=this.size,a=this.start,c=0;c=m)return{done:!0};var c=G[t];return t++,a++,t===v&&(t=0),{value:c,done:!1}})},typeof Symbol<"u"&&(B.prototype[Symbol.iterator]=B.prototype.values),B.prototype.inspect=function(){var G=[];return this.forEach(function(v){G.push(v)}),Object.defineProperty(G,"constructor",{value:B,enumerable:!1}),G.capacity=this.capacity,G},typeof Symbol<"u"&&(B.prototype[Symbol.for("nodejs.util.inspect.custom")]=B.prototype.inspect),C.exports=B}),r1=Rt((P,C)=>{var A=Se(),I=Oe().getPointerArray;function B(G,v){arguments.length<2&&(v=G,G=Array);var m=I(v);this.size=0,this.length=v,this.dense=new m(v),this.sparse=new m(v),this.vals=new G(v)}B.prototype.clear=function(){this.size=0},B.prototype.has=function(G){var v=this.sparse[G];return v=this.size||this.dense[v]!==G?!1:(v=this.dense[this.size-1],this.dense[this.sparse[G]]=v,this.sparse[v]=this.sparse[G],this.size--,!0)},B.prototype.forEach=function(G,v){v=arguments.length>1?v:this;for(var m=0;m{var A=Se(),I=Oe().getPointerArray;function B(G){var v=I(G);this.size=0,this.length=G,this.dense=new v(G),this.sparse=new v(G)}B.prototype.clear=function(){this.size=0},B.prototype.has=function(G){var v=this.sparse[G];return v=this.size||this.dense[v]!==G?!1:(v=this.dense[this.size-1],this.dense[this.sparse[G]]=v,this.sparse[v]=this.sparse[G],this.size--,!0)},B.prototype.forEach=function(G,v){v=arguments.length>1?v:this;for(var m,t=0;t{var A=ae(),I=2,B=2,G=new Set([0,1,2]),v={0:"Returns only the top suggestion",1:"Returns suggestions with the smallest edit distance",2:"Returns every suggestion (no early termination)"};function m(e){var i=new Set;return typeof e=="number"&&i.add(e),{suggestions:i,count:0}}function t(e,i,h){return{term:e||"",distance:i||0,count:h||0}}function a(e,i,h,s){s=s||new Set,i++;var l,f=e.length,u;if(f>1)for(u=0;u0&&e[u].length-f.length>s.length-f.length&&(h.suggestions=new Set,h.count=0),(i===2||!h.suggestions.size||e[u].length-f.length>=s.length-f.length)&&h.suggestions.add(l)}function o(e,i){var h=e.length,s=i.length,l=[[]],f=h+s,u=new Map,d,p,g;for(l[0][0]=f,d=0;d<=h;d++)l[d+1]||(l[d+1]=[]),l[d+1][1]=d,l[d+1][0]=f;for(g=0;g<=s;g++)l[1][g+1]=g,l[0][g+1]=f;var y=e+i,x;for(d=0,p=y.length;dl)return[];for(var d=[f],p=new Set,g=new Set,y=[],x,T;d.length>0&&(x=d.shift(),!(h<2&&y.length>0&&u-x.length>y[0].distance));){if(T=e[x],T!==void 0){if(typeof T=="number"&&(T=m(T)),T.count>0&&!g.has(x)){g.add(x);var S=t(x,u-x.length,T.count);if(y.push(S),h<2&&u-x.length===0)break}T.suggestions.forEach(F=>{var O=i[F];if(!g.has(O)){g.add(O);var b=0;if(f!==O)if(O.length===x.length)b=u-x.length;else if(u===x.length)b=O.length-x.length;else{for(var N=0,V=0,K=O.length;N0||V>0?b=o(O.substr(N,K-N-V),f.substr(N,u-N-V)):b=o(O,f)}if(h<2&&y.length>0&&y[0].distance>b&&(y=[]),!(h<2&&y.length>0&&b>y[0].distance)&&b<=s){var $=e[O];$!==void 0&&y.push(t(O,b,$.count))}}})}if(u-x.length0&&u-x.length>=y[0].distance)continue;for(var M=0,w=x.length;Mthis.maxLength&&(this.maxLength=e.length)),i.count===1){var h=this.words.length;this.words.push(e);var s=a(e,0,this.maxDistance);s.forEach(l=>{var f=this.dictionary[l];f!==void 0?(typeof f=="number"&&(f=m(f),this.dictionary[l]=f),f.suggestions.has(h)||c(this.words,this.verbosity,f,e,h,l)):this.dictionary[l]=h})}return this.size++,this},n.prototype.search=function(e){return r(this.dictionary,this.words,this.verbosity,this.maxDistance,this.maxLength,e)},n.prototype.inspect=function(){var e=[];e.size=this.size,e.maxDistance=this.maxDistance,e.verbosity=this.verbosity,e.behavior=v[this.verbosity];for(var i in this.dictionary)typeof this.dictionary[i]=="object"&&this.dictionary[i].count&&e.push([i,this.dictionary[i].count]);return Object.defineProperty(e,"constructor",{value:n,enumerable:!1}),e},typeof Symbol<"u"&&(n.prototype[Symbol.for("nodejs.util.inspect.custom")]=n.prototype.inspect),n.from=function(e,i){var h=new n(i);return A(e,function(s){h.add(s)}),h},C.exports=n}),ku=Rt((P,C)=>{var A=ae(),I=Se(),B="\0";function G(v){this.mode=v===Array?"array":"string",this.clear()}G.prototype.clear=function(){this.root={},this.size=0},G.prototype.set=function(v,m){for(var t=this.root,a,c=0,o=v.length;c"u")return;if(B in m)return m[B]},G.prototype.delete=function(v){var m=this.root,t=null,a=null,c,o,r,n;for(r=0,n=v.length;r"u")return!1;t!==null?Object.keys(m).length>1&&(t=null,a=null):Object.keys(m).length<2&&(t=c,a=o)}return B in m?(this.size--,t?delete t[a]:delete m[B],!0):!1},G.prototype.has=function(v){for(var m=this.root,t,a=0,c=v.length;a"u")return!1;return B in m},G.prototype.find=function(v){var m=typeof v=="string",t=this.root,a=[],c,o,r;for(o=0,r=v.length;o"u")return a;for(var n=[t],e=[v],i;n.length;){v=e.pop(),t=n.pop();for(i in t){if(i===B){a.push([v,t[B]]);continue}n.push(t[i]),e.push(m?v+i:v.concat(i))}}return a},G.prototype.values=function(v){var m=this.root,t=[],a,c,o;if(v){for(c=0,o=v.length;c"u")return I.empty()}return t.push(m),new I(function(){for(var r,n=!1,e;t.length;){r=t.pop();for(e in r){if(e===B){n=!0;continue}t.push(r[e])}if(n)return{done:!1,value:r[B]}}return{done:!0}})},G.prototype.prefixes=function(v){var m=this.root,t=[],a=[],c,o,r,n=this.mode==="string";if(v){for(o=0,r=v.length;o"u")return I.empty()}else v=n?"":[];return t.push(m),a.push(v),new I(function(){for(var e,i,h=!1,s;t.length;){e=t.pop(),i=a.pop();for(s in e){if(s===B){h=!0;continue}t.push(e[s]),a.push(n?i+s:i.concat(s))}if(h)return{done:!1,value:i}}return{done:!0}})},G.prototype.keys=G.prototype.prefixes,G.prototype.entries=function(v){var m=this.root,t=[],a=[],c,o,r,n=this.mode==="string";if(v){for(o=0,r=v.length;o"u")return I.empty()}else v=n?"":[];return t.push(m),a.push(v),new I(function(){for(var e,i,h=!1,s;t.length;){e=t.pop(),i=a.pop();for(s in e){if(s===B){h=!0;continue}t.push(e[s]),a.push(n?i+s:i.concat(s))}if(h)return{done:!1,value:[i,e[B]]}}return{done:!0}})},typeof Symbol<"u"&&(G.prototype[Symbol.iterator]=G.prototype.entries),G.prototype.inspect=function(){for(var v=new Array(this.size),m=this.entries(),t,a=0;t=m.next(),!t.done;)v[a++]=t.value;return Object.defineProperty(v,"constructor",{value:G,enumerable:!1}),v},typeof Symbol<"u"&&(G.prototype[Symbol.for("nodejs.util.inspect.custom")]=G.prototype.inspect),G.prototype.toJSON=function(){return this.root},G.from=function(v){var m=new G;return A(v,function(t,a){m.set(a,t)}),m},G.SENTINEL=B,C.exports=G}),h1=Rt((P,C)=>{var A=ae(),I=ku(),B="\0";function G(m){this.mode=m===Array?"array":"string",this.clear()}for(v in I.prototype)G.prototype[v]=I.prototype[v];var v;delete G.prototype.set,delete G.prototype.get,delete G.prototype.values,delete G.prototype.entries,G.prototype.add=function(m){for(var t=this.root,a,c=0,o=m.length;c"u")return c;for(var e=[a],i=[m],h;e.length;){m=i.pop(),a=e.pop();for(h in a){if(h===B){c.push(m);continue}e.push(a[h]),i.push(t?m+h:m.concat(h))}}return c},typeof Symbol<"u"&&(G.prototype[Symbol.iterator]=G.prototype.keys),G.prototype.inspect=function(){for(var m=new Set,t=this.keys(),a;a=t.next(),!a.done;)m.add(a.value);return Object.defineProperty(m,"constructor",{value:G,enumerable:!1}),m},typeof Symbol<"u"&&(G.prototype[Symbol.for("nodejs.util.inspect.custom")]=G.prototype.inspect),G.prototype.toJSON=function(){return this.root},G.from=function(m){var t=new G;return A(m,function(a){t.add(a)}),t},G.SENTINEL=B,C.exports=G}),l1=Rt((P,C)=>{var A=Se(),I=ae(),B=Ue(),G=Oe(),v=function(c){return Math.max(1,Math.ceil(c*1.5))},m=function(c){var o=G.getPointerArray(c);return new o(c)};function t(c,o){if(arguments.length<1)throw new Error("mnemonist/vector: expecting at least a byte array constructor.");var r=o||0,n=v,e=0,i=!1;typeof o=="object"&&(r=o.initialCapacity||0,e=o.initialLength||0,n=o.policy||n,i=o.factory===!0),this.factory=i?c:null,this.ArrayClass=c,this.length=e,this.capacity=Math.max(e,r),this.policy=n,this.array=new c(this.capacity)}t.prototype.set=function(c,o){if(this.lengththis.capacity)if(this.factory===null?this.array=new this.ArrayClass(c):this.array=this.factory(c),G.isTypedArray(this.array))this.array.set(o,0);else for(var r=0,n=this.length;r=c)return this;for(o=this.capacity;o=o)return{done:!0};var n=c[r];return r++,{value:n,done:!1}})},t.prototype.entries=function(){var c=this.array,o=this.length,r=0;return new A(function(){if(r>=o)return{done:!0};var n=c[r];return{value:[r++,n],done:!1}})},typeof Symbol<"u"&&(t.prototype[Symbol.iterator]=t.prototype.values),t.prototype.inspect=function(){var c=this.array.slice(0,this.length);return c.type=this.array.constructor.name,c.items=this.length,c.capacity=this.capacity,Object.defineProperty(c,"constructor",{value:t,enumerable:!1}),c},typeof Symbol<"u"&&(t.prototype[Symbol.for("nodejs.util.inspect.custom")]=t.prototype.inspect),t.from=function(c,o,r){if(arguments.length<3&&(r=B.guessLength(c),typeof r!="number"))throw new Error("mnemonist/vector.from: could not guess iterable length. Please provide desired capacity as last argument.");var n=new t(o,r);return I(c,function(e){n.push(e)}),n};function a(c){var o=function(n){t.call(this,c,n)};for(var r in t.prototype)t.prototype.hasOwnProperty(r)&&(o.prototype[r]=t.prototype[r]);return o.from=function(n,e){return t.from(n,c,e)},typeof Symbol<"u"&&(o.prototype[Symbol.iterator]=o.prototype.values),o}t.Int8Vector=a(Int8Array),t.Uint8Vector=a(Uint8Array),t.Uint8ClampedVector=a(Uint8ClampedArray),t.Int16Vector=a(Int16Array),t.Uint16Vector=a(Uint16Array),t.Int32Vector=a(Int32Array),t.Uint32Vector=a(Uint32Array),t.Float32Vector=a(Float32Array),t.Float64Vector=a(Float64Array),t.PointerVector=a(m),C.exports=t}),u1=Rt((P,C)=>{var A=Ue(),I=Oe(),B=ju().inplaceQuickSortIndices,G=Ju().lowerBoundIndices,v=co(),m=I.getPointerArray;function t(o,r){return o.distancer.distance?-1:0}function a(o,r,n){for(var e=n.length,i=m(e),h=0,s=new i(e),l=new i(e),f=new i(e),u=new Float64Array(e),d=[0,0,e],p=new Float64Array(e),g,y,x,T,S,M,w,L,F;d.length;)if(S=d.pop(),T=d.pop(),g=d.pop(),y=n[S-1],S--,F=S-T,s[g]=y,F!==0){if(F===1){w=o(r[y],r[n[T]]),u[g]=w,h++,f[g]=h,s[h]=n[T];continue}for(L=T;L0&&(h++,f[g]=h,d.push(h,M,S)),M-T>0&&(h++,l[g]=h,d.push(h,T,M))}return{nodes:s,lefts:l,rights:f,mus:u}}function c(o,r){if(typeof o!="function")throw new Error("mnemonist/VPTree.constructor: given `distance` must be a function.");if(!r)throw new Error("mnemonist/VPTree.constructor: you must provide items to the tree. A VPTree cannot be updated after its creation.");this.distance=o,this.heap=new v(t),this.D=0;var n=A.toArrayWithIndices(r);this.items=n[0];var e=n[1];this.size=e.length;var i=a(o,this.items,e);this.nodes=i.nodes,this.lefts=i.lefts,this.rights=i.rights,this.mus=i.mus}c.prototype.nearestNeighbors=function(o,r){var n=this.heap,e=[0],i=1/0,h,s,l,f,u,d,p;for(this.D=0;e.length;)h=e.pop(),s=this.nodes[h],l=this.items[s],p=this.distance(l,r),this.D++,po&&n.pop(),n.size>=o&&(i=n.peek().distance)),f=this.lefts[h],u=this.rights[h],!(!f&&!u)&&(d=this.mus[h],p=d-i&&e.push(u)):(u&&p>=d-i&&e.push(u),f&&p=0;y--)g[y]=n.pop();return g},c.prototype.neighbors=function(o,r){var n=[],e=[0],i,h,s,l,f,u,d;for(this.D=0;e.length;)i=e.pop(),h=this.nodes[i],s=this.items[h],d=this.distance(s,r),this.D++,d<=o&&n.push({distance:d,item:s}),l=this.lefts[i],f=this.rights[i],!(!l&&!f)&&(u=this.mus[i],d=u-o&&e.push(f)):(f&&d>=u-o&&e.push(f),l&&d{var A=co(),I=vo(),B=Dy();C.exports={BiMap:Iy(),BitSet:By(),BitVector:by(),BloomFilter:Ny(),BKTree:zy(),CircularBuffer:Uy(),DefaultMap:Xy(),DefaultWeakMap:Vy(),FixedDeque:Ku(),StaticDisjointSet:Wy(),FibonacciHeap:I,MinFibonacciHeap:I.MinFibonacciHeap,MaxFibonacciHeap:I.MaxFibonacciHeap,FixedReverseHeap:po(),FuzzyMap:Yy(),FuzzyMultiMap:Hy(),HashedArrayTree:Ky(),Heap:A,MinHeap:A.MinHeap,MaxHeap:A.MaxHeap,StaticIntervalTree:$y(),InvertedIndex:Jy(),KDTree:jy(),LinkedList:Qy(),LRUCache:go(),LRUCacheWithDelete:ky(),LRUMap:Qu(),LRUMapWithDelete:qy(),MultiMap:$u(),MultiSet:_y(),PassjoinIndex:t1(),Queue:e1(),FixedStack:Zu(),Stack:i1(),SuffixArray:B,GeneralizedSuffixArray:B.GeneralizedSuffixArray,Set:s1(),SparseQueueSet:n1(),SparseMap:r1(),SparseSet:a1(),SymSpell:o1(),Trie:h1(),TrieMap:ku(),Vector:l1(),VPTree:u1()}}),ut=class de{static get ZERO(){return new de(0,0)}static get ONE(){return new de(1,1)}static get UP(){return new de(0,-1)}static get DOWN(){return new de(0,1)}static get LEFT(){return new de(-1,0)}static get RIGHT(){return new de(1,0)}static get UP_LEFT(){return new de(-1,-1)}static get UP_RIGHT(){return new de(1,-1)}static get DOWN_RIGHT(){return new de(1,1)}static get DOWN_LEFT(){return new de(-1,1)}constructor(C,A){typeof C=="number"?(this.x=C,this.y=A||0):(this.x=C.x,this.y=C.y)}clone(){return new de(this.x,this.y)}add(C){return new de(this.x+C.x,this.y+C.y)}multiply(C){return new de(this.x*C.x,this.y*C.y)}divide(C){return new de(this.x/C.x,this.y/C.y)}subtract(C){return new de(this.x-C.x,this.y-C.y)}equals(C){return this.x===C.x&&this.y===C.y}abs(){return new de(Math.abs(this.x),Math.abs(this.y))}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}modulo(C){return new de(this.x%C.x,this.y%C.y)}scalarModulo(C){return new de(this.x%C,this.y%C)}scalarMult(C){return new de(this.x*C,this.y*C)}toPosition(){return{x:this.x,y:this.y}}toString(){return`${this.x}#${this.y}`}},Nt=class{static equal(P,C){return P.position.x===C.position.x&&P.position.y===C.position.y&&P.layer===C.layer}static copyOver(P,C){C.position.x=P.position.x,C.position.y=P.position.y,C.layer=P.layer}static clone(P){return{position:P.position.clone(),layer:P.layer}}static toString(P){return`${P.position.toString()}#${P.layer}`}static toInternal(P){return{position:new ut(P.position.x,P.position.y),layer:P.charLayer}}static fromInternal(P){return{position:P.position.toPosition(),charLayer:P.layer}}},d1=(P=>(P.NONE="none",P.LEFT="left",P.UP_LEFT="up-left",P.UP="up",P.UP_RIGHT="up-right",P.RIGHT="right",P.DOWN_RIGHT="down-right",P.DOWN="down",P.DOWN_LEFT="down-left",P))(d1||{}),v1={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"},c1={up:ut.UP,down:ut.DOWN,left:ut.LEFT,right:ut.RIGHT,none:ut.ZERO,"up-left":ut.UP_LEFT,"up-right":ut.UP_RIGHT,"down-right":ut.DOWN_RIGHT,"down-left":ut.DOWN_LEFT},Qn={up:0,"up-right":1,right:2,"down-right":3,down:4,"down-left":5,left:6,"up-left":7,none:NaN},qu=["up","up-right","right","down-right","down","down-left","left","up-left"],p1=["down-left","down-right","up-right","up-left"];function mo(){return["up","down","left","right","none","up-left","up-right","down-right","down-left"]}function Us(P){return p1.includes(P)}function g1(P,C=1){return P==="none"?"none":qu[(Qn[P]+8-Math.abs(C)%8)%8]}function _u(P,C=1){return P==="none"?"none":qu[(Qn[P]+C)%8]}function ji(P){return c1[P]}function m1(P){return v1[P]}function je(P,C){if(P.x===C.x){if(P.y>C.y)return"up";if(P.yC.x)return"left";if(P.xC.x){if(P.yC.y)return"up-left"}else if(P.xC.y)return"up-right"}return"none"}var x1=(P=>(P[P.FOUR=4]="FOUR",P[P.EIGHT=8]="EIGHT",P))(x1||{});function ds(P){return typeof P=="string"&&mo().includes(P)}var Ka=function(P,C){return Ka=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(A,I){A.__proto__=I}||function(A,I){for(var B in I)Object.prototype.hasOwnProperty.call(I,B)&&(A[B]=I[B])},Ka(P,C)};function Zs(P,C){if(typeof C!="function"&&C!==null)throw new TypeError("Class extends value "+String(C)+" is not a constructor or null");Ka(P,C);function A(){this.constructor=P}P.prototype=C===null?Object.create(C):(A.prototype=C.prototype,new A)}function y1(P,C,A,I){function B(G){return G instanceof A?G:new A(function(v){v(G)})}return new(A||(A=Promise))(function(G,v){function m(c){try{a(I.next(c))}catch(o){v(o)}}function t(c){try{a(I.throw(c))}catch(o){v(o)}}function a(c){c.done?G(c.value):B(c.value).then(m,t)}a((I=I.apply(P,C||[])).next())})}function tf(P,C){var A={label:0,sent:function(){if(G[0]&1)throw G[1];return G[1]},trys:[],ops:[]},I,B,G,v;return v={next:m(0),throw:m(1),return:m(2)},typeof Symbol=="function"&&(v[Symbol.iterator]=function(){return this}),v;function m(a){return function(c){return t([a,c])}}function t(a){if(I)throw new TypeError("Generator is already executing.");for(;v&&(v=0,a[0]&&(A=0)),A;)try{if(I=1,B&&(G=a[0]&2?B.return:a[0]?B.throw||((G=B.return)&&G.call(B),0):B.next)&&!(G=G.call(B,a[1])).done)return G;switch(B=0,G&&(a=[a[0]&2,G.value]),a[0]){case 0:case 1:G=a;break;case 4:return A.label++,{value:a[1],done:!1};case 5:A.label++,B=a[1],a=[0];continue;case 7:a=A.ops.pop(),A.trys.pop();continue;default:if(G=A.trys,!(G=G.length>0&&G[G.length-1])&&(a[0]===6||a[0]===2)){A=0;continue}if(a[0]===3&&(!G||a[1]>G[0]&&a[1]=P.length&&(P=void 0),{value:P&&P[I++],done:!P}}};throw new TypeError(C?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ys(P,C){var A=typeof Symbol=="function"&&P[Symbol.iterator];if(!A)return P;var I=A.call(P),B,G=[],v;try{for(;(C===void 0||C-- >0)&&!(B=I.next()).done;)G.push(B.value)}catch(m){v={error:m}}finally{try{B&&!B.done&&(A=I.return)&&A.call(I)}finally{if(v)throw v.error}}return G}function Hs(P,C,A){if(A||arguments.length===2)for(var I=0,B=C.length,G;I1||m(r,n)})})}function m(r,n){try{t(I[r](n))}catch(e){o(G[0][3],e)}}function t(r){r.value instanceof cs?Promise.resolve(r.value.v).then(a,c):o(G[0][2],r)}function a(r){m("next",r)}function c(r){m("throw",r)}function o(r,n){r(n),G.shift(),G.length&&m(G[0][0],G[0][1])}}function S1(P){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var C=P[Symbol.asyncIterator],A;return C?C.call(P):(P=typeof xs=="function"?xs(P):P[Symbol.iterator](),A={},I("next"),I("throw"),I("return"),A[Symbol.asyncIterator]=function(){return this},A);function I(G){A[G]=P[G]&&function(v){return new Promise(function(m,t){v=P[G](v),B(m,t,v.done,v.value)})}}function B(G,v,m,t){Promise.resolve(t).then(function(a){G({value:a,done:m})},v)}}function pe(P){return typeof P=="function"}function ef(P){var C=function(I){Error.call(I),I.stack=new Error().stack},A=P(C);return A.prototype=Object.create(Error.prototype),A.prototype.constructor=A,A}var Ga=ef(function(P){return function(C){P(this),this.message=C?C.length+` errors occurred during unsubscription: +`+C.map(function(A,I){return I+1+") "+A.toString()}).join(` + `):"",this.name="UnsubscriptionError",this.errors=C}});function $a(P,C){if(P){var A=P.indexOf(C);0<=A&&P.splice(A,1)}}var Tr=function(){function P(C){this.initialTeardown=C,this.closed=!1,this._parentage=null,this._finalizers=null}return P.prototype.unsubscribe=function(){var C,A,I,B,G;if(!this.closed){this.closed=!0;var v=this._parentage;if(v)if(this._parentage=null,Array.isArray(v))try{for(var m=xs(v),t=m.next();!t.done;t=m.next()){var a=t.value;a.remove(this)}}catch(i){C={error:i}}finally{try{t&&!t.done&&(A=m.return)&&A.call(m)}finally{if(C)throw C.error}}else v.remove(this);var c=this.initialTeardown;if(pe(c))try{c()}catch(i){G=i instanceof Ga?i.errors:[i]}var o=this._finalizers;if(o){this._finalizers=null;try{for(var r=xs(o),n=r.next();!n.done;n=r.next()){var e=n.value;try{fu(e)}catch(i){G=G??[],i instanceof Ga?G=Hs(Hs([],Ys(G)),Ys(i.errors)):G.push(i)}}}catch(i){I={error:i}}finally{try{n&&!n.done&&(B=r.return)&&B.call(r)}finally{if(I)throw I.error}}}if(G)throw new Ga(G)}},P.prototype.add=function(C){var A;if(C&&C!==this)if(this.closed)fu(C);else{if(C instanceof P){if(C.closed||C._hasParent(this))return;C._addParent(this)}(this._finalizers=(A=this._finalizers)!==null&&A!==void 0?A:[]).push(C)}},P.prototype._hasParent=function(C){var A=this._parentage;return A===C||Array.isArray(A)&&A.includes(C)},P.prototype._addParent=function(C){var A=this._parentage;this._parentage=Array.isArray(A)?(A.push(C),A):A?[A,C]:C},P.prototype._removeParent=function(C){var A=this._parentage;A===C?this._parentage=null:Array.isArray(A)&&$a(A,C)},P.prototype.remove=function(C){var A=this._finalizers;A&&$a(A,C),C instanceof P&&C._removeParent(this)},P.EMPTY=function(){var C=new P;return C.closed=!0,C}(),P}(),sf=Tr.EMPTY;function nf(P){return P instanceof Tr||P&&"closed"in P&&pe(P.remove)&&pe(P.add)&&pe(P.unsubscribe)}function fu(P){pe(P)?P():P.unsubscribe()}var rf={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},C1={setTimeout:function(P,C){for(var A=[],I=2;I0},enumerable:!1,configurable:!0}),C.prototype._trySubscribe=function(A){return this._throwIfClosed(),P.prototype._trySubscribe.call(this,A)},C.prototype._subscribe=function(A){return this._throwIfClosed(),this._checkFinalizedStatuses(A),this._innerSubscribe(A)},C.prototype._innerSubscribe=function(A){var I=this,B=this,G=B.hasError,v=B.isStopped,m=B.observers;return G||v?sf:(this.currentObservers=null,m.push(A),new Tr(function(){I.currentObservers=null,$a(m,A)}))},C.prototype._checkFinalizedStatuses=function(A){var I=this,B=I.hasError,G=I.thrownError,v=I.isStopped;B?A.error(G):v&&A.complete()},C.prototype.asObservable=function(){var A=new Qe;return A.source=this,A},C.create=function(A,I){return new vu(A,I)},C}(Qe),vu=function(P){Zs(C,P);function C(A,I){var B=P.call(this)||this;return B.destination=A,B.source=I,B}return C.prototype.next=function(A){var I,B;(B=(I=this.destination)===null||I===void 0?void 0:I.next)===null||B===void 0||B.call(I,A)},C.prototype.error=function(A){var I,B;(B=(I=this.destination)===null||I===void 0?void 0:I.error)===null||B===void 0||B.call(I,A)},C.prototype.complete=function(){var A,I;(I=(A=this.destination)===null||A===void 0?void 0:A.complete)===null||I===void 0||I.call(A)},C.prototype._subscribe=function(A){var I,B;return(B=(I=this.source)===null||I===void 0?void 0:I.subscribe(A))!==null&&B!==void 0?B:sf},C}(re),lf=new Qe(function(P){return P.complete()});function I1(P){return P&&pe(P.schedule)}function uf(P){return P[P.length-1]}function ff(P){return I1(uf(P))?P.pop():void 0}function df(P,C){return typeof uf(P)=="number"?P.pop():C}var vf=function(P){return P&&typeof P.length=="number"&&typeof P!="function"};function cf(P){return pe(P?.then)}function pf(P){return pe(P[yo])}function gf(P){return Symbol.asyncIterator&&pe(P?.[Symbol.asyncIterator])}function mf(P){return new TypeError("You provided "+(P!==null&&typeof P=="object"?"an invalid object":"'"+P+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function B1(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var xf=B1();function yf(P){return pe(P?.[xf])}function Tf(P){return T1(this,arguments,function(){var C,A,I,B;return tf(this,function(G){switch(G.label){case 0:C=P.getReader(),G.label=1;case 1:G.trys.push([1,,9,10]),G.label=2;case 2:return[4,cs(C.read())];case 3:return A=G.sent(),I=A.value,B=A.done,B?[4,cs(void 0)]:[3,5];case 4:return[2,G.sent()];case 5:return[4,cs(I)];case 6:return[4,G.sent()];case 7:return G.sent(),[3,2];case 8:return[3,10];case 9:return C.releaseLock(),[7];case 10:return[2]}})})}function Sf(P){return pe(P?.getReader)}function ki(P){if(P instanceof Qe)return P;if(P!=null){if(pf(P))return b1(P);if(vf(P))return G1(P);if(cf(P))return N1(P);if(gf(P))return Cf(P);if(yf(P))return z1(P);if(Sf(P))return U1(P)}throw mf(P)}function b1(P){return new Qe(function(C){var A=P[yo]();if(pe(A.subscribe))return A.subscribe(C);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function G1(P){return new Qe(function(C){for(var A=0;A{let B=this.tilePosInDirection(new ut(A,I),P);return this.tilemap.hasBlockingTile(B,C,m1(P),this.ignoreMissingTiles)})}isCharBlocking(P,C){return this.someCharTile((A,I)=>{let B=this.tilePosInDirection(new ut(A,I),P);return this.tilemap.hasBlockingChar(B,C,this.getCollisionGroups(),new Set([this.getId()]),this.ignoreCollisionGroups)})}isMoving(){return this.movementDirection!="none"}turnTowards(P){this.isMoving()||P!="none"&&this.changeFacingDirection(P)}changeFacingDirection(P){this.facingDirection!==P&&(this.facingDirection=P,this.directionChanged$.next(P))}getFacingDirection(){return this.facingDirection}getFacingPosition(){return this._tilePos.position.add(ji(this.facingDirection))}addCollisionGroup(P){this.collisionGroups.add(P)}setCollisionGroups(P){this.collisionGroups=new Set(P)}setIgnoreCollisionGroups(P){this.ignoreCollisionGroups=new Set(P)}getCollisionGroups(){return Array.from(this.collisionGroups)}getIgnoreCollisionGroups(){return Array.from(this.ignoreCollisionGroups)}hasCollisionGroup(P){return this.collisionGroups.has(P)}removeCollisionGroup(P){this.collisionGroups.delete(P)}removeAllCollisionGroups(){this.collisionGroups.clear()}addLabels(P){for(let C of P)this.labels.add(C)}getLabels(){return[...this.labels.values()]}hasLabel(P){return this.labels.has(P)}clearLabels(){this.labels.clear()}removeLabels(P){for(let C of P)this.labels.delete(C)}getNumberOfDirections(){return this.numberOfDirections}movementStarted(){return this.movementStarted$}movementStopped(){return this.movementStopped$}directionChanged(){return this.directionChanged$}tilePositionSet(){return this.tilePositionSet$}positionChangeStarted(){return this.positionChangeStarted$}positionChangeFinished(){return this.positionChangeFinished$}autoMovementSet(){return this.autoMovementSet$}depthChanged(){return this.depthChanged$}getMovementProgress(){return this.movementProgress}setMovementProgress(P){let C=Math.max(0,Math.min($i,P));this.movementProgress=C}hasWalkedHalfATile(){return this.movementProgress>$i/2}willCrossTileBorderThisUpdate(P){return this.movementProgress+this.maxProgressForDelta(P)>=$i}updateCharacterPosition(P){let C=this.willCrossTileBorderThisUpdate(P),A=1-(C?$i-this.movementProgress:this.maxProgressForDelta(P))/this.maxProgressForDelta(P);this.movementProgress=Math.min(this.movementProgress+this.maxProgressForDelta(P),$i),C&&(this.movementProgress=0,this.shouldContinueMoving()?(this.fire(this.positionChangeFinished$,this.tilePos,this.getNextTilePos()),this.tilePos=this.getNextTilePos(),this.startMoving(this.lastMovementImpulse),A>0&&this.updateCharacterPosition(P*A)):this.stopMoving())}maxProgressForDelta(P){let C=P/1e3;return Math.floor(C*this.speed*$i)}get tilePos(){return Nt.clone(this._tilePos)}set tilePos(P){Nt.copyOver(P,this._tilePos)}startMoving(P){P!=="none"&&(P!=this.movementDirection&&this.movementStarted$.next(P),this.movementDirection=P,this.facingDirection=P,this.fire(this.positionChangeStarted$,this.tilePos,this.getNextTilePos()))}tilePosInDirection(P,C){return P.add(ji(this.tilemap.toMapDirection(C)))}shouldContinueMoving(){return this.lastMovementImpulse!=="none"&&!this.isBlockingDirection(this.lastMovementImpulse)}stopMoving(){if(this.movementDirection==="none")return;let P=this.tilePos,C=this.getNextTilePos(),A=this.movementDirection;this.tilePos=this.getNextTilePos(),this.movementDirection="none",this.movementStopped$.next(A),this.fire(this.positionChangeFinished$,P,C)}fire(P,{position:C,layer:A},{position:I,layer:B}){P.next({exitTile:C,enterTile:I,exitLayer:A,enterLayer:B})}someCharTile(P){let C=this.getNextTilePos().position;for(let A=C.x;Athis.isLayerAlwaysOnTop(B));this.tilemap.layers.filter(B=>!this.isLayerAlwaysOnTop(B)).forEach(B=>{this.hasLayerProp(B,Zi.HEIGHT_SHIFT_PROP_NAME)?(this.createHeightShiftLayers(B,A),C.push(B.tilemapLayer)):this.setDepth(B,++A)}),this.charLayerDepths.set(void 0,A),I.forEach((B,G)=>{B.tilemapLayer.setDepth(G+1+A)}),C.forEach(B=>B.destroy())}setDepth(C,A){C.tilemapLayer.setDepth(A),this.isCharLayer(C)&&this.charLayerDepths.set(this.getLayerProp(C,Zi.CHAR_LAYER_PROP_NAME),A)}createHeightShiftLayers(C,A){let I=this.getLayerProp(C,Zi.HEIGHT_SHIFT_PROP_NAME);isNaN(I)&&(I=0);let B=1;for(let G=0;GB.name==A);return I?.value}hasLayerProp(C,A){return this.getLayerProp(C,A)!=null}copyLayer(C,A){let I=`${C.name}#${A}`,B=this.tilemap.createBlankLayer(I,C.tilemapLayer.tileset);if(B){if(B.name=I,this.isIsometric())for(let G=A;G>=0;G--){let v=A-G;B.putTileAt(C.data[G][v],v,G)}else for(let G=0;Gm===this.charData.id)).subscribe(({direction:m})=>{var t;(t=this.animation)==null||t.setStandingFrame(m)}),this.sprite&&(this.sprite.setOrigin(0,0),this.resetAnimation(this.sprite),this.updateOverlaySprite(),this.updateGridChar())}destroy(){this.destroy$.next(),this.destroy$.complete(),this.newSpriteSet$.complete()}setSprite(P){P?(this.sprite&&(P.x=this.sprite.x,P.y=this.sprite.y),this.sprite=P,this.newSpriteSet$.next(),this.layerOverlaySprite=this.layerOverlaySprite?this.scene.add.sprite(0,0,this.sprite.texture):void 0,this.updateOverlaySprite(),this.resetAnimation(this.sprite),this.updateDepth()):(this.layerOverlaySprite=void 0,this.sprite=void 0)}getSprite(){return this.sprite}getLayerOverlaySprite(){return this.layerOverlaySprite}setContainer(P){var C;this.container=P,this.cachedContainerHeight=(C=P?.getBounds().height)!=null?C:0}getContainer(){return this.container}getOffsetX(){return this.customOffset.x}setOffsetX(P){this.customOffset.x=P}getOffsetY(){return this.customOffset.y}setOffsetY(P){this.customOffset.y=P}getWalkingAnimationMapping(){return this.walkingAnimationMapping}turnTowards(P){var C;this.geHeadless.isMoving(this.charData.id)||P!="none"&&(this.geHeadless.turnTowards(this.charData.id,P),(C=this.animation)==null||C.setStandingFrame(P))}getAnimation(){return this.animation}setAnimation(P){this.animation=P}update(P){this.updateGridChar()}getEngineOffset(){var P,C,A,I;if(!this.sprite)return ut.ZERO;let B=this.tilemap.getTileWidth()/2-Math.floor(((C=(P=this.sprite)==null?void 0:P.displayWidth)!=null?C:0)/2),G=-((I=(A=this.sprite)==null?void 0:A.displayHeight)!=null?I:0)+this.tilemap.getTileHeight();return new ut(B,G)}updatePixelPos(){let P=new ut(this.geHeadless.getPosition(this.charData.id)),C=this.geHeadless.getMovementProgress(this.charData.id)/1e3,A=this.tilemap.tilePosToPixelPos(P).add(this.getEngineOffset()).add(this.customOffset).add(ji(this.geHeadless.getFacingDirection(this.charData.id)).multiply(this.tilemap.getTileDistance(this.geHeadless.getFacingDirection(this.charData.id)).scalarMult(C))),I=this.getGameObj();I&&(I.x=Math.floor(A.x),I.y=Math.floor(A.y))}getGameObj(){return this.container||this.sprite}updateGridChar(){var P;if(this.updatePixelPos(),this.sprite&&this.geHeadless.isMoving(this.charData.id)){let C=this.geHeadless.getMovementProgress(this.charData.id)>$i/2;(P=this.getAnimation())==null||P.updateCharacterFrame(this.geHeadless.getFacingDirection(this.charData.id),C,Number(this.sprite.frame.name))}this.updateDepth()}resetAnimation(P){let C=new cu(this.walkingAnimationMapping,P.texture.source[0].width/P.width/cu.FRAMES_CHAR_ROW);this.setAnimation(C),C.frameChange().pipe(Je(this.newSpriteSet$)).subscribe(A=>{P?.setFrame(A)}),C.setIsEnabled(this.walkingAnimationMapping!==void 0),C.setStandingFrame(this.geHeadless.getFacingDirection(this.charData.id))}updateOverlaySprite(){if(!this.layerOverlaySprite||!this.sprite)return;this.layerOverlaySprite.scale=this.sprite.scale;let P=this.tilemap.getTileHeight()/this.layerOverlaySprite.scale;this.layerOverlaySprite.setCrop(0,0,this.layerOverlaySprite.displayWidth,this.sprite.height-P),this.layerOverlaySprite.setOrigin(0,0)}updateDepth(){if(!this.getGameObj())return;let P=new ut(this.geHeadless.getPosition(this.charData.id)),C=this.geHeadless.getCharLayer(this.charData.id);this.container?this.setContainerDepth(this.container,{position:P,layer:C}):this.sprite&&this.setSpriteDepth(this.sprite,{position:P,layer:C});let A=this.getLayerOverlaySprite();if(A){let I=new ut(Bi(se({},P),{y:P.y-1}));this.setSpriteDepth(A,{position:I,layer:C})}}setSpriteDepth(P,C){P.setDepth(this.tilemap.getDepthOfCharLayer(this.getTransitionLayer(C))+this.getPaddedPixelDepthSprite(P))}setContainerDepth(P,C){P.setDepth(this.tilemap.getDepthOfCharLayer(this.getTransitionLayer(C))+this.getPaddedPixelDepthContainer(P))}getPaddedPixelDepthContainer(P){return Qa.shiftPad(P.y+this.cachedContainerHeight,qa.Z_INDEX_PADDING)}getPaddedPixelDepthSprite(P){return Qa.shiftPad(P.y+P.displayHeight,qa.Z_INDEX_PADDING)}getTransitionLayer(P){if(P.layer)return this.geHeadless.getTransition(P.position,P.layer)||P.layer}},eT=(P=>(P.DONT_BLOCK="DONT_BLOCK",P.BLOCK_TWO_TILES="BLOCK_TWO_TILES",P.BLOCK_ONE_TILE_AHEAD="BLOCK_ONE_TILE_AHEAD",P.BLOCK_ONE_TILE_BEHIND="BLOCK_ONE_TILE_BEHIND",P))(eT||{}),Ff=(P=>(P.STOP="STOP",P.CLOSEST_REACHABLE="CLOSEST_REACHABLE",P.RETRY="RETRY",P.ALTERNATIVE_TARGETS="ALTERNATIVE_TARGETS",P))(Ff||{}),iT=class{distance(P,C){return ni.manhattanDistance(P,C)}direction(P,C){if(ni.equal(P,C))return"none";let A=P.clone().subtract(C);return Math.abs(A.x)>Math.abs(A.y)?A.x>0?"left":"right":A.y>0?"up":"down"}neighbors(P){return[new ut(P.x,P.y+1),new ut(P.x+1,P.y),new ut(P.x-1,P.y),new ut(P.x,P.y-1)]}getDirections(){return["up","right","down","left"]}},sT=class{distance(P,C){return ni.chebyshevDistance(P,C)}neighbors(P){let C=[new ut(P.x,P.y+1),new ut(P.x+1,P.y),new ut(P.x-1,P.y),new ut(P.x,P.y-1)],A=[new ut(P.x+1,P.y+1),new ut(P.x+1,P.y-1),new ut(P.x-1,P.y+1),new ut(P.x-1,P.y-1)];return[...C,...A]}direction(P,C){return C.x>P.x?C.y>P.y?"down-right":C.yP.y?"down-left":C.yP.y?"down":"none"}getDirections(){return["up","right","down","left","down-left","down-right","up-right","up-left"]}},Ks=class{static create(P){switch(P){case 4:return new iT;case 8:return new sT}}},pu=class{constructor(P,C,A){this.backoffMs=P,this.maxRetries=C,this.onFinished=A,this.retries=0,this.elapsed=0}retry(P,C){this.shouldRetry()?(this.elapsed+=P,this.elapsed>=this.backoffMs&&(this.elapsed=0,this.retries++,C())):this.onFinished()}reset(){this.retries=0,this.elapsed=0}getMaxRetries(){return this.maxRetries}getBackoffMs(){return this.backoffMs}shouldRetry(){return this.maxRetries===-1||this.retries(P.WAIT="WAIT",P.RETRY="RETRY",P.STOP="STOP",P))(Lf||{}),Sr=class{constructor(P,{shortestPathAlgorithm:C="BFS",pathWidth:A=1,pathHeight:I=1,numberOfDirections:B=4,isPositionAllowed:G=(i,h)=>!0,collisionGroups:v=[],ignoredChars:m=[],ignoreTiles:t=!1,ignoreMapBounds:a=!1,ignoreBlockedTarget:c=!1,maxPathLength:o=1/0,ignoreLayers:r=!1,considerCosts:n=!1,calculateClosestToTarget:e=!0}={}){this.gridTilemap=P,this.options={shortestPathAlgorithm:C,pathWidth:A,pathHeight:I,numberOfDirections:B,isPositionAllowed:G,collisionGroups:v,ignoredChars:m,ignoreTiles:t,ignoreMapBounds:a,ignoreBlockedTarget:c,maxPathLength:o,ignoreLayers:r,considerCosts:n,calculateClosestToTarget:e},this.ignoredCharsSet=new Set(m)}findShortestPath(P,C){this.options.ignoreLayers&&(this.gridTilemap.fixCacheLayer(P.layer),C.layer=P.layer);let A=this.findShortestPathImpl(P,C);return this.gridTilemap.unfixCacheLayers(),A}getNeighbors(P,C){var A;return Ks.create((A=this.options.numberOfDirections)!=null?A:4).neighbors(P.position).map(I=>{let B=P.layer;return this.options.ignoreLayers||(B=this.gridTilemap.getTransition(I,P.layer)),{position:I,layer:B||P.layer}}).filter(I=>!this.isBlocking(P,I)||this.options.ignoreBlockedTarget&&Nt.equal(I,C))}getTransition(P,C){if(!this.options.ignoreLayers)return this.gridTilemap.getTransition(P,C)}getCosts(P,C){if(!this.options.considerCosts)return 1;let A=je(C.position,P);return this.gridTilemap.getTileCosts(C,A)}isBlocking(P,C){return!(this.options.ignoreMapBounds||this.gridTilemap.isInRange(C.position))||!this.options.isPositionAllowed(C.position,C.layer)||!this.options.ignoreTiles&&this.hasBlockingTileFrom(P,C,this.options.pathWidth,this.options.pathHeight,this.options.ignoreMapBounds,this.gridTilemap)?!0:this.hasBlockingCharFrom(P,C,this.options.pathWidth,this.options.pathHeight,this.options.collisionGroups,this.ignoredCharsSet,this.gridTilemap)}distance(P,C){return(this.options.numberOfDirections===4?ni.manhattanDistance:ni.chebyshevDistance)(P,C)}getTilePosInDir(P,C){return this.options.ignoreLayers?{position:P.position.add(ji(this.gridTilemap.toMapDirection(C))),layer:P.layer}:this.gridTilemap.getTilePosInDirection(P,C)}getReverseNeighbors(P,C){var A;let I=Ks.create((A=this.options.numberOfDirections)!=null?A:4).neighbors(P.position),B;if(!this.options.ignoreLayers){let G=this.gridTilemap.getReverseTransitions(P.position,P.layer);B=G?[...G]:void 0}return I.map(G=>B?B.map(v=>({position:G,layer:v||P.layer})):[{position:G,layer:P.layer}]).flat().filter(G=>!this.isBlocking(G,P)||this.options.ignoreBlockedTarget&&Nt.equal(P,C))}hasBlockingCharFrom(P,C,A,I,B,G,v){if(A===1&&I===1)return v.hasBlockingChar(C.position,C.layer,B,G);let m=a=>v.hasBlockingChar(a,C.layer,B,G),t=je(P.position,C.position);return this.isBlockingMultiTile(P,t,A,I,m)}hasBlockingTileFrom(P,C,A,I,B,G){if(A===1&&I===1)return G.hasBlockingTile(C.position,C.layer,je(C.position,P.position),B);let v=je(P.position,C.position),m=t=>G.hasBlockingTile(t,C.layer,v,B);return this.isBlockingMultiTile(P,v,A,I,m)}isBlockingMultiTile(P,C,A,I,B){let G={src:new ut(P.position.x+A,P.position.y),dest:new ut(P.position.x+A,P.position.y+I-1)},v={src:new ut(P.position.x-1,P.position.y),dest:new ut(P.position.x-1,P.position.y+I-1)},m={src:new ut(P.position.x,P.position.y-1),dest:new ut(P.position.x+A-1,P.position.y-1)},t={src:new ut(P.position.x,P.position.y+I),dest:new ut(P.position.x+A-1,P.position.y+I)};switch(C){case"right":return this.checkLine(G,B);case"left":return this.checkLine(v,B);case"up":return this.checkLine(m,B);case"down":return this.checkLine(t,B);case"up-left":return this.checkLine({src:m.src,dest:new ut(m.dest.x-1,m.dest.y)},B)||this.checkLine({src:new ut(v.src.x,v.src.y-1),dest:new ut(v.dest.x,v.dest.y-1)},B);case"up-right":return this.checkLine({src:new ut(m.src.x+1,m.src.y),dest:m.dest},B)||this.checkLine({src:new ut(G.src.x,G.src.y-1),dest:new ut(G.dest.x,G.dest.y-1)},B);case"down-left":return this.checkLine({src:new ut(v.src.x,v.src.y+1),dest:new ut(v.dest.x,v.dest.y+1)},B)||this.checkLine({src:t.src,dest:new ut(t.dest.x-1,t.dest.y)},B);case"down-right":return this.checkLine({src:new ut(t.src.x+1,t.src.y),dest:t.dest},B)||this.checkLine({src:new ut(G.src.x,G.src.y+1),dest:new ut(G.dest.x,G.dest.y+1)},B)}return!1}checkLine(P,C){for(let A=P.src.x;A<=P.dest.x;A++)for(let I=P.src.y;I<=P.dest.y;I++)if(C(new ut(A,I)))return!0;return!1}},nT=Yu(vo(),1),rT=class extends Sr{findShortestPathImpl(P,C){let A=this.shortestPathBfs(P,C);return{path:this.returnPath(A.previous,P,C),closestToTarget:A.closestToTarget,steps:A.steps,maxPathLengthReached:A.maxPathLengthReached,algorithmUsed:"A_STAR"}}shortestPathBfs(P,C){let A=new Map,I=new Map,B=new Map,G=new nT.MinFibonacciHeap((a,c)=>bs(B,a)-bs(B,c)),v=P,m=this.distance(P.position,C.position),t=0;for(G.push(P),I.set(Nt.toString(P),0),B.set(Nt.toString(P),this.distance(P.position,C.position));G.size>0;){let a=G.pop();if(!a)break;t++;let c=this.distance(a.position,C.position);if(cthis.options.maxPathLength)return{previous:new Map,closestToTarget:v,steps:t,maxPathLengthReached:!0};for(let o of this.getNeighbors(a,C)){let r=bs(I,a)+this.getCosts(a.position,o),n=Nt.toString(o);(!I.has(n)||r0;){let t=B.dequeue();if(m++,!t)break;let{node:a,dist:c}=t;if(c>this.options.maxPathLength)return{previous:new Map,closestToTarget:G,steps:m,maxPathLengthReached:!0};let o=this.distance(a.position,C.position);if(othis.lastDist)}step(P,C,A){var I;this.lastDist=A;for(let B of P){let G=Nt.toString(B);if(!this.visited.has(G)){this.previous.set(G,C),this.queue.enqueue({node:B,dist:A+1}),this.visited.set(G,A+1);let v=(I=this.otherBfs)==null?void 0:I.visited.get(G);v!==void 0&&v0,B.queue.size()>0);){let t=I.queue.dequeue();if(!t)break;let{node:a,dist:c}=t;if(c+1+(((A=B.queue.peek())==null?void 0:A.dist)||0)>this.options.maxPathLength)return{previous:I.previous,previous2:B.previous,closestToTarget:this.maybeClosestToTarget(v),steps:G,maxPathLengthReached:!0};let o=this.distance(a.position,C.position);if(oGs(this.f,B)-Gs(this.f,G)),this.openSet.push(P);let I=Nt.toString(P);for(this.g.set(I,0),this.f.set(I,this.distance(P.position,C.position)),this.maxFrontierSize=Math.max(this.maxFrontierSize,this.openSet.size);this.openSet.size>0;){let B=this.openSet.pop();if(!B)break;if(this.steps++,Nt.equal(B,C))return{previous:A,closestToTarget:C,steps:this.steps,maxPathLengthReached:!1};if(Gs(this.g,B)+1>this.options.maxPathLength)return{previous:new Map,closestToTarget:this.closestToTarget,steps:this.steps,maxPathLengthReached:!0};this.updateClosestToTarget(B,C);for(let G of this.getNeighborsInternal(B,A.get(Nt.toString(B)),C)){let v=Nt.toString(G.p),m=Gs(this.g,B)+G.dist;(!this.g.has(v)||m({p:G,dist:1}));let I=this.prune(C,P).filter(G=>!this.isBlockingIgnoreTarget(P,G,A)).map(G=>{let v=this.getTransition(G.position,P.layer);return{position:G.position,layer:v||P.layer}}),B=[];for(let G of I)if(this.isHorizontal(P.position,G.position))B.push({p:G,dist:1});else{let v=this.jump(P,G,A,1,je(P.position,G.position));v&&B.push(v)}return B}isBlockingIgnoreTarget(P,C,A){return this.isBlocking(P,C)&&!(this.options.ignoreBlockedTarget&&Nt.equal(C,A))}jump(P,C,A,I,B){if(!this.isBlockingIgnoreTarget(P,C,A))return Nt.equal(C,A)?{p:C,dist:I}:I>=this.maxJumpSize?{p:C,dist:I}:this.getTransition(C.position,P.layer)!==void 0?{p:C,dist:I}:this.hasForced(P,C)?{p:C,dist:I}:(this.updateClosestToTarget(C,A),this.jump(C,this.getTilePosInDir(C,B),A,I+1,B))}isHorizontal(P,C){return P.y===C.y}getForced(P,C,A,I,B,G){let v=[],m=P;return(this.blockOrTrans(m,A)||this.blockOrTrans(A,I))&&this.addIfNotBlocked(v,C,I),(this.blockOrTrans(m,B)||this.blockOrTrans(B,G))&&this.addIfNotBlocked(v,C,G),v}hasForced(P,C){let{topLeft:A,downLeft:I,top:B,bottom:G}=this.normalizedPositions(P,C);return!!((this.blockOrTrans(P,I)||this.blockOrTrans(I,G))&&!this.blockOrTrans(C,G)||(this.blockOrTrans(P,A)||this.blockOrTrans(A,B))&&!this.blockOrTrans(C,B))}prune(P,C){let{right:A,top:I,bottom:B,downLeft:G,topLeft:v}=this.normalizedPositions(P,C);return this.isHorizontal(P.position,C.position)?[A,I,B]:[A,...this.getForced(P,C,G,B,v,I)]}normalizedPositions(P,C){return P.position.xC.position.x?{topLeft:{position:new ut(C.position.x+1,C.position.y+1),layer:C.layer},downLeft:{position:new ut(C.position.x+1,C.position.y-1),layer:C.layer},top:{position:new ut(C.position.x,C.position.y+1),layer:C.layer},bottom:{position:new ut(C.position.x,C.position.y-1),layer:C.layer},right:{position:new ut(C.position.x-1,C.position.y),layer:C.layer}}:P.position.y1?this.fillPath(B,G,I):I.push(G),B=G}return I.reverse()}fillPath(P,C,A){let I=P;do{let B=je(I.position,C.position);I=this.getTilePosInDir(I,B),A.push(I)}while(!ni.equal(I.position,C.position))}};function Gs(P,C){var A;return(A=P.get(Nt.toString(C)))!=null?A:Number.MAX_VALUE}var oT=class{constructor(P,C,A,I={}){this.character=P,this.gridTilemap=C,this.charToFollow=A;let B={distance:0,noPathFoundStrategy:"STOP",maxPathLength:1/0,shortestPathAlgorithm:"BIDIRECTIONAL_SEARCH",ignoreLayers:!1,considerCosts:I.considerCosts||!1,facingDirection:"none"};this.options=se(se({},B),I),this.options.considerCosts&&this.options.shortestPathAlgorithm!=="A_STAR"&&console.warn(`GridEngine: Pathfinding option 'considerCosts' cannot be used with algorithm '${this.options.shortestPathAlgorithm}'. It can only be used with A* algorithm.`),this.options.shortestPathAlgorithm==="JPS"&&(this.character.getTileWidth()>1||this.character.getTileHeight()>1)&&console.warn("GridEngine: Pathfinding algorithm 'JPS' can only be used for characters with 'tileWidth' and 'tileHeight' of 1"),this.character=P,this.updateTarget(this.charToFollow.getTilePos().position,this.charToFollow.getTilePos().layer),this.charToFollow.positionChangeStarted().pipe(Je(this.character.autoMovementSet().pipe(bi(G=>G!==this),ys(1)))).subscribe(({enterTile:G,enterLayer:v})=>{this.updateTarget(G,v)})}update(P){var C;(C=this.targetMovement)==null||C.update(P)}getInfo(){return{type:"Follow",config:{charToFollow:this.charToFollow.getId(),distance:this.options.distance,noPathFoundStrategy:this.options.noPathFoundStrategy,maxPathLength:this.options.maxPathLength,ignoreLayers:this.options.ignoreLayers,facingDirection:this.options.facingDirection,shortestPathAlgorithm:this.options.shortestPathAlgorithm}}}getFacingPos(){let P=Qn[this.options.facingDirection]+Qn[this.charToFollow.getFacingDirection()],C=_u("up",P),A={x:this.charToFollow.getTilePos().position.x,y:this.charToFollow.getTilePos().position.y};return C==="right"?A.x+=this.charToFollow.getTileWidth()-1:C==="down"?A.y+=this.charToFollow.getTileWidth()-1:C==="down-left"?A.y+=this.charToFollow.getTileWidth()-1:C==="down-right"?(A.y+=this.charToFollow.getTileWidth()-1,A.x+=this.charToFollow.getTileWidth()-1):C==="up-right"&&(A.x+=this.charToFollow.getTileWidth()-1),this.gridTilemap.getTilePosInDirection({position:new ut(A),layer:this.charToFollow.getTilePos().layer},C).position}updateTarget(P,C){let A=this.options.facingDirection!=="none"&&this.options.distance===0;A&&(P=this.getFacingPos()),this.targetMovement=new Nf(this.character,this.gridTilemap,{position:new ut(P),layer:C},{distance:A?0:this.options.distance+1,config:{algorithm:this.options.shortestPathAlgorithm,noPathFoundStrategy:this.options.noPathFoundStrategy,maxPathLength:this.options.maxPathLength,ignoreLayers:this.options.ignoreLayers,considerCosts:this.options.considerCosts,ignoredChars:[this.charToFollow.getId()]}})}},Tu=class{static getRandomInt(P){return Math.floor(Math.random()*Math.floor(P))}},hT=class{constructor(P,C=0,A=-1){this.character=P,this.delay=C,this.radius=A,this.stepSize=0,this.delayLeft=this.delay,this.initialRow=P.getNextTilePos().position.y,this.initialCol=P.getNextTilePos().position.x,this.randomizeStepSize(),this.stepsWalked=0,this.currentMovementDirection="none",this.character.positionChangeStarted().pipe(Je(this.character.autoMovementSet().pipe(bi(I=>I!==this),ys(1)))).subscribe(()=>{this.stepsWalked++}),this.distanceUtils=Ks.create(P.getNumberOfDirections())}update(P){if(this.shouldContinueWalkingCurrentDirection())this.character.move(this.currentMovementDirection);else if(this.delayLeft-=P,this.delayLeft<=0){this.delayLeft=this.delay;let C=this.getFreeRandomDirection();this.stepsWalked=0,this.character.move(C),this.currentMovementDirection=C,this.randomizeStepSize()}}getInfo(){return{type:"Random",config:{delay:this.delay,radius:this.radius}}}shouldContinueWalkingCurrentDirection(){return this.stepsWalked!this.character.isBlockingDirection(P)).filter(P=>this.isWithinRadius(P))}isWithinRadius(P){return this.radius==-1?!0:this.getDist(P)<=this.radius}getDist(P){return this.distanceUtils.distance(this.character.getNextTilePos().position.add(ji(P)),new ut(this.initialCol,this.initialRow))}getFreeRandomDirection(){let P=this.getFreeDirections();return P.length==0?"none":P[Tu.getRandomInt(P.length)]}randomizeStepSize(){this.stepSize=Tu.getRandomInt(this.radius)+1}};function lT(P,C){return P.filter(A=>{var I,B,G,v,m,t;return(I=C.labels)!=null&&I.withAllLabels?(B=C.labels)==null?void 0:B.withAllLabels.every(a=>A.hasLabel(a)):(G=C.labels)!=null&&G.withOneOfLabels?(v=C.labels)==null?void 0:v.withOneOfLabels.some(a=>A.hasLabel(a)):(m=C.labels)!=null&&m.withNoneLabels?!((t=C.labels)!=null&&t.withNoneLabels.some(a=>A.hasLabel(a))):!0})}var If="2.44.6",uT=class{constructor(P,C){this.collistionStrategy=P,this.collisionGroupRelation=C,this.tilePosToCharacters=new fT,this.charRemoved$=new re}isCharBlockingAt(P,C,A,I=new Set,B=new Set){if(A.length===0)return!1;let G=this.tilePosToCharacters.get(P,C);return!!(G&&G.size>0&&[...G].filter(v=>!I.has(v.getId())).filter(v=>!this.doIntersect(v.getCollisionGroups(),B)).some(v=>A.some(m=>v.getCollisionGroups().some(t=>this.collidesWith(m,t)))))}doIntersect(P,C){for(let A of P)if(C.has(A))return!0;return!1}collidesWith(P,C){return this.collisionGroupRelation?(this.collisionGroupRelation.get(P)||new Set).has(C):P===C}getCharactersAt(P,C){return this.tilePosToCharacters.get(P,C)||new Set}addCharacter(P){this.addTilePositions(P.getTilePos(),P),this.addTilePositions(P.getNextTilePos(),P),this.addPositionChangeSub(P),this.addPositionChangeFinishedSub(P),this.addTilePosSetSub(P)}removeCharacter(P){let C=P.getId();this.charRemoved$.next(C),this.deleteTilePositions(P.getTilePos(),P),this.deleteTilePositions(P.getNextTilePos(),P)}add(P,C,A){let I=this.tilePosToCharacters.get(P,C);I||this.tilePosToCharacters.set(P,C,new Set([A])),I?.add(A)}addTilePosSetSub(P){P.tilePositionSet().pipe(Je(this.charRemoved(P.getId()))).subscribe(C=>{this.deleteTilePositions(P.getNextTilePos(),P),this.addTilePositions(C,P)})}charRemoved(P){var C;return(C=this.charRemoved$)==null?void 0:C.pipe(ys(1),bi(A=>A==P))}addPositionChangeSub(P){P.positionChangeStarted().pipe(Je(this.charRemoved(P.getId())),this.posChangeToLayerPos()).subscribe(C=>{this.collistionStrategy==="BLOCK_ONE_TILE_AHEAD"&&this.deleteTilePositions(C.exit,P),this.addTilePositions(C.enter,P)})}addPositionChangeFinishedSub(P){P.positionChangeFinished().pipe(Je(this.charRemoved(P.getId())),this.posChangeToLayerPos()).subscribe(C=>{this.deleteTilePositions(C.exit,P),this.addTilePositions(C.enter,P)})}addTilePositions(P,C){this.forEachCharTile(P,C,(A,I)=>{this.add(new ut(A,I),P.layer,C)})}deleteTilePositions(P,C){this.forEachCharTile(P,C,(A,I)=>{var B;(B=this.tilePosToCharacters.get(new ut(A,I),P.layer))==null||B.delete(C)})}forEachCharTile(P,C,A){let I=P.position;for(let B=I.x;B({enter:{position:new ut(P.enterTile),layer:P.enterLayer},exit:{position:new ut(P.exitTile),layer:P.exitLayer}})))}posToString(P,C){return`${P.x}#${P.y}#${C}`}},fT=class{constructor(){this.memo=new Map}set(P,C,A){let I=this.memo.get(P.x);I||(I=new Map,this.memo.set(P.x,I));let B=I.get(P.y);B||(B=new Map,I.set(P.y,B)),B.set(C,A)}get(P,C){let A=this.memo.get(P.x);if(!A)return;let I=A.get(P.y);if(I)return I.get(C)}},To=class{constructor(P,C,A,I){this.x=P,this.y=C,this.width=A,this.height=I}getX(){return this.x}getY(){return this.y}getWidth(){return this.width}getHeight(){return this.height}isInRange(P){return P.x>=this.x&&P.x=this.y&&P.yA.isCharLayer());for(let A of[...C,void 0]){let I=this.tileCollisionCache.get(A?.getName());if(I===void 0){I=new Array(this.tilemap.getWidth());for(let B=0;B>C&1)==1}var Cu="ge_cost",Bf=class bf{constructor(C,A,I,B=void 0,G=!1){this.tilemap=C,this.collisionTilePropertyName=A,this.useTileCollisionCache=G,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 uT(I,B);for(let v of mo())this.collidesPropNames.set(v,bf.ONE_WAY_COLLIDE_PROP_PREFIX+v),this.tileCostPropNames.set(v,`${Cu}_${v}`);this.useTileCollisionCache&&(this.tileCollisionCache=new vT(C,this),this.tileCollisionCache.rebuild())}fixCacheLayer(C){var A;(A=this.tileCollisionCache)==null||A.fixLayer(C)}unfixCacheLayers(){var C;(C=this.tileCollisionCache)==null||C.unfixLayers()}addCharacter(C){this.characters.set(C.getId(),C);let A=C.getNextTilePos().layer;A===void 0?C.setTilePosition(Bi(se({},C.getNextTilePos()),{layer:this.getLowestCharLayer()})):this.getCharLayerNames().includes(A)||console.warn(`Char layer '${A}' of character '${C.getId()}' is unknown.`),this.charBlockCache.addCharacter(C)}removeCharacter(C){let A=this.characters.get(C);A&&(this.charBlockCache.removeCharacter(A),this.characters.delete(C))}getCharacters(){return[...this.characters.values()]}getCharactersAt(C,A){return this.charBlockCache.getCharactersAt(C,A)}rebuildTileCollisionCache(C){var A;(A=this.tileCollisionCache)==null||A.rebuild(C)}hasBlockingTileUncached(C,A,I,B){if(!B&&this.hasNoTileUncached(C,A))return!0;let G=this.getCollisionRelevantLayers(A);for(let v of G)if(this.isLayerBlockingAt(v.getName(),C,I))return!0;return!1}hasBlockingTile(C,A,I,B){var G;let v=(G=this.tileCollisionCache)==null?void 0:G.isBlockingFrom(C.x,C.y,A,I,B);return v!==void 0?v:this.hasBlockingTileUncached(C,A,I,B)}getTransition(C,A){let I=this.transitions.get(C.toString());if(I)return I.get(A)}getReverseTransitions(C,A){let I=this.reverseTransitions.get(C.toString());if(I)return I.get(A)}setTransition(C,A,I){var B,G,v,m,t;this.transitions.has(C.toString())||this.transitions.set(C.toString(),new Map),this.reverseTransitions.has(C.toString())||this.reverseTransitions.set(C.toString(),new Map),(B=this.transitions.get(C.toString()))==null||B.set(A,I),(G=this.reverseTransitions.get(C.toString()))!=null&&G.has(I)||(v=this.reverseTransitions.get(C.toString()))==null||v.set(I,new Set),(t=(m=this.reverseTransitions.get(C.toString()))==null?void 0:m.get(I))==null||t.add(A)}getTransitions(){return new Map([...this.transitions].map(([C,A])=>[C,new Map(A)]))}getTileCosts(C,A){let I=this.getCollisionRelevantLayers(C.layer),B=1;for(let G of I)B=Math.max(B,this.getTileCostsForLayer(Bi(se({},C),{layer:G.getName()}),A));return B}getTileCostsForLayer(C,A){let I=this.tilemap.getTileAt(C.position.x,C.position.y,C.layer);return A&&I?.getProperty(this.tileCostPropNames.get(A)||"")||I?.getProperty(Cu)||1}hasNoTileUncached(C,A){return!this.getCollisionRelevantLayers(A).some(I=>this.tilemap.hasTileAt(C.x,C.y,I.getName()))}hasNoTile(C,A){var I;let B=(I=this.tileCollisionCache)==null?void 0:I.hasTileAt(C.x,C.y,A);return B!==void 0?B:this.hasNoTileUncached(C,A)}hasBlockingChar(C,A,I,B=new Set,G=new Set){return this.charBlockCache.isCharBlockingAt(C,A,I,B,G)}isInRange(C){return new To(0,0,this.tilemap.getWidth(),this.tilemap.getHeight()).isInRange(C)}toMapDirection(C){return this.isIsometric()?g1(C):C}fromMapDirection(C){return this.isIsometric()?_u(C):C}isIsometric(){return this.tilemap.getOrientation()==="isometric"}getTilePosInDirection(C,A){let I=C.position.add(ji(this.toMapDirection(A))),B=this.getTransition(I,C.layer)||C.layer;return{position:I,layer:B}}invalidateFrameCache(){this.collisionRelevantLayersFrameCache.clear()}isLayerBlockingAt(C,A,I){let B=this.tilemap.getTileAt(A.x,A.y,C);return B?!!(B.getProperty(this.collisionTilePropertyName)||I&&B.getProperty(this.collidesPropNames.get(I)||"")):!1}getCharLayerIndexes(){return this.tilemap.getLayers().map((C,A)=>({layer:C,index:A})).filter(({layer:C})=>C.isCharLayer()).map(({index:C})=>C)}findPrevAndCharLayer(C){let A=this.getCharLayerIndexes(),I=this.tilemap.getLayers(),B=A.findIndex(G=>I[G].getProperty(Kn)==C);return B==0?{prevIndex:-1,charLayerIndex:A[B]}:{prevIndex:A[B-1],charLayerIndex:A[B]}}getCollisionRelevantLayers(C){if(!C)return this.tilemap.getLayers();let A=this.collisionRelevantLayersFrameCache.get(C);if(A)return A;let{prevIndex:I,charLayerIndex:B}=this.findPrevAndCharLayer(C),G=this.tilemap.getLayers().slice(I+1,B+1);return this.collisionRelevantLayersFrameCache.set(C,G),G}getLowestCharLayer(){for(let C of this.tilemap.getLayers())if(C.isCharLayer())return C.getProperty(Kn)}getCharLayerNames(){return this.tilemap.getLayers().filter(C=>C.isCharLayer()).map(C=>C.getProperty(Kn)).filter(pT)}};Bf.ONE_WAY_COLLIDE_PROP_PREFIX="ge_collide_";var cT=Bf;function pT(P){return P!=null}var gT=(P=>(P.REMOVED="REMOVED",P.ADDED="ADDED",P))(gT||{}),mT=(P=>(P.WAIT="WAIT",P.SKIP="SKIP",P.STOP="STOP",P))(mT||{}),xT=class{constructor(P,C){this.character=P,this.tilemap=C,this.queue=new kn,this.finished$=new re,this.pathBlockedWaitElapsed=0,this.distanceUtils=Ks.create(P.getNumberOfDirections()),this.character.autoMovementSet().pipe(bi(A=>A!==this),ys(1)).subscribe(()=>{this.queue.size()>0&&this.finishMovementTerminated(),this.finished$.complete()})}update(P){(!this.character.isMoving()||this.character.willCrossTileBorderThisUpdate(P))&&this.queue.size()>0&&this.moveCharOnPath(P)}getInfo(){return{type:"Queue"}}enqueue(P,C={}){var A,I,B;let G={pathBlockedStrategy:(A=C.pathBlockedStrategy)!=null?A:"STOP",pathBlockedWaitTimeoutMs:C?.pathBlockedWaitTimeoutMs||-1,ignoreInvalidPositions:(I=C.ignoreInvalidPositions)!=null?I:!1,skipInvalidPositions:(B=C.skipInvalidPositions)!=null?B:!1};for(let v of P){let m={command:v,config:G};if(ds(v)){this.queue.enqueue(m);continue}let t=this.queue.peekEnd(),a=t?.command;if(a||(a=this.character.getNextTilePos()),ds(a)){this.queue.enqueue(m);continue}let c=this.distanceUtils.distance(a.position,v.position)===1;(!C.ignoreInvalidPositions||c)&&this.queue.enqueue(m)}}peekAll(){return this.queue.peekAll()}size(){return this.queue.size()}finished(){return this.finished$}clear(){this.queue.clear()}moveCharOnPath(P){let C=this.queue.peek();if(!C)return;let A=C.command,I=C.config;if(ds(A)&&(A=this.tilemap.getTilePosInDirection(this.character.getNextTilePos(),A)),I.skipInvalidPositions){if(A=this.getNextValidPosition(),!A){this.finishInvalidNextPos(A);return}}else if(!this.isNeighborPos(A)){this.finishInvalidNextPos(A);return}if(this.character.isBlockingDirection(je(this.character.getNextTilePos().position,A.position))){if(I.pathBlockedStrategy==="STOP")this.finishPathBlocked(A);else if(I.pathBlockedStrategy==="SKIP"){this.queue.dequeue(),this.moveCharOnPath(P);return}else I.pathBlockedStrategy==="WAIT"&&I.pathBlockedWaitTimeoutMs>-1&&(this.pathBlockedWaitElapsed+=P,this.pathBlockedWaitElapsed>=I.pathBlockedWaitTimeoutMs&&this.finishBlockedWaitTimeout(A,I.pathBlockedWaitTimeoutMs));return}this.pathBlockedWaitElapsed=0,this.queue.dequeue(),this.character.move(this.getDir(this.character.getNextTilePos().position,A.position)),this.isLastMovement()&&this.finish("SUCCESS","",A)}getNextValidPosition(){for(var P;this.queue.size()>0;){let C=(P=this.queue.peek())==null?void 0:P.command;if(ds(C)&&(C=this.tilemap.getTilePosInDirection(this.character.getNextTilePos(),C)),C&&this.isNeighborPos(C))return C;this.queue.dequeue()}}isLastMovement(){return this.queue.size()===0}isNeighborPos(P){let C=this.distanceUtils.distance(this.character.getNextTilePos().position,P.position)===1,A=this.tilemap.getTransition(P.position,this.character.getNextTilePos().layer);if(this.character.getNextTilePos().layer!==P.layer)return C&&A===P.layer;let I=A!==void 0&&A!==P.layer;return C&&!I}finishMovementTerminated(){this.finish("MOVEMENT_TERMINATED","New automatic movement has been set to character.")}finishInvalidNextPos(P){P?this.finish("INVALID_NEXT_POS",`Position ${this.posToStr(P)} is not reachable from ${this.posToStr(this.character.getNextTilePos())}.`):this.finish("INVALID_NEXT_POS",`No enqueued position is reachable from ${this.posToStr(this.character.getNextTilePos())}.`)}finishPathBlocked(P){this.finish("PATH_BLOCKED",`Position ${this.posToStr(P)} is blocked.`)}finishBlockedWaitTimeout(P,C){this.finish("PATH_BLOCKED_WAIT_TIMEOUT",`Position ${this.posToStr(P)} is blocked and the wait timeout of ${C} ms has been exceeded.`)}finish(P,C="",A=this.character.getNextTilePos()){this.queue=new kn,this.finished$.next({position:A.position,result:P,description:C,layer:A.layer})}getDir(P,C){return this.tilemap.fromMapDirection(je(P,C))}posToStr(P){return`(${P.position.x}, ${P.position.y}, ${P.layer})`}},yT=class{constructor(P=!0){this.isCreatedInternal=!1,P&&console.log(`Using GridEngine v${If}`)}getCharLayer(P){var C;this.initGuard();let A=(C=this.gridCharacters)==null?void 0:C.get(P);if(!A)throw this.createCharUnknownErr(P);return A.getTilePos().layer}getTransition(P,C){var A;return this.initGuard(),(A=this.gridTilemap)==null?void 0:A.getTransition(new ut(P),C)}setTransition(P,C,A){var I;return this.initGuard(),(I=this.gridTilemap)==null?void 0:I.setTransition(new ut(P),C,A)}create(P,C){this.isCreatedInternal=!0,this.gridCharacters=new Map;let A=this.setConfigDefaults(C);this.config=A,this.movementStopped$=new re,this.movementStarted$=new re,this.directionChanged$=new re,this.positionChangeStarted$=new re,this.positionChangeFinished$=new re,this.queueMovementFinished$=new re,this.charRemoved$=new re,this.charAdded$=new re,this.gridTilemap=new cT(P,this.config.collisionTilePropertyName,this.config.characterCollisionStrategy,this.recordToMap(this.config.collisionGroupRelation),this.config.cacheTileCollisions),this.addCharacters()}recordToMap(P){return P?new Map(Object.entries(P).map(([C,A])=>[C,new Set(A)])):void 0}getPosition(P){var C;this.initGuard();let A=(C=this.gridCharacters)==null?void 0:C.get(P);if(!A)throw this.createCharUnknownErr(P);return A.getTilePos().position}move(P,C){this.moveChar(P,C)}moveRandomly(P,C=0,A=-1){var I;this.initGuard();let B=(I=this.gridCharacters)==null?void 0:I.get(P);if(!B)throw this.createCharUnknownErr(P);let G=new hT(B,C,A);B.setMovement(G)}getMovement(P){var C;this.initGuard();let A=(C=this.gridCharacters)==null?void 0:C.get(P);if(!A)throw this.createCharUnknownErr(P);let I=A.getMovement();return I?I.getInfo():{type:"None"}}moveTo(P,C,A){var I;let B=this.assembleMoveToConfig(A);this.initGuard();let G=(I=this.gridCharacters)==null?void 0:I.get(P);if(!G)throw this.createCharUnknownErr(P);if(!this.gridTilemap)throw this.createUninitializedErr();let v=new Nf(G,this.gridTilemap,{position:new ut(C),layer:A?.targetLayer||G.getNextTilePos().layer},{distance:0,config:B});return G.setMovement(v),v.finishedObs().pipe(Xs(m=>({charId:P,position:m.position,result:m.result,description:m.description,layer:m.layer})))}stopMovement(P){var C;this.initGuard();let A=(C=this.gridCharacters)==null?void 0:C.get(P);if(!A)throw this.createCharUnknownErr(P);A.setMovement(void 0)}setSpeed(P,C){var A;this.initGuard();let I=(A=this.gridCharacters)==null?void 0:A.get(P);if(!I)throw this.createCharUnknownErr(P);I.setSpeed(C)}getSpeed(P){var C;this.initGuard();let A=(C=this.gridCharacters)==null?void 0:C.get(P);if(!A)throw this.createCharUnknownErr(P);return A.getSpeed()}collidesWithTiles(P){var C;this.initGuard();let A=(C=this.gridCharacters)==null?void 0:C.get(P);if(!A)throw this.createCharUnknownErr(P);return A.collidesWithTiles()}update(P,C){var A;if(this.isCreatedInternal&&this.gridCharacters)for(let[I,B]of this.gridCharacters)B.update(C);(A=this.gridTilemap)==null||A.invalidateFrameCache()}addCharacter(P){var C,A,I,B,G;if(!this.gridTilemap)throw this.createUninitializedErr();if(!this.config)throw this.createUninitializedErr();let v={speed:P.speed||4,tilemap:this.gridTilemap,collidesWithTiles:!0,collisionGroups:["geDefault"],ignoreCollisionGroups:[],charLayer:P.charLayer,facingDirection:P.facingDirection,labels:P.labels,numberOfDirections:(C=P.numberOfDirections)!=null?C:this.config.numberOfDirections,tileWidth:P.tileWidth,tileHeight:P.tileHeight};typeof P.collides=="boolean"?P.collides===!1&&(v.collidesWithTiles=!1,v.collisionGroups=[]):P.collides!==void 0&&(P.collides.collidesWithTiles===!1&&(v.collidesWithTiles=!1),P.collides.collisionGroups&&(v.collisionGroups=P.collides.collisionGroups),P.collides.ignoreCollisionGroups&&(v.ignoreCollisionGroups=P.collides.ignoreCollisionGroups),v.ignoreMissingTiles=(I=(A=P.collides)==null?void 0:A.ignoreMissingTiles)!=null?I:!1);let m=new _1(P.id,v);P.startPosition&&m.setTilePosition({position:new ut(P.startPosition),layer:m.getTilePos().layer}),(B=this.gridCharacters)==null||B.set(P.id,m),this.gridTilemap.addCharacter(m);let t=m.getId();m.movementStopped().pipe(Je(this.charRemoved(t))).subscribe(a=>{var c;(c=this.movementStopped$)==null||c.next({charId:t,direction:a})}),m.movementStarted().pipe(Je(this.charRemoved(t))).subscribe(a=>{var c;(c=this.movementStarted$)==null||c.next({charId:t,direction:a})}),m.directionChanged().pipe(Je(this.charRemoved(t))).subscribe(a=>{var c;(c=this.directionChanged$)==null||c.next({charId:t,direction:a})}),m.positionChangeStarted().pipe(Je(this.charRemoved(t))).subscribe(a=>{var c;(c=this.positionChangeStarted$)==null||c.next(se({charId:t},a))}),m.positionChangeFinished().pipe(Je(this.charRemoved(t))).subscribe(a=>{var c;(c=this.positionChangeFinished$)==null||c.next(se({charId:t},a))}),(G=this.charAdded$)==null||G.next(t)}hasCharacter(P){var C;return this.initGuard(),!!((C=this.gridCharacters)!=null&&C.has(P))}removeCharacter(P){var C,A,I,B;if(this.initGuard(),!((C=this.gridCharacters)!=null&&C.get(P)))throw this.createCharUnknownErr(P);(A=this.gridTilemap)==null||A.removeCharacter(P),(I=this.gridCharacters)==null||I.delete(P),(B=this.charRemoved$)==null||B.next(P)}removeAllCharacters(){if(this.initGuard(),!!this.gridCharacters)for(let P of this.gridCharacters.keys())this.removeCharacter(P)}getAllCharacters(P){if(this.initGuard(),!this.gridCharacters)return[];let C=[...this.gridCharacters.values()];return(P?lT(C,P):C).map(A=>A.getId())}getLabels(P){var C;this.initGuard();let A=(C=this.gridCharacters)==null?void 0:C.get(P);if(!A)throw this.createCharUnknownErr(P);return A.getLabels()}addLabels(P,C){var A;this.initGuard();let I=(A=this.gridCharacters)==null?void 0:A.get(P);if(!I)throw this.createCharUnknownErr(P);I.addLabels(C)}removeLabels(P,C){var A;this.initGuard();let I=(A=this.gridCharacters)==null?void 0:A.get(P);if(!I)throw this.createCharUnknownErr(P);I.removeLabels(C)}clearLabels(P){var C;this.initGuard();let A=(C=this.gridCharacters)==null?void 0:C.get(P);if(!A)throw this.createCharUnknownErr(P);A.clearLabels()}follow(P,C,A,I){var B,G,v,m,t,a;let c;A===void 0?c={distance:0,closestPointIfBlocked:!1}:typeof A=="number"?(c={distance:A,closestPointIfBlocked:!1},I&&(c.closestPointIfBlocked=!0)):c=A,this.initGuard();let o=(B=this.gridCharacters)==null?void 0:B.get(P),r=(G=this.gridCharacters)==null?void 0:G.get(C);if(!o)throw this.createCharUnknownErr(P);if(!r)throw this.createCharUnknownErr(C);if(!this.gridTilemap)throw this.createUninitializedErr();let n=new oT(o,this.gridTilemap,r,{distance:(v=c.distance)!=null?v:0,noPathFoundStrategy:c.closestPointIfBlocked?"CLOSEST_REACHABLE":"STOP",maxPathLength:(m=c.maxPathLength)!=null?m:1/0,shortestPathAlgorithm:(t=c.algorithm)!=null?t:"BIDIRECTIONAL_SEARCH",ignoreLayers:!!c.ignoreLayers,facingDirection:(a=c.facingDirection)!=null?a:"none"});o.setMovement(n)}isMoving(P){var C;this.initGuard();let A=(C=this.gridCharacters)==null?void 0:C.get(P);if(!A)throw this.createCharUnknownErr(P);return A.isMoving()}getFacingDirection(P){var C;this.initGuard();let A=(C=this.gridCharacters)==null?void 0:C.get(P);if(!A)throw this.createCharUnknownErr(P);return A.getFacingDirection()}getFacingPosition(P){var C;this.initGuard();let A=(C=this.gridCharacters)==null?void 0:C.get(P);if(!A)throw this.createCharUnknownErr(P);let I=A.getFacingPosition();return{x:I.x,y:I.y}}turnTowards(P,C){var A;this.initGuard();let I=(A=this.gridCharacters)==null?void 0:A.get(P);if(!I)throw this.createCharUnknownErr(P);return I.turnTowards(C)}getCharactersAt(P,C){if(this.initGuard(),!this.gridTilemap)return[];let A=this.gridTilemap.getCharactersAt(new ut(P),C);return Array.from(A).map(I=>I.getId())}setPosition(P,C,A){var I;this.initGuard();let B=(I=this.gridCharacters)==null?void 0:I.get(P);if(!B)throw this.createCharUnknownErr(P);A||B.setTilePosition({position:new ut(C),layer:B.getTilePos().layer}),B.setTilePosition({position:new ut(C),layer:A})}isBlocked(P,C,A=["geDefault"]){var I,B;this.initGuard();let G=new ut(P);return!!((I=this.gridTilemap)!=null&&I.hasBlockingTile(G,C)||(B=this.gridTilemap)!=null&&B.hasBlockingChar(G,C,A))}isTileBlocked(P,C){var A;return this.initGuard(),!!((A=this.gridTilemap)!=null&&A.hasBlockingTile(new ut(P),C))}getCollisionGroups(P){var C;this.initGuard();let A=(C=this.gridCharacters)==null?void 0:C.get(P);if(!A)throw this.createCharUnknownErr(P);return A.getCollisionGroups()||[]}setCollisionGroups(P,C){var A;this.initGuard();let I=(A=this.gridCharacters)==null?void 0:A.get(P);if(!I)throw this.createCharUnknownErr(P);I.setCollisionGroups(C)}getIgnoreCollisionGroups(P){var C;this.initGuard();let A=(C=this.gridCharacters)==null?void 0:C.get(P);if(!A)throw this.createCharUnknownErr(P);return A.getIgnoreCollisionGroups()||[]}setIgnoreCollisionGroups(P,C){var A;this.initGuard();let I=(A=this.gridCharacters)==null?void 0:A.get(P);if(!I)throw this.createCharUnknownErr(P);I.setIgnoreCollisionGroups(C)}getTilePosInDirection(P,C,A){if(!this.gridTilemap)throw this.createUninitializedErr();let I=this.gridTilemap.getTilePosInDirection({position:new ut(P),layer:C},A);return{position:I.position.toPosition(),charLayer:I.layer}}findShortestPath(P,C,A={}){if(!this.gridTilemap)throw this.createUninitializedErr();let I=A.shortestPathAlgorithm||"BFS";A.considerCosts&&I!=="A_STAR"&&console.warn(`GridEngine: Pathfinding option 'considerCosts' cannot be used with algorithm '${I}'. It can only be used with A* algorithm.`);let B=A.pathWidth!==void 0&&A.pathWidth!==1,G=A.pathHeight!==void 0&&A.pathHeight!==1;(B||G)&&I==="JPS"&&console.warn("GridEngine: Pathfinding options 'pathWidth' and 'pathHeight' > 1 cannot be used with algorithm 'JPS'.");let v=new Gf(this.gridTilemap).findShortestPath(Nt.toInternal(P),Nt.toInternal(C),Bi(se({},A),{shortestPathAlgorithm:I}));return{path:v.path.map(Nt.fromInternal),closestToTarget:v.closestToTarget?Nt.fromInternal(v.closestToTarget):void 0,reachedMaxPathLength:!1,steps:v.steps}}steppedOn(P,C,A){return this.positionChangeFinished().pipe(bi(I=>P.includes(I.charId)&&C.some(B=>B.x===I.enterTile.x&&B.y===I.enterTile.y)&&(A===void 0||A.includes(I.enterLayer))))}characterShifted(){if(!this.charAdded$||!this.charRemoved$)throw this.createUninitializedErr();return this.charAdded$.pipe(Xs(P=>({charId:P,action:"ADDED"})),q1(this.charRemoved$.pipe(Xs(P=>({charId:P,action:"REMOVED"})))))}movementStarted(){if(!this.movementStarted$)throw this.createUninitializedErr();return this.movementStarted$}movementStopped(){if(!this.movementStopped$)throw this.createUninitializedErr();return this.movementStopped$}directionChanged(){if(!this.directionChanged$)throw this.createUninitializedErr();return this.directionChanged$}positionChangeStarted(){if(!this.positionChangeStarted$)throw this.createUninitializedErr();return this.positionChangeStarted$}positionChangeFinished(){if(!this.positionChangeFinished$)throw this.createUninitializedErr();return this.positionChangeFinished$}getMovementProgress(P){var C;this.initGuard();let A=(C=this.gridCharacters)==null?void 0:C.get(P);if(!A)throw this.createCharUnknownErr(P);return A.getMovementProgress()}rebuildTileCollisionCache(P,C,A,I){var B;(B=this.gridTilemap)==null||B.rebuildTileCollisionCache(new To(P,C,A,I))}addQueueMovements(P,C,A){var I,B;this.initGuard();let G=(I=this.gridCharacters)==null?void 0:I.get(P);if(!G)throw this.createCharUnknownErr(P);if(!this.gridTilemap)throw this.createUninitializedErr();let v;((B=G?.getMovement())==null?void 0:B.getInfo().type)==="Queue"?v=G.getMovement():(v=new xT(G,this.gridTilemap),G.setMovement(v),v.finished().pipe(Je(J1(this.charRemoved(P),G.autoMovementSet()))).subscribe(m=>{var t;(t=this.queueMovementFinished$)==null||t.next(se({charId:P},m))})),v.enqueue(C.map(m=>ds(m)?m:{position:new ut(m.position),layer:m.charLayer}),A)}queueMovementFinished(){if(!this.queueMovementFinished$)throw this.createUninitializedErr();return this.queueMovementFinished$}getEnqueuedMovements(P){var C,A;this.initGuard();let I=(C=this.gridCharacters)==null?void 0:C.get(P);if(!I)throw this.createCharUnknownErr(P);return((A=I.getMovement())==null?void 0:A.getInfo().type)==="Queue"?I.getMovement().peekAll().map(B=>({command:ds(B.command)?B.command:Nt.fromInternal(B.command),config:B.config})):[]}clearEnqueuedMovements(P){var C,A;this.initGuard();let I=(C=this.gridCharacters)==null?void 0:C.get(P);if(!I)throw this.createCharUnknownErr(P);((A=I.getMovement())==null?void 0:A.getInfo().type)==="Queue"&&I.getMovement().clear()}getTileCost(P,C,A){var I,B;return this.initGuard(),(B=(I=this.gridTilemap)==null?void 0:I.getTileCosts({position:new ut(P),layer:C},A))!=null?B:1}getState(){let P=[];if(this.gridCharacters)for(let[C,A]of this.gridCharacters.entries())P.push({id:C,position:Nt.fromInternal(A.getTilePos()),facingDirection:A.getFacingDirection(),speed:A.getSpeed(),labels:A.getLabels(),movementProgress:A.getMovementProgress(),collisionConfig:{collisionGroups:A.getCollisionGroups(),ignoreCollisionGroups:A.getIgnoreCollisionGroups(),collidesWithTiles:A.collidesWithTiles(),ignoreMissingTiles:A.getIgnoreMissingTiles()}});return{characters:P}}setState(P){if(this.gridCharacters)for(let C of P.characters){let A=this.gridCharacters.get(C.id);if(A){let I=A.getTilePos();Nt.equal(I,Nt.toInternal(C.position))||A.setTilePosition(Nt.toInternal(C.position)),A.setSpeed(C.speed),A.turnTowards(C.facingDirection),C.collisionConfig.collisionGroups&&A.setCollisionGroups(C.collisionConfig.collisionGroups),C.collisionConfig.collidesWithTiles!==void 0&&A.setCollidesWithTiles(C.collisionConfig.collidesWithTiles),C.collisionConfig.ignoreMissingTiles!==void 0&&A.setIgnoreMissingTiles(C.collisionConfig.ignoreMissingTiles),A.setMovementProgress(C.movementProgress),A.clearLabels(),A.addLabels(C.labels)}}}charRemoved(P){var C;if(!this.charRemoved$)throw this.createUninitializedErr();return(C=this.charRemoved$)==null?void 0:C.pipe(ys(1),bi(A=>A==P))}initGuard(){if(!this.isCreatedInternal)throw this.createUninitializedErr()}createUninitializedErr(){throw new Error("GridEngine not initialized. You need to call create() first.")}addCharacters(){var P;(P=this.config)==null||P.characters.forEach(C=>this.addCharacter(C))}moveChar(P,C){var A,I,B;this.initGuard();let G=(A=this.gridCharacters)==null?void 0:A.get(P);if(!G)throw this.createCharUnknownErr(P);if(G.getNumberOfDirections()===4){if(!((I=this.gridTilemap)!=null&&I.isIsometric())&&Us(C)){console.warn(`GridEngine: Character '${P}' can't be moved '${C}' in 4 direction mode.`);return}else if((B=this.gridTilemap)!=null&&B.isIsometric()&&!Us(C)){console.warn(`GridEngine: Character '${P}' can't be moved '${C}' in 4 direction isometric mode.`);return}}G.move(C)}createCharUnknownErr(P){return new Error(`Character unknown: ${P}`)}assembleMoveToConfig(P={}){let C=Bi(se({},P),{noPathFoundStrategy:"STOP",pathBlockedStrategy:"WAIT"});return P!=null&&P.noPathFoundStrategy&&(Object.values(Ff).includes(P.noPathFoundStrategy)?C.noPathFoundStrategy=P.noPathFoundStrategy:console.warn(`GridEngine: Unknown NoPathFoundStrategy '${P.noPathFoundStrategy}'. Falling back to 'STOP'`)),P!=null&&P.pathBlockedStrategy&&(Object.values(Lf).includes(P.pathBlockedStrategy)?C.pathBlockedStrategy=P.pathBlockedStrategy:console.warn(`GridEngine: Unknown PathBlockedStrategy '${P.pathBlockedStrategy}'. Falling back to 'WAIT'`)),C}setConfigDefaults(P){return se({collisionTilePropertyName:"ge_collide",numberOfDirections:4,characterCollisionStrategy:"BLOCK_TWO_TILES",cacheTileCollisions:!1},P)}},TT=class extends Df{constructor(P,C={}){super(P,C),this.jumpCache=new Eu}findShortestPathImpl(P,C){return this.jumpCache=new Eu,super.findShortestPathImpl(P,C)}getNeighborsInternal(P,C,A){if(!C||P.layer!==C.layer)return this.getNeighbors(P,A).map(G=>({p:G,dist:1}));let I=this.prune(C,P).map(G=>{let v=this.getTransition(G.position,P.layer);return{position:G.position,layer:v||P.layer}}),B=[];for(let G of I){let v=this.jump(P,G,A,1,je(P.position,G.position));v&&(v.dist=this.distance(P.position,v.p.position),B.push(v))}return B}getForced(P,C){let A=[],{topLeft:I,downLeft:B,top:G,bottom:v,topRight:m,downRight:t}=this.normalizedPositions(P,C),a=je(P.position,C.position);return Us(a)?(this.blockOrTrans(P,I)&&(this.addIfNotBlocked(A,C,G),this.addIfNotBlocked(A,C,m),this.blockOrTrans(B,I)&&this.addIfNotBlocked(A,C,I)),this.blockOrTrans(P,B)&&(this.addIfNotBlocked(A,C,v),this.addIfNotBlocked(A,C,t),this.blockOrTrans(I,B)&&this.addIfNotBlocked(A,C,B)),this.blockOrTrans(I,G)&&this.addIfNotBlocked(A,C,G),this.blockOrTrans(B,v)&&this.addIfNotBlocked(A,C,v),this.blockOrTrans(I,m)&&this.addIfNotBlocked(A,C,m),this.blockOrTrans(B,t)&&this.addIfNotBlocked(A,C,t)):((this.blockOrTrans(P,G)||this.blockOrTrans(G,m))&&this.addIfNotBlocked(A,C,m),(this.blockOrTrans(P,v)||this.blockOrTrans(v,t))&&this.addIfNotBlocked(A,C,t),this.blockOrTrans(P,I)&&this.blockOrTrans(P,G)&&(this.addIfNotBlocked(A,C,G),this.addIfNotBlocked(A,C,I)),this.blockOrTrans(P,B)&&this.blockOrTrans(P,v)&&(this.addIfNotBlocked(A,C,v),this.addIfNotBlocked(A,C,B)),this.blockOrTrans(I,G)&&this.blockOrTrans(P,G)&&this.addIfNotBlocked(A,C,G),this.blockOrTrans(B,v)&&this.blockOrTrans(P,v)&&this.addIfNotBlocked(A,C,v)),A}hasForced(P,C){let{topLeft:A,downLeft:I,top:B,bottom:G,topRight:v,downRight:m}=this.normalizedPositions(P,C),t=je(P.position,C.position);if(Us(t)){if(this.blockOrTrans(P,A)&&(!this.blockOrTrans(C,B)||!this.blockOrTrans(C,v)||this.blockOrTrans(I,A)&&!this.blockOrTrans(C,A))||this.blockOrTrans(P,I)&&(!this.blockOrTrans(C,G)||!this.blockOrTrans(C,m)||this.blockOrTrans(A,I)&&!this.blockOrTrans(C,I))||this.blockOrTrans(A,B)&&!this.blockOrTrans(C,B)||this.blockOrTrans(I,G)&&!this.blockOrTrans(C,G)||this.blockOrTrans(A,v)&&!this.blockOrTrans(C,v)||this.blockOrTrans(I,m)&&!this.blockOrTrans(C,m))return!0}else if((this.blockOrTrans(P,B)||this.blockOrTrans(B,v))&&!this.blockOrTrans(C,v)||(this.blockOrTrans(P,G)||this.blockOrTrans(G,m))&&!this.blockOrTrans(C,m)||this.blockOrTrans(P,A)&&this.blockOrTrans(P,B)&&(!this.blockOrTrans(C,B)||!this.blockOrTrans(C,A))||this.blockOrTrans(P,I)&&this.blockOrTrans(P,G)&&(!this.blockOrTrans(C,G)||!this.blockOrTrans(C,I))||this.blockOrTrans(A,B)&&this.blockOrTrans(P,B)&&!this.blockOrTrans(C,B)||this.blockOrTrans(I,G)&&this.blockOrTrans(P,G)&&!this.blockOrTrans(C,G))return!0;return!1}prune(P,C){let{top:A,right:I,topRight:B,downRight:G,bottom:v}=this.normalizedPositions(P,C),m=this.getForced(P,C),t=je(P.position,C.position);return Us(t)?[A,I,B,G,v,...m]:[I,...m]}jump(P,C,A,I,B){let G=this.jumpCache.get(P,C);if(G!==null)return G;if(this.isBlocking(P,C)&&!(Nt.equal(C,A)&&this.options.ignoreBlockedTarget)){this.jumpCache.set(P,C,void 0);return}if(Nt.equal(C,A))return this.jumpCache.set(P,C,{p:C,dist:0}),{p:C,dist:0};if(I>=this.maxJumpSize)return this.jumpCache.set(P,C,{p:C,dist:0}),{p:C,dist:0};if(this.getTransition(C.position,P.layer)!==void 0)return this.jumpCache.set(P,C,{p:C,dist:0}),{p:C,dist:0};if(this.hasForced(P,C))return this.jumpCache.set(P,C,{p:C,dist:0}),{p:C,dist:0};if(this.updateClosestToTarget(C,A),B==="up-left"){if(this.jump(C,this.getTilePosInDir(C,"up"),A,I+1,"up")!==void 0)return this.jumpCache.set(P,C,{p:C,dist:0}),{p:C,dist:0};if(this.jump(C,this.getTilePosInDir(C,"left"),A,I+1,"left")!==void 0)return this.jumpCache.set(P,C,{p:C,dist:0}),{p:C,dist:0}}else if(B==="down-left"){if(this.jump(C,this.getTilePosInDir(C,"down"),A,I+1,"down")!==void 0)return this.jumpCache.set(P,C,{p:C,dist:0}),{p:C,dist:0};if(this.jump(C,this.getTilePosInDir(C,"left"),A,I+1,"left")!==void 0)return this.jumpCache.set(P,C,{p:C,dist:0}),{p:C,dist:0}}else if(B==="up-right"){if(this.jump(C,this.getTilePosInDir(C,"up"),A,I+1,"up")!==void 0)return this.jumpCache.set(P,C,{p:C,dist:0}),{p:C,dist:0};if(this.jump(C,this.getTilePosInDir(C,"right"),A,I+1,"right")!==void 0)return this.jumpCache.set(P,C,{p:C,dist:0}),{p:C,dist:0}}else if(B==="down-right"){if(this.jump(C,this.getTilePosInDir(C,"down"),A,I+1,"down")!==void 0)return this.jumpCache.set(P,C,{p:C,dist:0}),{p:C,dist:0};if(this.jump(C,this.getTilePosInDir(C,"right"),A,I+1,"right")!==void 0)return this.jumpCache.set(P,C,{p:C,dist:0}),{p:C,dist:0}}let v=this.jump(C,this.getTilePosInDir(C,B),A,I+1,B);return this.jumpCache.set(P,C,v),v}normalizedPositions(P,C){return P.position.xC.position.x&&P.position.y===C.position.y?{topLeft:{position:new ut(C.position.x+1,C.position.y+1),layer:C.layer},downLeft:{position:new ut(C.position.x+1,C.position.y-1),layer:C.layer},top:{position:new ut(C.position.x,C.position.y+1),layer:C.layer},bottom:{position:new ut(C.position.x,C.position.y-1),layer:C.layer},right:{position:new ut(C.position.x-1,C.position.y),layer:C.layer},topRight:{position:new ut(C.position.x-1,C.position.y+1),layer:C.layer},downRight:{position:new ut(C.position.x-1,C.position.y-1),layer:C.layer}}:P.position.yC.position.y&&P.position.x===C.position.x?{topLeft:{position:new ut(C.position.x-1,C.position.y+1),layer:C.layer},downLeft:{position:new ut(C.position.x+1,C.position.y+1),layer:C.layer},top:{position:new ut(C.position.x-1,C.position.y),layer:C.layer},bottom:{position:new ut(C.position.x+1,C.position.y),layer:C.layer},right:{position:new ut(C.position.x,C.position.y-1),layer:C.layer},topRight:{position:new ut(C.position.x-1,C.position.y-1),layer:C.layer},downRight:{position:new ut(C.position.x+1,C.position.y-1),layer:C.layer}}:P.position.yC.position.x?{topLeft:{position:new ut(C.position.x+1,C.position.y),layer:C.layer},downLeft:{position:new ut(C.position.x,C.position.y-1),layer:C.layer},top:{position:new ut(C.position.x+1,C.position.y+1),layer:C.layer},bottom:{position:new ut(C.position.x-1,C.position.y-1),layer:C.layer},right:{position:new ut(C.position.x-1,C.position.y+1),layer:C.layer},topRight:{position:new ut(C.position.x,C.position.y+1),layer:C.layer},downRight:{position:new ut(C.position.x-1,C.position.y),layer:C.layer}}:P.position.y>C.position.y&&P.position.x(P.SUCCESS="SUCCESS",P.NO_PATH_FOUND_MAX_RETRIES_EXCEEDED="NO_PATH_FOUND_MAX_RETRIES_EXCEEDED",P.PATH_BLOCKED_MAX_RETRIES_EXCEEDED="PATH_BLOCKED_MAX_RETRIES_EXCEEDED",P.PATH_BLOCKED="PATH_BLOCKED",P.NO_PATH_FOUND="NO_PATH_FOUND",P.PATH_BLOCKED_WAIT_TIMEOUT="PATH_BLOCKED_WAIT_TIMEOUT",P.MOVEMENT_TERMINATED="MOVEMENT_TERMINATED",P.MAX_PATH_LENGTH_REACHED="MAX_PATH_LENGTH_REACHED",P))(CT||{}),Nf=class{constructor(P,C,A,{config:I,ignoreBlockedTarget:B=!1,distance:G=0}={}){this.character=P,this.tilemap=C,this.targetPos=A,this.shortestPath=[],this.distOffset=0,this.posOnPath=0,this.stopped=!1,this.pathBlockedWaitElapsed=0,this.isPositionAllowed=()=>!0,this.shortestPathAlgorithm="BIDIRECTIONAL_SEARCH",this.maxPathLength=1/0,this.considerCosts=!1,this.ignoredChars=[],this.isBlocking=(t,a)=>t?new Of(this.tilemap,this.getPathfindingOptions()).isBlocking(this.character.getTilePos(),{position:t,layer:a}):!0;var v,m;this.shortestPathAlgorithm=(v=I?.algorithm)!=null?v:this.shortestPathAlgorithm,this.ignoreBlockedTarget=B,this.distance=G,this.noPathFoundStrategy=I?.noPathFoundStrategy||"STOP",this.pathBlockedStrategy=I?.pathBlockedStrategy||"WAIT",this.noPathFoundRetryable=new pu(I?.noPathFoundRetryBackoffMs||200,I?.noPathFoundMaxRetries||-1,()=>{this.stop("NO_PATH_FOUND_MAX_RETRIES_EXCEEDED")}),this.pathBlockedRetryable=new pu(I?.pathBlockedRetryBackoffMs||200,I?.pathBlockedMaxRetries||-1,()=>{this.stop("PATH_BLOCKED_MAX_RETRIES_EXCEEDED")}),I!=null&&I.isPositionAllowedFn&&(this.isPositionAllowed=I.isPositionAllowedFn),I!=null&&I.maxPathLength&&(this.maxPathLength=I.maxPathLength),this.alternativeTargets=I?.alternativeTargets,this.noPathFoundAlternativeTargetsFallbackStrategy=I?.noPathFoundAlternativeTargetsFallbackStrategy,I!=null&&I.considerCosts&&this.shortestPathAlgorithm!=="A_STAR"&&console.warn(`GridEngine: Pathfinding option 'considerCosts' cannot be used with algorithm '${this.shortestPathAlgorithm}'. It can only be used with A* algorithm.`),this.shortestPathAlgorithm==="JPS"&&(this.character.getTileWidth()>1||this.character.getTileHeight()>1)&&console.warn("GridEngine: Pathfinding algorithm 'JPS' can only be used for characters with 'tileWidth' and 'tileHeight' of 1"),this.considerCosts=I?.considerCosts||!1,this.ignoreLayers=!!(I!=null&&I.ignoreLayers),this.distanceUtils=Ks.create(P.getNumberOfDirections()),this.pathBlockedWaitTimeoutMs=I?.pathBlockedWaitTimeoutMs||-1,this.ignoredChars=(m=I?.ignoredChars)!=null?m:[],this.finished$=new re,this.setCharacter(P)}setPathBlockedStrategy(P){this.pathBlockedStrategy=P}getPathBlockedStrategy(){return this.pathBlockedStrategy}setCharacter(P){this.character=P,this.noPathFoundRetryable.reset(),this.pathBlockedRetryable.reset(),this.pathBlockedWaitElapsed=0,this.calcShortestPath(),this.character.autoMovementSet().pipe(bi(C=>C!==this),ys(1)).subscribe(()=>{this.stop("MOVEMENT_TERMINATED")})}getPathfindingOptions(){return{shortestPathAlgorithm:this.shortestPathAlgorithm,pathWidth:this.character.getTileWidth(),pathHeight:this.character.getTileHeight(),numberOfDirections:this.character.getNumberOfDirections(),isPositionAllowed:this.isPositionAllowed,collisionGroups:this.character.getCollisionGroups(),ignoredChars:[this.character.getId(),...this.ignoredChars],ignoreTiles:!this.character.collidesWithTiles(),ignoreMapBounds:this.character.getIgnoreMissingTiles(),ignoreBlockedTarget:this.ignoreBlockedTarget,maxPathLength:this.maxPathLength,ignoreLayers:this.ignoreLayers,considerCosts:this.considerCosts,calculateClosestToTarget:!0}}update(P){var C,A,I,B;this.stopped||(this.noPathFound()&&(this.noPathFoundStrategy==="RETRY"?this.noPathFoundRetryable.retry(P,()=>this.calcShortestPath()):this.noPathFoundStrategy==="STOP"&&this.stop("NO_PATH_FOUND")),this.updatePosOnPath(),this.isBlocking((C=this.nextTileOnPath())==null?void 0:C.position,(A=this.character)==null?void 0:A.getNextTilePos().layer)?this.applyPathBlockedStrategy(P):this.pathBlockedWaitElapsed=0,this.hasArrived()?(this.stop("SUCCESS"),this.existsDistToTarget()&&this.turnTowardsTarget()):this.isBlocking((I=this.nextTileOnPath())==null?void 0:I.position,(B=this.character)==null?void 0:B.getNextTilePos().layer)||this.moveCharOnPath())}finishedObs(){return this.finished$}getInfo(){return{type:"Target",state:{pathAhead:this.shortestPath.slice(this.posOnPath).map(P=>Nt.fromInternal(P))},config:{algorithm:this.shortestPathAlgorithm,ignoreBlockedTarget:this.ignoreBlockedTarget,distance:this.distance,targetPos:Nt.fromInternal(this.targetPos),noPathFoundStrategy:this.noPathFoundStrategy,pathBlockedStrategy:this.pathBlockedStrategy,noPathFoundRetryBackoffMs:this.noPathFoundRetryable.getBackoffMs(),noPathFoundMaxRetries:this.noPathFoundRetryable.getMaxRetries()}}}resultToReason(P){switch(P){case"SUCCESS":return"Successfully arrived.";case"MOVEMENT_TERMINATED":return"Movement of character has been replaced before destination was reached.";case"PATH_BLOCKED":return"PathBlockedStrategy STOP: Path blocked.";case"NO_PATH_FOUND_MAX_RETRIES_EXCEEDED":return`NoPathFoundStrategy RETRY: Maximum retries of ${this.noPathFoundRetryable.getMaxRetries()} exceeded.`;case"NO_PATH_FOUND":return"NoPathFoundStrategy STOP: No path found.";case"PATH_BLOCKED_MAX_RETRIES_EXCEEDED":return`PathBlockedStrategy RETRY: Maximum retries of ${this.pathBlockedRetryable.getMaxRetries()} exceeded.`;case"PATH_BLOCKED_WAIT_TIMEOUT":return`PathBlockedStrategy WAIT: Wait timeout of ${this.pathBlockedWaitTimeoutMs}ms exceeded.`}}applyPathBlockedStrategy(P){this.pathBlockedStrategy==="RETRY"?this.pathBlockedRetryable.retry(P,()=>{let C=this.getShortestPath();C.path.length>0&&this.calcShortestPath(C)}):this.pathBlockedStrategy==="STOP"?this.stop("PATH_BLOCKED"):this.pathBlockedStrategy==="WAIT"&&this.pathBlockedWaitTimeoutMs>-1&&(this.pathBlockedWaitElapsed+=P,this.pathBlockedWaitElapsed>=this.pathBlockedWaitTimeoutMs&&this.stop("PATH_BLOCKED_WAIT_TIMEOUT"))}moveCharOnPath(){let P=this.nextTileOnPath();if(!P)return;let C=this.getDir(this.character.getNextTilePos().position,P.position);this.character.move(C)}nextTileOnPath(){return this.shortestPath[this.posOnPath+1]}stop(P){this.finished$.next({position:this.character.getTilePos().position,result:P,description:this.resultToReason(P),layer:this.character.getTilePos().layer}),this.finished$.complete(),this.stopped=!0}turnTowardsTarget(){let P=this.shortestPath[this.posOnPath+1],C=this.getDir(this.character.getNextTilePos().position,P.position);this.character.turnTowards(C)}existsDistToTarget(){return this.posOnPath=this.shortestPath.length-1}updatePosOnPath(){let P=this.shortestPath[this.posOnPath];for(;this.posOnPath0)return{path:G,distOffset:v}}return this.noPathFoundStrategy=this.noPathFoundAlternativeTargetsFallbackStrategy||"STOP",this.getShortestPath()}}return{path:A,distOffset:0}}pathToAlternativeTarget(P,C){let A=C.findShortestPath(this.character.getNextTilePos(),P,this.getPathfindingOptions()).path,I=this.distanceUtils.distance(P.position,this.targetPos.position);return{path:A,distOffset:I}}getDir(P,C){return this.tilemap.fromMapDirection(this.distanceUtils.direction(P,C))}},ET=Object.create,zf=Object.defineProperty,PT=Object.getOwnPropertyDescriptor,AT=Object.getOwnPropertyNames,MT=Object.getPrototypeOf,wT=Object.prototype.hasOwnProperty,RT=(P,C)=>()=>(C||P((C={exports:{}}).exports,C),C.exports),FT=(P,C,A,I)=>{if(C&&typeof C=="object"||typeof C=="function")for(let B of AT(C))!wT.call(P,B)&&B!==A&&zf(P,B,{get:()=>C[B],enumerable:!(I=PT(C,B))||I.enumerable});return P},So=(P,C,A)=>(A=P!=null?ET(MT(P)):{},FT(C||!P||!P.__esModule?zf(A,"default",{value:P,enumerable:!0}):A,P)),Co=RT((P,C)=>{(function(){var A,I="4.17.21",B=200,G="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",v="Expected a function",m="Invalid `variable` option passed into `_.template`",t="__lodash_hash_undefined__",a=500,c="__lodash_placeholder__",o=1,r=2,n=4,e=1,i=2,h=1,s=2,l=4,f=8,u=16,d=32,p=64,g=128,y=256,x=512,T=30,S="...",M=800,w=16,L=1,F=2,O=3,b=1/0,N=9007199254740991,V=17976931348623157e292,K=NaN,$=4294967295,j=$-1,X=$>>>1,Y=[["ary",g],["bind",h],["bindKey",s],["curry",f],["curryRight",u],["flip",x],["partial",d],["partialRight",p],["rearg",y]],D="[object Arguments]",z="[object Array]",W="[object AsyncFunction]",H="[object Boolean]",J="[object Date]",Q="[object DOMException]",k="[object Error]",et="[object Function]",st="[object GeneratorFunction]",rt="[object Map]",ot="[object Number]",ft="[object Null]",at="[object Object]",ct="[object Promise]",Et="[object Proxy]",St="[object RegExp]",Ct="[object Set]",vt="[object String]",Tt="[object Symbol]",pt="[object Undefined]",At="[object WeakMap]",Dt="[object WeakSet]",Ht="[object ArrayBuffer]",Gt="[object DataView]",Vt="[object Float32Array]",It="[object Float64Array]",te="[object Int8Array]",$t="[object Int16Array]",oe="[object Int32Array]",le="[object Uint8Array]",ye="[object Uint8ClampedArray]",qe="[object Uint16Array]",_e="[object Uint32Array]",li=/\b__p \+= '';/g,ui=/\b(__p \+=) '' \+/g,fi=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Eo=/&(?:amp|lt|gt|quot|#39);/g,Po=/[&<>"']/g,Hf=RegExp(Eo.source),Kf=RegExp(Po.source),$f=/<%-([\s\S]+?)%>/g,Zf=/<%([\s\S]+?)%>/g,Ao=/<%=([\s\S]+?)%>/g,Jf=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,jf=/^\w*$/,Qf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Cr=/[\\^$.*+?()[\]{}|]/g,kf=RegExp(Cr.source),Er=/^\s+/,qf=/\s/,_f=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,td=/\{\n\/\* \[wrapped with (.+)\] \*/,ed=/,? & /,id=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,sd=/[()=,{}\[\]\/\s]/,nd=/\\(\\)?/g,rd=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Mo=/\w*$/,ad=/^[-+]0x[0-9a-f]+$/i,od=/^0b[01]+$/i,hd=/^\[object .+?Constructor\]$/,ld=/^0o[0-7]+$/i,ud=/^(?:0|[1-9]\d*)$/,fd=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Js=/($^)/,dd=/['\n\r\u2028\u2029\\]/g,js="\\ud800-\\udfff",vd="\\u0300-\\u036f",cd="\\ufe20-\\ufe2f",pd="\\u20d0-\\u20ff",wo=vd+cd+pd,Ro="\\u2700-\\u27bf",Fo="a-z\\xdf-\\xf6\\xf8-\\xff",gd="\\xac\\xb1\\xd7\\xf7",md="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",xd="\\u2000-\\u206f",yd=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Lo="A-Z\\xc0-\\xd6\\xd8-\\xde",Oo="\\ufe0e\\ufe0f",Do=gd+md+xd+yd,Pr="['’]",Td="["+js+"]",Io="["+Do+"]",Qs="["+wo+"]",Bo="\\d+",Sd="["+Ro+"]",bo="["+Fo+"]",Go="[^"+js+Do+Bo+Ro+Fo+Lo+"]",Ar="\\ud83c[\\udffb-\\udfff]",Cd="(?:"+Qs+"|"+Ar+")",No="[^"+js+"]",Mr="(?:\\ud83c[\\udde6-\\uddff]){2}",wr="[\\ud800-\\udbff][\\udc00-\\udfff]",qi="["+Lo+"]",zo="\\u200d",Uo="(?:"+bo+"|"+Go+")",Ed="(?:"+qi+"|"+Go+")",Xo="(?:"+Pr+"(?:d|ll|m|re|s|t|ve))?",Vo="(?:"+Pr+"(?:D|LL|M|RE|S|T|VE))?",Wo=Cd+"?",Yo="["+Oo+"]?",Pd="(?:"+zo+"(?:"+[No,Mr,wr].join("|")+")"+Yo+Wo+")*",Ad="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Md="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ho=Yo+Wo+Pd,wd="(?:"+[Sd,Mr,wr].join("|")+")"+Ho,Rd="(?:"+[No+Qs+"?",Qs,Mr,wr,Td].join("|")+")",Fd=RegExp(Pr,"g"),Ld=RegExp(Qs,"g"),Rr=RegExp(Ar+"(?="+Ar+")|"+Rd+Ho,"g"),Od=RegExp([qi+"?"+bo+"+"+Xo+"(?="+[Io,qi,"$"].join("|")+")",Ed+"+"+Vo+"(?="+[Io,qi+Uo,"$"].join("|")+")",qi+"?"+Uo+"+"+Xo,qi+"+"+Vo,Md,Ad,Bo,wd].join("|"),"g"),Dd=RegExp("["+zo+js+wo+Oo+"]"),Id=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Bd=["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"],bd=-1,ee={};ee[Vt]=ee[It]=ee[te]=ee[$t]=ee[oe]=ee[le]=ee[ye]=ee[qe]=ee[_e]=!0,ee[D]=ee[z]=ee[Ht]=ee[H]=ee[Gt]=ee[J]=ee[k]=ee[et]=ee[rt]=ee[ot]=ee[at]=ee[St]=ee[Ct]=ee[vt]=ee[At]=!1;var _t={};_t[D]=_t[z]=_t[Ht]=_t[Gt]=_t[H]=_t[J]=_t[Vt]=_t[It]=_t[te]=_t[$t]=_t[oe]=_t[rt]=_t[ot]=_t[at]=_t[St]=_t[Ct]=_t[vt]=_t[Tt]=_t[le]=_t[ye]=_t[qe]=_t[_e]=!0,_t[k]=_t[et]=_t[At]=!1;var Gd={À:"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"},Nd={"&":"&","<":"<",">":">",'"':""","'":"'"},zd={"&":"&","<":"<",">":">",""":'"',"'":"'"},Ud={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Xd=parseFloat,Vd=parseInt,Ko=typeof global=="object"&&global&&global.Object===Object&&global,Wd=typeof self=="object"&&self&&self.Object===Object&&self,ge=Ko||Wd||Function("return this")(),Fr=typeof P=="object"&&P&&!P.nodeType&&P,Ni=Fr&&typeof C=="object"&&C&&!C.nodeType&&C,$o=Ni&&Ni.exports===Fr,Lr=$o&&Ko.process,Xe=function(){try{var ht=Ni&&Ni.require&&Ni.require("util").types;return ht||Lr&&Lr.binding&&Lr.binding("util")}catch{}}(),Zo=Xe&&Xe.isArrayBuffer,Jo=Xe&&Xe.isDate,jo=Xe&&Xe.isMap,Qo=Xe&&Xe.isRegExp,ko=Xe&&Xe.isSet,qo=Xe&&Xe.isTypedArray;function De(ht,gt,dt){switch(dt.length){case 0:return ht.call(gt);case 1:return ht.call(gt,dt[0]);case 2:return ht.call(gt,dt[0],dt[1]);case 3:return ht.call(gt,dt[0],dt[1],dt[2])}return ht.apply(gt,dt)}function Yd(ht,gt,dt,Mt){for(var Bt=-1,Zt=ht==null?0:ht.length;++Bt-1}function Or(ht,gt,dt){for(var Mt=-1,Bt=ht==null?0:ht.length;++Mt-1;);return dt}function ah(ht,gt){for(var dt=ht.length;dt--&&_i(gt,ht[dt],0)>-1;);return dt}function qd(ht,gt){for(var dt=ht.length,Mt=0;dt--;)ht[dt]===gt&&++Mt;return Mt}var _d=br(Gd),tv=br(Nd);function ev(ht){return"\\"+Ud[ht]}function iv(ht,gt){return ht==null?A:ht[gt]}function ts(ht){return Dd.test(ht)}function sv(ht){return Id.test(ht)}function nv(ht){for(var gt,dt=[];!(gt=ht.next()).done;)dt.push(gt.value);return dt}function Ur(ht){var gt=-1,dt=Array(ht.size);return ht.forEach(function(Mt,Bt){dt[++gt]=[Bt,Mt]}),dt}function oh(ht,gt){return function(dt){return ht(gt(dt))}}function Pi(ht,gt){for(var dt=-1,Mt=ht.length,Bt=0,Zt=[];++dt-1}function Kv(E,R){var U=this.__data__,Z=pn(U,E);return Z<0?(++this.size,U.push([E,R])):U[Z][1]=R,this}di.prototype.clear=Vv,di.prototype.delete=Wv,di.prototype.get=Yv,di.prototype.has=Hv,di.prototype.set=Kv;function vi(E){var R=-1,U=E==null?0:E.length;for(this.clear();++R=R?E:R)),E}function He(E,R,U,Z,q,tt){var it,nt=R&o,lt=R&r,mt=R&n;if(U&&(it=q?U(E,Z,q,tt):U(E)),it!==A)return it;if(!ne(E))return E;var xt=bt(E);if(xt){if(it=jc(E),!nt)return we(E,it)}else{var yt=Ee(E),Pt=yt==et||yt==st;if(Oi(E))return Yh(E,nt);if(yt==at||yt==D||Pt&&!q){if(it=lt||Pt?{}:hl(E),!nt)return lt?zc(E,oc(it,E)):Nc(E,yh(it,E))}else{if(!_t[yt])return q?E:{};it=Qc(E,yt,nt)}}tt||(tt=new ei);var wt=tt.get(E);if(wt)return wt;tt.set(E,it),Nl(E)?E.forEach(function(Ot){it.add(He(Ot,R,U,Ot,E,tt))}):bl(E)&&E.forEach(function(Ot,Wt){it.set(Wt,He(Ot,R,U,Wt,E,tt))});var Lt=mt?lt?fa:ua:lt?Fe:me,Ut=xt?A:Lt(E);return Ve(Ut||E,function(Ot,Wt){Ut&&(Wt=Ot,Ot=E[Wt]),Ms(it,Wt,He(Ot,R,U,Wt,E,tt))}),it}function hc(E){var R=me(E);return function(U){return Th(U,E,R)}}function Th(E,R,U){var Z=U.length;if(E==null)return!Z;for(E=qt(E);Z--;){var q=U[Z],tt=R[q],it=E[q];if(it===A&&!(q in E)||!tt(it))return!1}return!0}function Sh(E,R,U){if(typeof E!="function")throw new We(v);return Is(function(){E.apply(A,U)},R)}function ws(E,R,U,Z){var q=-1,tt=ks,it=!0,nt=E.length,lt=[],mt=R.length;if(!nt)return lt;U&&(R=ie(R,Ie(U))),Z?(tt=Or,it=!1):R.length>=B&&(tt=Ts,it=!1,R=new Xi(R));t:for(;++qq?0:q+U),Z=Z===A||Z>q?q:zt(Z),Z<0&&(Z+=q),Z=U>Z?0:Ul(Z);U0&&U(nt)?R>1?Te(nt,R-1,U,Z,q):Ei(q,nt):Z||(q[q.length]=nt)}return q}var $r=jh(),Ph=jh(!0);function ri(E,R){return E&&$r(E,R,me)}function Zr(E,R){return E&&Ph(E,R,me)}function mn(E,R){return Ci(R,function(U){return xi(E[U])})}function Wi(E,R){R=Fi(R,E);for(var U=0,Z=R.length;E!=null&&UR}function fc(E,R){return E!=null&&jt.call(E,R)}function dc(E,R){return E!=null&&R in qt(E)}function vc(E,R,U){return E>=Ce(R,U)&&E=120&&xt.length>=120)?new Xi(it&&xt):A}xt=E[0];var yt=-1,Pt=nt[0];t:for(;++yt-1;)nt!==E&&hn.call(nt,lt,1),hn.call(E,lt,1);return E}function bh(E,R){for(var U=E?R.length:0,Z=U-1;U--;){var q=R[U];if(U==Z||q!==tt){var tt=q;mi(q)?hn.call(E,q,1):sa(E,q)}}return E}function ta(E,R){return E+fn(ph()*(R-E+1))}function Mc(E,R,U,Z){for(var q=-1,tt=ce(un((R-E)/(U||1)),0),it=dt(tt);tt--;)it[Z?tt:++q]=E,E+=U;return it}function ea(E,R){var U="";if(!E||R<1||R>N)return U;do R%2&&(U+=E),R=fn(R/2),R&&(E+=E);while(R);return U}function Xt(E,R){return xa(fl(E,R,Le),E+"")}function wc(E){return xh(us(E))}function Rc(E,R){var U=us(E);return Rn(U,Vi(R,0,U.length))}function Ls(E,R,U,Z){if(!ne(E))return E;R=Fi(R,E);for(var q=-1,tt=R.length,it=tt-1,nt=E;nt!=null&&++qq?0:q+R),U=U>q?q:U,U<0&&(U+=q),q=R>U?0:U-R>>>0,R>>>=0;for(var tt=dt(q);++Z>>1,it=E[tt];it!==null&&!be(it)&&(U?it<=R:it=B){var mt=R?null:Wc(E);if(mt)return _s(mt);it=!1,q=Ts,lt=new Xi}else lt=R?[]:nt;t:for(;++Z=Z?E:Ke(E,R,U)}var Wh=yv||function(E){return ge.clearTimeout(E)};function Yh(E,R){if(R)return E.slice();var U=E.length,Z=uh?uh(U):new E.constructor(U);return E.copy(Z),Z}function oa(E){var R=new E.constructor(E.byteLength);return new an(R).set(new an(E)),R}function Ic(E,R){var U=R?oa(E.buffer):E.buffer;return new E.constructor(U,E.byteOffset,E.byteLength)}function Bc(E){var R=new E.constructor(E.source,Mo.exec(E));return R.lastIndex=E.lastIndex,R}function bc(E){return As?qt(As.call(E)):{}}function Hh(E,R){var U=R?oa(E.buffer):E.buffer;return new E.constructor(U,E.byteOffset,E.length)}function Kh(E,R){if(E!==R){var U=E!==A,Z=E===null,q=E===E,tt=be(E),it=R!==A,nt=R===null,lt=R===R,mt=be(R);if(!nt&&!mt&&!tt&&E>R||tt&&it&<&&!nt&&!mt||Z&&it&<||!U&<||!q)return 1;if(!Z&&!tt&&!mt&&E=nt)return lt;var mt=U[Z];return lt*(mt=="desc"?-1:1)}}return E.index-R.index}function $h(E,R,U,Z){for(var q=-1,tt=E.length,it=U.length,nt=-1,lt=R.length,mt=ce(tt-it,0),xt=dt(lt+mt),yt=!Z;++nt1?U[q-1]:A,it=q>2?U[2]:A;for(tt=E.length>3&&typeof tt=="function"?(q--,tt):A,it&&Ae(U[0],U[1],it)&&(tt=q<3?A:tt,q=1),R=qt(R);++Z-1?q[tt?R[it]:it]:A}}function qh(E){return gi(function(R){var U=R.length,Z=U,q=Ye.prototype.thru;for(E&&R.reverse();Z--;){var tt=R[Z];if(typeof tt!="function")throw new We(v);if(q&&!it&&Mn(tt)=="wrapper")var it=new Ye([],!0)}for(Z=it?Z:U;++Z1&&Kt.reverse(),xt&<nt))return!1;var mt=tt.get(E),xt=tt.get(R);if(mt&&xt)return mt==R&&xt==E;var yt=-1,Pt=!0,wt=U&i?new Xi:A;for(tt.set(E,R),tt.set(R,E);++yt1?"& ":"")+R[Z],R=R.join(U>2?", ":" "),E.replace(_f,`{ +/* [wrapped with `+R+`] */ +`)}function qc(E){return bt(E)||Ki(E)||!!(vh&&E&&E[vh])}function mi(E,R){var U=typeof E;return R=R??N,!!R&&(U=="number"||U!="symbol"&&ud.test(E))&&E>-1&&E%1==0&&E0){if(++R>=M)return arguments[0]}else R=0;return E.apply(A,arguments)}}function Rn(E,R){var U=-1,Z=E.length,q=Z-1;for(R=R===A?Z:R;++U1?E[R-1]:A;return U=typeof U=="function"?(E.pop(),U):A,El(E,U)});function Pl(E){var R=_(E);return R.__chain__=!0,R}function l0(E,R){return R(E),E}function Fn(E,R){return R(E)}var u0=gi(function(E){var R=E.length,U=R?E[0]:0,Z=this.__wrapped__,q=function(tt){return Kr(tt,E)};return R>1||this.__actions__.length||!(Z instanceof Yt)||!mi(U)?this.thru(q):(Z=Z.slice(U,+U+(R?1:0)),Z.__actions__.push({func:Fn,args:[q],thisArg:A}),new Ye(Z,this.__chain__).thru(function(tt){return R&&!tt.length&&tt.push(A),tt}))});function f0(){return Pl(this)}function d0(){return new Ye(this.value(),this.__chain__)}function v0(){this.__values__===A&&(this.__values__=zl(this.value()));var E=this.__index__>=this.__values__.length,R=E?A:this.__values__[this.__index__++];return{done:E,value:R}}function c0(){return this}function p0(E){for(var R,U=this;U instanceof cn;){var Z=ml(U);Z.__index__=0,Z.__values__=A,R?q.__wrapped__=Z:R=Z;var q=Z;U=U.__wrapped__}return q.__wrapped__=E,R}function g0(){var E=this.__wrapped__;if(E instanceof Yt){var R=E;return this.__actions__.length&&(R=new Yt(this)),R=R.reverse(),R.__actions__.push({func:Fn,args:[ya],thisArg:A}),new Ye(R,this.__chain__)}return this.thru(ya)}function m0(){return Xh(this.__wrapped__,this.__actions__)}var x0=Sn(function(E,R,U){jt.call(E,U)?++E[U]:ci(E,U,1)});function y0(E,R,U){var Z=bt(E)?_o:lc;return U&&Ae(E,R,U)&&(R=A),Z(E,Ft(R,3))}function T0(E,R){var U=bt(E)?Ci:Eh;return U(E,Ft(R,3))}var S0=kh(xl),C0=kh(yl);function E0(E,R){return Te(Ln(E,R),1)}function P0(E,R){return Te(Ln(E,R),b)}function A0(E,R,U){return U=U===A?1:zt(U),Te(Ln(E,R),U)}function Al(E,R){var U=bt(E)?Ve:wi;return U(E,Ft(R,3))}function Ml(E,R){var U=bt(E)?Hd:Ch;return U(E,Ft(R,3))}var M0=Sn(function(E,R,U){jt.call(E,U)?E[U].push(R):ci(E,U,[R])});function w0(E,R,U,Z){E=Re(E)?E:us(E),U=U&&!Z?zt(U):0;var q=E.length;return U<0&&(U=ce(q+U,0)),bn(E)?U<=q&&E.indexOf(R,U)>-1:!!q&&_i(E,R,U)>-1}var R0=Xt(function(E,R,U){var Z=-1,q=typeof R=="function",tt=Re(E)?dt(E.length):[];return wi(E,function(it){tt[++Z]=q?De(R,it,U):Rs(it,R,U)}),tt}),F0=Sn(function(E,R,U){ci(E,U,R)});function Ln(E,R){var U=bt(E)?ie:Fh;return U(E,Ft(R,3))}function L0(E,R,U,Z){return E==null?[]:(bt(R)||(R=R==null?[]:[R]),U=Z?A:U,bt(U)||(U=U==null?[]:[U]),Ih(E,R,U))}var O0=Sn(function(E,R,U){E[U?0:1].push(R)},function(){return[[],[]]});function D0(E,R,U){var Z=bt(E)?Dr:sh,q=arguments.length<3;return Z(E,Ft(R,4),U,q,wi)}function I0(E,R,U){var Z=bt(E)?Kd:sh,q=arguments.length<3;return Z(E,Ft(R,4),U,q,Ch)}function B0(E,R){var U=bt(E)?Ci:Eh;return U(E,In(Ft(R,3)))}function b0(E){var R=bt(E)?xh:wc;return R(E)}function G0(E,R,U){(U?Ae(E,R,U):R===A)?R=1:R=zt(R);var Z=bt(E)?nc:Rc;return Z(E,R)}function N0(E){var R=bt(E)?rc:Lc;return R(E)}function z0(E){if(E==null)return 0;if(Re(E))return bn(E)?es(E):E.length;var R=Ee(E);return R==rt||R==Ct?E.size:kr(E).length}function U0(E,R,U){var Z=bt(E)?Ir:Oc;return U&&Ae(E,R,U)&&(R=A),Z(E,Ft(R,3))}var X0=Xt(function(E,R){if(E==null)return[];var U=R.length;return U>1&&Ae(E,R[0],R[1])?R=[]:U>2&&Ae(R[0],R[1],R[2])&&(R=[R[0]]),Ih(E,Te(R,1),[])}),On=Tv||function(){return ge.Date.now()};function V0(E,R){if(typeof R!="function")throw new We(v);return E=zt(E),function(){if(--E<1)return R.apply(this,arguments)}}function wl(E,R,U){return R=U?A:R,R=E&&R==null?E.length:R,pi(E,g,A,A,A,A,R)}function Rl(E,R){var U;if(typeof R!="function")throw new We(v);return E=zt(E),function(){return--E>0&&(U=R.apply(this,arguments)),E<=1&&(R=A),U}}var Sa=Xt(function(E,R,U){var Z=h;if(U.length){var q=Pi(U,hs(Sa));Z|=d}return pi(E,Z,R,U,q)}),Fl=Xt(function(E,R,U){var Z=h|s;if(U.length){var q=Pi(U,hs(Fl));Z|=d}return pi(R,Z,E,U,q)});function Ll(E,R,U){R=U?A:R;var Z=pi(E,f,A,A,A,A,A,R);return Z.placeholder=Ll.placeholder,Z}function Ol(E,R,U){R=U?A:R;var Z=pi(E,u,A,A,A,A,A,R);return Z.placeholder=Ol.placeholder,Z}function Dl(E,R,U){var Z,q,tt,it,nt,lt,mt=0,xt=!1,yt=!1,Pt=!0;if(typeof E!="function")throw new We(v);R=Ze(R)||0,ne(U)&&(xt=!!U.leading,yt="maxWait"in U,tt=yt?ce(Ze(U.maxWait)||0,R):tt,Pt="trailing"in U?!!U.trailing:Pt);function wt(fe){var si=Z,Ti=q;return Z=q=A,mt=fe,it=E.apply(Ti,si),it}function Lt(fe){return mt=fe,nt=Is(Wt,R),xt?wt(fe):it}function Ut(fe){var si=fe-lt,Ti=fe-mt,kl=R-si;return yt?Ce(kl,tt-Ti):kl}function Ot(fe){var si=fe-lt,Ti=fe-mt;return lt===A||si>=R||si<0||yt&&Ti>=tt}function Wt(){var fe=On();if(Ot(fe))return Kt(fe);nt=Is(Wt,Ut(fe))}function Kt(fe){return nt=A,Pt&&Z?wt(fe):(Z=q=A,it)}function Ge(){nt!==A&&Wh(nt),mt=0,Z=lt=q=nt=A}function Me(){return nt===A?it:Kt(On())}function Ne(){var fe=On(),si=Ot(fe);if(Z=arguments,q=this,lt=fe,si){if(nt===A)return Lt(lt);if(yt)return Wh(nt),nt=Is(Wt,R),wt(lt)}return nt===A&&(nt=Is(Wt,R)),it}return Ne.cancel=Ge,Ne.flush=Me,Ne}var W0=Xt(function(E,R){return Sh(E,1,R)}),Y0=Xt(function(E,R,U){return Sh(E,Ze(R)||0,U)});function H0(E){return pi(E,x)}function Dn(E,R){if(typeof E!="function"||R!=null&&typeof R!="function")throw new We(v);var U=function(){var Z=arguments,q=R?R.apply(this,Z):Z[0],tt=U.cache;if(tt.has(q))return tt.get(q);var it=E.apply(this,Z);return U.cache=tt.set(q,it)||tt,it};return U.cache=new(Dn.Cache||vi),U}Dn.Cache=vi;function In(E){if(typeof E!="function")throw new We(v);return function(){var R=arguments;switch(R.length){case 0:return!E.call(this);case 1:return!E.call(this,R[0]);case 2:return!E.call(this,R[0],R[1]);case 3:return!E.call(this,R[0],R[1],R[2])}return!E.apply(this,R)}}function K0(E){return Rl(2,E)}var $0=Dc(function(E,R){R=R.length==1&&bt(R[0])?ie(R[0],Ie(Ft())):ie(Te(R,1),Ie(Ft()));var U=R.length;return Xt(function(Z){for(var q=-1,tt=Ce(Z.length,U);++q=R}),Ki=Mh(function(){return arguments}())?Mh:function(E){return he(E)&&jt.call(E,"callee")&&!dh.call(E,"callee")},bt=dt.isArray,og=Zo?Ie(Zo):pc;function Re(E){return E!=null&&Bn(E.length)&&!xi(E)}function ue(E){return he(E)&&Re(E)}function hg(E){return E===!0||E===!1||he(E)&&Pe(E)==H}var Oi=Cv||Ia,lg=Jo?Ie(Jo):gc;function ug(E){return he(E)&&E.nodeType===1&&!Bs(E)}function fg(E){if(E==null)return!0;if(Re(E)&&(bt(E)||typeof E=="string"||typeof E.splice=="function"||Oi(E)||ls(E)||Ki(E)))return!E.length;var R=Ee(E);if(R==rt||R==Ct)return!E.size;if(Ds(E))return!kr(E).length;for(var U in E)if(jt.call(E,U))return!1;return!0}function dg(E,R){return Fs(E,R)}function vg(E,R,U){U=typeof U=="function"?U:A;var Z=U?U(E,R):A;return Z===A?Fs(E,R,A,U):!!Z}function Ea(E){if(!he(E))return!1;var R=Pe(E);return R==k||R==Q||typeof E.message=="string"&&typeof E.name=="string"&&!Bs(E)}function cg(E){return typeof E=="number"&&ch(E)}function xi(E){if(!ne(E))return!1;var R=Pe(E);return R==et||R==st||R==W||R==Et}function Bl(E){return typeof E=="number"&&E==zt(E)}function Bn(E){return typeof E=="number"&&E>-1&&E%1==0&&E<=N}function ne(E){var R=typeof E;return E!=null&&(R=="object"||R=="function")}function he(E){return E!=null&&typeof E=="object"}var bl=jo?Ie(jo):xc;function pg(E,R){return E===R||Qr(E,R,va(R))}function gg(E,R,U){return U=typeof U=="function"?U:A,Qr(E,R,va(R),U)}function mg(E){return Gl(E)&&E!=+E}function xg(E){if(ep(E))throw new Bt(G);return wh(E)}function yg(E){return E===null}function Tg(E){return E==null}function Gl(E){return typeof E=="number"||he(E)&&Pe(E)==ot}function Bs(E){if(!he(E)||Pe(E)!=at)return!1;var R=on(E);if(R===null)return!0;var U=jt.call(R,"constructor")&&R.constructor;return typeof U=="function"&&U instanceof U&&sn.call(U)==gv}var Pa=Qo?Ie(Qo):yc;function Sg(E){return Bl(E)&&E>=-N&&E<=N}var Nl=ko?Ie(ko):Tc;function bn(E){return typeof E=="string"||!bt(E)&&he(E)&&Pe(E)==vt}function be(E){return typeof E=="symbol"||he(E)&&Pe(E)==Tt}var ls=qo?Ie(qo):Sc;function Cg(E){return E===A}function Eg(E){return he(E)&&Ee(E)==At}function Pg(E){return he(E)&&Pe(E)==Dt}var Ag=An(qr),Mg=An(function(E,R){return E<=R});function zl(E){if(!E)return[];if(Re(E))return bn(E)?ti(E):we(E);if(Ss&&E[Ss])return nv(E[Ss]());var R=Ee(E),U=R==rt?Ur:R==Ct?_s:us;return U(E)}function yi(E){if(!E)return E===0?E:0;if(E=Ze(E),E===b||E===-b){var R=E<0?-1:1;return R*V}return E===E?E:0}function zt(E){var R=yi(E),U=R%1;return R===R?U?R-U:R:0}function Ul(E){return E?Vi(zt(E),0,$):0}function Ze(E){if(typeof E=="number")return E;if(be(E))return K;if(ne(E)){var R=typeof E.valueOf=="function"?E.valueOf():E;E=ne(R)?R+"":R}if(typeof E!="string")return E===0?E:+E;E=nh(E);var U=od.test(E);return U||ld.test(E)?Vd(E.slice(2),U?2:8):ad.test(E)?K:+E}function Xl(E){return ai(E,Fe(E))}function wg(E){return E?Vi(zt(E),-N,N):E===0?E:0}function Jt(E){return E==null?"":Be(E)}var Rg=as(function(E,R){if(Ds(R)||Re(R)){ai(R,me(R),E);return}for(var U in R)jt.call(R,U)&&Ms(E,U,R[U])}),Vl=as(function(E,R){ai(R,Fe(R),E)}),Gn=as(function(E,R,U,Z){ai(R,Fe(R),E,Z)}),Fg=as(function(E,R,U,Z){ai(R,me(R),E,Z)}),Lg=gi(Kr);function Og(E,R){var U=rs(E);return R==null?U:yh(U,R)}var Dg=Xt(function(E,R){E=qt(E);var U=-1,Z=R.length,q=Z>2?R[2]:A;for(q&&Ae(R[0],R[1],q)&&(Z=1);++U1),tt}),ai(E,fa(E),U),Z&&(U=He(U,o|r|n,Yc));for(var q=R.length;q--;)sa(U,R[q]);return U});function Qg(E,R){return Yl(E,In(Ft(R)))}var kg=gi(function(E,R){return E==null?{}:Pc(E,R)});function Yl(E,R){if(E==null)return{};var U=ie(fa(E),function(Z){return[Z]});return R=Ft(R),Bh(E,U,function(Z,q){return R(Z,q[0])})}function qg(E,R,U){R=Fi(R,E);var Z=-1,q=R.length;for(q||(q=1,E=A);++ZR){var Z=E;E=R,R=Z}if(U||E%1||R%1){var q=ph();return Ce(E+q*(R-E+Xd("1e-"+((q+"").length-1))),R)}return ta(E,R)}var lm=os(function(E,R,U){return R=R.toLowerCase(),E+(U?$l(R):R)});function $l(E){return wa(Jt(E).toLowerCase())}function Zl(E){return E=Jt(E),E&&E.replace(fd,_d).replace(Ld,"")}function um(E,R,U){E=Jt(E),R=Be(R);var Z=E.length;U=U===A?Z:Vi(zt(U),0,Z);var q=U;return U-=R.length,U>=0&&E.slice(U,q)==R}function fm(E){return E=Jt(E),E&&Kf.test(E)?E.replace(Po,tv):E}function dm(E){return E=Jt(E),E&&kf.test(E)?E.replace(Cr,"\\$&"):E}var vm=os(function(E,R,U){return E+(U?"-":"")+R.toLowerCase()}),cm=os(function(E,R,U){return E+(U?" ":"")+R.toLowerCase()}),pm=Qh("toLowerCase");function gm(E,R,U){E=Jt(E),R=zt(R);var Z=R?es(E):0;if(!R||Z>=R)return E;var q=(R-Z)/2;return Pn(fn(q),U)+E+Pn(un(q),U)}function mm(E,R,U){E=Jt(E),R=zt(R);var Z=R?es(E):0;return R&&Z>>0,U?(E=Jt(E),E&&(typeof R=="string"||R!=null&&!Pa(R))&&(R=Be(R),!R&&ts(E))?Li(ti(E),0,U):E.split(R,U)):[]}var Pm=os(function(E,R,U){return E+(U?" ":"")+wa(R)});function Am(E,R,U){return E=Jt(E),U=U==null?0:Vi(zt(U),0,E.length),R=Be(R),E.slice(U,U+R.length)==R}function Mm(E,R,U){var Z=_.templateSettings;U&&Ae(E,R,U)&&(R=A),E=Jt(E),R=Gn({},R,Z,sl);var q=Gn({},R.imports,Z.imports,sl),tt=me(q),it=zr(q,tt),nt,lt,mt=0,xt=R.interpolate||Js,yt="__p += '",Pt=Xr((R.escape||Js).source+"|"+xt.source+"|"+(xt===Ao?rd:Js).source+"|"+(R.evaluate||Js).source+"|$","g"),wt="//# sourceURL="+(jt.call(R,"sourceURL")?(R.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++bd+"]")+` +`;E.replace(Pt,function(Ot,Wt,Kt,Ge,Me,Ne){return Kt||(Kt=Ge),yt+=E.slice(mt,Ne).replace(dd,ev),Wt&&(nt=!0,yt+=`' + +__e(`+Wt+`) + +'`),Me&&(lt=!0,yt+=`'; +`+Me+`; +__p += '`),Kt&&(yt+=`' + +((__t = (`+Kt+`)) == null ? '' : __t) + +'`),mt=Ne+Ot.length,Ot}),yt+=`'; +`;var Lt=jt.call(R,"variable")&&R.variable;if(!Lt)yt=`with (obj) { +`+yt+` +} +`;else if(sd.test(Lt))throw new Bt(m);yt=(lt?yt.replace(li,""):yt).replace(ui,"$1").replace(fi,"$1;"),yt="function("+(Lt||"obj")+`) { +`+(Lt?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(nt?", __e = _.escape":"")+(lt?`, __j = Array.prototype.join; +function print() { __p += __j.call(arguments, '') } +`:`; +`)+yt+`return __p +}`;var Ut=jl(function(){return Zt(tt,wt+"return "+yt).apply(A,it)});if(Ut.source=yt,Ea(Ut))throw Ut;return Ut}function wm(E){return Jt(E).toLowerCase()}function Rm(E){return Jt(E).toUpperCase()}function Fm(E,R,U){if(E=Jt(E),E&&(U||R===A))return nh(E);if(!E||!(R=Be(R)))return E;var Z=ti(E),q=ti(R),tt=rh(Z,q),it=ah(Z,q)+1;return Li(Z,tt,it).join("")}function Lm(E,R,U){if(E=Jt(E),E&&(U||R===A))return E.slice(0,hh(E)+1);if(!E||!(R=Be(R)))return E;var Z=ti(E),q=ah(Z,ti(R))+1;return Li(Z,0,q).join("")}function Om(E,R,U){if(E=Jt(E),E&&(U||R===A))return E.replace(Er,"");if(!E||!(R=Be(R)))return E;var Z=ti(E),q=rh(Z,ti(R));return Li(Z,q).join("")}function Dm(E,R){var U=T,Z=S;if(ne(R)){var q="separator"in R?R.separator:q;U="length"in R?zt(R.length):U,Z="omission"in R?Be(R.omission):Z}E=Jt(E);var tt=E.length;if(ts(E)){var it=ti(E);tt=it.length}if(U>=tt)return E;var nt=U-es(Z);if(nt<1)return Z;var lt=it?Li(it,0,nt).join(""):E.slice(0,nt);if(q===A)return lt+Z;if(it&&(nt+=lt.length-nt),Pa(q)){if(E.slice(nt).search(q)){var mt,xt=lt;for(q.global||(q=Xr(q.source,Jt(Mo.exec(q))+"g")),q.lastIndex=0;mt=q.exec(xt);)var yt=mt.index;lt=lt.slice(0,yt===A?nt:yt)}}else if(E.indexOf(Be(q),nt)!=nt){var Pt=lt.lastIndexOf(q);Pt>-1&&(lt=lt.slice(0,Pt))}return lt+Z}function Im(E){return E=Jt(E),E&&Hf.test(E)?E.replace(Eo,hv):E}var Bm=os(function(E,R,U){return E+(U?" ":"")+R.toUpperCase()}),wa=Qh("toUpperCase");function Jl(E,R,U){return E=Jt(E),R=U?A:R,R===A?sv(E)?fv(E):Jd(E):E.match(R)||[]}var jl=Xt(function(E,R){try{return De(E,A,R)}catch(U){return Ea(U)?U:new Bt(U)}}),bm=gi(function(E,R){return Ve(R,function(U){U=oi(U),ci(E,U,Sa(E[U],E))}),E});function Gm(E){var R=E==null?0:E.length,U=Ft();return E=R?ie(E,function(Z){if(typeof Z[1]!="function")throw new We(v);return[U(Z[0]),Z[1]]}):[],Xt(function(Z){for(var q=-1;++qN)return[];var U=$,Z=Ce(E,$);R=Ft(R),E-=$;for(var q=Nr(Z,R);++U0||R<0)?new Yt(U):(E<0?U=U.takeRight(-E):E&&(U=U.drop(E)),R!==A&&(R=zt(R),U=R<0?U.dropRight(-R):U.take(R-E)),U)},Yt.prototype.takeRightWhile=function(E){return this.reverse().takeWhile(E).reverse()},Yt.prototype.toArray=function(){return this.take($)},ri(Yt.prototype,function(E,R){var U=/^(?:filter|find|map|reject)|While$/.test(R),Z=/^(?:head|last)$/.test(R),q=_[Z?"take"+(R=="last"?"Right":""):R],tt=Z||/^find/.test(R);q&&(_.prototype[R]=function(){var it=this.__wrapped__,nt=Z?[1]:arguments,lt=it instanceof Yt,mt=nt[0],xt=lt||bt(it),yt=function(Wt){var Kt=q.apply(_,Ei([Wt],nt));return Z&&Pt?Kt[0]:Kt};xt&&U&&typeof mt=="function"&&mt.length!=1&&(lt=xt=!1);var Pt=this.__chain__,wt=!!this.__actions__.length,Lt=tt&&!Pt,Ut=lt&&!wt;if(!tt&&xt){it=Ut?it:new Yt(this);var Ot=E.apply(it,nt);return Ot.__actions__.push({func:Fn,args:[yt],thisArg:A}),new Ye(Ot,Pt)}return Lt&&Ut?E.apply(this,nt):(Ot=this.thru(yt),Lt?Z?Ot.value()[0]:Ot.value():Ot)})}),Ve(["pop","push","shift","sort","splice","unshift"],function(E){var R=tn[E],U=/^(?:push|sort|unshift)$/.test(E)?"tap":"thru",Z=/^(?:pop|shift)$/.test(E);_.prototype[E]=function(){var q=arguments;if(Z&&!this.__chain__){var tt=this.value();return R.apply(bt(tt)?tt:[],q)}return this[U](function(it){return R.apply(bt(it)?it:[],q)})}}),ri(Yt.prototype,function(E,R){var U=_[R];if(U){var Z=U.name+"";jt.call(ns,Z)||(ns[Z]=[]),ns[Z].push({name:R,func:U})}}),ns[Cn(A,s).name]=[{name:"wrapper",func:A}],Yt.prototype.clone=Iv,Yt.prototype.reverse=Bv,Yt.prototype.value=bv,_.prototype.at=u0,_.prototype.chain=f0,_.prototype.commit=d0,_.prototype.next=v0,_.prototype.plant=p0,_.prototype.reverse=g0,_.prototype.toJSON=_.prototype.valueOf=_.prototype.value=m0,_.prototype.first=_.prototype.head,Ss&&(_.prototype[Ss]=c0),_},Ai=dv();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(ge._=Ai,define(function(){return Ai})):Ni?((Ni.exports=Ai)._=Ai,Fr._=Ai):ge._=Ai}).call(P)}),Uf=class extends Set{constructor(P,C=!1){super(P),this.valuesAsFlags=C}};function Vs(P){if(P instanceof Map)return Object.fromEntries([...P.entries()].map(([C,A])=>[C,Vs(A)]));if(P instanceof Set)return Array.from(P.values()).map(Vs);if(P instanceof Uf)return{values:[...P.values()],valuesAsFlags:P.valuesAsFlags};if(typeof P=="object"){let C={};return Object.entries(P).forEach(([A,I])=>{C[A]=Vs(I)}),C}else return P}So(Co(),1);var LT=So(Co(),1);function Ji(P,C){if(typeof P!="object")throw new Error(`Cannot merge into non-object objectToMergeWith. Received: ${JSON.stringify(P)}`);if(typeof C!="object")throw new Error(`Cannot merge using non-object objectToMergeWith. Received: ${JSON.stringify(C)}`);let A=(0,LT.cloneDeep)(P);for(let[I,B]of Object.entries(C))typeof B!="object"||B instanceof Set||A[I]===void 0?A[I]=B:A[I]=Ji(A[I],B);return A}function Xf(P,C){if(!(P===void 0||typeof P!="object"))for(let A of Object.keys(P)){if(A===C)return P[A];let I=P[A];if(typeof I=="object"){let B=Xf(I,C);if(B!==void 0)return B}}}var Xa="@composite:",OT="@inherit:",DT=class{constructor(P,C,A){this.tiledClassToMembersMap=P,this.enumNameToValuesMap=C,this.parserOptions=A,this.memoiser=new Map}flattenMembers(P,C){return this.memoiser.has(P)?{[P]:this.memoiser.get(P)}:(this.memoiser.set(P,C.reduce((A,I)=>se(se({},A),this.flattenMemberProperty(I)),{})),{[P]:this.memoiser.get(P)})}flattenMemberProperty(P){var C;let A=(C=P.propertyType)!=null?C:P.propertytype;if(P.type==="class"){if(!this.memoiser.has(A)){let G=this.tiledClassToMembersMap.get(A).reduce((v,m)=>Ji(this.flattenMemberProperty(m),v),{});this.memoiser.set(A,G)}let I=this.memoiser.get(A),B=Ji(I,this.flattenValue(P.value,I));return this.checkIfShouldFlatten(P.name)?B:{[P.name.replace(Xa,"")]:B}}else return this.enumNameToValuesMap.has(A)?this.enumNameToValuesMap.get(A).valuesAsFlags?{[P.name]:new Set(P.value.split(",").filter(I=>I!==""))}:{[P.name]:P.value}:{[P.name]:P.value}}get memoisedFlattenedProperties(){return this.memoiser}flattenValue(P,C){return Object.entries(P).reduce((A,[I,B])=>{if(typeof B!="object")return Xf(C,I)instanceof Set?Ji({[I]:new Set(B.split(",").filter(G=>G!==""))},A):Ji({[I]:B},A);if(this.checkIfShouldFlatten(I))return Ji(this.flattenValue(B,C),A);{let G=I.replace(Xa,"");return Ji({[G]:this.flattenValue(B,C)},A)}},{})}checkIfShouldFlatten(P){var C;return((C=this.parserOptions)==null?void 0:C.defaultComposite)===!0?P.startsWith(OT):!P.startsWith(Xa)}},Pu=So(Co(),1),IT=class{constructor(P){this.flattener=P}flattenPropertiesOnObject(P){var C,A,I,B;return Bi(se(se({},this.flattener.memoisedFlattenedProperties.get((C=P.class)!=null?C:P.type)),(A=P.properties)==null?void 0:A.reduce((G,v)=>se(se({},G),this.flattener.flattenMemberProperty(v)),{})),{name:P.name,id:P.id,class:(B=(I=P.class)!=null?I:P.type)!=null?B:null,x:P.x,y:P.y})}flattenPropertiesOnTile(P){var C,A,I,B;return Bi(se(se({},this.flattener.memoisedFlattenedProperties.get((C=P.class)!=null?C:P.type)),(A=P.properties)==null?void 0:A.reduce((G,v)=>se(se({},G),this.flattener.flattenMemberProperty(v)),{})),{id:P.id,class:(B=(I=P.class)!=null?I:P.type)!=null?B:null})}getCustomTypesMap(){return new Map([...this.flattener.memoisedFlattenedProperties.entries()].map(([P,C])=>[P,(0,Pu.cloneDeep)(C)]))}getEnumsMap(){return new Map([...this.flattener.enumNameToValuesMap.entries()].map(([P,C])=>[P,(0,Pu.cloneDeep)(C)]))}toJSON(){return JSON.stringify({customTypes:Vs(this.getCustomTypesMap()),enums:Vs(this.getEnumsMap())},null,4)}};function BT(P,C){let A=new Map(P.propertyTypes.filter(G=>G.type==="enum").map(G=>[G.name,new Uf(G.values,G.valuesAsFlags)])),I=new Map(P.propertyTypes.filter(G=>G.type==="class").map(G=>[G.name,G.members])),B=new DT(I,A,C);return I.forEach((G,v)=>{B.flattenMembers(v,G)}),new IT(B)}var bT={parse:BT},Vf=class{constructor(P,C){this.phaserTile=P,this.tiledProject=C}getProperty(P){var C,A;let I={};if(this.tiledProject){let B=bT.parse(this.tiledProject),G=this.getType();if(G){let v=(C=B.getCustomTypesMap())==null?void 0:C.get(G);if(v)for(let[m,t]of Object.entries(v))I[m]=t}}return(A=this.phaserTile.properties[P])!=null?A:I[P]}hasProperty(P){return this.getProperty(P)!=null}getType(){var P,C;return(C=(P=this.phaserTile.tileset)==null?void 0:P.tileData[this.phaserTile.index-1])==null?void 0:C.type}},GT=class{constructor(P,C){this.phaserTilemapLayer=P,this.tiledProject=C}getName(){return this.phaserTilemapLayer.layer.name}getProperty(P){let C=this.phaserTilemapLayer.layer.properties,A=C?.find(I=>I.name==P);return A?.value}hasProperty(P){return this.getProperty(P)!=null}isCharLayer(){return this.hasProperty(Kn)}getData(){return this.phaserTilemapLayer.layer.data.map(P=>P.map(C=>new Vf(C,this.tiledProject)))}},NT=class{constructor(P,C){this.phaserTilemap=P,this.tiledProject=C;for(let A of this.phaserTilemap.layers)if(A.tilemapLayer==null)throw new Error(`Error initializing tilemap. Layer '${A.name}' has no 'tilemapLayer'. This can happen if you call 'createLayer' with the wrong layer ID.`)}getTileWidth(){return this.phaserTilemap.tileWidth}getTileHeight(){return this.phaserTilemap.tileHeight}getWidth(){return this.phaserTilemap.width}getHeight(){return this.phaserTilemap.height}getOrientation(){return this.phaserTilemap.orientation==Phaser.Tilemaps.Orientation.ISOMETRIC.toString()?"isometric":"orthogonal"}getLayers(){return this.phaserTilemap.layers.map(P=>new GT(P.tilemapLayer,this.tiledProject))}hasTileAt(P,C,A){return!!this.phaserTilemap.hasTileAt(P,C,A)}getTileAt(P,C,A){let I=this.phaserTilemap.getTileAt(P,C,!1,A);if(I)return new Vf(I,this.tiledProject)}},Wf=class _a{constructor(C){this.scene=C,this.geHeadless=new yT(!1),this.isCreatedInternal=!1,_a.welcomeMessagePrinted||(console.log(`Using GridEngine Phaser Plugin v${If}`),_a.welcomeMessagePrinted=!0),this.scene.sys.events.once("boot",this.boot,this)}boot(){this.scene.sys.events.on("update",this.update,this)}getCharLayer(C){return this.geHeadless.getCharLayer(C)}getTransition(C,A){return this.geHeadless.getTransition(C,A)}setTransition(C,A,I){this.geHeadless.setTransition(C,A,I)}create(C,A){this.geHeadless.create(new NT(C,A.tiledProject),A),this.isCreatedInternal=!0,this.gridCharacters=new Map;let I=this.setConfigDefaults(A);this.config=I,this.gridTilemap=new qa(C),this.addCharacters()}getPosition(C){return this.geHeadless.getPosition(C)}move(C,A){this.geHeadless.move(C,A)}moveRandomly(C,A=0,I=-1){this.geHeadless.moveRandomly(C,A,I)}getMovement(C){return this.geHeadless.getMovement(C)}moveTo(C,A,I){return this.geHeadless.moveTo(C,A,I)}stopMovement(C){this.geHeadless.stopMovement(C)}setSpeed(C,A){this.geHeadless.setSpeed(C,A)}getSpeed(C){return this.geHeadless.getSpeed(C)}setContainer(C,A){var I;this.initGuard();let B=(I=this.gridCharacters)==null?void 0:I.get(C);if(!B)throw this.createCharUnknownErr(C);B.setContainer(A)}getContainer(C){var A;this.initGuard();let I=(A=this.gridCharacters)==null?void 0:A.get(C);if(!I)throw this.createCharUnknownErr(C);return I.getContainer()}getOffsetX(C){var A;this.initGuard();let I=(A=this.gridCharacters)==null?void 0:A.get(C);if(!I)throw this.createCharUnknownErr(C);return I.getOffsetX()}setOffsetX(C,A){var I;this.initGuard();let B=(I=this.gridCharacters)==null?void 0:I.get(C);if(!B)throw this.createCharUnknownErr(C);B.setOffsetX(A)}getOffsetY(C){var A;this.initGuard();let I=(A=this.gridCharacters)==null?void 0:A.get(C);if(!I)throw this.createCharUnknownErr(C);return I.getOffsetY()}setOffsetY(C,A){var I;this.initGuard();let B=(I=this.gridCharacters)==null?void 0:I.get(C);if(!B)throw this.createCharUnknownErr(C);B.setOffsetY(A)}collidesWithTiles(C){return this.geHeadless.collidesWithTiles(C)}getWalkingAnimationMapping(C){var A;this.initGuard();let I=(A=this.gridCharacters)==null?void 0:A.get(C);if(!I)throw this.createCharUnknownErr(C);let B=I.getAnimation();return B?.getWalkingAnimationMapping()}hasLayerOverlay(){var C;return this.initGuard(),!!((C=this.config)!=null&&C.layerOverlay)}setWalkingAnimationMapping(C,A){var I;this.initGuard();let B=(I=this.gridCharacters)==null?void 0:I.get(C);if(!B)throw this.createCharUnknownErr(C);let G=B.getAnimation();G?.setWalkingAnimationMapping(A)}update(C,A){if(this.isCreatedInternal&&this.gridCharacters)for(let[I,B]of this.gridCharacters)B.update(A);this.geHeadless.update(C,A)}addCharacter(C){this.geHeadless.addCharacter(C),this.addCharacterInternal(C)}hasCharacter(C){return this.geHeadless.hasCharacter(C)}removeCharacter(C){var A,I;this.initGuard();let B=(A=this.gridCharacters)==null?void 0:A.get(C);if(!B)throw this.createCharUnknownErr(C);B.destroy(),(I=this.gridCharacters)==null||I.delete(C),this.geHeadless.removeCharacter(C)}removeAllCharacters(){if(this.initGuard(),!!this.gridCharacters){for(let C of this.gridCharacters.keys())this.removeCharacter(C);this.geHeadless.removeAllCharacters()}}getAllCharacters(C){return this.geHeadless.getAllCharacters(C)}getLabels(C){return this.geHeadless.getLabels(C)}addLabels(C,A){this.geHeadless.addLabels(C,A)}removeLabels(C,A){this.geHeadless.removeLabels(C,A)}clearLabels(C){this.geHeadless.clearLabels(C)}follow(C,A,I,B){let G;I===void 0?G={distance:0,closestPointIfBlocked:!1}:typeof I=="number"?(G={distance:I,closestPointIfBlocked:!1},B&&(G.closestPointIfBlocked=!0)):G=I,this.geHeadless.follow(C,A,G)}isMoving(C){return this.geHeadless.isMoving(C)}getFacingDirection(C){return this.geHeadless.getFacingDirection(C)}getFacingPosition(C){return this.geHeadless.getFacingPosition(C)}turnTowards(C,A){var I;this.initGuard();let B=(I=this.gridCharacters)==null?void 0:I.get(C);if(!B)throw this.createCharUnknownErr(C);B.turnTowards(A),this.geHeadless.turnTowards(C,A)}getCharactersAt(C,A){return this.geHeadless.getCharactersAt(C,A)}setPosition(C,A,I){this.geHeadless.setPosition(C,A,I)}getSprite(C){var A;this.initGuard();let I=(A=this.gridCharacters)==null?void 0:A.get(C);if(!I)throw this.createCharUnknownErr(C);return I.getSprite()}setSprite(C,A){var I;this.initGuard();let B=(I=this.gridCharacters)==null?void 0:I.get(C);if(!B)throw this.createCharUnknownErr(C);A.setOrigin(0,0),B.setSprite(A)}isBlocked(C,A,I=["geDefault"]){return this.geHeadless.isBlocked(C,A,I)}isTileBlocked(C,A){return this.geHeadless.isTileBlocked(C,A)}getCollisionGroups(C){return this.geHeadless.getCollisionGroups(C)}setCollisionGroups(C,A){this.geHeadless.setCollisionGroups(C,A)}getIgnoreCollisionGroups(C){return this.geHeadless.getIgnoreCollisionGroups(C)}setIgnoreCollisionGroups(C,A){this.geHeadless.setIgnoreCollisionGroups(C,A)}getTilePosInDirection(C,A,I){return this.geHeadless.getTilePosInDirection(C,A,I)}findShortestPath(C,A,I={}){return this.geHeadless.findShortestPath(C,A,I)}steppedOn(C,A,I){return this.geHeadless.steppedOn(C,A,I)}characterShifted(){return this.geHeadless.characterShifted()}movementStarted(){return this.geHeadless.movementStarted()}movementStopped(){return this.geHeadless.movementStopped()}directionChanged(){return this.geHeadless.directionChanged()}positionChangeStarted(){return this.geHeadless.positionChangeStarted()}positionChangeFinished(){return this.geHeadless.positionChangeFinished()}getMovementProgress(C){return this.geHeadless.getMovementProgress(C)}rebuildTileCollisionCache(C,A,I,B){this.geHeadless.rebuildTileCollisionCache(C,A,I,B)}addQueueMovements(C,A,I){this.geHeadless.addQueueMovements(C,A,I)}getEnqueuedMovements(C){return this.geHeadless.getEnqueuedMovements(C)}queueMovementFinished(){return this.geHeadless.queueMovementFinished()}clearEnqueuedMovements(C){return this.geHeadless.clearEnqueuedMovements(C)}getState(){return{characters:this.geHeadless.getState().characters.map(C=>Bi(se({},C),{offsetX:this.getOffsetX(C.id),offsetY:this.getOffsetY(C.id)}))}}setState(C){if(this.geHeadless.setState(C),this.gridCharacters)for(let A of C.characters){let I=this.gridCharacters.get(A.id);I&&(I.setOffsetX(A.offsetX),I.setOffsetY(A.offsetY))}}getTileCost(C,A,I){return this.initGuard(),this.geHeadless.getTileCost(C,A,I)}setConfigDefaults(C){return se({collisionTilePropertyName:"ge_collide",numberOfDirections:4,characterCollisionStrategy:"BLOCK_TWO_TILES",layerOverlay:!1,cacheTileCollisions:!1},C)}initGuard(){if(!this.isCreatedInternal)throw this.createUninitializedErr()}createUninitializedErr(){throw new Error("GridEngine not initialized. You need to call create() first.")}addCharacters(){var C;(C=this.config)==null||C.characters.forEach(A=>this.addCharacterInternal(A))}createCharUnknownErr(C){return new Error(`Character unknown: ${C}`)}addCharacterInternal(C){var A;if(this.initGuard(),!this.gridTilemap)throw this.createUninitializedErr();if(!this.config)throw this.createUninitializedErr();let I=new tT(C,this.scene,this.gridTilemap,this.config.layerOverlay,this.geHeadless);(A=this.gridCharacters)==null||A.set(C.id,I)}};Wf.welcomeMessagePrinted=!1;var zT=Wf,UT=zT;/*! 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 XT extends uo.Scene{mainMenuButtonImage;mainMenuButtonText;constructor(){super("Preloader")}preload(){this.load.image("mainBg","https://utfs.io/f/2c17f660-7f39-4edf-b83e-122a71014d99-6gflls.webp"),this.load.image("scroll","https://kbve.com/assets/img/fishchip/scroll.webp"),this.load.audio("music","https://kbve.com/assets/img/fishchip/bg.ogg"),this.load.image("creditsBg","https://utfs.io/f/2c17f660-7f39-4edf-b83e-122a71014d99-6gflls.webp"),this.load.audio("type","https://kbve.com/assets/img/fishchip/type.mp3"),this.load.spritesheet("fishing","https://kbve.com/assets/img/fishchip/animate.png",{frameWidth:800,frameHeight:600}),this.load.image("fish","https://kbve.com/assets/img/letter_logo.png"),this.load.image("background","https://kbve.com/assets/img/fishchip/scaled_fish_menu_minigame.webp"),this.load.image("tiles","https://kbve.com/assets/img/fishchip/desert_tileset_1.png"),this.load.tilemapTiledJSON("cloud-city-map","https://kbve.com/assets/img/fishchip/cloud_city.json"),this.load.spritesheet("player","https://kbve.com/assets/img/fishchip/chip_charactersheet_warmer.png",{frameWidth:52,frameHeight:72})}create(){this.sound.get("music")?.isPlaying||this.sound.add("music",{loop:!0,volume:.1}).play(),this.add.image(480,480,"mainBg").setScale(.1),this.mainMenuButtonImage=this.add.image(480,480,"scroll").setAlpha(.9).setScale(.7,.2).setInteractive({useHandCursor:!0}),this.mainMenuButtonText=this.add.text(480,480,"Start Game",{fontFamily:"Arial Black",fontSize:50,color:"#ffffff",stroke:"#000000",strokeThickness:6}).setOrigin(.5).setInteractive({useHandCursor:!0}),this.mainMenuButtonText.on("pointerdown",()=>{this.scene.start("CityScene")},this)}}class vs{constructor(C,A=4){this.bounds=C,this.capacity=A,this.points=[],this.divided=!1,this.cache=new Map}subdivide(){const{xMin:C,yMin:A,xMax:I,yMax:B}=this.bounds,G=(I-C)/2,v=(B-A)/2,m=C,t=A;this.northeast=new vs({xMin:m+G,xMax:m+2*G,yMin:A,yMax:t+v},this.capacity),this.northwest=new vs({xMin:C,xMax:m+G,yMin:A,yMax:t+v},this.capacity),this.southeast=new vs({xMin:m+G,xMax:m+2*G,yMin:t+v,yMax:t+2*v},this.capacity),this.southwest=new vs({xMin:C,xMax:m+G,yMin:t+v,yMax:t+2*v},this.capacity),this.divided=!0}insert(C){return this.contains(C.bounds)?this.points.length=A&&C.xMax<=B&&C.yMin>=I&&C.yMax<=G}generateCacheKey(C){const{xMin:A,xMax:I,yMin:B,yMax:G}=C;return`${A},${I},${B},${G}`}queryRange(C,A=[]){if(!this.intersects(C))return A;for(const I of this.points)this.isWithinBounds(I.bounds,C)&&A.push(I);return this.divided&&(this.northwest?.queryRange(C,A),this.northeast?.queryRange(C,A),this.southwest?.queryRange(C,A),this.southeast?.queryRange(C,A)),A}query(C,A=[]){const I=`${C.x},${C.y}`,B=this.cache.get(I);if(B)return B;if(!this.intersects({xMin:C.x,xMax:C.x,yMin:C.y,yMax:C.y}))return A;for(const G of this.points)this.isWithinRange(C,G.bounds)&&A.push(G);return this.divided&&(this.northwest?.query(C,A),this.northeast?.query(C,A),this.southwest?.query(C,A),this.southeast?.query(C,A)),this.cache.set(I,A),A}intersects(C){const{xMin:A,yMin:I,xMax:B,yMax:G}=this.bounds;return!(C.xMin>B||C.xMaxG||C.yMax=A.xMin&&C.xMin<=A.xMax&&C.yMax>=A.yMin&&C.yMin<=A.yMax}isWithinRange(C,A){return C.x>=A.xMin&&C.x<=A.xMax&&C.y>=A.yMin&&C.y<=A.yMax}}class VT{constructor(C,A,I){this.scene=C,this.gridEngine=A,this.quadtree=I,this.cursor=this.scene.input.keyboard?.createCursorKeys(),this.initializeWASDKeys()}initializeWASDKeys(){const C=this.scene.input.keyboard;C&&(this.wasdKeys={W:C.addKey(Phaser.Input.Keyboard.KeyCodes.W),A:C.addKey(Phaser.Input.Keyboard.KeyCodes.A),S:C.addKey(Phaser.Input.Keyboard.KeyCodes.S),D:C.addKey(Phaser.Input.Keyboard.KeyCodes.D)})}handleMovement(){if(!this.cursor)return;const C=this.cursor,A=this.wasdKeys;if(this.scene.input.keyboard?.addKey("F").isDown){const I=this.gridEngine.getPosition("player"),B=this.quadtree.query(I);for(const G of B)G.action()}(C.left.isDown||A.A.isDown)&&(C.up.isDown||A.W.isDown)?this.gridEngine.move("player","up-left"):(C.left.isDown||A.A.isDown)&&(C.down.isDown||A.S.isDown)?this.gridEngine.move("player","down-left"):(C.right.isDown||A.D.isDown)&&(C.up.isDown||A.W.isDown)?this.gridEngine.move("player","up-right"):(C.right.isDown||A.D.isDown)&&(C.down.isDown||A.S.isDown)?this.gridEngine.move("player","down-right"):C.left.isDown||A.A.isDown?this.gridEngine.move("player","left"):C.right.isDown||A.D.isDown?this.gridEngine.move("player","right"):C.up.isDown||A.W.isDown?this.gridEngine.move("player","up"):(C.down.isDown||A.S.isDown)&&this.gridEngine.move("player","down")}}let tS=class extends Phaser.GameObjects.Sprite{};function WT(P,C,A){const v=P.add.graphics();v.fillStyle(16777215,1),v.fillRoundedRect(0,0,200,60,16),v.setDepth(99);const m=P.add.text(100,30,A,{fontFamily:"Arial",fontSize:16,color:"#000000"});m.setOrigin(.5),m.setWordWrapWidth(200-10*2),m.setDepth(100);const t=P.add.container(0,0,[v,m]);return t.setDepth(100),C.textBubble=t,to(C),t}function to(P){const C=P.textBubble;C&&(C.x=P.x,C.y=P.y-P.height-C.height/2)}function YT(P){return+P[P.length-1]}function HT(P){return P.startsWith("monster_bird_")&&!P.startsWith("monster_bird_shadow")}function Yf(P,C,A,I,B){const G=[];for(let v=0;v<10;v++){const m=P.add.sprite(0,0,"monster_bird");m.setCrop(C,A,I,B),m.scale=3,G.push(m)}return G}function KT(P){return Yf(P,0,0,61,47)}function $T(P){return Yf(P,22,47,16,10)}function ZT(P){P.anims.create({key:"bird",frames:P.anims.generateFrameNumbers("monster_bird",{start:0,end:2}),frameRate:10,repeat:-1,yoyo:!0})}class iS extends Wn.GameObjects.Sprite{textBubble}class JT extends uo.Scene{npcSprite;fishNpcSprite;monsterBirdSprites=[];monsterBirdShadows=[];cursor;gridEngine;quadtree;playerController;constructor(){super({key:"CityScene"});const C={xMin:0,xMax:20,yMin:0,yMax:20};this.quadtree=new vs(C)}preload(){this.load.spritesheet("monster_bird","/assets/monster/bird_original.png",{frameWidth:61,frameHeight:57})}create(){const C=this.make.tilemap({key:"cloud-city-map"});C.addTilesetImage("Cloud City","tiles");for(let B=0;B({id:"monster_bird_"+G,sprite:B,startPosition:{x:7,y:7+G},speed:5,collides:!1})),...this.monsterBirdShadows.map((B,G)=>({id:"monster_bird_shadow_"+G,sprite:B,startPosition:{x:7,y:7+G},speed:5,collides:!1}))],numberOfDirections:8};this.gridEngine.create(C,I),this.loadRanges(),this.playerController=new VT(this,this.gridEngine,this.quadtree),WT(this,this.npcSprite,"Enter the sand pit to start fishing! Go near it and press F!"),this.gridEngine.moveRandomly("npc",1500,3),this.gridEngine.moveRandomly("fishNpc",1500,3);for(let B=0;B<10;B++)this.gridEngine.moveRandomly("monster_bird_"+B,1e3,10);this.gridEngine.positionChangeStarted().subscribe(({charId:B,exitTile:G,enterTile:v})=>{HT(B)&&this.gridEngine.moveTo("monster_bird_shadow_"+YT(B),{x:v.x,y:v.y})}),window.__GRID_ENGINE__=this.gridEngine}loadRanges(){const C=[{name:"well",bounds:{xMin:2,xMax:5,yMin:10,yMax:14},action:()=>this.scene.start("FishChipScene")},{name:"sign",bounds:{xMin:2,xMax:5,yMin:2,yMax:5},action:()=>this.scene.start("CreditsScene")},{name:"building",bounds:{xMin:13,xMax:13,yMin:6,yMax:7},action:()=>console.log("Enter the Building?")},{name:"tombstone",bounds:{xMin:7,xMax:10,yMin:9,yMax:10},action:()=>console.log("Samson Statue!")}];for(const A of C)this.quadtree.insert(A)}update(){this.playerController?.handleMovement(),this.npcSprite&&this.npcSprite.textBubble&&to(this.npcSprite),this.fishNpcSprite&&this.fishNpcSprite.textBubble&&to(this.fishNpcSprite)}}const jT=jn.div` + // Your style here +`;function QT(){const P=ps.useRef(null);return ps.useEffect(()=>{if(P.current){const C=P.current,I={...{title:"CryptoThrone",render:{antialias:!1},scale:{mode:Wn.Scale.RESIZE,min:{width:1024,height:768},max:{width:1600,height:1200},zoom:1},type:Wn.AUTO,transparent:!0,width:800,height:600,physics:{default:"arcade",arcade:{gravity:{x:0,y:0},debug:!1}},plugins:{scene:[{key:"gridEngine",plugin:UT,mapping:"gridEngine"}]},scene:[XT,JT],input:{mouse:{preventDefaultWheel:!1},touch:{capture:!1}}},parent:C},B=new Wn.Game(I);return()=>{B.destroy(!0)}}},[]),$n.jsx(jT,{children:$n.jsx("div",{ref:P})})}const kT=jn.div` + // Your style here +`;function sS(){return $n.jsx(kT,{children:$n.jsx(QT,{})})}export{sS as default}; diff --git a/docs/_astro/DevCodeCore.BveiGblO.js b/docs/_astro/DevCodeCore.BveiGblO.js deleted file mode 100644 index 0816518..0000000 --- a/docs/_astro/DevCodeCore.BveiGblO.js +++ /dev/null @@ -1,14 +0,0 @@ -const __vite__fileDeps=["_astro/angular-html.833w9gUK.js","_astro/html.CuK0VrWf.js","_astro/javascript.Dch3xQiY.js","_astro/css.CbYhyuC0.js","_astro/angular-ts.BCBvF5Sf.js","_astro/scss.Dr-_CcBd.js","_astro/apl.7kPAH7yp.js","_astro/xml.BzTcx3OS.js","_astro/java.ClXEvkw9.js","_astro/json.CupVZNk8.js","_astro/asciidoc.CnHzULVj.js","_astro/yaml.C5gCGmDW.js","_astro/csv.B2DkETJQ.js","_astro/c.RCJZWN-0.js","_astro/clojure.BF6G6X0H.js","_astro/coffee.t_LrLW_f.js","_astro/cpp.BnO_O5bK.js","_astro/glsl.-GlVTnW0.js","_astro/sql.DbK06e1c.js","_astro/csharp.DISxKEhY.js","_astro/diff.DvyTQcux.js","_astro/docker.DNR26wTC.js","_astro/elixir.CpdO1lki.js","_astro/elm.DbZvrHdh.js","_astro/erlang.DS9ZWoKD.js","_astro/go.BAMIS8DD.js","_astro/groovy.wChcbJ1V.js","_astro/haskell.DAGYewaG.js","_astro/jsx.CsyrCbsw.js","_astro/julia.CyGW3mcn.js","_astro/python.DwuVtWc2.js","_astro/r.BXfENWL6.js","_astro/kotlin.BIxS-Weu.js","_astro/less.Du6_OKDb.js","_astro/make.B9S9BZZh.js","_astro/objective-c.DHmGyzbM.js","_astro/ocaml.RqY_Nz63.js","_astro/perl.Czv4QcIx.js","_astro/ruby.BYVeyLWu.js","_astro/shellscript.BZfs-ost.js","_astro/lua.CHJYZA-p.js","_astro/rust.DGxQkqYo.js","_astro/sass.CMDmr8et.js","_astro/scala.vMsNTMhM.js","_astro/swift.Dez-Qvcc.js","_astro/toml.BT9ZzGyQ.js","_astro/typescript.DC8MraHL.js","_astro/astro.Dtt22nl1.js","_astro/stylus.DSrLtGYv.js","_astro/postcss.DXT9h7v2.js","_astro/tsx.BlxWTfDV.js","_astro/blade.Ge7MpD7w.js","_astro/cobol.Be8n44jy.js","_astro/crystal.DUeHF1Px.js","_astro/erb.C8njeWMx.js","_astro/fortran-fixed-form.Cx0tWteX.js","_astro/fortran-free-form.D6pmzCqS.js","_astro/fsharp.COWl2xCs.js","_astro/markdown.BdfWgkoX.js","_astro/gdresource.Dyo1-XBj.js","_astro/gdshader.B_SUYfiV.js","_astro/gdscript.CoEqzGFw.js","_astro/git-commit.aPmGthaS.js","_astro/git-rebase.wSeoO_tD.js","_astro/glimmer-js.CKLJpqca.js","_astro/glimmer-ts.Bp7XmXVh.js","_astro/graphql.C4V4xKFR.js","_astro/hack.B30vrIHT.js","_astro/haml.RaSm5nLU.js","_astro/handlebars.W0zz18bm.js","_astro/html-derivative.fiapQfxX.js","_astro/http.DvBm4YdT.js","_astro/hxml.C0w2y-oz.js","_astro/haxe.Dit6kIrv.js","_astro/imba.DxX1Vuw3.js","_astro/jinja.DWD-OL5F.js","_astro/jison.CHwQvgii.js","_astro/latex.CbyClHu1.js","_astro/tex.-C-BpcSB.js","_astro/gnuplot.nclm9rTJ.js","_astro/liquid.Cp8214eI.js","_astro/marko.DXVuwHdi.js","_astro/mdc.BtXAnNXs.js","_astro/nginx.CFCDRImM.js","_astro/nim.whBoXTHG.js","_astro/php.DEqKwr-6.js","_astro/pug.BWq4yR4F.js","_astro/qml.qWrhaLmb.js","_astro/razor.BPIJn9no.js","_astro/rst.MQSXyo4o.js","_astro/cmake.DXZpi2gR.js","_astro/sas.2Dj3KWk-.js","_astro/shaderlab.D_C8j_yu.js","_astro/hlsl.DmDrTTlz.js","_astro/shellsession.D2P9pGgM.js","_astro/soy.D91J-rek.js","_astro/sparql.DJ46LgWq.js","_astro/turtle.C15OxdQ5.js","_astro/stata.DCIeX9IZ.js","_astro/svelte.CpQM5Shq.js","_astro/twig.C7WLmjjl.js","_astro/vue.ClrSQ_eu.js","_astro/jsonc.DYI1rfmx.js","_astro/json5.Bh8mriwU.js","_astro/vue-html.CN_dVTIP.js","_astro/wikitext.EfTDFRWl.js","_astro/ini.DeVv6D4_.js","_astro/vb.beD-FUib.js","_astro/xsl.lJB8dDLf.js","_astro/bat.BPiaQZfK.js","_astro/raku.D384ylkT.js","_astro/powershell.9ZOzOPqN.js","_astro/dart.DZLoTQm4.js","_astro/bibtex.BaedD2tq.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]); -import{r as ce}from"./index.NEDEFKed.js";import{c as O,g as vr}from"./_commonjsHelpers.Cpj98o6Y.js";import{m as ye,t as kt,c as Dt}from"./bundle-mjs.B7io9OLF.js";import{_ as u,l as Nt}from"./preact.module.xMJTyml6.js";var _n={},pt={},ht={};Object.defineProperty(ht,"__esModule",{value:!0});var xt="html",Mt="head",Ee="body",br=/<([a-zA-Z]+[0-9]?)/,Vt=//i,Bt=//i,Oe=function(n,e){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},it=function(n,e){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},Gt=typeof window=="object"&&window.DOMParser;if(typeof Gt=="function"){var Tr=new Gt,Ar="text/html";it=function(n,e){return e&&(n="<".concat(e,">").concat(n,"")),Tr.parseFromString(n,Ar)},Oe=it}if(typeof document=="object"&&document.implementation){var ve=document.implementation.createHTMLDocument();Oe=function(n,e){if(e){var t=ve.documentElement.querySelector(e);return t&&(t.innerHTML=n),ve}return ve.documentElement.innerHTML=n,ve}}var be=typeof document=="object"&&document.createElement("template"),ot;be&&be.content&&(ot=function(n){return be.innerHTML=n,be.content.childNodes});function Rr(n){var e,t,r=n.match(br),i=r&&r[1]?r[1].toLowerCase():"";switch(i){case xt:{var o=it(n);if(!Vt.test(n)){var l=o.querySelector(Mt);(e=l?.parentNode)===null||e===void 0||e.removeChild(l)}if(!Bt.test(n)){var l=o.querySelector(Ee);(t=l?.parentNode)===null||t===void 0||t.removeChild(l)}return o.querySelectorAll(xt)}case Mt:case Ee:{var s=Oe(n).querySelectorAll(i);return Bt.test(n)&&Vt.test(n)?s[0].parentNode.childNodes:s}default:{if(ot)return ot(n);var l=Oe(n,Ee).querySelector(Ee);return l.childNodes}}}ht.default=Rr;var ie={},mt={},ft={};(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.Doctype=n.CDATA=n.Tag=n.Style=n.Script=n.Comment=n.Directive=n.Text=n.Root=n.isTag=n.ElementType=void 0;var e;(function(r){r.Root="root",r.Text="text",r.Directive="directive",r.Comment="comment",r.Script="script",r.Style="style",r.Tag="tag",r.CDATA="cdata",r.Doctype="doctype"})(e=n.ElementType||(n.ElementType={}));function t(r){return r.type===e.Tag||r.type===e.Script||r.type===e.Style}n.isTag=t,n.Root=e.Root,n.Text=e.Text,n.Directive=e.Directive,n.Comment=e.Comment,n.Script=e.Script,n.Style=e.Style,n.Tag=e.Tag,n.CDATA=e.CDATA,n.Doctype=e.Doctype})(ft);var T={},q=O&&O.__extends||function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),ue=O&&O.__assign||function(){return ue=Object.assign||function(n){for(var e,t=1,r=arguments.length;t0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"childNodes",{get:function(){return this.children},set:function(t){this.children=t},enumerable:!1,configurable:!0}),e}(_t);T.NodeWithChildren=Ge;var vn=function(n){q(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=V.ElementType.CDATA,t}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),e}(Ge);T.CDATA=vn;var bn=function(n){q(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=V.ElementType.Root,t}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),e}(Ge);T.Document=bn;var Tn=function(n){q(e,n);function e(t,r,i,o){i===void 0&&(i=[]),o===void 0&&(o=t==="script"?V.ElementType.Script:t==="style"?V.ElementType.Style:V.ElementType.Tag);var l=n.call(this,i)||this;return l.name=t,l.attribs=r,l.type=o,l}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tagName",{get:function(){return this.name},set:function(t){this.name=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"attributes",{get:function(){var t=this;return Object.keys(this.attribs).map(function(r){var i,o;return{name:r,value:t.attribs[r],namespace:(i=t["x-attribsNamespace"])===null||i===void 0?void 0:i[r],prefix:(o=t["x-attribsPrefix"])===null||o===void 0?void 0:o[r]}})},enumerable:!1,configurable:!0}),e}(Ge);T.Element=Tn;function An(n){return(0,V.isTag)(n)}T.isTag=An;function Rn(n){return n.type===V.ElementType.CDATA}T.isCDATA=Rn;function Pn(n){return n.type===V.ElementType.Text}T.isText=Pn;function Sn(n){return n.type===V.ElementType.Comment}T.isComment=Sn;function Ln(n){return n.type===V.ElementType.Directive}T.isDirective=Ln;function On(n){return n.type===V.ElementType.Root}T.isDocument=On;function Pr(n){return Object.prototype.hasOwnProperty.call(n,"children")}T.hasChildren=Pr;function gt(n,e){e===void 0&&(e=!1);var t;if(Pn(n))t=new gn(n.data);else if(Sn(n))t=new yn(n.data);else if(An(n)){var r=e?Xe(n.children):[],i=new Tn(n.name,ue({},n.attribs),r);r.forEach(function(a){return a.parent=i}),n.namespace!=null&&(i.namespace=n.namespace),n["x-attribsNamespace"]&&(i["x-attribsNamespace"]=ue({},n["x-attribsNamespace"])),n["x-attribsPrefix"]&&(i["x-attribsPrefix"]=ue({},n["x-attribsPrefix"])),t=i}else if(Rn(n)){var r=e?Xe(n.children):[],o=new vn(r);r.forEach(function(c){return c.parent=o}),t=o}else if(On(n)){var r=e?Xe(n.children):[],l=new bn(r);r.forEach(function(c){return c.parent=l}),n["x-mode"]&&(l["x-mode"]=n["x-mode"]),t=l}else if(Ln(n)){var s=new En(n.name,n.data);n["x-name"]!=null&&(s["x-name"]=n["x-name"],s["x-publicId"]=n["x-publicId"],s["x-systemId"]=n["x-systemId"]),t=s}else throw new Error("Not implemented yet: ".concat(n.type));return t.startIndex=n.startIndex,t.endIndex=n.endIndex,n.sourceCodeLocation!=null&&(t.sourceCodeLocation=n.sourceCodeLocation),t}T.cloneNode=gt;function Xe(n){for(var e=n.map(function(r){return gt(r,!0)}),t=1;t/;function Dr(n){if(typeof n!="string")throw new TypeError("First argument must be a string");if(!n)return[];var e=n.match(kr),t=e?e[1]:void 0;return(0,Ir.formatDOM)((0,wr.default)(n),null,t)}pt.default=Dr;var je={},H={},Fe={},Nr=0;Fe.SAME=Nr;var xr=1;Fe.CAMELCASE=xr;Fe.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1};const kn=0,K=1,Ue=2,He=3,yt=4,Dn=5,Nn=6;function Mr(n){return N.hasOwnProperty(n)?N[n]:null}function M(n,e,t,r,i,o,l){this.acceptsBooleans=e===Ue||e===He||e===yt,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=t,this.propertyName=n,this.type=e,this.sanitizeURL=o,this.removeEmptyString=l}const N={},Vr=["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"];Vr.forEach(n=>{N[n]=new M(n,kn,!1,n,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(([n,e])=>{N[n]=new M(n,K,!1,e,null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(n=>{N[n]=new M(n,Ue,!1,n.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(n=>{N[n]=new M(n,Ue,!1,n,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"].forEach(n=>{N[n]=new M(n,He,!1,n.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(n=>{N[n]=new M(n,He,!0,n,null,!1,!1)});["capture","download"].forEach(n=>{N[n]=new M(n,yt,!1,n,null,!1,!1)});["cols","rows","size","span"].forEach(n=>{N[n]=new M(n,Nn,!1,n,null,!1,!1)});["rowSpan","start"].forEach(n=>{N[n]=new M(n,Dn,!1,n.toLowerCase(),null,!1,!1)});const Et=/[\-\:]([a-z])/g,vt=n=>n[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"].forEach(n=>{const e=n.replace(Et,vt);N[e]=new M(e,K,!1,n,null,!1,!1)});["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(n=>{const e=n.replace(Et,vt);N[e]=new M(e,K,!1,n,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(n=>{const e=n.replace(Et,vt);N[e]=new M(e,K,!1,n,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(n=>{N[n]=new M(n,K,!1,n.toLowerCase(),null,!1,!1)});const Br="xlinkHref";N[Br]=new M("xlinkHref",K,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(n=>{N[n]=new M(n,K,!1,n.toLowerCase(),null,!0,!0)});const{CAMELCASE:Gr,SAME:jr,possibleStandardNames:jt}=Fe,Fr=":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",Ur=Fr+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Hr=RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+Ur+"]*$")),$r=Object.keys(jt).reduce((n,e)=>{const t=jt[e];return t===jr?n[e]=e:t===Gr?n[e.toLowerCase()]=e:n[e]=t,n},{});H.BOOLEAN=He;H.BOOLEANISH_STRING=Ue;H.NUMERIC=Dn;H.OVERLOADED_BOOLEAN=yt;H.POSITIVE_NUMERIC=Nn;H.RESERVED=kn;H.STRING=K;H.getPropertyInfo=Mr;H.isCustomAttribute=Hr;H.possibleStandardNames=$r;var bt={},Tt={},Ft=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,zr=/\n/g,Wr=/^\s*/,qr=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Kr=/^:\s*/,Xr=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Yr=/^[;\s]*/,Jr=/^\s+|\s+$/g,Qr=` -`,Ut="/",Ht="*",Y="",Zr="comment",ei="declaration",ti=function(n,e){if(typeof n!="string")throw new TypeError("First argument must be a string");if(!n)return[];e=e||{};var t=1,r=1;function i(h){var f=h.match(zr);f&&(t+=f.length);var _=h.lastIndexOf(Qr);r=~_?h.length-_:r+h.length}function o(){var h={line:t,column:r};return function(f){return f.position=new l(h),c(),f}}function l(h){this.start=h,this.end={line:t,column:r},this.source=e.source}l.prototype.content=n;function s(h){var f=new Error(e.source+":"+t+":"+r+": "+h);if(f.reason=h,f.filename=e.source,f.line=t,f.column=r,f.source=n,!e.silent)throw f}function a(h){var f=h.exec(n);if(f){var _=f[0];return i(_),n=n.slice(_.length),f}}function c(){a(Wr)}function d(h){var f;for(h=h||[];f=p();)f!==!1&&h.push(f);return h}function p(){var h=o();if(!(Ut!=n.charAt(0)||Ht!=n.charAt(1))){for(var f=2;Y!=n.charAt(f)&&(Ht!=n.charAt(f)||Ut!=n.charAt(f+1));)++f;if(f+=2,Y===n.charAt(f-1))return s("End of comment missing");var _=n.slice(2,f-2);return r+=2,i(_),n=n.slice(f),r+=2,h({type:Zr,comment:_})}}function m(){var h=o(),f=a(qr);if(f){if(p(),!a(Kr))return s("property missing ':'");var _=a(Xr),E=h({type:ei,property:$t(f[0].replace(Ft,Y)),value:_?$t(_[0].replace(Ft,Y)):Y});return a(Yr),E}}function y(){var h=[];d(h);for(var f;f=m();)f!==!1&&(h.push(f),d(h));return h}return c(),y()};function $t(n){return n?n.replace(Jr,Y):Y}var ni=O&&O.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Tt,"__esModule",{value:!0});var ri=ni(ti);function ii(n,e){var t=null;if(!n||typeof n!="string")return t;var r=(0,ri.default)(n),i=typeof e=="function";return r.forEach(function(o){if(o.type==="declaration"){var l=o.property,s=o.value;i?e(l,s,o):s&&(t=t||{},t[l]=s)}}),t}Tt.default=ii;var $e={};Object.defineProperty($e,"__esModule",{value:!0});$e.camelCase=void 0;var oi=/^--[a-zA-Z0-9-]+$/,ai=/-([a-z])/g,si=/^[^-]+$/,li=/^-(webkit|moz|ms|o|khtml)-/,ci=/^-(ms)-/,ui=function(n){return!n||si.test(n)||oi.test(n)},di=function(n,e){return e.toUpperCase()},zt=function(n,e){return"".concat(e,"-")},pi=function(n,e){return e===void 0&&(e={}),ui(n)?n:(n=n.toLowerCase(),e.reactCompat?n=n.replace(ci,zt):n=n.replace(li,zt),n.replace(ai,di))};$e.camelCase=pi;var hi=O&&O.__importDefault||function(n){return n&&n.__esModule?n:{default:n}},mi=hi(Tt),fi=$e;function at(n,e){var t={};return!n||typeof n!="string"||(0,mi.default)(n,function(r,i){r&&i&&(t[(0,fi.camelCase)(r,e)]=i)}),t}at.default=at;var _i=at;(function(n){var e=O&&O.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(n,"__esModule",{value:!0}),n.returnFirstArg=n.canTextBeChildOfNode=n.ELEMENTS_WITH_NO_TEXT_CHILDREN=n.PRESERVE_CUSTOM_ATTRIBUTES=n.setStyleProp=n.isCustomComponent=void 0;var t=ce,r=e(_i),i=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);function o(d,p){return d.includes("-")?!i.has(d):!!(p&&typeof p.is=="string")}n.isCustomComponent=o;var l={reactCompat:!0};function s(d,p){if(typeof d=="string"){if(!d.trim()){p.style={};return}try{p.style=(0,r.default)(d,l)}catch{p.style={}}}}n.setStyleProp=s,n.PRESERVE_CUSTOM_ATTRIBUTES=Number(t.version.split(".")[0])>=16,n.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);var a=function(d){return!n.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(d.name)};n.canTextBeChildOfNode=a;var c=function(d){return d};n.returnFirstArg=c})(bt);Object.defineProperty(je,"__esModule",{value:!0});var se=H,Wt=bt,gi=["checked","value"],yi=["input","select","textarea"],Ei={reset:!0,submit:!0};function vi(n,e){n===void 0&&(n={});var t={},r=!!(n.type&&Ei[n.type]);for(var i in n){var o=n[i];if((0,se.isCustomAttribute)(i)){t[i]=o;continue}var l=i.toLowerCase(),s=qt(l);if(s){var a=(0,se.getPropertyInfo)(s);switch(gi.includes(s)&&yi.includes(e)&&!r&&(s=qt("default"+l)),t[s]=o,a&&a.type){case se.BOOLEAN:t[s]=!0;break;case se.OVERLOADED_BOOLEAN:o===""&&(t[s]=!0);break}continue}Wt.PRESERVE_CUSTOM_ATTRIBUTES&&(t[i]=o)}return(0,Wt.setStyleProp)(n.style,t),t}je.default=vi;function qt(n){return se.possibleStandardNames[n]}var At={},bi=O&&O.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(At,"__esModule",{value:!0});var Ye=ce,Ti=bi(je),de=bt,Ai={cloneElement:Ye.cloneElement,createElement:Ye.createElement,isValidElement:Ye.isValidElement};function xn(n,e){e===void 0&&(e={});for(var t=[],r=typeof e.replace=="function",i=e.transform||de.returnFirstArg,o=e.library||Ai,l=o.cloneElement,s=o.createElement,a=o.isValidElement,c=n.length,d=0;d1&&(m=l(m,{key:m.key||d})),t.push(i(m,p,d));continue}}if(p.type==="text"){var y=!p.data.trim().length;if(y&&p.parent&&!(0,de.canTextBeChildOfNode)(p.parent)||e.trim&&y)continue;t.push(i(p.data,p,d));continue}var h=p,f={};Ri(h)?((0,de.setStyleProp)(h.attribs.style,h.attribs),f=h.attribs):h.attribs&&(f=(0,Ti.default)(h.attribs,h.name));var _=void 0;switch(p.type){case"script":case"style":p.children[0]&&(f.dangerouslySetInnerHTML={__html:p.children[0].data});break;case"tag":p.name==="textarea"&&p.children[0]?f.defaultValue=p.children[0].data:p.children&&p.children.length&&(_=xn(p.children,e));break;default:continue}c>1&&(f.key=d),t.push(i(s(p.name,f,_),p,d))}return t.length===1?t[0]:t}At.default=xn;function Ri(n){return de.PRESERVE_CUSTOM_ATTRIBUTES&&n.type==="tag"&&(0,de.isCustomComponent)(n.name,n.attribs)}(function(n){var e=O&&O.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(n,"__esModule",{value:!0}),n.htmlToDOM=n.domToReact=n.attributesToProps=n.Text=n.ProcessingInstruction=n.Element=n.Comment=void 0;var t=e(pt);n.htmlToDOM=t.default;var r=e(je);n.attributesToProps=r.default;var i=e(At);n.domToReact=i.default;var o=mt;Object.defineProperty(n,"Comment",{enumerable:!0,get:function(){return o.Comment}}),Object.defineProperty(n,"Element",{enumerable:!0,get:function(){return o.Element}}),Object.defineProperty(n,"ProcessingInstruction",{enumerable:!0,get:function(){return o.ProcessingInstruction}}),Object.defineProperty(n,"Text",{enumerable:!0,get:function(){return o.Text}});var l={lowerCaseAttributeNames:!1};function s(a,c){if(typeof a!="string")throw new TypeError("First argument must be a string");return a?(0,i.default)((0,t.default)(a,c?.htmlparser2||l),c):[]}n.default=s})(_n);const Kt=vr(_n),Pi=Kt.default||Kt,Mn=[{id:"abap",name:"ABAP",import:()=>u(()=>import("./abap.DXFkqnOI.js"),[])},{id:"actionscript-3",name:"ActionScript",import:()=>u(()=>import("./actionscript-3.D6NljDpC.js"),[])},{id:"ada",name:"Ada",import:()=>u(()=>import("./ada.CowR2XfX.js"),[])},{id:"angular-html",name:"Angular HTML",import:()=>u(()=>import("./angular-html.833w9gUK.js").then(n=>n.e),__vite__mapDeps([0,1,2,3]))},{id:"angular-ts",name:"Angular TypeScript",import:()=>u(()=>import("./angular-ts.BCBvF5Sf.js"),__vite__mapDeps([4,0,1,2,3,5]))},{id:"apache",name:"Apache Conf",import:()=>u(()=>import("./apache.rS0jd3Ly.js"),[])},{id:"apex",name:"Apex",import:()=>u(()=>import("./apex.Sfo2eW0G.js"),[])},{id:"apl",name:"APL",import:()=>u(()=>import("./apl.7kPAH7yp.js"),__vite__mapDeps([6,1,2,3,7,8,9]))},{id:"applescript",name:"AppleScript",import:()=>u(()=>import("./applescript.B4yE-MfL.js"),[])},{id:"ara",name:"Ara",import:()=>u(()=>import("./ara.CG4fK2Nq.js"),[])},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:()=>u(()=>import("./asciidoc.CnHzULVj.js"),__vite__mapDeps([10,1,2,3,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,8,9,28,29,30,31,32,33,34,35,36,37,7,38,39,40,41,42,43,5,44,45,46]))},{id:"asm",name:"Assembly",import:()=>u(()=>import("./asm.PWN5J14X.js"),[])},{id:"astro",name:"Astro",import:()=>u(()=>import("./astro.Dtt22nl1.js"),__vite__mapDeps([47,9,2,46,48,42,3,5,33,49,50]))},{id:"awk",name:"AWK",import:()=>u(()=>import("./awk.i0IPvypD.js"),[])},{id:"ballerina",name:"Ballerina",import:()=>u(()=>import("./ballerina.T9ysyp6P.js"),[])},{id:"bat",name:"Batch File",aliases:["batch"],import:()=>u(()=>import("./bat.BPiaQZfK.js"),[])},{id:"beancount",name:"Beancount",import:()=>u(()=>import("./beancount.Urb1RsFe.js"),[])},{id:"berry",name:"Berry",aliases:["be"],import:()=>u(()=>import("./berry.CxrokwfH.js"),[])},{id:"bibtex",name:"BibTeX",import:()=>u(()=>import("./bibtex.BaedD2tq.js"),[])},{id:"bicep",name:"Bicep",import:()=>u(()=>import("./bicep.3ghuYFLd.js"),[])},{id:"blade",name:"Blade",import:()=>u(()=>import("./blade.Ge7MpD7w.js"),__vite__mapDeps([51,1,2,3,7,8,18,9]))},{id:"c",name:"C",import:()=>u(()=>import("./c.RCJZWN-0.js"),[])},{id:"cadence",name:"Cadence",aliases:["cdc"],import:()=>u(()=>import("./cadence.Bgpqy2XC.js"),[])},{id:"clarity",name:"Clarity",import:()=>u(()=>import("./clarity.CIekO_uJ.js"),[])},{id:"clojure",name:"Clojure",aliases:["clj"],import:()=>u(()=>import("./clojure.BF6G6X0H.js"),[])},{id:"cmake",name:"CMake",import:()=>u(()=>import("./cmake.DXZpi2gR.js"),[])},{id:"cobol",name:"COBOL",import:()=>u(()=>import("./cobol.Be8n44jy.js"),__vite__mapDeps([52,18,1,2,3,8]))},{id:"codeowners",name:"CODEOWNERS",import:()=>u(()=>import("./codeowners.CGmujMTu.js"),[])},{id:"codeql",name:"CodeQL",aliases:["ql"],import:()=>u(()=>import("./codeql.BOpLLL-w.js"),[])},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:()=>u(()=>import("./coffee.t_LrLW_f.js"),__vite__mapDeps([15,2]))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:()=>u(()=>import("./common-lisp.C3qUB5O8.js"),[])},{id:"cpp",name:"C++",aliases:["c++"],import:()=>u(()=>import("./cpp.BnO_O5bK.js"),__vite__mapDeps([16,17,13,18]))},{id:"crystal",name:"Crystal",import:()=>u(()=>import("./crystal.DUeHF1Px.js"),__vite__mapDeps([53,1,2,3,18,13,39]))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:()=>u(()=>import("./csharp.DISxKEhY.js"),[])},{id:"css",name:"CSS",import:()=>u(()=>import("./css.CbYhyuC0.js"),[])},{id:"csv",name:"CSV",import:()=>u(()=>import("./csv.B2DkETJQ.js"),[])},{id:"cue",name:"CUE",import:()=>u(()=>import("./cue.C6Aznpr-.js"),[])},{id:"cypher",name:"Cypher",aliases:["cql"],import:()=>u(()=>import("./cypher.ByMv4Xf1.js"),[])},{id:"d",name:"D",import:()=>u(()=>import("./d.PifQWv0n.js"),[])},{id:"dart",name:"Dart",import:()=>u(()=>import("./dart.DZLoTQm4.js"),[])},{id:"dax",name:"DAX",import:()=>u(()=>import("./dax.DsfXcHUZ.js"),[])},{id:"desktop",name:"Desktop",import:()=>u(()=>import("./desktop.D71BffLY.js"),[])},{id:"diff",name:"Diff",import:()=>u(()=>import("./diff.DvyTQcux.js"),[])},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:()=>u(()=>import("./docker.DNR26wTC.js"),[])},{id:"dream-maker",name:"Dream Maker",import:()=>u(()=>import("./dream-maker.Eh5U-gDp.js"),[])},{id:"elixir",name:"Elixir",import:()=>u(()=>import("./elixir.CpdO1lki.js"),__vite__mapDeps([22,1,2,3]))},{id:"elm",name:"Elm",import:()=>u(()=>import("./elm.DbZvrHdh.js"),__vite__mapDeps([23,17,13]))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:()=>u(()=>import("./emacs-lisp.BEjL32p1.js"),[])},{id:"erb",name:"ERB",import:()=>u(()=>import("./erb.C8njeWMx.js"),__vite__mapDeps([54,1,2,3,38,7,8,18,13,39,40]))},{id:"erlang",name:"Erlang",aliases:["erl"],import:()=>u(()=>import("./erlang.DS9ZWoKD.js"),[])},{id:"fennel",name:"Fennel",import:()=>u(()=>import("./fennel.C6XIsc4F.js"),[])},{id:"fish",name:"Fish",import:()=>u(()=>import("./fish.DfeQjIbs.js"),[])},{id:"fluent",name:"Fluent",aliases:["ftl"],import:()=>u(()=>import("./fluent.KPqz0Sb3.js"),[])},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:()=>u(()=>import("./fortran-fixed-form.Cx0tWteX.js"),__vite__mapDeps([55,56]))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:()=>u(()=>import("./fortran-free-form.D6pmzCqS.js"),[])},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:()=>u(()=>import("./fsharp.COWl2xCs.js"),__vite__mapDeps([57,58]))},{id:"gdresource",name:"GDResource",import:()=>u(()=>import("./gdresource.Dyo1-XBj.js"),__vite__mapDeps([59,60,61]))},{id:"gdscript",name:"GDScript",import:()=>u(()=>import("./gdscript.CoEqzGFw.js"),[])},{id:"gdshader",name:"GDShader",import:()=>u(()=>import("./gdshader.B_SUYfiV.js"),[])},{id:"genie",name:"Genie",import:()=>u(()=>import("./genie.DAfrLhwG.js"),[])},{id:"gherkin",name:"Gherkin",import:()=>u(()=>import("./gherkin.DjTlIhuc.js"),[])},{id:"git-commit",name:"Git Commit Message",import:()=>u(()=>import("./git-commit.aPmGthaS.js"),__vite__mapDeps([62,20]))},{id:"git-rebase",name:"Git Rebase Message",import:()=>u(()=>import("./git-rebase.wSeoO_tD.js"),__vite__mapDeps([63,39]))},{id:"gleam",name:"Gleam",import:()=>u(()=>import("./gleam.Dz2Ca8U2.js"),[])},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:()=>u(()=>import("./glimmer-js.CKLJpqca.js"),__vite__mapDeps([64,2,46,3,1]))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:()=>u(()=>import("./glimmer-ts.Bp7XmXVh.js"),__vite__mapDeps([65,46,3,2,1]))},{id:"glsl",name:"GLSL",import:()=>u(()=>import("./glsl.-GlVTnW0.js"),__vite__mapDeps([17,13]))},{id:"gnuplot",name:"Gnuplot",import:()=>u(()=>import("./gnuplot.nclm9rTJ.js"),[])},{id:"go",name:"Go",import:()=>u(()=>import("./go.BAMIS8DD.js"),[])},{id:"graphql",name:"GraphQL",aliases:["gql"],import:()=>u(()=>import("./graphql.C4V4xKFR.js"),__vite__mapDeps([66,2,46,28,50]))},{id:"groovy",name:"Groovy",import:()=>u(()=>import("./groovy.wChcbJ1V.js"),[])},{id:"hack",name:"Hack",import:()=>u(()=>import("./hack.B30vrIHT.js"),__vite__mapDeps([67,1,2,3,18]))},{id:"haml",name:"Ruby Haml",import:()=>u(()=>import("./haml.RaSm5nLU.js"),__vite__mapDeps([68,38,1,2,3,7,8,18,13,39,40,42,15,58]))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:()=>u(()=>import("./handlebars.W0zz18bm.js"),__vite__mapDeps([69,1,2,3,11]))},{id:"haskell",name:"Haskell",aliases:["hs"],import:()=>u(()=>import("./haskell.DAGYewaG.js"),[])},{id:"haxe",name:"Haxe",import:()=>u(()=>import("./haxe.Dit6kIrv.js"),[])},{id:"hcl",name:"HashiCorp HCL",import:()=>u(()=>import("./hcl.CpAANOdC.js"),[])},{id:"hjson",name:"Hjson",import:()=>u(()=>import("./hjson.DZqG9GXz.js"),[])},{id:"hlsl",name:"HLSL",import:()=>u(()=>import("./hlsl.DmDrTTlz.js"),[])},{id:"html",name:"HTML",import:()=>u(()=>import("./html.CuK0VrWf.js"),__vite__mapDeps([1,2,3]))},{id:"html-derivative",name:"HTML (Derivative)",import:()=>u(()=>import("./html-derivative.fiapQfxX.js"),__vite__mapDeps([70,1,2,3]))},{id:"http",name:"HTTP",import:()=>u(()=>import("./http.DvBm4YdT.js"),__vite__mapDeps([71,39,9,7,8,66,2,46,28,50]))},{id:"hxml",name:"HXML",import:()=>u(()=>import("./hxml.C0w2y-oz.js"),__vite__mapDeps([72,73]))},{id:"hy",name:"Hy",import:()=>u(()=>import("./hy.C3qJFuQy.js"),[])},{id:"imba",name:"Imba",import:()=>u(()=>import("./imba.DxX1Vuw3.js"),__vite__mapDeps([74,46]))},{id:"ini",name:"INI",aliases:["properties"],import:()=>u(()=>import("./ini.DeVv6D4_.js"),[])},{id:"java",name:"Java",import:()=>u(()=>import("./java.ClXEvkw9.js"),[])},{id:"javascript",name:"JavaScript",aliases:["js"],import:()=>u(()=>import("./javascript.Dch3xQiY.js"),[])},{id:"jinja",name:"Jinja",import:()=>u(()=>import("./jinja.DWD-OL5F.js"),__vite__mapDeps([75,1,2,3]))},{id:"jison",name:"Jison",import:()=>u(()=>import("./jison.CHwQvgii.js"),__vite__mapDeps([76,2]))},{id:"json",name:"JSON",import:()=>u(()=>import("./json.CupVZNk8.js"),[])},{id:"json5",name:"JSON5",import:()=>u(()=>import("./json5.Bh8mriwU.js"),[])},{id:"jsonc",name:"JSON with Comments",import:()=>u(()=>import("./jsonc.DYI1rfmx.js"),[])},{id:"jsonl",name:"JSON Lines",import:()=>u(()=>import("./jsonl.BUpeXbsf.js"),[])},{id:"jsonnet",name:"Jsonnet",import:()=>u(()=>import("./jsonnet.C9d3aiqh.js"),[])},{id:"jssm",name:"JSSM",aliases:["fsl"],import:()=>u(()=>import("./jssm.Dble9ECP.js"),[])},{id:"jsx",name:"JSX",import:()=>u(()=>import("./jsx.CsyrCbsw.js"),[])},{id:"julia",name:"Julia",aliases:["jl"],import:()=>u(()=>import("./julia.CyGW3mcn.js"),__vite__mapDeps([29,16,17,13,18,30,2,31]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:()=>u(()=>import("./kotlin.BIxS-Weu.js"),[])},{id:"kusto",name:"Kusto",aliases:["kql"],import:()=>u(()=>import("./kusto.DKlGn9uv.js"),[])},{id:"latex",name:"LaTeX",import:()=>u(()=>import("./latex.CbyClHu1.js"),__vite__mapDeps([77,78,31,39,3,79,27,1,2,8,29,16,17,13,18,30,40,38,7,41,46,11,43]))},{id:"less",name:"Less",import:()=>u(()=>import("./less.Du6_OKDb.js"),[])},{id:"liquid",name:"Liquid",import:()=>u(()=>import("./liquid.Cp8214eI.js"),__vite__mapDeps([80,1,2,3,9]))},{id:"log",name:"Log file",import:()=>u(()=>import("./log.Ksn5IXup.js"),[])},{id:"logo",name:"Logo",import:()=>u(()=>import("./logo.DdacRhvC.js"),[])},{id:"lua",name:"Lua",import:()=>u(()=>import("./lua.CHJYZA-p.js"),__vite__mapDeps([40,13]))},{id:"make",name:"Makefile",aliases:["makefile"],import:()=>u(()=>import("./make.B9S9BZZh.js"),[])},{id:"markdown",name:"Markdown",aliases:["md"],import:()=>u(()=>import("./markdown.BdfWgkoX.js"),[])},{id:"marko",name:"Marko",import:()=>u(()=>import("./marko.DXVuwHdi.js"),__vite__mapDeps([81,3,33,5,2]))},{id:"matlab",name:"MATLAB",import:()=>u(()=>import("./matlab.Btshr8M_.js"),[])},{id:"mdc",name:"MDC",import:()=>u(()=>import("./mdc.BtXAnNXs.js"),__vite__mapDeps([82,58,11,70,1,2,3]))},{id:"mdx",name:"MDX",import:()=>u(()=>import("./mdx.CBPJd_fO.js"),[])},{id:"mermaid",name:"Mermaid",import:()=>u(()=>import("./mermaid.Dkb1Nx48.js"),[])},{id:"mojo",name:"Mojo",import:()=>u(()=>import("./mojo.-7WWnkdy.js"),[])},{id:"move",name:"Move",import:()=>u(()=>import("./move.C9UBdavN.js"),[])},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:()=>u(()=>import("./narrat.B9CT-1u6.js"),[])},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:()=>u(()=>import("./nextflow.DBxHOdLe.js"),[])},{id:"nginx",name:"Nginx",import:()=>u(()=>import("./nginx.CFCDRImM.js"),__vite__mapDeps([83,40,13]))},{id:"nim",name:"Nim",import:()=>u(()=>import("./nim.whBoXTHG.js"),__vite__mapDeps([84,13,1,2,3,7,8,17,58]))},{id:"nix",name:"Nix",import:()=>u(()=>import("./nix.B7rNE5kf.js"),[])},{id:"nushell",name:"nushell",aliases:["nu"],import:()=>u(()=>import("./nushell.CrgTADc5.js"),[])},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:()=>u(()=>import("./objective-c.DHmGyzbM.js"),[])},{id:"objective-cpp",name:"Objective-C++",import:()=>u(()=>import("./objective-cpp.BWKJ1FCf.js"),[])},{id:"ocaml",name:"OCaml",import:()=>u(()=>import("./ocaml.RqY_Nz63.js"),[])},{id:"pascal",name:"Pascal",import:()=>u(()=>import("./pascal.B6ZnTe72.js"),[])},{id:"perl",name:"Perl",import:()=>u(()=>import("./perl.Czv4QcIx.js"),__vite__mapDeps([37,1,2,3,7,8,18]))},{id:"php",name:"PHP",import:()=>u(()=>import("./php.DEqKwr-6.js"),__vite__mapDeps([85,1,2,3,7,8,18,9]))},{id:"plsql",name:"PL/SQL",import:()=>u(()=>import("./plsql.BbJj1K1w.js"),[])},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:()=>u(()=>import("./po.HrnDn_2Q.js"),[])},{id:"postcss",name:"PostCSS",import:()=>u(()=>import("./postcss.DXT9h7v2.js"),[])},{id:"powerquery",name:"PowerQuery",import:()=>u(()=>import("./powerquery.CApMHEaB.js"),[])},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:()=>u(()=>import("./powershell.9ZOzOPqN.js"),[])},{id:"prisma",name:"Prisma",import:()=>u(()=>import("./prisma.BBJYjQ0k.js"),[])},{id:"prolog",name:"Prolog",import:()=>u(()=>import("./prolog.BH_RS3WO.js"),[])},{id:"proto",name:"Protocol Buffer 3",import:()=>u(()=>import("./proto.DOtRmeXT.js"),[])},{id:"pug",name:"Pug",aliases:["jade"],import:()=>u(()=>import("./pug.BWq4yR4F.js"),__vite__mapDeps([86,2,3,42,5,48,15,1]))},{id:"puppet",name:"Puppet",import:()=>u(()=>import("./puppet.37ic6j3l.js"),[])},{id:"purescript",name:"PureScript",import:()=>u(()=>import("./purescript.CfPQhs6g.js"),[])},{id:"python",name:"Python",aliases:["py"],import:()=>u(()=>import("./python.DwuVtWc2.js"),[])},{id:"qml",name:"QML",import:()=>u(()=>import("./qml.qWrhaLmb.js"),__vite__mapDeps([87,2]))},{id:"qmldir",name:"QML Directory",import:()=>u(()=>import("./qmldir.MS3qTAOR.js"),[])},{id:"qss",name:"Qt Style Sheets",import:()=>u(()=>import("./qss.FJDVp-XM.js"),[])},{id:"r",name:"R",import:()=>u(()=>import("./r.BXfENWL6.js"),[])},{id:"racket",name:"Racket",import:()=>u(()=>import("./racket.B5NHDIr7.js"),[])},{id:"raku",name:"Raku",aliases:["perl6"],import:()=>u(()=>import("./raku.D384ylkT.js"),[])},{id:"razor",name:"ASP.NET Razor",import:()=>u(()=>import("./razor.BPIJn9no.js"),__vite__mapDeps([88,1,2,3,19]))},{id:"reg",name:"Windows Registry Script",import:()=>u(()=>import("./reg.CrhH3_Og.js"),[])},{id:"rel",name:"Rel",import:()=>u(()=>import("./rel.6Kuza3Wr.js"),[])},{id:"riscv",name:"RISC-V",import:()=>u(()=>import("./riscv.AgnqFTPX.js"),[])},{id:"rst",name:"reStructuredText",import:()=>u(()=>import("./rst.MQSXyo4o.js"),__vite__mapDeps([89,70,1,2,3,16,17,13,18,30,39,11,90,38,7,8,40]))},{id:"ruby",name:"Ruby",aliases:["rb"],import:()=>u(()=>import("./ruby.BYVeyLWu.js"),__vite__mapDeps([38,1,2,3,7,8,18,13,39,40]))},{id:"rust",name:"Rust",aliases:["rs"],import:()=>u(()=>import("./rust.DGxQkqYo.js"),[])},{id:"sas",name:"SAS",import:()=>u(()=>import("./sas.2Dj3KWk-.js"),__vite__mapDeps([91,18]))},{id:"sass",name:"Sass",import:()=>u(()=>import("./sass.CMDmr8et.js"),[])},{id:"scala",name:"Scala",import:()=>u(()=>import("./scala.vMsNTMhM.js"),[])},{id:"scheme",name:"Scheme",import:()=>u(()=>import("./scheme.1Je9_Reo.js"),[])},{id:"scss",name:"SCSS",import:()=>u(()=>import("./scss.Dr-_CcBd.js"),__vite__mapDeps([5,3]))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:()=>u(()=>import("./shaderlab.D_C8j_yu.js"),__vite__mapDeps([92,93]))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:()=>u(()=>import("./shellscript.BZfs-ost.js"),[])},{id:"shellsession",name:"Shell Session",aliases:["console"],import:()=>u(()=>import("./shellsession.D2P9pGgM.js"),__vite__mapDeps([94,39]))},{id:"smalltalk",name:"Smalltalk",import:()=>u(()=>import("./smalltalk.DSsji4Hu.js"),[])},{id:"solidity",name:"Solidity",import:()=>u(()=>import("./solidity.CThH5sBG.js"),[])},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:()=>u(()=>import("./soy.D91J-rek.js"),__vite__mapDeps([95,1,2,3]))},{id:"sparql",name:"SPARQL",import:()=>u(()=>import("./sparql.DJ46LgWq.js"),__vite__mapDeps([96,97]))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:()=>u(()=>import("./splunk.6XBPEST2.js"),[])},{id:"sql",name:"SQL",import:()=>u(()=>import("./sql.DbK06e1c.js"),[])},{id:"ssh-config",name:"SSH Config",import:()=>u(()=>import("./ssh-config.BH1M7C1g.js"),[])},{id:"stata",name:"Stata",import:()=>u(()=>import("./stata.DCIeX9IZ.js"),__vite__mapDeps([98,18]))},{id:"stylus",name:"Stylus",aliases:["styl"],import:()=>u(()=>import("./stylus.DSrLtGYv.js"),[])},{id:"svelte",name:"Svelte",import:()=>u(()=>import("./svelte.CpQM5Shq.js"),__vite__mapDeps([99,2,46,15,48,42,3,5,33,49,86,1,58]))},{id:"swift",name:"Swift",import:()=>u(()=>import("./swift.Dez-Qvcc.js"),[])},{id:"system-verilog",name:"SystemVerilog",import:()=>u(()=>import("./system-verilog.BscxmKrE.js"),[])},{id:"systemd",name:"Systemd Units",import:()=>u(()=>import("./systemd.CuJfdYLG.js"),[])},{id:"tasl",name:"Tasl",import:()=>u(()=>import("./tasl.BxwAa5i0.js"),[])},{id:"tcl",name:"Tcl",import:()=>u(()=>import("./tcl.C_8Fx7bH.js"),[])},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:()=>u(()=>import("./terraform.DBeuZS66.js"),[])},{id:"tex",name:"TeX",import:()=>u(()=>import("./tex.-C-BpcSB.js"),__vite__mapDeps([78,31]))},{id:"toml",name:"TOML",import:()=>u(()=>import("./toml.BT9ZzGyQ.js"),[])},{id:"tsv",name:"TSV",import:()=>u(()=>import("./tsv.DnLUQrgA.js"),[])},{id:"tsx",name:"TSX",import:()=>u(()=>import("./tsx.BlxWTfDV.js"),[])},{id:"turtle",name:"Turtle",import:()=>u(()=>import("./turtle.C15OxdQ5.js"),[])},{id:"twig",name:"Twig",import:()=>u(()=>import("./twig.C7WLmjjl.js"),__vite__mapDeps([100,3,2,5,85,1,7,8,18,9,30,38,13,39,40]))},{id:"typescript",name:"TypeScript",aliases:["ts"],import:()=>u(()=>import("./typescript.DC8MraHL.js"),[])},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:()=>u(()=>import("./typespec.Bx89rGXK.js"),[])},{id:"typst",name:"Typst",aliases:["typ"],import:()=>u(()=>import("./typst.I4qd5QHW.js"),[])},{id:"v",name:"V",import:()=>u(()=>import("./v.C2TBxDwV.js"),[])},{id:"vala",name:"Vala",import:()=>u(()=>import("./vala.CO5hpdkB.js"),[])},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:()=>u(()=>import("./vb.beD-FUib.js"),[])},{id:"verilog",name:"Verilog",import:()=>u(()=>import("./verilog.DVfdqzEq.js"),[])},{id:"vhdl",name:"VHDL",import:()=>u(()=>import("./vhdl.QZ3jNtnE.js"),[])},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:()=>u(()=>import("./viml.BLluXI4E.js"),[])},{id:"vue",name:"Vue",import:()=>u(()=>import("./vue.ClrSQ_eu.js"),__vite__mapDeps([101,1,2,3,58,86,42,5,48,15,33,46,28,50,9,102,103,11,45,66,70]))},{id:"vue-html",name:"Vue HTML",import:()=>u(()=>import("./vue-html.CN_dVTIP.js"),__vite__mapDeps([104,101,1,2,3,58,86,42,5,48,15,33,46,28,50,9,102,103,11,45,66,70]))},{id:"vyper",name:"Vyper",aliases:["vy"],import:()=>u(()=>import("./vyper.o-cPXEvd.js"),[])},{id:"wasm",name:"WebAssembly",import:()=>u(()=>import("./wasm.Cicx_DS6.js"),[])},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:()=>u(()=>import("./wenyan.D3VXSfF0.js"),[])},{id:"wgsl",name:"WGSL",import:()=>u(()=>import("./wgsl.BZz1Hhek.js"),[])},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:()=>u(()=>import("./wikitext.EfTDFRWl.js"),__vite__mapDeps([105,1,2,3,106,8,40,13,34,37,7,18,31,38,39,85,9,107,108,11,109,14,15,16,17,20,21,25,26,86,42,5,48,102,33,35,44,110,111,30,29,41,43,46,19,57,58,112,69,24,22,77,78,79,27,113]))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:()=>u(()=>import("./wolfram.BICIrM8O.js"),[])},{id:"xml",name:"XML",import:()=>u(()=>import("./xml.BzTcx3OS.js"),__vite__mapDeps([7,8]))},{id:"xsl",name:"XSL",import:()=>u(()=>import("./xsl.lJB8dDLf.js"),__vite__mapDeps([108,7,8]))},{id:"yaml",name:"YAML",aliases:["yml"],import:()=>u(()=>import("./yaml.C5gCGmDW.js"),[])},{id:"zenscript",name:"ZenScript",import:()=>u(()=>import("./zenscript.B1nm99XP.js"),[])},{id:"zig",name:"Zig",import:()=>u(()=>import("./zig.Bsp1M94H.js"),[])}],Si=Object.fromEntries(Mn.map(n=>[n.id,n.import])),Li=Object.fromEntries(Mn.flatMap(n=>n.aliases?.map(e=>[e,n.import])||[])),Oi={...Si,...Li},Ci=async n=>u(()=>import("./wasm.CsTmP73Z.js"),[]).then(e=>e.default(n)),wi=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:()=>u(()=>import("./andromeeda.YxQm0tCS.js"),[])},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:()=>u(()=>import("./aurora-x.BaWyeHV_.js"),[])},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:()=>u(()=>import("./ayu-dark.Bn5gmY5k.js"),[])},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:()=>u(()=>import("./catppuccin-frappe.CSPeAESR.js"),[])},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:()=>u(()=>import("./catppuccin-latte.BYdKNJ10.js"),[])},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:()=>u(()=>import("./catppuccin-macchiato.DVLwECkk.js"),[])},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:()=>u(()=>import("./catppuccin-mocha.CEfge3mM.js"),[])},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:()=>u(()=>import("./dark-plus.KEYLhlmT.js"),[])},{id:"dracula",displayName:"Dracula",type:"dark",import:()=>u(()=>import("./dracula.DGO8GyiP.js"),[])},{id:"dracula-soft",displayName:"Dracula Soft",type:"dark",import:()=>u(()=>import("./dracula-soft.9B1nZgL-.js"),[])},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:()=>u(()=>import("./github-dark.CzPA46E-.js"),[])},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:()=>u(()=>import("./github-dark-default.BXF7Vm5l.js"),[])},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:()=>u(()=>import("./github-dark-dimmed.CRDKj6ck.js"),[])},{id:"github-light",displayName:"GitHub Light",type:"light",import:()=>u(()=>import("./github-light.CRlnGVMD.js"),[])},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:()=>u(()=>import("./github-light-default.UREJT2Bw.js"),[])},{id:"houston",displayName:"Houston",type:"dark",import:()=>u(()=>import("./houston.CZZ6oYdA.js"),[])},{id:"light-plus",displayName:"Light Plus",type:"light",import:()=>u(()=>import("./light-plus.BsvsQ1iS.js"),[])},{id:"material-theme",displayName:"Material Theme",type:"dark",import:()=>u(()=>import("./material-theme.B2BuIiKK.js"),[])},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:()=>u(()=>import("./material-theme-darker.BrGg7AAd.js"),[])},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:()=>u(()=>import("./material-theme-lighter.DDRuGeQH.js"),[])},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:()=>u(()=>import("./material-theme-ocean.CBL0qBdF.js"),[])},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:()=>u(()=>import("./material-theme-palenight.D7gg1Usp.js"),[])},{id:"min-dark",displayName:"Min Dark",type:"dark",import:()=>u(()=>import("./min-dark.iSbrOpM4.js"),[])},{id:"min-light",displayName:"Min Light",type:"light",import:()=>u(()=>import("./min-light.BITGhEdf.js"),[])},{id:"monokai",displayName:"Monokai",type:"dark",import:()=>u(()=>import("./monokai.sMI-pExk.js"),[])},{id:"night-owl",displayName:"Night Owl",type:"dark",import:()=>u(()=>import("./night-owl.BeocmOPF.js"),[])},{id:"nord",displayName:"Nord",type:"dark",import:()=>u(()=>import("./nord.CsyjKwr8.js"),[])},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:()=>u(()=>import("./one-dark-pro.BTtaZsq5.js"),[])},{id:"one-light",displayName:"One Light",type:"light",import:()=>u(()=>import("./one-light.alpzPJ78.js"),[])},{id:"poimandres",displayName:"Poimandres",type:"dark",import:()=>u(()=>import("./poimandres.Cda-MJFk.js"),[])},{id:"red",displayName:"Red",type:"dark",import:()=>u(()=>import("./red.jaXbsbtS.js"),[])},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:()=>u(()=>import("./rose-pine.CX_FIdg1.js"),[])},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:()=>u(()=>import("./rose-pine-dawn.Bj5xdiaE.js"),[])},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:()=>u(()=>import("./rose-pine-moon.CdedUr_-.js"),[])},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:()=>u(()=>import("./slack-dark.C7oZ9nno.js"),[])},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:()=>u(()=>import("./slack-ochin.hXH8Gyq8.js"),[])},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:()=>u(()=>import("./snazzy-light.CA9nliXM.js"),[])},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:()=>u(()=>import("./solarized-dark.C86elO-m.js"),[])},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:()=>u(()=>import("./solarized-light.xPNGhBYe.js"),[])},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:()=>u(()=>import("./synthwave-84.BBDuFDsq.js"),[])},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:()=>u(()=>import("./tokyo-night.eJfcURhx.js"),[])},{id:"vesper",displayName:"Vesper",type:"dark",import:()=>u(()=>import("./vesper.BSB_bK09.js"),[])},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:()=>u(()=>import("./vitesse-black.B3g-KkBK.js"),[])},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:()=>u(()=>import("./vitesse-dark.Bxkoe-BC.js"),[])},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:()=>u(()=>import("./vitesse-light.Br6ll-O0.js"),[])}],Ii=Object.fromEntries(wi.map(n=>[n.id,n.import]));var U;(function(n){n[n.NotSet=-1]="NotSet",n[n.None=0]="None",n[n.Italic=1]="Italic",n[n.Bold=2]="Bold",n[n.Underline=4]="Underline"})(U||(U={}));var oe;(function(n){function e(d){return d.toString(2).padStart(32,"0")}n.toBinaryStr=e;function t(d){const p=n.getLanguageId(d),m=n.getTokenType(d),y=n.getFontStyle(d),h=n.getForeground(d),f=n.getBackground(d);console.log({languageId:p,tokenType:m,fontStyle:y,foreground:h,background:f})}n.print=t;function r(d){return(d&255)>>>0}n.getLanguageId=r;function i(d){return(d&768)>>>8}n.getTokenType=i;function o(d){return(d&1024)!==0}n.containsBalancedBrackets=o;function l(d){return(d&30720)>>>11}n.getFontStyle=l;function s(d){return(d&16744448)>>>15}n.getForeground=s;function a(d){return(d&4278190080)>>>24}n.getBackground=a;function c(d,p,m,y,h,f,_){let E=n.getLanguageId(d),b=n.getTokenType(d),P=n.containsBalancedBrackets(d)?1:0,S=n.getFontStyle(d),A=n.getForeground(d),F=n.getBackground(d);return p!==0&&(E=p),m!==8&&(b=m),y!==null&&(P=y?1:0),h!==-1&&(S=h),f!==0&&(A=f),_!==0&&(F=_),(E<<0|b<<8|P<<10|S<<11|A<<15|F<<24)>>>0}n.set=c})(oe||(oe={}));function Ce(n,e){const t=[],r=ki(n);let i=r.next();for(;i!==null;){let a=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":a=1;break;case"L":a=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let c=l();if(t.push({matcher:c,priority:a}),i!==",")break;i=r.next()}return t;function o(){if(i==="-"){i=r.next();const a=o();return c=>!!a&&!a(c)}if(i==="("){i=r.next();const a=s();return i===")"&&(i=r.next()),a}if(Xt(i)){const a=[];do a.push(i),i=r.next();while(Xt(i));return c=>e(a,c)}return null}function l(){const a=[];let c=o();for(;c;)a.push(c),c=o();return d=>a.every(p=>p(d))}function s(){const a=[];let c=l();for(;c&&(a.push(c),i==="|"||i===",");){do i=r.next();while(i==="|"||i===",");c=l()}return d=>a.some(p=>p(d))}}function Xt(n){return!!n&&!!n.match(/[\w\.:]+/)}function ki(n){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,t=e.exec(n);return{next:()=>{if(!t)return null;const r=t[0];return t=e.exec(n),r}}}function Vn(n){typeof n.dispose=="function"&&n.dispose()}function Di(n){return Rt(n)}function Rt(n){return Array.isArray(n)?Ni(n):typeof n=="object"?xi(n):n}function Ni(n){let e=[];for(let t=0,r=n.length;t{for(let r in t)n[r]=t[r]}),n}function Gn(n){const e=~n.lastIndexOf("/")||~n.lastIndexOf("\\");return e===0?n:~e===n.length-1?Gn(n.substring(0,n.length-1)):n.substr(~e+1)}let Je=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g;class Ae{static hasCaptures(e){return e===null?!1:(Je.lastIndex=0,Je.test(e))}static replaceCaptures(e,t,r){return e.replace(Je,(i,o,l,s)=>{let a=r[parseInt(o||l,10)];if(a){let c=t.substring(a.start,a.end);for(;c[0]===".";)c=c.substring(1);switch(s){case"downcase":return c.toLowerCase();case"upcase":return c.toUpperCase();default:return c}}else return i})}}function jn(n,e){return ne?1:0}function Fn(n,e){if(n===null&&e===null)return 0;if(!n)return-1;if(!e)return 1;let t=n.length,r=e.length;if(t===r){for(let i=0;i`);return}const o=t.lookup(e);n instanceof he?Le({baseGrammar:o,selfGrammar:i},r):st(n.ruleName,{baseGrammar:o,selfGrammar:i,repository:i.repository},r);const l=t.injections(n.scopeName);if(l)for(const s of l)r.add(new he(s))}function st(n,e,t){if(e.repository&&e.repository[n]){const r=e.repository[n];we([r],e,t)}}function Le(n,e){n.selfGrammar.patterns&&Array.isArray(n.selfGrammar.patterns)&&we(n.selfGrammar.patterns,{...n,repository:n.selfGrammar.repository},e),n.selfGrammar.injections&&we(Object.values(n.selfGrammar.injections),{...n,repository:n.selfGrammar.repository},e)}function we(n,e,t){for(const r of n){if(t.visitedRule.has(r))continue;t.visitedRule.add(r);const i=r.repository?Bn({},e.repository,r.repository):e.repository;Array.isArray(r.patterns)&&we(r.patterns,{...e,repository:i},t);const o=r.include;if(!o)continue;const l=$n(o);switch(l.kind){case 0:Le({...e,selfGrammar:e.baseGrammar},t);break;case 1:Le(e,t);break;case 2:st(l.ruleName,{...e,repository:i},t);break;case 3:case 4:const s=l.scopeName===e.selfGrammar.scopeName?e.selfGrammar:l.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(s){const a={baseGrammar:e.baseGrammar,selfGrammar:s,repository:i};l.kind===4?st(l.ruleName,a,t):Le(a,t)}else l.kind===4?t.add(new Mi(l.scopeName,l.ruleName)):t.add(new he(l.scopeName));break}}}class ji{kind=0}class Fi{kind=1}class Ui{ruleName;kind=2;constructor(e){this.ruleName=e}}class Hi{scopeName;kind=3;constructor(e){this.scopeName=e}}class $i{scopeName;ruleName;kind=4;constructor(e,t){this.scopeName=e,this.ruleName=t}}function $n(n){if(n==="$base")return new ji;if(n==="$self")return new Fi;const e=n.indexOf("#");if(e===-1)return new Hi(n);if(e===0)return new Ui(n.substring(1));{const t=n.substring(0,e),r=n.substring(e+1);return new $i(t,r)}}const zi=/\\(\d+)/,Jt=/\\(\d+)/g,Wi=-1,zn=-2;class _e{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,r,i){this.$location=e,this.id=t,this._name=r||null,this._nameIsCapturing=Ae.hasCaptures(this._name),this._contentName=i||null,this._contentNameIsCapturing=Ae.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${Gn(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:Ae.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Ae.replaceCaptures(this._contentName,e,t)}}class qi extends _e{retokenizeCapturedWithRuleId;constructor(e,t,r,i,o){super(e,t,r,i),this.retokenizeCapturedWithRuleId=o}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,r,i){throw new Error("Not supported!")}}class Ki extends _e{_match;captures;_cachedCompiledPatterns;constructor(e,t,r,i,o){super(e,t,r,null),this._match=new ee(i,this.id),this.captures=o,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,r,i){return this._getCachedCompiledPatterns(e).compileAG(e,r,i)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new me,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}class Qt extends _e{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,r,i,o){super(e,t,r,i),this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const r of this.patterns)e.getRule(r).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,r,i){return this._getCachedCompiledPatterns(e).compileAG(e,r,i)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new me,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}class lt extends _e{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,r,i,o,l,s,a,c,d){super(e,t,r,i),this._begin=new ee(o,this.id),this.beginCaptures=l,this._end=new ee(s||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=c||!1,this.patterns=d.patterns,this.hasMissingPatterns=d.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,r,i){return this._getCachedCompiledPatterns(e,t).compileAG(e,r,i)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new me;for(const r of this.patterns)e.getRule(r).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}}class Ie extends _e{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,r,i,o,l,s,a,c){super(e,t,r,i),this._begin=new ee(o,this.id),this.beginCaptures=l,this.whileCaptures=a,this._while=new ee(s,zn),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,r,i){return this._getCachedCompiledPatterns(e).compileAG(e,r,i)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new me;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,r,i){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,r,i)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new me,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}}class w{static createCaptureRule(e,t,r,i,o){return e.registerRule(l=>new qi(t,l,r,i,o))}static getCompiledRuleId(e,t,r){return e.id||t.registerRule(i=>{if(e.id=i,e.match)return new Ki(e.$vscodeTextmateLocation,e.id,e.name,e.match,w._compileCaptures(e.captures,t,r));if(typeof e.begin>"u"){e.repository&&(r=Bn({},r,e.repository));let o=e.patterns;return typeof o>"u"&&e.include&&(o=[{include:e.include}]),new Qt(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,w._compilePatterns(o,t,r))}return e.while?new Ie(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,w._compileCaptures(e.beginCaptures||e.captures,t,r),e.while,w._compileCaptures(e.whileCaptures||e.captures,t,r),w._compilePatterns(e.patterns,t,r)):new lt(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,w._compileCaptures(e.beginCaptures||e.captures,t,r),e.end,w._compileCaptures(e.endCaptures||e.captures,t,r),e.applyEndPatternLast,w._compilePatterns(e.patterns,t,r))}),e.id}static _compileCaptures(e,t,r){let i=[];if(e){let o=0;for(const l in e){if(l==="$vscodeTextmateLocation")continue;const s=parseInt(l,10);s>o&&(o=s)}for(let l=0;l<=o;l++)i[l]=null;for(const l in e){if(l==="$vscodeTextmateLocation")continue;const s=parseInt(l,10);let a=0;e[l].patterns&&(a=w.getCompiledRuleId(e[l],t,r)),i[s]=w.createCaptureRule(t,e[l].$vscodeTextmateLocation,e[l].name,e[l].contentName,a)}}return i}static _compilePatterns(e,t,r){let i=[];if(e)for(let o=0,l=e.length;oe.substring(i.start,i.end));return Jt.lastIndex=0,this.source.replace(Jt,(i,o)=>Un(r[parseInt(o,10)]||""))}_buildAnchorCache(){let e=[],t=[],r=[],i=[],o,l,s,a;for(o=0,l=this.source.length;or.source);this._cached=new Zt(e,t,this._items.map(r=>r.ruleId))}return this._cached}compileAG(e,t,r){return this._hasAnchors?t?r?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,r)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,r)),this._anchorCache.A1_G0):r?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,r)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,r)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,r){let i=this._items.map(o=>o.resolveAnchors(t,r));return new Zt(e,i,this._items.map(o=>o.ruleId))}}class Zt{regExps;rules;scanner;constructor(e,t,r){this.regExps=t,this.rules=r,this.scanner=e.createOnigScanner(t)}dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,r=this.rules.length;tthis._root.match(e));constructor(e,t,r){this._colorMap=e,this._defaults=t,this._root=r}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,i=this._cachedMatchRoot.get(t).find(o=>Xi(e.parent,o.parentScopes));return i?new Wn(i.fontStyle,i.foreground,i.background):null}}class Z{parent;scopeName;static push(e,t){for(const r of t)e=new Z(e,r);return e}static from(...e){let t=null;for(let r=0;r1&&(_=h.slice(0,h.length-1),_.reverse()),t[r++]=new Qi(f,_,i,a,c,d)}}return t}class Qi{scope;parentScopes;index;fontStyle;foreground;background;constructor(e,t,r,i,o,l){this.scope=e,this.parentScopes=t,this.index=r,this.fontStyle=i,this.foreground=o,this.background=l}}function Zi(n,e){n.sort((a,c)=>{let d=jn(a.scope,c.scope);return d!==0||(d=Fn(a.parentScopes,c.parentScopes),d!==0)?d:a.index-c.index});let t=0,r="#000000",i="#ffffff";for(;n.length>=1&&n[0].scope==="";){let a=n.shift();a.fontStyle!==-1&&(t=a.fontStyle),a.foreground!==null&&(r=a.foreground),a.background!==null&&(i=a.background)}let o=new eo(e),l=new Wn(t,o.getId(r),o.getId(i)),s=new pe(new fe(0,null,-1,0,0),[]);for(let a=0,c=n.length;ae?console.log("how did this happen?"):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),r!==0&&(this.foreground=r),i!==0&&(this.background=i)}}class pe{_mainRule;_children;_rulesWithParentScopes;constructor(e,t=[],r={}){this._mainRule=e,this._children=r,this._rulesWithParentScopes=t}static _sortBySpecificity(e){return e.length===1||e.sort(this._cmpBySpecificity),e}static _cmpBySpecificity(e,t){if(e.scopeDepth===t.scopeDepth){const r=e.parentScopes,i=t.parentScopes;let o=r===null?0:r.length,l=i===null?0:i.length;if(o===l)for(let s=0;s{const t=this._scopeToLanguage(e),r=this._toStandardTokenType(e);return new Qe(t,r)});_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){const t=e.match(De.STANDARD_TOKEN_TYPE_REGEXP);if(!t)return 8;switch(t[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/}class to{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([r,i])=>Un(r));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}}class en{stack;stoppedEarly;constructor(e,t){this.stack=e,this.stoppedEarly=t}}function qn(n,e,t,r,i,o,l,s){const a=e.content.length;let c=!1,d=-1;if(l){const y=no(n,e,t,r,i,o);i=y.stack,r=y.linePos,t=y.isFirstLine,d=y.anchorPosition}const p=Date.now();for(;!c;){if(s!==0&&Date.now()-p>s)return new en(i,!0);m()}return new en(i,!1);function m(){const y=ro(n,e,t,r,i,d);if(!y){o.produce(i,a),c=!0;return}const h=y.captureIndices,f=y.matchedRuleId,_=h&&h.length>0?h[0].end>r:!1;if(f===Wi){const E=i.getRule(n);o.produce(i,h[0].start),i=i.withContentNameScopesList(i.nameScopesList),le(n,e,t,i,o,E.endCaptures,h),o.produce(i,h[0].end);const b=i;if(i=i.parent,d=b.getAnchorPos(),!_&&b.getEnterPos()===r){i=b,o.produce(i,a),c=!0;return}}else{const E=n.getRule(f);o.produce(i,h[0].start);const b=i,P=E.getName(e.content,h),S=i.contentNameScopesList.pushAttributed(P,n);if(i=i.push(f,r,d,h[0].end===a,null,S,S),E instanceof lt){const A=E;le(n,e,t,i,o,A.beginCaptures,h),o.produce(i,h[0].end),d=h[0].end;const F=A.getContentName(e.content,h),X=S.pushAttributed(F,n);if(i=i.withContentNameScopesList(X),A.endHasBackReferences&&(i=i.withEndRule(A.getEndWithResolvedBackReferences(e.content,h))),!_&&b.hasSameRuleAs(i)){i=i.pop(),o.produce(i,a),c=!0;return}}else if(E instanceof Ie){const A=E;le(n,e,t,i,o,A.beginCaptures,h),o.produce(i,h[0].end),d=h[0].end;const F=A.getContentName(e.content,h),X=S.pushAttributed(F,n);if(i=i.withContentNameScopesList(X),A.whileHasBackReferences&&(i=i.withEndRule(A.getWhileWithResolvedBackReferences(e.content,h))),!_&&b.hasSameRuleAs(i)){i=i.pop(),o.produce(i,a),c=!0;return}}else if(le(n,e,t,i,o,E.captures,h),o.produce(i,h[0].end),i=i.pop(),!_){i=i.safePop(),o.produce(i,a),c=!0;return}}h[0].end>r&&(r=h[0].end,t=!1)}}function no(n,e,t,r,i,o){let l=i.beginRuleCapturedEOL?0:-1;const s=[];for(let a=i;a;a=a.pop()){const c=a.getRule(n);c instanceof Ie&&s.push({rule:c,stack:a})}for(let a=s.pop();a;a=s.pop()){const{ruleScanner:c,findOptions:d}=ao(a.rule,n,a.stack.endRule,t,r===l),p=c.findNextMatchSync(e,r,d);if(p){if(p.ruleId!==zn){i=a.stack.pop();break}p.captureIndices&&p.captureIndices.length&&(o.produce(a.stack,p.captureIndices[0].start),le(n,e,t,a.stack,o,a.rule.whileCaptures,p.captureIndices),o.produce(a.stack,p.captureIndices[0].end),l=p.captureIndices[0].end,p.captureIndices[0].end>r&&(r=p.captureIndices[0].end,t=!1))}else{i=a.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:l,isFirstLine:t}}function ro(n,e,t,r,i,o){const l=io(n,e,t,r,i,o),s=n.getInjections();if(s.length===0)return l;const a=oo(s,n,e,t,r,i,o);if(!a)return l;if(!l)return a;const c=l.captureIndices[0].start,d=a.captureIndices[0].start;return d=s)&&(s=P,a=b.captureIndices,c=b.ruleId,d=h.priority,s===i))break}return a?{priorityMatch:d===-1,captureIndices:a,matchedRuleId:c}:null}function Kn(n,e,t,r,i){return{ruleScanner:n.compileAG(e,t,r,i),findOptions:0}}function ao(n,e,t,r,i){return{ruleScanner:n.compileWhileAG(e,t,r,i),findOptions:0}}function le(n,e,t,r,i,o,l){if(o.length===0)return;const s=e.content,a=Math.min(o.length,l.length),c=[],d=l[0].end;for(let p=0;pd)break;for(;c.length>0&&c[c.length-1].endPos<=y.start;)i.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop();if(c.length>0?i.produceFromScopes(c[c.length-1].scopes,y.start):i.produce(r,y.start),m.retokenizeCapturedWithRuleId){const f=m.getName(s,l),_=r.contentNameScopesList.pushAttributed(f,n),E=m.getContentName(s,l),b=_.pushAttributed(E,n),P=r.push(m.retokenizeCapturedWithRuleId,y.start,-1,!1,null,_,b),S=n.createOnigString(s.substring(0,y.end));qn(n,S,t&&y.start===0,y.start,P,i,!1,0),Vn(S);continue}const h=m.getName(s,l);if(h!==null){const _=(c.length>0?c[c.length-1].scopes:r.contentNameScopesList).pushAttributed(h,n);c.push(new so(_,y.end))}}for(;c.length>0;)i.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop()}class so{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}}function lo(n,e,t,r,i,o,l,s){return new uo(n,e,t,r,i,o,l,s)}function tn(n,e,t,r,i){const o=Ce(e,Ne),l=w.getCompiledRuleId(t,r,i.repository);for(const s of o)n.push({debugSelector:e,matcher:s.matcher,ruleId:l,grammar:i,priority:s.priority})}function Ne(n,e){if(e.length{for(let i=t;it&&n.substr(0,t)===e&&n[t]==="."}class uo{_rootScopeName;balancedBracketSelectors;_onigLib;_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}constructor(e,t,r,i,o,l,s,a){if(this._rootScopeName=e,this.balancedBracketSelectors=l,this._onigLib=a,this._basicScopeAttributesProvider=new De(r,i),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=s,this._grammar=nn(t,null),this._injections=null,this._tokenTypeMatchers=[],o)for(const c of Object.keys(o)){const d=Ce(c,Ne);for(const p of d)this._tokenTypeMatchers.push({matcher:p.matcher,type:o[c]})}}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e={lookup:o=>o===this._rootScopeName?this._grammar:this.getExternalGrammar(o),injections:o=>this._grammarRepository.injections(o)},t=[],r=this._rootScopeName,i=e.lookup(r);if(i){const o=i.injections;if(o)for(let s in o)tn(t,s,o[s],this,i);const l=this._grammarRepository.injections(r);l&&l.forEach(s=>{const a=this.getExternalGrammar(s);if(a){const c=a.injectionSelector;c&&tn(t,c,a,this,a)}})}return t.sort((o,l)=>o.priority-l.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,r=e(t);return this._ruleId2desc[t]=r,r}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const r=this._grammarRepository.lookup(e);if(r)return this._includedGrammars[e]=nn(r,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,r=0){const i=this._tokenize(e,t,!1,r);return{tokens:i.lineTokens.getResult(i.ruleStack,i.lineLength),ruleStack:i.ruleStack,stoppedEarly:i.stoppedEarly}}tokenizeLine2(e,t,r=0){const i=this._tokenize(e,t,!0,r);return{tokens:i.lineTokens.getBinaryResult(i.ruleStack,i.lineLength),ruleStack:i.ruleStack,stoppedEarly:i.stoppedEarly}}_tokenize(e,t,r,i){this._rootId===-1&&(this._rootId=w.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let o;if(!t||t===z.NULL){o=!0;const d=this._basicScopeAttributesProvider.getDefaultAttributes(),p=this.themeProvider.getDefaults(),m=oe.set(0,d.languageId,d.tokenType,null,p.fontStyle,p.foregroundId,p.backgroundId),y=this.getRule(this._rootId).getName(null,null);let h;y?h=x.createRootAndLookUpScopeName(y,m,this):h=x.createRoot("unknown",m),t=new z(null,this._rootId,-1,-1,!1,null,h,h)}else o=!1,t.reset();e=e+` -`;const l=this.createOnigString(e),s=l.content.length,a=new ho(r,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=qn(this,l,o,0,t,a,!0,i);return Vn(l),{lineLength:s,lineTokens:a,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}}function nn(n,e){return n=Di(n),n.repository=n.repository||{},n.repository.$self={$vscodeTextmateLocation:n.$vscodeTextmateLocation,patterns:n.patterns,name:n.scopeName},n.repository.$base=e||n.repository.$self,n}class x{parent;scopePath;tokenAttributes;static fromExtension(e,t){let r=e,i=e?.scopePath??null;for(const o of t)i=Z.push(i,o.scopeNames),r=new x(r,i,o.encodedTokenAttributes);return r}static createRoot(e,t){return new x(null,new Z(null,e),t)}static createRootAndLookUpScopeName(e,t,r){const i=r.getMetadataForScope(e),o=new Z(null,e),l=r.themeProvider.themeMatch(o),s=x.mergeAttributes(t,i,l);return new x(null,o,s)}get scopeName(){return this.scopePath.scopeName}constructor(e,t,r){this.parent=e,this.scopePath=t,this.tokenAttributes=r}toString(){return this.getScopeNames().join(" ")}equals(e){return x.equals(this,e)}static equals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}while(!0)}static mergeAttributes(e,t,r){let i=-1,o=0,l=0;return r!==null&&(i=r.fontStyle,o=r.foregroundId,l=r.backgroundId),oe.set(e,t.languageId,t.tokenType,null,i,o,l)}pushAttributed(e,t){if(e===null)return this;if(e.indexOf(" ")===-1)return x._pushAttributed(this,e,t);const r=e.split(/ /g);let i=this;for(const o of r)i=x._pushAttributed(i,o,t);return i}static _pushAttributed(e,t,r){const i=r.getMetadataForScope(t),o=e.scopePath.push(t),l=r.themeProvider.themeMatch(o),s=x.mergeAttributes(e.tokenAttributes,i,l);return new x(e,o,s)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){const t=[];let r=this;for(;r&&r!==e;)t.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(r.parent?.scopePath??null)}),r=r.parent;return r===e?t.reverse():void 0}}class z{parent;ruleId;beginRuleCapturedEOL;endRule;nameScopesList;contentNameScopesList;_stackElementBrand=void 0;static NULL=new z(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;constructor(e,t,r,i,o,l,s,a){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=o,this.endRule=l,this.nameScopesList=s,this.contentNameScopesList=a,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=i}equals(e){return e===null?!1:z._equals(this,e)}static _equals(e,t){return e===t?!0:this._structuralEquals(e,t)?x.equals(e.contentNameScopesList,t.contentNameScopesList):!1}static _structuralEquals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){z._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,t,r,i,o,l,s){return new z(this,e,t,r,i,o,l,s)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){const e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(e){return this.endRule===e?this:new z(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(e,t){const r=x.fromExtension(e?.nameScopesList??null,t.nameScopesList);return new z(e,t.ruleId,t.enterPos??-1,t.anchorPos??-1,t.beginRuleCapturedEOL,t.endRule,r,x.fromExtension(r,t.contentNameScopesList))}}class po{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(r=>r==="*"?(this.allowAny=!0,[]):Ce(r,Ne).map(i=>i.matcher)),this.unbalancedBracketScopes=t.flatMap(r=>Ce(r,Ne).map(i=>i.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}}class ho{balancedBracketSelectors;_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;constructor(e,t,r,i){this.balancedBracketSelectors=i,this._emitBinaryTokens=e,this._tokenTypeOverrides=r,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let i=e?.tokenAttributes??0,o=!1;if(this.balancedBracketSelectors?.matchesAlways&&(o=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const l=e?.getScopeNames()??[];for(const s of this._tokenTypeOverrides)s.matcher(l)&&(i=oe.set(i,0,s.type,null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(l))}if(o&&(i=oe.set(i,0,8,o,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===i){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(i),this._lastTokenEndIndex=t;return}const r=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:r}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const r=new Uint32Array(this._binaryTokens.length);for(let i=0,o=this._binaryTokens.length;i0;)await Promise.all(l.Q.map(s=>this._loadSingleGrammar(s.scopeName))),l.processQueue();return this._grammarForScopeName(e,t,r,i,o)}async _loadSingleGrammar(e){return this._ensureGrammarCache.has(e)||this._ensureGrammarCache.set(e,this._doLoadSingleGrammar(e)),this._ensureGrammarCache.get(e)}async _doLoadSingleGrammar(e){const t=await this._options.loadGrammar(e);if(t){const r=typeof this._options.getInjections=="function"?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,r)}}async addGrammar(e,t=[],r=0,i=null){return this._syncRegistry.addGrammar(e,t),await this._grammarForScopeName(e.scopeName,r,i)}_grammarForScopeName(e,t=0,r=null,i=null,o=null){return this._syncRegistry.grammarForScopeName(e,t,r,i,o)}};const _o=z.NULL,k={LANGUAGEID_MASK:255,TOKEN_TYPE_MASK:768,BALANCED_BRACKETS_MASK:1024,FONT_STYLE_MASK:14336,FOREGROUND_MASK:8372224,BACKGROUND_MASK:4286578688,LANGUAGEID_OFFSET:0,TOKEN_TYPE_OFFSET:8,BALANCED_BRACKETS_OFFSET:10,FONT_STYLE_OFFSET:11,FOREGROUND_OFFSET:15,BACKGROUND_OFFSET:24};class W{static toBinaryStr(e){let t=e.toString(2);for(;t.length<32;)t=`0${t}`;return t}static getLanguageId(e){return(e&k.LANGUAGEID_MASK)>>>k.LANGUAGEID_OFFSET}static getTokenType(e){return(e&k.TOKEN_TYPE_MASK)>>>k.TOKEN_TYPE_OFFSET}static getFontStyle(e){return(e&k.FONT_STYLE_MASK)>>>k.FONT_STYLE_OFFSET}static getForeground(e){return(e&k.FOREGROUND_MASK)>>>k.FOREGROUND_OFFSET}static getBackground(e){return(e&k.BACKGROUND_MASK)>>>k.BACKGROUND_OFFSET}static containsBalancedBrackets(e){return(e&k.BALANCED_BRACKETS_MASK)!==0}static set(e,t,r,i,o,l){let s=W.getLanguageId(e),a=W.getTokenType(e),c=W.getFontStyle(e),d=W.getForeground(e),p=W.getBackground(e);const m=W.containsBalancedBrackets(e)?1:0;return t!==0&&(s=t),r!==0&&(a=r===8?0:r),i!==U.NotSet&&(c=i),o!==0&&(d=o),l!==0&&(p=l),(s<>>0}}function ze(n,e=!1){const t=n.split(/(\r?\n)/g);let r=0;const i=[];for(let o=0;ot&&r.push({...n,content:n.content.slice(t,i),offset:n.offset+t}),t=i;return tr-i);return t.length?n.map(r=>r.flatMap(i=>{const o=t.filter(l=>i.offsetl-i.offset).sort((l,s)=>l-s);return o.length?go(i,o):i})):n}function J(n,e){return n&&(e?.[n?.toLowerCase()]||n)}function er(n){const e={};return n.color&&(e.color=n.color),n.bgColor&&(e["background-color"]=n.bgColor),n.fontStyle&&(n.fontStyle&U.Italic&&(e["font-style"]="italic"),n.fontStyle&U.Bold&&(e["font-weight"]="bold"),n.fontStyle&U.Underline&&(e["text-decoration"]="underline")),e}function tr(n){return Object.entries(n).map(([e,t])=>`${e}:${t}`).join(";")}function Eo(n){const e=ze(n,!0).map(([i])=>i);function t(i){let o=i,l=0;for(const s of e){if(oNumber.parseInt(l));o.length===3&&!o.some(l=>Number.isNaN(l))&&(i={type:"rgb",rgb:o})}else if(r==="5"){const o=Number.parseInt(n[e+t]);Number.isNaN(o)||(i={type:"table",index:Number(o)})}return[t,i]}function bo(n){const e=[];for(let t=0;t=90&&i<=97?e.push({type:"setForegroundColor",value:{type:"named",name:Q[i-90+8]}}):i>=100&&i<=107&&e.push({type:"setBackgroundColor",value:{type:"named",name:Q[i-100+8]}})}return e}function To(){let n=null,e=null,t=new Set;return{parse(r){const i=[];let o=0;do{const l=vo(r,o),s=l.sequence?r.substring(o,l.startPosition):r.substring(o);if(s.length>0&&i.push({value:s,foreground:n,background:e,decorations:new Set(t)}),l.sequence){const a=bo(l.sequence);for(const c of a)c.type==="resetAll"?(n=null,e=null,t.clear()):c.type==="resetForegroundColor"?n=null:c.type==="resetBackgroundColor"?e=null:c.type==="resetDecoration"&&t.delete(c.value);for(const c of a)c.type==="setForegroundColor"?n=c.value:c.type==="setBackgroundColor"?e=c.value:c.type==="setDecoration"&&t.add(c.value)}o=l.position}while(oMath.max(0,Math.min(a,255)).toString(16).padStart(2,"0")).join("")}`}let r;function i(){if(r)return r;r=[];for(let c=0;c[s,n.colors?.[`terminal.ansi${s[0].toUpperCase()}${s.substring(1)}`]]))),l=To();return i.map(s=>l.parse(s[0]).map(a=>{let c,d;a.decorations.has("reverse")?(c=a.background?o.value(a.background):n.bg,d=a.foreground?o.value(a.foreground):n.fg):(c=a.foreground?o.value(a.foreground):n.fg,d=a.background?o.value(a.background):void 0),c=J(c,r),d=J(d,r),a.decorations.has("dim")&&(c=So(c));let p=U.None;return a.decorations.has("bold")&&(p|=U.Bold),a.decorations.has("italic")&&(p|=U.Italic),a.decorations.has("underline")&&(p|=U.Underline),{content:a.value,offset:s[1],color:c,bgColor:d,fontStyle:p}}))}function So(n){const e=n.match(/#([0-9a-f]{3})([0-9a-f]{3})?([0-9a-f]{2})?/);if(e)if(e[3]){const r=Math.round(Number.parseInt(e[3],16)/2).toString(16).padStart(2,"0");return`#${e[1]}${e[2]}${r}`}else return e[2]?`#${e[1]}${e[2]}80`:`#${Array.from(e[1]).map(r=>`${r}${r}`).join("")}80`;const t=n.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return t?`var(${t[1]}-dim)`:n}function Pt(n,e,t={}){const{lang:r="text",theme:i=n.getLoadedThemes()[0]}=t;if(Xn(r)||Jn(i))return ze(e).map(a=>[{content:a[0],offset:a[1]}]);const{theme:o,colorMap:l}=n.setTheme(i);if(r==="ansi")return Po(o,e,t);const s=n.getLanguage(r);return Lo(e,s,o,l,t)}function Lo(n,e,t,r,i){const o={...t.colorReplacements,...i?.colorReplacements},{tokenizeMaxLineLength:l=0,tokenizeTimeLimit:s=500}=i,a=ze(n);let c=_o,d=[];const p=[];for(let m=0,y=a.length;m0&&h.length>=l){d=[],p.push([{content:h,offset:f,color:"",fontStyle:0}]);continue}let _,E,b;i.includeExplanation&&(_=e.tokenizeLine(h,c),E=_.tokens,b=0);const P=e.tokenizeLine2(h,c,s),S=P.tokens.length/2;for(let A=0;A=0&&o>=0;)on(e[i],r[o])&&(i-=1),o-=1;return i===-1}function wo(n,e,t){const r=[];let i=0;for(let o=0,l=n.settings.length;oc.trim());else if(Array.isArray(s.scope))a=s.scope;else continue;for(let c=0,d=a.length;cl[1]).map(l=>({color:l[0],theme:l[1]})),i=Io(...r.map(l=>Pt(n,e,{...t,theme:l.theme})));return i[0].map((l,s)=>l.map((a,c)=>{const d={content:a.content,variants:{},offset:a.offset};return i.forEach((p,m)=>{const{content:y,explanation:h,offset:f,..._}=p[s][c];d.variants[r[m].color]=_}),d}))}function Io(...n){const e=n.map(()=>[]),t=n.length;for(let r=0;ra[r]),o=e.map(()=>[]);e.forEach((a,c)=>a.push(o[c]));const l=i.map(()=>0),s=i.map(a=>a[0]);for(;s.every(a=>a);){const a=Math.min(...s.map(c=>c.content.length));for(let c=0;cf[1]).map(f=>({color:f[0],theme:f[1]})).sort((f,_)=>f.color===a?-1:_.color===a?1:0);if(p.length===0)throw new D("`themes` option must not be empty");const m=nr(n,e,t);if(a&&!p.find(f=>f.color===a))throw new D(`\`themes\` option must contain the defaultColor key \`${a}\``);const y=p.map(f=>n.getTheme(f.theme)),h=p.map(f=>f.color);o=m.map(f=>f.map(_=>ko(_,h,c,a))),i=p.map((f,_)=>(_===0&&a?"":`${c+f.color}:`)+(J(y[_].fg,d)||"inherit")).join(";"),r=p.map((f,_)=>(_===0&&a?"":`${c+f.color}-bg:`)+(J(y[_].bg,d)||"inherit")).join(";"),l=`shiki-themes ${y.map(f=>f.name).join(" ")}`,s=a?void 0:[i,r].join(";")}else if("theme"in t){const{colorReplacements:a}=t;o=Pt(n,e,t);const c=n.getTheme(t.theme);r=J(c.bg,a),i=J(c.fg,a),l=c.name}else throw new D("Invalid options, either `theme` or `themes` must be provided");return{tokens:o,fg:i,bg:r,themeName:l,rootStyle:s}}function ko(n,e,t,r){const i={content:n.content,explanation:n.explanation,offset:n.offset},o=e.map(a=>er(n.variants[a])),l=new Set(o.flatMap(a=>Object.keys(a))),s=o.reduce((a,c,d)=>{for(const p of l){const m=c[p]||"inherit";if(d===0&&r)a[p]=m;else{const y=p==="color"?"":p==="background-color"?"-bg":`-${p}`,h=t+e[d]+(p==="color"?"":y);a[p]?a[p]+=`;${h}:${m}`:a[p]=`${h}:${m}`}}return a},{});return i.htmlStyle=r?tr(s):Object.values(s).join(";"),i}function Do(){const n=new WeakMap;function e(r){if(!n.has(r.meta)){let o=function(s){return typeof s=="number"?{...i.indexToPos(s),offset:s}:{...s,offset:i.posToIndex(s.line,s.character)}};const i=Eo(r.source),l=(r.options.decorations||[]).map(s=>({...s,start:o(s.start),end:o(s.end)}));t(l),n.set(r.meta,{decorations:l,converter:i,source:r.source})}return n.get(r.meta)}function t(r){for(let i=0;io.end.offset)throw new D(`Invalid decoration range: ${JSON.stringify(o.start)} - ${JSON.stringify(o.end)}`);for(let l=i+1;l[s.start.offset,s.end.offset]);return yo(r,o)},code(r){if(!this.options.decorations?.length)return;const i=e(this),o=Array.from(r.children).filter(p=>p.type==="element"&&p.tagName==="span");if(o.length!==i.converter.lines.length)throw new D(`Number of lines in code element (${o.length}) does not match the number of lines in the source (${i.converter.lines.length}). Failed to apply decorations.`);function l(p,m,y,h){const f=o[p];let _="",E=-1,b=-1;function P(A){return A.type==="text"?A.value:A.type==="element"?A.children.map(P).join(""):""}if(m===0&&(E=0),y===0&&(b=0),y===Number.POSITIVE_INFINITY&&(b=f.children.length),E===-1||b===-1)for(let A=0;A_);return p.tagName=m.tagName||"span",p.properties={...p.properties,...h,class:p.properties.class},m.properties?.class&&Zn(p,m.properties.class),p=f(p,y)||p,p}const c=[],d=i.decorations.sort((p,m)=>m.start.offset-p.start.offset);for(const p of d){const{start:m,end:y}=p;if(m.line===y.line)l(m.line,m.character,y.character,p);else if(m.lines(h,p));l(y.line,0,y.character,p)}}c.forEach(p=>p())}}}const No=[Do()];function Me(n){return[...n.transformers||[],...No]}function Ve(n,e,t,r={meta:{},options:t,codeToHast:(i,o)=>Ve(n,i,o),codeToTokens:(i,o)=>xe(n,i,o)}){let i=e;for(const m of Me(t))i=m.preprocess?.call(r,i,t)||i;let{tokens:o,fg:l,bg:s,themeName:a,rootStyle:c}=xe(n,i,t);const{mergeWhitespaces:d=!0}=t;d===!0?o=Mo(o):d==="never"&&(o=Vo(o));const p={...r,get source(){return i}};for(const m of Me(t))o=m.tokens?.call(p,o)||o;return xo(o,{...t,fg:l,bg:s,themeName:a,rootStyle:c},p)}function xo(n,e,t){const r=Me(e),i=[],o={type:"root",children:[]},{structure:l="classic"}=e;let s={type:"element",tagName:"pre",properties:{class:`shiki ${e.themeName||""}`,style:e.rootStyle||`background-color:${e.bg};color:${e.fg}`,tabindex:"0",...Object.fromEntries(Array.from(Object.entries(e.meta||{})).filter(([m])=>!m.startsWith("_")))},children:[]},a={type:"element",tagName:"code",properties:{},children:i};const c=[],d={...t,structure:l,addClassToHast:Zn,get source(){return t.source},get tokens(){return n},get options(){return e},get root(){return o},get pre(){return s},get code(){return a},get lines(){return c}};if(n.forEach((m,y)=>{y&&(l==="inline"?o.children.push({type:"element",tagName:"br",properties:{},children:[]}):l==="classic"&&i.push({type:"text",value:` -`}));let h={type:"element",tagName:"span",properties:{class:"line"},children:[]},f=0;for(const _ of m){let E={type:"element",tagName:"span",properties:{},children:[{type:"text",value:_.content}]};const b=_.htmlStyle||tr(er(_));b&&(E.properties.style=b);for(const P of r)E=P?.span?.call(d,E,y+1,f,h)||E;l==="inline"?o.children.push(E):l==="classic"&&h.children.push(E),f+=_.content.length}if(l==="classic"){for(const _ of r)h=_?.line?.call(d,h,y+1)||h;c.push(h),i.push(h)}}),l==="classic"){for(const m of r)a=m?.code?.call(d,a)||a;s.children.push(a);for(const m of r)s=m?.pre?.call(d,s)||s;o.children.push(s)}let p=o;for(const m of r)p=m?.root?.call(d,p)||p;return p}function Mo(n){return n.map(e=>{const t=[];let r="",i=0;return e.forEach((o,l)=>{const a=!(o.fontStyle&&o.fontStyle&U.Underline);a&&o.content.match(/^\s+$/)&&e[l+1]?(i||(i=o.offset),r+=o.content):r?(a?t.push({...o,offset:i,content:r+o.content}):t.push({content:r,offset:i},o),i=0,r=""):t.push(o)}),t})}function Vo(n){return n.map(e=>e.flatMap(t=>{if(t.content.match(/^\s+$/))return t;const r=t.content.match(/^(\s*)(.*?)(\s*)$/);if(!r)return t;const[,i,o,l]=r;if(!i&&!l)return t;const s=[{...t,offset:t.offset+i.length,content:o}];return i&&s.unshift({content:i,offset:t.offset}),l&&s.push({content:l,offset:t.offset+i.length+o.length}),s}))}const Bo=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class ge{constructor(e,t,r){this.property=e,this.normal=t,r&&(this.space=r)}}ge.prototype.property={};ge.prototype.normal={};ge.prototype.space=null;function rr(n,e){const t={},r={};let i=-1;for(;++i4&&t.slice(0,4)==="data"&&Ho.test(e)){if(e.charAt(4)==="-"){const o=e.slice(5).replace(sn,qo);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=e.slice(4);if(!sn.test(o)){let l=o.replace($o,Wo);l.charAt(0)!=="-"&&(l="-"+l),e="data"+l}}i=St}return new i(r,e)}function Wo(n){return"-"+n.toLowerCase()}function qo(n){return n.charAt(1).toUpperCase()}const Ko=rr([ar,or,cr,ur,Fo],"html"),dr=rr([ar,or,cr,ur,Uo],"svg"),ln={}.hasOwnProperty;function Xo(n,e){const t=e||{};function r(i,...o){let l=r.invalid;const s=r.handlers;if(i&&ln.call(i,n)){const a=String(i[n]);l=ln.call(s,a)?s[a]:r.unknown}if(l)return l.call(this,i,...o)}return r.handlers=t.handlers||{},r.invalid=t.invalid,r.unknown=t.unknown,r}function Yo(n,e){if(n=n.replace(e.subset?Jo(e.subset):/["&'<>`]/g,r),e.subset||e.escapeOnly)return n;return n.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,t).replace(/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,r);function t(i,o,l){return e.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,l.charCodeAt(o+2),e)}function r(i,o,l){return e.format(i.charCodeAt(0),l.charCodeAt(o+1),e)}}function Jo(n){const e=[];let t=-1;for(;++t",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},ta=["cent","copy","divide","gt","lt","not","para","times"],pr={}.hasOwnProperty,dt={};let Re;for(Re in tt)pr.call(tt,Re)&&(dt[tt[Re]]=Re);function na(n,e,t,r){const i=String.fromCharCode(n);if(pr.call(dt,i)){const o=dt[i],l="&"+o;return t&&ea.includes(o)&&!ta.includes(o)&&(!r||e&&e!==61&&/[^\da-z]/i.test(String.fromCharCode(e)))?l:l+";"}return""}function ra(n,e,t){let r=Qo(n,e,t.omitOptionalSemicolons),i;if((t.useNamedReferences||t.useShortestReferences)&&(i=na(n,e,t.omitOptionalSemicolons,t.attribute)),(t.useShortestReferences||!i)&&t.useShortestReferences){const o=Zo(n,e,t.omitOptionalSemicolons);o.length|^->||--!>|"],aa=["<",">"];function sa(n,e,t,r){return r.settings.bogusComments?"":"";function i(o){return re(o,Object.assign({},r.settings.characterReferences,{subset:aa}))}}function la(n,e,t,r){return""}function cn(n,e){const t=String(n);if(typeof e!="string")throw new TypeError("Expected character");let r=0,i=t.indexOf(e);for(;i!==-1;)r++,i=t.indexOf(e,i+e.length);return r}function ca(n,e){const t=e||{};return(n[n.length-1]===""?[...n,""]:n).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}function ua(n){return n.join(" ").trim()}const da=/[ \t\n\f\r]/g;function Lt(n){return typeof n=="object"?n.type==="text"?un(n.value):!1:un(n)}function un(n){return n.replace(da,"")===""}const C=mr(1),hr=mr(-1),pa=[];function mr(n){return e;function e(t,r,i){const o=t?t.children:pa;let l=(r||0)+n,s=o[l];if(!i)for(;s&&Lt(s);)l+=n,s=o[l];return s}}const ha={}.hasOwnProperty;function fr(n){return e;function e(t,r,i){return ha.call(n,t.tagName)&&n[t.tagName](t,r,i)}}const Ot=fr({body:fa,caption:nt,colgroup:nt,dd:Ea,dt:ya,head:nt,html:ma,li:ga,optgroup:va,option:ba,p:_a,rp:dn,rt:dn,tbody:Aa,td:pn,tfoot:Ra,th:pn,thead:Ta,tr:Pa});function nt(n,e,t){const r=C(t,e,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&Lt(r.value.charAt(0)))}function ma(n,e,t){const r=C(t,e);return!r||r.type!=="comment"}function fa(n,e,t){const r=C(t,e);return!r||r.type!=="comment"}function _a(n,e,t){const r=C(t,e);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!t||!(t.type==="element"&&(t.tagName==="a"||t.tagName==="audio"||t.tagName==="del"||t.tagName==="ins"||t.tagName==="map"||t.tagName==="noscript"||t.tagName==="video"))}function ga(n,e,t){const r=C(t,e);return!r||r.type==="element"&&r.tagName==="li"}function ya(n,e,t){const r=C(t,e);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function Ea(n,e,t){const r=C(t,e);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function dn(n,e,t){const r=C(t,e);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function va(n,e,t){const r=C(t,e);return!r||r.type==="element"&&r.tagName==="optgroup"}function ba(n,e,t){const r=C(t,e);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function Ta(n,e,t){const r=C(t,e);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function Aa(n,e,t){const r=C(t,e);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function Ra(n,e,t){return!C(t,e)}function Pa(n,e,t){const r=C(t,e);return!r||r.type==="element"&&r.tagName==="tr"}function pn(n,e,t){const r=C(t,e);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const Sa=fr({body:Ca,colgroup:wa,head:Oa,html:La,tbody:Ia});function La(n){const e=C(n,-1);return!e||e.type!=="comment"}function Oa(n){const e=n.children,t=[];let r=-1;for(;++r0}function Ca(n){const e=C(n,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&Lt(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function wa(n,e,t){const r=hr(t,e),i=C(n,-1,!0);return t&&r&&r.type==="element"&&r.tagName==="colgroup"&&Ot(r,t.children.indexOf(r),t)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function Ia(n,e,t){const r=hr(t,e),i=C(n,-1);return t&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&Ot(r,t.children.indexOf(r),t)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const Pe={name:[[` -\f\r &/=>`.split(""),` -\f\r "&'/=>\``.split("")],[`\0 -\f\r "&'/<=>`.split(""),`\0 -\f\r "&'/<=>\``.split("")]],unquoted:[[` -\f\r &>`.split(""),`\0 -\f\r "&'<=>\``.split("")],[`\0 -\f\r "&'<=>\``.split(""),`\0 -\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function ka(n,e,t,r){const i=r.schema,o=i.space==="svg"?!1:r.settings.omitOptionalTags;let l=i.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(n.tagName.toLowerCase());const s=[];let a;i.space==="html"&&n.tagName==="svg"&&(r.schema=dr);const c=Da(r,n.properties),d=r.all(i.space==="html"&&n.tagName==="template"?n.content:n);return r.schema=i,d&&(l=!1),(c||!o||!Sa(n,e,t))&&(s.push("<",n.tagName,c?" "+c:""),l&&(i.space==="svg"||r.settings.closeSelfClosing)&&(a=c.charAt(c.length-1),(!r.settings.tightSelfClosing||a==="/"||a&&a!=='"'&&a!=="'")&&s.push(" "),s.push("/")),s.push(">")),s.push(d),!l&&(!o||!Ot(n,e,t))&&s.push(""),s.join("")}function Da(n,e){const t=[];let r=-1,i;if(e){for(i in e)if(e[i]!==null&&e[i]!==void 0){const o=Na(n,i,e[i]);o&&t.push(o)}}for(;++rcn(t,n.alternative)&&(l=n.alternative),s=l+re(t,Object.assign({},n.settings.characterReferences,{subset:(l==="'"?Pe.single:Pe.double)[i][o],attribute:!0}))+l),a+(s&&"="+s))}const xa=["<","&"];function _r(n,e,t,r){return t&&t.type==="element"&&(t.tagName==="script"||t.tagName==="style")?n.value:re(n.value,Object.assign({},r.settings.characterReferences,{subset:xa}))}function Ma(n,e,t,r){return r.settings.allowDangerousHtml?n.value:_r(n,e,t,r)}function Va(n,e,t,r){return r.all(n)}const Ba=Xo("type",{invalid:Ga,unknown:ja,handlers:{comment:sa,doctype:la,element:ka,raw:Ma,root:Va,text:_r}});function Ga(n){throw new Error("Expected node, not `"+n+"`")}function ja(n){const e=n;throw new Error("Cannot compile unknown node `"+e.type+"`")}const Fa={},Ua={},Ha=[];function $a(n,e){const t=e||Fa,r=t.quote||'"',i=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:za,all:Wa,settings:{omitOptionalTags:t.omitOptionalTags||!1,allowParseErrors:t.allowParseErrors||!1,allowDangerousCharacters:t.allowDangerousCharacters||!1,quoteSmart:t.quoteSmart||!1,preferUnquoted:t.preferUnquoted||!1,tightAttributes:t.tightAttributes||!1,upperDoctype:t.upperDoctype||!1,tightDoctype:t.tightDoctype||!1,bogusComments:t.bogusComments||!1,tightCommaSeparatedLists:t.tightCommaSeparatedLists||!1,tightSelfClosing:t.tightSelfClosing||!1,collapseEmptyAttributes:t.collapseEmptyAttributes||!1,allowDangerousHtml:t.allowDangerousHtml||!1,voids:t.voids||Bo,characterReferences:t.characterReferences||Ua,closeSelfClosing:t.closeSelfClosing||!1,closeEmptyElements:t.closeEmptyElements||!1},schema:t.space==="svg"?dr:Ko,quote:r,alternative:i}.one(Array.isArray(n)?{type:"root",children:n}:n,void 0,void 0)}function za(n,e,t){return Ba(n,e,t,this)}function Wa(n){const e=[],t=n&&n.children||Ha;let r=-1;for(;++rVe(n,o,l),codeToTokens:(o,l)=>xe(n,o,l)};let i=$a(Ve(n,e,t,r));for(const o of Me(t))i=o.postprocess?.call(r,i,t)||i;return i}async function Ka(n){let e,t;const r={};function i(m){t=m,r.HEAPU8=new Uint8Array(m),r.HEAPU32=new Uint32Array(m)}function o(){return typeof performance<"u"?performance.now():Date.now()}function l(m,y,h){r.HEAPU8.copyWithin(m,y,y+h)}function s(){return 2147483648}function a(m){try{return e.grow(m-t.byteLength+65535>>>16),i(e.buffer),1}catch{}}function c(m){const y=r.HEAPU8.length;m=m>>>0;const h=s();if(m>h)return!1;const f=(_,E)=>_+(E-_%E)%E;for(let _=1;_<=4;_*=2){let E=y*(1+.2/_);E=Math.min(E,m+100663296);const b=Math.min(h,f(Math.max(m,E),65536));if(a(b))return!0}return!1}const d={emscripten_get_now:o,emscripten_memcpy_big:l,emscripten_resize_heap:c,fd_write:()=>0};async function p(){const y=await n({env:d,wasi_snapshot_preview1:d});e=y.memory,i(e.buffer),Object.assign(r,y)}return await p(),r}let I=null,Xa=!1;function Ya(n){throw new D(n.UTF8ToString(n.getLastOnigError()))}class We{static _utf8ByteLength(e){let t=0;for(let r=0,i=e.length;r=55296&&o<=56319&&r+1=56320&&a<=57343&&(l=(o-55296<<10)+65536|a-56320,s=!0)}l<=127?t+=1:l<=2047?t+=2:l<=65535?t+=3:t+=4,s&&r++}return t}utf16Length;utf8Length;utf16Value;utf8Value;utf16OffsetToUtf8;utf8OffsetToUtf16;constructor(e){const t=e.length,r=We._utf8ByteLength(e),i=r!==t,o=i?new Uint32Array(t+1):null;i&&(o[t]=r);const l=i?new Uint32Array(r+1):null;i&&(l[r]=t);const s=new Uint8Array(r);let a=0;for(let c=0;c=55296&&d<=56319&&c+1=56320&&y<=57343&&(p=(d-55296<<10)+65536|y-56320,m=!0)}i&&(o[c]=a,m&&(o[c+1]=a),p<=127?l[a+0]=c:p<=2047?(l[a+0]=c,l[a+1]=c):p<=65535?(l[a+0]=c,l[a+1]=c,l[a+2]=c):(l[a+0]=c,l[a+1]=c,l[a+2]=c,l[a+3]=c)),p<=127?s[a++]=p:p<=2047?(s[a++]=192|(p&1984)>>>6,s[a++]=128|(p&63)>>>0):p<=65535?(s[a++]=224|(p&61440)>>>12,s[a++]=128|(p&4032)>>>6,s[a++]=128|(p&63)>>>0):(s[a++]=240|(p&1835008)>>>18,s[a++]=128|(p&258048)>>>12,s[a++]=128|(p&4032)>>>6,s[a++]=128|(p&63)>>>0),m&&c++}this.utf16Length=t,this.utf8Length=r,this.utf16Value=e,this.utf8Value=s,this.utf16OffsetToUtf8=o,this.utf8OffsetToUtf16=l}createString(e){const t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}}class G{static LAST_ID=0;static _sharedPtr=0;static _sharedPtrInUse=!1;id=++G.LAST_ID;_onigBinding;content;utf16Length;utf8Length;utf16OffsetToUtf8;utf8OffsetToUtf16;ptr;constructor(e){if(!I)throw new D("Must invoke loadWasm first.");this._onigBinding=I,this.content=e;const t=new We(e);this.utf16Length=t.utf16Length,this.utf8Length=t.utf8Length,this.utf16OffsetToUtf8=t.utf16OffsetToUtf8,this.utf8OffsetToUtf16=t.utf8OffsetToUtf16,this.utf8Length<1e4&&!G._sharedPtrInUse?(G._sharedPtr||(G._sharedPtr=I.omalloc(1e4)),G._sharedPtrInUse=!0,I.HEAPU8.set(t.utf8Value,G._sharedPtr),this.ptr=G._sharedPtr):this.ptr=t.createString(I)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===G._sharedPtr?G._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}}class Ja{_onigBinding;_ptr;constructor(e){if(!I)throw new D("Must invoke loadWasm first.");const t=[],r=[];for(let s=0,a=e.length;s{let r=n;return r=await r,typeof r=="function"&&(r=await r(t)),typeof r=="function"&&(r=await r(t)),Qa(r)?r=await r.instantiator(t):Za(r)?r=await r.default(t):(es(r)&&(r=r.data),ts(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await is(r)(t):r=await os(r)(t):ns(r)?r=await rt(r)(t):r instanceof WebAssembly.Module?r=await rt(r)(t):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await rt(r.default)(t))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return Se=e(),Se}function rt(n){return e=>WebAssembly.instantiate(n,e)}function is(n){return e=>WebAssembly.instantiateStreaming(n,e)}function os(n){return async e=>{const t=await n.arrayBuffer();return WebAssembly.instantiate(t,e)}}function as(n){return new G(n)}function ss(n){return new Ja(n)}const hn={light:"#333333",dark:"#bbbbbb"},mn={light:"#fffffe",dark:"#1e1e1e"},fn="__shiki_resolved";function gr(n){if(n?.[fn])return n;const e={...n};e.tokenColors&&!e.settings&&(e.settings=e.tokenColors,delete e.tokenColors),e.type||="dark",e.colorReplacements={...e.colorReplacements},e.settings||=[];let{bg:t,fg:r}=e;if(!t||!r){const s=e.settings?e.settings.find(a=>!a.name&&!a.scope):void 0;s?.settings?.foreground&&(r=s.settings.foreground),s?.settings?.background&&(t=s.settings.background),!r&&e?.colors?.["editor.foreground"]&&(r=e.colors["editor.foreground"]),!t&&e?.colors?.["editor.background"]&&(t=e.colors["editor.background"]),r||(r=e.type==="light"?hn.light:hn.dark),t||(t=e.type==="light"?mn.light:mn.dark),e.fg=r,e.bg=t}e.settings[0]&&e.settings[0].settings&&!e.settings[0].scope||e.settings.unshift({settings:{foreground:e.fg,background:e.bg}});let i=0;const o=new Map;function l(s){if(o.has(s))return o.get(s);i+=1;const a=`#${i.toString(16).padStart(8,"0").toLowerCase()}`;return e.colorReplacements?.[`#${a}`]?l(s):(o.set(s,a),a)}e.settings=e.settings.map(s=>{const a=s.settings?.foreground&&!s.settings.foreground.startsWith("#"),c=s.settings?.background&&!s.settings.background.startsWith("#");if(!a&&!c)return s;const d={...s,settings:{...s.settings}};if(a){const p=l(s.settings.foreground);e.colorReplacements[p]=s.settings.foreground,d.settings.foreground=p}if(c){const p=l(s.settings.background);e.colorReplacements[p]=s.settings.background,d.settings.background=p}return d});for(const s of Object.keys(e.colors||{}))if((s==="editor.foreground"||s==="editor.background"||s.startsWith("terminal.ansi"))&&!e.colors[s]?.startsWith("#")){const a=l(e.colors[s]);e.colorReplacements[a]=e.colors[s],e.colors[s]=a}return Object.defineProperty(e,fn,{enumerable:!1,writable:!1,value:!0}),e}class ls extends fo{_resolver;_themes;_langs;_alias;_resolvedThemes={};_resolvedGrammars={};_langMap={};_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(e,t,r,i={}){super(e),this._resolver=e,this._themes=t,this._langs=r,this._alias=i,t.forEach(o=>this.loadTheme(o)),r.forEach(o=>this.loadLanguage(o))}getTheme(e){return typeof e=="string"?this._resolvedThemes[e]:this.loadTheme(e)}loadTheme(e){const t=gr(e);return t.name&&(this._resolvedThemes[t.name]=t,this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=Object.keys(this._resolvedThemes)),this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=ke.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){if(this._alias[e]){const t=new Set([e]);for(;this._alias[e];){if(e=this._alias[e],t.has(e))throw new D(`Circular alias \`${Array.from(t).join(" -> ")} -> ${e}\``);t.add(e)}}return this._resolvedGrammars[e]}async loadLanguage(e){if(this.getGrammar(e.name))return;const t=new Set(Object.values(this._langMap).filter(o=>o.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);const r={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);const i=await this.loadGrammarWithConfiguration(e.scopeName,1,r);if(this._resolvedGrammars[e.name]=i,e.aliases&&e.aliases.forEach(o=>{this._alias[o]=e.name}),this._loadedLanguagesCache=null,t.size)for(const o of t)delete this._resolvedGrammars[o.name],this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(o.scopeName),this._syncRegistry?._grammars?.delete(o.scopeName),await this.loadLanguage(this._langMap[o.name])}async init(){this._themes.map(e=>this.loadTheme(e)),await this.loadLanguages(this._langs)}async loadLanguages(e){for(const i of e)this.resolveEmbeddedLanguages(i);const t=Array.from(this._langGraph.entries()),r=t.filter(([i,o])=>!o);if(r.length){const i=t.filter(([o,l])=>l&&l.embeddedLangs?.some(s=>r.map(([a])=>a).includes(s))).filter(o=>!r.includes(o));throw new D(`Missing languages ${r.map(([o])=>`\`${o}\``).join(", ")}, required by ${i.map(([o])=>`\`${o}\``).join(", ")}`)}for(const[i,o]of t)this._resolver.addLanguage(o);for(const[i,o]of t)await this.loadLanguage(o)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=Object.keys({...this._resolvedGrammars,...this._alias})),this._loadedLanguagesCache}resolveEmbeddedLanguages(e){if(this._langMap[e.name]=e,this._langGraph.set(e.name,e),e.embeddedLangs)for(const t of e.embeddedLangs)this._langGraph.set(t,this._langMap[t])}}class cs{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLibPromise;constructor(e,t){this._onigLibPromise=e,t.forEach(r=>this.addLanguage(r))}get onigLib(){return this._onigLibPromise}getLangRegistration(e){return this._langs.get(e)}async loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){const t=e.split(".");let r=[];for(let i=1;i<=t.length;i++){const o=t.slice(0,i).join(".");r=[...r,...this._injections.get(o)||[]]}return r}}let us;async function ds(n={}){async function e(_){return Promise.resolve(typeof _=="function"?_():_).then(E=>E.default||E)}async function t(_){return Array.from(new Set((await Promise.all(_.filter(E=>!Yn(E)).map(async E=>await e(E).then(b=>Array.isArray(b)?b:[b])))).flat()))}const r=n.loadWasm||us,[i,o]=await Promise.all([Promise.all((n.themes||[]).map(e)).then(_=>_.map(gr)),t(n.langs||[]),r?rs(r):void 0]),l=new cs(Promise.resolve({createOnigScanner(_){return ss(_)},createOnigString(_){return as(_)}}),o),s=new ls(l,i,o,n.langAlias);await s.init();let a;function c(_){const E=s.getGrammar(typeof _=="string"?_:_.name);if(!E)throw new D(`Language \`${_}\` not found, you may need to load it first`);return E}function d(_){if(_==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};const E=s.getTheme(_);if(!E)throw new D(`Theme \`${_}\` not found, you may need to load it first`);return E}function p(_){const E=d(_);a!==_&&(s.setTheme(E),a=_);const b=s.getColorMap();return{theme:E,colorMap:b}}function m(){return s.getLoadedThemes()}function y(){return s.getLoadedLanguages()}async function h(..._){await s.loadLanguages(await t(_))}async function f(..._){await Promise.all(_.map(async E=>Qn(E)?null:s.loadTheme(await e(E))))}return{setTheme:p,getTheme:d,getLanguage:c,getLoadedThemes:m,getLoadedLanguages:y,loadLanguage:h,loadTheme:f}}async function ps(n={}){const e=await ds(n);return{codeToTokensBase:(t,r)=>Pt(e,t,r),codeToTokensWithThemes:(t,r)=>nr(e,t,r),codeToTokens:(t,r)=>xe(e,t,r),codeToHast:(t,r)=>Ve(e,t,r),codeToHtml:(t,r)=>qa(e,t,r),...e,getInternalContext:()=>e}}function hs(n,e,t){async function r(i){function o(d){if(typeof d=="string"){if(Yn(d))return[];const p=n[d];if(!p)throw new D(`Language \`${d}\` is not included in this bundle. You may want to load it from external source.`);return p}return d}function l(d){if(Qn(d))return"none";if(typeof d=="string"){const p=e[d];if(!p)throw new D(`Theme \`${d}\` is not included in this bundle. You may want to load it from external source.`);return p}return d}const s=(i.themes??[]).map(d=>l(d)),a=(i.langs??[]).map(d=>o(d)),c=await ps({...i,themes:s,langs:a,loadWasm:t});return{...c,loadLanguage(...d){return c.loadLanguage(...d.map(o))},loadTheme(...d){return c.loadTheme(...d.map(l))}}}return r}const ms=hs(Oi,Ii,Ci),fs=async n=>{const e=await ms({theme:"nord"});return await e.loadTheme("nord"),await e.loadLanguage("html"),e.codeToHtml(n,{lang:"html",theme:"nord",lineOptions:[{lineNumber:!0},{wrap:!0}]})};var _s=0;function $(n,e,t,r,i,o){e||(e={});var l,s,a=e;if("ref"in a)for(s in a={},e)s=="ref"?l=e[s]:a[s]=e[s];var c={type:n,props:a,key:t,ref:l,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--_s,__i:-1,__u:0,__source:i,__self:o};if(typeof n=="function"&&(l=n.defaultProps))for(s in l)a[s]===void 0&&(a[s]=l[s]);return Nt.vnode&&Nt.vnode(c),c}const Ts=({htmlCode:n})=>{const[e,t]=ce.useState("preview"),[r,i]=ce.useState("");ce.useEffect(()=>{(async()=>{const s=await fs(n);i(s)})()},[n]);const o=()=>{navigator.clipboard.writeText(n)};return $("div",{className:"border border-gray-200 rounded overflow-hidden",children:[$("div",{className:"flex border-b border-gray-200",children:[$(ye.button,{className:kt("py-2 text-center cursor-pointer",Dt({"bg-[var(--sl-color-black)] border-b-2 border-blue-500 font-bold":e==="preview","opacity-50":e!=="preview"})),style:{flex:e==="preview"?2:1},onClick:()=>t("preview"),whileHover:{scale:1.05},whileTap:{scale:.95},children:"Preview"}),$(ye.button,{className:kt("py-2 text-center cursor-pointer",Dt({"bg-[var(--sl-color-black)] border-b-2 border-blue-500 font-bold":e==="code","opacity-50":e!=="code"})),style:{flex:e==="code"?2:1},onClick:()=>t("code"),whileHover:{scale:1.05},whileTap:{scale:.95},children:"Code"})]}),$("div",{className:"p-4",children:[e==="preview"&&$(ye.div,{initial:{opacity:0},animate:{opacity:1},className:"max-w-none",children:Pi(n)}),e==="code"&&$(ye.div,{initial:{opacity:0},animate:{opacity:1},children:$("div",{className:"relative",children:[$("button",{className:"absolute right-0 top-0 bg-cyan-600 text-white px-2 py-1 rounded",onClick:o,children:"Copy"}),$("div",{dangerouslySetInnerHTML:{__html:r}})]})})]})]})};export{Ts as default}; diff --git a/docs/_astro/DevCodeCore.DqG7TnkF.js b/docs/_astro/DevCodeCore.DqG7TnkF.js new file mode 100644 index 0000000..4270c36 --- /dev/null +++ b/docs/_astro/DevCodeCore.DqG7TnkF.js @@ -0,0 +1,14 @@ +const __vite__fileDeps=["_astro/angular-html.833w9gUK.js","_astro/html.CuK0VrWf.js","_astro/javascript.Dch3xQiY.js","_astro/css.CbYhyuC0.js","_astro/angular-ts.BCBvF5Sf.js","_astro/scss.Dr-_CcBd.js","_astro/apl.7kPAH7yp.js","_astro/xml.BzTcx3OS.js","_astro/java.ClXEvkw9.js","_astro/json.CupVZNk8.js","_astro/asciidoc.CnHzULVj.js","_astro/yaml.C5gCGmDW.js","_astro/csv.B2DkETJQ.js","_astro/c.RCJZWN-0.js","_astro/clojure.BF6G6X0H.js","_astro/coffee.t_LrLW_f.js","_astro/cpp.BnO_O5bK.js","_astro/glsl.-GlVTnW0.js","_astro/sql.DbK06e1c.js","_astro/csharp.DISxKEhY.js","_astro/diff.DvyTQcux.js","_astro/docker.DNR26wTC.js","_astro/elixir.CpdO1lki.js","_astro/elm.DbZvrHdh.js","_astro/erlang.DS9ZWoKD.js","_astro/go.BAMIS8DD.js","_astro/groovy.wChcbJ1V.js","_astro/haskell.DAGYewaG.js","_astro/jsx.CsyrCbsw.js","_astro/julia.CyGW3mcn.js","_astro/python.DwuVtWc2.js","_astro/r.BXfENWL6.js","_astro/kotlin.BIxS-Weu.js","_astro/less.Du6_OKDb.js","_astro/make.B9S9BZZh.js","_astro/objective-c.DHmGyzbM.js","_astro/ocaml.RqY_Nz63.js","_astro/perl.Czv4QcIx.js","_astro/ruby.BYVeyLWu.js","_astro/shellscript.BZfs-ost.js","_astro/lua.CHJYZA-p.js","_astro/rust.DGxQkqYo.js","_astro/sass.CMDmr8et.js","_astro/scala.vMsNTMhM.js","_astro/swift.Dez-Qvcc.js","_astro/toml.BT9ZzGyQ.js","_astro/typescript.DC8MraHL.js","_astro/astro.Dtt22nl1.js","_astro/stylus.DSrLtGYv.js","_astro/postcss.DXT9h7v2.js","_astro/tsx.BlxWTfDV.js","_astro/blade.Ge7MpD7w.js","_astro/cobol.Be8n44jy.js","_astro/crystal.DUeHF1Px.js","_astro/erb.C8njeWMx.js","_astro/fortran-fixed-form.Cx0tWteX.js","_astro/fortran-free-form.D6pmzCqS.js","_astro/fsharp.COWl2xCs.js","_astro/markdown.BdfWgkoX.js","_astro/gdresource.Dyo1-XBj.js","_astro/gdshader.B_SUYfiV.js","_astro/gdscript.CoEqzGFw.js","_astro/git-commit.aPmGthaS.js","_astro/git-rebase.wSeoO_tD.js","_astro/glimmer-js.CKLJpqca.js","_astro/glimmer-ts.Bp7XmXVh.js","_astro/graphql.C4V4xKFR.js","_astro/hack.B30vrIHT.js","_astro/haml.RaSm5nLU.js","_astro/handlebars.W0zz18bm.js","_astro/html-derivative.fiapQfxX.js","_astro/http.DvBm4YdT.js","_astro/hxml.C0w2y-oz.js","_astro/haxe.Dit6kIrv.js","_astro/imba.DxX1Vuw3.js","_astro/jinja.DWD-OL5F.js","_astro/jison.CHwQvgii.js","_astro/latex.CbyClHu1.js","_astro/tex.-C-BpcSB.js","_astro/gnuplot.nclm9rTJ.js","_astro/liquid.Cp8214eI.js","_astro/marko.DXVuwHdi.js","_astro/mdc.BtXAnNXs.js","_astro/nginx.CFCDRImM.js","_astro/nim.whBoXTHG.js","_astro/php.DEqKwr-6.js","_astro/pug.BWq4yR4F.js","_astro/qml.qWrhaLmb.js","_astro/razor.BPIJn9no.js","_astro/rst.MQSXyo4o.js","_astro/cmake.DXZpi2gR.js","_astro/sas.2Dj3KWk-.js","_astro/shaderlab.D_C8j_yu.js","_astro/hlsl.DmDrTTlz.js","_astro/shellsession.D2P9pGgM.js","_astro/soy.D91J-rek.js","_astro/sparql.DJ46LgWq.js","_astro/turtle.C15OxdQ5.js","_astro/stata.DCIeX9IZ.js","_astro/svelte.CpQM5Shq.js","_astro/twig.C7WLmjjl.js","_astro/vue.ClrSQ_eu.js","_astro/jsonc.DYI1rfmx.js","_astro/json5.Bh8mriwU.js","_astro/vue-html.CN_dVTIP.js","_astro/wikitext.EfTDFRWl.js","_astro/ini.DeVv6D4_.js","_astro/vb.beD-FUib.js","_astro/xsl.lJB8dDLf.js","_astro/bat.BPiaQZfK.js","_astro/raku.D384ylkT.js","_astro/powershell.9ZOzOPqN.js","_astro/dart.DZLoTQm4.js","_astro/bibtex.BaedD2tq.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]); +import{j as $}from"./jsx-runtime.BFYNFNPI.js";import{c as O,a as ce,g as vr}from"./index.DIpCM_17.js";import{m as ye,t as kt,c as Dt}from"./bundle-mjs.Dg1gdp8d.js";var _n={},pt={},ht={};Object.defineProperty(ht,"__esModule",{value:!0});var Nt="html",xt="head",Ee="body",br=/<([a-zA-Z]+[0-9]?)/,Mt=//i,Vt=//i,Oe=function(n,e){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},it=function(n,e){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},Bt=typeof window=="object"&&window.DOMParser;if(typeof Bt=="function"){var Tr=new Bt,Ar="text/html";it=function(n,e){return e&&(n="<".concat(e,">").concat(n,"")),Tr.parseFromString(n,Ar)},Oe=it}if(typeof document=="object"&&document.implementation){var ve=document.implementation.createHTMLDocument();Oe=function(n,e){if(e){var t=ve.documentElement.querySelector(e);return t&&(t.innerHTML=n),ve}return ve.documentElement.innerHTML=n,ve}}var be=typeof document=="object"&&document.createElement("template"),ot;be&&be.content&&(ot=function(n){return be.innerHTML=n,be.content.childNodes});function Rr(n){var e,t,r=n.match(br),i=r&&r[1]?r[1].toLowerCase():"";switch(i){case Nt:{var o=it(n);if(!Mt.test(n)){var l=o.querySelector(xt);(e=l?.parentNode)===null||e===void 0||e.removeChild(l)}if(!Vt.test(n)){var l=o.querySelector(Ee);(t=l?.parentNode)===null||t===void 0||t.removeChild(l)}return o.querySelectorAll(Nt)}case xt:case Ee:{var s=Oe(n).querySelectorAll(i);return Vt.test(n)&&Mt.test(n)?s[0].parentNode.childNodes:s}default:{if(ot)return ot(n);var l=Oe(n,Ee).querySelector(Ee);return l.childNodes}}}ht.default=Rr;var ie={},mt={},ft={};(function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.Doctype=n.CDATA=n.Tag=n.Style=n.Script=n.Comment=n.Directive=n.Text=n.Root=n.isTag=n.ElementType=void 0;var e;(function(r){r.Root="root",r.Text="text",r.Directive="directive",r.Comment="comment",r.Script="script",r.Style="style",r.Tag="tag",r.CDATA="cdata",r.Doctype="doctype"})(e=n.ElementType||(n.ElementType={}));function t(r){return r.type===e.Tag||r.type===e.Script||r.type===e.Style}n.isTag=t,n.Root=e.Root,n.Text=e.Text,n.Directive=e.Directive,n.Comment=e.Comment,n.Script=e.Script,n.Style=e.Style,n.Tag=e.Tag,n.CDATA=e.CDATA,n.Doctype=e.Doctype})(ft);var T={},q=O&&O.__extends||function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),ue=O&&O.__assign||function(){return ue=Object.assign||function(n){for(var e,t=1,r=arguments.length;t0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"childNodes",{get:function(){return this.children},set:function(t){this.children=t},enumerable:!1,configurable:!0}),e}(_t);T.NodeWithChildren=je;var vn=function(n){q(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=V.ElementType.CDATA,t}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),e}(je);T.CDATA=vn;var bn=function(n){q(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.type=V.ElementType.Root,t}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),e}(je);T.Document=bn;var Tn=function(n){q(e,n);function e(t,r,i,o){i===void 0&&(i=[]),o===void 0&&(o=t==="script"?V.ElementType.Script:t==="style"?V.ElementType.Style:V.ElementType.Tag);var l=n.call(this,i)||this;return l.name=t,l.attribs=r,l.type=o,l}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tagName",{get:function(){return this.name},set:function(t){this.name=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"attributes",{get:function(){var t=this;return Object.keys(this.attribs).map(function(r){var i,o;return{name:r,value:t.attribs[r],namespace:(i=t["x-attribsNamespace"])===null||i===void 0?void 0:i[r],prefix:(o=t["x-attribsPrefix"])===null||o===void 0?void 0:o[r]}})},enumerable:!1,configurable:!0}),e}(je);T.Element=Tn;function An(n){return(0,V.isTag)(n)}T.isTag=An;function Rn(n){return n.type===V.ElementType.CDATA}T.isCDATA=Rn;function Pn(n){return n.type===V.ElementType.Text}T.isText=Pn;function Sn(n){return n.type===V.ElementType.Comment}T.isComment=Sn;function Ln(n){return n.type===V.ElementType.Directive}T.isDirective=Ln;function On(n){return n.type===V.ElementType.Root}T.isDocument=On;function Pr(n){return Object.prototype.hasOwnProperty.call(n,"children")}T.hasChildren=Pr;function gt(n,e){e===void 0&&(e=!1);var t;if(Pn(n))t=new gn(n.data);else if(Sn(n))t=new yn(n.data);else if(An(n)){var r=e?Xe(n.children):[],i=new Tn(n.name,ue({},n.attribs),r);r.forEach(function(a){return a.parent=i}),n.namespace!=null&&(i.namespace=n.namespace),n["x-attribsNamespace"]&&(i["x-attribsNamespace"]=ue({},n["x-attribsNamespace"])),n["x-attribsPrefix"]&&(i["x-attribsPrefix"]=ue({},n["x-attribsPrefix"])),t=i}else if(Rn(n)){var r=e?Xe(n.children):[],o=new vn(r);r.forEach(function(c){return c.parent=o}),t=o}else if(On(n)){var r=e?Xe(n.children):[],l=new bn(r);r.forEach(function(c){return c.parent=l}),n["x-mode"]&&(l["x-mode"]=n["x-mode"]),t=l}else if(Ln(n)){var s=new En(n.name,n.data);n["x-name"]!=null&&(s["x-name"]=n["x-name"],s["x-publicId"]=n["x-publicId"],s["x-systemId"]=n["x-systemId"]),t=s}else throw new Error("Not implemented yet: ".concat(n.type));return t.startIndex=n.startIndex,t.endIndex=n.endIndex,n.sourceCodeLocation!=null&&(t.sourceCodeLocation=n.sourceCodeLocation),t}T.cloneNode=gt;function Xe(n){for(var e=n.map(function(r){return gt(r,!0)}),t=1;t/;function Dr(n){if(typeof n!="string")throw new TypeError("First argument must be a string");if(!n)return[];var e=n.match(kr),t=e?e[1]:void 0;return(0,Ir.formatDOM)((0,wr.default)(n),null,t)}pt.default=Dr;var Ge={},H={},Fe={},Nr=0;Fe.SAME=Nr;var xr=1;Fe.CAMELCASE=xr;Fe.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1};const kn=0,K=1,Ue=2,He=3,yt=4,Dn=5,Nn=6;function Mr(n){return N.hasOwnProperty(n)?N[n]:null}function M(n,e,t,r,i,o,l){this.acceptsBooleans=e===Ue||e===He||e===yt,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=t,this.propertyName=n,this.type=e,this.sanitizeURL=o,this.removeEmptyString=l}const N={},Vr=["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"];Vr.forEach(n=>{N[n]=new M(n,kn,!1,n,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(([n,e])=>{N[n]=new M(n,K,!1,e,null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(n=>{N[n]=new M(n,Ue,!1,n.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(n=>{N[n]=new M(n,Ue,!1,n,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"].forEach(n=>{N[n]=new M(n,He,!1,n.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(n=>{N[n]=new M(n,He,!0,n,null,!1,!1)});["capture","download"].forEach(n=>{N[n]=new M(n,yt,!1,n,null,!1,!1)});["cols","rows","size","span"].forEach(n=>{N[n]=new M(n,Nn,!1,n,null,!1,!1)});["rowSpan","start"].forEach(n=>{N[n]=new M(n,Dn,!1,n.toLowerCase(),null,!1,!1)});const Et=/[\-\:]([a-z])/g,vt=n=>n[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"].forEach(n=>{const e=n.replace(Et,vt);N[e]=new M(e,K,!1,n,null,!1,!1)});["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(n=>{const e=n.replace(Et,vt);N[e]=new M(e,K,!1,n,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(n=>{const e=n.replace(Et,vt);N[e]=new M(e,K,!1,n,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(n=>{N[n]=new M(n,K,!1,n.toLowerCase(),null,!1,!1)});const Br="xlinkHref";N[Br]=new M("xlinkHref",K,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(n=>{N[n]=new M(n,K,!1,n.toLowerCase(),null,!0,!0)});const{CAMELCASE:jr,SAME:Gr,possibleStandardNames:jt}=Fe,Fr=":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",Ur=Fr+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Hr=RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+Ur+"]*$")),$r=Object.keys(jt).reduce((n,e)=>{const t=jt[e];return t===Gr?n[e]=e:t===jr?n[e.toLowerCase()]=e:n[e]=t,n},{});H.BOOLEAN=He;H.BOOLEANISH_STRING=Ue;H.NUMERIC=Dn;H.OVERLOADED_BOOLEAN=yt;H.POSITIVE_NUMERIC=Nn;H.RESERVED=kn;H.STRING=K;H.getPropertyInfo=Mr;H.isCustomAttribute=Hr;H.possibleStandardNames=$r;var bt={},Tt={},Gt=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,zr=/\n/g,Wr=/^\s*/,qr=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Kr=/^:\s*/,Xr=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Yr=/^[;\s]*/,Jr=/^\s+|\s+$/g,Qr=` +`,Ft="/",Ut="*",Y="",Zr="comment",ei="declaration",ti=function(n,e){if(typeof n!="string")throw new TypeError("First argument must be a string");if(!n)return[];e=e||{};var t=1,r=1;function i(h){var f=h.match(zr);f&&(t+=f.length);var _=h.lastIndexOf(Qr);r=~_?h.length-_:r+h.length}function o(){var h={line:t,column:r};return function(f){return f.position=new l(h),c(),f}}function l(h){this.start=h,this.end={line:t,column:r},this.source=e.source}l.prototype.content=n;function s(h){var f=new Error(e.source+":"+t+":"+r+": "+h);if(f.reason=h,f.filename=e.source,f.line=t,f.column=r,f.source=n,!e.silent)throw f}function a(h){var f=h.exec(n);if(f){var _=f[0];return i(_),n=n.slice(_.length),f}}function c(){a(Wr)}function d(h){var f;for(h=h||[];f=p();)f!==!1&&h.push(f);return h}function p(){var h=o();if(!(Ft!=n.charAt(0)||Ut!=n.charAt(1))){for(var f=2;Y!=n.charAt(f)&&(Ut!=n.charAt(f)||Ft!=n.charAt(f+1));)++f;if(f+=2,Y===n.charAt(f-1))return s("End of comment missing");var _=n.slice(2,f-2);return r+=2,i(_),n=n.slice(f),r+=2,h({type:Zr,comment:_})}}function m(){var h=o(),f=a(qr);if(f){if(p(),!a(Kr))return s("property missing ':'");var _=a(Xr),E=h({type:ei,property:Ht(f[0].replace(Gt,Y)),value:_?Ht(_[0].replace(Gt,Y)):Y});return a(Yr),E}}function g(){var h=[];d(h);for(var f;f=m();)f!==!1&&(h.push(f),d(h));return h}return c(),g()};function Ht(n){return n?n.replace(Jr,Y):Y}var ni=O&&O.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Tt,"__esModule",{value:!0});var ri=ni(ti);function ii(n,e){var t=null;if(!n||typeof n!="string")return t;var r=(0,ri.default)(n),i=typeof e=="function";return r.forEach(function(o){if(o.type==="declaration"){var l=o.property,s=o.value;i?e(l,s,o):s&&(t=t||{},t[l]=s)}}),t}Tt.default=ii;var $e={};Object.defineProperty($e,"__esModule",{value:!0});$e.camelCase=void 0;var oi=/^--[a-zA-Z0-9-]+$/,ai=/-([a-z])/g,si=/^[^-]+$/,li=/^-(webkit|moz|ms|o|khtml)-/,ci=/^-(ms)-/,ui=function(n){return!n||si.test(n)||oi.test(n)},di=function(n,e){return e.toUpperCase()},$t=function(n,e){return"".concat(e,"-")},pi=function(n,e){return e===void 0&&(e={}),ui(n)?n:(n=n.toLowerCase(),e.reactCompat?n=n.replace(ci,$t):n=n.replace(li,$t),n.replace(ai,di))};$e.camelCase=pi;var hi=O&&O.__importDefault||function(n){return n&&n.__esModule?n:{default:n}},mi=hi(Tt),fi=$e;function at(n,e){var t={};return!n||typeof n!="string"||(0,mi.default)(n,function(r,i){r&&i&&(t[(0,fi.camelCase)(r,e)]=i)}),t}at.default=at;var _i=at;(function(n){var e=O&&O.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(n,"__esModule",{value:!0}),n.returnFirstArg=n.canTextBeChildOfNode=n.ELEMENTS_WITH_NO_TEXT_CHILDREN=n.PRESERVE_CUSTOM_ATTRIBUTES=n.setStyleProp=n.isCustomComponent=void 0;var t=ce,r=e(_i),i=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);function o(d,p){return d.includes("-")?!i.has(d):!!(p&&typeof p.is=="string")}n.isCustomComponent=o;var l={reactCompat:!0};function s(d,p){if(typeof d=="string"){if(!d.trim()){p.style={};return}try{p.style=(0,r.default)(d,l)}catch{p.style={}}}}n.setStyleProp=s,n.PRESERVE_CUSTOM_ATTRIBUTES=Number(t.version.split(".")[0])>=16,n.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);var a=function(d){return!n.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(d.name)};n.canTextBeChildOfNode=a;var c=function(d){return d};n.returnFirstArg=c})(bt);Object.defineProperty(Ge,"__esModule",{value:!0});var se=H,zt=bt,gi=["checked","value"],yi=["input","select","textarea"],Ei={reset:!0,submit:!0};function vi(n,e){n===void 0&&(n={});var t={},r=!!(n.type&&Ei[n.type]);for(var i in n){var o=n[i];if((0,se.isCustomAttribute)(i)){t[i]=o;continue}var l=i.toLowerCase(),s=Wt(l);if(s){var a=(0,se.getPropertyInfo)(s);switch(gi.includes(s)&&yi.includes(e)&&!r&&(s=Wt("default"+l)),t[s]=o,a&&a.type){case se.BOOLEAN:t[s]=!0;break;case se.OVERLOADED_BOOLEAN:o===""&&(t[s]=!0);break}continue}zt.PRESERVE_CUSTOM_ATTRIBUTES&&(t[i]=o)}return(0,zt.setStyleProp)(n.style,t),t}Ge.default=vi;function Wt(n){return se.possibleStandardNames[n]}var At={},bi=O&&O.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(At,"__esModule",{value:!0});var Ye=ce,Ti=bi(Ge),de=bt,Ai={cloneElement:Ye.cloneElement,createElement:Ye.createElement,isValidElement:Ye.isValidElement};function xn(n,e){e===void 0&&(e={});for(var t=[],r=typeof e.replace=="function",i=e.transform||de.returnFirstArg,o=e.library||Ai,l=o.cloneElement,s=o.createElement,a=o.isValidElement,c=n.length,d=0;d1&&(m=l(m,{key:m.key||d})),t.push(i(m,p,d));continue}}if(p.type==="text"){var g=!p.data.trim().length;if(g&&p.parent&&!(0,de.canTextBeChildOfNode)(p.parent)||e.trim&&g)continue;t.push(i(p.data,p,d));continue}var h=p,f={};Ri(h)?((0,de.setStyleProp)(h.attribs.style,h.attribs),f=h.attribs):h.attribs&&(f=(0,Ti.default)(h.attribs,h.name));var _=void 0;switch(p.type){case"script":case"style":p.children[0]&&(f.dangerouslySetInnerHTML={__html:p.children[0].data});break;case"tag":p.name==="textarea"&&p.children[0]?f.defaultValue=p.children[0].data:p.children&&p.children.length&&(_=xn(p.children,e));break;default:continue}c>1&&(f.key=d),t.push(i(s(p.name,f,_),p,d))}return t.length===1?t[0]:t}At.default=xn;function Ri(n){return de.PRESERVE_CUSTOM_ATTRIBUTES&&n.type==="tag"&&(0,de.isCustomComponent)(n.name,n.attribs)}(function(n){var e=O&&O.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(n,"__esModule",{value:!0}),n.htmlToDOM=n.domToReact=n.attributesToProps=n.Text=n.ProcessingInstruction=n.Element=n.Comment=void 0;var t=e(pt);n.htmlToDOM=t.default;var r=e(Ge);n.attributesToProps=r.default;var i=e(At);n.domToReact=i.default;var o=mt;Object.defineProperty(n,"Comment",{enumerable:!0,get:function(){return o.Comment}}),Object.defineProperty(n,"Element",{enumerable:!0,get:function(){return o.Element}}),Object.defineProperty(n,"ProcessingInstruction",{enumerable:!0,get:function(){return o.ProcessingInstruction}}),Object.defineProperty(n,"Text",{enumerable:!0,get:function(){return o.Text}});var l={lowerCaseAttributeNames:!1};function s(a,c){if(typeof a!="string")throw new TypeError("First argument must be a string");return a?(0,i.default)((0,t.default)(a,c?.htmlparser2||l),c):[]}n.default=s})(_n);const qt=vr(_n),Pi=qt.default||qt,Si="modulepreload",Li=function(n){return"/"+n},Kt={},u=function(e,t,r){let i=Promise.resolve();if(t&&t.length>0){const o=document.getElementsByTagName("link"),l=document.querySelector("meta[property=csp-nonce]"),s=l?.nonce||l?.getAttribute("nonce");i=Promise.all(t.map(a=>{if(a=Li(a),a in Kt)return;Kt[a]=!0;const c=a.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(!!r)for(let g=o.length-1;g>=0;g--){const h=o[g];if(h.href===a&&(!c||h.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${a}"]${d}`))return;const m=document.createElement("link");if(m.rel=c?"stylesheet":Si,c||(m.as="script",m.crossOrigin=""),m.href=a,s&&m.setAttribute("nonce",s),document.head.appendChild(m),c)return new Promise((g,h)=>{m.addEventListener("load",g),m.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${a}`)))})}))}return i.then(()=>e()).catch(o=>{const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=o,window.dispatchEvent(l),!l.defaultPrevented)throw o})},Mn=[{id:"abap",name:"ABAP",import:()=>u(()=>import("./abap.DXFkqnOI.js"),[])},{id:"actionscript-3",name:"ActionScript",import:()=>u(()=>import("./actionscript-3.D6NljDpC.js"),[])},{id:"ada",name:"Ada",import:()=>u(()=>import("./ada.CowR2XfX.js"),[])},{id:"angular-html",name:"Angular HTML",import:()=>u(()=>import("./angular-html.833w9gUK.js").then(n=>n.e),__vite__mapDeps([0,1,2,3]))},{id:"angular-ts",name:"Angular TypeScript",import:()=>u(()=>import("./angular-ts.BCBvF5Sf.js"),__vite__mapDeps([4,0,1,2,3,5]))},{id:"apache",name:"Apache Conf",import:()=>u(()=>import("./apache.rS0jd3Ly.js"),[])},{id:"apex",name:"Apex",import:()=>u(()=>import("./apex.Sfo2eW0G.js"),[])},{id:"apl",name:"APL",import:()=>u(()=>import("./apl.7kPAH7yp.js"),__vite__mapDeps([6,1,2,3,7,8,9]))},{id:"applescript",name:"AppleScript",import:()=>u(()=>import("./applescript.B4yE-MfL.js"),[])},{id:"ara",name:"Ara",import:()=>u(()=>import("./ara.CG4fK2Nq.js"),[])},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:()=>u(()=>import("./asciidoc.CnHzULVj.js"),__vite__mapDeps([10,1,2,3,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,8,9,28,29,30,31,32,33,34,35,36,37,7,38,39,40,41,42,43,5,44,45,46]))},{id:"asm",name:"Assembly",import:()=>u(()=>import("./asm.PWN5J14X.js"),[])},{id:"astro",name:"Astro",import:()=>u(()=>import("./astro.Dtt22nl1.js"),__vite__mapDeps([47,9,2,46,48,42,3,5,33,49,50]))},{id:"awk",name:"AWK",import:()=>u(()=>import("./awk.i0IPvypD.js"),[])},{id:"ballerina",name:"Ballerina",import:()=>u(()=>import("./ballerina.T9ysyp6P.js"),[])},{id:"bat",name:"Batch File",aliases:["batch"],import:()=>u(()=>import("./bat.BPiaQZfK.js"),[])},{id:"beancount",name:"Beancount",import:()=>u(()=>import("./beancount.Urb1RsFe.js"),[])},{id:"berry",name:"Berry",aliases:["be"],import:()=>u(()=>import("./berry.CxrokwfH.js"),[])},{id:"bibtex",name:"BibTeX",import:()=>u(()=>import("./bibtex.BaedD2tq.js"),[])},{id:"bicep",name:"Bicep",import:()=>u(()=>import("./bicep.3ghuYFLd.js"),[])},{id:"blade",name:"Blade",import:()=>u(()=>import("./blade.Ge7MpD7w.js"),__vite__mapDeps([51,1,2,3,7,8,18,9]))},{id:"c",name:"C",import:()=>u(()=>import("./c.RCJZWN-0.js"),[])},{id:"cadence",name:"Cadence",aliases:["cdc"],import:()=>u(()=>import("./cadence.Bgpqy2XC.js"),[])},{id:"clarity",name:"Clarity",import:()=>u(()=>import("./clarity.CIekO_uJ.js"),[])},{id:"clojure",name:"Clojure",aliases:["clj"],import:()=>u(()=>import("./clojure.BF6G6X0H.js"),[])},{id:"cmake",name:"CMake",import:()=>u(()=>import("./cmake.DXZpi2gR.js"),[])},{id:"cobol",name:"COBOL",import:()=>u(()=>import("./cobol.Be8n44jy.js"),__vite__mapDeps([52,18,1,2,3,8]))},{id:"codeowners",name:"CODEOWNERS",import:()=>u(()=>import("./codeowners.CGmujMTu.js"),[])},{id:"codeql",name:"CodeQL",aliases:["ql"],import:()=>u(()=>import("./codeql.BOpLLL-w.js"),[])},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:()=>u(()=>import("./coffee.t_LrLW_f.js"),__vite__mapDeps([15,2]))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:()=>u(()=>import("./common-lisp.C3qUB5O8.js"),[])},{id:"cpp",name:"C++",aliases:["c++"],import:()=>u(()=>import("./cpp.BnO_O5bK.js"),__vite__mapDeps([16,17,13,18]))},{id:"crystal",name:"Crystal",import:()=>u(()=>import("./crystal.DUeHF1Px.js"),__vite__mapDeps([53,1,2,3,18,13,39]))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:()=>u(()=>import("./csharp.DISxKEhY.js"),[])},{id:"css",name:"CSS",import:()=>u(()=>import("./css.CbYhyuC0.js"),[])},{id:"csv",name:"CSV",import:()=>u(()=>import("./csv.B2DkETJQ.js"),[])},{id:"cue",name:"CUE",import:()=>u(()=>import("./cue.C6Aznpr-.js"),[])},{id:"cypher",name:"Cypher",aliases:["cql"],import:()=>u(()=>import("./cypher.ByMv4Xf1.js"),[])},{id:"d",name:"D",import:()=>u(()=>import("./d.PifQWv0n.js"),[])},{id:"dart",name:"Dart",import:()=>u(()=>import("./dart.DZLoTQm4.js"),[])},{id:"dax",name:"DAX",import:()=>u(()=>import("./dax.DsfXcHUZ.js"),[])},{id:"desktop",name:"Desktop",import:()=>u(()=>import("./desktop.D71BffLY.js"),[])},{id:"diff",name:"Diff",import:()=>u(()=>import("./diff.DvyTQcux.js"),[])},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:()=>u(()=>import("./docker.DNR26wTC.js"),[])},{id:"dream-maker",name:"Dream Maker",import:()=>u(()=>import("./dream-maker.Eh5U-gDp.js"),[])},{id:"elixir",name:"Elixir",import:()=>u(()=>import("./elixir.CpdO1lki.js"),__vite__mapDeps([22,1,2,3]))},{id:"elm",name:"Elm",import:()=>u(()=>import("./elm.DbZvrHdh.js"),__vite__mapDeps([23,17,13]))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:()=>u(()=>import("./emacs-lisp.BEjL32p1.js"),[])},{id:"erb",name:"ERB",import:()=>u(()=>import("./erb.C8njeWMx.js"),__vite__mapDeps([54,1,2,3,38,7,8,18,13,39,40]))},{id:"erlang",name:"Erlang",aliases:["erl"],import:()=>u(()=>import("./erlang.DS9ZWoKD.js"),[])},{id:"fennel",name:"Fennel",import:()=>u(()=>import("./fennel.C6XIsc4F.js"),[])},{id:"fish",name:"Fish",import:()=>u(()=>import("./fish.DfeQjIbs.js"),[])},{id:"fluent",name:"Fluent",aliases:["ftl"],import:()=>u(()=>import("./fluent.KPqz0Sb3.js"),[])},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:()=>u(()=>import("./fortran-fixed-form.Cx0tWteX.js"),__vite__mapDeps([55,56]))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:()=>u(()=>import("./fortran-free-form.D6pmzCqS.js"),[])},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:()=>u(()=>import("./fsharp.COWl2xCs.js"),__vite__mapDeps([57,58]))},{id:"gdresource",name:"GDResource",import:()=>u(()=>import("./gdresource.Dyo1-XBj.js"),__vite__mapDeps([59,60,61]))},{id:"gdscript",name:"GDScript",import:()=>u(()=>import("./gdscript.CoEqzGFw.js"),[])},{id:"gdshader",name:"GDShader",import:()=>u(()=>import("./gdshader.B_SUYfiV.js"),[])},{id:"genie",name:"Genie",import:()=>u(()=>import("./genie.DAfrLhwG.js"),[])},{id:"gherkin",name:"Gherkin",import:()=>u(()=>import("./gherkin.DjTlIhuc.js"),[])},{id:"git-commit",name:"Git Commit Message",import:()=>u(()=>import("./git-commit.aPmGthaS.js"),__vite__mapDeps([62,20]))},{id:"git-rebase",name:"Git Rebase Message",import:()=>u(()=>import("./git-rebase.wSeoO_tD.js"),__vite__mapDeps([63,39]))},{id:"gleam",name:"Gleam",import:()=>u(()=>import("./gleam.Dz2Ca8U2.js"),[])},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:()=>u(()=>import("./glimmer-js.CKLJpqca.js"),__vite__mapDeps([64,2,46,3,1]))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:()=>u(()=>import("./glimmer-ts.Bp7XmXVh.js"),__vite__mapDeps([65,46,3,2,1]))},{id:"glsl",name:"GLSL",import:()=>u(()=>import("./glsl.-GlVTnW0.js"),__vite__mapDeps([17,13]))},{id:"gnuplot",name:"Gnuplot",import:()=>u(()=>import("./gnuplot.nclm9rTJ.js"),[])},{id:"go",name:"Go",import:()=>u(()=>import("./go.BAMIS8DD.js"),[])},{id:"graphql",name:"GraphQL",aliases:["gql"],import:()=>u(()=>import("./graphql.C4V4xKFR.js"),__vite__mapDeps([66,2,46,28,50]))},{id:"groovy",name:"Groovy",import:()=>u(()=>import("./groovy.wChcbJ1V.js"),[])},{id:"hack",name:"Hack",import:()=>u(()=>import("./hack.B30vrIHT.js"),__vite__mapDeps([67,1,2,3,18]))},{id:"haml",name:"Ruby Haml",import:()=>u(()=>import("./haml.RaSm5nLU.js"),__vite__mapDeps([68,38,1,2,3,7,8,18,13,39,40,42,15,58]))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:()=>u(()=>import("./handlebars.W0zz18bm.js"),__vite__mapDeps([69,1,2,3,11]))},{id:"haskell",name:"Haskell",aliases:["hs"],import:()=>u(()=>import("./haskell.DAGYewaG.js"),[])},{id:"haxe",name:"Haxe",import:()=>u(()=>import("./haxe.Dit6kIrv.js"),[])},{id:"hcl",name:"HashiCorp HCL",import:()=>u(()=>import("./hcl.CpAANOdC.js"),[])},{id:"hjson",name:"Hjson",import:()=>u(()=>import("./hjson.DZqG9GXz.js"),[])},{id:"hlsl",name:"HLSL",import:()=>u(()=>import("./hlsl.DmDrTTlz.js"),[])},{id:"html",name:"HTML",import:()=>u(()=>import("./html.CuK0VrWf.js"),__vite__mapDeps([1,2,3]))},{id:"html-derivative",name:"HTML (Derivative)",import:()=>u(()=>import("./html-derivative.fiapQfxX.js"),__vite__mapDeps([70,1,2,3]))},{id:"http",name:"HTTP",import:()=>u(()=>import("./http.DvBm4YdT.js"),__vite__mapDeps([71,39,9,7,8,66,2,46,28,50]))},{id:"hxml",name:"HXML",import:()=>u(()=>import("./hxml.C0w2y-oz.js"),__vite__mapDeps([72,73]))},{id:"hy",name:"Hy",import:()=>u(()=>import("./hy.C3qJFuQy.js"),[])},{id:"imba",name:"Imba",import:()=>u(()=>import("./imba.DxX1Vuw3.js"),__vite__mapDeps([74,46]))},{id:"ini",name:"INI",aliases:["properties"],import:()=>u(()=>import("./ini.DeVv6D4_.js"),[])},{id:"java",name:"Java",import:()=>u(()=>import("./java.ClXEvkw9.js"),[])},{id:"javascript",name:"JavaScript",aliases:["js"],import:()=>u(()=>import("./javascript.Dch3xQiY.js"),[])},{id:"jinja",name:"Jinja",import:()=>u(()=>import("./jinja.DWD-OL5F.js"),__vite__mapDeps([75,1,2,3]))},{id:"jison",name:"Jison",import:()=>u(()=>import("./jison.CHwQvgii.js"),__vite__mapDeps([76,2]))},{id:"json",name:"JSON",import:()=>u(()=>import("./json.CupVZNk8.js"),[])},{id:"json5",name:"JSON5",import:()=>u(()=>import("./json5.Bh8mriwU.js"),[])},{id:"jsonc",name:"JSON with Comments",import:()=>u(()=>import("./jsonc.DYI1rfmx.js"),[])},{id:"jsonl",name:"JSON Lines",import:()=>u(()=>import("./jsonl.BUpeXbsf.js"),[])},{id:"jsonnet",name:"Jsonnet",import:()=>u(()=>import("./jsonnet.C9d3aiqh.js"),[])},{id:"jssm",name:"JSSM",aliases:["fsl"],import:()=>u(()=>import("./jssm.Dble9ECP.js"),[])},{id:"jsx",name:"JSX",import:()=>u(()=>import("./jsx.CsyrCbsw.js"),[])},{id:"julia",name:"Julia",aliases:["jl"],import:()=>u(()=>import("./julia.CyGW3mcn.js"),__vite__mapDeps([29,16,17,13,18,30,2,31]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:()=>u(()=>import("./kotlin.BIxS-Weu.js"),[])},{id:"kusto",name:"Kusto",aliases:["kql"],import:()=>u(()=>import("./kusto.DKlGn9uv.js"),[])},{id:"latex",name:"LaTeX",import:()=>u(()=>import("./latex.CbyClHu1.js"),__vite__mapDeps([77,78,31,39,3,79,27,1,2,8,29,16,17,13,18,30,40,38,7,41,46,11,43]))},{id:"less",name:"Less",import:()=>u(()=>import("./less.Du6_OKDb.js"),[])},{id:"liquid",name:"Liquid",import:()=>u(()=>import("./liquid.Cp8214eI.js"),__vite__mapDeps([80,1,2,3,9]))},{id:"log",name:"Log file",import:()=>u(()=>import("./log.Ksn5IXup.js"),[])},{id:"logo",name:"Logo",import:()=>u(()=>import("./logo.DdacRhvC.js"),[])},{id:"lua",name:"Lua",import:()=>u(()=>import("./lua.CHJYZA-p.js"),__vite__mapDeps([40,13]))},{id:"make",name:"Makefile",aliases:["makefile"],import:()=>u(()=>import("./make.B9S9BZZh.js"),[])},{id:"markdown",name:"Markdown",aliases:["md"],import:()=>u(()=>import("./markdown.BdfWgkoX.js"),[])},{id:"marko",name:"Marko",import:()=>u(()=>import("./marko.DXVuwHdi.js"),__vite__mapDeps([81,3,33,5,2]))},{id:"matlab",name:"MATLAB",import:()=>u(()=>import("./matlab.Btshr8M_.js"),[])},{id:"mdc",name:"MDC",import:()=>u(()=>import("./mdc.BtXAnNXs.js"),__vite__mapDeps([82,58,11,70,1,2,3]))},{id:"mdx",name:"MDX",import:()=>u(()=>import("./mdx.CBPJd_fO.js"),[])},{id:"mermaid",name:"Mermaid",import:()=>u(()=>import("./mermaid.Dkb1Nx48.js"),[])},{id:"mojo",name:"Mojo",import:()=>u(()=>import("./mojo.-7WWnkdy.js"),[])},{id:"move",name:"Move",import:()=>u(()=>import("./move.C9UBdavN.js"),[])},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:()=>u(()=>import("./narrat.B9CT-1u6.js"),[])},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:()=>u(()=>import("./nextflow.DBxHOdLe.js"),[])},{id:"nginx",name:"Nginx",import:()=>u(()=>import("./nginx.CFCDRImM.js"),__vite__mapDeps([83,40,13]))},{id:"nim",name:"Nim",import:()=>u(()=>import("./nim.whBoXTHG.js"),__vite__mapDeps([84,13,1,2,3,7,8,17,58]))},{id:"nix",name:"Nix",import:()=>u(()=>import("./nix.B7rNE5kf.js"),[])},{id:"nushell",name:"nushell",aliases:["nu"],import:()=>u(()=>import("./nushell.CrgTADc5.js"),[])},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:()=>u(()=>import("./objective-c.DHmGyzbM.js"),[])},{id:"objective-cpp",name:"Objective-C++",import:()=>u(()=>import("./objective-cpp.BWKJ1FCf.js"),[])},{id:"ocaml",name:"OCaml",import:()=>u(()=>import("./ocaml.RqY_Nz63.js"),[])},{id:"pascal",name:"Pascal",import:()=>u(()=>import("./pascal.B6ZnTe72.js"),[])},{id:"perl",name:"Perl",import:()=>u(()=>import("./perl.Czv4QcIx.js"),__vite__mapDeps([37,1,2,3,7,8,18]))},{id:"php",name:"PHP",import:()=>u(()=>import("./php.DEqKwr-6.js"),__vite__mapDeps([85,1,2,3,7,8,18,9]))},{id:"plsql",name:"PL/SQL",import:()=>u(()=>import("./plsql.BbJj1K1w.js"),[])},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:()=>u(()=>import("./po.HrnDn_2Q.js"),[])},{id:"postcss",name:"PostCSS",import:()=>u(()=>import("./postcss.DXT9h7v2.js"),[])},{id:"powerquery",name:"PowerQuery",import:()=>u(()=>import("./powerquery.CApMHEaB.js"),[])},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:()=>u(()=>import("./powershell.9ZOzOPqN.js"),[])},{id:"prisma",name:"Prisma",import:()=>u(()=>import("./prisma.BBJYjQ0k.js"),[])},{id:"prolog",name:"Prolog",import:()=>u(()=>import("./prolog.BH_RS3WO.js"),[])},{id:"proto",name:"Protocol Buffer 3",import:()=>u(()=>import("./proto.DOtRmeXT.js"),[])},{id:"pug",name:"Pug",aliases:["jade"],import:()=>u(()=>import("./pug.BWq4yR4F.js"),__vite__mapDeps([86,2,3,42,5,48,15,1]))},{id:"puppet",name:"Puppet",import:()=>u(()=>import("./puppet.37ic6j3l.js"),[])},{id:"purescript",name:"PureScript",import:()=>u(()=>import("./purescript.CfPQhs6g.js"),[])},{id:"python",name:"Python",aliases:["py"],import:()=>u(()=>import("./python.DwuVtWc2.js"),[])},{id:"qml",name:"QML",import:()=>u(()=>import("./qml.qWrhaLmb.js"),__vite__mapDeps([87,2]))},{id:"qmldir",name:"QML Directory",import:()=>u(()=>import("./qmldir.MS3qTAOR.js"),[])},{id:"qss",name:"Qt Style Sheets",import:()=>u(()=>import("./qss.FJDVp-XM.js"),[])},{id:"r",name:"R",import:()=>u(()=>import("./r.BXfENWL6.js"),[])},{id:"racket",name:"Racket",import:()=>u(()=>import("./racket.B5NHDIr7.js"),[])},{id:"raku",name:"Raku",aliases:["perl6"],import:()=>u(()=>import("./raku.D384ylkT.js"),[])},{id:"razor",name:"ASP.NET Razor",import:()=>u(()=>import("./razor.BPIJn9no.js"),__vite__mapDeps([88,1,2,3,19]))},{id:"reg",name:"Windows Registry Script",import:()=>u(()=>import("./reg.CrhH3_Og.js"),[])},{id:"rel",name:"Rel",import:()=>u(()=>import("./rel.6Kuza3Wr.js"),[])},{id:"riscv",name:"RISC-V",import:()=>u(()=>import("./riscv.AgnqFTPX.js"),[])},{id:"rst",name:"reStructuredText",import:()=>u(()=>import("./rst.MQSXyo4o.js"),__vite__mapDeps([89,70,1,2,3,16,17,13,18,30,39,11,90,38,7,8,40]))},{id:"ruby",name:"Ruby",aliases:["rb"],import:()=>u(()=>import("./ruby.BYVeyLWu.js"),__vite__mapDeps([38,1,2,3,7,8,18,13,39,40]))},{id:"rust",name:"Rust",aliases:["rs"],import:()=>u(()=>import("./rust.DGxQkqYo.js"),[])},{id:"sas",name:"SAS",import:()=>u(()=>import("./sas.2Dj3KWk-.js"),__vite__mapDeps([91,18]))},{id:"sass",name:"Sass",import:()=>u(()=>import("./sass.CMDmr8et.js"),[])},{id:"scala",name:"Scala",import:()=>u(()=>import("./scala.vMsNTMhM.js"),[])},{id:"scheme",name:"Scheme",import:()=>u(()=>import("./scheme.1Je9_Reo.js"),[])},{id:"scss",name:"SCSS",import:()=>u(()=>import("./scss.Dr-_CcBd.js"),__vite__mapDeps([5,3]))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:()=>u(()=>import("./shaderlab.D_C8j_yu.js"),__vite__mapDeps([92,93]))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:()=>u(()=>import("./shellscript.BZfs-ost.js"),[])},{id:"shellsession",name:"Shell Session",aliases:["console"],import:()=>u(()=>import("./shellsession.D2P9pGgM.js"),__vite__mapDeps([94,39]))},{id:"smalltalk",name:"Smalltalk",import:()=>u(()=>import("./smalltalk.DSsji4Hu.js"),[])},{id:"solidity",name:"Solidity",import:()=>u(()=>import("./solidity.CThH5sBG.js"),[])},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:()=>u(()=>import("./soy.D91J-rek.js"),__vite__mapDeps([95,1,2,3]))},{id:"sparql",name:"SPARQL",import:()=>u(()=>import("./sparql.DJ46LgWq.js"),__vite__mapDeps([96,97]))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:()=>u(()=>import("./splunk.6XBPEST2.js"),[])},{id:"sql",name:"SQL",import:()=>u(()=>import("./sql.DbK06e1c.js"),[])},{id:"ssh-config",name:"SSH Config",import:()=>u(()=>import("./ssh-config.BH1M7C1g.js"),[])},{id:"stata",name:"Stata",import:()=>u(()=>import("./stata.DCIeX9IZ.js"),__vite__mapDeps([98,18]))},{id:"stylus",name:"Stylus",aliases:["styl"],import:()=>u(()=>import("./stylus.DSrLtGYv.js"),[])},{id:"svelte",name:"Svelte",import:()=>u(()=>import("./svelte.CpQM5Shq.js"),__vite__mapDeps([99,2,46,15,48,42,3,5,33,49,86,1,58]))},{id:"swift",name:"Swift",import:()=>u(()=>import("./swift.Dez-Qvcc.js"),[])},{id:"system-verilog",name:"SystemVerilog",import:()=>u(()=>import("./system-verilog.BscxmKrE.js"),[])},{id:"systemd",name:"Systemd Units",import:()=>u(()=>import("./systemd.CuJfdYLG.js"),[])},{id:"tasl",name:"Tasl",import:()=>u(()=>import("./tasl.BxwAa5i0.js"),[])},{id:"tcl",name:"Tcl",import:()=>u(()=>import("./tcl.C_8Fx7bH.js"),[])},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:()=>u(()=>import("./terraform.DBeuZS66.js"),[])},{id:"tex",name:"TeX",import:()=>u(()=>import("./tex.-C-BpcSB.js"),__vite__mapDeps([78,31]))},{id:"toml",name:"TOML",import:()=>u(()=>import("./toml.BT9ZzGyQ.js"),[])},{id:"tsv",name:"TSV",import:()=>u(()=>import("./tsv.DnLUQrgA.js"),[])},{id:"tsx",name:"TSX",import:()=>u(()=>import("./tsx.BlxWTfDV.js"),[])},{id:"turtle",name:"Turtle",import:()=>u(()=>import("./turtle.C15OxdQ5.js"),[])},{id:"twig",name:"Twig",import:()=>u(()=>import("./twig.C7WLmjjl.js"),__vite__mapDeps([100,3,2,5,85,1,7,8,18,9,30,38,13,39,40]))},{id:"typescript",name:"TypeScript",aliases:["ts"],import:()=>u(()=>import("./typescript.DC8MraHL.js"),[])},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:()=>u(()=>import("./typespec.Bx89rGXK.js"),[])},{id:"typst",name:"Typst",aliases:["typ"],import:()=>u(()=>import("./typst.I4qd5QHW.js"),[])},{id:"v",name:"V",import:()=>u(()=>import("./v.C2TBxDwV.js"),[])},{id:"vala",name:"Vala",import:()=>u(()=>import("./vala.CO5hpdkB.js"),[])},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:()=>u(()=>import("./vb.beD-FUib.js"),[])},{id:"verilog",name:"Verilog",import:()=>u(()=>import("./verilog.DVfdqzEq.js"),[])},{id:"vhdl",name:"VHDL",import:()=>u(()=>import("./vhdl.QZ3jNtnE.js"),[])},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:()=>u(()=>import("./viml.BLluXI4E.js"),[])},{id:"vue",name:"Vue",import:()=>u(()=>import("./vue.ClrSQ_eu.js"),__vite__mapDeps([101,1,2,3,58,86,42,5,48,15,33,46,28,50,9,102,103,11,45,66,70]))},{id:"vue-html",name:"Vue HTML",import:()=>u(()=>import("./vue-html.CN_dVTIP.js"),__vite__mapDeps([104,101,1,2,3,58,86,42,5,48,15,33,46,28,50,9,102,103,11,45,66,70]))},{id:"vyper",name:"Vyper",aliases:["vy"],import:()=>u(()=>import("./vyper.o-cPXEvd.js"),[])},{id:"wasm",name:"WebAssembly",import:()=>u(()=>import("./wasm.Cicx_DS6.js"),[])},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:()=>u(()=>import("./wenyan.D3VXSfF0.js"),[])},{id:"wgsl",name:"WGSL",import:()=>u(()=>import("./wgsl.BZz1Hhek.js"),[])},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:()=>u(()=>import("./wikitext.EfTDFRWl.js"),__vite__mapDeps([105,1,2,3,106,8,40,13,34,37,7,18,31,38,39,85,9,107,108,11,109,14,15,16,17,20,21,25,26,86,42,5,48,102,33,35,44,110,111,30,29,41,43,46,19,57,58,112,69,24,22,77,78,79,27,113]))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:()=>u(()=>import("./wolfram.BICIrM8O.js"),[])},{id:"xml",name:"XML",import:()=>u(()=>import("./xml.BzTcx3OS.js"),__vite__mapDeps([7,8]))},{id:"xsl",name:"XSL",import:()=>u(()=>import("./xsl.lJB8dDLf.js"),__vite__mapDeps([108,7,8]))},{id:"yaml",name:"YAML",aliases:["yml"],import:()=>u(()=>import("./yaml.C5gCGmDW.js"),[])},{id:"zenscript",name:"ZenScript",import:()=>u(()=>import("./zenscript.B1nm99XP.js"),[])},{id:"zig",name:"Zig",import:()=>u(()=>import("./zig.Bsp1M94H.js"),[])}],Oi=Object.fromEntries(Mn.map(n=>[n.id,n.import])),Ci=Object.fromEntries(Mn.flatMap(n=>n.aliases?.map(e=>[e,n.import])||[])),wi={...Oi,...Ci},Ii=async n=>u(()=>import("./wasm.CsTmP73Z.js"),[]).then(e=>e.default(n)),ki=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:()=>u(()=>import("./andromeeda.YxQm0tCS.js"),[])},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:()=>u(()=>import("./aurora-x.BaWyeHV_.js"),[])},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:()=>u(()=>import("./ayu-dark.Bn5gmY5k.js"),[])},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:()=>u(()=>import("./catppuccin-frappe.CSPeAESR.js"),[])},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:()=>u(()=>import("./catppuccin-latte.BYdKNJ10.js"),[])},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:()=>u(()=>import("./catppuccin-macchiato.DVLwECkk.js"),[])},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:()=>u(()=>import("./catppuccin-mocha.CEfge3mM.js"),[])},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:()=>u(()=>import("./dark-plus.KEYLhlmT.js"),[])},{id:"dracula",displayName:"Dracula",type:"dark",import:()=>u(()=>import("./dracula.DGO8GyiP.js"),[])},{id:"dracula-soft",displayName:"Dracula Soft",type:"dark",import:()=>u(()=>import("./dracula-soft.9B1nZgL-.js"),[])},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:()=>u(()=>import("./github-dark.CzPA46E-.js"),[])},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:()=>u(()=>import("./github-dark-default.BXF7Vm5l.js"),[])},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:()=>u(()=>import("./github-dark-dimmed.CRDKj6ck.js"),[])},{id:"github-light",displayName:"GitHub Light",type:"light",import:()=>u(()=>import("./github-light.CRlnGVMD.js"),[])},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:()=>u(()=>import("./github-light-default.UREJT2Bw.js"),[])},{id:"houston",displayName:"Houston",type:"dark",import:()=>u(()=>import("./houston.CZZ6oYdA.js"),[])},{id:"light-plus",displayName:"Light Plus",type:"light",import:()=>u(()=>import("./light-plus.BsvsQ1iS.js"),[])},{id:"material-theme",displayName:"Material Theme",type:"dark",import:()=>u(()=>import("./material-theme.B2BuIiKK.js"),[])},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:()=>u(()=>import("./material-theme-darker.BrGg7AAd.js"),[])},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:()=>u(()=>import("./material-theme-lighter.DDRuGeQH.js"),[])},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:()=>u(()=>import("./material-theme-ocean.CBL0qBdF.js"),[])},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:()=>u(()=>import("./material-theme-palenight.D7gg1Usp.js"),[])},{id:"min-dark",displayName:"Min Dark",type:"dark",import:()=>u(()=>import("./min-dark.iSbrOpM4.js"),[])},{id:"min-light",displayName:"Min Light",type:"light",import:()=>u(()=>import("./min-light.BITGhEdf.js"),[])},{id:"monokai",displayName:"Monokai",type:"dark",import:()=>u(()=>import("./monokai.sMI-pExk.js"),[])},{id:"night-owl",displayName:"Night Owl",type:"dark",import:()=>u(()=>import("./night-owl.BeocmOPF.js"),[])},{id:"nord",displayName:"Nord",type:"dark",import:()=>u(()=>import("./nord.CsyjKwr8.js"),[])},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:()=>u(()=>import("./one-dark-pro.BTtaZsq5.js"),[])},{id:"one-light",displayName:"One Light",type:"light",import:()=>u(()=>import("./one-light.alpzPJ78.js"),[])},{id:"poimandres",displayName:"Poimandres",type:"dark",import:()=>u(()=>import("./poimandres.Cda-MJFk.js"),[])},{id:"red",displayName:"Red",type:"dark",import:()=>u(()=>import("./red.jaXbsbtS.js"),[])},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:()=>u(()=>import("./rose-pine.CX_FIdg1.js"),[])},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:()=>u(()=>import("./rose-pine-dawn.Bj5xdiaE.js"),[])},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:()=>u(()=>import("./rose-pine-moon.CdedUr_-.js"),[])},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:()=>u(()=>import("./slack-dark.C7oZ9nno.js"),[])},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:()=>u(()=>import("./slack-ochin.hXH8Gyq8.js"),[])},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:()=>u(()=>import("./snazzy-light.CA9nliXM.js"),[])},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:()=>u(()=>import("./solarized-dark.C86elO-m.js"),[])},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:()=>u(()=>import("./solarized-light.xPNGhBYe.js"),[])},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:()=>u(()=>import("./synthwave-84.BBDuFDsq.js"),[])},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:()=>u(()=>import("./tokyo-night.eJfcURhx.js"),[])},{id:"vesper",displayName:"Vesper",type:"dark",import:()=>u(()=>import("./vesper.BSB_bK09.js"),[])},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:()=>u(()=>import("./vitesse-black.B3g-KkBK.js"),[])},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:()=>u(()=>import("./vitesse-dark.Bxkoe-BC.js"),[])},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:()=>u(()=>import("./vitesse-light.Br6ll-O0.js"),[])}],Di=Object.fromEntries(ki.map(n=>[n.id,n.import]));var U;(function(n){n[n.NotSet=-1]="NotSet",n[n.None=0]="None",n[n.Italic=1]="Italic",n[n.Bold=2]="Bold",n[n.Underline=4]="Underline"})(U||(U={}));var oe;(function(n){function e(d){return d.toString(2).padStart(32,"0")}n.toBinaryStr=e;function t(d){const p=n.getLanguageId(d),m=n.getTokenType(d),g=n.getFontStyle(d),h=n.getForeground(d),f=n.getBackground(d);console.log({languageId:p,tokenType:m,fontStyle:g,foreground:h,background:f})}n.print=t;function r(d){return(d&255)>>>0}n.getLanguageId=r;function i(d){return(d&768)>>>8}n.getTokenType=i;function o(d){return(d&1024)!==0}n.containsBalancedBrackets=o;function l(d){return(d&30720)>>>11}n.getFontStyle=l;function s(d){return(d&16744448)>>>15}n.getForeground=s;function a(d){return(d&4278190080)>>>24}n.getBackground=a;function c(d,p,m,g,h,f,_){let E=n.getLanguageId(d),b=n.getTokenType(d),P=n.containsBalancedBrackets(d)?1:0,S=n.getFontStyle(d),A=n.getForeground(d),F=n.getBackground(d);return p!==0&&(E=p),m!==8&&(b=m),g!==null&&(P=g?1:0),h!==-1&&(S=h),f!==0&&(A=f),_!==0&&(F=_),(E<<0|b<<8|P<<10|S<<11|A<<15|F<<24)>>>0}n.set=c})(oe||(oe={}));function Ce(n,e){const t=[],r=Ni(n);let i=r.next();for(;i!==null;){let a=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":a=1;break;case"L":a=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let c=l();if(t.push({matcher:c,priority:a}),i!==",")break;i=r.next()}return t;function o(){if(i==="-"){i=r.next();const a=o();return c=>!!a&&!a(c)}if(i==="("){i=r.next();const a=s();return i===")"&&(i=r.next()),a}if(Xt(i)){const a=[];do a.push(i),i=r.next();while(Xt(i));return c=>e(a,c)}return null}function l(){const a=[];let c=o();for(;c;)a.push(c),c=o();return d=>a.every(p=>p(d))}function s(){const a=[];let c=l();for(;c&&(a.push(c),i==="|"||i===",");){do i=r.next();while(i==="|"||i===",");c=l()}return d=>a.some(p=>p(d))}}function Xt(n){return!!n&&!!n.match(/[\w\.:]+/)}function Ni(n){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,t=e.exec(n);return{next:()=>{if(!t)return null;const r=t[0];return t=e.exec(n),r}}}function Vn(n){typeof n.dispose=="function"&&n.dispose()}function xi(n){return Rt(n)}function Rt(n){return Array.isArray(n)?Mi(n):typeof n=="object"?Vi(n):n}function Mi(n){let e=[];for(let t=0,r=n.length;t{for(let r in t)n[r]=t[r]}),n}function jn(n){const e=~n.lastIndexOf("/")||~n.lastIndexOf("\\");return e===0?n:~e===n.length-1?jn(n.substring(0,n.length-1)):n.substr(~e+1)}let Je=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g;class Ae{static hasCaptures(e){return e===null?!1:(Je.lastIndex=0,Je.test(e))}static replaceCaptures(e,t,r){return e.replace(Je,(i,o,l,s)=>{let a=r[parseInt(o||l,10)];if(a){let c=t.substring(a.start,a.end);for(;c[0]===".";)c=c.substring(1);switch(s){case"downcase":return c.toLowerCase();case"upcase":return c.toUpperCase();default:return c}}else return i})}}function Gn(n,e){return ne?1:0}function Fn(n,e){if(n===null&&e===null)return 0;if(!n)return-1;if(!e)return 1;let t=n.length,r=e.length;if(t===r){for(let i=0;i`);return}const o=t.lookup(e);n instanceof he?Le({baseGrammar:o,selfGrammar:i},r):st(n.ruleName,{baseGrammar:o,selfGrammar:i,repository:i.repository},r);const l=t.injections(n.scopeName);if(l)for(const s of l)r.add(new he(s))}function st(n,e,t){if(e.repository&&e.repository[n]){const r=e.repository[n];we([r],e,t)}}function Le(n,e){n.selfGrammar.patterns&&Array.isArray(n.selfGrammar.patterns)&&we(n.selfGrammar.patterns,{...n,repository:n.selfGrammar.repository},e),n.selfGrammar.injections&&we(Object.values(n.selfGrammar.injections),{...n,repository:n.selfGrammar.repository},e)}function we(n,e,t){for(const r of n){if(t.visitedRule.has(r))continue;t.visitedRule.add(r);const i=r.repository?Bn({},e.repository,r.repository):e.repository;Array.isArray(r.patterns)&&we(r.patterns,{...e,repository:i},t);const o=r.include;if(!o)continue;const l=$n(o);switch(l.kind){case 0:Le({...e,selfGrammar:e.baseGrammar},t);break;case 1:Le(e,t);break;case 2:st(l.ruleName,{...e,repository:i},t);break;case 3:case 4:const s=l.scopeName===e.selfGrammar.scopeName?e.selfGrammar:l.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(s){const a={baseGrammar:e.baseGrammar,selfGrammar:s,repository:i};l.kind===4?st(l.ruleName,a,t):Le(a,t)}else l.kind===4?t.add(new Bi(l.scopeName,l.ruleName)):t.add(new he(l.scopeName));break}}}class Ui{kind=0}class Hi{kind=1}class $i{ruleName;kind=2;constructor(e){this.ruleName=e}}class zi{scopeName;kind=3;constructor(e){this.scopeName=e}}class Wi{scopeName;ruleName;kind=4;constructor(e,t){this.scopeName=e,this.ruleName=t}}function $n(n){if(n==="$base")return new Ui;if(n==="$self")return new Hi;const e=n.indexOf("#");if(e===-1)return new zi(n);if(e===0)return new $i(n.substring(1));{const t=n.substring(0,e),r=n.substring(e+1);return new Wi(t,r)}}const qi=/\\(\d+)/,Jt=/\\(\d+)/g,Ki=-1,zn=-2;class _e{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,r,i){this.$location=e,this.id=t,this._name=r||null,this._nameIsCapturing=Ae.hasCaptures(this._name),this._contentName=i||null,this._contentNameIsCapturing=Ae.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${jn(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:Ae.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Ae.replaceCaptures(this._contentName,e,t)}}class Xi extends _e{retokenizeCapturedWithRuleId;constructor(e,t,r,i,o){super(e,t,r,i),this.retokenizeCapturedWithRuleId=o}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,r,i){throw new Error("Not supported!")}}class Yi extends _e{_match;captures;_cachedCompiledPatterns;constructor(e,t,r,i,o){super(e,t,r,null),this._match=new ee(i,this.id),this.captures=o,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,r,i){return this._getCachedCompiledPatterns(e).compileAG(e,r,i)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new me,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}class Qt extends _e{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,r,i,o){super(e,t,r,i),this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const r of this.patterns)e.getRule(r).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,r,i){return this._getCachedCompiledPatterns(e).compileAG(e,r,i)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new me,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}class lt extends _e{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,r,i,o,l,s,a,c,d){super(e,t,r,i),this._begin=new ee(o,this.id),this.beginCaptures=l,this._end=new ee(s||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=c||!1,this.patterns=d.patterns,this.hasMissingPatterns=d.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,r,i){return this._getCachedCompiledPatterns(e,t).compileAG(e,r,i)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new me;for(const r of this.patterns)e.getRule(r).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}}class Ie extends _e{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,r,i,o,l,s,a,c){super(e,t,r,i),this._begin=new ee(o,this.id),this.beginCaptures=l,this.whileCaptures=a,this._while=new ee(s,zn),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,r,i){return this._getCachedCompiledPatterns(e).compileAG(e,r,i)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new me;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,r,i){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,r,i)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new me,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}}class w{static createCaptureRule(e,t,r,i,o){return e.registerRule(l=>new Xi(t,l,r,i,o))}static getCompiledRuleId(e,t,r){return e.id||t.registerRule(i=>{if(e.id=i,e.match)return new Yi(e.$vscodeTextmateLocation,e.id,e.name,e.match,w._compileCaptures(e.captures,t,r));if(typeof e.begin>"u"){e.repository&&(r=Bn({},r,e.repository));let o=e.patterns;return typeof o>"u"&&e.include&&(o=[{include:e.include}]),new Qt(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,w._compilePatterns(o,t,r))}return e.while?new Ie(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,w._compileCaptures(e.beginCaptures||e.captures,t,r),e.while,w._compileCaptures(e.whileCaptures||e.captures,t,r),w._compilePatterns(e.patterns,t,r)):new lt(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,w._compileCaptures(e.beginCaptures||e.captures,t,r),e.end,w._compileCaptures(e.endCaptures||e.captures,t,r),e.applyEndPatternLast,w._compilePatterns(e.patterns,t,r))}),e.id}static _compileCaptures(e,t,r){let i=[];if(e){let o=0;for(const l in e){if(l==="$vscodeTextmateLocation")continue;const s=parseInt(l,10);s>o&&(o=s)}for(let l=0;l<=o;l++)i[l]=null;for(const l in e){if(l==="$vscodeTextmateLocation")continue;const s=parseInt(l,10);let a=0;e[l].patterns&&(a=w.getCompiledRuleId(e[l],t,r)),i[s]=w.createCaptureRule(t,e[l].$vscodeTextmateLocation,e[l].name,e[l].contentName,a)}}return i}static _compilePatterns(e,t,r){let i=[];if(e)for(let o=0,l=e.length;oe.substring(i.start,i.end));return Jt.lastIndex=0,this.source.replace(Jt,(i,o)=>Un(r[parseInt(o,10)]||""))}_buildAnchorCache(){let e=[],t=[],r=[],i=[],o,l,s,a;for(o=0,l=this.source.length;or.source);this._cached=new Zt(e,t,this._items.map(r=>r.ruleId))}return this._cached}compileAG(e,t,r){return this._hasAnchors?t?r?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,r)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,r)),this._anchorCache.A1_G0):r?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,r)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,r)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,r){let i=this._items.map(o=>o.resolveAnchors(t,r));return new Zt(e,i,this._items.map(o=>o.ruleId))}}class Zt{regExps;rules;scanner;constructor(e,t,r){this.regExps=t,this.rules=r,this.scanner=e.createOnigScanner(t)}dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,r=this.rules.length;tthis._root.match(e));constructor(e,t,r){this._colorMap=e,this._defaults=t,this._root=r}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,i=this._cachedMatchRoot.get(t).find(o=>Ji(e.parent,o.parentScopes));return i?new Wn(i.fontStyle,i.foreground,i.background):null}}class Z{parent;scopeName;static push(e,t){for(const r of t)e=new Z(e,r);return e}static from(...e){let t=null;for(let r=0;r1&&(_=h.slice(0,h.length-1),_.reverse()),t[r++]=new eo(f,_,i,a,c,d)}}return t}class eo{scope;parentScopes;index;fontStyle;foreground;background;constructor(e,t,r,i,o,l){this.scope=e,this.parentScopes=t,this.index=r,this.fontStyle=i,this.foreground=o,this.background=l}}function to(n,e){n.sort((a,c)=>{let d=Gn(a.scope,c.scope);return d!==0||(d=Fn(a.parentScopes,c.parentScopes),d!==0)?d:a.index-c.index});let t=0,r="#000000",i="#ffffff";for(;n.length>=1&&n[0].scope==="";){let a=n.shift();a.fontStyle!==-1&&(t=a.fontStyle),a.foreground!==null&&(r=a.foreground),a.background!==null&&(i=a.background)}let o=new no(e),l=new Wn(t,o.getId(r),o.getId(i)),s=new pe(new fe(0,null,-1,0,0),[]);for(let a=0,c=n.length;ae?console.log("how did this happen?"):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),r!==0&&(this.foreground=r),i!==0&&(this.background=i)}}class pe{_mainRule;_children;_rulesWithParentScopes;constructor(e,t=[],r={}){this._mainRule=e,this._children=r,this._rulesWithParentScopes=t}static _sortBySpecificity(e){return e.length===1||e.sort(this._cmpBySpecificity),e}static _cmpBySpecificity(e,t){if(e.scopeDepth===t.scopeDepth){const r=e.parentScopes,i=t.parentScopes;let o=r===null?0:r.length,l=i===null?0:i.length;if(o===l)for(let s=0;s{const t=this._scopeToLanguage(e),r=this._toStandardTokenType(e);return new Qe(t,r)});_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){const t=e.match(De.STANDARD_TOKEN_TYPE_REGEXP);if(!t)return 8;switch(t[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/}class ro{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([r,i])=>Un(r));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}}class en{stack;stoppedEarly;constructor(e,t){this.stack=e,this.stoppedEarly=t}}function qn(n,e,t,r,i,o,l,s){const a=e.content.length;let c=!1,d=-1;if(l){const g=io(n,e,t,r,i,o);i=g.stack,r=g.linePos,t=g.isFirstLine,d=g.anchorPosition}const p=Date.now();for(;!c;){if(s!==0&&Date.now()-p>s)return new en(i,!0);m()}return new en(i,!1);function m(){const g=oo(n,e,t,r,i,d);if(!g){o.produce(i,a),c=!0;return}const h=g.captureIndices,f=g.matchedRuleId,_=h&&h.length>0?h[0].end>r:!1;if(f===Ki){const E=i.getRule(n);o.produce(i,h[0].start),i=i.withContentNameScopesList(i.nameScopesList),le(n,e,t,i,o,E.endCaptures,h),o.produce(i,h[0].end);const b=i;if(i=i.parent,d=b.getAnchorPos(),!_&&b.getEnterPos()===r){i=b,o.produce(i,a),c=!0;return}}else{const E=n.getRule(f);o.produce(i,h[0].start);const b=i,P=E.getName(e.content,h),S=i.contentNameScopesList.pushAttributed(P,n);if(i=i.push(f,r,d,h[0].end===a,null,S,S),E instanceof lt){const A=E;le(n,e,t,i,o,A.beginCaptures,h),o.produce(i,h[0].end),d=h[0].end;const F=A.getContentName(e.content,h),X=S.pushAttributed(F,n);if(i=i.withContentNameScopesList(X),A.endHasBackReferences&&(i=i.withEndRule(A.getEndWithResolvedBackReferences(e.content,h))),!_&&b.hasSameRuleAs(i)){i=i.pop(),o.produce(i,a),c=!0;return}}else if(E instanceof Ie){const A=E;le(n,e,t,i,o,A.beginCaptures,h),o.produce(i,h[0].end),d=h[0].end;const F=A.getContentName(e.content,h),X=S.pushAttributed(F,n);if(i=i.withContentNameScopesList(X),A.whileHasBackReferences&&(i=i.withEndRule(A.getWhileWithResolvedBackReferences(e.content,h))),!_&&b.hasSameRuleAs(i)){i=i.pop(),o.produce(i,a),c=!0;return}}else if(le(n,e,t,i,o,E.captures,h),o.produce(i,h[0].end),i=i.pop(),!_){i=i.safePop(),o.produce(i,a),c=!0;return}}h[0].end>r&&(r=h[0].end,t=!1)}}function io(n,e,t,r,i,o){let l=i.beginRuleCapturedEOL?0:-1;const s=[];for(let a=i;a;a=a.pop()){const c=a.getRule(n);c instanceof Ie&&s.push({rule:c,stack:a})}for(let a=s.pop();a;a=s.pop()){const{ruleScanner:c,findOptions:d}=lo(a.rule,n,a.stack.endRule,t,r===l),p=c.findNextMatchSync(e,r,d);if(p){if(p.ruleId!==zn){i=a.stack.pop();break}p.captureIndices&&p.captureIndices.length&&(o.produce(a.stack,p.captureIndices[0].start),le(n,e,t,a.stack,o,a.rule.whileCaptures,p.captureIndices),o.produce(a.stack,p.captureIndices[0].end),l=p.captureIndices[0].end,p.captureIndices[0].end>r&&(r=p.captureIndices[0].end,t=!1))}else{i=a.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:l,isFirstLine:t}}function oo(n,e,t,r,i,o){const l=ao(n,e,t,r,i,o),s=n.getInjections();if(s.length===0)return l;const a=so(s,n,e,t,r,i,o);if(!a)return l;if(!l)return a;const c=l.captureIndices[0].start,d=a.captureIndices[0].start;return d=s)&&(s=P,a=b.captureIndices,c=b.ruleId,d=h.priority,s===i))break}return a?{priorityMatch:d===-1,captureIndices:a,matchedRuleId:c}:null}function Kn(n,e,t,r,i){return{ruleScanner:n.compileAG(e,t,r,i),findOptions:0}}function lo(n,e,t,r,i){return{ruleScanner:n.compileWhileAG(e,t,r,i),findOptions:0}}function le(n,e,t,r,i,o,l){if(o.length===0)return;const s=e.content,a=Math.min(o.length,l.length),c=[],d=l[0].end;for(let p=0;pd)break;for(;c.length>0&&c[c.length-1].endPos<=g.start;)i.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop();if(c.length>0?i.produceFromScopes(c[c.length-1].scopes,g.start):i.produce(r,g.start),m.retokenizeCapturedWithRuleId){const f=m.getName(s,l),_=r.contentNameScopesList.pushAttributed(f,n),E=m.getContentName(s,l),b=_.pushAttributed(E,n),P=r.push(m.retokenizeCapturedWithRuleId,g.start,-1,!1,null,_,b),S=n.createOnigString(s.substring(0,g.end));qn(n,S,t&&g.start===0,g.start,P,i,!1,0),Vn(S);continue}const h=m.getName(s,l);if(h!==null){const _=(c.length>0?c[c.length-1].scopes:r.contentNameScopesList).pushAttributed(h,n);c.push(new co(_,g.end))}}for(;c.length>0;)i.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop()}class co{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}}function uo(n,e,t,r,i,o,l,s){return new ho(n,e,t,r,i,o,l,s)}function tn(n,e,t,r,i){const o=Ce(e,Ne),l=w.getCompiledRuleId(t,r,i.repository);for(const s of o)n.push({debugSelector:e,matcher:s.matcher,ruleId:l,grammar:i,priority:s.priority})}function Ne(n,e){if(e.length{for(let i=t;it&&n.substr(0,t)===e&&n[t]==="."}class ho{_rootScopeName;balancedBracketSelectors;_onigLib;_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}constructor(e,t,r,i,o,l,s,a){if(this._rootScopeName=e,this.balancedBracketSelectors=l,this._onigLib=a,this._basicScopeAttributesProvider=new De(r,i),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=s,this._grammar=nn(t,null),this._injections=null,this._tokenTypeMatchers=[],o)for(const c of Object.keys(o)){const d=Ce(c,Ne);for(const p of d)this._tokenTypeMatchers.push({matcher:p.matcher,type:o[c]})}}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e={lookup:o=>o===this._rootScopeName?this._grammar:this.getExternalGrammar(o),injections:o=>this._grammarRepository.injections(o)},t=[],r=this._rootScopeName,i=e.lookup(r);if(i){const o=i.injections;if(o)for(let s in o)tn(t,s,o[s],this,i);const l=this._grammarRepository.injections(r);l&&l.forEach(s=>{const a=this.getExternalGrammar(s);if(a){const c=a.injectionSelector;c&&tn(t,c,a,this,a)}})}return t.sort((o,l)=>o.priority-l.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,r=e(t);return this._ruleId2desc[t]=r,r}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const r=this._grammarRepository.lookup(e);if(r)return this._includedGrammars[e]=nn(r,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,r=0){const i=this._tokenize(e,t,!1,r);return{tokens:i.lineTokens.getResult(i.ruleStack,i.lineLength),ruleStack:i.ruleStack,stoppedEarly:i.stoppedEarly}}tokenizeLine2(e,t,r=0){const i=this._tokenize(e,t,!0,r);return{tokens:i.lineTokens.getBinaryResult(i.ruleStack,i.lineLength),ruleStack:i.ruleStack,stoppedEarly:i.stoppedEarly}}_tokenize(e,t,r,i){this._rootId===-1&&(this._rootId=w.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let o;if(!t||t===z.NULL){o=!0;const d=this._basicScopeAttributesProvider.getDefaultAttributes(),p=this.themeProvider.getDefaults(),m=oe.set(0,d.languageId,d.tokenType,null,p.fontStyle,p.foregroundId,p.backgroundId),g=this.getRule(this._rootId).getName(null,null);let h;g?h=x.createRootAndLookUpScopeName(g,m,this):h=x.createRoot("unknown",m),t=new z(null,this._rootId,-1,-1,!1,null,h,h)}else o=!1,t.reset();e=e+` +`;const l=this.createOnigString(e),s=l.content.length,a=new fo(r,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=qn(this,l,o,0,t,a,!0,i);return Vn(l),{lineLength:s,lineTokens:a,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}}function nn(n,e){return n=xi(n),n.repository=n.repository||{},n.repository.$self={$vscodeTextmateLocation:n.$vscodeTextmateLocation,patterns:n.patterns,name:n.scopeName},n.repository.$base=e||n.repository.$self,n}class x{parent;scopePath;tokenAttributes;static fromExtension(e,t){let r=e,i=e?.scopePath??null;for(const o of t)i=Z.push(i,o.scopeNames),r=new x(r,i,o.encodedTokenAttributes);return r}static createRoot(e,t){return new x(null,new Z(null,e),t)}static createRootAndLookUpScopeName(e,t,r){const i=r.getMetadataForScope(e),o=new Z(null,e),l=r.themeProvider.themeMatch(o),s=x.mergeAttributes(t,i,l);return new x(null,o,s)}get scopeName(){return this.scopePath.scopeName}constructor(e,t,r){this.parent=e,this.scopePath=t,this.tokenAttributes=r}toString(){return this.getScopeNames().join(" ")}equals(e){return x.equals(this,e)}static equals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}while(!0)}static mergeAttributes(e,t,r){let i=-1,o=0,l=0;return r!==null&&(i=r.fontStyle,o=r.foregroundId,l=r.backgroundId),oe.set(e,t.languageId,t.tokenType,null,i,o,l)}pushAttributed(e,t){if(e===null)return this;if(e.indexOf(" ")===-1)return x._pushAttributed(this,e,t);const r=e.split(/ /g);let i=this;for(const o of r)i=x._pushAttributed(i,o,t);return i}static _pushAttributed(e,t,r){const i=r.getMetadataForScope(t),o=e.scopePath.push(t),l=r.themeProvider.themeMatch(o),s=x.mergeAttributes(e.tokenAttributes,i,l);return new x(e,o,s)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){const t=[];let r=this;for(;r&&r!==e;)t.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(r.parent?.scopePath??null)}),r=r.parent;return r===e?t.reverse():void 0}}class z{parent;ruleId;beginRuleCapturedEOL;endRule;nameScopesList;contentNameScopesList;_stackElementBrand=void 0;static NULL=new z(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;constructor(e,t,r,i,o,l,s,a){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=o,this.endRule=l,this.nameScopesList=s,this.contentNameScopesList=a,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=i}equals(e){return e===null?!1:z._equals(this,e)}static _equals(e,t){return e===t?!0:this._structuralEquals(e,t)?x.equals(e.contentNameScopesList,t.contentNameScopesList):!1}static _structuralEquals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){z._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,t,r,i,o,l,s){return new z(this,e,t,r,i,o,l,s)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){const e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(e){return this.endRule===e?this:new z(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(e,t){const r=x.fromExtension(e?.nameScopesList??null,t.nameScopesList);return new z(e,t.ruleId,t.enterPos??-1,t.anchorPos??-1,t.beginRuleCapturedEOL,t.endRule,r,x.fromExtension(r,t.contentNameScopesList))}}class mo{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(r=>r==="*"?(this.allowAny=!0,[]):Ce(r,Ne).map(i=>i.matcher)),this.unbalancedBracketScopes=t.flatMap(r=>Ce(r,Ne).map(i=>i.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}}class fo{balancedBracketSelectors;_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;constructor(e,t,r,i){this.balancedBracketSelectors=i,this._emitBinaryTokens=e,this._tokenTypeOverrides=r,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let i=e?.tokenAttributes??0,o=!1;if(this.balancedBracketSelectors?.matchesAlways&&(o=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const l=e?.getScopeNames()??[];for(const s of this._tokenTypeOverrides)s.matcher(l)&&(i=oe.set(i,0,s.type,null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(l))}if(o&&(i=oe.set(i,0,8,o,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===i){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(i),this._lastTokenEndIndex=t;return}const r=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:r}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const r=new Uint32Array(this._binaryTokens.length);for(let i=0,o=this._binaryTokens.length;i0;)await Promise.all(l.Q.map(s=>this._loadSingleGrammar(s.scopeName))),l.processQueue();return this._grammarForScopeName(e,t,r,i,o)}async _loadSingleGrammar(e){return this._ensureGrammarCache.has(e)||this._ensureGrammarCache.set(e,this._doLoadSingleGrammar(e)),this._ensureGrammarCache.get(e)}async _doLoadSingleGrammar(e){const t=await this._options.loadGrammar(e);if(t){const r=typeof this._options.getInjections=="function"?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,r)}}async addGrammar(e,t=[],r=0,i=null){return this._syncRegistry.addGrammar(e,t),await this._grammarForScopeName(e.scopeName,r,i)}_grammarForScopeName(e,t=0,r=null,i=null,o=null){return this._syncRegistry.grammarForScopeName(e,t,r,i,o)}};const yo=z.NULL,k={LANGUAGEID_MASK:255,TOKEN_TYPE_MASK:768,BALANCED_BRACKETS_MASK:1024,FONT_STYLE_MASK:14336,FOREGROUND_MASK:8372224,BACKGROUND_MASK:4286578688,LANGUAGEID_OFFSET:0,TOKEN_TYPE_OFFSET:8,BALANCED_BRACKETS_OFFSET:10,FONT_STYLE_OFFSET:11,FOREGROUND_OFFSET:15,BACKGROUND_OFFSET:24};class W{static toBinaryStr(e){let t=e.toString(2);for(;t.length<32;)t=`0${t}`;return t}static getLanguageId(e){return(e&k.LANGUAGEID_MASK)>>>k.LANGUAGEID_OFFSET}static getTokenType(e){return(e&k.TOKEN_TYPE_MASK)>>>k.TOKEN_TYPE_OFFSET}static getFontStyle(e){return(e&k.FONT_STYLE_MASK)>>>k.FONT_STYLE_OFFSET}static getForeground(e){return(e&k.FOREGROUND_MASK)>>>k.FOREGROUND_OFFSET}static getBackground(e){return(e&k.BACKGROUND_MASK)>>>k.BACKGROUND_OFFSET}static containsBalancedBrackets(e){return(e&k.BALANCED_BRACKETS_MASK)!==0}static set(e,t,r,i,o,l){let s=W.getLanguageId(e),a=W.getTokenType(e),c=W.getFontStyle(e),d=W.getForeground(e),p=W.getBackground(e);const m=W.containsBalancedBrackets(e)?1:0;return t!==0&&(s=t),r!==0&&(a=r===8?0:r),i!==U.NotSet&&(c=i),o!==0&&(d=o),l!==0&&(p=l),(s<>>0}}function ze(n,e=!1){const t=n.split(/(\r?\n)/g);let r=0;const i=[];for(let o=0;ot&&r.push({...n,content:n.content.slice(t,i),offset:n.offset+t}),t=i;return tr-i);return t.length?n.map(r=>r.flatMap(i=>{const o=t.filter(l=>i.offsetl-i.offset).sort((l,s)=>l-s);return o.length?Eo(i,o):i})):n}function J(n,e){return n&&(e?.[n?.toLowerCase()]||n)}function er(n){const e={};return n.color&&(e.color=n.color),n.bgColor&&(e["background-color"]=n.bgColor),n.fontStyle&&(n.fontStyle&U.Italic&&(e["font-style"]="italic"),n.fontStyle&U.Bold&&(e["font-weight"]="bold"),n.fontStyle&U.Underline&&(e["text-decoration"]="underline")),e}function tr(n){return Object.entries(n).map(([e,t])=>`${e}:${t}`).join(";")}function bo(n){const e=ze(n,!0).map(([i])=>i);function t(i){let o=i,l=0;for(const s of e){if(oNumber.parseInt(l));o.length===3&&!o.some(l=>Number.isNaN(l))&&(i={type:"rgb",rgb:o})}else if(r==="5"){const o=Number.parseInt(n[e+t]);Number.isNaN(o)||(i={type:"table",index:Number(o)})}return[t,i]}function Ao(n){const e=[];for(let t=0;t=90&&i<=97?e.push({type:"setForegroundColor",value:{type:"named",name:Q[i-90+8]}}):i>=100&&i<=107&&e.push({type:"setBackgroundColor",value:{type:"named",name:Q[i-100+8]}})}return e}function Ro(){let n=null,e=null,t=new Set;return{parse(r){const i=[];let o=0;do{const l=To(r,o),s=l.sequence?r.substring(o,l.startPosition):r.substring(o);if(s.length>0&&i.push({value:s,foreground:n,background:e,decorations:new Set(t)}),l.sequence){const a=Ao(l.sequence);for(const c of a)c.type==="resetAll"?(n=null,e=null,t.clear()):c.type==="resetForegroundColor"?n=null:c.type==="resetBackgroundColor"?e=null:c.type==="resetDecoration"&&t.delete(c.value);for(const c of a)c.type==="setForegroundColor"?n=c.value:c.type==="setBackgroundColor"?e=c.value:c.type==="setDecoration"&&t.add(c.value)}o=l.position}while(oMath.max(0,Math.min(a,255)).toString(16).padStart(2,"0")).join("")}`}let r;function i(){if(r)return r;r=[];for(let c=0;c[s,n.colors?.[`terminal.ansi${s[0].toUpperCase()}${s.substring(1)}`]]))),l=Ro();return i.map(s=>l.parse(s[0]).map(a=>{let c,d;a.decorations.has("reverse")?(c=a.background?o.value(a.background):n.bg,d=a.foreground?o.value(a.foreground):n.fg):(c=a.foreground?o.value(a.foreground):n.fg,d=a.background?o.value(a.background):void 0),c=J(c,r),d=J(d,r),a.decorations.has("dim")&&(c=Oo(c));let p=U.None;return a.decorations.has("bold")&&(p|=U.Bold),a.decorations.has("italic")&&(p|=U.Italic),a.decorations.has("underline")&&(p|=U.Underline),{content:a.value,offset:s[1],color:c,bgColor:d,fontStyle:p}}))}function Oo(n){const e=n.match(/#([0-9a-f]{3})([0-9a-f]{3})?([0-9a-f]{2})?/);if(e)if(e[3]){const r=Math.round(Number.parseInt(e[3],16)/2).toString(16).padStart(2,"0");return`#${e[1]}${e[2]}${r}`}else return e[2]?`#${e[1]}${e[2]}80`:`#${Array.from(e[1]).map(r=>`${r}${r}`).join("")}80`;const t=n.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return t?`var(${t[1]}-dim)`:n}function Pt(n,e,t={}){const{lang:r="text",theme:i=n.getLoadedThemes()[0]}=t;if(Xn(r)||Jn(i))return ze(e).map(a=>[{content:a[0],offset:a[1]}]);const{theme:o,colorMap:l}=n.setTheme(i);if(r==="ansi")return Lo(o,e,t);const s=n.getLanguage(r);return Co(e,s,o,l,t)}function Co(n,e,t,r,i){const o={...t.colorReplacements,...i?.colorReplacements},{tokenizeMaxLineLength:l=0,tokenizeTimeLimit:s=500}=i,a=ze(n);let c=yo,d=[];const p=[];for(let m=0,g=a.length;m0&&h.length>=l){d=[],p.push([{content:h,offset:f,color:"",fontStyle:0}]);continue}let _,E,b;i.includeExplanation&&(_=e.tokenizeLine(h,c),E=_.tokens,b=0);const P=e.tokenizeLine2(h,c,s),S=P.tokens.length/2;for(let A=0;A=0&&o>=0;)on(e[i],r[o])&&(i-=1),o-=1;return i===-1}function ko(n,e,t){const r=[];let i=0;for(let o=0,l=n.settings.length;oc.trim());else if(Array.isArray(s.scope))a=s.scope;else continue;for(let c=0,d=a.length;cl[1]).map(l=>({color:l[0],theme:l[1]})),i=Do(...r.map(l=>Pt(n,e,{...t,theme:l.theme})));return i[0].map((l,s)=>l.map((a,c)=>{const d={content:a.content,variants:{},offset:a.offset};return i.forEach((p,m)=>{const{content:g,explanation:h,offset:f,..._}=p[s][c];d.variants[r[m].color]=_}),d}))}function Do(...n){const e=n.map(()=>[]),t=n.length;for(let r=0;ra[r]),o=e.map(()=>[]);e.forEach((a,c)=>a.push(o[c]));const l=i.map(()=>0),s=i.map(a=>a[0]);for(;s.every(a=>a);){const a=Math.min(...s.map(c=>c.content.length));for(let c=0;cf[1]).map(f=>({color:f[0],theme:f[1]})).sort((f,_)=>f.color===a?-1:_.color===a?1:0);if(p.length===0)throw new D("`themes` option must not be empty");const m=nr(n,e,t);if(a&&!p.find(f=>f.color===a))throw new D(`\`themes\` option must contain the defaultColor key \`${a}\``);const g=p.map(f=>n.getTheme(f.theme)),h=p.map(f=>f.color);o=m.map(f=>f.map(_=>No(_,h,c,a))),i=p.map((f,_)=>(_===0&&a?"":`${c+f.color}:`)+(J(g[_].fg,d)||"inherit")).join(";"),r=p.map((f,_)=>(_===0&&a?"":`${c+f.color}-bg:`)+(J(g[_].bg,d)||"inherit")).join(";"),l=`shiki-themes ${g.map(f=>f.name).join(" ")}`,s=a?void 0:[i,r].join(";")}else if("theme"in t){const{colorReplacements:a}=t;o=Pt(n,e,t);const c=n.getTheme(t.theme);r=J(c.bg,a),i=J(c.fg,a),l=c.name}else throw new D("Invalid options, either `theme` or `themes` must be provided");return{tokens:o,fg:i,bg:r,themeName:l,rootStyle:s}}function No(n,e,t,r){const i={content:n.content,explanation:n.explanation,offset:n.offset},o=e.map(a=>er(n.variants[a])),l=new Set(o.flatMap(a=>Object.keys(a))),s=o.reduce((a,c,d)=>{for(const p of l){const m=c[p]||"inherit";if(d===0&&r)a[p]=m;else{const g=p==="color"?"":p==="background-color"?"-bg":`-${p}`,h=t+e[d]+(p==="color"?"":g);a[p]?a[p]+=`;${h}:${m}`:a[p]=`${h}:${m}`}}return a},{});return i.htmlStyle=r?tr(s):Object.values(s).join(";"),i}function xo(){const n=new WeakMap;function e(r){if(!n.has(r.meta)){let o=function(s){return typeof s=="number"?{...i.indexToPos(s),offset:s}:{...s,offset:i.posToIndex(s.line,s.character)}};const i=bo(r.source),l=(r.options.decorations||[]).map(s=>({...s,start:o(s.start),end:o(s.end)}));t(l),n.set(r.meta,{decorations:l,converter:i,source:r.source})}return n.get(r.meta)}function t(r){for(let i=0;io.end.offset)throw new D(`Invalid decoration range: ${JSON.stringify(o.start)} - ${JSON.stringify(o.end)}`);for(let l=i+1;l[s.start.offset,s.end.offset]);return vo(r,o)},code(r){if(!this.options.decorations?.length)return;const i=e(this),o=Array.from(r.children).filter(p=>p.type==="element"&&p.tagName==="span");if(o.length!==i.converter.lines.length)throw new D(`Number of lines in code element (${o.length}) does not match the number of lines in the source (${i.converter.lines.length}). Failed to apply decorations.`);function l(p,m,g,h){const f=o[p];let _="",E=-1,b=-1;function P(A){return A.type==="text"?A.value:A.type==="element"?A.children.map(P).join(""):""}if(m===0&&(E=0),g===0&&(b=0),g===Number.POSITIVE_INFINITY&&(b=f.children.length),E===-1||b===-1)for(let A=0;A_);return p.tagName=m.tagName||"span",p.properties={...p.properties,...h,class:p.properties.class},m.properties?.class&&Zn(p,m.properties.class),p=f(p,g)||p,p}const c=[],d=i.decorations.sort((p,m)=>m.start.offset-p.start.offset);for(const p of d){const{start:m,end:g}=p;if(m.line===g.line)l(m.line,m.character,g.character,p);else if(m.lines(h,p));l(g.line,0,g.character,p)}}c.forEach(p=>p())}}}const Mo=[xo()];function Me(n){return[...n.transformers||[],...Mo]}function Ve(n,e,t,r={meta:{},options:t,codeToHast:(i,o)=>Ve(n,i,o),codeToTokens:(i,o)=>xe(n,i,o)}){let i=e;for(const m of Me(t))i=m.preprocess?.call(r,i,t)||i;let{tokens:o,fg:l,bg:s,themeName:a,rootStyle:c}=xe(n,i,t);const{mergeWhitespaces:d=!0}=t;d===!0?o=Bo(o):d==="never"&&(o=jo(o));const p={...r,get source(){return i}};for(const m of Me(t))o=m.tokens?.call(p,o)||o;return Vo(o,{...t,fg:l,bg:s,themeName:a,rootStyle:c},p)}function Vo(n,e,t){const r=Me(e),i=[],o={type:"root",children:[]},{structure:l="classic"}=e;let s={type:"element",tagName:"pre",properties:{class:`shiki ${e.themeName||""}`,style:e.rootStyle||`background-color:${e.bg};color:${e.fg}`,tabindex:"0",...Object.fromEntries(Array.from(Object.entries(e.meta||{})).filter(([m])=>!m.startsWith("_")))},children:[]},a={type:"element",tagName:"code",properties:{},children:i};const c=[],d={...t,structure:l,addClassToHast:Zn,get source(){return t.source},get tokens(){return n},get options(){return e},get root(){return o},get pre(){return s},get code(){return a},get lines(){return c}};if(n.forEach((m,g)=>{g&&(l==="inline"?o.children.push({type:"element",tagName:"br",properties:{},children:[]}):l==="classic"&&i.push({type:"text",value:` +`}));let h={type:"element",tagName:"span",properties:{class:"line"},children:[]},f=0;for(const _ of m){let E={type:"element",tagName:"span",properties:{},children:[{type:"text",value:_.content}]};const b=_.htmlStyle||tr(er(_));b&&(E.properties.style=b);for(const P of r)E=P?.span?.call(d,E,g+1,f,h)||E;l==="inline"?o.children.push(E):l==="classic"&&h.children.push(E),f+=_.content.length}if(l==="classic"){for(const _ of r)h=_?.line?.call(d,h,g+1)||h;c.push(h),i.push(h)}}),l==="classic"){for(const m of r)a=m?.code?.call(d,a)||a;s.children.push(a);for(const m of r)s=m?.pre?.call(d,s)||s;o.children.push(s)}let p=o;for(const m of r)p=m?.root?.call(d,p)||p;return p}function Bo(n){return n.map(e=>{const t=[];let r="",i=0;return e.forEach((o,l)=>{const a=!(o.fontStyle&&o.fontStyle&U.Underline);a&&o.content.match(/^\s+$/)&&e[l+1]?(i||(i=o.offset),r+=o.content):r?(a?t.push({...o,offset:i,content:r+o.content}):t.push({content:r,offset:i},o),i=0,r=""):t.push(o)}),t})}function jo(n){return n.map(e=>e.flatMap(t=>{if(t.content.match(/^\s+$/))return t;const r=t.content.match(/^(\s*)(.*?)(\s*)$/);if(!r)return t;const[,i,o,l]=r;if(!i&&!l)return t;const s=[{...t,offset:t.offset+i.length,content:o}];return i&&s.unshift({content:i,offset:t.offset}),l&&s.push({content:l,offset:t.offset+i.length+o.length}),s}))}const Go=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class ge{constructor(e,t,r){this.property=e,this.normal=t,r&&(this.space=r)}}ge.prototype.property={};ge.prototype.normal={};ge.prototype.space=null;function rr(n,e){const t={},r={};let i=-1;for(;++i4&&t.slice(0,4)==="data"&&zo.test(e)){if(e.charAt(4)==="-"){const o=e.slice(5).replace(sn,Xo);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=e.slice(4);if(!sn.test(o)){let l=o.replace(Wo,Ko);l.charAt(0)!=="-"&&(l="-"+l),e="data"+l}}i=St}return new i(r,e)}function Ko(n){return"-"+n.toLowerCase()}function Xo(n){return n.charAt(1).toUpperCase()}const Yo=rr([ar,or,cr,ur,Ho],"html"),dr=rr([ar,or,cr,ur,$o],"svg"),ln={}.hasOwnProperty;function Jo(n,e){const t=e||{};function r(i,...o){let l=r.invalid;const s=r.handlers;if(i&&ln.call(i,n)){const a=String(i[n]);l=ln.call(s,a)?s[a]:r.unknown}if(l)return l.call(this,i,...o)}return r.handlers=t.handlers||{},r.invalid=t.invalid,r.unknown=t.unknown,r}function Qo(n,e){if(n=n.replace(e.subset?Zo(e.subset):/["&'<>`]/g,r),e.subset||e.escapeOnly)return n;return n.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,t).replace(/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,r);function t(i,o,l){return e.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,l.charCodeAt(o+2),e)}function r(i,o,l){return e.format(i.charCodeAt(0),l.charCodeAt(o+1),e)}}function Zo(n){const e=[];let t=-1;for(;++t",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},ra=["cent","copy","divide","gt","lt","not","para","times"],pr={}.hasOwnProperty,dt={};let Re;for(Re in tt)pr.call(tt,Re)&&(dt[tt[Re]]=Re);function ia(n,e,t,r){const i=String.fromCharCode(n);if(pr.call(dt,i)){const o=dt[i],l="&"+o;return t&&na.includes(o)&&!ra.includes(o)&&(!r||e&&e!==61&&/[^\da-z]/i.test(String.fromCharCode(e)))?l:l+";"}return""}function oa(n,e,t){let r=ea(n,e,t.omitOptionalSemicolons),i;if((t.useNamedReferences||t.useShortestReferences)&&(i=ia(n,e,t.omitOptionalSemicolons,t.attribute)),(t.useShortestReferences||!i)&&t.useShortestReferences){const o=ta(n,e,t.omitOptionalSemicolons);o.length|^->||--!>|"],la=["<",">"];function ca(n,e,t,r){return r.settings.bogusComments?"":"";function i(o){return re(o,Object.assign({},r.settings.characterReferences,{subset:la}))}}function ua(n,e,t,r){return""}function cn(n,e){const t=String(n);if(typeof e!="string")throw new TypeError("Expected character");let r=0,i=t.indexOf(e);for(;i!==-1;)r++,i=t.indexOf(e,i+e.length);return r}function da(n,e){const t=e||{};return(n[n.length-1]===""?[...n,""]:n).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}function pa(n){return n.join(" ").trim()}const ha=/[ \t\n\f\r]/g;function Lt(n){return typeof n=="object"?n.type==="text"?un(n.value):!1:un(n)}function un(n){return n.replace(ha,"")===""}const C=mr(1),hr=mr(-1),ma=[];function mr(n){return e;function e(t,r,i){const o=t?t.children:ma;let l=(r||0)+n,s=o[l];if(!i)for(;s&&Lt(s);)l+=n,s=o[l];return s}}const fa={}.hasOwnProperty;function fr(n){return e;function e(t,r,i){return fa.call(n,t.tagName)&&n[t.tagName](t,r,i)}}const Ot=fr({body:ga,caption:nt,colgroup:nt,dd:ba,dt:va,head:nt,html:_a,li:Ea,optgroup:Ta,option:Aa,p:ya,rp:dn,rt:dn,tbody:Pa,td:pn,tfoot:Sa,th:pn,thead:Ra,tr:La});function nt(n,e,t){const r=C(t,e,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&Lt(r.value.charAt(0)))}function _a(n,e,t){const r=C(t,e);return!r||r.type!=="comment"}function ga(n,e,t){const r=C(t,e);return!r||r.type!=="comment"}function ya(n,e,t){const r=C(t,e);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!t||!(t.type==="element"&&(t.tagName==="a"||t.tagName==="audio"||t.tagName==="del"||t.tagName==="ins"||t.tagName==="map"||t.tagName==="noscript"||t.tagName==="video"))}function Ea(n,e,t){const r=C(t,e);return!r||r.type==="element"&&r.tagName==="li"}function va(n,e,t){const r=C(t,e);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function ba(n,e,t){const r=C(t,e);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function dn(n,e,t){const r=C(t,e);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function Ta(n,e,t){const r=C(t,e);return!r||r.type==="element"&&r.tagName==="optgroup"}function Aa(n,e,t){const r=C(t,e);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function Ra(n,e,t){const r=C(t,e);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function Pa(n,e,t){const r=C(t,e);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function Sa(n,e,t){return!C(t,e)}function La(n,e,t){const r=C(t,e);return!r||r.type==="element"&&r.tagName==="tr"}function pn(n,e,t){const r=C(t,e);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const Oa=fr({body:Ia,colgroup:ka,head:wa,html:Ca,tbody:Da});function Ca(n){const e=C(n,-1);return!e||e.type!=="comment"}function wa(n){const e=n.children,t=[];let r=-1;for(;++r0}function Ia(n){const e=C(n,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&Lt(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function ka(n,e,t){const r=hr(t,e),i=C(n,-1,!0);return t&&r&&r.type==="element"&&r.tagName==="colgroup"&&Ot(r,t.children.indexOf(r),t)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function Da(n,e,t){const r=hr(t,e),i=C(n,-1);return t&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&Ot(r,t.children.indexOf(r),t)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const Pe={name:[[` +\f\r &/=>`.split(""),` +\f\r "&'/=>\``.split("")],[`\0 +\f\r "&'/<=>`.split(""),`\0 +\f\r "&'/<=>\``.split("")]],unquoted:[[` +\f\r &>`.split(""),`\0 +\f\r "&'<=>\``.split("")],[`\0 +\f\r "&'<=>\``.split(""),`\0 +\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function Na(n,e,t,r){const i=r.schema,o=i.space==="svg"?!1:r.settings.omitOptionalTags;let l=i.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(n.tagName.toLowerCase());const s=[];let a;i.space==="html"&&n.tagName==="svg"&&(r.schema=dr);const c=xa(r,n.properties),d=r.all(i.space==="html"&&n.tagName==="template"?n.content:n);return r.schema=i,d&&(l=!1),(c||!o||!Oa(n,e,t))&&(s.push("<",n.tagName,c?" "+c:""),l&&(i.space==="svg"||r.settings.closeSelfClosing)&&(a=c.charAt(c.length-1),(!r.settings.tightSelfClosing||a==="/"||a&&a!=='"'&&a!=="'")&&s.push(" "),s.push("/")),s.push(">")),s.push(d),!l&&(!o||!Ot(n,e,t))&&s.push(""),s.join("")}function xa(n,e){const t=[];let r=-1,i;if(e){for(i in e)if(e[i]!==null&&e[i]!==void 0){const o=Ma(n,i,e[i]);o&&t.push(o)}}for(;++rcn(t,n.alternative)&&(l=n.alternative),s=l+re(t,Object.assign({},n.settings.characterReferences,{subset:(l==="'"?Pe.single:Pe.double)[i][o],attribute:!0}))+l),a+(s&&"="+s))}const Va=["<","&"];function _r(n,e,t,r){return t&&t.type==="element"&&(t.tagName==="script"||t.tagName==="style")?n.value:re(n.value,Object.assign({},r.settings.characterReferences,{subset:Va}))}function Ba(n,e,t,r){return r.settings.allowDangerousHtml?n.value:_r(n,e,t,r)}function ja(n,e,t,r){return r.all(n)}const Ga=Jo("type",{invalid:Fa,unknown:Ua,handlers:{comment:ca,doctype:ua,element:Na,raw:Ba,root:ja,text:_r}});function Fa(n){throw new Error("Expected node, not `"+n+"`")}function Ua(n){const e=n;throw new Error("Cannot compile unknown node `"+e.type+"`")}const Ha={},$a={},za=[];function Wa(n,e){const t=e||Ha,r=t.quote||'"',i=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:qa,all:Ka,settings:{omitOptionalTags:t.omitOptionalTags||!1,allowParseErrors:t.allowParseErrors||!1,allowDangerousCharacters:t.allowDangerousCharacters||!1,quoteSmart:t.quoteSmart||!1,preferUnquoted:t.preferUnquoted||!1,tightAttributes:t.tightAttributes||!1,upperDoctype:t.upperDoctype||!1,tightDoctype:t.tightDoctype||!1,bogusComments:t.bogusComments||!1,tightCommaSeparatedLists:t.tightCommaSeparatedLists||!1,tightSelfClosing:t.tightSelfClosing||!1,collapseEmptyAttributes:t.collapseEmptyAttributes||!1,allowDangerousHtml:t.allowDangerousHtml||!1,voids:t.voids||Go,characterReferences:t.characterReferences||$a,closeSelfClosing:t.closeSelfClosing||!1,closeEmptyElements:t.closeEmptyElements||!1},schema:t.space==="svg"?dr:Yo,quote:r,alternative:i}.one(Array.isArray(n)?{type:"root",children:n}:n,void 0,void 0)}function qa(n,e,t){return Ga(n,e,t,this)}function Ka(n){const e=[],t=n&&n.children||za;let r=-1;for(;++rVe(n,o,l),codeToTokens:(o,l)=>xe(n,o,l)};let i=Wa(Ve(n,e,t,r));for(const o of Me(t))i=o.postprocess?.call(r,i,t)||i;return i}async function Ya(n){let e,t;const r={};function i(m){t=m,r.HEAPU8=new Uint8Array(m),r.HEAPU32=new Uint32Array(m)}function o(){return typeof performance<"u"?performance.now():Date.now()}function l(m,g,h){r.HEAPU8.copyWithin(m,g,g+h)}function s(){return 2147483648}function a(m){try{return e.grow(m-t.byteLength+65535>>>16),i(e.buffer),1}catch{}}function c(m){const g=r.HEAPU8.length;m=m>>>0;const h=s();if(m>h)return!1;const f=(_,E)=>_+(E-_%E)%E;for(let _=1;_<=4;_*=2){let E=g*(1+.2/_);E=Math.min(E,m+100663296);const b=Math.min(h,f(Math.max(m,E),65536));if(a(b))return!0}return!1}const d={emscripten_get_now:o,emscripten_memcpy_big:l,emscripten_resize_heap:c,fd_write:()=>0};async function p(){const g=await n({env:d,wasi_snapshot_preview1:d});e=g.memory,i(e.buffer),Object.assign(r,g)}return await p(),r}let I=null,Ja=!1;function Qa(n){throw new D(n.UTF8ToString(n.getLastOnigError()))}class We{static _utf8ByteLength(e){let t=0;for(let r=0,i=e.length;r=55296&&o<=56319&&r+1=56320&&a<=57343&&(l=(o-55296<<10)+65536|a-56320,s=!0)}l<=127?t+=1:l<=2047?t+=2:l<=65535?t+=3:t+=4,s&&r++}return t}utf16Length;utf8Length;utf16Value;utf8Value;utf16OffsetToUtf8;utf8OffsetToUtf16;constructor(e){const t=e.length,r=We._utf8ByteLength(e),i=r!==t,o=i?new Uint32Array(t+1):null;i&&(o[t]=r);const l=i?new Uint32Array(r+1):null;i&&(l[r]=t);const s=new Uint8Array(r);let a=0;for(let c=0;c=55296&&d<=56319&&c+1=56320&&g<=57343&&(p=(d-55296<<10)+65536|g-56320,m=!0)}i&&(o[c]=a,m&&(o[c+1]=a),p<=127?l[a+0]=c:p<=2047?(l[a+0]=c,l[a+1]=c):p<=65535?(l[a+0]=c,l[a+1]=c,l[a+2]=c):(l[a+0]=c,l[a+1]=c,l[a+2]=c,l[a+3]=c)),p<=127?s[a++]=p:p<=2047?(s[a++]=192|(p&1984)>>>6,s[a++]=128|(p&63)>>>0):p<=65535?(s[a++]=224|(p&61440)>>>12,s[a++]=128|(p&4032)>>>6,s[a++]=128|(p&63)>>>0):(s[a++]=240|(p&1835008)>>>18,s[a++]=128|(p&258048)>>>12,s[a++]=128|(p&4032)>>>6,s[a++]=128|(p&63)>>>0),m&&c++}this.utf16Length=t,this.utf8Length=r,this.utf16Value=e,this.utf8Value=s,this.utf16OffsetToUtf8=o,this.utf8OffsetToUtf16=l}createString(e){const t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}}class j{static LAST_ID=0;static _sharedPtr=0;static _sharedPtrInUse=!1;id=++j.LAST_ID;_onigBinding;content;utf16Length;utf8Length;utf16OffsetToUtf8;utf8OffsetToUtf16;ptr;constructor(e){if(!I)throw new D("Must invoke loadWasm first.");this._onigBinding=I,this.content=e;const t=new We(e);this.utf16Length=t.utf16Length,this.utf8Length=t.utf8Length,this.utf16OffsetToUtf8=t.utf16OffsetToUtf8,this.utf8OffsetToUtf16=t.utf8OffsetToUtf16,this.utf8Length<1e4&&!j._sharedPtrInUse?(j._sharedPtr||(j._sharedPtr=I.omalloc(1e4)),j._sharedPtrInUse=!0,I.HEAPU8.set(t.utf8Value,j._sharedPtr),this.ptr=j._sharedPtr):this.ptr=t.createString(I)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===j._sharedPtr?j._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}}class Za{_onigBinding;_ptr;constructor(e){if(!I)throw new D("Must invoke loadWasm first.");const t=[],r=[];for(let s=0,a=e.length;s{let r=n;return r=await r,typeof r=="function"&&(r=await r(t)),typeof r=="function"&&(r=await r(t)),es(r)?r=await r.instantiator(t):ts(r)?r=await r.default(t):(ns(r)&&(r=r.data),rs(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await as(r)(t):r=await ss(r)(t):is(r)?r=await rt(r)(t):r instanceof WebAssembly.Module?r=await rt(r)(t):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await rt(r.default)(t))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return Se=e(),Se}function rt(n){return e=>WebAssembly.instantiate(n,e)}function as(n){return e=>WebAssembly.instantiateStreaming(n,e)}function ss(n){return async e=>{const t=await n.arrayBuffer();return WebAssembly.instantiate(t,e)}}function ls(n){return new j(n)}function cs(n){return new Za(n)}const hn={light:"#333333",dark:"#bbbbbb"},mn={light:"#fffffe",dark:"#1e1e1e"},fn="__shiki_resolved";function gr(n){if(n?.[fn])return n;const e={...n};e.tokenColors&&!e.settings&&(e.settings=e.tokenColors,delete e.tokenColors),e.type||="dark",e.colorReplacements={...e.colorReplacements},e.settings||=[];let{bg:t,fg:r}=e;if(!t||!r){const s=e.settings?e.settings.find(a=>!a.name&&!a.scope):void 0;s?.settings?.foreground&&(r=s.settings.foreground),s?.settings?.background&&(t=s.settings.background),!r&&e?.colors?.["editor.foreground"]&&(r=e.colors["editor.foreground"]),!t&&e?.colors?.["editor.background"]&&(t=e.colors["editor.background"]),r||(r=e.type==="light"?hn.light:hn.dark),t||(t=e.type==="light"?mn.light:mn.dark),e.fg=r,e.bg=t}e.settings[0]&&e.settings[0].settings&&!e.settings[0].scope||e.settings.unshift({settings:{foreground:e.fg,background:e.bg}});let i=0;const o=new Map;function l(s){if(o.has(s))return o.get(s);i+=1;const a=`#${i.toString(16).padStart(8,"0").toLowerCase()}`;return e.colorReplacements?.[`#${a}`]?l(s):(o.set(s,a),a)}e.settings=e.settings.map(s=>{const a=s.settings?.foreground&&!s.settings.foreground.startsWith("#"),c=s.settings?.background&&!s.settings.background.startsWith("#");if(!a&&!c)return s;const d={...s,settings:{...s.settings}};if(a){const p=l(s.settings.foreground);e.colorReplacements[p]=s.settings.foreground,d.settings.foreground=p}if(c){const p=l(s.settings.background);e.colorReplacements[p]=s.settings.background,d.settings.background=p}return d});for(const s of Object.keys(e.colors||{}))if((s==="editor.foreground"||s==="editor.background"||s.startsWith("terminal.ansi"))&&!e.colors[s]?.startsWith("#")){const a=l(e.colors[s]);e.colorReplacements[a]=e.colors[s],e.colors[s]=a}return Object.defineProperty(e,fn,{enumerable:!1,writable:!1,value:!0}),e}class us extends go{_resolver;_themes;_langs;_alias;_resolvedThemes={};_resolvedGrammars={};_langMap={};_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(e,t,r,i={}){super(e),this._resolver=e,this._themes=t,this._langs=r,this._alias=i,t.forEach(o=>this.loadTheme(o)),r.forEach(o=>this.loadLanguage(o))}getTheme(e){return typeof e=="string"?this._resolvedThemes[e]:this.loadTheme(e)}loadTheme(e){const t=gr(e);return t.name&&(this._resolvedThemes[t.name]=t,this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=Object.keys(this._resolvedThemes)),this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=ke.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){if(this._alias[e]){const t=new Set([e]);for(;this._alias[e];){if(e=this._alias[e],t.has(e))throw new D(`Circular alias \`${Array.from(t).join(" -> ")} -> ${e}\``);t.add(e)}}return this._resolvedGrammars[e]}async loadLanguage(e){if(this.getGrammar(e.name))return;const t=new Set(Object.values(this._langMap).filter(o=>o.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);const r={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);const i=await this.loadGrammarWithConfiguration(e.scopeName,1,r);if(this._resolvedGrammars[e.name]=i,e.aliases&&e.aliases.forEach(o=>{this._alias[o]=e.name}),this._loadedLanguagesCache=null,t.size)for(const o of t)delete this._resolvedGrammars[o.name],this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(o.scopeName),this._syncRegistry?._grammars?.delete(o.scopeName),await this.loadLanguage(this._langMap[o.name])}async init(){this._themes.map(e=>this.loadTheme(e)),await this.loadLanguages(this._langs)}async loadLanguages(e){for(const i of e)this.resolveEmbeddedLanguages(i);const t=Array.from(this._langGraph.entries()),r=t.filter(([i,o])=>!o);if(r.length){const i=t.filter(([o,l])=>l&&l.embeddedLangs?.some(s=>r.map(([a])=>a).includes(s))).filter(o=>!r.includes(o));throw new D(`Missing languages ${r.map(([o])=>`\`${o}\``).join(", ")}, required by ${i.map(([o])=>`\`${o}\``).join(", ")}`)}for(const[i,o]of t)this._resolver.addLanguage(o);for(const[i,o]of t)await this.loadLanguage(o)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=Object.keys({...this._resolvedGrammars,...this._alias})),this._loadedLanguagesCache}resolveEmbeddedLanguages(e){if(this._langMap[e.name]=e,this._langGraph.set(e.name,e),e.embeddedLangs)for(const t of e.embeddedLangs)this._langGraph.set(t,this._langMap[t])}}class ds{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLibPromise;constructor(e,t){this._onigLibPromise=e,t.forEach(r=>this.addLanguage(r))}get onigLib(){return this._onigLibPromise}getLangRegistration(e){return this._langs.get(e)}async loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){const t=e.split(".");let r=[];for(let i=1;i<=t.length;i++){const o=t.slice(0,i).join(".");r=[...r,...this._injections.get(o)||[]]}return r}}let ps;async function hs(n={}){async function e(_){return Promise.resolve(typeof _=="function"?_():_).then(E=>E.default||E)}async function t(_){return Array.from(new Set((await Promise.all(_.filter(E=>!Yn(E)).map(async E=>await e(E).then(b=>Array.isArray(b)?b:[b])))).flat()))}const r=n.loadWasm||ps,[i,o]=await Promise.all([Promise.all((n.themes||[]).map(e)).then(_=>_.map(gr)),t(n.langs||[]),r?os(r):void 0]),l=new ds(Promise.resolve({createOnigScanner(_){return cs(_)},createOnigString(_){return ls(_)}}),o),s=new us(l,i,o,n.langAlias);await s.init();let a;function c(_){const E=s.getGrammar(typeof _=="string"?_:_.name);if(!E)throw new D(`Language \`${_}\` not found, you may need to load it first`);return E}function d(_){if(_==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};const E=s.getTheme(_);if(!E)throw new D(`Theme \`${_}\` not found, you may need to load it first`);return E}function p(_){const E=d(_);a!==_&&(s.setTheme(E),a=_);const b=s.getColorMap();return{theme:E,colorMap:b}}function m(){return s.getLoadedThemes()}function g(){return s.getLoadedLanguages()}async function h(..._){await s.loadLanguages(await t(_))}async function f(..._){await Promise.all(_.map(async E=>Qn(E)?null:s.loadTheme(await e(E))))}return{setTheme:p,getTheme:d,getLanguage:c,getLoadedThemes:m,getLoadedLanguages:g,loadLanguage:h,loadTheme:f}}async function ms(n={}){const e=await hs(n);return{codeToTokensBase:(t,r)=>Pt(e,t,r),codeToTokensWithThemes:(t,r)=>nr(e,t,r),codeToTokens:(t,r)=>xe(e,t,r),codeToHast:(t,r)=>Ve(e,t,r),codeToHtml:(t,r)=>Xa(e,t,r),...e,getInternalContext:()=>e}}function fs(n,e,t){async function r(i){function o(d){if(typeof d=="string"){if(Yn(d))return[];const p=n[d];if(!p)throw new D(`Language \`${d}\` is not included in this bundle. You may want to load it from external source.`);return p}return d}function l(d){if(Qn(d))return"none";if(typeof d=="string"){const p=e[d];if(!p)throw new D(`Theme \`${d}\` is not included in this bundle. You may want to load it from external source.`);return p}return d}const s=(i.themes??[]).map(d=>l(d)),a=(i.langs??[]).map(d=>o(d)),c=await ms({...i,themes:s,langs:a,loadWasm:t});return{...c,loadLanguage(...d){return c.loadLanguage(...d.map(o))},loadTheme(...d){return c.loadTheme(...d.map(l))}}}return r}const _s=fs(wi,Di,Ii),gs=async n=>{const e=await _s({theme:"nord"});return await e.loadTheme("nord"),await e.loadLanguage("html"),e.codeToHtml(n,{lang:"html",theme:"nord",lineOptions:[{lineNumber:!0},{wrap:!0}]})},Ts=({htmlCode:n})=>{const[e,t]=ce.useState("preview"),[r,i]=ce.useState("");ce.useEffect(()=>{(async()=>{const s=await gs(n);i(s)})()},[n]);const o=()=>{navigator.clipboard.writeText(n)};return $.jsxs("div",{className:"border border-gray-200 rounded overflow-hidden",children:[$.jsxs("div",{className:"flex border-b border-gray-200",children:[$.jsx(ye.button,{className:kt("py-2 text-center cursor-pointer",Dt({"bg-[var(--sl-color-black)] border-b-2 border-blue-500 font-bold":e==="preview","opacity-50":e!=="preview"})),style:{flex:e==="preview"?2:1},onClick:()=>t("preview"),whileHover:{scale:1.05},whileTap:{scale:.95},children:"Preview"}),$.jsx(ye.button,{className:kt("py-2 text-center cursor-pointer",Dt({"bg-[var(--sl-color-black)] border-b-2 border-blue-500 font-bold":e==="code","opacity-50":e!=="code"})),style:{flex:e==="code"?2:1},onClick:()=>t("code"),whileHover:{scale:1.05},whileTap:{scale:.95},children:"Code"})]}),$.jsxs("div",{className:"p-4",children:[e==="preview"&&$.jsx(ye.div,{initial:{opacity:0},animate:{opacity:1},className:"max-w-none",children:Pi(n)}),e==="code"&&$.jsx(ye.div,{initial:{opacity:0},animate:{opacity:1},children:$.jsxs("div",{className:"relative",children:[$.jsx("button",{className:"absolute right-0 top-0 bg-cyan-600 text-white px-2 py-1 rounded",onClick:o,children:"Copy"}),$.jsx("div",{dangerouslySetInnerHTML:{__html:r}})]})})]})]})};export{Ts as default}; diff --git a/docs/_astro/ServicesBentoGrid.BPQKmQVe.js b/docs/_astro/ServicesBentoGrid.BPQKmQVe.js deleted file mode 100644 index 49430df..0000000 --- a/docs/_astro/ServicesBentoGrid.BPQKmQVe.js +++ /dev/null @@ -1 +0,0 @@ -import{r as p}from"./index.NEDEFKed.js";import{t as C,c as T,j as e,m as l}from"./bundle-mjs.B7io9OLF.js";import{g as P}from"./_commonjsHelpers.Cpj98o6Y.js";function u(...t){return C(T(t))}var k={exports:{}},O="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",R=O,W=R;function w(){}function y(){}y.resetWarningCache=w;var z=function(){function t(s,i,g,m,f,d){if(d!==W){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}t.isRequired=t;function r(){return t}var a={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:r,element:t,elementType:t,instanceOf:r,node:t,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:y,resetWarningCache:w};return a.PropTypes=a,a};k.exports=z();var E=k.exports;const o=P(E);var A={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},F=Object.defineProperty,B=Object.defineProperties,H=Object.getOwnPropertyDescriptors,h=Object.getOwnPropertySymbols,j=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable,v=(t,r,a)=>r in t?F(t,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[r]=a,b=(t,r)=>{for(var a in r||(r={}))j.call(r,a)&&v(t,a,r[a]);if(h)for(var a of h(r))N.call(r,a)&&v(t,a,r[a]);return t},D=(t,r)=>B(t,H(r)),G=(t,r)=>{var a={};for(var s in t)j.call(t,s)&&r.indexOf(s)<0&&(a[s]=t[s]);if(t!=null&&h)for(var s of h(t))r.indexOf(s)<0&&N.call(t,s)&&(a[s]=t[s]);return a},n=(t,r,a)=>{const s=p.forwardRef((i,g)=>{var m=i,{color:f="currentColor",size:d=24,stroke:c=2,children:_}=m,S=G(m,["color","size","stroke","children"]);return p.createElement("svg",b(D(b({ref:g},A),{width:d,height:d,stroke:f,strokeWidth:c,className:`tabler-icon tabler-icon-${t}`}),S),[...a.map(([M,I])=>p.createElement(M,I)),..._||[]])});return s.propTypes={color:o.string,size:o.oneOfType([o.string,o.number]),stroke:o.oneOfType([o.string,o.number])},s.displayName=`${r}`,s},L=n("box-align-right-filled","IconBoxAlignRightFilled",[["path",{d:"M18.998 3.003h-5a1 1 0 0 0 -1 1v16a1 1 0 0 0 1 1h5a2 2 0 0 0 2 -2v-14a2 2 0 0 0 -2 -2z",fill:"currentColor",key:"svg-0",strokeWidth:"0"}],["path",{d:"M9.008 19.003a1 1 0 0 1 .117 1.993l-.127 .007a1 1 0 0 1 -.117 -1.993l.127 -.007z",fill:"currentColor",key:"svg-1",strokeWidth:"0"}],["path",{d:"M4.008 19.003a1 1 0 0 1 .117 1.993l-.128 .007a1 1 0 0 1 -.117 -1.993l.128 -.007z",fill:"currentColor",key:"svg-2",strokeWidth:"0"}],["path",{d:"M4.008 14.002a1 1 0 0 1 .117 1.993l-.128 .007a1 1 0 0 1 -.117 -1.993l.128 -.007z",fill:"currentColor",key:"svg-3",strokeWidth:"0"}],["path",{d:"M4.008 8.002a1 1 0 0 1 .117 1.993l-.128 .007a1 1 0 0 1 -.117 -1.993l.128 -.007z",fill:"currentColor",key:"svg-4",strokeWidth:"0"}],["path",{d:"M4.008 3.002a1 1 0 0 1 .117 1.993l-.128 .007a1 1 0 0 1 -.117 -1.993l.128 -.007z",fill:"currentColor",key:"svg-5",strokeWidth:"0"}],["path",{d:"M9.008 3.002a1 1 0 0 1 .117 1.993l-.127 .007a1 1 0 0 1 -.117 -1.993l.127 -.007z",fill:"currentColor",key:"svg-6",strokeWidth:"0"}]]),U=n("clipboard-copy","IconClipboardCopy",[["path",{d:"M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h3m9 -9v-5a2 2 0 0 0 -2 -2h-2",key:"svg-0"}],["path",{d:"M13 17v-1a1 1 0 0 1 1 -1h1m3 0h1a1 1 0 0 1 1 1v1m0 3v1a1 1 0 0 1 -1 1h-1m-3 0h-1a1 1 0 0 1 -1 -1v-1",key:"svg-1"}],["path",{d:"M9 3m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v0a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z",key:"svg-2"}]]),V=n("cloud","IconCloud",[["path",{d:"M6.657 18c-2.572 0 -4.657 -2.007 -4.657 -4.483c0 -2.475 2.085 -4.482 4.657 -4.482c.393 -1.762 1.794 -3.2 3.675 -3.773c1.88 -.572 3.956 -.193 5.444 1c1.488 1.19 2.162 3.007 1.77 4.769h.99c1.913 0 3.464 1.56 3.464 3.486c0 1.927 -1.551 3.487 -3.465 3.487h-11.878",key:"svg-0"}]]),$=n("file-broken","IconFileBroken",[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M5 7v-2a2 2 0 0 1 2 -2h7l5 5v2",key:"svg-1"}],["path",{d:"M19 19a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2",key:"svg-2"}],["path",{d:"M5 16h.01",key:"svg-3"}],["path",{d:"M5 13h.01",key:"svg-4"}],["path",{d:"M5 10h.01",key:"svg-5"}],["path",{d:"M19 13h.01",key:"svg-6"}],["path",{d:"M19 16h.01",key:"svg-7"}]]),q=n("moon","IconMoon",[["path",{d:"M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z",key:"svg-0"}]]),J=n("signature","IconSignature",[["path",{d:"M3 17c3.333 -3.333 5 -6 5 -8c0 -3 -1 -3 -2 -3s-2.032 1.085 -2 3c.034 2.048 1.658 4.877 2.5 6c1.5 2 2.5 2.5 3.5 1l2 -3c.333 2.667 1.333 4 3 4c.53 0 2.639 -2 3 -2c.517 0 1.517 .667 3 2",key:"svg-0"}]]),Y=n("sun","IconSun",[["path",{d:"M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7",key:"svg-1"}]]),K=n("table-column","IconTableColumn",[["path",{d:"M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z",key:"svg-0"}],["path",{d:"M10 10h11",key:"svg-1"}],["path",{d:"M10 3v18",key:"svg-2"}],["path",{d:"M9 3l-6 6",key:"svg-3"}],["path",{d:"M10 7l-7 7",key:"svg-4"}],["path",{d:"M10 12l-7 7",key:"svg-5"}],["path",{d:"M10 17l-4 4",key:"svg-6"}]]);function de(){return e.jsx(ae,{className:"max-w-6xl mx-auto md:auto-rows-[20rem]",children:re.map((t,r)=>e.jsx(le,{item:t,className:u(r===3||r===6?"md:col-span-2":"","[&>p:text-lg]",t.className)},r))})}const x=()=>e.jsx("div",{className:"flex flex-1 w-full h-full min-h-[6rem] rounded-xl bg-gradient-to-br from-neutral-200 dark:from-neutral-900 dark:to-neutral-800 to-neutral-100"}),Q=()=>{const t={initial:{x:0},animate:{x:10,rotate:5,transition:{duration:.2}}},r={initial:{x:0},animate:{x:-10,rotate:-5,transition:{duration:.2}}};return e.jsxs(l.div,{initial:"initial",whileHover:"animate",className:"flex flex-1 w-full h-full min-h-[6rem] dark:bg-dot-white/[0.2] bg-dot-black/[0.2] flex-col space-y-2",children:[e.jsxs(l.div,{variants:t,className:"flex flex-row rounded-full border border-neutral-100 dark:border-white/[0.2] p-2 items-center space-x-2 bg-white dark:bg-black",children:[e.jsx("div",{className:"h-6 w-6 rounded-full bg-gradient-to-r from-pink-500 to-violet-500 flex-shrink-0"}),e.jsx("div",{className:"w-full bg-gray-100 h-4 rounded-full dark:bg-neutral-900"})]}),e.jsxs(l.div,{variants:r,className:"flex flex-row rounded-full border border-neutral-100 dark:border-white/[0.2] p-2 items-center space-x-2 w-3/4 ml-auto bg-white dark:bg-black",children:[e.jsx("div",{className:"w-full bg-gray-100 h-4 rounded-full dark:bg-neutral-900"}),e.jsx("div",{className:"h-6 w-6 rounded-full bg-gradient-to-r from-pink-500 to-violet-500 flex-shrink-0"})]}),e.jsxs(l.div,{variants:t,className:"flex flex-row rounded-full border border-neutral-100 dark:border-white/[0.2] p-2 items-center space-x-2 bg-white dark:bg-black",children:[e.jsx("div",{className:"h-6 w-6 rounded-full bg-gradient-to-r from-pink-500 to-violet-500 flex-shrink-0"}),e.jsx("div",{className:"w-full bg-gray-100 h-4 rounded-full dark:bg-neutral-900"})]})]})},X=()=>{const t={initial:{width:0},animate:{width:"100%",transition:{duration:.2}},hover:{width:["0%","100%"],transition:{duration:2}}},r=new Array(6).fill(0);return e.jsx(l.div,{initial:"initial",animate:"animate",whileHover:"hover",className:"flex flex-1 w-full h-full min-h-[6rem] dark:bg-dot-white/[0.2] bg-dot-black/[0.2] flex-col space-y-2",children:r.map((a,s)=>e.jsx(l.div,{variants:t,style:{maxWidth:Math.random()*60+40+"%"},className:"flex flex-row rounded-full border border-neutral-100 dark:border-white/[0.2] p-2 items-center space-x-2 bg-neutral-100 dark:bg-black w-full h-4"},"skeleton-two"+s))})},Z=()=>{const t={initial:{backgroundPosition:"0 50%"},animate:{backgroundPosition:["0, 50%","100% 50%","0 50%"]}};return e.jsx(l.div,{initial:"initial",animate:"animate",variants:t,transition:{duration:5,repeat:1/0,repeatType:"reverse"},className:"flex flex-1 w-full h-full min-h-[6rem] dark:bg-dot-white/[0.2] rounded-lg bg-dot-black/[0.2] flex-col space-y-2",style:{background:"linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab)",backgroundSize:"400% 400%"},children:e.jsx(l.div,{className:"h-full w-full rounded-lg"})})},ee=()=>{const t={initial:{x:20,rotate:-5},hover:{x:0,rotate:0}},r={initial:{x:-20,rotate:5},hover:{x:0,rotate:0}};return e.jsxs(l.div,{initial:"initial",animate:"animate",whileHover:"hover",className:"flex flex-1 w-full h-full min-h-[6rem] dark:bg-dot-white/[0.2] bg-dot-black/[0.2] flex-row space-x-2",children:[e.jsxs(l.div,{variants:t,className:"h-full w-1/3 rounded-2xl bg-white p-4 dark:bg-black dark:border-white/[0.1] border border-neutral-200 flex flex-col items-center justify-center",children:[e.jsx("img",{src:"https://pbs.twimg.com/profile_images/1417752099488636931/cs2R59eW_400x400.jpg",alt:"avatar",height:"100",width:"100",className:"rounded-full h-10 w-10"}),e.jsx("p",{className:"sm:text-sm text-xs text-center font-semibold text-neutral-500 mt-4",children:"Just code in Vanilla Javascript"}),e.jsx("p",{className:"border border-red-500 bg-red-100 dark:bg-red-900/20 text-red-600 text-xs rounded-full px-2 py-0.5 mt-4",children:"Delusional"})]}),e.jsxs(l.div,{className:"h-full relative z-20 w-1/3 rounded-2xl bg-white p-4 dark:bg-black dark:border-white/[0.1] border border-neutral-200 flex flex-col items-center justify-center",children:[e.jsx("img",{src:"https://pbs.twimg.com/profile_images/1417752099488636931/cs2R59eW_400x400.jpg",alt:"avatar",height:"100",width:"100",className:"rounded-full h-10 w-10"}),e.jsx("p",{className:"sm:text-sm text-xs text-center font-semibold text-neutral-500 mt-4",children:"Tailwind CSS is cool, you know"}),e.jsx("p",{className:"border border-green-500 bg-green-100 dark:bg-green-900/20 text-green-600 text-xs rounded-full px-2 py-0.5 mt-4",children:"Sensible"})]}),e.jsxs(l.div,{variants:r,className:"h-full w-1/3 rounded-2xl bg-white p-4 dark:bg-black dark:border-white/[0.1] border border-neutral-200 flex flex-col items-center justify-center",children:[e.jsx("img",{src:"https://pbs.twimg.com/profile_images/1417752099488636931/cs2R59eW_400x400.jpg",alt:"avatar",height:"100",width:"100",className:"rounded-full h-10 w-10"}),e.jsx("p",{className:"sm:text-sm text-xs text-center font-semibold text-neutral-500 mt-4",children:"I love angular, RSC, and Redux."}),e.jsx("p",{className:"border border-orange-500 bg-orange-100 dark:bg-orange-900/20 text-orange-600 text-xs rounded-full px-2 py-0.5 mt-4",children:"Helpless"})]})]})},te=()=>{const t={initial:{x:0},animate:{x:10,rotate:5,transition:{duration:.2}}},r={initial:{x:0},animate:{x:-10,rotate:-5,transition:{duration:.2}}};return e.jsxs(l.div,{initial:"initial",whileHover:"animate",className:"flex flex-1 w-full h-full min-h-[6rem] dark:bg-dot-white/[0.2] bg-dot-black/[0.2] flex-col space-y-2",children:[e.jsxs(l.div,{variants:t,className:"flex flex-row rounded-2xl border border-neutral-100 dark:border-white/[0.2] p-2 items-start space-x-2 bg-white dark:bg-black",children:[e.jsx("img",{src:"https://pbs.twimg.com/profile_images/1417752099488636931/cs2R59eW_400x400.jpg",alt:"avatar",height:"100",width:"100",className:"rounded-full h-10 w-10"}),e.jsx("p",{className:"text-xs text-neutral-500",children:"There are a lot of cool frameworks out there like React, Angular, Vue, Svelte that can make your life ...."})]}),e.jsxs(l.div,{variants:r,className:"flex flex-row rounded-full border border-neutral-100 dark:border-white/[0.2] p-2 items-center justify-end space-x-2 w-3/4 ml-auto bg-white dark:bg-black",children:[e.jsx("p",{className:"text-xs text-neutral-500",children:"Use PHP."}),e.jsx("div",{className:"h-6 w-6 rounded-full bg-gradient-to-r from-pink-500 to-violet-500 flex-shrink-0"})]})]})},re=[{title:"AI Content Generation",description:e.jsx("span",{className:"text-sm",children:"Experience the power of AI in generating unique content."}),header:e.jsx(Q,{}),className:"md:col-span-1",icon:e.jsx(U,{className:"h-4 w-4 text-neutral-500"})},{title:"Automated Proofreading",description:e.jsx("span",{className:"text-sm",children:"Let AI handle the proofreading of your documents."}),header:e.jsx(X,{}),className:"md:col-span-1",icon:e.jsx($,{className:"h-4 w-4 text-neutral-500"})},{title:"Contextual Suggestions",description:e.jsx("span",{className:"text-sm",children:"Get AI-powered suggestions based on your writing context."}),header:e.jsx(Z,{}),className:"md:col-span-1",icon:e.jsx(J,{className:"h-4 w-4 text-neutral-500"})},{title:"Sentiment Analysis",description:e.jsx("span",{className:"text-sm",children:"Understand the sentiment of your text with AI analysis."}),header:e.jsx(ee,{}),className:"md:col-span-2",icon:e.jsx(K,{className:"h-4 w-4 text-neutral-500"})},{title:"Text Summarization",description:e.jsx("span",{className:"text-sm",children:"Summarize your lengthy documents with AI technology."}),header:e.jsx(te,{}),className:"md:col-span-1",icon:e.jsx(L,{className:"h-4 w-4 text-neutral-500"})},{title:"Cloud Computing",description:e.jsx("span",{className:"text-sm",children:"Leverage the power of cloud computing for scalable solutions."}),header:e.jsx(x,{}),className:"md:col-span-1",icon:e.jsx(V,{className:"h-4 w-4 text-neutral-500"})},{title:"Solar Energy",description:e.jsx("span",{className:"text-sm",children:"Harness solar energy for a sustainable future."}),header:e.jsx(x,{}),className:"md:col-span-1",icon:e.jsx(Y,{className:"h-4 w-4 text-neutral-500"})},{title:"Night Mode",description:e.jsx("span",{className:"text-sm",children:"Switch to night mode for a better viewing experience in low light."}),header:e.jsx(x,{}),className:"md:col-span-1",icon:e.jsx(q,{className:"h-4 w-4 text-neutral-500"})}],ae=({className:t,children:r})=>e.jsx("div",{className:u("grid md:auto-rows-[18rem] grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4 max-w-7xl mx-auto",t),children:r}),se=({className:t,title:r,description:a,header:s,icon:i})=>e.jsxs("div",{className:u("row-span-1 rounded-xl group/bento hover:shadow-xl transition duration-200 shadow-input dark:shadow-none p-4 dark:bg-black dark:border-white/[0.2] bg-white border border-transparent justify-between flex flex-col space-y-4",t),children:[s,e.jsxs("div",{className:"group-hover/bento:translate-x-2 transition duration-200",children:[i,e.jsx("div",{className:"font-sans font-bold text-neutral-600 dark:text-neutral-200 mb-2 mt-2",children:r}),e.jsx("div",{className:"font-sans font-normal text-neutral-600 text-xs dark:text-neutral-300",children:a})]})]}),le=({item:t,className:r})=>e.jsx(se,{className:r,title:t.title,description:t.description,header:t.header,icon:t.icon});export{de as ServicesBentoGrid}; diff --git a/docs/_astro/ServicesBentoGrid.BbwVVFny.js b/docs/_astro/ServicesBentoGrid.BbwVVFny.js new file mode 100644 index 0000000..e0d6250 --- /dev/null +++ b/docs/_astro/ServicesBentoGrid.BbwVVFny.js @@ -0,0 +1 @@ +import{j as e}from"./jsx-runtime.BFYNFNPI.js";import{g as C,a as p}from"./index.DIpCM_17.js";import{t as T,c as P,m as l}from"./bundle-mjs.Dg1gdp8d.js";function u(...t){return T(P(t))}var k={exports:{}},O="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",R=O,W=R;function w(){}function y(){}y.resetWarningCache=w;var z=function(){function t(s,i,g,m,f,d){if(d!==W){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}t.isRequired=t;function r(){return t}var a={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:r,element:t,elementType:t,instanceOf:r,node:t,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:y,resetWarningCache:w};return a.PropTypes=a,a};k.exports=z();var E=k.exports;const o=C(E);var A={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},F=Object.defineProperty,B=Object.defineProperties,H=Object.getOwnPropertyDescriptors,h=Object.getOwnPropertySymbols,j=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable,v=(t,r,a)=>r in t?F(t,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[r]=a,b=(t,r)=>{for(var a in r||(r={}))j.call(r,a)&&v(t,a,r[a]);if(h)for(var a of h(r))N.call(r,a)&&v(t,a,r[a]);return t},D=(t,r)=>B(t,H(r)),G=(t,r)=>{var a={};for(var s in t)j.call(t,s)&&r.indexOf(s)<0&&(a[s]=t[s]);if(t!=null&&h)for(var s of h(t))r.indexOf(s)<0&&N.call(t,s)&&(a[s]=t[s]);return a},n=(t,r,a)=>{const s=p.forwardRef((i,g)=>{var m=i,{color:f="currentColor",size:d=24,stroke:c=2,children:_}=m,S=G(m,["color","size","stroke","children"]);return p.createElement("svg",b(D(b({ref:g},A),{width:d,height:d,stroke:f,strokeWidth:c,className:`tabler-icon tabler-icon-${t}`}),S),[...a.map(([M,I])=>p.createElement(M,I)),..._||[]])});return s.propTypes={color:o.string,size:o.oneOfType([o.string,o.number]),stroke:o.oneOfType([o.string,o.number])},s.displayName=`${r}`,s},L=n("box-align-right-filled","IconBoxAlignRightFilled",[["path",{d:"M18.998 3.003h-5a1 1 0 0 0 -1 1v16a1 1 0 0 0 1 1h5a2 2 0 0 0 2 -2v-14a2 2 0 0 0 -2 -2z",fill:"currentColor",key:"svg-0",strokeWidth:"0"}],["path",{d:"M9.008 19.003a1 1 0 0 1 .117 1.993l-.127 .007a1 1 0 0 1 -.117 -1.993l.127 -.007z",fill:"currentColor",key:"svg-1",strokeWidth:"0"}],["path",{d:"M4.008 19.003a1 1 0 0 1 .117 1.993l-.128 .007a1 1 0 0 1 -.117 -1.993l.128 -.007z",fill:"currentColor",key:"svg-2",strokeWidth:"0"}],["path",{d:"M4.008 14.002a1 1 0 0 1 .117 1.993l-.128 .007a1 1 0 0 1 -.117 -1.993l.128 -.007z",fill:"currentColor",key:"svg-3",strokeWidth:"0"}],["path",{d:"M4.008 8.002a1 1 0 0 1 .117 1.993l-.128 .007a1 1 0 0 1 -.117 -1.993l.128 -.007z",fill:"currentColor",key:"svg-4",strokeWidth:"0"}],["path",{d:"M4.008 3.002a1 1 0 0 1 .117 1.993l-.128 .007a1 1 0 0 1 -.117 -1.993l.128 -.007z",fill:"currentColor",key:"svg-5",strokeWidth:"0"}],["path",{d:"M9.008 3.002a1 1 0 0 1 .117 1.993l-.127 .007a1 1 0 0 1 -.117 -1.993l.127 -.007z",fill:"currentColor",key:"svg-6",strokeWidth:"0"}]]),U=n("clipboard-copy","IconClipboardCopy",[["path",{d:"M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h3m9 -9v-5a2 2 0 0 0 -2 -2h-2",key:"svg-0"}],["path",{d:"M13 17v-1a1 1 0 0 1 1 -1h1m3 0h1a1 1 0 0 1 1 1v1m0 3v1a1 1 0 0 1 -1 1h-1m-3 0h-1a1 1 0 0 1 -1 -1v-1",key:"svg-1"}],["path",{d:"M9 3m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v0a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z",key:"svg-2"}]]),V=n("cloud","IconCloud",[["path",{d:"M6.657 18c-2.572 0 -4.657 -2.007 -4.657 -4.483c0 -2.475 2.085 -4.482 4.657 -4.482c.393 -1.762 1.794 -3.2 3.675 -3.773c1.88 -.572 3.956 -.193 5.444 1c1.488 1.19 2.162 3.007 1.77 4.769h.99c1.913 0 3.464 1.56 3.464 3.486c0 1.927 -1.551 3.487 -3.465 3.487h-11.878",key:"svg-0"}]]),$=n("file-broken","IconFileBroken",[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M5 7v-2a2 2 0 0 1 2 -2h7l5 5v2",key:"svg-1"}],["path",{d:"M19 19a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2",key:"svg-2"}],["path",{d:"M5 16h.01",key:"svg-3"}],["path",{d:"M5 13h.01",key:"svg-4"}],["path",{d:"M5 10h.01",key:"svg-5"}],["path",{d:"M19 13h.01",key:"svg-6"}],["path",{d:"M19 16h.01",key:"svg-7"}]]),q=n("moon","IconMoon",[["path",{d:"M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z",key:"svg-0"}]]),J=n("signature","IconSignature",[["path",{d:"M3 17c3.333 -3.333 5 -6 5 -8c0 -3 -1 -3 -2 -3s-2.032 1.085 -2 3c.034 2.048 1.658 4.877 2.5 6c1.5 2 2.5 2.5 3.5 1l2 -3c.333 2.667 1.333 4 3 4c.53 0 2.639 -2 3 -2c.517 0 1.517 .667 3 2",key:"svg-0"}]]),Y=n("sun","IconSun",[["path",{d:"M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7",key:"svg-1"}]]),K=n("table-column","IconTableColumn",[["path",{d:"M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z",key:"svg-0"}],["path",{d:"M10 10h11",key:"svg-1"}],["path",{d:"M10 3v18",key:"svg-2"}],["path",{d:"M9 3l-6 6",key:"svg-3"}],["path",{d:"M10 7l-7 7",key:"svg-4"}],["path",{d:"M10 12l-7 7",key:"svg-5"}],["path",{d:"M10 17l-4 4",key:"svg-6"}]]);function de(){return e.jsx(ae,{className:"max-w-6xl mx-auto md:auto-rows-[20rem]",children:re.map((t,r)=>e.jsx(le,{item:t,className:u(r===3||r===6?"md:col-span-2":"","[&>p:text-lg]",t.className)},r))})}const x=()=>e.jsx("div",{className:"flex flex-1 w-full h-full min-h-[6rem] rounded-xl bg-gradient-to-br from-neutral-200 dark:from-neutral-900 dark:to-neutral-800 to-neutral-100"}),Q=()=>{const t={initial:{x:0},animate:{x:10,rotate:5,transition:{duration:.2}}},r={initial:{x:0},animate:{x:-10,rotate:-5,transition:{duration:.2}}};return e.jsxs(l.div,{initial:"initial",whileHover:"animate",className:"flex flex-1 w-full h-full min-h-[6rem] dark:bg-dot-white/[0.2] bg-dot-black/[0.2] flex-col space-y-2",children:[e.jsxs(l.div,{variants:t,className:"flex flex-row rounded-full border border-neutral-100 dark:border-white/[0.2] p-2 items-center space-x-2 bg-white dark:bg-black",children:[e.jsx("div",{className:"h-6 w-6 rounded-full bg-gradient-to-r from-pink-500 to-violet-500 flex-shrink-0"}),e.jsx("div",{className:"w-full bg-gray-100 h-4 rounded-full dark:bg-neutral-900"})]}),e.jsxs(l.div,{variants:r,className:"flex flex-row rounded-full border border-neutral-100 dark:border-white/[0.2] p-2 items-center space-x-2 w-3/4 ml-auto bg-white dark:bg-black",children:[e.jsx("div",{className:"w-full bg-gray-100 h-4 rounded-full dark:bg-neutral-900"}),e.jsx("div",{className:"h-6 w-6 rounded-full bg-gradient-to-r from-pink-500 to-violet-500 flex-shrink-0"})]}),e.jsxs(l.div,{variants:t,className:"flex flex-row rounded-full border border-neutral-100 dark:border-white/[0.2] p-2 items-center space-x-2 bg-white dark:bg-black",children:[e.jsx("div",{className:"h-6 w-6 rounded-full bg-gradient-to-r from-pink-500 to-violet-500 flex-shrink-0"}),e.jsx("div",{className:"w-full bg-gray-100 h-4 rounded-full dark:bg-neutral-900"})]})]})},X=()=>{const t={initial:{width:0},animate:{width:"100%",transition:{duration:.2}},hover:{width:["0%","100%"],transition:{duration:2}}},r=new Array(6).fill(0);return e.jsx(l.div,{initial:"initial",animate:"animate",whileHover:"hover",className:"flex flex-1 w-full h-full min-h-[6rem] dark:bg-dot-white/[0.2] bg-dot-black/[0.2] flex-col space-y-2",children:r.map((a,s)=>e.jsx(l.div,{variants:t,style:{maxWidth:Math.random()*60+40+"%"},className:"flex flex-row rounded-full border border-neutral-100 dark:border-white/[0.2] p-2 items-center space-x-2 bg-neutral-100 dark:bg-black w-full h-4"},"skeleton-two"+s))})},Z=()=>{const t={initial:{backgroundPosition:"0 50%"},animate:{backgroundPosition:["0, 50%","100% 50%","0 50%"]}};return e.jsx(l.div,{initial:"initial",animate:"animate",variants:t,transition:{duration:5,repeat:1/0,repeatType:"reverse"},className:"flex flex-1 w-full h-full min-h-[6rem] dark:bg-dot-white/[0.2] rounded-lg bg-dot-black/[0.2] flex-col space-y-2",style:{background:"linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab)",backgroundSize:"400% 400%"},children:e.jsx(l.div,{className:"h-full w-full rounded-lg"})})},ee=()=>{const t={initial:{x:20,rotate:-5},hover:{x:0,rotate:0}},r={initial:{x:-20,rotate:5},hover:{x:0,rotate:0}};return e.jsxs(l.div,{initial:"initial",animate:"animate",whileHover:"hover",className:"flex flex-1 w-full h-full min-h-[6rem] dark:bg-dot-white/[0.2] bg-dot-black/[0.2] flex-row space-x-2",children:[e.jsxs(l.div,{variants:t,className:"h-full w-1/3 rounded-2xl bg-white p-4 dark:bg-black dark:border-white/[0.1] border border-neutral-200 flex flex-col items-center justify-center",children:[e.jsx("img",{src:"https://pbs.twimg.com/profile_images/1417752099488636931/cs2R59eW_400x400.jpg",alt:"avatar",height:"100",width:"100",className:"rounded-full h-10 w-10"}),e.jsx("p",{className:"sm:text-sm text-xs text-center font-semibold text-neutral-500 mt-4",children:"Just code in Vanilla Javascript"}),e.jsx("p",{className:"border border-red-500 bg-red-100 dark:bg-red-900/20 text-red-600 text-xs rounded-full px-2 py-0.5 mt-4",children:"Delusional"})]}),e.jsxs(l.div,{className:"h-full relative z-20 w-1/3 rounded-2xl bg-white p-4 dark:bg-black dark:border-white/[0.1] border border-neutral-200 flex flex-col items-center justify-center",children:[e.jsx("img",{src:"https://pbs.twimg.com/profile_images/1417752099488636931/cs2R59eW_400x400.jpg",alt:"avatar",height:"100",width:"100",className:"rounded-full h-10 w-10"}),e.jsx("p",{className:"sm:text-sm text-xs text-center font-semibold text-neutral-500 mt-4",children:"Tailwind CSS is cool, you know"}),e.jsx("p",{className:"border border-green-500 bg-green-100 dark:bg-green-900/20 text-green-600 text-xs rounded-full px-2 py-0.5 mt-4",children:"Sensible"})]}),e.jsxs(l.div,{variants:r,className:"h-full w-1/3 rounded-2xl bg-white p-4 dark:bg-black dark:border-white/[0.1] border border-neutral-200 flex flex-col items-center justify-center",children:[e.jsx("img",{src:"https://pbs.twimg.com/profile_images/1417752099488636931/cs2R59eW_400x400.jpg",alt:"avatar",height:"100",width:"100",className:"rounded-full h-10 w-10"}),e.jsx("p",{className:"sm:text-sm text-xs text-center font-semibold text-neutral-500 mt-4",children:"I love angular, RSC, and Redux."}),e.jsx("p",{className:"border border-orange-500 bg-orange-100 dark:bg-orange-900/20 text-orange-600 text-xs rounded-full px-2 py-0.5 mt-4",children:"Helpless"})]})]})},te=()=>{const t={initial:{x:0},animate:{x:10,rotate:5,transition:{duration:.2}}},r={initial:{x:0},animate:{x:-10,rotate:-5,transition:{duration:.2}}};return e.jsxs(l.div,{initial:"initial",whileHover:"animate",className:"flex flex-1 w-full h-full min-h-[6rem] dark:bg-dot-white/[0.2] bg-dot-black/[0.2] flex-col space-y-2",children:[e.jsxs(l.div,{variants:t,className:"flex flex-row rounded-2xl border border-neutral-100 dark:border-white/[0.2] p-2 items-start space-x-2 bg-white dark:bg-black",children:[e.jsx("img",{src:"https://pbs.twimg.com/profile_images/1417752099488636931/cs2R59eW_400x400.jpg",alt:"avatar",height:"100",width:"100",className:"rounded-full h-10 w-10"}),e.jsx("p",{className:"text-xs text-neutral-500",children:"There are a lot of cool frameworks out there like React, Angular, Vue, Svelte that can make your life ...."})]}),e.jsxs(l.div,{variants:r,className:"flex flex-row rounded-full border border-neutral-100 dark:border-white/[0.2] p-2 items-center justify-end space-x-2 w-3/4 ml-auto bg-white dark:bg-black",children:[e.jsx("p",{className:"text-xs text-neutral-500",children:"Use PHP."}),e.jsx("div",{className:"h-6 w-6 rounded-full bg-gradient-to-r from-pink-500 to-violet-500 flex-shrink-0"})]})]})},re=[{title:"AI Content Generation",description:e.jsx("span",{className:"text-sm",children:"Experience the power of AI in generating unique content."}),header:e.jsx(Q,{}),className:"md:col-span-1",icon:e.jsx(U,{className:"h-4 w-4 text-neutral-500"})},{title:"Automated Proofreading",description:e.jsx("span",{className:"text-sm",children:"Let AI handle the proofreading of your documents."}),header:e.jsx(X,{}),className:"md:col-span-1",icon:e.jsx($,{className:"h-4 w-4 text-neutral-500"})},{title:"Contextual Suggestions",description:e.jsx("span",{className:"text-sm",children:"Get AI-powered suggestions based on your writing context."}),header:e.jsx(Z,{}),className:"md:col-span-1",icon:e.jsx(J,{className:"h-4 w-4 text-neutral-500"})},{title:"Sentiment Analysis",description:e.jsx("span",{className:"text-sm",children:"Understand the sentiment of your text with AI analysis."}),header:e.jsx(ee,{}),className:"md:col-span-2",icon:e.jsx(K,{className:"h-4 w-4 text-neutral-500"})},{title:"Text Summarization",description:e.jsx("span",{className:"text-sm",children:"Summarize your lengthy documents with AI technology."}),header:e.jsx(te,{}),className:"md:col-span-1",icon:e.jsx(L,{className:"h-4 w-4 text-neutral-500"})},{title:"Cloud Computing",description:e.jsx("span",{className:"text-sm",children:"Leverage the power of cloud computing for scalable solutions."}),header:e.jsx(x,{}),className:"md:col-span-1",icon:e.jsx(V,{className:"h-4 w-4 text-neutral-500"})},{title:"Solar Energy",description:e.jsx("span",{className:"text-sm",children:"Harness solar energy for a sustainable future."}),header:e.jsx(x,{}),className:"md:col-span-1",icon:e.jsx(Y,{className:"h-4 w-4 text-neutral-500"})},{title:"Night Mode",description:e.jsx("span",{className:"text-sm",children:"Switch to night mode for a better viewing experience in low light."}),header:e.jsx(x,{}),className:"md:col-span-1",icon:e.jsx(q,{className:"h-4 w-4 text-neutral-500"})}],ae=({className:t,children:r})=>e.jsx("div",{className:u("grid md:auto-rows-[18rem] grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4 max-w-7xl mx-auto",t),children:r}),se=({className:t,title:r,description:a,header:s,icon:i})=>e.jsxs("div",{className:u("row-span-1 rounded-xl group/bento hover:shadow-xl transition duration-200 shadow-input dark:shadow-none p-4 dark:bg-black dark:border-white/[0.2] bg-white border border-transparent justify-between flex flex-col space-y-4",t),children:[s,e.jsxs("div",{className:"group-hover/bento:translate-x-2 transition duration-200",children:[i,e.jsx("div",{className:"font-sans font-bold text-neutral-600 dark:text-neutral-200 mb-2 mt-2",children:r}),e.jsx("div",{className:"font-sans font-normal text-neutral-600 text-xs dark:text-neutral-300",children:a})]})]}),le=({item:t,className:r})=>e.jsx(se,{className:r,title:t.title,description:t.description,header:t.header,icon:t.icon});export{de as ServicesBentoGrid}; diff --git a/docs/_astro/_commonjsHelpers.Cpj98o6Y.js b/docs/_astro/_commonjsHelpers.Cpj98o6Y.js deleted file mode 100644 index b285ce5..0000000 --- a/docs/_astro/_commonjsHelpers.Cpj98o6Y.js +++ /dev/null @@ -1 +0,0 @@ -var o=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function l(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}export{o as c,l as g}; diff --git a/docs/_astro/astro_scripts/before-hydration.js.DaD4V59O.js b/docs/_astro/astro_scripts/before-hydration.js.DaD4V59O.js deleted file mode 100644 index d674a8d..0000000 --- a/docs/_astro/astro_scripts/before-hydration.js.DaD4V59O.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * @license - * Copyright 2017 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */const M=globalThis,C=M.trustedTypes,B=C?C.createPolicy("lit-html",{createHTML:r=>r}):void 0,O="$lit$",A=`lit$${Math.random().toFixed(9).slice(2)}$`,U="?"+A,tt=`<${U}>`,g=document,H=()=>g.createComment(""),w=r=>r===null||typeof r!="object"&&typeof r!="function",W=Array.isArray,F=r=>W(r)||typeof r?.[Symbol.iterator]=="function",R=`[ -\f\r]`,x=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,D=/-->/g,k=/>/g,f=RegExp(`>|${R}(?:([^\\s"'>=/]+)(${R}*=${R}*(?:[^ -\f\r"'\`<>=]|("|')|))|$)`,"g"),L=/'/g,j=/"/g,z=/^(?:script|style|textarea|title)$/i,y=Symbol.for("lit-noChange"),p=Symbol.for("lit-nothing"),V=new WeakMap,m=g.createTreeWalker(g,129);function G(r,t){if(!Array.isArray(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return B!==void 0?B.createHTML(t):t}const Z=(r,t)=>{const i=r.length-1,n=[];let e,o=t===2?"":"",s=x;for(let h=0;h"?(s=e??x,c=-1):d[1]===void 0?c=-2:(c=s.lastIndex-d[2].length,a=d[1],s=d[3]===void 0?f:d[3]==='"'?j:L):s===j||s===L?s=f:s===D||s===k?s=x:(s=f,e=void 0);const _=s===f&&r[h+1].startsWith("/>")?" ":"";o+=s===x?l+tt:c>=0?(n.push(a),l.slice(0,c)+O+l.slice(c)+A+_):l+A+(c===-2?h:_)}return[G(r,o+(r[i]||"")+(t===2?"":"")),n]};class P{constructor({strings:t,_$litType$:i},n){let e;this.parts=[];let o=0,s=0;const h=t.length-1,l=this.parts,[a,d]=Z(t,i);if(this.el=P.createElement(a,n),m.currentNode=this.el.content,i===2){const c=this.el.content.firstChild;c.replaceWith(...c.childNodes)}for(;(e=m.nextNode())!==null&&l.length0){e.textContent=C?C.emptyScript:"";for(let _=0;_2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=p}_$AI(t,i=this,n,e){const o=this.strings;let s=!1;if(o===void 0)t=v(this,t,i,0),s=!w(t)||t!==this._$AH&&t!==y,s&&(this._$AH=t);else{const h=t;let l,a;for(t=o[0],l=0;l{const n=i?.renderBefore??t;let e=n._$litPart$;if(e===void 0){const o=i?.renderBefore??null;n._$litPart$=e=new b(t.insertBefore(H(),o),o,void 0,i??{})}return e._$AI(r),e};/** - * @license - * Copyright 2019 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */let S=null;const nt={boundAttributeSuffix:$.P,marker:$.A,markerMatch:$.C,HTML_RESULT:$.M,getTemplateHtml:$.L,overrideDirectiveResolve:(r,t)=>class extends r{_$AS(i,n){return t(this,n)}},patchDirectiveResolve:(r,t)=>{if(r.prototype._$AS!==t){S??=r.prototype._$AS.name;for(let i=r.prototype;i!==Object.prototype;i=Object.getPrototypeOf(i))if(i.hasOwnProperty(S))return void(i[S]=t);throw Error("Internal error: It is possible that both dev mode and production mode Lit was mixed together during SSR. Please comment on the issue: https://github.com/lit/lit/issues/4527")}},setDirectiveClass(r,t){r._$litDirective$=t},getAttributePartCommittedValue:(r,t,i)=>{let n=y;return r.j=e=>n=e,r._$AI(t,r,i),n},connectedDisconnectable:r=>({...r,_$AU:!0}),resolveDirective:$.V,AttributePart:$.H,PropertyPart:$.B,BooleanAttributePart:$.N,EventPart:$.U,ElementPart:$.F,TemplateInstance:$.R,isIterable:$.D,ChildPart:$.I};/** - * @license - * Copyright 2017 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */const T={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6};/** - * @license - * Copyright 2020 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */const rt=r=>r===null||typeof r!="object"&&typeof r!="function",st=(r,t)=>t===void 0?r?._$litType$!==void 0:r?._$litType$===t,ot=r=>r?._$litType$?.h!=null,lt=r=>r.strings===void 0;/** - * @license - * Copyright 2019 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */const{TemplateInstance:at,isIterable:ht,resolveDirective:X,ChildPart:E,ElementPart:ct}=nt,dt=(r,t,i={})=>{if(t._$litPart$!==void 0)throw Error("container already contains a live render");let n,e,o;const s=[],h=document.createTreeWalker(t,NodeFilter.SHOW_COMMENT);let l;for(;(l=h.nextNode())!==null;){const a=l.data;if(a.startsWith("lit-part")){if(s.length===0&&n!==void 0)throw Error(`There must be only one root part per container. Found a part marker (${l}) when we already have a root part marker (${e})`);o=pt(r,l,s,i),n===void 0&&(n=o),e??=l}else if(a.startsWith("lit-node"))ut(l,s,i);else if(a.startsWith("/lit-part")){if(s.length===1&&o!==n)throw Error("internal error");o=$t(l,o,s)}}if(n===void 0){const a=t instanceof ShadowRoot?"{container.host.localName}'s shadow root":t instanceof DocumentFragment?"DocumentFragment":t.localName;console.error(`There should be exactly one root part in a render container, but we didn't find any in ${a}.`)}t._$litPart$=n},pt=(r,t,i,n)=>{let e,o;if(i.length===0)o=new E(t,null,void 0,n),e=r;else{const s=i[i.length-1];if(s.type==="template-instance")o=new E(t,null,s.instance,n),s.instance._$AV.push(o),e=s.result.values[s.instancePartIndex++],s.templatePartIndex++;else if(s.type==="iterable"){o=new E(t,null,s.part,n);const h=s.iterator.next();if(h.done)throw e=void 0,s.done=!0,Error("Unhandled shorter than expected iterable");e=h.value,s.part._$AH.push(o)}else o=new E(t,null,s.part,n)}if(e=X(o,e),e===y)i.push({part:o,type:"leaf"});else if(rt(e))i.push({part:o,type:"leaf"}),o._$AH=e;else if(st(e)){if(ot(e))throw Error("compiled templates are not supported");const s="lit-part "+At(e);if(t.data!==s)throw Error("Hydration value mismatch: Unexpected TemplateResult rendered to part");{const h=E.prototype._$AC(e),l=new at(h,o);i.push({type:"template-instance",instance:l,part:o,templatePartIndex:0,instancePartIndex:0,result:e}),o._$AH=l}}else ht(e)?(i.push({part:o,type:"iterable",value:e,iterator:e[Symbol.iterator](),done:!1}),o._$AH=[]):(i.push({part:o,type:"leaf"}),o._$AH=e??"");return o},$t=(r,t,i)=>{if(t===void 0)throw Error("unbalanced part marker");t._$AB=r;const n=i.pop();if(n.type==="iterable"&&!n.iterator.next().done)throw Error("unexpected longer than expected iterable");if(i.length>0)return i[i.length-1].part},ut=(r,t,i)=>{const n=/lit-node (\d+)/.exec(r.data),e=parseInt(n[1]),o=r.nextElementSibling;if(o===null)throw Error("could not find node for attribute parts");o.removeAttribute("defer-hydration");const s=t[t.length-1];if(s.type!=="template-instance")throw Error("Hydration value mismatch: Primitive found where TemplateResult expected. This usually occurs due to conditional rendering that resulted in a different value or template being rendered between the server and client.");{const h=s.instance;for(;;){const l=h._$AD.parts[s.templatePartIndex];if(l===void 0||l.type!==T.ATTRIBUTE&&l.type!==T.ELEMENT||l.index!==e)break;if(l.type===T.ATTRIBUTE){const a=new l.ctor(o,l.name,l.strings,s.instance,i),d=lt(a)?s.result.values[s.instancePartIndex]:s.result.values,c=!(a.type===T.EVENT||a.type===T.PROPERTY);a._$AI(d,a,s.instancePartIndex,c),s.instancePartIndex+=l.strings.length-1,h._$AV.push(a)}else{const a=new ct(o,s.instance,i);X(a,s.result.values[s.instancePartIndex++]),h._$AV.push(a)}s.templatePartIndex++}}},At=r=>{const t=new Uint32Array(2).fill(5381);for(const n of r.strings)for(let e=0;e{const t=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(r),"observedAttributes").get;Object.defineProperty(r,"observedAttributes",{get(){return[...t.call(this),"defer-hydration"]}});const i=r.prototype.attributeChangedCallback;r.prototype.attributeChangedCallback=function(s,h,l){s==="defer-hydration"&&l===null&&n.call(this),i.call(this,s,h,l)};const n=r.prototype.connectedCallback;r.prototype.connectedCallback=function(){this.hasAttribute("defer-hydration")||n.call(this)};const e=r.prototype.createRenderRoot;r.prototype.createRenderRoot=function(){return this.shadowRoot?(this._$AG=!0,this.shadowRoot):e.call(this)};const o=Object.getPrototypeOf(r.prototype).update;r.prototype.update=function(s){const h=this.render();if(o.call(this,s),this._$AG){this._$AG=!1;for(let l=0;lt,isStatic:!1,reducedMotion:"never"}),re=P.createContext({}),Ue=P.createContext(null),ze=typeof document<"u",or=ze?P.useLayoutEffect:P.useEffect,Ms=P.createContext({strict:!1}),Ge=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),ar="framerAppearId",Rs="data-"+Ge(ar),lr={skipAnimations:!1,useManualTiming:!1};class yn{constructor(){this.order=[],this.scheduled=new Set}add(e){if(!this.scheduled.has(e))return this.scheduled.add(e),this.order.push(e),!0}remove(e){const n=this.order.indexOf(e);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(e))}clear(){this.order.length=0,this.scheduled.clear()}}function cr(t){let e=new yn,n=new yn,s=0,i=!1,o=!1;const r=new WeakSet,a={schedule:(l,c=!1,u=!1)=>{const d=u&&i,h=d?e:n;return c&&r.add(l),h.add(l)&&d&&i&&(s=e.order.length),l},cancel:l=>{n.remove(l),r.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[e,n]=[n,e],n.clear(),s=e.order.length,s)for(let c=0;c(d[h]=cr(()=>n=!0),d),{}),r=d=>{o[d].process(i)},a=()=>{const d=performance.now();n=!1,i.delta=s?1e3/60:Math.max(Math.min(d-i.timestamp,ur),1),i.timestamp=d,i.isProcessing=!0,Kt.forEach(r),i.isProcessing=!1,n&&e&&(s=!1,t(a))},l=()=>{n=!0,s=!0,i.isProcessing||t(a)};return{schedule:Kt.reduce((d,h)=>{const f=o[h];return d[h]=(m,p=!1,g=!1)=>(n||l(),f.schedule(m,p,g)),d},{}),cancel:d=>Kt.forEach(h=>o[h].cancel(d)),state:i,steps:o}}const{schedule:_e,cancel:Jc}=Ds(queueMicrotask,!1);function dr(t,e,n,s){const{visualElement:i}=P.useContext(re),o=P.useContext(Ms),r=P.useContext(Ue),a=P.useContext(Cs).reducedMotion,l=P.useRef();s=s||o.renderer,!l.current&&s&&(l.current=s(t,{visualState:e,parent:i,props:n,presenceContext:r,blockInitialAnimation:r?r.initial===!1:!1,reducedMotionConfig:a}));const c=l.current;P.useInsertionEffect(()=>{c&&c.update(n,r)});const u=P.useRef(!!(n[Rs]&&!window.HandoffComplete));return or(()=>{c&&(_e.postRender(c.render),u.current&&c.animationState&&c.animationState.animateChanges())}),P.useEffect(()=>{c&&(c.updateFeatures(),!u.current&&c.animationState&&c.animationState.animateChanges(),u.current&&(u.current=!1,window.HandoffComplete=!0))}),c}function yt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function hr(t,e,n){return P.useCallback(s=>{s&&t.mount&&t.mount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):yt(n)&&(n.current=s))},[e])}function Ft(t){return typeof t=="string"||Array.isArray(t)}function oe(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const Ke=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],We=["initial",...Ke];function ae(t){return oe(t.animate)||We.some(e=>Ft(t[e]))}function Es(t){return!!(ae(t)||t.variants)}function fr(t,e){if(ae(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Ft(n)?n:void 0,animate:Ft(s)?s:void 0}}return t.inherit!==!1?e:{}}function pr(t){const{initial:e,animate:n}=fr(t,P.useContext(re));return P.useMemo(()=>({initial:e,animate:n}),[vn(e),vn(n)])}function vn(t){return Array.isArray(t)?t.join(" "):t}const bn={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Bt={};for(const t in bn)Bt[t]={isEnabled:e=>bn[t].some(n=>!!e[n])};function mr(t){for(const e in t)Bt[e]={...Bt[e],...t[e]}}const Ls=P.createContext({}),ks=P.createContext({}),gr=Symbol.for("motionComponentSymbol");function yr({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:s,Component:i}){t&&mr(t);function o(a,l){let c;const u={...P.useContext(Cs),...a,layoutId:vr(a)},{isStatic:d}=u,h=pr(a),f=s(a,d);if(!d&&ze){h.visualElement=dr(i,f,u,e);const m=P.useContext(ks),p=P.useContext(Ms).strict;h.visualElement&&(c=h.visualElement.loadFeatures(u,p,t,m))}return Se.jsxs(re.Provider,{value:h,children:[c&&h.visualElement?Se.jsx(c,{visualElement:h.visualElement,...u}):null,n(i,a,hr(f,h.visualElement,l),f,d,h.visualElement)]})}const r=P.forwardRef(o);return r[gr]=i,r}function vr({layoutId:t}){const e=P.useContext(Ls).id;return e&&t!==void 0?e+"-"+t:t}function br(t){function e(s,i={}){return yr(t(s,i))}if(typeof Proxy>"u")return e;const n=new Map;return new Proxy(e,{get:(s,i)=>(n.has(i)||n.set(i,e(i)),n.get(i))})}const xr=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function $e(t){return typeof t!="string"||t.includes("-")?!1:!!(xr.indexOf(t)>-1||/[A-Z]/u.test(t))}const Zt={};function wr(t){Object.assign(Zt,t)}const It=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],mt=new Set(It);function Fs(t,{layout:e,layoutId:n}){return mt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Zt[t]||t==="opacity")}const O=t=>!!(t&&t.getVelocity),Tr={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Pr=It.length;function Sr(t,{enableHardwareAcceleration:e=!0,allowTransformNone:n=!0},s,i){let o="";for(let r=0;re=>typeof e=="string"&&e.startsWith(t),js=Bs("--"),Ar=Bs("var(--"),He=t=>Ar(t)?Vr.test(t.split("/*")[0].trim()):!1,Vr=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Cr=(t,e)=>e&&typeof t=="number"?e.transform(t):t,st=(t,e,n)=>n>e?e:ntypeof t=="number",parse:parseFloat,transform:t=>t},Dt={...Tt,transform:t=>st(0,1,t)},Wt={...Tt,default:1},Et=t=>Math.round(t*1e5)/1e5,Ye=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,Mr=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,Rr=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function Nt(t){return typeof t=="string"}const Ut=t=>({test:e=>Nt(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Q=Ut("deg"),W=Ut("%"),x=Ut("px"),Dr=Ut("vh"),Er=Ut("vw"),xn={...W,parse:t=>W.parse(t)/100,transform:t=>W.transform(t*100)},wn={...Tt,transform:Math.round},Os={borderWidth:x,borderTopWidth:x,borderRightWidth:x,borderBottomWidth:x,borderLeftWidth:x,borderRadius:x,radius:x,borderTopLeftRadius:x,borderTopRightRadius:x,borderBottomRightRadius:x,borderBottomLeftRadius:x,width:x,maxWidth:x,height:x,maxHeight:x,size:x,top:x,right:x,bottom:x,left:x,padding:x,paddingTop:x,paddingRight:x,paddingBottom:x,paddingLeft:x,margin:x,marginTop:x,marginRight:x,marginBottom:x,marginLeft:x,rotate:Q,rotateX:Q,rotateY:Q,rotateZ:Q,scale:Wt,scaleX:Wt,scaleY:Wt,scaleZ:Wt,skew:Q,skewX:Q,skewY:Q,distance:x,translateX:x,translateY:x,translateZ:x,x,y:x,z:x,perspective:x,transformPerspective:x,opacity:Dt,originX:xn,originY:xn,originZ:x,zIndex:wn,backgroundPositionX:x,backgroundPositionY:x,fillOpacity:Dt,strokeOpacity:Dt,numOctaves:wn};function Xe(t,e,n,s){const{style:i,vars:o,transform:r,transformOrigin:a}=t;let l=!1,c=!1,u=!0;for(const d in e){const h=e[d];if(js(d)){o[d]=h;continue}const f=Os[d],m=Cr(h,f);if(mt.has(d)){if(l=!0,r[d]=m,!u)continue;h!==(f.default||0)&&(u=!1)}else d.startsWith("origin")?(c=!0,a[d]=m):i[d]=m}if(e.transform||(l||s?i.transform=Sr(t.transform,n,u,s):i.transform&&(i.transform="none")),c){const{originX:d="50%",originY:h="50%",originZ:f=0}=a;i.transformOrigin=`${d} ${h} ${f}`}}const qe=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Is(t,e,n){for(const s in e)!O(e[s])&&!Fs(s,n)&&(t[s]=e[s])}function Lr({transformTemplate:t},e,n){return P.useMemo(()=>{const s=qe();return Xe(s,e,{enableHardwareAcceleration:!n},t),Object.assign({},s.vars,s.style)},[e])}function kr(t,e,n){const s=t.style||{},i={};return Is(i,s,t),Object.assign(i,Lr(t,e,n)),i}function Fr(t,e,n){const s={},i=kr(t,e,n);return t.drag&&t.dragListener!==!1&&(s.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(s.tabIndex=0),s.style=i,s}const Br=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Jt(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Br.has(t)}let Ns=t=>!Jt(t);function jr(t){t&&(Ns=e=>e.startsWith("on")?!Jt(e):t(e))}try{jr(require("@emotion/is-prop-valid").default)}catch{}function Or(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(Ns(i)||n===!0&&Jt(i)||!e&&!Jt(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}function Tn(t,e,n){return typeof t=="string"?t:x.transform(e+n*t)}function Ir(t,e,n){const s=Tn(e,t.x,t.width),i=Tn(n,t.y,t.height);return`${s} ${i}`}const Nr={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ur={offset:"strokeDashoffset",array:"strokeDasharray"};function zr(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?Nr:Ur;t[o.offset]=x.transform(-s);const r=x.transform(e),a=x.transform(n);t[o.array]=`${r} ${a}`}function Ze(t,{attrX:e,attrY:n,attrScale:s,originX:i,originY:o,pathLength:r,pathSpacing:a=1,pathOffset:l=0,...c},u,d,h){if(Xe(t,c,u,h),d){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:f,style:m,dimensions:p}=t;f.transform&&(p&&(m.transform=f.transform),delete f.transform),p&&(i!==void 0||o!==void 0||m.transform)&&(m.transformOrigin=Ir(p,i!==void 0?i:.5,o!==void 0?o:.5)),e!==void 0&&(f.x=e),n!==void 0&&(f.y=n),s!==void 0&&(f.scale=s),r!==void 0&&zr(f,r,a,l,!1)}const Us=()=>({...qe(),attrs:{}}),Je=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Gr(t,e,n,s){const i=P.useMemo(()=>{const o=Us();return Ze(o,e,{enableHardwareAcceleration:!1},Je(s),t.transformTemplate),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};Is(o,t.style,t),i.style={...o,...i.style}}return i}function _r(t=!1){return(n,s,i,{latestValues:o},r)=>{const l=($e(n)?Gr:Fr)(s,o,r,n),c=Or(s,typeof n=="string",t),u=n!==P.Fragment?{...c,...l,ref:i}:{},{children:d}=s,h=P.useMemo(()=>O(d)?d.get():d,[d]);return P.createElement(n,{...u,children:h})}}function zs(t,{style:e,vars:n},s,i){Object.assign(t.style,e,i&&i.getProjectionStyles(s));for(const o in n)t.style.setProperty(o,n[o])}const Gs=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function _s(t,e,n,s){zs(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Gs.has(i)?i:Ge(i),e.attrs[i])}function Qe(t,e,n){var s;const{style:i}=t,o={};for(const r in i)(O(i[r])||e.style&&O(e.style[r])||Fs(r,t)||((s=n?.getValue(r))===null||s===void 0?void 0:s.liveStyle)!==void 0)&&(o[r]=i[r]);return o}function Ks(t,e,n){const s=Qe(t,e,n);for(const i in t)if(O(t[i])||O(e[i])){const o=It.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[o]=t[i]}return s}function tn(t,e,n,s={},i={}){return typeof e=="function"&&(e=e(n!==void 0?n:t.custom,s,i)),typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"&&(e=e(n!==void 0?n:t.custom,s,i)),e}function Kr(t){const e=P.useRef(null);return e.current===null&&(e.current=t()),e.current}const Ae=t=>Array.isArray(t),Wr=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),$r=t=>Ae(t)?t[t.length-1]||0:t;function Yt(t){const e=O(t)?t.get():t;return Wr(e)?e.toValue():e}function Hr({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},s,i,o){const r={latestValues:Yr(s,i,o,t),renderState:e()};return n&&(r.mount=a=>n(s,a,r)),r}const Ws=t=>(e,n)=>{const s=P.useContext(re),i=P.useContext(Ue),o=()=>Hr(t,e,s,i);return n?o():Kr(o)};function Yr(t,e,n,s){const i={},o=s(t,{});for(const h in o)i[h]=Yt(o[h]);let{initial:r,animate:a}=t;const l=ae(t),c=Es(t);e&&c&&!l&&t.inherit!==!1&&(r===void 0&&(r=e.initial),a===void 0&&(a=e.animate));let u=n?n.initial===!1:!1;u=u||r===!1;const d=u?a:r;return d&&typeof d!="boolean"&&!oe(d)&&(Array.isArray(d)?d:[d]).forEach(f=>{const m=tn(t,f);if(!m)return;const{transitionEnd:p,transition:g,...v}=m;for(const b in v){let y=v[b];if(Array.isArray(y)){const T=u?y.length-1:0;y=y[T]}y!==null&&(i[b]=y)}for(const b in p)i[b]=p[b]}),i}const I=t=>t,{schedule:k,cancel:it,state:L,steps:de}=Ds(typeof requestAnimationFrame<"u"?requestAnimationFrame:I,!0),Xr={useVisualState:Ws({scrapeMotionValuesFromProps:Ks,createRenderState:Us,onMount:(t,e,{renderState:n,latestValues:s})=>{k.read(()=>{try{n.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),k.render(()=>{Ze(n,s,{enableHardwareAcceleration:!1},Je(e.tagName),t.transformTemplate),_s(e,n)})}})},qr={useVisualState:Ws({scrapeMotionValuesFromProps:Qe,createRenderState:qe})};function Zr(t,{forwardMotionProps:e=!1},n,s){return{...$e(t)?Xr:qr,preloadedFeatures:n,useRender:_r(e),createVisualElement:s,Component:t}}function H(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}const $s=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function le(t,e="page"){return{point:{x:t[`${e}X`],y:t[`${e}Y`]}}}const Jr=t=>e=>$s(e)&&t(e,le(e));function Y(t,e,n,s){return H(t,e,Jr(n),s)}const Qr=(t,e)=>n=>e(t(n)),X=(...t)=>t.reduce(Qr);function Hs(t){let e=null;return()=>{const n=()=>{e=null};return e===null?(e=t,n):!1}}const Pn=Hs("dragHorizontal"),Sn=Hs("dragVertical");function Ys(t){let e=!1;if(t==="y")e=Sn();else if(t==="x")e=Pn();else{const n=Pn(),s=Sn();n&&s?e=()=>{n(),s()}:(n&&n(),s&&s())}return e}function Xs(){const t=Ys(!0);return t?(t(),!1):!0}class ot{constructor(e){this.isMounted=!1,this.node=e}update(){}}function An(t,e){const n=e?"pointerenter":"pointerleave",s=e?"onHoverStart":"onHoverEnd",i=(o,r)=>{if(o.pointerType==="touch"||Xs())return;const a=t.getProps();t.animationState&&a.whileHover&&t.animationState.setActive("whileHover",e);const l=a[s];l&&l(o,r)};return Y(t.current,n,i,{passive:!t.getProps()[s]})}class to extends ot{mount(){this.unmount=X(An(this.node,!0),An(this.node,!1))}unmount(){}}class eo extends ot{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=X(H(this.node.current,"focus",()=>this.onFocus()),H(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const qs=(t,e)=>e?t===e?!0:qs(t,e.parentElement):!1;function he(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,le(n))}class no extends ot{constructor(){super(...arguments),this.removeStartListeners=I,this.removeEndListeners=I,this.removeAccessibleListeners=I,this.startPointerPress=(e,n)=>{if(this.isPressing)return;this.removeEndListeners();const s=this.node.getProps(),o=Y(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:u,globalTapTarget:d}=this.node.getProps();!d&&!qs(this.node.current,a.target)?u&&u(a,l):c&&c(a,l)},{passive:!(s.onTap||s.onPointerUp)}),r=Y(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(s.onTapCancel||s.onPointerCancel)});this.removeEndListeners=X(o,r),this.startPress(e,n)},this.startAccessiblePress=()=>{const e=o=>{if(o.key!=="Enter"||this.isPressing)return;const r=a=>{a.key!=="Enter"||!this.checkPressEnd()||he("up",(l,c)=>{const{onTap:u}=this.node.getProps();u&&u(l,c)})};this.removeEndListeners(),this.removeEndListeners=H(this.node.current,"keyup",r),he("down",(a,l)=>{this.startPress(a,l)})},n=H(this.node.current,"keydown",e),s=()=>{this.isPressing&&he("cancel",(o,r)=>this.cancelPress(o,r))},i=H(this.node.current,"blur",s);this.removeAccessibleListeners=X(n,i)}}startPress(e,n){this.isPressing=!0;const{onTapStart:s,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),s&&s(e,n)}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Xs()}cancelPress(e,n){if(!this.checkPressEnd())return;const{onTapCancel:s}=this.node.getProps();s&&s(e,n)}mount(){const e=this.node.getProps(),n=Y(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),s=H(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=X(n,s)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Ve=new WeakMap,fe=new WeakMap,so=t=>{const e=Ve.get(t.target);e&&e(t)},io=t=>{t.forEach(so)};function ro({root:t,...e}){const n=t||document;fe.has(n)||fe.set(n,{});const s=fe.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(io,{root:t,...e})),s[i]}function oo(t,e,n){const s=ro(e);return Ve.set(t,n),s.observe(t),()=>{Ve.delete(t),s.unobserve(t)}}const ao={some:0,all:1};class lo extends ot{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:o}=e,r={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:ao[i]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,o&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),h=c?u:d;h&&h(l)};return oo(this.node.current,r,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(co(e,n))&&this.startObserver()}unmount(){}}function co({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const uo={inView:{Feature:lo},tap:{Feature:no},focus:{Feature:eo},hover:{Feature:to}};function Zs(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;se[s]=n.get()),e}function fo(t){const e={};return t.values.forEach((n,s)=>e[s]=n.getVelocity()),e}function ce(t,e,n){const s=t.getProps();return tn(s,e,n!==void 0?n:s.custom,ho(t),fo(t))}const et=t=>t*1e3,q=t=>t/1e3,po={type:"spring",stiffness:500,damping:25,restSpeed:10},mo=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),go={type:"keyframes",duration:.8},yo={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},vo=(t,{keyframes:e})=>e.length>2?go:mt.has(t)?t.startsWith("scale")?mo(e[1]):po:yo;function bo({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}function en(t,e){return t[e]||t.default||t}const xo=t=>t!==null;function ue(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(xo),o=e&&n!=="loop"&&e%2===1?0:i.length-1;return!o||s===void 0?i[o]:s}let Xt;function wo(){Xt=void 0}const nt={now:()=>(Xt===void 0&&nt.set(L.isProcessing||lr.useManualTiming?L.timestamp:performance.now()),Xt),set:t=>{Xt=t,queueMicrotask(wo)}},Js=t=>/^0[^.\s]+$/u.test(t);function To(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Js(t):!0}let Qs=I;const ti=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),Po=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function So(t){const e=Po.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function ei(t,e,n=1){const[s,i]=So(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const r=o.trim();return ti(r)?parseFloat(r):r}return He(i)?ei(i,e,n+1):i}const Ao=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Vn=t=>t===Tt||t===x,Cn=(t,e)=>parseFloat(t.split(", ")[e]),Mn=(t,e)=>(n,{transform:s})=>{if(s==="none"||!s)return 0;const i=s.match(/^matrix3d\((.+)\)$/u);if(i)return Cn(i[1],e);{const o=s.match(/^matrix\((.+)\)$/u);return o?Cn(o[1],t):0}},Vo=new Set(["x","y","z"]),Co=It.filter(t=>!Vo.has(t));function Mo(t){const e=[];return Co.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const wt={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:Mn(4,13),y:Mn(5,14)};wt.translateX=wt.x;wt.translateY=wt.y;const ni=t=>e=>e.test(t),Ro={test:t=>t==="auto",parse:t=>t},si=[Tt,x,W,Q,Er,Dr,Ro],Rn=t=>si.find(ni(t)),pt=new Set;let Ce=!1,Me=!1;function ii(){if(Me){const t=Array.from(pt).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=Mo(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([o,r])=>{var a;(a=s.getValue(o))===null||a===void 0||a.set(r)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Me=!1,Ce=!1,pt.forEach(t=>t.complete()),pt.clear()}function ri(){pt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Me=!0)})}function Do(){ri(),ii()}class nn{constructor(e,n,s,i,o,r=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=o,this.isAsync=r}scheduleResolve(){this.isScheduled=!0,this.isAsync?(pt.add(this),Ce||(Ce=!0,k.read(ri),k.resolveKeyframes(ii))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;for(let o=0;on=>!!(Nt(n)&&Rr.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),oi=(t,e,n)=>s=>{if(!Nt(s))return s;const[i,o,r,a]=s.match(Ye);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},Eo=t=>st(0,255,t),pe={...Tt,transform:t=>Math.round(Eo(t))},ht={test:sn("rgb","red"),parse:oi("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+pe.transform(t)+", "+pe.transform(e)+", "+pe.transform(n)+", "+Et(Dt.transform(s))+")"};function Lo(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const Re={test:sn("#"),parse:Lo,transform:ht.transform},vt={test:sn("hsl","hue"),parse:oi("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+W.transform(Et(e))+", "+W.transform(Et(n))+", "+Et(Dt.transform(s))+")"},j={test:t=>ht.test(t)||Re.test(t)||vt.test(t),parse:t=>ht.test(t)?ht.parse(t):vt.test(t)?vt.parse(t):Re.parse(t),transform:t=>Nt(t)?t:t.hasOwnProperty("red")?ht.transform(t):vt.transform(t)};function ko(t){var e,n;return isNaN(t)&&Nt(t)&&(((e=t.match(Ye))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(Mr))===null||n===void 0?void 0:n.length)||0)>0}const ai="number",li="color",Fo="var",Bo="var(",Dn="${}",jo=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Qt(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let o=0;const a=e.replace(jo,l=>(j.test(l)?(s.color.push(o),i.push(li),n.push(j.parse(l))):l.startsWith(Bo)?(s.var.push(o),i.push(Fo),n.push(l)):(s.number.push(o),i.push(ai),n.push(parseFloat(l))),++o,Dn)).split(Dn);return{values:n,split:a,indexes:s,types:i}}function ci(t){return Qt(t).values}function ui(t){const{split:e,types:n}=Qt(t),s=e.length;return i=>{let o="";for(let r=0;rtypeof t=="number"?0:t;function Io(t){const e=ci(t);return ui(t)(e.map(Oo))}const rt={test:ko,parse:ci,createTransformer:ui,getAnimatableNone:Io},No=new Set(["brightness","contrast","saturate","opacity"]);function Uo(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(Ye)||[];if(!s)return t;const i=n.replace(s,"");let o=No.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const zo=/\b([a-z-]*)\(.*?\)/gu,De={...rt,getAnimatableNone:t=>{const e=t.match(zo);return e?e.map(Uo).join(" "):t}},Go={...Os,color:j,backgroundColor:j,outlineColor:j,fill:j,stroke:j,borderColor:j,borderTopColor:j,borderRightColor:j,borderBottomColor:j,borderLeftColor:j,filter:De,WebkitFilter:De},rn=t=>Go[t];function di(t,e){let n=rn(t);return n!==De&&(n=rt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}function _o(t,e,n){let s=0,i;for(;s{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function Ko(t){let e;return()=>(e===void 0&&(e=t()),e)}const En=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(rt.test(t)||t==="0")&&!t.startsWith("url("));function Wo(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n{this.resolveFinishedPromise=e})}}function pi(t,e){return e?t*(1e3/e):0}const Ho=5;function mi(t,e,n){const s=Math.max(e-Ho,0);return pi(n-t(s),e-s)}const me=.001,Yo=.01,Xo=10,qo=.05,Zo=1;function Jo({duration:t=800,bounce:e=.25,velocity:n=0,mass:s=1}){let i,o,r=1-e;r=st(qo,Zo,r),t=st(Yo,Xo,q(t)),r<1?(i=c=>{const u=c*r,d=u*t,h=u-n,f=Ee(c,r),m=Math.exp(-d);return me-h/f*m},o=c=>{const d=c*r*t,h=d*n+n,f=Math.pow(r,2)*Math.pow(c,2)*t,m=Math.exp(-d),p=Ee(Math.pow(c,2),r);return(-i(c)+me>0?-1:1)*((h-f)*m)/p}):(i=c=>{const u=Math.exp(-c*t),d=(c-n)*t+1;return-me+u*d},o=c=>{const u=Math.exp(-c*t),d=(n-c)*(t*t);return u*d});const a=5/t,l=ta(i,o,a);if(t=et(t),isNaN(l))return{stiffness:100,damping:10,duration:t};{const c=Math.pow(l,2)*s;return{stiffness:c,damping:r*2*Math.sqrt(s*c),duration:t}}}const Qo=12;function ta(t,e,n){let s=n;for(let i=1;it[n]!==void 0)}function sa(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!Ln(t,na)&&Ln(t,ea)){const n=Jo(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}function gi({keyframes:t,restDelta:e,restSpeed:n,...s}){const i=t[0],o=t[t.length-1],r={done:!1,value:i},{stiffness:a,damping:l,mass:c,duration:u,velocity:d,isResolvedFromDuration:h}=sa({...s,velocity:-q(s.velocity||0)}),f=d||0,m=l/(2*Math.sqrt(a*c)),p=o-i,g=q(Math.sqrt(a/c)),v=Math.abs(p)<5;n||(n=v?.01:2),e||(e=v?.005:.5);let b;if(m<1){const y=Ee(g,m);b=T=>{const A=Math.exp(-m*g*T);return o-A*((f+m*g*p)/y*Math.sin(y*T)+p*Math.cos(y*T))}}else if(m===1)b=y=>o-Math.exp(-g*y)*(p+(f+g*p)*y);else{const y=g*Math.sqrt(m*m-1);b=T=>{const A=Math.exp(-m*g*T),D=Math.min(y*T,300);return o-A*((f+m*g*p)*Math.sinh(D)+y*p*Math.cosh(D))/y}}return{calculatedDuration:h&&u||null,next:y=>{const T=b(y);if(h)r.done=y>=u;else{let A=f;y!==0&&(m<1?A=mi(b,y,T):A=0);const D=Math.abs(A)<=n,_=Math.abs(o-T)<=e;r.done=D&&_}return r.value=r.done?o:T,r}}}function kn({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=t[0],h={done:!1,value:d},f=S=>a!==void 0&&Sl,m=S=>a===void 0?l:l===void 0||Math.abs(a-S)-p*Math.exp(-S/s),y=S=>v+b(S),T=S=>{const F=b(S),B=y(S);h.done=Math.abs(F)<=c,h.value=h.done?v:B};let A,D;const _=S=>{f(h.value)&&(A=S,D=gi({keyframes:[h.value,m(h.value)],velocity:mi(y,S,h.value),damping:i,stiffness:o,restDelta:c,restSpeed:u}))};return _(0),{calculatedDuration:null,next:S=>{let F=!1;return!D&&A===void 0&&(F=!0,T(S),_(S)),A!==void 0&&S>=A?D.next(S-A):(!F&&T(S),h)}}}const yi=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,ia=1e-7,ra=12;function oa(t,e,n,s,i){let o,r,a=0;do r=e+(n-e)/2,o=yi(r,s,i)-t,o>0?n=r:e=r;while(Math.abs(o)>ia&&++aoa(o,0,1,t,n);return o=>o===0||o===1?o:yi(i(o),e,s)}const aa=zt(.42,0,1,1),la=zt(0,0,.58,1),vi=zt(.42,0,.58,1),ca=t=>Array.isArray(t)&&typeof t[0]!="number",bi=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,xi=t=>e=>1-t(1-e),on=t=>1-Math.sin(Math.acos(t)),wi=xi(on),ua=bi(on),Ti=zt(.33,1.53,.69,.99),an=xi(Ti),da=bi(an),ha=t=>(t*=2)<1?.5*an(t):.5*(2-Math.pow(2,-10*(t-1))),fa={linear:I,easeIn:aa,easeInOut:vi,easeOut:la,circIn:on,circInOut:ua,circOut:wi,backIn:an,backInOut:da,backOut:Ti,anticipate:ha},Fn=t=>{if(Array.isArray(t)){Qs(t.length===4);const[e,n,s,i]=t;return zt(e,n,s,i)}else if(typeof t=="string")return fa[t];return t},jt=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s},M=(t,e,n)=>t+(e-t)*n;function ge(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function pa({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,o=0,r=0;if(!e)i=o=r=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=ge(l,a,t+1/3),o=ge(l,a,t),r=ge(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}const ye=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},ma=[Re,ht,vt],ga=t=>ma.find(e=>e.test(t));function Bn(t){const e=ga(t);let n=e.parse(t);return e===vt&&(n=pa(n)),n}const jn=(t,e)=>{const n=Bn(t),s=Bn(e),i={...n};return o=>(i.red=ye(n.red,s.red,o),i.green=ye(n.green,s.green,o),i.blue=ye(n.blue,s.blue,o),i.alpha=M(n.alpha,s.alpha,o),ht.transform(i))};function Le(t,e){return n=>n>0?e:t}function ya(t,e){return n=>M(t,e,n)}function ln(t){return typeof t=="number"?ya:typeof t=="string"?He(t)?Le:j.test(t)?jn:xa:Array.isArray(t)?Pi:typeof t=="object"?j.test(t)?jn:va:Le}function Pi(t,e){const n=[...t],s=n.length,i=t.map((o,r)=>ln(o)(o,e[r]));return o=>{for(let r=0;r{for(const o in s)n[o]=s[o](i);return n}}function ba(t,e){var n;const s=[],i={color:0,var:0,number:0};for(let o=0;o{const n=rt.createTransformer(e),s=Qt(t),i=Qt(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?X(Pi(ba(s,i),i.values),n):Le(t,e)};function Si(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?M(t,e,n):ln(t)(t,e)}function wa(t,e,n){const s=[],i=n||Si,o=t.length-1;for(let r=0;re[0];if(o===2&&t[0]===t[1])return()=>e[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const r=wa(e,s,i),a=r.length,l=c=>{let u=0;if(a>1)for(;ul(st(t[0],t[o-1],c)):l}function Pa(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=jt(0,e,s);t.push(M(n,1,i))}}function Sa(t){const e=[0];return Pa(e,t.length-1),e}function Aa(t,e){return t.map(n=>n*e)}function Va(t,e){return t.map(()=>e||vi).splice(0,t.length-1)}function te({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=ca(s)?s.map(Fn):Fn(s),o={done:!1,value:e[0]},r=Aa(n&&n.length===e.length?n:Sa(e),t),a=Ta(r,e,{ease:Array.isArray(i)?i:Va(e,i)});return{calculatedDuration:t,next:l=>(o.value=a(l),o.done=l>=t,o)}}const On=2e4;function Ca(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e=On?1/0:e}const Ma=t=>{const e=({timestamp:n})=>t(n);return{start:()=>k.update(e,!0),stop:()=>it(e),now:()=>L.isProcessing?L.timestamp:nt.now()}},Ra={decay:kn,inertia:kn,tween:te,keyframes:te,spring:gi},Da=t=>t/100;class cn extends fi{constructor({KeyframeResolver:e=nn,...n}){super(n),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:a}=this.options;a&&a()};const{name:s,motionValue:i,keyframes:o}=this.options,r=(a,l)=>this.onKeyframesResolved(a,l);s&&i&&i.owner?this.resolver=i.owner.resolveKeyframes(o,r,s,i):this.resolver=new e(o,r,s,i),this.resolver.scheduleResolve()}initPlayback(e){const{type:n="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:o,velocity:r=0}=this.options,a=Ra[n]||te;let l,c;a!==te&&typeof e[0]!="number"&&(l=X(Da,Si(e[0],e[1])),e=[0,100]);const u=a({...this.options,keyframes:e});o==="mirror"&&(c=a({...this.options,keyframes:[...e].reverse(),velocity:-r})),u.calculatedDuration===null&&(u.calculatedDuration=Ca(u));const{calculatedDuration:d}=u,h=d+i,f=h*(s+1)-i;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:h,totalDuration:f}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!e?this.pause():this.state=this.pendingPlayState}tick(e,n=!1){const{resolved:s}=this;if(!s){const{keyframes:S}=this.options;return{done:!0,value:S[S.length-1]}}const{finalKeyframe:i,generator:o,mirroredGenerator:r,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:d}=s;if(this.startTime===null)return o.next(0);const{delay:h,repeat:f,repeatType:m,repeatDelay:p,onUpdate:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-u/this.speed,this.startTime)),n?this.currentTime=e:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const v=this.currentTime-h*(this.speed>=0?1:-1),b=this.speed>=0?v<0:v>u;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let y=this.currentTime,T=o;if(f){const S=Math.min(this.currentTime,u)/d;let F=Math.floor(S),B=S%1;!B&&S>=1&&(B=1),B===1&&F--,F=Math.min(F,f+1),!!(F%2)&&(m==="reverse"?(B=1-B,p&&(B-=p/d)):m==="mirror"&&(T=r)),y=st(0,1,B)*d}const A=b?{done:!1,value:l[0]}:T.next(y);a&&(A.value=a(A.value));let{done:D}=A;!b&&c!==null&&(D=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const _=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&D);return _&&i!==void 0&&(A.value=ue(l,this.options,i)),g&&g(A.value),_&&this.finish(),A}get duration(){const{resolved:e}=this;return e?q(e.calculatedDuration):0}get time(){return q(this.currentTime)}set time(e){e=et(e),this.currentTime=e,this.holdTime!==null||this.speed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=q(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:e=Ma,onPlay:n}=this.options;this.driver||(this.driver=e(i=>this.tick(i))),n&&n();const s=this.driver.now();this.holdTime!==null?this.startTime=s-this.holdTime:(!this.startTime||this.state==="finished")&&(this.startTime=s),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(e=this.currentTime)!==null&&e!==void 0?e:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const Ai=t=>Array.isArray(t)&&typeof t[0]=="number";function Vi(t){return!!(!t||typeof t=="string"&&t in un||Ai(t)||Array.isArray(t)&&t.every(Vi))}const Rt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,un={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Rt([0,.65,.55,1]),circOut:Rt([.55,0,1,.45]),backIn:Rt([.31,.01,.66,-.59]),backOut:Rt([.33,1.53,.69,.99])};function Ea(t){return Ci(t)||un.easeOut}function Ci(t){if(t)return Ai(t)?Rt(t):Array.isArray(t)?t.map(Ea):un[t]}function La(t,e,n,{delay:s=0,duration:i=300,repeat:o=0,repeatType:r="loop",ease:a,times:l}={}){const c={[e]:n};l&&(c.offset=l);const u=Ci(a);return Array.isArray(u)&&(c.easing=u),t.animate(c,{delay:s,duration:i,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"})}const ka=Ko(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Fa=new Set(["opacity","clipPath","filter","transform"]),ee=10,Ba=2e4;function ja(t){return t.type==="spring"||t.name==="backgroundColor"||!Vi(t.ease)}function Oa(t,e){const n=new cn({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let s={done:!1,value:t[0]};const i=[];let o=0;for(;!s.done&&othis.onKeyframesResolved(o,r),n,s),this.resolver.scheduleResolve()}initPlayback(e,n){var s;let{duration:i=300,times:o,ease:r,type:a,motionValue:l,name:c}=this.options;if(!(!((s=l.owner)===null||s===void 0)&&s.current))return!1;if(ja(this.options)){const{onComplete:d,onUpdate:h,motionValue:f,...m}=this.options,p=Oa(e,m);e=p.keyframes,e.length===1&&(e[1]=e[0]),i=p.duration,o=p.times,r=p.ease,a="keyframes"}const u=La(l.owner.current,c,e,{...this.options,duration:i,times:o,ease:r});return u.startTime=nt.now(),this.pendingTimeline?(u.timeline=this.pendingTimeline,this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;l.set(ue(e,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:i,times:o,type:a,ease:r,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:n}=e;return q(n)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:n}=e;return q(n.currentTime||0)}set time(e){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.currentTime=et(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:n}=e;return n.playbackRate}set speed(e){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:n}=e;return n.playState}attachTimeline(e){if(!this._resolved)this.pendingTimeline=e;else{const{resolved:n}=this;if(!n)return I;const{animation:s}=n;s.timeline=e,s.onfinish=null}return I}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;const{resolved:e}=this;if(!e)return;const{animation:n,keyframes:s,duration:i,type:o,ease:r,times:a}=e;if(!(n.playState==="idle"||n.playState==="finished")){if(this.time){const{motionValue:l,onUpdate:c,onComplete:u,...d}=this.options,h=new cn({...d,keyframes:s,duration:i,type:o,ease:r,times:a,isGenerator:!0}),f=et(this.time);l.setWithVelocity(h.sample(f-ee).value,h.sample(f).value,ee)}this.cancel()}}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:n,name:s,repeatDelay:i,repeatType:o,damping:r,type:a}=e;return ka()&&s&&Fa.has(s)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!i&&o!=="mirror"&&r!==0&&a!=="inertia"}}const dn=(t,e,n,s={},i,o)=>r=>{const a=en(s,t)||{},l=a.delay||s.delay||0;let{elapsed:c=0}=s;c=c-et(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:h=>{e.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:i};bo(a)||(u={...u,...vo(t,u)}),u.duration&&(u.duration=et(u.duration)),u.repeatDelay&&(u.repeatDelay=et(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),d&&!o&&e.get()!==void 0){const h=ue(u.keyframes,a);if(h!==void 0){k.update(()=>{u.onUpdate(h),u.onComplete()});return}}return!o&&In.supports(u)?new In(u):new cn(u)};function ne(t){return!!(O(t)&&t.add)}function hn(t,e){t.indexOf(e)===-1&&t.push(e)}function fn(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class pn{constructor(){this.subscriptions=[]}add(e){return hn(this.subscriptions,e),()=>fn(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let o=0;o!isNaN(parseFloat(t));class Na{constructor(e,n={}){this.version="11.1.7",this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(s,i=!0)=>{const o=nt.now();this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.canTrackVelocity=Ia(this.current),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=nt.now()}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new pn);const s=this.events[e].add(n);return e==="change"?()=>{s(),k.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=nt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Nn)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Nn);return pi(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ot(t,e){return new Na(t,e)}function Ua(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Ot(n))}function za(t,e){const n=ce(t,e);let{transitionEnd:s={},transition:i={},...o}=n||{};o={...o,...s};for(const r in o){const a=$r(o[r]);Ua(t,r,a)}}function Ga({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function Mi(t,e,{delay:n=0,transitionOverride:s,type:i}={}){var o;let{transition:r=t.getDefaultTransition(),transitionEnd:a,...l}=e;const c=t.getValue("willChange");s&&(r=s);const u=[],d=i&&t.animationState&&t.animationState.getState()[i];for(const h in l){const f=t.getValue(h,(o=t.latestValues[h])!==null&&o!==void 0?o:null),m=l[h];if(m===void 0||d&&Ga(d,h))continue;const p={delay:n,elapsed:0,...en(r||{},h)};let g=!1;if(window.HandoffAppearAnimations){const y=t.getProps()[Rs];if(y){const T=window.HandoffAppearAnimations(y,h);T!==null&&(p.elapsed=T,g=!0)}}f.start(dn(h,f,m,t.shouldReduceMotion&&mt.has(h)?{type:!1}:p,t,g));const v=f.animation;v&&(ne(c)&&(c.add(h),v.then(()=>c.remove(h))),u.push(v))}return a&&Promise.all(u).then(()=>{k.update(()=>{a&&za(t,a)})}),u}function ke(t,e,n={}){var s;const i=ce(t,e,n.type==="exit"?(s=t.presenceContext)===null||s===void 0?void 0:s.custom:void 0);let{transition:o=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const r=i?()=>Promise.all(Mi(t,i,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:h}=o;return _a(t,e,u+c,d,h,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[c,u]=l==="beforeChildren"?[r,a]:[a,r];return c().then(()=>u())}else return Promise.all([r(),a(n.delay)])}function _a(t,e,n=0,s=0,i=1,o){const r=[],a=(t.variantChildren.size-1)*s,l=i===1?(c=0)=>c*s:(c=0)=>a-c*s;return Array.from(t.variantChildren).sort(Ka).forEach((c,u)=>{c.notify("AnimationStart",e),r.push(ke(c,e,{...o,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",e)))}),Promise.all(r)}function Ka(t,e){return t.sortNodePosition(e)}function Wa(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(o=>ke(t,o,n));s=Promise.all(i)}else if(typeof e=="string")s=ke(t,e,n);else{const i=typeof e=="function"?ce(t,e,n.custom):e;s=Promise.all(Mi(t,i,n))}return s.then(()=>{k.postRender(()=>{t.notify("AnimationComplete",e)})})}const $a=[...Ke].reverse(),Ha=Ke.length;function Ya(t){return e=>Promise.all(e.map(({animation:n,options:s})=>Wa(t,n,s)))}function Xa(t){let e=Ya(t);const n=Za();let s=!0;const i=l=>(c,u)=>{var d;const h=ce(t,u,l==="exit"?(d=t.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(h){const{transition:f,transitionEnd:m,...p}=h;c={...c,...p,...m}}return c};function o(l){e=l(t)}function r(l){const c=t.getProps(),u=t.getVariantContext(!0)||{},d=[],h=new Set;let f={},m=1/0;for(let g=0;gm&&T,F=!1;const B=Array.isArray(y)?y:[y];let K=B.reduce(i(v),{});A===!1&&(K={});const{prevResolvedValues:V={}}=b,Gt={...V,...K},at=E=>{S=!0,h.has(E)&&(F=!0,h.delete(E)),b.needsAnimating[E]=!0;const N=t.getValue(E);N&&(N.liveStyle=!1)};for(const E in Gt){const N=K[E],gt=V[E];if(f.hasOwnProperty(E))continue;let lt=!1;Ae(N)&&Ae(gt)?lt=!Zs(N,gt):lt=N!==gt,lt?N!=null?at(E):h.add(E):N!==void 0&&h.has(E)?at(E):b.protectedKeys[E]=!0}b.prevProp=y,b.prevResolvedValues=K,b.isActive&&(f={...f,...K}),s&&t.blockInitialAnimation&&(S=!1),S&&(!D||F)&&d.push(...B.map(E=>({animation:E,options:{type:v}})))}if(h.size){const g={};h.forEach(v=>{const b=t.getBaseTarget(v),y=t.getValue(v);y&&(y.liveStyle=!0),g[v]=b??null}),d.push({animation:g})}let p=!!d.length;return s&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(p=!1),s=!1,p?e(d):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=t.variantChildren)===null||u===void 0||u.forEach(h=>{var f;return(f=h.animationState)===null||f===void 0?void 0:f.setActive(l,c)}),n[l].isActive=c;const d=r(l);for(const h in n)n[h].protectedKeys={};return d}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>n}}function qa(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Zs(e,t):!1}function ct(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Za(){return{animate:ct(!0),whileInView:ct(),whileHover:ct(),whileTap:ct(),whileDrag:ct(),whileFocus:ct(),exit:ct()}}class Ja extends ot{constructor(e){super(e),e.animationState||(e.animationState=Xa(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),oe(e)&&(this.unmount=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let Qa=0;class tl extends ot{constructor(){super(...arguments),this.id=Qa++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>n(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const el={animation:{Feature:Ja},exit:{Feature:tl}},Un=(t,e)=>Math.abs(t-e);function nl(t,e){const n=Un(t.x,e.x),s=Un(t.y,e.y);return Math.sqrt(n**2+s**2)}class Ri{constructor(e,n,{transformPagePoint:s,contextWindow:i,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=be(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,f=nl(d.offset,{x:0,y:0})>=3;if(!h&&!f)return;const{point:m}=d,{timestamp:p}=L;this.history.push({...m,timestamp:p});const{onStart:g,onMove:v}=this.handlers;h||(g&&g(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,d)},this.handlePointerMove=(d,h)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=ve(h,this.transformPagePoint),k.update(this.updatePoint,!0)},this.handlePointerUp=(d,h)=>{this.end();const{onEnd:f,onSessionEnd:m,resumeAnimation:p}=this.handlers;if(this.dragSnapToOrigin&&p&&p(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const g=be(d.type==="pointercancel"?this.lastMoveEventInfo:ve(h,this.transformPagePoint),this.history);this.startEvent&&f&&f(d,g),m&&m(d,g)},!$s(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.contextWindow=i||window;const r=le(e),a=ve(r,this.transformPagePoint),{point:l}=a,{timestamp:c}=L;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(e,be(a,this.history)),this.removeListeners=X(Y(this.contextWindow,"pointermove",this.handlePointerMove),Y(this.contextWindow,"pointerup",this.handlePointerUp),Y(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),it(this.updatePoint)}}function ve(t,e){return e?{point:e(t.point)}:t}function zn(t,e){return{x:t.x-e.x,y:t.y-e.y}}function be({point:t},e){return{point:t,delta:zn(t,Di(e)),offset:zn(t,sl(e)),velocity:il(e,.1)}}function sl(t){return t[0]}function Di(t){return t[t.length-1]}function il(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=Di(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>et(e)));)n--;if(!s)return{x:0,y:0};const o=q(i.timestamp-s.timestamp);if(o===0)return{x:0,y:0};const r={x:(i.x-s.x)/o,y:(i.y-s.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function U(t){return t.max-t.min}function Fe(t,e=0,n=.01){return Math.abs(t-e)<=n}function Gn(t,e,n,s=.5){t.origin=s,t.originPoint=M(e.min,e.max,t.origin),t.scale=U(n)/U(e),(Fe(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=M(n.min,n.max,t.origin)-t.originPoint,(Fe(t.translate)||isNaN(t.translate))&&(t.translate=0)}function Lt(t,e,n,s){Gn(t.x,e.x,n.x,s?s.originX:void 0),Gn(t.y,e.y,n.y,s?s.originY:void 0)}function _n(t,e,n){t.min=n.min+e.min,t.max=t.min+U(e)}function rl(t,e,n){_n(t.x,e.x,n.x),_n(t.y,e.y,n.y)}function Kn(t,e,n){t.min=e.min-n.min,t.max=t.min+U(e)}function kt(t,e,n){Kn(t.x,e.x,n.x),Kn(t.y,e.y,n.y)}function ol(t,{min:e,max:n},s){return e!==void 0&&tn&&(t=s?M(n,t,s.max):Math.min(t,n)),t}function Wn(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function al(t,{top:e,left:n,bottom:s,right:i}){return{x:Wn(t.x,n,i),y:Wn(t.y,e,s)}}function $n(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.mins?n=jt(e.min,e.max-s,t.min):s>i&&(n=jt(t.min,t.max-i,e.min)),st(0,1,n)}function ul(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const Be=.35;function dl(t=Be){return t===!1?t=0:t===!0&&(t=Be),{x:Hn(t,"left","right"),y:Hn(t,"top","bottom")}}function Hn(t,e,n){return{min:Yn(t,e),max:Yn(t,n)}}function Yn(t,e){return typeof t=="number"?t:t[e]||0}const Xn=()=>({translate:0,scale:1,origin:0,originPoint:0}),bt=()=>({x:Xn(),y:Xn()}),qn=()=>({min:0,max:0}),R=()=>({x:qn(),y:qn()});function G(t){return[t("x"),t("y")]}function Ei({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function hl({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function fl(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function xe(t){return t===void 0||t===1}function je({scale:t,scaleX:e,scaleY:n}){return!xe(t)||!xe(e)||!xe(n)}function ut(t){return je(t)||Li(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Li(t){return Zn(t.x)||Zn(t.y)}function Zn(t){return t&&t!=="0%"}function se(t,e,n){const s=t-n,i=e*s;return n+i}function Jn(t,e,n,s,i){return i!==void 0&&(t=se(t,i,s)),se(t,n,s)+e}function Oe(t,e=0,n=1,s,i){t.min=Jn(t.min,e,n,s,i),t.max=Jn(t.max,e,n,s,i)}function ki(t,{x:e,y:n}){Oe(t.x,e.translate,e.scale,e.originPoint),Oe(t.y,n.translate,n.scale,n.originPoint)}function pl(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let o,r;for(let a=0;a1.0000000000001||t<.999999999999?t:1}function tt(t,e){t.min=t.min+e,t.max=t.max+e}function ts(t,e,[n,s,i]){const o=e[i]!==void 0?e[i]:.5,r=M(t.min,t.max,o);Oe(t,e[n],e[s],r,e.scale)}const ml=["x","scaleX","originX"],gl=["y","scaleY","originY"];function xt(t,e){ts(t.x,e,ml),ts(t.y,e,gl)}function Fi(t,e){return Ei(fl(t.getBoundingClientRect(),e))}function yl(t,e,n){const s=Fi(t,n),{scroll:i}=e;return i&&(tt(s.x,i.offset.x),tt(s.y,i.offset.y)),s}const Bi=({current:t})=>t?t.ownerDocument.defaultView:null,vl=new WeakMap;class bl{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=R(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(le(u,"page").point)},o=(u,d)=>{const{drag:h,dragPropagation:f,onDragStart:m}=this.getProps();if(h&&!f&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Ys(h),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),G(g=>{let v=this.getAxisMotionValue(g).get()||0;if(W.test(v)){const{projection:b}=this.visualElement;if(b&&b.layout){const y=b.layout.layoutBox[g];y&&(v=U(y)*(parseFloat(v)/100))}}this.originPoint[g]=v}),m&&m(u,d);const{animationState:p}=this.visualElement;p&&p.setActive("whileDrag",!0)},r=(u,d)=>{const{dragPropagation:h,dragDirectionLock:f,onDirectionLock:m,onDrag:p}=this.getProps();if(!h&&!this.openGlobalLock)return;const{offset:g}=d;if(f&&this.currentDirection===null){this.currentDirection=xl(g),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",d.point,g),this.updateAxis("y",d.point,g),this.visualElement.render(),p&&p(u,d)},a=(u,d)=>this.stop(u,d),l=()=>G(u=>{var d;return this.getAnimationState(u)==="paused"&&((d=this.getAxisMotionValue(u).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Ri(e,{onSessionStart:i,onStart:o,onMove:r,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:Bi(this.visualElement)})}stop(e,n){const s=this.isDragging;if(this.cancel(),!s)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&o(e,n)}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!$t(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let r=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(r=ol(r,this.constraints[e],this.elastic[e])),o.set(r)}resolveConstraints(){var e;const{dragConstraints:n,dragElastic:s}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,o=this.constraints;n&&yt(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=al(i.layoutBox,n):this.constraints=!1,this.elastic=dl(s),o!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&G(r=>{this.constraints!==!1&&this.getAxisMotionValue(r)&&(this.constraints[r]=ul(i.layoutBox[r],this.constraints[r]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!yt(e))return!1;const s=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=yl(s,i.root,this.visualElement.getTransformPagePoint());let r=ll(i.layout.layoutBox,o);if(n){const a=n(hl(r));this.hasMutatedConstraints=!!a,a&&(r=Ei(a))}return r}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=G(u=>{if(!$t(u,n,this.currentDirection))return;let d=l&&l[u]||{};r&&(d={min:0,max:0});const h=i?200:1e6,f=i?40:1e7,m={type:"inertia",velocity:s?e[u]:0,bounceStiffness:h,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...o,...d};return this.startAxisValueAnimation(u,m)});return Promise.all(c).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return s.start(dn(e,s,0,n,this.visualElement))}stopAnimation(){G(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){G(e=>{var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){G(n=>{const{drag:s}=this.getProps();if(!$t(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:r,max:a}=i.layout.layoutBox[n];o.set(e[n]-M(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!yt(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};G(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const l=a.get();i[r]=cl({min:l,max:l},this.constraints[r])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),G(r=>{if(!$t(r,e,null))return;const a=this.getAxisMotionValue(r),{min:l,max:c}=this.constraints[r];a.set(M(l,c,i[r]))})}addListeners(){if(!this.visualElement.current)return;vl.set(this.visualElement,this);const e=this.visualElement.current,n=Y(e,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();yt(l)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),s();const r=H(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(G(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())});return()=>{r(),n(),o(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:r=Be,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function $t(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function xl(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class wl extends ot{constructor(e){super(e),this.removeGroupControls=I,this.removeListeners=I,this.controls=new bl(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||I}unmount(){this.removeGroupControls(),this.removeListeners()}}const es=t=>(e,n)=>{t&&t(e,n)};class Tl extends ot{constructor(){super(...arguments),this.removePointerDownListener=I}onPointerDown(e){this.session=new Ri(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Bi(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:es(e),onStart:es(n),onMove:s,onEnd:(o,r)=>{delete this.session,i&&i(o,r)}}}mount(){this.removePointerDownListener=Y(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function Pl(){const t=P.useContext(Ue);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:n,register:s}=t,i=P.useId();return P.useEffect(()=>s(i),[]),!e&&n?[!1,()=>n&&n(i)]:[!0]}const qt={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function ns(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Vt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(x.test(t))t=parseFloat(t);else return t;const n=ns(t,e.target.x),s=ns(t,e.target.y);return`${n}% ${s}%`}},Sl={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=rt.parse(t);if(i.length>5)return s;const o=rt.createTransformer(t),r=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+r]/=a,i[1+r]/=l;const c=M(a,l,.5);return typeof i[2+r]=="number"&&(i[2+r]/=c),typeof i[3+r]=="number"&&(i[3+r]/=c),o(i)}};class Al extends P.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:o}=e;wr(Vl),o&&(n.group&&n.group.add(o),s&&s.register&&i&&s.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),qt.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:o}=this.props,r=s.projection;return r&&(r.isPresent=o,i||e.layoutDependency!==n||n===void 0?r.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?r.promote():r.relegate()||k.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),_e.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function ji(t){const[e,n]=Pl(),s=P.useContext(Ls);return Se.jsx(Al,{...t,layoutGroup:s,switchLayoutGroup:P.useContext(ks),isPresent:e,safeToRemove:n})}const Vl={borderRadius:{...Vt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Vt,borderTopRightRadius:Vt,borderBottomLeftRadius:Vt,borderBottomRightRadius:Vt,boxShadow:Sl},Oi=["TopLeft","TopRight","BottomLeft","BottomRight"],Cl=Oi.length,ss=t=>typeof t=="string"?parseFloat(t):t,is=t=>typeof t=="number"||x.test(t);function Ml(t,e,n,s,i,o){i?(t.opacity=M(0,n.opacity!==void 0?n.opacity:1,Rl(s)),t.opacityExit=M(e.opacity!==void 0?e.opacity:1,0,Dl(s))):o&&(t.opacity=M(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,s));for(let r=0;rse?1:n(jt(t,e,s))}function os(t,e){t.min=e.min,t.max=e.max}function z(t,e){os(t.x,e.x),os(t.y,e.y)}function as(t,e,n,s,i){return t-=e,t=se(t,1/n,s),i!==void 0&&(t=se(t,1/i,s)),t}function El(t,e=0,n=1,s=.5,i,o=t,r=t){if(W.test(e)&&(e=parseFloat(e),e=M(r.min,r.max,e/100)-r.min),typeof e!="number")return;let a=M(o.min,o.max,s);t===o&&(a-=e),t.min=as(t.min,e,n,a,i),t.max=as(t.max,e,n,a,i)}function ls(t,e,[n,s,i],o,r){El(t,e[n],e[s],e[i],e.scale,o,r)}const Ll=["x","scaleX","originX"],kl=["y","scaleY","originY"];function cs(t,e,n,s){ls(t.x,e,Ll,n?n.x:void 0,s?s.x:void 0),ls(t.y,e,kl,n?n.y:void 0,s?s.y:void 0)}function us(t){return t.translate===0&&t.scale===1}function Ni(t){return us(t.x)&&us(t.y)}function Fl(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function Ui(t,e){return Math.round(t.x.min)===Math.round(e.x.min)&&Math.round(t.x.max)===Math.round(e.x.max)&&Math.round(t.y.min)===Math.round(e.y.min)&&Math.round(t.y.max)===Math.round(e.y.max)}function ds(t){return U(t.x)/U(t.y)}class Bl{constructor(){this.members=[]}add(e){hn(this.members,e),e.scheduleRender()}remove(e){if(fn(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){s=o;break}}return s?(this.promote(s),!0):!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,n&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function hs(t,e,n){let s="";const i=t.x.translate/e.x,o=t.y.translate/e.y,r=n?.z||0;if((i||o||r)&&(s=`translate3d(${i}px, ${o}px, ${r}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:h,skewX:f,skewY:m}=n;c&&(s=`perspective(${c}px) ${s}`),u&&(s+=`rotate(${u}deg) `),d&&(s+=`rotateX(${d}deg) `),h&&(s+=`rotateY(${h}deg) `),f&&(s+=`skewX(${f}deg) `),m&&(s+=`skewY(${m}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}const jl=(t,e)=>t.depth-e.depth;class Ol{constructor(){this.children=[],this.isDirty=!1}add(e){hn(this.children,e),this.isDirty=!0}remove(e){fn(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(jl),this.isDirty=!1,this.children.forEach(e)}}function Il(t,e){const n=nt.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(it(s),t(o-e))};return k.read(s,!0),()=>it(s)}function Nl(t){window.MotionDebug&&window.MotionDebug.record(t)}function Ul(t){return t instanceof SVGElement&&t.tagName!=="svg"}function zl(t,e,n){const s=O(t)?t:Ot(t);return s.start(dn("",s,e,n)),s.animation}const we=["","X","Y","Z"],Gl={visibility:"hidden"},fs=1e3;let _l=0;const dt={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function Te(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function zi({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},a=e?.()){this.id=_l++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,dt.totalNodes=dt.resolvedTargetDeltas=dt.recalculatedProjection=0,this.nodes.forEach($l),this.nodes.forEach(Zl),this.nodes.forEach(Jl),this.nodes.forEach(Hl),Nl(dt)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;lthis.root.updateBlockedByResize=!1;t(r,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=Il(h,250),qt.hasAnimatedSinceResize&&(qt.hasAnimatedSinceResize=!1,this.nodes.forEach(ms))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h,hasRelativeTargetChanged:f,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||u.getDefaultTransition()||sc,{onLayoutAnimationStart:g,onLayoutAnimationComplete:v}=u.getProps(),b=!this.targetLayout||!Ui(this.targetLayout,m)||f,y=!h&&f;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||y||h&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,y);const T={...en(p,"layout"),onPlay:g,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T)}else h||ms(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,it(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Ql),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;uthis.update()))}clearAllSnapshots(){this.nodes.forEach(Yl),this.sharedNodes.forEach(tc)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,k.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){k.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{const A=T/1e3;gs(d.x,r.x,A),gs(d.y,r.y,A),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(kt(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),ec(this.relativeTarget,this.relativeTargetOrigin,h,A),y&&Fl(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=R()),z(y,this.relativeTarget)),p&&(this.animationValues=u,Ml(u,c,this.latestValues,A,b,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=A},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(it(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=k.update(()=>{qt.hasAnimatedSinceResize=!0,this.currentAnimation=zl(0,fs,{...r,onUpdate:a=>{this.mixTargetDelta(a),r.onUpdate&&r.onUpdate(a)},onComplete:()=>{r.onComplete&&r.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(fs),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=r;if(!(!a||!l||!c)){if(this!==r&&this.layout&&c&&Gi(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||R();const d=U(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+d;const h=U(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+h}z(a,l),xt(a,u),Lt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new Bl),this.sharedNodes.get(r).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){var r;const{layoutId:a}=this.options;return a?((r=this.getStack())===null||r===void 0?void 0:r.lead)||this:this}getPrevLead(){var r;const{layoutId:a}=this.options;return a?(r=this.getStack())===null||r===void 0?void 0:r.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),r&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let a=!1;const{latestValues:l}=r;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&Te("z",r,c,this.animationValues);for(let u=0;u{var a;return(a=r.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(ps),this.root.sharedNodes.clear()}}}function Kl(t){t.updateLayout()}function Wl(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=t.layout,{animationType:o}=t.options,r=n.source!==t.layout.source;o==="size"?G(d=>{const h=r?n.measuredBox[d]:n.layoutBox[d],f=U(h);h.min=s[d].min,h.max=h.min+f}):Gi(o,n.layoutBox,s)&&G(d=>{const h=r?n.measuredBox[d]:n.layoutBox[d],f=U(s[d]);h.max=h.min+f,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[d].max=t.relativeTarget[d].min+f)});const a=bt();Lt(a,s,n.layoutBox);const l=bt();r?Lt(l,t.applyTransform(i,!0),n.measuredBox):Lt(l,s,n.layoutBox);const c=!Ni(a);let u=!1;if(!t.resumeFrom){const d=t.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:h,layout:f}=d;if(h&&f){const m=R();kt(m,n.layoutBox,h.layoutBox);const p=R();kt(p,s,f.layoutBox),Ui(m,p)||(u=!0),d.options.layoutRoot&&(t.relativeTarget=p,t.relativeTargetOrigin=m,t.relativeParent=d)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeTargetChanged:u})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function $l(t){dt.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Hl(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Yl(t){t.clearSnapshot()}function ps(t){t.clearMeasurements()}function Xl(t){t.isLayoutDirty=!1}function ql(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function ms(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Zl(t){t.resolveTargetDelta()}function Jl(t){t.calcProjection()}function Ql(t){t.resetSkewAndRotation()}function tc(t){t.removeLeadSnapshot()}function gs(t,e,n){t.translate=M(e.translate,0,n),t.scale=M(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function ys(t,e,n,s){t.min=M(e.min,n.min,s),t.max=M(e.max,n.max,s)}function ec(t,e,n,s){ys(t.x,e.x,n.x,s),ys(t.y,e.y,n.y,s)}function nc(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const sc={duration:.45,ease:[.4,0,.1,1]},vs=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),bs=vs("applewebkit/")&&!vs("chrome/")?Math.round:I;function xs(t){t.min=bs(t.min),t.max=bs(t.max)}function ic(t){xs(t.x),xs(t.y)}function Gi(t,e,n){return t==="position"||t==="preserve-aspect"&&!Fe(ds(e),ds(n),.2)}const rc=zi({attachResizeListener:(t,e)=>H(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Pe={current:void 0},_i=zi({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Pe.current){const t=new rc({});t.mount(window),t.setOptions({layoutScroll:!0}),Pe.current=t}return Pe.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),oc={pan:{Feature:Tl},drag:{Feature:wl,ProjectionNode:_i,MeasureLayout:ji}},Ie={current:null},Ki={current:!1};function ac(){if(Ki.current=!0,!!ze)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Ie.current=t.matches;t.addListener(e),e()}else Ie.current=!1}function lc(t,e,n){const{willChange:s}=e;for(const i in e){const o=e[i],r=n[i];if(O(o))t.addValue(i,o),ne(s)&&s.add(i);else if(O(r))t.addValue(i,Ot(o,{owner:t})),ne(s)&&s.remove(i);else if(r!==o)if(t.hasValue(i)){const a=t.getValue(i);a.liveStyle===!0?a.jump(o):a.hasAnimated||a.set(o)}else{const a=t.getStaticValue(i);t.addValue(i,Ot(a!==void 0?a:o,{owner:t}))}}for(const i in n)e[i]===void 0&&t.removeValue(i);return e}const ws=new WeakMap,cc=[...si,j,rt],uc=t=>cc.find(ni(t)),Wi=Object.keys(Bt),dc=Wi.length,Ts=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],hc=We.length;function $i(t){if(t)return t.options.allowProjection!==!1?t.projection:$i(t.parent)}class fc{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:o,visualState:r},a={}){this.resolveKeyframes=(h,f,m,p)=>new this.KeyframeResolver(h,f,m,p,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=nn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>k.render(this.render,!1,!0);const{latestValues:l,renderState:c}=r;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=ae(n),this.isVariantNode=Es(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in d){const f=d[h];l[h]!==void 0&&O(f)&&(f.set(l[h],!1),ne(u)&&u.add(h))}}mount(e){this.current=e,ws.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),Ki.current||ac(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ie.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){var e;ws.delete(this.current),this.projection&&this.projection.unmount(),it(this.notifyUpdate),it(this.render),this.valueSubscriptions.forEach(n=>n()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const n in this.events)this.events[n].clear();for(const n in this.features)(e=this.features[n])===null||e===void 0||e.unmount();this.current=null}bindToMotionValue(e,n){const s=mt.has(e),i=n.on("change",r=>{this.latestValues[e]=r,this.props.onUpdate&&k.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{i(),o(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures({children:e,...n},s,i,o){let r,a;for(let l=0;lthis.scheduleRender(),animationType:typeof c=="string"?c:"both",initialPromotionConfig:o,layoutScroll:h,layoutRoot:f})}return a}updateFeatures(){for(const e in this.features){const n=this.features[e];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):R()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;sn.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=Ot(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){var s;let i=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(s=this.getBaseTargetFromProps(this.props,e))!==null&&s!==void 0?s:this.readValueFromInstance(this.current,e,this.options);return i!=null&&(typeof i=="string"&&(ti(i)||Js(i))?i=parseFloat(i):!uc(i)&&rt.test(n)&&(i=di(e,n)),this.setBaseTarget(e,O(i)?i.get():i)),O(i)?i.get():i}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:s}=this.props;let i;if(typeof s=="string"||typeof s=="object"){const r=tn(this.props,s,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);r&&(i=r[e])}if(s&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,e);return o!==void 0&&!O(o)?o:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new pn),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class Hi extends fc{constructor(){super(...arguments),this.KeyframeResolver=hi}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}}function pc(t){return window.getComputedStyle(t)}class mc extends Hi{constructor(){super(...arguments),this.type="html"}readValueFromInstance(e,n){if(mt.has(n)){const s=rn(n);return s&&s.default||0}else{const s=pc(e),i=(js(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Fi(e,n)}build(e,n,s,i){Xe(e,n,s,i.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return Qe(e,n,s)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;O(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(e,n,s,i){zs(e,n,s,i)}}class gc extends Hi{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(mt.has(n)){const s=rn(n);return s&&s.default||0}return n=Gs.has(n)?n:Ge(n),e.getAttribute(n)}measureInstanceViewportBox(){return R()}scrapeMotionValuesFromProps(e,n,s){return Ks(e,n,s)}build(e,n,s,i){Ze(e,n,s,this.isSVGTag,i.transformTemplate)}renderInstance(e,n,s,i){_s(e,n,s,i)}mount(e){this.isSVGTag=Je(e.tagName),super.mount(e)}}const yc=(t,e)=>$e(t)?new gc(e,{enableHardwareAcceleration:!1}):new mc(e,{allowProjection:t!==P.Fragment,enableHardwareAcceleration:!0}),vc={layout:{ProjectionNode:_i,MeasureLayout:ji}},bc={...el,...uo,...oc,...vc},tu=br((t,e)=>Zr(t,e,bc,yc));function Yi(t){var e,n,s="";if(typeof t=="string"||typeof t=="number")s+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;er(o))?.classGroupId}const Ps=/^\[(.+)\]$/;function wc(t){if(Ps.test(t)){const e=Ps.exec(t)[1],n=e?.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}}function Tc(t){const{theme:e,prefix:n}=t,s={nextPart:new Map,validators:[]};return Sc(Object.entries(t.classGroups),n).forEach(([o,r])=>{Ne(r,s,o,e)}),s}function Ne(t,e,n,s){t.forEach(i=>{if(typeof i=="string"){const o=i===""?e:Ss(e,i);o.classGroupId=n;return}if(typeof i=="function"){if(Pc(i)){Ne(i(s),e,n,s);return}e.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([o,r])=>{Ne(r,Ss(e,o),n,s)})})}function Ss(t,e){let n=t;return e.split(mn).forEach(s=>{n.nextPart.has(s)||n.nextPart.set(s,{nextPart:new Map,validators:[]}),n=n.nextPart.get(s)}),n}function Pc(t){return t.isThemeGetter}function Sc(t,e){return e?t.map(([n,s])=>{const i=s.map(o=>typeof o=="string"?e+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([r,a])=>[e+r,a])):o);return[n,i]}):t}function Ac(t){if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=new Map,s=new Map;function i(o,r){n.set(o,r),e++,e>t&&(e=0,s=n,n=new Map)}return{get(o){let r=n.get(o);if(r!==void 0)return r;if((r=s.get(o))!==void 0)return i(o,r),r},set(o,r){n.has(o)?n.set(o,r):i(o,r)}}}const qi="!";function Vc(t){const e=t.separator,n=e.length===1,s=e[0],i=e.length;return function(r){const a=[];let l=0,c=0,u;for(let p=0;pc?u-c:void 0;return{modifiers:a,hasImportantModifier:h,baseClassName:f,maybePostfixModifierPosition:m}}}function Cc(t){if(t.length<=1)return t;const e=[];let n=[];return t.forEach(s=>{s[0]==="["?(e.push(...n.sort(),s),n=[]):n.push(s)}),e.push(...n.sort()),e}function Mc(t){return{cache:Ac(t.cacheSize),splitModifiers:Vc(t),...xc(t)}}const Rc=/\s+/;function Dc(t,e){const{splitModifiers:n,getClassGroupId:s,getConflictingClassGroupIds:i}=e,o=new Set;return t.trim().split(Rc).map(r=>{const{modifiers:a,hasImportantModifier:l,baseClassName:c,maybePostfixModifierPosition:u}=n(r);let d=s(u?c.substring(0,u):c),h=!!u;if(!d){if(!u)return{isTailwindClass:!1,originalClassName:r};if(d=s(c),!d)return{isTailwindClass:!1,originalClassName:r};h=!1}const f=Cc(a).join(":");return{isTailwindClass:!0,modifierId:l?f+qi:f,classGroupId:d,originalClassName:r,hasPostfixModifier:h}}).reverse().filter(r=>{if(!r.isTailwindClass)return!0;const{modifierId:a,classGroupId:l,hasPostfixModifier:c}=r,u=a+l;return o.has(u)?!1:(o.add(u),i(l,c).forEach(d=>o.add(a+d)),!0)}).reverse().map(r=>r.originalClassName).join(" ")}function Ec(){let t=0,e,n,s="";for(;td(u),t());return n=Mc(c),s=n.cache.get,i=n.cache.set,o=a,a(l)}function a(l){const c=s(l);if(c)return c;const u=Dc(l,n);return i(l,u),u}return function(){return o(Ec.apply(null,arguments))}}function C(t){const e=n=>n[t]||[];return e.isThemeGetter=!0,e}const Ji=/^\[(?:([a-z-]+):)?(.+)\]$/i,kc=/^\d+\/\d+$/,Fc=new Set(["px","full","screen"]),Bc=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,jc=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Oc=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Ic=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Nc=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function $(t){return ft(t)||Fc.has(t)||kc.test(t)}function Z(t){return Pt(t,"length",Hc)}function ft(t){return!!t&&!Number.isNaN(Number(t))}function Ht(t){return Pt(t,"number",ft)}function Ct(t){return!!t&&Number.isInteger(Number(t))}function Uc(t){return t.endsWith("%")&&ft(t.slice(0,-1))}function w(t){return Ji.test(t)}function J(t){return Bc.test(t)}const zc=new Set(["length","size","percentage"]);function Gc(t){return Pt(t,zc,Qi)}function _c(t){return Pt(t,"position",Qi)}const Kc=new Set(["image","url"]);function Wc(t){return Pt(t,Kc,Xc)}function $c(t){return Pt(t,"",Yc)}function Mt(){return!0}function Pt(t,e,n){const s=Ji.exec(t);return s?s[1]?typeof e=="string"?s[1]===e:e.has(s[1]):n(s[2]):!1}function Hc(t){return jc.test(t)&&!Oc.test(t)}function Qi(){return!1}function Yc(t){return Ic.test(t)}function Xc(t){return Nc.test(t)}function qc(){const t=C("colors"),e=C("spacing"),n=C("blur"),s=C("brightness"),i=C("borderColor"),o=C("borderRadius"),r=C("borderSpacing"),a=C("borderWidth"),l=C("contrast"),c=C("grayscale"),u=C("hueRotate"),d=C("invert"),h=C("gap"),f=C("gradientColorStops"),m=C("gradientColorStopPositions"),p=C("inset"),g=C("margin"),v=C("opacity"),b=C("padding"),y=C("saturate"),T=C("scale"),A=C("sepia"),D=C("skew"),_=C("space"),S=C("translate"),F=()=>["auto","contain","none"],B=()=>["auto","hidden","clip","visible","scroll"],K=()=>["auto",w,e],V=()=>[w,e],Gt=()=>["",$,Z],at=()=>["auto",ft,w],E=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],N=()=>["solid","dashed","dotted","double","none"],gt=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],lt=()=>["start","end","center","between","around","evenly","stretch"],St=()=>["","0",w],gn=()=>["auto","avoid","all","avoid-page","page","left","right","column"],At=()=>[ft,Ht],_t=()=>[ft,w];return{cacheSize:500,separator:":",theme:{colors:[Mt],spacing:[$,Z],blur:["none","",J,w],brightness:At(),borderColor:[t],borderRadius:["none","","full",J,w],borderSpacing:V(),borderWidth:Gt(),contrast:At(),grayscale:St(),hueRotate:_t(),invert:St(),gap:V(),gradientColorStops:[t],gradientColorStopPositions:[Uc,Z],inset:K(),margin:K(),opacity:At(),padding:V(),saturate:At(),scale:At(),sepia:St(),skew:_t(),space:V(),translate:V()},classGroups:{aspect:[{aspect:["auto","square","video",w]}],container:["container"],columns:[{columns:[J]}],"break-after":[{"break-after":gn()}],"break-before":[{"break-before":gn()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...E(),w]}],overflow:[{overflow:B()}],"overflow-x":[{"overflow-x":B()}],"overflow-y":[{"overflow-y":B()}],overscroll:[{overscroll:F()}],"overscroll-x":[{"overscroll-x":F()}],"overscroll-y":[{"overscroll-y":F()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[p]}],"inset-x":[{"inset-x":[p]}],"inset-y":[{"inset-y":[p]}],start:[{start:[p]}],end:[{end:[p]}],top:[{top:[p]}],right:[{right:[p]}],bottom:[{bottom:[p]}],left:[{left:[p]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ct,w]}],basis:[{basis:K()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",w]}],grow:[{grow:St()}],shrink:[{shrink:St()}],order:[{order:["first","last","none",Ct,w]}],"grid-cols":[{"grid-cols":[Mt]}],"col-start-end":[{col:["auto",{span:["full",Ct,w]},w]}],"col-start":[{"col-start":at()}],"col-end":[{"col-end":at()}],"grid-rows":[{"grid-rows":[Mt]}],"row-start-end":[{row:["auto",{span:[Ct,w]},w]}],"row-start":[{"row-start":at()}],"row-end":[{"row-end":at()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",w]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",w]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...lt()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...lt(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...lt(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[_]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[_]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",w,e]}],"min-w":[{"min-w":[w,e,"min","max","fit"]}],"max-w":[{"max-w":[w,e,"none","full","min","max","fit","prose",{screen:[J]},J]}],h:[{h:[w,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[w,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[w,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[w,e,"auto","min","max","fit"]}],"font-size":[{text:["base",J,Z]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ht]}],"font-family":[{font:[Mt]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",w]}],"line-clamp":[{"line-clamp":["none",ft,Ht]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",$,w]}],"list-image":[{"list-image":["none",w]}],"list-style-type":[{list:["none","disc","decimal",w]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...N(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",$,Z]}],"underline-offset":[{"underline-offset":["auto",$,w]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:V()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",w]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",w]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...E(),_c]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Gc]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Wc]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...N(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:N()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...N()]}],"outline-offset":[{"outline-offset":[$,w]}],"outline-w":[{outline:[$,Z]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:Gt()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[$,Z]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",J,$c]}],"shadow-color":[{shadow:[Mt]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...gt(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":gt()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[s]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",J,w]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[y]}],sepia:[{sepia:[A]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[s]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[A]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[r]}],"border-spacing-x":[{"border-spacing-x":[r]}],"border-spacing-y":[{"border-spacing-y":[r]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",w]}],duration:[{duration:_t()}],ease:[{ease:["linear","in","out","in-out",w]}],delay:[{delay:_t()}],animate:[{animate:["none","spin","ping","pulse","bounce",w]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[Ct,w]}],"translate-x":[{"translate-x":[S]}],"translate-y":[{"translate-y":[S]}],"skew-x":[{"skew-x":[D]}],"skew-y":[{"skew-y":[D]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",w]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",w]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":V()}],"scroll-mx":[{"scroll-mx":V()}],"scroll-my":[{"scroll-my":V()}],"scroll-ms":[{"scroll-ms":V()}],"scroll-me":[{"scroll-me":V()}],"scroll-mt":[{"scroll-mt":V()}],"scroll-mr":[{"scroll-mr":V()}],"scroll-mb":[{"scroll-mb":V()}],"scroll-ml":[{"scroll-ml":V()}],"scroll-p":[{"scroll-p":V()}],"scroll-px":[{"scroll-px":V()}],"scroll-py":[{"scroll-py":V()}],"scroll-ps":[{"scroll-ps":V()}],"scroll-pe":[{"scroll-pe":V()}],"scroll-pt":[{"scroll-pt":V()}],"scroll-pr":[{"scroll-pr":V()}],"scroll-pb":[{"scroll-pb":V()}],"scroll-pl":[{"scroll-pl":V()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",w]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[$,Z,Ht]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const nu=Lc(qc);export{eu as c,Se as j,tu as m,nu as t}; diff --git a/docs/_astro/bundle-mjs.Dg1gdp8d.js b/docs/_astro/bundle-mjs.Dg1gdp8d.js new file mode 100644 index 0000000..6fc54d2 --- /dev/null +++ b/docs/_astro/bundle-mjs.Dg1gdp8d.js @@ -0,0 +1 @@ +import{j as Pe}from"./jsx-runtime.BFYNFNPI.js";import{a as P}from"./index.DIpCM_17.js";const Ss=P.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),ie=P.createContext({}),Ne=P.createContext(null),Ue=typeof document<"u",Zi=Ue?P.useLayoutEffect:P.useEffect,As=P.createContext({strict:!1}),ze=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Ji="framerAppearId",Vs="data-"+ze(Ji),Qi={skipAnimations:!1,useManualTiming:!1};class gn{constructor(){this.order=[],this.scheduled=new Set}add(e){if(!this.scheduled.has(e))return this.scheduled.add(e),this.order.push(e),!0}remove(e){const n=this.order.indexOf(e);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(e))}clear(){this.order.length=0,this.scheduled.clear()}}function tr(t){let e=new gn,n=new gn,s=0,i=!1,o=!1;const r=new WeakSet,a={schedule:(l,c=!1,u=!1)=>{const d=u&&i,h=d?e:n;return c&&r.add(l),h.add(l)&&d&&i&&(s=e.order.length),l},cancel:l=>{n.remove(l),r.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[e,n]=[n,e],n.clear(),s=e.order.length,s)for(let c=0;c(d[h]=tr(()=>n=!0),d),{}),r=d=>{o[d].process(i)},a=()=>{const d=performance.now();n=!1,i.delta=s?1e3/60:Math.max(Math.min(d-i.timestamp,er),1),i.timestamp=d,i.isProcessing=!0,Wt.forEach(r),i.isProcessing=!1,n&&e&&(s=!1,t(a))},l=()=>{n=!0,s=!0,i.isProcessing||t(a)};return{schedule:Wt.reduce((d,h)=>{const f=o[h];return d[h]=(m,p=!1,g=!1)=>(n||l(),f.schedule(m,p,g)),d},{}),cancel:d=>Wt.forEach(h=>o[h].cancel(d)),state:i,steps:o}}const{schedule:Ge,cancel:Wc}=Cs(queueMicrotask,!1);function nr(t,e,n,s){const{visualElement:i}=P.useContext(ie),o=P.useContext(As),r=P.useContext(Ne),a=P.useContext(Ss).reducedMotion,l=P.useRef();s=s||o.renderer,!l.current&&s&&(l.current=s(t,{visualState:e,parent:i,props:n,presenceContext:r,blockInitialAnimation:r?r.initial===!1:!1,reducedMotionConfig:a}));const c=l.current;P.useInsertionEffect(()=>{c&&c.update(n,r)});const u=P.useRef(!!(n[Vs]&&!window.HandoffComplete));return Zi(()=>{c&&(Ge.postRender(c.render),u.current&&c.animationState&&c.animationState.animateChanges())}),P.useEffect(()=>{c&&(c.updateFeatures(),!u.current&&c.animationState&&c.animationState.animateChanges(),u.current&&(u.current=!1,window.HandoffComplete=!0))}),c}function yt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function sr(t,e,n){return P.useCallback(s=>{s&&t.mount&&t.mount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):yt(n)&&(n.current=s))},[e])}function Ft(t){return typeof t=="string"||Array.isArray(t)}function re(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const Ke=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],We=["initial",...Ke];function oe(t){return re(t.animate)||We.some(e=>Ft(t[e]))}function Ms(t){return!!(oe(t)||t.variants)}function ir(t,e){if(oe(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Ft(n)?n:void 0,animate:Ft(s)?s:void 0}}return t.inherit!==!1?e:{}}function rr(t){const{initial:e,animate:n}=ir(t,P.useContext(ie));return P.useMemo(()=>({initial:e,animate:n}),[yn(e),yn(n)])}function yn(t){return Array.isArray(t)?t.join(" "):t}const vn={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Bt={};for(const t in vn)Bt[t]={isEnabled:e=>vn[t].some(n=>!!e[n])};function or(t){for(const e in t)Bt[e]={...Bt[e],...t[e]}}const Rs=P.createContext({}),Ds=P.createContext({}),ar=Symbol.for("motionComponentSymbol");function lr({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:s,Component:i}){t&&or(t);function o(a,l){let c;const u={...P.useContext(Ss),...a,layoutId:cr(a)},{isStatic:d}=u,h=rr(a),f=s(a,d);if(!d&&Ue){h.visualElement=nr(i,f,u,e);const m=P.useContext(Ds),p=P.useContext(As).strict;h.visualElement&&(c=h.visualElement.loadFeatures(u,p,t,m))}return Pe.jsxs(ie.Provider,{value:h,children:[c&&h.visualElement?Pe.jsx(c,{visualElement:h.visualElement,...u}):null,n(i,a,sr(f,h.visualElement,l),f,d,h.visualElement)]})}const r=P.forwardRef(o);return r[ar]=i,r}function cr({layoutId:t}){const e=P.useContext(Rs).id;return e&&t!==void 0?e+"-"+t:t}function ur(t){function e(s,i={}){return lr(t(s,i))}if(typeof Proxy>"u")return e;const n=new Map;return new Proxy(e,{get:(s,i)=>(n.has(i)||n.set(i,e(i)),n.get(i))})}const dr=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function $e(t){return typeof t!="string"||t.includes("-")?!1:!!(dr.indexOf(t)>-1||/[A-Z]/u.test(t))}const Zt={};function hr(t){Object.assign(Zt,t)}const Ot=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],mt=new Set(Ot);function Es(t,{layout:e,layoutId:n}){return mt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Zt[t]||t==="opacity")}const I=t=>!!(t&&t.getVelocity),fr={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},pr=Ot.length;function mr(t,{enableHardwareAcceleration:e=!0,allowTransformNone:n=!0},s,i){let o="";for(let r=0;re=>typeof e=="string"&&e.startsWith(t),ks=Ls("--"),gr=Ls("var(--"),_e=t=>gr(t)?yr.test(t.split("/*")[0].trim()):!1,yr=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,vr=(t,e)=>e&&typeof t=="number"?e.transform(t):t,st=(t,e,n)=>n>e?e:ntypeof t=="number",parse:parseFloat,transform:t=>t},Dt={...Tt,transform:t=>st(0,1,t)},$t={...Tt,default:1},Et=t=>Math.round(t*1e5)/1e5,He=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,br=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,xr=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function Nt(t){return typeof t=="string"}const Ut=t=>({test:e=>Nt(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Q=Ut("deg"),$=Ut("%"),x=Ut("px"),wr=Ut("vh"),Tr=Ut("vw"),bn={...$,parse:t=>$.parse(t)/100,transform:t=>$.transform(t*100)},xn={...Tt,transform:Math.round},Fs={borderWidth:x,borderTopWidth:x,borderRightWidth:x,borderBottomWidth:x,borderLeftWidth:x,borderRadius:x,radius:x,borderTopLeftRadius:x,borderTopRightRadius:x,borderBottomRightRadius:x,borderBottomLeftRadius:x,width:x,maxWidth:x,height:x,maxHeight:x,size:x,top:x,right:x,bottom:x,left:x,padding:x,paddingTop:x,paddingRight:x,paddingBottom:x,paddingLeft:x,margin:x,marginTop:x,marginRight:x,marginBottom:x,marginLeft:x,rotate:Q,rotateX:Q,rotateY:Q,rotateZ:Q,scale:$t,scaleX:$t,scaleY:$t,scaleZ:$t,skew:Q,skewX:Q,skewY:Q,distance:x,translateX:x,translateY:x,translateZ:x,x,y:x,z:x,perspective:x,transformPerspective:x,opacity:Dt,originX:bn,originY:bn,originZ:x,zIndex:xn,backgroundPositionX:x,backgroundPositionY:x,fillOpacity:Dt,strokeOpacity:Dt,numOctaves:xn};function Ye(t,e,n,s){const{style:i,vars:o,transform:r,transformOrigin:a}=t;let l=!1,c=!1,u=!0;for(const d in e){const h=e[d];if(ks(d)){o[d]=h;continue}const f=Fs[d],m=vr(h,f);if(mt.has(d)){if(l=!0,r[d]=m,!u)continue;h!==(f.default||0)&&(u=!1)}else d.startsWith("origin")?(c=!0,a[d]=m):i[d]=m}if(e.transform||(l||s?i.transform=mr(t.transform,n,u,s):i.transform&&(i.transform="none")),c){const{originX:d="50%",originY:h="50%",originZ:f=0}=a;i.transformOrigin=`${d} ${h} ${f}`}}const Xe=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Bs(t,e,n){for(const s in e)!I(e[s])&&!Es(s,n)&&(t[s]=e[s])}function Pr({transformTemplate:t},e,n){return P.useMemo(()=>{const s=Xe();return Ye(s,e,{enableHardwareAcceleration:!n},t),Object.assign({},s.vars,s.style)},[e])}function Sr(t,e,n){const s=t.style||{},i={};return Bs(i,s,t),Object.assign(i,Pr(t,e,n)),i}function Ar(t,e,n){const s={},i=Sr(t,e,n);return t.drag&&t.dragListener!==!1&&(s.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(s.tabIndex=0),s.style=i,s}const Vr=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Jt(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Vr.has(t)}let js=t=>!Jt(t);function Cr(t){t&&(js=e=>e.startsWith("on")?!Jt(e):t(e))}try{Cr(require("@emotion/is-prop-valid").default)}catch{}function Mr(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(js(i)||n===!0&&Jt(i)||!e&&!Jt(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}function wn(t,e,n){return typeof t=="string"?t:x.transform(e+n*t)}function Rr(t,e,n){const s=wn(e,t.x,t.width),i=wn(n,t.y,t.height);return`${s} ${i}`}const Dr={offset:"stroke-dashoffset",array:"stroke-dasharray"},Er={offset:"strokeDashoffset",array:"strokeDasharray"};function Lr(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?Dr:Er;t[o.offset]=x.transform(-s);const r=x.transform(e),a=x.transform(n);t[o.array]=`${r} ${a}`}function qe(t,{attrX:e,attrY:n,attrScale:s,originX:i,originY:o,pathLength:r,pathSpacing:a=1,pathOffset:l=0,...c},u,d,h){if(Ye(t,c,u,h),d){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:f,style:m,dimensions:p}=t;f.transform&&(p&&(m.transform=f.transform),delete f.transform),p&&(i!==void 0||o!==void 0||m.transform)&&(m.transformOrigin=Rr(p,i!==void 0?i:.5,o!==void 0?o:.5)),e!==void 0&&(f.x=e),n!==void 0&&(f.y=n),s!==void 0&&(f.scale=s),r!==void 0&&Lr(f,r,a,l,!1)}const Is=()=>({...Xe(),attrs:{}}),Ze=t=>typeof t=="string"&&t.toLowerCase()==="svg";function kr(t,e,n,s){const i=P.useMemo(()=>{const o=Is();return qe(o,e,{enableHardwareAcceleration:!1},Ze(s),t.transformTemplate),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};Bs(o,t.style,t),i.style={...o,...i.style}}return i}function Fr(t=!1){return(n,s,i,{latestValues:o},r)=>{const l=($e(n)?kr:Ar)(s,o,r,n),c=Mr(s,typeof n=="string",t),u=n!==P.Fragment?{...c,...l,ref:i}:{},{children:d}=s,h=P.useMemo(()=>I(d)?d.get():d,[d]);return P.createElement(n,{...u,children:h})}}function Os(t,{style:e,vars:n},s,i){Object.assign(t.style,e,i&&i.getProjectionStyles(s));for(const o in n)t.style.setProperty(o,n[o])}const Ns=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Us(t,e,n,s){Os(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Ns.has(i)?i:ze(i),e.attrs[i])}function Je(t,e,n){var s;const{style:i}=t,o={};for(const r in i)(I(i[r])||e.style&&I(e.style[r])||Es(r,t)||((s=n?.getValue(r))===null||s===void 0?void 0:s.liveStyle)!==void 0)&&(o[r]=i[r]);return o}function zs(t,e,n){const s=Je(t,e,n);for(const i in t)if(I(t[i])||I(e[i])){const o=Ot.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[o]=t[i]}return s}function Qe(t,e,n,s={},i={}){return typeof e=="function"&&(e=e(n!==void 0?n:t.custom,s,i)),typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"&&(e=e(n!==void 0?n:t.custom,s,i)),e}function Br(t){const e=P.useRef(null);return e.current===null&&(e.current=t()),e.current}const Se=t=>Array.isArray(t),jr=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),Ir=t=>Se(t)?t[t.length-1]||0:t;function Yt(t){const e=I(t)?t.get():t;return jr(e)?e.toValue():e}function Or({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},s,i,o){const r={latestValues:Nr(s,i,o,t),renderState:e()};return n&&(r.mount=a=>n(s,a,r)),r}const Gs=t=>(e,n)=>{const s=P.useContext(ie),i=P.useContext(Ne),o=()=>Or(t,e,s,i);return n?o():Br(o)};function Nr(t,e,n,s){const i={},o=s(t,{});for(const h in o)i[h]=Yt(o[h]);let{initial:r,animate:a}=t;const l=oe(t),c=Ms(t);e&&c&&!l&&t.inherit!==!1&&(r===void 0&&(r=e.initial),a===void 0&&(a=e.animate));let u=n?n.initial===!1:!1;u=u||r===!1;const d=u?a:r;return d&&typeof d!="boolean"&&!re(d)&&(Array.isArray(d)?d:[d]).forEach(f=>{const m=Qe(t,f);if(!m)return;const{transitionEnd:p,transition:g,...v}=m;for(const b in v){let y=v[b];if(Array.isArray(y)){const T=u?y.length-1:0;y=y[T]}y!==null&&(i[b]=y)}for(const b in p)i[b]=p[b]}),i}const O=t=>t,{schedule:k,cancel:it,state:L,steps:ue}=Cs(typeof requestAnimationFrame<"u"?requestAnimationFrame:O,!0),Ur={useVisualState:Gs({scrapeMotionValuesFromProps:zs,createRenderState:Is,onMount:(t,e,{renderState:n,latestValues:s})=>{k.read(()=>{try{n.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),k.render(()=>{qe(n,s,{enableHardwareAcceleration:!1},Ze(e.tagName),t.transformTemplate),Us(e,n)})}})},zr={useVisualState:Gs({scrapeMotionValuesFromProps:Je,createRenderState:Xe})};function Gr(t,{forwardMotionProps:e=!1},n,s){return{...$e(t)?Ur:zr,preloadedFeatures:n,useRender:Fr(e),createVisualElement:s,Component:t}}function H(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}const Ks=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function ae(t,e="page"){return{point:{x:t[`${e}X`],y:t[`${e}Y`]}}}const Kr=t=>e=>Ks(e)&&t(e,ae(e));function Y(t,e,n,s){return H(t,e,Kr(n),s)}const Wr=(t,e)=>n=>e(t(n)),X=(...t)=>t.reduce(Wr);function Ws(t){let e=null;return()=>{const n=()=>{e=null};return e===null?(e=t,n):!1}}const Tn=Ws("dragHorizontal"),Pn=Ws("dragVertical");function $s(t){let e=!1;if(t==="y")e=Pn();else if(t==="x")e=Tn();else{const n=Tn(),s=Pn();n&&s?e=()=>{n(),s()}:(n&&n(),s&&s())}return e}function _s(){const t=$s(!0);return t?(t(),!1):!0}class ot{constructor(e){this.isMounted=!1,this.node=e}update(){}}function Sn(t,e){const n=e?"pointerenter":"pointerleave",s=e?"onHoverStart":"onHoverEnd",i=(o,r)=>{if(o.pointerType==="touch"||_s())return;const a=t.getProps();t.animationState&&a.whileHover&&t.animationState.setActive("whileHover",e);const l=a[s];l&&l(o,r)};return Y(t.current,n,i,{passive:!t.getProps()[s]})}class $r extends ot{mount(){this.unmount=X(Sn(this.node,!0),Sn(this.node,!1))}unmount(){}}class _r extends ot{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=X(H(this.node.current,"focus",()=>this.onFocus()),H(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Hs=(t,e)=>e?t===e?!0:Hs(t,e.parentElement):!1;function de(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,ae(n))}class Hr extends ot{constructor(){super(...arguments),this.removeStartListeners=O,this.removeEndListeners=O,this.removeAccessibleListeners=O,this.startPointerPress=(e,n)=>{if(this.isPressing)return;this.removeEndListeners();const s=this.node.getProps(),o=Y(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:u,globalTapTarget:d}=this.node.getProps();!d&&!Hs(this.node.current,a.target)?u&&u(a,l):c&&c(a,l)},{passive:!(s.onTap||s.onPointerUp)}),r=Y(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(s.onTapCancel||s.onPointerCancel)});this.removeEndListeners=X(o,r),this.startPress(e,n)},this.startAccessiblePress=()=>{const e=o=>{if(o.key!=="Enter"||this.isPressing)return;const r=a=>{a.key!=="Enter"||!this.checkPressEnd()||de("up",(l,c)=>{const{onTap:u}=this.node.getProps();u&&u(l,c)})};this.removeEndListeners(),this.removeEndListeners=H(this.node.current,"keyup",r),de("down",(a,l)=>{this.startPress(a,l)})},n=H(this.node.current,"keydown",e),s=()=>{this.isPressing&&de("cancel",(o,r)=>this.cancelPress(o,r))},i=H(this.node.current,"blur",s);this.removeAccessibleListeners=X(n,i)}}startPress(e,n){this.isPressing=!0;const{onTapStart:s,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),s&&s(e,n)}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!_s()}cancelPress(e,n){if(!this.checkPressEnd())return;const{onTapCancel:s}=this.node.getProps();s&&s(e,n)}mount(){const e=this.node.getProps(),n=Y(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),s=H(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=X(n,s)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Ae=new WeakMap,he=new WeakMap,Yr=t=>{const e=Ae.get(t.target);e&&e(t)},Xr=t=>{t.forEach(Yr)};function qr({root:t,...e}){const n=t||document;he.has(n)||he.set(n,{});const s=he.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(Xr,{root:t,...e})),s[i]}function Zr(t,e,n){const s=qr(e);return Ae.set(t,n),s.observe(t),()=>{Ae.delete(t),s.unobserve(t)}}const Jr={some:0,all:1};class Qr extends ot{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:o}=e,r={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:Jr[i]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,o&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),h=c?u:d;h&&h(l)};return Zr(this.node.current,r,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(to(e,n))&&this.startObserver()}unmount(){}}function to({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const eo={inView:{Feature:Qr},tap:{Feature:Hr},focus:{Feature:_r},hover:{Feature:$r}};function Ys(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;se[s]=n.get()),e}function so(t){const e={};return t.values.forEach((n,s)=>e[s]=n.getVelocity()),e}function le(t,e,n){const s=t.getProps();return Qe(s,e,n!==void 0?n:s.custom,no(t),so(t))}const et=t=>t*1e3,q=t=>t/1e3,io={type:"spring",stiffness:500,damping:25,restSpeed:10},ro=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),oo={type:"keyframes",duration:.8},ao={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},lo=(t,{keyframes:e})=>e.length>2?oo:mt.has(t)?t.startsWith("scale")?ro(e[1]):io:ao;function co({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}function tn(t,e){return t[e]||t.default||t}const uo=t=>t!==null;function ce(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(uo),o=e&&n!=="loop"&&e%2===1?0:i.length-1;return!o||s===void 0?i[o]:s}let Xt;function ho(){Xt=void 0}const nt={now:()=>(Xt===void 0&&nt.set(L.isProcessing||Qi.useManualTiming?L.timestamp:performance.now()),Xt),set:t=>{Xt=t,queueMicrotask(ho)}},Xs=t=>/^0[^.\s]+$/u.test(t);function fo(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Xs(t):!0}let qs=O;const Zs=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),po=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function mo(t){const e=po.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function Js(t,e,n=1){const[s,i]=mo(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const r=o.trim();return Zs(r)?parseFloat(r):r}return _e(i)?Js(i,e,n+1):i}const go=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),An=t=>t===Tt||t===x,Vn=(t,e)=>parseFloat(t.split(", ")[e]),Cn=(t,e)=>(n,{transform:s})=>{if(s==="none"||!s)return 0;const i=s.match(/^matrix3d\((.+)\)$/u);if(i)return Vn(i[1],e);{const o=s.match(/^matrix\((.+)\)$/u);return o?Vn(o[1],t):0}},yo=new Set(["x","y","z"]),vo=Ot.filter(t=>!yo.has(t));function bo(t){const e=[];return vo.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const wt={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:Cn(4,13),y:Cn(5,14)};wt.translateX=wt.x;wt.translateY=wt.y;const Qs=t=>e=>e.test(t),xo={test:t=>t==="auto",parse:t=>t},ti=[Tt,x,$,Q,Tr,wr,xo],Mn=t=>ti.find(Qs(t)),pt=new Set;let Ve=!1,Ce=!1;function ei(){if(Ce){const t=Array.from(pt).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=bo(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([o,r])=>{var a;(a=s.getValue(o))===null||a===void 0||a.set(r)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Ce=!1,Ve=!1,pt.forEach(t=>t.complete()),pt.clear()}function ni(){pt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Ce=!0)})}function wo(){ni(),ei()}class en{constructor(e,n,s,i,o,r=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=o,this.isAsync=r}scheduleResolve(){this.isScheduled=!0,this.isAsync?(pt.add(this),Ve||(Ve=!0,k.read(ni),k.resolveKeyframes(ei))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;for(let o=0;on=>!!(Nt(n)&&xr.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),si=(t,e,n)=>s=>{if(!Nt(s))return s;const[i,o,r,a]=s.match(He);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},To=t=>st(0,255,t),fe={...Tt,transform:t=>Math.round(To(t))},ht={test:nn("rgb","red"),parse:si("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+fe.transform(t)+", "+fe.transform(e)+", "+fe.transform(n)+", "+Et(Dt.transform(s))+")"};function Po(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const Me={test:nn("#"),parse:Po,transform:ht.transform},vt={test:nn("hsl","hue"),parse:si("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+$.transform(Et(e))+", "+$.transform(Et(n))+", "+Et(Dt.transform(s))+")"},j={test:t=>ht.test(t)||Me.test(t)||vt.test(t),parse:t=>ht.test(t)?ht.parse(t):vt.test(t)?vt.parse(t):Me.parse(t),transform:t=>Nt(t)?t:t.hasOwnProperty("red")?ht.transform(t):vt.transform(t)};function So(t){var e,n;return isNaN(t)&&Nt(t)&&(((e=t.match(He))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(br))===null||n===void 0?void 0:n.length)||0)>0}const ii="number",ri="color",Ao="var",Vo="var(",Rn="${}",Co=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Qt(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let o=0;const a=e.replace(Co,l=>(j.test(l)?(s.color.push(o),i.push(ri),n.push(j.parse(l))):l.startsWith(Vo)?(s.var.push(o),i.push(Ao),n.push(l)):(s.number.push(o),i.push(ii),n.push(parseFloat(l))),++o,Rn)).split(Rn);return{values:n,split:a,indexes:s,types:i}}function oi(t){return Qt(t).values}function ai(t){const{split:e,types:n}=Qt(t),s=e.length;return i=>{let o="";for(let r=0;rtypeof t=="number"?0:t;function Ro(t){const e=oi(t);return ai(t)(e.map(Mo))}const rt={test:So,parse:oi,createTransformer:ai,getAnimatableNone:Ro},Do=new Set(["brightness","contrast","saturate","opacity"]);function Eo(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(He)||[];if(!s)return t;const i=n.replace(s,"");let o=Do.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const Lo=/\b([a-z-]*)\(.*?\)/gu,Re={...rt,getAnimatableNone:t=>{const e=t.match(Lo);return e?e.map(Eo).join(" "):t}},ko={...Fs,color:j,backgroundColor:j,outlineColor:j,fill:j,stroke:j,borderColor:j,borderTopColor:j,borderRightColor:j,borderBottomColor:j,borderLeftColor:j,filter:Re,WebkitFilter:Re},sn=t=>ko[t];function li(t,e){let n=sn(t);return n!==Re&&(n=rt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}function Fo(t,e,n){let s=0,i;for(;s{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function Bo(t){let e;return()=>(e===void 0&&(e=t()),e)}const Dn=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(rt.test(t)||t==="0")&&!t.startsWith("url("));function jo(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n{this.resolveFinishedPromise=e})}}function di(t,e){return e?t*(1e3/e):0}const Oo=5;function hi(t,e,n){const s=Math.max(e-Oo,0);return di(n-t(s),e-s)}const pe=.001,No=.01,Uo=10,zo=.05,Go=1;function Ko({duration:t=800,bounce:e=.25,velocity:n=0,mass:s=1}){let i,o,r=1-e;r=st(zo,Go,r),t=st(No,Uo,q(t)),r<1?(i=c=>{const u=c*r,d=u*t,h=u-n,f=De(c,r),m=Math.exp(-d);return pe-h/f*m},o=c=>{const d=c*r*t,h=d*n+n,f=Math.pow(r,2)*Math.pow(c,2)*t,m=Math.exp(-d),p=De(Math.pow(c,2),r);return(-i(c)+pe>0?-1:1)*((h-f)*m)/p}):(i=c=>{const u=Math.exp(-c*t),d=(c-n)*t+1;return-pe+u*d},o=c=>{const u=Math.exp(-c*t),d=(n-c)*(t*t);return u*d});const a=5/t,l=$o(i,o,a);if(t=et(t),isNaN(l))return{stiffness:100,damping:10,duration:t};{const c=Math.pow(l,2)*s;return{stiffness:c,damping:r*2*Math.sqrt(s*c),duration:t}}}const Wo=12;function $o(t,e,n){let s=n;for(let i=1;it[n]!==void 0)}function Yo(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!En(t,Ho)&&En(t,_o)){const n=Ko(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}function fi({keyframes:t,restDelta:e,restSpeed:n,...s}){const i=t[0],o=t[t.length-1],r={done:!1,value:i},{stiffness:a,damping:l,mass:c,duration:u,velocity:d,isResolvedFromDuration:h}=Yo({...s,velocity:-q(s.velocity||0)}),f=d||0,m=l/(2*Math.sqrt(a*c)),p=o-i,g=q(Math.sqrt(a/c)),v=Math.abs(p)<5;n||(n=v?.01:2),e||(e=v?.005:.5);let b;if(m<1){const y=De(g,m);b=T=>{const A=Math.exp(-m*g*T);return o-A*((f+m*g*p)/y*Math.sin(y*T)+p*Math.cos(y*T))}}else if(m===1)b=y=>o-Math.exp(-g*y)*(p+(f+g*p)*y);else{const y=g*Math.sqrt(m*m-1);b=T=>{const A=Math.exp(-m*g*T),D=Math.min(y*T,300);return o-A*((f+m*g*p)*Math.sinh(D)+y*p*Math.cosh(D))/y}}return{calculatedDuration:h&&u||null,next:y=>{const T=b(y);if(h)r.done=y>=u;else{let A=f;y!==0&&(m<1?A=hi(b,y,T):A=0);const D=Math.abs(A)<=n,K=Math.abs(o-T)<=e;r.done=D&&K}return r.value=r.done?o:T,r}}}function Ln({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=t[0],h={done:!1,value:d},f=S=>a!==void 0&&Sl,m=S=>a===void 0?l:l===void 0||Math.abs(a-S)-p*Math.exp(-S/s),y=S=>v+b(S),T=S=>{const F=b(S),B=y(S);h.done=Math.abs(F)<=c,h.value=h.done?v:B};let A,D;const K=S=>{f(h.value)&&(A=S,D=fi({keyframes:[h.value,m(h.value)],velocity:hi(y,S,h.value),damping:i,stiffness:o,restDelta:c,restSpeed:u}))};return K(0),{calculatedDuration:null,next:S=>{let F=!1;return!D&&A===void 0&&(F=!0,T(S),K(S)),A!==void 0&&S>=A?D.next(S-A):(!F&&T(S),h)}}}const pi=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Xo=1e-7,qo=12;function Zo(t,e,n,s,i){let o,r,a=0;do r=e+(n-e)/2,o=pi(r,s,i)-t,o>0?n=r:e=r;while(Math.abs(o)>Xo&&++aZo(o,0,1,t,n);return o=>o===0||o===1?o:pi(i(o),e,s)}const Jo=zt(.42,0,1,1),Qo=zt(0,0,.58,1),mi=zt(.42,0,.58,1),ta=t=>Array.isArray(t)&&typeof t[0]!="number",gi=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,yi=t=>e=>1-t(1-e),rn=t=>1-Math.sin(Math.acos(t)),vi=yi(rn),ea=gi(rn),bi=zt(.33,1.53,.69,.99),on=yi(bi),na=gi(on),sa=t=>(t*=2)<1?.5*on(t):.5*(2-Math.pow(2,-10*(t-1))),ia={linear:O,easeIn:Jo,easeInOut:mi,easeOut:Qo,circIn:rn,circInOut:ea,circOut:vi,backIn:on,backInOut:na,backOut:bi,anticipate:sa},kn=t=>{if(Array.isArray(t)){qs(t.length===4);const[e,n,s,i]=t;return zt(e,n,s,i)}else if(typeof t=="string")return ia[t];return t},jt=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s},M=(t,e,n)=>t+(e-t)*n;function me(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function ra({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,o=0,r=0;if(!e)i=o=r=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=me(l,a,t+1/3),o=me(l,a,t),r=me(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}const ge=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},oa=[Me,ht,vt],aa=t=>oa.find(e=>e.test(t));function Fn(t){const e=aa(t);let n=e.parse(t);return e===vt&&(n=ra(n)),n}const Bn=(t,e)=>{const n=Fn(t),s=Fn(e),i={...n};return o=>(i.red=ge(n.red,s.red,o),i.green=ge(n.green,s.green,o),i.blue=ge(n.blue,s.blue,o),i.alpha=M(n.alpha,s.alpha,o),ht.transform(i))};function Ee(t,e){return n=>n>0?e:t}function la(t,e){return n=>M(t,e,n)}function an(t){return typeof t=="number"?la:typeof t=="string"?_e(t)?Ee:j.test(t)?Bn:da:Array.isArray(t)?xi:typeof t=="object"?j.test(t)?Bn:ca:Ee}function xi(t,e){const n=[...t],s=n.length,i=t.map((o,r)=>an(o)(o,e[r]));return o=>{for(let r=0;r{for(const o in s)n[o]=s[o](i);return n}}function ua(t,e){var n;const s=[],i={color:0,var:0,number:0};for(let o=0;o{const n=rt.createTransformer(e),s=Qt(t),i=Qt(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?X(xi(ua(s,i),i.values),n):Ee(t,e)};function wi(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?M(t,e,n):an(t)(t,e)}function ha(t,e,n){const s=[],i=n||wi,o=t.length-1;for(let r=0;re[0];if(o===2&&t[0]===t[1])return()=>e[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const r=ha(e,s,i),a=r.length,l=c=>{let u=0;if(a>1)for(;ul(st(t[0],t[o-1],c)):l}function pa(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=jt(0,e,s);t.push(M(n,1,i))}}function ma(t){const e=[0];return pa(e,t.length-1),e}function ga(t,e){return t.map(n=>n*e)}function ya(t,e){return t.map(()=>e||mi).splice(0,t.length-1)}function te({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=ta(s)?s.map(kn):kn(s),o={done:!1,value:e[0]},r=ga(n&&n.length===e.length?n:ma(e),t),a=fa(r,e,{ease:Array.isArray(i)?i:ya(e,i)});return{calculatedDuration:t,next:l=>(o.value=a(l),o.done=l>=t,o)}}const jn=2e4;function va(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e=jn?1/0:e}const ba=t=>{const e=({timestamp:n})=>t(n);return{start:()=>k.update(e,!0),stop:()=>it(e),now:()=>L.isProcessing?L.timestamp:nt.now()}},xa={decay:Ln,inertia:Ln,tween:te,keyframes:te,spring:fi},wa=t=>t/100;class ln extends ui{constructor({KeyframeResolver:e=en,...n}){super(n),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:a}=this.options;a&&a()};const{name:s,motionValue:i,keyframes:o}=this.options,r=(a,l)=>this.onKeyframesResolved(a,l);s&&i&&i.owner?this.resolver=i.owner.resolveKeyframes(o,r,s,i):this.resolver=new e(o,r,s,i),this.resolver.scheduleResolve()}initPlayback(e){const{type:n="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:o,velocity:r=0}=this.options,a=xa[n]||te;let l,c;a!==te&&typeof e[0]!="number"&&(l=X(wa,wi(e[0],e[1])),e=[0,100]);const u=a({...this.options,keyframes:e});o==="mirror"&&(c=a({...this.options,keyframes:[...e].reverse(),velocity:-r})),u.calculatedDuration===null&&(u.calculatedDuration=va(u));const{calculatedDuration:d}=u,h=d+i,f=h*(s+1)-i;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:h,totalDuration:f}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!e?this.pause():this.state=this.pendingPlayState}tick(e,n=!1){const{resolved:s}=this;if(!s){const{keyframes:S}=this.options;return{done:!0,value:S[S.length-1]}}const{finalKeyframe:i,generator:o,mirroredGenerator:r,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:d}=s;if(this.startTime===null)return o.next(0);const{delay:h,repeat:f,repeatType:m,repeatDelay:p,onUpdate:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-u/this.speed,this.startTime)),n?this.currentTime=e:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const v=this.currentTime-h*(this.speed>=0?1:-1),b=this.speed>=0?v<0:v>u;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let y=this.currentTime,T=o;if(f){const S=Math.min(this.currentTime,u)/d;let F=Math.floor(S),B=S%1;!B&&S>=1&&(B=1),B===1&&F--,F=Math.min(F,f+1),!!(F%2)&&(m==="reverse"?(B=1-B,p&&(B-=p/d)):m==="mirror"&&(T=r)),y=st(0,1,B)*d}const A=b?{done:!1,value:l[0]}:T.next(y);a&&(A.value=a(A.value));let{done:D}=A;!b&&c!==null&&(D=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const K=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&D);return K&&i!==void 0&&(A.value=ce(l,this.options,i)),g&&g(A.value),K&&this.finish(),A}get duration(){const{resolved:e}=this;return e?q(e.calculatedDuration):0}get time(){return q(this.currentTime)}set time(e){e=et(e),this.currentTime=e,this.holdTime!==null||this.speed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=q(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:e=ba,onPlay:n}=this.options;this.driver||(this.driver=e(i=>this.tick(i))),n&&n();const s=this.driver.now();this.holdTime!==null?this.startTime=s-this.holdTime:(!this.startTime||this.state==="finished")&&(this.startTime=s),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(e=this.currentTime)!==null&&e!==void 0?e:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const Ti=t=>Array.isArray(t)&&typeof t[0]=="number";function Pi(t){return!!(!t||typeof t=="string"&&t in cn||Ti(t)||Array.isArray(t)&&t.every(Pi))}const Rt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,cn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Rt([0,.65,.55,1]),circOut:Rt([.55,0,1,.45]),backIn:Rt([.31,.01,.66,-.59]),backOut:Rt([.33,1.53,.69,.99])};function Ta(t){return Si(t)||cn.easeOut}function Si(t){if(t)return Ti(t)?Rt(t):Array.isArray(t)?t.map(Ta):cn[t]}function Pa(t,e,n,{delay:s=0,duration:i=300,repeat:o=0,repeatType:r="loop",ease:a,times:l}={}){const c={[e]:n};l&&(c.offset=l);const u=Si(a);return Array.isArray(u)&&(c.easing=u),t.animate(c,{delay:s,duration:i,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"})}const Sa=Bo(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Aa=new Set(["opacity","clipPath","filter","transform"]),ee=10,Va=2e4;function Ca(t){return t.type==="spring"||t.name==="backgroundColor"||!Pi(t.ease)}function Ma(t,e){const n=new ln({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let s={done:!1,value:t[0]};const i=[];let o=0;for(;!s.done&&othis.onKeyframesResolved(o,r),n,s),this.resolver.scheduleResolve()}initPlayback(e,n){var s;let{duration:i=300,times:o,ease:r,type:a,motionValue:l,name:c}=this.options;if(!(!((s=l.owner)===null||s===void 0)&&s.current))return!1;if(Ca(this.options)){const{onComplete:d,onUpdate:h,motionValue:f,...m}=this.options,p=Ma(e,m);e=p.keyframes,e.length===1&&(e[1]=e[0]),i=p.duration,o=p.times,r=p.ease,a="keyframes"}const u=Pa(l.owner.current,c,e,{...this.options,duration:i,times:o,ease:r});return u.startTime=nt.now(),this.pendingTimeline?(u.timeline=this.pendingTimeline,this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;l.set(ce(e,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:i,times:o,type:a,ease:r,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:n}=e;return q(n)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:n}=e;return q(n.currentTime||0)}set time(e){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.currentTime=et(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:n}=e;return n.playbackRate}set speed(e){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:n}=e;return n.playState}attachTimeline(e){if(!this._resolved)this.pendingTimeline=e;else{const{resolved:n}=this;if(!n)return O;const{animation:s}=n;s.timeline=e,s.onfinish=null}return O}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;const{resolved:e}=this;if(!e)return;const{animation:n,keyframes:s,duration:i,type:o,ease:r,times:a}=e;if(!(n.playState==="idle"||n.playState==="finished")){if(this.time){const{motionValue:l,onUpdate:c,onComplete:u,...d}=this.options,h=new ln({...d,keyframes:s,duration:i,type:o,ease:r,times:a,isGenerator:!0}),f=et(this.time);l.setWithVelocity(h.sample(f-ee).value,h.sample(f).value,ee)}this.cancel()}}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:n,name:s,repeatDelay:i,repeatType:o,damping:r,type:a}=e;return Sa()&&s&&Aa.has(s)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!i&&o!=="mirror"&&r!==0&&a!=="inertia"}}const un=(t,e,n,s={},i,o)=>r=>{const a=tn(s,t)||{},l=a.delay||s.delay||0;let{elapsed:c=0}=s;c=c-et(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:h=>{e.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:i};co(a)||(u={...u,...lo(t,u)}),u.duration&&(u.duration=et(u.duration)),u.repeatDelay&&(u.repeatDelay=et(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),d&&!o&&e.get()!==void 0){const h=ce(u.keyframes,a);if(h!==void 0){k.update(()=>{u.onUpdate(h),u.onComplete()});return}}return!o&&In.supports(u)?new In(u):new ln(u)};function ne(t){return!!(I(t)&&t.add)}function dn(t,e){t.indexOf(e)===-1&&t.push(e)}function hn(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class fn{constructor(){this.subscriptions=[]}add(e){return dn(this.subscriptions,e),()=>hn(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let o=0;o!isNaN(parseFloat(t));class Da{constructor(e,n={}){this.version="11.1.7",this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(s,i=!0)=>{const o=nt.now();this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.canTrackVelocity=Ra(this.current),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=nt.now()}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new fn);const s=this.events[e].add(n);return e==="change"?()=>{s(),k.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=nt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>On)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,On);return di(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function It(t,e){return new Da(t,e)}function Ea(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,It(n))}function La(t,e){const n=le(t,e);let{transitionEnd:s={},transition:i={},...o}=n||{};o={...o,...s};for(const r in o){const a=Ir(o[r]);Ea(t,r,a)}}function ka({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function Ai(t,e,{delay:n=0,transitionOverride:s,type:i}={}){var o;let{transition:r=t.getDefaultTransition(),transitionEnd:a,...l}=e;const c=t.getValue("willChange");s&&(r=s);const u=[],d=i&&t.animationState&&t.animationState.getState()[i];for(const h in l){const f=t.getValue(h,(o=t.latestValues[h])!==null&&o!==void 0?o:null),m=l[h];if(m===void 0||d&&ka(d,h))continue;const p={delay:n,elapsed:0,...tn(r||{},h)};let g=!1;if(window.HandoffAppearAnimations){const y=t.getProps()[Vs];if(y){const T=window.HandoffAppearAnimations(y,h);T!==null&&(p.elapsed=T,g=!0)}}f.start(un(h,f,m,t.shouldReduceMotion&&mt.has(h)?{type:!1}:p,t,g));const v=f.animation;v&&(ne(c)&&(c.add(h),v.then(()=>c.remove(h))),u.push(v))}return a&&Promise.all(u).then(()=>{k.update(()=>{a&&La(t,a)})}),u}function Le(t,e,n={}){var s;const i=le(t,e,n.type==="exit"?(s=t.presenceContext)===null||s===void 0?void 0:s.custom:void 0);let{transition:o=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const r=i?()=>Promise.all(Ai(t,i,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:h}=o;return Fa(t,e,u+c,d,h,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[c,u]=l==="beforeChildren"?[r,a]:[a,r];return c().then(()=>u())}else return Promise.all([r(),a(n.delay)])}function Fa(t,e,n=0,s=0,i=1,o){const r=[],a=(t.variantChildren.size-1)*s,l=i===1?(c=0)=>c*s:(c=0)=>a-c*s;return Array.from(t.variantChildren).sort(Ba).forEach((c,u)=>{c.notify("AnimationStart",e),r.push(Le(c,e,{...o,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",e)))}),Promise.all(r)}function Ba(t,e){return t.sortNodePosition(e)}function ja(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(o=>Le(t,o,n));s=Promise.all(i)}else if(typeof e=="string")s=Le(t,e,n);else{const i=typeof e=="function"?le(t,e,n.custom):e;s=Promise.all(Ai(t,i,n))}return s.then(()=>{k.postRender(()=>{t.notify("AnimationComplete",e)})})}const Ia=[...Ke].reverse(),Oa=Ke.length;function Na(t){return e=>Promise.all(e.map(({animation:n,options:s})=>ja(t,n,s)))}function Ua(t){let e=Na(t);const n=Ga();let s=!0;const i=l=>(c,u)=>{var d;const h=le(t,u,l==="exit"?(d=t.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(h){const{transition:f,transitionEnd:m,...p}=h;c={...c,...p,...m}}return c};function o(l){e=l(t)}function r(l){const c=t.getProps(),u=t.getVariantContext(!0)||{},d=[],h=new Set;let f={},m=1/0;for(let g=0;gm&&T,F=!1;const B=Array.isArray(y)?y:[y];let W=B.reduce(i(v),{});A===!1&&(W={});const{prevResolvedValues:V={}}=b,Gt={...V,...W},at=E=>{S=!0,h.has(E)&&(F=!0,h.delete(E)),b.needsAnimating[E]=!0;const N=t.getValue(E);N&&(N.liveStyle=!1)};for(const E in Gt){const N=W[E],gt=V[E];if(f.hasOwnProperty(E))continue;let lt=!1;Se(N)&&Se(gt)?lt=!Ys(N,gt):lt=N!==gt,lt?N!=null?at(E):h.add(E):N!==void 0&&h.has(E)?at(E):b.protectedKeys[E]=!0}b.prevProp=y,b.prevResolvedValues=W,b.isActive&&(f={...f,...W}),s&&t.blockInitialAnimation&&(S=!1),S&&(!D||F)&&d.push(...B.map(E=>({animation:E,options:{type:v}})))}if(h.size){const g={};h.forEach(v=>{const b=t.getBaseTarget(v),y=t.getValue(v);y&&(y.liveStyle=!0),g[v]=b??null}),d.push({animation:g})}let p=!!d.length;return s&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(p=!1),s=!1,p?e(d):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=t.variantChildren)===null||u===void 0||u.forEach(h=>{var f;return(f=h.animationState)===null||f===void 0?void 0:f.setActive(l,c)}),n[l].isActive=c;const d=r(l);for(const h in n)n[h].protectedKeys={};return d}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>n}}function za(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Ys(e,t):!1}function ct(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ga(){return{animate:ct(!0),whileInView:ct(),whileHover:ct(),whileTap:ct(),whileDrag:ct(),whileFocus:ct(),exit:ct()}}class Ka extends ot{constructor(e){super(e),e.animationState||(e.animationState=Ua(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),re(e)&&(this.unmount=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let Wa=0;class $a extends ot{constructor(){super(...arguments),this.id=Wa++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>n(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const _a={animation:{Feature:Ka},exit:{Feature:$a}},Nn=(t,e)=>Math.abs(t-e);function Ha(t,e){const n=Nn(t.x,e.x),s=Nn(t.y,e.y);return Math.sqrt(n**2+s**2)}class Vi{constructor(e,n,{transformPagePoint:s,contextWindow:i,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=ve(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,f=Ha(d.offset,{x:0,y:0})>=3;if(!h&&!f)return;const{point:m}=d,{timestamp:p}=L;this.history.push({...m,timestamp:p});const{onStart:g,onMove:v}=this.handlers;h||(g&&g(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,d)},this.handlePointerMove=(d,h)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=ye(h,this.transformPagePoint),k.update(this.updatePoint,!0)},this.handlePointerUp=(d,h)=>{this.end();const{onEnd:f,onSessionEnd:m,resumeAnimation:p}=this.handlers;if(this.dragSnapToOrigin&&p&&p(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const g=ve(d.type==="pointercancel"?this.lastMoveEventInfo:ye(h,this.transformPagePoint),this.history);this.startEvent&&f&&f(d,g),m&&m(d,g)},!Ks(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.contextWindow=i||window;const r=ae(e),a=ye(r,this.transformPagePoint),{point:l}=a,{timestamp:c}=L;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(e,ve(a,this.history)),this.removeListeners=X(Y(this.contextWindow,"pointermove",this.handlePointerMove),Y(this.contextWindow,"pointerup",this.handlePointerUp),Y(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),it(this.updatePoint)}}function ye(t,e){return e?{point:e(t.point)}:t}function Un(t,e){return{x:t.x-e.x,y:t.y-e.y}}function ve({point:t},e){return{point:t,delta:Un(t,Ci(e)),offset:Un(t,Ya(e)),velocity:Xa(e,.1)}}function Ya(t){return t[0]}function Ci(t){return t[t.length-1]}function Xa(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=Ci(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>et(e)));)n--;if(!s)return{x:0,y:0};const o=q(i.timestamp-s.timestamp);if(o===0)return{x:0,y:0};const r={x:(i.x-s.x)/o,y:(i.y-s.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function U(t){return t.max-t.min}function ke(t,e=0,n=.01){return Math.abs(t-e)<=n}function zn(t,e,n,s=.5){t.origin=s,t.originPoint=M(e.min,e.max,t.origin),t.scale=U(n)/U(e),(ke(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=M(n.min,n.max,t.origin)-t.originPoint,(ke(t.translate)||isNaN(t.translate))&&(t.translate=0)}function Lt(t,e,n,s){zn(t.x,e.x,n.x,s?s.originX:void 0),zn(t.y,e.y,n.y,s?s.originY:void 0)}function Gn(t,e,n){t.min=n.min+e.min,t.max=t.min+U(e)}function qa(t,e,n){Gn(t.x,e.x,n.x),Gn(t.y,e.y,n.y)}function Kn(t,e,n){t.min=e.min-n.min,t.max=t.min+U(e)}function kt(t,e,n){Kn(t.x,e.x,n.x),Kn(t.y,e.y,n.y)}function Za(t,{min:e,max:n},s){return e!==void 0&&tn&&(t=s?M(n,t,s.max):Math.min(t,n)),t}function Wn(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function Ja(t,{top:e,left:n,bottom:s,right:i}){return{x:Wn(t.x,n,i),y:Wn(t.y,e,s)}}function $n(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.mins?n=jt(e.min,e.max-s,t.min):s>i&&(n=jt(t.min,t.max-i,e.min)),st(0,1,n)}function el(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const Fe=.35;function nl(t=Fe){return t===!1?t=0:t===!0&&(t=Fe),{x:_n(t,"left","right"),y:_n(t,"top","bottom")}}function _n(t,e,n){return{min:Hn(t,e),max:Hn(t,n)}}function Hn(t,e){return typeof t=="number"?t:t[e]||0}const Yn=()=>({translate:0,scale:1,origin:0,originPoint:0}),bt=()=>({x:Yn(),y:Yn()}),Xn=()=>({min:0,max:0}),R=()=>({x:Xn(),y:Xn()});function G(t){return[t("x"),t("y")]}function Mi({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function sl({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function il(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function be(t){return t===void 0||t===1}function Be({scale:t,scaleX:e,scaleY:n}){return!be(t)||!be(e)||!be(n)}function ut(t){return Be(t)||Ri(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Ri(t){return qn(t.x)||qn(t.y)}function qn(t){return t&&t!=="0%"}function se(t,e,n){const s=t-n,i=e*s;return n+i}function Zn(t,e,n,s,i){return i!==void 0&&(t=se(t,i,s)),se(t,n,s)+e}function je(t,e=0,n=1,s,i){t.min=Zn(t.min,e,n,s,i),t.max=Zn(t.max,e,n,s,i)}function Di(t,{x:e,y:n}){je(t.x,e.translate,e.scale,e.originPoint),je(t.y,n.translate,n.scale,n.originPoint)}function rl(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let o,r;for(let a=0;a1.0000000000001||t<.999999999999?t:1}function tt(t,e){t.min=t.min+e,t.max=t.max+e}function Qn(t,e,[n,s,i]){const o=e[i]!==void 0?e[i]:.5,r=M(t.min,t.max,o);je(t,e[n],e[s],r,e.scale)}const ol=["x","scaleX","originX"],al=["y","scaleY","originY"];function xt(t,e){Qn(t.x,e,ol),Qn(t.y,e,al)}function Ei(t,e){return Mi(il(t.getBoundingClientRect(),e))}function ll(t,e,n){const s=Ei(t,n),{scroll:i}=e;return i&&(tt(s.x,i.offset.x),tt(s.y,i.offset.y)),s}const Li=({current:t})=>t?t.ownerDocument.defaultView:null,cl=new WeakMap;class ul{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=R(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(ae(u,"page").point)},o=(u,d)=>{const{drag:h,dragPropagation:f,onDragStart:m}=this.getProps();if(h&&!f&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=$s(h),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),G(g=>{let v=this.getAxisMotionValue(g).get()||0;if($.test(v)){const{projection:b}=this.visualElement;if(b&&b.layout){const y=b.layout.layoutBox[g];y&&(v=U(y)*(parseFloat(v)/100))}}this.originPoint[g]=v}),m&&m(u,d);const{animationState:p}=this.visualElement;p&&p.setActive("whileDrag",!0)},r=(u,d)=>{const{dragPropagation:h,dragDirectionLock:f,onDirectionLock:m,onDrag:p}=this.getProps();if(!h&&!this.openGlobalLock)return;const{offset:g}=d;if(f&&this.currentDirection===null){this.currentDirection=dl(g),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",d.point,g),this.updateAxis("y",d.point,g),this.visualElement.render(),p&&p(u,d)},a=(u,d)=>this.stop(u,d),l=()=>G(u=>{var d;return this.getAnimationState(u)==="paused"&&((d=this.getAxisMotionValue(u).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Vi(e,{onSessionStart:i,onStart:o,onMove:r,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:Li(this.visualElement)})}stop(e,n){const s=this.isDragging;if(this.cancel(),!s)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&o(e,n)}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!_t(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let r=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(r=Za(r,this.constraints[e],this.elastic[e])),o.set(r)}resolveConstraints(){var e;const{dragConstraints:n,dragElastic:s}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,o=this.constraints;n&&yt(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=Ja(i.layoutBox,n):this.constraints=!1,this.elastic=nl(s),o!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&G(r=>{this.constraints!==!1&&this.getAxisMotionValue(r)&&(this.constraints[r]=el(i.layoutBox[r],this.constraints[r]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!yt(e))return!1;const s=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=ll(s,i.root,this.visualElement.getTransformPagePoint());let r=Qa(i.layout.layoutBox,o);if(n){const a=n(sl(r));this.hasMutatedConstraints=!!a,a&&(r=Mi(a))}return r}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=G(u=>{if(!_t(u,n,this.currentDirection))return;let d=l&&l[u]||{};r&&(d={min:0,max:0});const h=i?200:1e6,f=i?40:1e7,m={type:"inertia",velocity:s?e[u]:0,bounceStiffness:h,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...o,...d};return this.startAxisValueAnimation(u,m)});return Promise.all(c).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return s.start(un(e,s,0,n,this.visualElement))}stopAnimation(){G(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){G(e=>{var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){G(n=>{const{drag:s}=this.getProps();if(!_t(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:r,max:a}=i.layout.layoutBox[n];o.set(e[n]-M(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!yt(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};G(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const l=a.get();i[r]=tl({min:l,max:l},this.constraints[r])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),G(r=>{if(!_t(r,e,null))return;const a=this.getAxisMotionValue(r),{min:l,max:c}=this.constraints[r];a.set(M(l,c,i[r]))})}addListeners(){if(!this.visualElement.current)return;cl.set(this.visualElement,this);const e=this.visualElement.current,n=Y(e,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();yt(l)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),s();const r=H(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(G(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())});return()=>{r(),n(),o(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:r=Fe,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function _t(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function dl(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class hl extends ot{constructor(e){super(e),this.removeGroupControls=O,this.removeListeners=O,this.controls=new ul(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||O}unmount(){this.removeGroupControls(),this.removeListeners()}}const ts=t=>(e,n)=>{t&&t(e,n)};class fl extends ot{constructor(){super(...arguments),this.removePointerDownListener=O}onPointerDown(e){this.session=new Vi(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Li(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:ts(e),onStart:ts(n),onMove:s,onEnd:(o,r)=>{delete this.session,i&&i(o,r)}}}mount(){this.removePointerDownListener=Y(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function pl(){const t=P.useContext(Ne);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:n,register:s}=t,i=P.useId();return P.useEffect(()=>s(i),[]),!e&&n?[!1,()=>n&&n(i)]:[!0]}const qt={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function es(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Vt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(x.test(t))t=parseFloat(t);else return t;const n=es(t,e.target.x),s=es(t,e.target.y);return`${n}% ${s}%`}},ml={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=rt.parse(t);if(i.length>5)return s;const o=rt.createTransformer(t),r=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+r]/=a,i[1+r]/=l;const c=M(a,l,.5);return typeof i[2+r]=="number"&&(i[2+r]/=c),typeof i[3+r]=="number"&&(i[3+r]/=c),o(i)}};class gl extends P.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:o}=e;hr(yl),o&&(n.group&&n.group.add(o),s&&s.register&&i&&s.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),qt.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:o}=this.props,r=s.projection;return r&&(r.isPresent=o,i||e.layoutDependency!==n||n===void 0?r.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?r.promote():r.relegate()||k.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Ge.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function ki(t){const[e,n]=pl(),s=P.useContext(Rs);return Pe.jsx(gl,{...t,layoutGroup:s,switchLayoutGroup:P.useContext(Ds),isPresent:e,safeToRemove:n})}const yl={borderRadius:{...Vt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Vt,borderTopRightRadius:Vt,borderBottomLeftRadius:Vt,borderBottomRightRadius:Vt,boxShadow:ml},Fi=["TopLeft","TopRight","BottomLeft","BottomRight"],vl=Fi.length,ns=t=>typeof t=="string"?parseFloat(t):t,ss=t=>typeof t=="number"||x.test(t);function bl(t,e,n,s,i,o){i?(t.opacity=M(0,n.opacity!==void 0?n.opacity:1,xl(s)),t.opacityExit=M(e.opacity!==void 0?e.opacity:1,0,wl(s))):o&&(t.opacity=M(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,s));for(let r=0;rse?1:n(jt(t,e,s))}function rs(t,e){t.min=e.min,t.max=e.max}function z(t,e){rs(t.x,e.x),rs(t.y,e.y)}function os(t,e,n,s,i){return t-=e,t=se(t,1/n,s),i!==void 0&&(t=se(t,1/i,s)),t}function Tl(t,e=0,n=1,s=.5,i,o=t,r=t){if($.test(e)&&(e=parseFloat(e),e=M(r.min,r.max,e/100)-r.min),typeof e!="number")return;let a=M(o.min,o.max,s);t===o&&(a-=e),t.min=os(t.min,e,n,a,i),t.max=os(t.max,e,n,a,i)}function as(t,e,[n,s,i],o,r){Tl(t,e[n],e[s],e[i],e.scale,o,r)}const Pl=["x","scaleX","originX"],Sl=["y","scaleY","originY"];function ls(t,e,n,s){as(t.x,e,Pl,n?n.x:void 0,s?s.x:void 0),as(t.y,e,Sl,n?n.y:void 0,s?s.y:void 0)}function cs(t){return t.translate===0&&t.scale===1}function ji(t){return cs(t.x)&&cs(t.y)}function Al(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function Ii(t,e){return Math.round(t.x.min)===Math.round(e.x.min)&&Math.round(t.x.max)===Math.round(e.x.max)&&Math.round(t.y.min)===Math.round(e.y.min)&&Math.round(t.y.max)===Math.round(e.y.max)}function us(t){return U(t.x)/U(t.y)}class Vl{constructor(){this.members=[]}add(e){dn(this.members,e),e.scheduleRender()}remove(e){if(hn(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){s=o;break}}return s?(this.promote(s),!0):!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,n&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function ds(t,e,n){let s="";const i=t.x.translate/e.x,o=t.y.translate/e.y,r=n?.z||0;if((i||o||r)&&(s=`translate3d(${i}px, ${o}px, ${r}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:h,skewX:f,skewY:m}=n;c&&(s=`perspective(${c}px) ${s}`),u&&(s+=`rotate(${u}deg) `),d&&(s+=`rotateX(${d}deg) `),h&&(s+=`rotateY(${h}deg) `),f&&(s+=`skewX(${f}deg) `),m&&(s+=`skewY(${m}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}const Cl=(t,e)=>t.depth-e.depth;class Ml{constructor(){this.children=[],this.isDirty=!1}add(e){dn(this.children,e),this.isDirty=!0}remove(e){hn(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Cl),this.isDirty=!1,this.children.forEach(e)}}function Rl(t,e){const n=nt.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(it(s),t(o-e))};return k.read(s,!0),()=>it(s)}function Dl(t){window.MotionDebug&&window.MotionDebug.record(t)}function El(t){return t instanceof SVGElement&&t.tagName!=="svg"}function Ll(t,e,n){const s=I(t)?t:It(t);return s.start(un("",s,e,n)),s.animation}const xe=["","X","Y","Z"],kl={visibility:"hidden"},hs=1e3;let Fl=0;const dt={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function we(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function Oi({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},a=e?.()){this.id=Fl++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,dt.totalNodes=dt.resolvedTargetDeltas=dt.recalculatedProjection=0,this.nodes.forEach(Il),this.nodes.forEach(Gl),this.nodes.forEach(Kl),this.nodes.forEach(Ol),Dl(dt)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;lthis.root.updateBlockedByResize=!1;t(r,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=Rl(h,250),qt.hasAnimatedSinceResize&&(qt.hasAnimatedSinceResize=!1,this.nodes.forEach(ps))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h,hasRelativeTargetChanged:f,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||u.getDefaultTransition()||Yl,{onLayoutAnimationStart:g,onLayoutAnimationComplete:v}=u.getProps(),b=!this.targetLayout||!Ii(this.targetLayout,m)||f,y=!h&&f;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||y||h&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,y);const T={...tn(p,"layout"),onPlay:g,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T)}else h||ps(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,it(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Wl),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;uthis.update()))}clearAllSnapshots(){this.nodes.forEach(Nl),this.sharedNodes.forEach($l)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,k.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){k.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{const A=T/1e3;ms(d.x,r.x,A),ms(d.y,r.y,A),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(kt(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),_l(this.relativeTarget,this.relativeTargetOrigin,h,A),y&&Al(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=R()),z(y,this.relativeTarget)),p&&(this.animationValues=u,bl(u,c,this.latestValues,A,b,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=A},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(it(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=k.update(()=>{qt.hasAnimatedSinceResize=!0,this.currentAnimation=Ll(0,hs,{...r,onUpdate:a=>{this.mixTargetDelta(a),r.onUpdate&&r.onUpdate(a)},onComplete:()=>{r.onComplete&&r.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(hs),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=r;if(!(!a||!l||!c)){if(this!==r&&this.layout&&c&&Ni(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||R();const d=U(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+d;const h=U(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+h}z(a,l),xt(a,u),Lt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new Vl),this.sharedNodes.get(r).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){var r;const{layoutId:a}=this.options;return a?((r=this.getStack())===null||r===void 0?void 0:r.lead)||this:this}getPrevLead(){var r;const{layoutId:a}=this.options;return a?(r=this.getStack())===null||r===void 0?void 0:r.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),r&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let a=!1;const{latestValues:l}=r;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&we("z",r,c,this.animationValues);for(let u=0;u{var a;return(a=r.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(fs),this.root.sharedNodes.clear()}}}function Bl(t){t.updateLayout()}function jl(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=t.layout,{animationType:o}=t.options,r=n.source!==t.layout.source;o==="size"?G(d=>{const h=r?n.measuredBox[d]:n.layoutBox[d],f=U(h);h.min=s[d].min,h.max=h.min+f}):Ni(o,n.layoutBox,s)&&G(d=>{const h=r?n.measuredBox[d]:n.layoutBox[d],f=U(s[d]);h.max=h.min+f,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[d].max=t.relativeTarget[d].min+f)});const a=bt();Lt(a,s,n.layoutBox);const l=bt();r?Lt(l,t.applyTransform(i,!0),n.measuredBox):Lt(l,s,n.layoutBox);const c=!ji(a);let u=!1;if(!t.resumeFrom){const d=t.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:h,layout:f}=d;if(h&&f){const m=R();kt(m,n.layoutBox,h.layoutBox);const p=R();kt(p,s,f.layoutBox),Ii(m,p)||(u=!0),d.options.layoutRoot&&(t.relativeTarget=p,t.relativeTargetOrigin=m,t.relativeParent=d)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeTargetChanged:u})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function Il(t){dt.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Ol(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Nl(t){t.clearSnapshot()}function fs(t){t.clearMeasurements()}function Ul(t){t.isLayoutDirty=!1}function zl(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function ps(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Gl(t){t.resolveTargetDelta()}function Kl(t){t.calcProjection()}function Wl(t){t.resetSkewAndRotation()}function $l(t){t.removeLeadSnapshot()}function ms(t,e,n){t.translate=M(e.translate,0,n),t.scale=M(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function gs(t,e,n,s){t.min=M(e.min,n.min,s),t.max=M(e.max,n.max,s)}function _l(t,e,n,s){gs(t.x,e.x,n.x,s),gs(t.y,e.y,n.y,s)}function Hl(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Yl={duration:.45,ease:[.4,0,.1,1]},ys=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),vs=ys("applewebkit/")&&!ys("chrome/")?Math.round:O;function bs(t){t.min=vs(t.min),t.max=vs(t.max)}function Xl(t){bs(t.x),bs(t.y)}function Ni(t,e,n){return t==="position"||t==="preserve-aspect"&&!ke(us(e),us(n),.2)}const ql=Oi({attachResizeListener:(t,e)=>H(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Te={current:void 0},Ui=Oi({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Te.current){const t=new ql({});t.mount(window),t.setOptions({layoutScroll:!0}),Te.current=t}return Te.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Zl={pan:{Feature:fl},drag:{Feature:hl,ProjectionNode:Ui,MeasureLayout:ki}},Ie={current:null},zi={current:!1};function Jl(){if(zi.current=!0,!!Ue)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Ie.current=t.matches;t.addListener(e),e()}else Ie.current=!1}function Ql(t,e,n){const{willChange:s}=e;for(const i in e){const o=e[i],r=n[i];if(I(o))t.addValue(i,o),ne(s)&&s.add(i);else if(I(r))t.addValue(i,It(o,{owner:t})),ne(s)&&s.remove(i);else if(r!==o)if(t.hasValue(i)){const a=t.getValue(i);a.liveStyle===!0?a.jump(o):a.hasAnimated||a.set(o)}else{const a=t.getStaticValue(i);t.addValue(i,It(a!==void 0?a:o,{owner:t}))}}for(const i in n)e[i]===void 0&&t.removeValue(i);return e}const xs=new WeakMap,tc=[...ti,j,rt],ec=t=>tc.find(Qs(t)),Gi=Object.keys(Bt),nc=Gi.length,ws=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],sc=We.length;function Ki(t){if(t)return t.options.allowProjection!==!1?t.projection:Ki(t.parent)}class ic{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:o,visualState:r},a={}){this.resolveKeyframes=(h,f,m,p)=>new this.KeyframeResolver(h,f,m,p,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=en,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>k.render(this.render,!1,!0);const{latestValues:l,renderState:c}=r;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=oe(n),this.isVariantNode=Ms(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in d){const f=d[h];l[h]!==void 0&&I(f)&&(f.set(l[h],!1),ne(u)&&u.add(h))}}mount(e){this.current=e,xs.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),zi.current||Jl(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ie.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){var e;xs.delete(this.current),this.projection&&this.projection.unmount(),it(this.notifyUpdate),it(this.render),this.valueSubscriptions.forEach(n=>n()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const n in this.events)this.events[n].clear();for(const n in this.features)(e=this.features[n])===null||e===void 0||e.unmount();this.current=null}bindToMotionValue(e,n){const s=mt.has(e),i=n.on("change",r=>{this.latestValues[e]=r,this.props.onUpdate&&k.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{i(),o(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures({children:e,...n},s,i,o){let r,a;for(let l=0;lthis.scheduleRender(),animationType:typeof c=="string"?c:"both",initialPromotionConfig:o,layoutScroll:h,layoutRoot:f})}return a}updateFeatures(){for(const e in this.features){const n=this.features[e];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):R()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;sn.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=It(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){var s;let i=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(s=this.getBaseTargetFromProps(this.props,e))!==null&&s!==void 0?s:this.readValueFromInstance(this.current,e,this.options);return i!=null&&(typeof i=="string"&&(Zs(i)||Xs(i))?i=parseFloat(i):!ec(i)&&rt.test(n)&&(i=li(e,n)),this.setBaseTarget(e,I(i)?i.get():i)),I(i)?i.get():i}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:s}=this.props;let i;if(typeof s=="string"||typeof s=="object"){const r=Qe(this.props,s,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);r&&(i=r[e])}if(s&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,e);return o!==void 0&&!I(o)?o:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new fn),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class Wi extends ic{constructor(){super(...arguments),this.KeyframeResolver=ci}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}}function rc(t){return window.getComputedStyle(t)}class oc extends Wi{constructor(){super(...arguments),this.type="html"}readValueFromInstance(e,n){if(mt.has(n)){const s=sn(n);return s&&s.default||0}else{const s=rc(e),i=(ks(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Ei(e,n)}build(e,n,s,i){Ye(e,n,s,i.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return Je(e,n,s)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;I(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(e,n,s,i){Os(e,n,s,i)}}class ac extends Wi{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(mt.has(n)){const s=sn(n);return s&&s.default||0}return n=Ns.has(n)?n:ze(n),e.getAttribute(n)}measureInstanceViewportBox(){return R()}scrapeMotionValuesFromProps(e,n,s){return zs(e,n,s)}build(e,n,s,i){qe(e,n,s,this.isSVGTag,i.transformTemplate)}renderInstance(e,n,s,i){Us(e,n,s,i)}mount(e){this.isSVGTag=Ze(e.tagName),super.mount(e)}}const lc=(t,e)=>$e(t)?new ac(e,{enableHardwareAcceleration:!1}):new oc(e,{allowProjection:t!==P.Fragment,enableHardwareAcceleration:!0}),cc={layout:{ProjectionNode:Ui,MeasureLayout:ki}},uc={..._a,...eo,...Zl,...cc},_c=ur((t,e)=>Gr(t,e,uc,lc));function $i(t){var e,n,s="";if(typeof t=="string"||typeof t=="number")s+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;er(o))?.classGroupId}const Ts=/^\[(.+)\]$/;function hc(t){if(Ts.test(t)){const e=Ts.exec(t)[1],n=e?.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}}function fc(t){const{theme:e,prefix:n}=t,s={nextPart:new Map,validators:[]};return mc(Object.entries(t.classGroups),n).forEach(([o,r])=>{Oe(r,s,o,e)}),s}function Oe(t,e,n,s){t.forEach(i=>{if(typeof i=="string"){const o=i===""?e:Ps(e,i);o.classGroupId=n;return}if(typeof i=="function"){if(pc(i)){Oe(i(s),e,n,s);return}e.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([o,r])=>{Oe(r,Ps(e,o),n,s)})})}function Ps(t,e){let n=t;return e.split(pn).forEach(s=>{n.nextPart.has(s)||n.nextPart.set(s,{nextPart:new Map,validators:[]}),n=n.nextPart.get(s)}),n}function pc(t){return t.isThemeGetter}function mc(t,e){return e?t.map(([n,s])=>{const i=s.map(o=>typeof o=="string"?e+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([r,a])=>[e+r,a])):o);return[n,i]}):t}function gc(t){if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=new Map,s=new Map;function i(o,r){n.set(o,r),e++,e>t&&(e=0,s=n,n=new Map)}return{get(o){let r=n.get(o);if(r!==void 0)return r;if((r=s.get(o))!==void 0)return i(o,r),r},set(o,r){n.has(o)?n.set(o,r):i(o,r)}}}const Hi="!";function yc(t){const e=t.separator,n=e.length===1,s=e[0],i=e.length;return function(r){const a=[];let l=0,c=0,u;for(let p=0;pc?u-c:void 0;return{modifiers:a,hasImportantModifier:h,baseClassName:f,maybePostfixModifierPosition:m}}}function vc(t){if(t.length<=1)return t;const e=[];let n=[];return t.forEach(s=>{s[0]==="["?(e.push(...n.sort(),s),n=[]):n.push(s)}),e.push(...n.sort()),e}function bc(t){return{cache:gc(t.cacheSize),splitModifiers:yc(t),...dc(t)}}const xc=/\s+/;function wc(t,e){const{splitModifiers:n,getClassGroupId:s,getConflictingClassGroupIds:i}=e,o=new Set;return t.trim().split(xc).map(r=>{const{modifiers:a,hasImportantModifier:l,baseClassName:c,maybePostfixModifierPosition:u}=n(r);let d=s(u?c.substring(0,u):c),h=!!u;if(!d){if(!u)return{isTailwindClass:!1,originalClassName:r};if(d=s(c),!d)return{isTailwindClass:!1,originalClassName:r};h=!1}const f=vc(a).join(":");return{isTailwindClass:!0,modifierId:l?f+Hi:f,classGroupId:d,originalClassName:r,hasPostfixModifier:h}}).reverse().filter(r=>{if(!r.isTailwindClass)return!0;const{modifierId:a,classGroupId:l,hasPostfixModifier:c}=r,u=a+l;return o.has(u)?!1:(o.add(u),i(l,c).forEach(d=>o.add(a+d)),!0)}).reverse().map(r=>r.originalClassName).join(" ")}function Tc(){let t=0,e,n,s="";for(;td(u),t());return n=bc(c),s=n.cache.get,i=n.cache.set,o=a,a(l)}function a(l){const c=s(l);if(c)return c;const u=wc(l,n);return i(l,u),u}return function(){return o(Tc.apply(null,arguments))}}function C(t){const e=n=>n[t]||[];return e.isThemeGetter=!0,e}const Xi=/^\[(?:([a-z-]+):)?(.+)\]$/i,Sc=/^\d+\/\d+$/,Ac=new Set(["px","full","screen"]),Vc=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Cc=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Mc=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Rc=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Dc=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function _(t){return ft(t)||Ac.has(t)||Sc.test(t)}function Z(t){return Pt(t,"length",Oc)}function ft(t){return!!t&&!Number.isNaN(Number(t))}function Ht(t){return Pt(t,"number",ft)}function Ct(t){return!!t&&Number.isInteger(Number(t))}function Ec(t){return t.endsWith("%")&&ft(t.slice(0,-1))}function w(t){return Xi.test(t)}function J(t){return Vc.test(t)}const Lc=new Set(["length","size","percentage"]);function kc(t){return Pt(t,Lc,qi)}function Fc(t){return Pt(t,"position",qi)}const Bc=new Set(["image","url"]);function jc(t){return Pt(t,Bc,Uc)}function Ic(t){return Pt(t,"",Nc)}function Mt(){return!0}function Pt(t,e,n){const s=Xi.exec(t);return s?s[1]?typeof e=="string"?s[1]===e:e.has(s[1]):n(s[2]):!1}function Oc(t){return Cc.test(t)&&!Mc.test(t)}function qi(){return!1}function Nc(t){return Rc.test(t)}function Uc(t){return Dc.test(t)}function zc(){const t=C("colors"),e=C("spacing"),n=C("blur"),s=C("brightness"),i=C("borderColor"),o=C("borderRadius"),r=C("borderSpacing"),a=C("borderWidth"),l=C("contrast"),c=C("grayscale"),u=C("hueRotate"),d=C("invert"),h=C("gap"),f=C("gradientColorStops"),m=C("gradientColorStopPositions"),p=C("inset"),g=C("margin"),v=C("opacity"),b=C("padding"),y=C("saturate"),T=C("scale"),A=C("sepia"),D=C("skew"),K=C("space"),S=C("translate"),F=()=>["auto","contain","none"],B=()=>["auto","hidden","clip","visible","scroll"],W=()=>["auto",w,e],V=()=>[w,e],Gt=()=>["",_,Z],at=()=>["auto",ft,w],E=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],N=()=>["solid","dashed","dotted","double","none"],gt=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],lt=()=>["start","end","center","between","around","evenly","stretch"],St=()=>["","0",w],mn=()=>["auto","avoid","all","avoid-page","page","left","right","column"],At=()=>[ft,Ht],Kt=()=>[ft,w];return{cacheSize:500,separator:":",theme:{colors:[Mt],spacing:[_,Z],blur:["none","",J,w],brightness:At(),borderColor:[t],borderRadius:["none","","full",J,w],borderSpacing:V(),borderWidth:Gt(),contrast:At(),grayscale:St(),hueRotate:Kt(),invert:St(),gap:V(),gradientColorStops:[t],gradientColorStopPositions:[Ec,Z],inset:W(),margin:W(),opacity:At(),padding:V(),saturate:At(),scale:At(),sepia:St(),skew:Kt(),space:V(),translate:V()},classGroups:{aspect:[{aspect:["auto","square","video",w]}],container:["container"],columns:[{columns:[J]}],"break-after":[{"break-after":mn()}],"break-before":[{"break-before":mn()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...E(),w]}],overflow:[{overflow:B()}],"overflow-x":[{"overflow-x":B()}],"overflow-y":[{"overflow-y":B()}],overscroll:[{overscroll:F()}],"overscroll-x":[{"overscroll-x":F()}],"overscroll-y":[{"overscroll-y":F()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[p]}],"inset-x":[{"inset-x":[p]}],"inset-y":[{"inset-y":[p]}],start:[{start:[p]}],end:[{end:[p]}],top:[{top:[p]}],right:[{right:[p]}],bottom:[{bottom:[p]}],left:[{left:[p]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ct,w]}],basis:[{basis:W()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",w]}],grow:[{grow:St()}],shrink:[{shrink:St()}],order:[{order:["first","last","none",Ct,w]}],"grid-cols":[{"grid-cols":[Mt]}],"col-start-end":[{col:["auto",{span:["full",Ct,w]},w]}],"col-start":[{"col-start":at()}],"col-end":[{"col-end":at()}],"grid-rows":[{"grid-rows":[Mt]}],"row-start-end":[{row:["auto",{span:[Ct,w]},w]}],"row-start":[{"row-start":at()}],"row-end":[{"row-end":at()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",w]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",w]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...lt()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...lt(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...lt(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[K]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[K]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",w,e]}],"min-w":[{"min-w":[w,e,"min","max","fit"]}],"max-w":[{"max-w":[w,e,"none","full","min","max","fit","prose",{screen:[J]},J]}],h:[{h:[w,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[w,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[w,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[w,e,"auto","min","max","fit"]}],"font-size":[{text:["base",J,Z]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ht]}],"font-family":[{font:[Mt]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",w]}],"line-clamp":[{"line-clamp":["none",ft,Ht]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",_,w]}],"list-image":[{"list-image":["none",w]}],"list-style-type":[{list:["none","disc","decimal",w]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...N(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",_,Z]}],"underline-offset":[{"underline-offset":["auto",_,w]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:V()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",w]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",w]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...E(),Fc]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",kc]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},jc]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...N(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:N()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...N()]}],"outline-offset":[{"outline-offset":[_,w]}],"outline-w":[{outline:[_,Z]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:Gt()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[_,Z]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",J,Ic]}],"shadow-color":[{shadow:[Mt]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...gt(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":gt()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[s]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",J,w]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[y]}],sepia:[{sepia:[A]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[s]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[A]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[r]}],"border-spacing-x":[{"border-spacing-x":[r]}],"border-spacing-y":[{"border-spacing-y":[r]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",w]}],duration:[{duration:Kt()}],ease:[{ease:["linear","in","out","in-out",w]}],delay:[{delay:Kt()}],animate:[{animate:["none","spin","ping","pulse","bounce",w]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[Ct,w]}],"translate-x":[{"translate-x":[S]}],"translate-y":[{"translate-y":[S]}],"skew-x":[{"skew-x":[D]}],"skew-y":[{"skew-y":[D]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",w]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",w]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":V()}],"scroll-mx":[{"scroll-mx":V()}],"scroll-my":[{"scroll-my":V()}],"scroll-ms":[{"scroll-ms":V()}],"scroll-me":[{"scroll-me":V()}],"scroll-mt":[{"scroll-mt":V()}],"scroll-mr":[{"scroll-mr":V()}],"scroll-mb":[{"scroll-mb":V()}],"scroll-ml":[{"scroll-ml":V()}],"scroll-p":[{"scroll-p":V()}],"scroll-px":[{"scroll-px":V()}],"scroll-py":[{"scroll-py":V()}],"scroll-ps":[{"scroll-ps":V()}],"scroll-pe":[{"scroll-pe":V()}],"scroll-pt":[{"scroll-pt":V()}],"scroll-pr":[{"scroll-pr":V()}],"scroll-pb":[{"scroll-pb":V()}],"scroll-pl":[{"scroll-pl":V()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",w]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[_,Z,Ht]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const Yc=Pc(zc);export{Hc as c,_c as m,Yc as t}; diff --git a/docs/_astro/client.DbokQZWz.js b/docs/_astro/client.BwV3pxnh.js similarity index 99% rename from docs/_astro/client.DbokQZWz.js rename to docs/_astro/client.BwV3pxnh.js index 7905246..cbb6fd7 100644 --- a/docs/_astro/client.DbokQZWz.js +++ b/docs/_astro/client.BwV3pxnh.js @@ -1,4 +1,4 @@ -import{r as Ue}from"./index.NEDEFKed.js";var Po={exports:{}},ve={},To={exports:{}},Lo={};/** +import{a as Ue}from"./index.DIpCM_17.js";var Po={exports:{}},ve={},To={exports:{}},Lo={};/** * @license React * scheduler.production.min.js * diff --git a/docs/_astro/client.CMMtWkl7.js b/docs/_astro/client.CMMtWkl7.js deleted file mode 100644 index 21468d0..0000000 --- a/docs/_astro/client.CMMtWkl7.js +++ /dev/null @@ -1 +0,0 @@ -const c={context:void 0,registry:void 0};function E(e){c.context=e}function le(){return{...c.context,id:`${c.context.id}${c.context.count++}-`,count:0}}const oe=(e,n)=>e===n,m={equals:oe};let re=z;const A=1,$=2,K={owned:null,cleanups:null,context:null,owner:null};var a=null;let B=null,fe=null,p=null,g=null,b=null,O=0;function V(e,n){const t=p,s=a,i=e.length===0,l=n===void 0?s:n,f=i?K:{owned:null,cleanups:null,context:l?l.context:null,owner:l},o=i?e:()=>e(()=>N(()=>_(f)));a=f,p=null;try{return F(o,!0)}finally{p=t,a=s}}function M(e,n){n=n?Object.assign({},m,n):m;const t={value:e,observers:null,observerSlots:null,comparator:n.equals||void 0},s=i=>(typeof i=="function"&&(i=i(t.value)),Q(t,i));return[J.bind(t),s]}function I(e,n,t){const s=X(e,n,!1,A);R(s)}function v(e,n,t){t=t?Object.assign({},m,t):m;const s=X(e,n,!0,0);return s.observers=null,s.observerSlots=null,s.comparator=t.equals||void 0,R(s),J.bind(s)}function N(e){if(p===null)return e();const n=p;p=null;try{return e()}finally{p=n}}function ue(e){return a===null||(a.cleanups===null?a.cleanups=[e]:a.cleanups.push(e)),e}function ce(){return a}function ae(e){b.push.apply(b,e),e.length=0}function G(e,n){const t=Symbol("context");return{id:t,Provider:be(t),defaultValue:e}}function de(e){return a&&a.context&&a.context[e.id]!==void 0?a.context[e.id]:e.defaultValue}function he(e){const n=v(e),t=v(()=>j(n()));return t.toArray=()=>{const s=t();return Array.isArray(s)?s:s!=null?[s]:[]},t}let D;function pe(){return D||(D=G())}function J(){if(this.sources&&this.state)if(this.state===A)R(this);else{const e=g;g=null,F(()=>L(this),!1),g=e}if(p){const e=this.observers?this.observers.length:0;p.sources?(p.sources.push(this),p.sourceSlots.push(e)):(p.sources=[this],p.sourceSlots=[e]),this.observers?(this.observers.push(p),this.observerSlots.push(p.sources.length-1)):(this.observers=[p],this.observerSlots=[p.sources.length-1])}return this.value}function Q(e,n,t){let s=e.value;return(!e.comparator||!e.comparator(s,n))&&(e.value=n,e.observers&&e.observers.length&&F(()=>{for(let i=0;i1e6)throw g=[],new Error},!1)),n}function R(e){if(!e.fn)return;_(e);const n=O;ge(e,e.value,n)}function ge(e,n,t){let s;const i=a,l=p;p=a=e;try{s=e.fn(n)}catch(f){return e.pure&&(e.state=A,e.owned&&e.owned.forEach(_),e.owned=null),e.updatedAt=t+1,te(f)}finally{p=l,a=i}(!e.updatedAt||e.updatedAt<=t)&&(e.updatedAt!=null&&"observers"in e?Q(e,s):e.value=s,e.updatedAt=t)}function X(e,n,t,s=A,i){const l={fn:e,state:s,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:n,owner:a,context:a?a.context:null,pure:t};return a===null||a!==K&&(a.owned?a.owned.push(l):a.owned=[l]),l}function Z(e){if(e.state===0)return;if(e.state===$)return L(e);if(e.suspense&&N(e.suspense.inFallback))return e.suspense.effects.push(e);const n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt=0;t--)if(e=n[t],e.state===A)R(e);else if(e.state===$){const s=g;g=null,F(()=>L(e,n[0]),!1),g=s}}function F(e,n){if(g)return e();let t=!1;n||(g=[]),b?t=!0:b=[],O++;try{const s=e();return ye(t),s}catch(s){t||(b=null),g=null,te(s)}}function ye(e){if(g&&(z(g),g=null),e)return;const n=b;b=null,n.length&&F(()=>re(n),!1)}function z(e){for(let n=0;n=0;n--)_(e.owned[n]);e.owned=null}if(e.cleanups){for(n=e.cleanups.length-1;n>=0;n--)e.cleanups[n]();e.cleanups=null}e.state=0}function xe(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function te(e,n=a){throw xe(e)}function j(e){if(typeof e=="function"&&!e.length)return j(e());if(Array.isArray(e)){const n=[];for(let t=0;ti=N(()=>(a.context={...a.context,[e]:s.value},he(()=>s.children))),void 0),i}}let ne=!1;function we(){ne=!0}function q(e,n){if(ne&&c.context){const t=c.context;E(le());const s=N(()=>e(n||{}));return E(t),s}return N(()=>e(n||{}))}const Ae=G();function Se(e){let n=0,t,s,i,l,f;const[o,r]=M(!1),h=pe(),u={increment:()=>{++n===1&&r(!0)},decrement:()=>{--n===0&&r(!1)},inFallback:o,effects:[],resolved:!1},y=ce();if(c.context&&c.load){const x=c.context.id+c.context.count;let S=c.load(x);if(S&&(typeof S!="object"||S.status!=="success"?i=S:c.gather(x)),i&&i!=="$$f"){const[k,T]=M(void 0,{equals:!1});l=k,i.then(()=>{if(c.done)return T();c.gather(x),E(s),T(),E()},P=>{f=P,T()})}}const w=de(Ae);w&&(t=w.register(u.inFallback));let d;return ue(()=>d&&d()),q(h.Provider,{value:u,get children(){return v(()=>{if(f)throw f;if(s=c.context,l)return l(),l=void 0;s&&i==="$$f"&&E();const x=v(()=>e.children);return v(S=>{const k=u.inFallback(),{showContent:T=!0,showFallback:P=!0}=t?t():{};if((!k||i&&i!=="$$f")&&T)return u.resolved=!0,d&&d(),d=s=i=void 0,ae(u.effects),x();if(P)return d?S:V(ie=>(d=ie,s&&(E({id:s.id+"f",count:0}),s=void 0),e.fallback),y)})})}})}function Ce(e,n,t){let s=t.length,i=n.length,l=s,f=0,o=0,r=n[i-1].nextSibling,h=null;for(;fu-o){const x=n[f];for(;o{i=l,n===document?e():Ee(n,e(),n.firstChild?null:void 0,t)},s.owner),()=>{i(),n.textContent=""}}function Ee(e,n,t,s){if(t!==void 0&&!s&&(s=[]),typeof n!="function")return H(e,n,s,t);I(i=>H(e,n(),i,t),s)}function Te(e,n,t={}){c.completed=globalThis._$HY.completed,c.events=globalThis._$HY.events,c.load=i=>globalThis._$HY.r[i],c.has=i=>i in globalThis._$HY.r,c.gather=i=>Y(n,i),c.registry=new Map,c.context={id:t.renderId||"",count:0},Y(n,t.renderId);const s=se(e,n,[...n.childNodes],t);return c.context=null,s}function H(e,n,t,s,i){const l=!!c.context&&e.isConnected;if(l){!t&&(t=[...e.childNodes]);let r=[];for(let h=0;h{let r=n();for(;typeof r=="function";)r=r();t=H(e,r,t,s)}),()=>t;if(Array.isArray(n)){const r=[],h=t&&Array.isArray(t);if(U(r,n,t,i))return I(()=>t=H(e,r,t,s,!0)),()=>t;if(l){if(!r.length)return t;if(s===void 0)return[...e.childNodes];let u=r[0],y=[u];for(;(u=u.nextSibling)!==s;)y.push(u);return t=y}if(r.length===0){if(t=C(e,t,s),o)return t}else h?t.length===0?W(e,r,s):Ce(e,t,r):(t&&C(e),W(e,r));t=r}else if(n.nodeType){if(l&&n.parentNode)return t=o?[n]:n;if(Array.isArray(t)){if(o)return t=C(e,t,s,n);C(e,t,null,n)}else t==null||t===""||!e.firstChild?e.appendChild(n):e.replaceChild(n,e.firstChild);t=n}}return t}function U(e,n,t,s){let i=!1;for(let l=0,f=n.length;l=0;f--){const o=n[f];if(i!==o){const r=o.parentNode===e;!l&&!f?r?e.replaceChild(i,o):e.insertBefore(i,t):r&&o.remove()}else l=!0}}else e.insertBefore(i,t);return[i]}function Y(e,n){const t=e.querySelectorAll("*[data-hk]");for(let s=0;s(we(),Te(...e));var Ne=e=>(n,t,s,{client:i})=>{if(!e.hasAttribute("ssr"))return;const l=i!=="only",f=l?ve:se;let o,r={};if(Object.keys(s).length>0){if(i!=="only"){const d=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,x=>x===e?NodeFilter.FILTER_SKIP:x.nodeName==="ASTRO-SLOT"?NodeFilter.FILTER_ACCEPT:x.nodeName==="ASTRO-ISLAND"?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_SKIP);for(;o=d.nextNode();)r[o.getAttribute("name")||"default"]=o}for(const[d,x]of Object.entries(s))r[d]||(r[d]=document.createElement("astro-slot"),d!=="default"&&r[d].setAttribute("name",d),r[d].innerHTML=x)}const{default:h,...u}=r,y=e.dataset.solidRenderId,w=f(()=>{const d=()=>q(n,{...t,...u,children:h});return l?q(Se,{get children(){return d()}}):d()},e,{renderId:y});e.addEventListener("astro:unmount",()=>w(),{once:!0})};export{Ne as default}; diff --git a/docs/_astro/client.DEGHhFmz.js b/docs/_astro/client.DEGHhFmz.js deleted file mode 100644 index 8f191cc..0000000 --- a/docs/_astro/client.DEGHhFmz.js +++ /dev/null @@ -1 +0,0 @@ -const f=(n,i)=>{const e=document.createElement("template");return e.innerHTML=i,Array.from(e.content.children).forEach(l=>{l.setAttribute("slot",n)}),e.innerHTML};var s=n=>async(i,e,{default:l,...d})=>{let t=n.children[0];const c=n.getAttribute("client")==="only";if(c){t=new i;const o=Object.entries(d).map(([r,a])=>f(r,a)).join("");t.innerHTML=`${l??""}${o}`,n.appendChild(t);for(let[r,a]of Object.entries(e))r in i.prototype||t.setAttribute(r,a)}if(!(!t||!(t.hasAttribute("defer-hydration")||c))){for(let[o,r]of Object.entries(e))o in i.prototype&&(t[o]=r);t.removeAttribute("defer-hydration")}};export{s as default}; diff --git a/docs/_astro/client.XZ7RBk3X.js b/docs/_astro/client.XZ7RBk3X.js deleted file mode 100644 index 34c3de9..0000000 --- a/docs/_astro/client.XZ7RBk3X.js +++ /dev/null @@ -1,2 +0,0 @@ -const __vite__fileDeps=["_astro/signals.module.BacEoWNe.js","_astro/preact.module.xMJTyml6.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]); -import{a as e,_ as m,B as c,D as v}from"./preact.module.xMJTyml6.js";const _=({value:t,name:o,hydrate:a=!0})=>t?e(a?"astro-slot":"astro-static-slot",{name:o,dangerouslySetInnerHTML:{__html:t}}):null;_.shouldComponentUpdate=()=>!1;var f=_;const i=new Map;var w=t=>async(o,a,{default:s,...d},{client:g})=>{if(!t.hasAttribute("ssr"))return;for(const[n,r]of Object.entries(d))a[n]=e(f,{value:r,name:n});if(t.dataset.preactSignals){const{signal:n}=await m(()=>import("./signals.module.BacEoWNe.js"),__vite__mapDeps([0,1]));let r=JSON.parse(t.dataset.preactSignals);for(const[u,l]of Object.entries(r)){if(!i.has(l)){const p=n(a[u]);i.set(l,p)}a[u]=i.get(l)}}(g!=="only"?v:c)(e(o,a,s!=null?e(f,{value:s}):s),t),t.addEventListener("astro:unmount",()=>c(null,t),{once:!0})};export{w as default}; diff --git a/docs/_astro/index.B0_PAOE_.css b/docs/_astro/index.B0_PAOE_.css deleted file mode 100644 index 993a64a..0000000 --- a/docs/_astro/index.B0_PAOE_.css +++ /dev/null @@ -1 +0,0 @@ -*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.inset-6{inset:1.5rem}.inset-x-0{left:0;right:0}.-bottom-20{bottom:-5rem}.bottom-0{bottom:0}.bottom-full{bottom:100%}.end-full{inset-inline-end:100%}.left-0{left:0}.left-1\/2{left:50%}.right-0{right:0}.start-1\/2{inset-inline-start:50%}.top-0{top:0}.top-1\/2{top:50%}.top-4{top:1rem}.top-full{top:100%}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\[1\]{z-index:1}.row-span-1{grid-row:span 1 / span 1}.m-2{margin:.5rem}.m-4{margin:1rem}.\!mx-\[10px\]{margin-left:10px!important;margin-right:10px!important}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-4{margin-top:1rem;margin-bottom:1rem}.-mt-12{margin-top:-3rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-8{margin-bottom:2rem}.ml-auto{margin-left:auto}.ms-2{margin-inline-start:.5rem}.ms-5{margin-inline-start:1.25rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.line-clamp-3{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-video{aspect-ratio:16 / 9}.size-3{width:.75rem;height:.75rem}.size-3\.5{width:.875rem;height:.875rem}.size-4{width:1rem;height:1rem}.size-6{width:1.5rem;height:1.5rem}.size-8{width:2rem;height:2rem}.h-10{height:2.5rem}.h-12{height:3rem}.h-20{height:5rem}.h-32{height:8rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-full{height:100%}.max-h-\[500px\]{max-height:500px}.min-h-\[6rem\]{min-height:6rem}.min-h-screen{min-height:100vh}.w-1\/3{width:33.333333%}.w-10{width:2.5rem}.w-24{width:6rem}.w-3\/4{width:75%}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-\[1900px\]{width:1900px}.w-\[calc\(100\%-2rem\)\]{width:calc(100% - 2rem)}.w-full{width:100%}.max-w-3xl{max-width:48rem}.max-w-5xl{max-width:64rem}.max-w-6xl{max-width:72rem}.max-w-7xl{max-width:80rem}.max-w-\[85rem\]{max-width:85rem}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-none{max-width:none}.max-w-sm{max-width:24rem}.flex-1{flex:1 1 0%}.flex-none{flex:none}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.grow{flex-grow:1}.basis-full{flex-basis:100%}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-8{--tw-translate-x: -2rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-10{--tw-translate-x: 2.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-12{--tw-translate-x: 3rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-10{--tw-translate-y: 2.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-8{--tw-translate-y: 2rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rotate-12{--tw-rotate: -12deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-12{--tw-rotate: 12deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-skew-x-12{--tw-skew-x: -12deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.skew-x-12{--tw-skew-x: 12deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-75{--tw-scale-x: .75;--tw-scale-y: .75;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.resize{resize:both}.list-disc{list-style-type:disc}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.flex-nowrap{flex-wrap:nowrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-4{gap:1rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.gap-x-3\.5{-moz-column-gap:.875rem;column-gap:.875rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-12>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(3rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(3rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-3xl{border-radius:1.5rem}.rounded-\[36px\]{border-radius:36px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-\[3px\]{border-width:3px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-s{border-inline-start-width:1px}.border-none{border-style:none}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.border-current{border-color:currentColor}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-green-500{--tw-border-opacity: 1;border-color:rgb(34 197 94 / var(--tw-border-opacity))}.border-neutral-100{--tw-border-opacity: 1;border-color:rgb(245 245 245 / var(--tw-border-opacity))}.border-neutral-200{--tw-border-opacity: 1;border-color:rgb(229 229 229 / var(--tw-border-opacity))}.border-orange-500{--tw-border-opacity: 1;border-color:rgb(249 115 22 / var(--tw-border-opacity))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.border-yellow-500{--tw-border-opacity: 1;border-color:rgb(234 179 8 / var(--tw-border-opacity))}.border-yellow-700{--tw-border-opacity: 1;border-color:rgb(161 98 7 / var(--tw-border-opacity))}.border-t-transparent{border-top-color:transparent}.bg-\[var\(--sl-color-black\)\]{background-color:var(--sl-color-black)}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.bg-cyan-400\/10{background-color:#22d3ee1a}.bg-cyan-400\/60{background-color:#22d3ee99}.bg-cyan-400\/90{background-color:#22d3eee6}.bg-cyan-500{--tw-bg-opacity: 1;background-color:rgb(6 182 212 / var(--tw-bg-opacity))}.bg-cyan-600{--tw-bg-opacity: 1;background-color:rgb(8 145 178 / var(--tw-bg-opacity))}.bg-cyan-700{--tw-bg-opacity: 1;background-color:rgb(14 116 144 / var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity))}.bg-green-200{--tw-bg-opacity: 1;background-color:rgb(187 247 208 / var(--tw-bg-opacity))}.bg-neutral-100{--tw-bg-opacity: 1;background-color:rgb(245 245 245 / var(--tw-bg-opacity))}.bg-neutral-200{--tw-bg-opacity: 1;background-color:rgb(229 229 229 / var(--tw-bg-opacity))}.bg-neutral-900{--tw-bg-opacity: 1;background-color:rgb(23 23 23 / var(--tw-bg-opacity))}.bg-orange-100{--tw-bg-opacity: 1;background-color:rgb(255 237 213 / var(--tw-bg-opacity))}.bg-orange-500{--tw-bg-opacity: 1;background-color:rgb(249 115 22 / var(--tw-bg-opacity))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-yellow-400{--tw-bg-opacity: 1;background-color:rgb(250 204 21 / var(--tw-bg-opacity))}.bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity))}.bg-yellow-600{--tw-bg-opacity: 1;background-color:rgb(202 138 4 / var(--tw-bg-opacity))}.bg-yellow-700{--tw-bg-opacity: 1;background-color:rgb(161 98 7 / var(--tw-bg-opacity))}.bg-zinc-950{--tw-bg-opacity: 1;background-color:rgb(9 9 11 / var(--tw-bg-opacity))}.bg-opacity-50{--tw-bg-opacity: .5}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-neutral-200{--tw-gradient-from: #e5e5e5 var(--tw-gradient-from-position);--tw-gradient-to: rgb(229 229 229 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-neutral-400{--tw-gradient-from: #a3a3a3 var(--tw-gradient-from-position);--tw-gradient-to: rgb(163 163 163 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-pink-500{--tw-gradient-from: #ec4899 var(--tw-gradient-from-position);--tw-gradient-to: rgb(236 72 153 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-white{--tw-gradient-from: #fff var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-neutral-100{--tw-gradient-to: #f5f5f5 var(--tw-gradient-to-position)}.to-neutral-200{--tw-gradient-to: #e5e5e5 var(--tw-gradient-to-position)}.to-violet-500{--tw-gradient-to: #8b5cf6 var(--tw-gradient-to-position)}.bg-cover{background-size:cover}.stroke-yellow-700{stroke:#a16207}.stroke-yellow-700\/50{stroke:#a1620780}.object-scale-down{-o-object-fit:scale-down;object-fit:scale-down}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.pl-5{padding-left:1.25rem}.ps-5{padding-inline-start:1.25rem}.ps-px{padding-inline-start:1px}.text-left{text-align:left}.text-center{text-align:center}.font-sans{font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}.text-cyan-600{--tw-text-opacity: 1;color:rgb(8 145 178 / var(--tw-text-opacity))}.text-gray-100{--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity))}.text-gray-200{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity))}.text-neutral-500{--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity))}.text-neutral-600{--tw-text-opacity: 1;color:rgb(82 82 82 / var(--tw-text-opacity))}.text-orange-600{--tw-text-opacity: 1;color:rgb(234 88 12 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-yellow-300{--tw-text-opacity: 1;color:rgb(253 224 71 / var(--tw-text-opacity))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity))}.text-yellow-600{--tw-text-opacity: 1;color:rgb(202 138 4 / var(--tw-text-opacity))}.opacity-0{opacity:0}.opacity-10{opacity:.1}.opacity-100{opacity:1}.opacity-50{opacity:.5}.shadow-inner{--tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / .05);--tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-none{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-black\/10{--tw-shadow-color: rgb(0 0 0 / .1);--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-lg{--tw-drop-shadow: drop-shadow(0 10px 8px rgb(0 0 0 / .04)) drop-shadow(0 4px 3px rgb(0 0 0 / .1));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[opacity\,margin\]{transition-property:opacity,margin;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-100{transition-duration:.1s}.duration-1000{transition-duration:1s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.duration-\[0\.1ms\]{transition-duration:.1ms}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.\[--adaptive\:none\]{--adaptive: none}.\[--strategy\:static\]{--strategy: static}.before\:absolute:before{content:var(--tw-content);position:absolute}.before\:-end-5:before{content:var(--tw-content);inset-inline-end:-1.25rem}.before\:-top-5:before{content:var(--tw-content);top:-1.25rem}.before\:start-0:before{content:var(--tw-content);inset-inline-start:0px}.before\:top-0:before{content:var(--tw-content);top:0}.before\:h-5:before{content:var(--tw-content);height:1.25rem}.before\:h-full:before{content:var(--tw-content);height:100%}.before\:w-5:before{content:var(--tw-content);width:1.25rem}.before\:w-full:before{content:var(--tw-content);width:100%}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:inset-0:after{content:var(--tw-content);inset:0}.after\:inset-2:after{content:var(--tw-content);inset:.5rem}.after\:inset-2\.5:after{content:var(--tw-content);inset:.625rem}.after\:transform-gpu:after{content:var(--tw-content);transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.after\:rounded-full:after{content:var(--tw-content);border-radius:9999px}.after\:rounded-xl:after{content:var(--tw-content);border-radius:.75rem}.after\:bg-cyan-600:after{content:var(--tw-content);--tw-bg-opacity: 1;background-color:rgb(8 145 178 / var(--tw-bg-opacity))}.after\:bg-gradient-to-b:after{content:var(--tw-content);background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.after\:from-neutral-100:after{content:var(--tw-content);--tw-gradient-from: #f5f5f5 var(--tw-gradient-from-position);--tw-gradient-to: rgb(245 245 245 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.after\:to-neutral-50:after{content:var(--tw-content);--tw-gradient-to: #fafafa var(--tw-gradient-to-position)}.after\:opacity-0:after{content:var(--tw-content);opacity:0}.after\:mix-blend-color:after{content:var(--tw-content);mix-blend-mode:color}.hover\:scale-110:hover{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity))}.hover\:bg-cyan-700:hover{--tw-bg-opacity: 1;background-color:rgb(14 116 144 / var(--tw-bg-opacity))}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.hover\:bg-gray-300:hover{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.hover\:bg-yellow-300:hover{--tw-bg-opacity: 1;background-color:rgb(253 224 71 / var(--tw-bg-opacity))}.hover\:bg-gradient-to-r:hover{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.hover\:from-cyan-500:hover{--tw-gradient-from: #06b6d4 var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:to-cyan-400:hover{--tw-gradient-to: #22d3ee var(--tw-gradient-to-position)}.hover\:text-black:hover{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.hover\:text-yellow-500:hover{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity))}.hover\:text-zinc-950:hover{--tw-text-opacity: 1;color:rgb(9 9 11 / var(--tw-text-opacity))}.hover\:shadow-xl:hover{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:ring-2:hover{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.hover\:ring-cyan-400:hover{--tw-ring-opacity: 1;--tw-ring-color: rgb(34 211 238 / var(--tw-ring-opacity))}.hover\:ring-offset-2:hover{--tw-ring-offset-width: 2px}.focus\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.focus\:border-indigo-500:focus{--tw-border-opacity: 1;border-color:rgb(99 102 241 / var(--tw-border-opacity))}.focus\:bg-gray-100:focus{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity))}.focus\:ring-indigo-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity))}.focus\:ring-yellow-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(234 179 8 / var(--tw-ring-opacity))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:opacity-50:disabled{opacity:.5}.group\/bento:hover .group-hover\/bento\:translate-x-2{--tw-translate-x: .5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:-translate-x-96{--tw-translate-x: -24rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:-skew-x-12{--tw-skew-x: -12deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:skew-x-12{--tw-skew-x: 12deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity))}.group:hover .group-hover\:bg-yellow-700{--tw-bg-opacity: 1;background-color:rgb(161 98 7 / var(--tw-bg-opacity))}.peer:checked~.peer-checked\:from-cyan-500{--tw-gradient-from: #06b6d4 var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.peer:checked~.peer-checked\:to-cyan-100{--tw-gradient-to: #cffafe var(--tw-gradient-to-position)}.peer:checked~.peer-checked\:drop-shadow-sm{--tw-drop-shadow: drop-shadow(0 1px 1px rgb(0 0 0 / .05));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.peer:checked~.peer-checked\:after\:inset-1:after{content:var(--tw-content);inset:.25rem}.peer:checked~.peer-checked\:after\:from-neutral-200:after{content:var(--tw-content);--tw-gradient-from: #e5e5e5 var(--tw-gradient-from-position);--tw-gradient-to: rgb(229 229 229 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.peer:checked~.peer-checked\:after\:to-neutral-100:after{content:var(--tw-content);--tw-gradient-to: #f5f5f5 var(--tw-gradient-to-position)}.peer:checked~.peer-checked\:after\:opacity-100:after{content:var(--tw-content);opacity:1}.hs-dropdown.open>.hs-dropdown-open\:opacity-100{opacity:1}.hs-dropdown.open .hs-dropdown-toggle .hs-dropdown-open\:opacity-100{opacity:1}.hs-dropdown.open>.hs-dropdown-menu>.hs-dropdown-open\:opacity-100{opacity:1}.hs-collapse.open .hs-collapse-open\:block{display:block}.hs-collapse.open .hs-collapse-open\:hidden{display:none}.hs-collapse.open.hs-collapse-open\:block{display:block}.hs-collapse.open.hs-collapse-open\:hidden{display:none}.hs-collapse-toggle.open .hs-collapse-open\:block{display:block}.hs-collapse-toggle.open .hs-collapse-open\:hidden{display:none}.hs-collapse-toggle.open.hs-collapse-open\:block{display:block}.hs-collapse-toggle.open.hs-collapse-open\:hidden{display:none}.selected .hs-combo-box-selected\:block,.selected.hs-combo-box-selected\:block{display:block}@media (min-width: 640px){.sm\:-rotate-90{--tw-rotate: -90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 768px){.md\:col-span-1{grid-column:span 1 / span 1}.md\:col-span-2{grid-column:span 2 / span 2}.md\:my-6{margin-top:1.5rem;margin-bottom:1.5rem}.md\:block{display:block}.md\:flex{display:flex}.md\:hidden{display:none}.md\:w-48{width:12rem}.md\:w-96{width:24rem}.md\:scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.md\:scale-110{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.md\:auto-rows-\[18rem\]{grid-auto-rows:18rem}.md\:auto-rows-\[20rem\]{grid-auto-rows:20rem}.md\:flex-row{flex-direction:row}.md\:flex-nowrap{flex-wrap:nowrap}.md\:items-center{align-items:center}.md\:justify-start{justify-content:flex-start}.md\:justify-end{justify-content:flex-end}.md\:justify-between{justify-content:space-between}.md\:border{border-width:1px}.md\:border-s{border-inline-start-width:1px}.md\:border-yellow-500{--tw-border-opacity: 1;border-color:rgb(234 179 8 / var(--tw-border-opacity))}.md\:p-4{padding:1rem}.md\:p-6{padding:1.5rem}.md\:px-3{padding-left:.75rem;padding-right:.75rem}.md\:px-6{padding-left:1.5rem;padding-right:1.5rem}.md\:py-0{padding-top:0;padding-bottom:0}.md\:ps-6{padding-inline-start:1.5rem}.md\:ps-7{padding-inline-start:1.75rem}.md\:text-xl{font-size:1.25rem;line-height:1.75rem}.md\:shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.md\:duration-\[150ms\]{transition-duration:.15s}.md\:\[--strategy\:absolute\]{--strategy: absolute}.md\:\[--strategy\:fixed\]{--strategy: fixed}.md\:\[--trigger\:hover\]{--trigger: hover}}@media (min-width: 1024px){.lg\:w-96{width:24rem}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:p-8{padding:2rem}.lg\:px-8{padding-left:2rem;padding-right:2rem}.lg\:pt-16{padding-top:4rem}.lg\:text-3xl{font-size:1.875rem;line-height:2.25rem}}@media (min-width: 1280px){.xl\:mx-auto{margin-left:auto;margin-right:auto}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.xl\:px-0{padding-left:0;padding-right:0}}@media (prefers-color-scheme: dark){.dark\:border-neutral-700{--tw-border-opacity: 1;border-color:rgb(64 64 64 / var(--tw-border-opacity))}.dark\:border-white\/\[0\.1\]{border-color:#ffffff1a}.dark\:border-white\/\[0\.2\]{border-color:#fff3}.dark\:bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.dark\:bg-green-900\/20{background-color:#14532d33}.dark\:bg-neutral-900{--tw-bg-opacity: 1;background-color:rgb(23 23 23 / var(--tw-bg-opacity))}.dark\:bg-orange-900\/20{background-color:#7c2d1233}.dark\:bg-red-900\/20{background-color:#7f1d1d33}.dark\:bg-opacity-80{--tw-bg-opacity: .8}.dark\:from-neutral-900{--tw-gradient-from: #171717 var(--tw-gradient-from-position);--tw-gradient-to: rgb(23 23 23 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:to-neutral-800{--tw-gradient-to: #262626 var(--tw-gradient-to-position)}.dark\:text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.dark\:text-neutral-200{--tw-text-opacity: 1;color:rgb(229 229 229 / var(--tw-text-opacity))}.dark\:text-neutral-300{--tw-text-opacity: 1;color:rgb(212 212 212 / var(--tw-text-opacity))}.dark\:text-neutral-400{--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity))}.dark\:shadow-none{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.dark\:hover\:bg-neutral-800:hover{--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}.dark\:focus\:bg-neutral-800:focus{--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}}:root{--accent: 136, 58, 234;--accent-light: 224, 204, 250;--accent-dark: 49, 10, 101;--accent-gradient: linear-gradient( 45deg, rgb(var(--accent)), rgb(var(--accent-light)) 30%, white 60% )}code{font-family:Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace}.hexgrid-background{background-image:url('data:image/svg+xml,');background-repeat:repeat;background-position:0 0;animation:scrollLeft 2s linear infinite}@keyframes scrollLeft{0%{background-position:0 0}to{background-position:-100px 0}}.link-card[data-astro-cid-dohjnao5]{list-style:none;display:flex;padding:1px;background-color:#23262d;background-image:none;background-size:400%;border-radius:7px;background-position:100%;transition:background-position .6s cubic-bezier(.22,1,.36,1);box-shadow:inset 0 0 0 1px #ffffff1a}.link-card[data-astro-cid-dohjnao5]>a[data-astro-cid-dohjnao5]{width:100%;text-decoration:none;line-height:1.4;padding:calc(1.5rem - 1px);border-radius:8px;color:#fff;background-color:#23262d;opacity:.8}h2[data-astro-cid-dohjnao5]{margin:0;font-size:1.25rem;transition:color .6s cubic-bezier(.22,1,.36,1)}p[data-astro-cid-dohjnao5]{margin-top:.5rem;margin-bottom:0}.link-card[data-astro-cid-dohjnao5]:is(:hover,:focus-within){background-position:0;background-image:var(--accent-gradient)}.link-card[data-astro-cid-dohjnao5]:is(:hover,:focus-within) h2[data-astro-cid-dohjnao5]{color:rgb(var(--accent-light))}main[data-astro-cid-j7pv25f6]{margin:auto;padding:1rem;width:800px;max-width:calc(100% - 2rem);color:#fff;font-size:20px;line-height:1.6}.astro-a[data-astro-cid-j7pv25f6]{position:absolute;top:-32px;left:50%;transform:translate(-50%);width:220px;height:auto;z-index:-1}h1[data-astro-cid-j7pv25f6]{font-size:4rem;font-weight:700;line-height:1;text-align:center;margin-bottom:1em}.text-gradient[data-astro-cid-j7pv25f6]{background-image:var(--accent-gradient);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-size:400%;background-position:0%}.instructions[data-astro-cid-j7pv25f6]{margin-bottom:2rem;border:1px solid rgba(var(--accent-light),25%);background:linear-gradient(rgba(var(--accent-dark),66%),rgba(var(--accent-dark),33%));padding:1.5rem;border-radius:8px}.instructions[data-astro-cid-j7pv25f6] code[data-astro-cid-j7pv25f6]{font-size:.8em;font-weight:700;background:rgba(var(--accent-light),12%);color:rgb(var(--accent-light));border-radius:4px;padding:.3em .4em}.instructions[data-astro-cid-j7pv25f6] strong[data-astro-cid-j7pv25f6]{color:rgb(var(--accent-light))}.link-card-grid[data-astro-cid-j7pv25f6]{display:grid;grid-template-columns:repeat(auto-fit,minmax(24ch,1fr));gap:2rem;padding:0} diff --git a/docs/_astro/index.NEDEFKed.js b/docs/_astro/index.DIpCM_17.js similarity index 53% rename from docs/_astro/index.NEDEFKed.js rename to docs/_astro/index.DIpCM_17.js index ff0b665..b661996 100644 --- a/docs/_astro/index.NEDEFKed.js +++ b/docs/_astro/index.DIpCM_17.js @@ -1,4 +1,4 @@ -var b={exports:{}},r={};/** +var Q=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function T(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var R={exports:{}},r={};/** * @license React * react.production.min.js * @@ -6,4 +6,4 @@ var b={exports:{}},r={};/** * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var y=Symbol.for("react.element"),T=Symbol.for("react.portal"),V=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),D=Symbol.for("react.profiler"),U=Symbol.for("react.provider"),q=Symbol.for("react.context"),F=Symbol.for("react.forward_ref"),L=Symbol.for("react.suspense"),M=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),w=Symbol.iterator;function z(e){return e===null||typeof e!="object"?null:(e=w&&e[w]||e["@@iterator"],typeof e=="function"?e:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,j={};function p(e,t,n){this.props=e,this.context=t,this.refs=j,this.updater=n||C}p.prototype.isReactComponent={};p.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")};p.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function O(){}O.prototype=p.prototype;function m(e,t,n){this.props=e,this.context=t,this.refs=j,this.updater=n||C}var S=m.prototype=new O;S.constructor=m;x(S,p.prototype);S.isPureReactComponent=!0;var R=Array.isArray,g=Object.prototype.hasOwnProperty,E={current:null},P={key:!0,ref:!0,__self:!0,__source:!0};function I(e,t,n){var u,o={},i=null,s=null;if(t!=null)for(u in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)g.call(t,u)&&!P.hasOwnProperty(u)&&(o[u]=t[u]);var f=arguments.length-2;if(f===1)o.children=n;else if(1:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-12>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(3rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(3rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-3xl{border-radius:1.5rem}.rounded-\[36px\]{border-radius:36px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-\[3px\]{border-width:3px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-s{border-inline-start-width:1px}.border-none{border-style:none}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.border-current{border-color:currentColor}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-green-500{--tw-border-opacity: 1;border-color:rgb(34 197 94 / var(--tw-border-opacity))}.border-neutral-100{--tw-border-opacity: 1;border-color:rgb(245 245 245 / var(--tw-border-opacity))}.border-neutral-200{--tw-border-opacity: 1;border-color:rgb(229 229 229 / var(--tw-border-opacity))}.border-orange-500{--tw-border-opacity: 1;border-color:rgb(249 115 22 / var(--tw-border-opacity))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.border-yellow-500{--tw-border-opacity: 1;border-color:rgb(234 179 8 / var(--tw-border-opacity))}.border-yellow-700{--tw-border-opacity: 1;border-color:rgb(161 98 7 / var(--tw-border-opacity))}.border-t-transparent{border-top-color:transparent}.bg-\[var\(--sl-color-black\)\]{background-color:var(--sl-color-black)}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.bg-cyan-400\/10{background-color:#22d3ee1a}.bg-cyan-400\/60{background-color:#22d3ee99}.bg-cyan-400\/90{background-color:#22d3eee6}.bg-cyan-500{--tw-bg-opacity: 1;background-color:rgb(6 182 212 / var(--tw-bg-opacity))}.bg-cyan-600{--tw-bg-opacity: 1;background-color:rgb(8 145 178 / var(--tw-bg-opacity))}.bg-cyan-700{--tw-bg-opacity: 1;background-color:rgb(14 116 144 / var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity))}.bg-green-200{--tw-bg-opacity: 1;background-color:rgb(187 247 208 / var(--tw-bg-opacity))}.bg-neutral-100{--tw-bg-opacity: 1;background-color:rgb(245 245 245 / var(--tw-bg-opacity))}.bg-neutral-200{--tw-bg-opacity: 1;background-color:rgb(229 229 229 / var(--tw-bg-opacity))}.bg-neutral-900{--tw-bg-opacity: 1;background-color:rgb(23 23 23 / var(--tw-bg-opacity))}.bg-orange-100{--tw-bg-opacity: 1;background-color:rgb(255 237 213 / var(--tw-bg-opacity))}.bg-orange-500{--tw-bg-opacity: 1;background-color:rgb(249 115 22 / var(--tw-bg-opacity))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-yellow-400{--tw-bg-opacity: 1;background-color:rgb(250 204 21 / var(--tw-bg-opacity))}.bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity))}.bg-yellow-600{--tw-bg-opacity: 1;background-color:rgb(202 138 4 / var(--tw-bg-opacity))}.bg-yellow-700{--tw-bg-opacity: 1;background-color:rgb(161 98 7 / var(--tw-bg-opacity))}.bg-zinc-950{--tw-bg-opacity: 1;background-color:rgb(9 9 11 / var(--tw-bg-opacity))}.bg-opacity-50{--tw-bg-opacity: .5}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-neutral-200{--tw-gradient-from: #e5e5e5 var(--tw-gradient-from-position);--tw-gradient-to: rgb(229 229 229 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-neutral-400{--tw-gradient-from: #a3a3a3 var(--tw-gradient-from-position);--tw-gradient-to: rgb(163 163 163 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-pink-500{--tw-gradient-from: #ec4899 var(--tw-gradient-from-position);--tw-gradient-to: rgb(236 72 153 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-white{--tw-gradient-from: #fff var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-neutral-100{--tw-gradient-to: #f5f5f5 var(--tw-gradient-to-position)}.to-neutral-200{--tw-gradient-to: #e5e5e5 var(--tw-gradient-to-position)}.to-violet-500{--tw-gradient-to: #8b5cf6 var(--tw-gradient-to-position)}.bg-cover{background-size:cover}.stroke-yellow-700\/50{stroke:#a1620780}.object-scale-down{-o-object-fit:scale-down;object-fit:scale-down}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.pl-5{padding-left:1.25rem}.ps-5{padding-inline-start:1.25rem}.ps-px{padding-inline-start:1px}.text-left{text-align:left}.text-center{text-align:center}.font-sans{font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}.text-cyan-600{--tw-text-opacity: 1;color:rgb(8 145 178 / var(--tw-text-opacity))}.text-gray-100{--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity))}.text-gray-200{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity))}.text-neutral-500{--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity))}.text-neutral-600{--tw-text-opacity: 1;color:rgb(82 82 82 / var(--tw-text-opacity))}.text-orange-600{--tw-text-opacity: 1;color:rgb(234 88 12 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-yellow-300{--tw-text-opacity: 1;color:rgb(253 224 71 / var(--tw-text-opacity))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity))}.text-yellow-600{--tw-text-opacity: 1;color:rgb(202 138 4 / var(--tw-text-opacity))}.opacity-0{opacity:0}.opacity-10{opacity:.1}.opacity-100{opacity:1}.opacity-50{opacity:.5}.shadow-inner{--tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / .05);--tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-none{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-black\/10{--tw-shadow-color: rgb(0 0 0 / .1);--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-lg{--tw-drop-shadow: drop-shadow(0 10px 8px rgb(0 0 0 / .04)) drop-shadow(0 4px 3px rgb(0 0 0 / .1));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[opacity\,margin\]{transition-property:opacity,margin;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-100{transition-duration:.1s}.duration-1000{transition-duration:1s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.duration-\[0\.1ms\]{transition-duration:.1ms}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.\[--adaptive\:none\]{--adaptive: none}.\[--strategy\:static\]{--strategy: static}.before\:absolute:before{content:var(--tw-content);position:absolute}.before\:-end-5:before{content:var(--tw-content);inset-inline-end:-1.25rem}.before\:-top-5:before{content:var(--tw-content);top:-1.25rem}.before\:start-0:before{content:var(--tw-content);inset-inline-start:0px}.before\:top-0:before{content:var(--tw-content);top:0}.before\:h-5:before{content:var(--tw-content);height:1.25rem}.before\:h-full:before{content:var(--tw-content);height:100%}.before\:w-5:before{content:var(--tw-content);width:1.25rem}.before\:w-full:before{content:var(--tw-content);width:100%}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:inset-0:after{content:var(--tw-content);inset:0}.after\:inset-2:after{content:var(--tw-content);inset:.5rem}.after\:inset-2\.5:after{content:var(--tw-content);inset:.625rem}.after\:transform-gpu:after{content:var(--tw-content);transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.after\:rounded-full:after{content:var(--tw-content);border-radius:9999px}.after\:rounded-xl:after{content:var(--tw-content);border-radius:.75rem}.after\:bg-cyan-600:after{content:var(--tw-content);--tw-bg-opacity: 1;background-color:rgb(8 145 178 / var(--tw-bg-opacity))}.after\:bg-gradient-to-b:after{content:var(--tw-content);background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.after\:from-neutral-100:after{content:var(--tw-content);--tw-gradient-from: #f5f5f5 var(--tw-gradient-from-position);--tw-gradient-to: rgb(245 245 245 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.after\:to-neutral-50:after{content:var(--tw-content);--tw-gradient-to: #fafafa var(--tw-gradient-to-position)}.after\:opacity-0:after{content:var(--tw-content);opacity:0}.after\:mix-blend-color:after{content:var(--tw-content);mix-blend-mode:color}.hover\:scale-110:hover{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity))}.hover\:bg-cyan-700:hover{--tw-bg-opacity: 1;background-color:rgb(14 116 144 / var(--tw-bg-opacity))}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.hover\:bg-gray-300:hover{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.hover\:bg-yellow-300:hover{--tw-bg-opacity: 1;background-color:rgb(253 224 71 / var(--tw-bg-opacity))}.hover\:bg-gradient-to-r:hover{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.hover\:from-cyan-500:hover{--tw-gradient-from: #06b6d4 var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:to-cyan-400:hover{--tw-gradient-to: #22d3ee var(--tw-gradient-to-position)}.hover\:text-black:hover{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.hover\:text-yellow-500:hover{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity))}.hover\:text-zinc-950:hover{--tw-text-opacity: 1;color:rgb(9 9 11 / var(--tw-text-opacity))}.hover\:shadow-xl:hover{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:ring-2:hover{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.hover\:ring-cyan-400:hover{--tw-ring-opacity: 1;--tw-ring-color: rgb(34 211 238 / var(--tw-ring-opacity))}.hover\:ring-offset-2:hover{--tw-ring-offset-width: 2px}.focus\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.focus\:border-indigo-500:focus{--tw-border-opacity: 1;border-color:rgb(99 102 241 / var(--tw-border-opacity))}.focus\:bg-gray-100:focus{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity))}.focus\:ring-indigo-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity))}.focus\:ring-yellow-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(234 179 8 / var(--tw-ring-opacity))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:opacity-50:disabled{opacity:.5}.group\/bento:hover .group-hover\/bento\:translate-x-2{--tw-translate-x: .5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:-translate-x-96{--tw-translate-x: -24rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:-skew-x-12{--tw-skew-x: -12deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:skew-x-12{--tw-skew-x: 12deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity))}.group:hover .group-hover\:bg-yellow-700{--tw-bg-opacity: 1;background-color:rgb(161 98 7 / var(--tw-bg-opacity))}.peer:checked~.peer-checked\:from-cyan-500{--tw-gradient-from: #06b6d4 var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.peer:checked~.peer-checked\:to-cyan-100{--tw-gradient-to: #cffafe var(--tw-gradient-to-position)}.peer:checked~.peer-checked\:drop-shadow-sm{--tw-drop-shadow: drop-shadow(0 1px 1px rgb(0 0 0 / .05));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.peer:checked~.peer-checked\:after\:inset-1:after{content:var(--tw-content);inset:.25rem}.peer:checked~.peer-checked\:after\:from-neutral-200:after{content:var(--tw-content);--tw-gradient-from: #e5e5e5 var(--tw-gradient-from-position);--tw-gradient-to: rgb(229 229 229 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.peer:checked~.peer-checked\:after\:to-neutral-100:after{content:var(--tw-content);--tw-gradient-to: #f5f5f5 var(--tw-gradient-to-position)}.peer:checked~.peer-checked\:after\:opacity-100:after{content:var(--tw-content);opacity:1}.hs-dropdown.open>.hs-dropdown-open\:opacity-100{opacity:1}.hs-dropdown.open .hs-dropdown-toggle .hs-dropdown-open\:opacity-100{opacity:1}.hs-dropdown.open>.hs-dropdown-menu>.hs-dropdown-open\:opacity-100{opacity:1}.hs-collapse.open .hs-collapse-open\:block{display:block}.hs-collapse.open .hs-collapse-open\:hidden{display:none}.hs-collapse.open.hs-collapse-open\:block{display:block}.hs-collapse.open.hs-collapse-open\:hidden{display:none}.hs-collapse-toggle.open .hs-collapse-open\:block{display:block}.hs-collapse-toggle.open .hs-collapse-open\:hidden{display:none}.hs-collapse-toggle.open.hs-collapse-open\:block{display:block}.hs-collapse-toggle.open.hs-collapse-open\:hidden{display:none}.selected .hs-combo-box-selected\:block,.selected.hs-combo-box-selected\:block{display:block}@media (min-width: 640px){.sm\:-rotate-90{--tw-rotate: -90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 768px){.md\:col-span-1{grid-column:span 1 / span 1}.md\:col-span-2{grid-column:span 2 / span 2}.md\:my-6{margin-top:1.5rem;margin-bottom:1.5rem}.md\:block{display:block}.md\:flex{display:flex}.md\:hidden{display:none}.md\:w-48{width:12rem}.md\:w-96{width:24rem}.md\:scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.md\:scale-110{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.md\:auto-rows-\[18rem\]{grid-auto-rows:18rem}.md\:auto-rows-\[20rem\]{grid-auto-rows:20rem}.md\:flex-row{flex-direction:row}.md\:flex-nowrap{flex-wrap:nowrap}.md\:items-center{align-items:center}.md\:justify-start{justify-content:flex-start}.md\:justify-end{justify-content:flex-end}.md\:justify-between{justify-content:space-between}.md\:border{border-width:1px}.md\:border-s{border-inline-start-width:1px}.md\:border-yellow-500{--tw-border-opacity: 1;border-color:rgb(234 179 8 / var(--tw-border-opacity))}.md\:p-4{padding:1rem}.md\:p-6{padding:1.5rem}.md\:px-3{padding-left:.75rem;padding-right:.75rem}.md\:px-6{padding-left:1.5rem;padding-right:1.5rem}.md\:py-0{padding-top:0;padding-bottom:0}.md\:ps-6{padding-inline-start:1.5rem}.md\:ps-7{padding-inline-start:1.75rem}.md\:text-xl{font-size:1.25rem;line-height:1.75rem}.md\:shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.md\:duration-\[150ms\]{transition-duration:.15s}.md\:\[--strategy\:absolute\]{--strategy: absolute}.md\:\[--strategy\:fixed\]{--strategy: fixed}.md\:\[--trigger\:hover\]{--trigger: hover}}@media (min-width: 1024px){.lg\:w-96{width:24rem}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:p-8{padding:2rem}.lg\:px-8{padding-left:2rem;padding-right:2rem}.lg\:pt-16{padding-top:4rem}.lg\:text-3xl{font-size:1.875rem;line-height:2.25rem}}@media (min-width: 1280px){.xl\:mx-auto{margin-left:auto;margin-right:auto}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.xl\:px-0{padding-left:0;padding-right:0}}@media (prefers-color-scheme: dark){.dark\:border-neutral-700{--tw-border-opacity: 1;border-color:rgb(64 64 64 / var(--tw-border-opacity))}.dark\:border-white\/\[0\.1\]{border-color:#ffffff1a}.dark\:border-white\/\[0\.2\]{border-color:#fff3}.dark\:bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.dark\:bg-green-900\/20{background-color:#14532d33}.dark\:bg-neutral-900{--tw-bg-opacity: 1;background-color:rgb(23 23 23 / var(--tw-bg-opacity))}.dark\:bg-orange-900\/20{background-color:#7c2d1233}.dark\:bg-red-900\/20{background-color:#7f1d1d33}.dark\:bg-opacity-80{--tw-bg-opacity: .8}.dark\:from-neutral-900{--tw-gradient-from: #171717 var(--tw-gradient-from-position);--tw-gradient-to: rgb(23 23 23 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:to-neutral-800{--tw-gradient-to: #262626 var(--tw-gradient-to-position)}.dark\:text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.dark\:text-neutral-200{--tw-text-opacity: 1;color:rgb(229 229 229 / var(--tw-text-opacity))}.dark\:text-neutral-300{--tw-text-opacity: 1;color:rgb(212 212 212 / var(--tw-text-opacity))}.dark\:text-neutral-400{--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity))}.dark\:shadow-none{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.dark\:hover\:bg-neutral-800:hover{--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}.dark\:focus\:bg-neutral-800:focus{--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}}:root{--accent: 136, 58, 234;--accent-light: 224, 204, 250;--accent-dark: 49, 10, 101;--accent-gradient: linear-gradient( 45deg, rgb(var(--accent)), rgb(var(--accent-light)) 30%, white 60% )}code{font-family:Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace}.hexgrid-background{background-image:url('data:image/svg+xml,');background-repeat:repeat;background-position:0 0;animation:scrollLeft 2s linear infinite}@keyframes scrollLeft{0%{background-position:0 0}to{background-position:-100px 0}}main[data-astro-cid-j7pv25f6]{margin:auto;padding:1rem;width:800px;max-width:calc(100% - 2rem);color:#fff;font-size:20px;line-height:1.6}.astro-a[data-astro-cid-j7pv25f6]{position:absolute;top:-32px;left:50%;transform:translate(-50%);width:220px;height:auto;z-index:-1}h1[data-astro-cid-j7pv25f6]{font-size:4rem;font-weight:700;line-height:1;text-align:center;margin-bottom:1em}.text-gradient[data-astro-cid-j7pv25f6]{background-image:var(--accent-gradient);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-size:400%;background-position:0%}.instructions[data-astro-cid-j7pv25f6]{margin-bottom:2rem;border:1px solid rgba(var(--accent-light),25%);background:linear-gradient(rgba(var(--accent-dark),66%),rgba(var(--accent-dark),33%));padding:1.5rem;border-radius:8px}.instructions[data-astro-cid-j7pv25f6] code[data-astro-cid-j7pv25f6]{font-size:.8em;font-weight:700;background:rgba(var(--accent-light),12%);color:rgb(var(--accent-light));border-radius:4px;padding:.3em .4em}.instructions[data-astro-cid-j7pv25f6] strong[data-astro-cid-j7pv25f6]{color:rgb(var(--accent-light))}.link-card-grid[data-astro-cid-j7pv25f6]{display:grid;grid-template-columns:repeat(auto-fit,minmax(24ch,1fr));gap:2rem;padding:0} diff --git a/docs/_astro/jsx-runtime.BFYNFNPI.js b/docs/_astro/jsx-runtime.BFYNFNPI.js new file mode 100644 index 0000000..eb54757 --- /dev/null +++ b/docs/_astro/jsx-runtime.BFYNFNPI.js @@ -0,0 +1,9 @@ +import{a as l}from"./index.DIpCM_17.js";var f={exports:{}},n={};/** + * @license React + * react-jsx-runtime.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 u=l,m=Symbol.for("react.element"),a=Symbol.for("react.fragment"),x=Object.prototype.hasOwnProperty,y=u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,v={key:!0,ref:!0,__self:!0,__source:!0};function i(t,r,p){var e,o={},s=null,_=null;p!==void 0&&(s=""+p),r.key!==void 0&&(s=""+r.key),r.ref!==void 0&&(_=r.ref);for(e in r)x.call(r,e)&&!v.hasOwnProperty(e)&&(o[e]=r[e]);if(t&&t.defaultProps)for(e in r=t.defaultProps,r)o[e]===void 0&&(o[e]=r[e]);return{$$typeof:m,type:t,key:s,ref:_,props:o,_owner:y.current}}n.Fragment=a;n.jsx=i;n.jsxs=i;f.exports=n;var d=f.exports;export{d as j}; diff --git a/docs/_astro/page.CXwZW0WQ.js b/docs/_astro/page.CXwZW0WQ.js deleted file mode 100644 index 8297d09..0000000 --- a/docs/_astro/page.CXwZW0WQ.js +++ /dev/null @@ -1,18 +0,0 @@ -import{c as v,g as E}from"./_commonjsHelpers.Cpj98o6Y.js";var g={exports:{}};(function(f){(function(){var y=this;(function(){(function(){this.Turbolinks={supported:function(){return window.history.pushState!=null&&window.requestAnimationFrame!=null&&window.addEventListener!=null}(),visit:function(a,e){return u.controller.visit(a,e)},clearCache:function(){return u.controller.clearCache()},setProgressBarDelay:function(a){return u.controller.setProgressBarDelay(a)}}}).call(this)}).call(y);var u=y.Turbolinks;(function(){(function(){var a,e,t,r=[].slice;u.copyObject=function(o){var n,i,s;i={};for(n in o)s=o[n],i[n]=s;return i},u.closest=function(o,n){return a.call(o,n)},a=function(){var o,n;return o=document.documentElement,(n=o.closest)!=null?n:function(i){var s;for(s=this;s;){if(s.nodeType===Node.ELEMENT_NODE&&e.call(s,i))return s;s=s.parentNode}}}(),u.defer=function(o){return setTimeout(o,1)},u.throttle=function(o){var n;return n=null,function(){var i;return i=1<=arguments.length?r.call(arguments,0):[],n??(n=requestAnimationFrame(function(s){return function(){return n=null,o.apply(s,i)}}(this)))}},u.dispatch=function(o,n){var i,s,l,c,h,p;return h=n??{},p=h.target,i=h.cancelable,s=h.data,l=document.createEvent("Events"),l.initEvent(o,!0,i===!0),l.data=s??{},l.cancelable&&!t&&(c=l.preventDefault,l.preventDefault=function(){return this.defaultPrevented||Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}}),c.call(this)}),(p??document).dispatchEvent(l),l},t=function(){var o;return o=document.createEvent("Events"),o.initEvent("test",!0,!0),o.preventDefault(),o.defaultPrevented}(),u.match=function(o,n){return e.call(o,n)},e=function(){var o,n,i,s;return o=document.documentElement,(n=(i=(s=o.matchesSelector)!=null?s:o.webkitMatchesSelector)!=null?i:o.msMatchesSelector)!=null?n:o.mozMatchesSelector}(),u.uuid=function(){var o,n,i;for(i="",o=n=1;36>=n;o=++n)i+=o===9||o===14||o===19||o===24?"-":o===15?"4":o===20?(Math.floor(4*Math.random())+8).toString(16):Math.floor(15*Math.random()).toString(16);return i}}).call(this),function(){u.Location=function(){function a(n){var i,s;n==null&&(n=""),s=document.createElement("a"),s.href=n.toString(),this.absoluteURL=s.href,i=s.hash.length,2>i?this.requestURL=this.absoluteURL:(this.requestURL=this.absoluteURL.slice(0,-i),this.anchor=s.hash.slice(1))}var e,t,r,o;return a.wrap=function(n){return n instanceof this?n:new this(n)},a.prototype.getOrigin=function(){return this.absoluteURL.split("/",3).join("/")},a.prototype.getPath=function(){var n,i;return(n=(i=this.requestURL.match(/\/\/[^\/]*(\/[^?;]*)/))!=null?i[1]:void 0)!=null?n:"/"},a.prototype.getPathComponents=function(){return this.getPath().split("/").slice(1)},a.prototype.getLastPathComponent=function(){return this.getPathComponents().slice(-1)[0]},a.prototype.getExtension=function(){var n,i;return(n=(i=this.getLastPathComponent().match(/\.[^.]*$/))!=null?i[0]:void 0)!=null?n:""},a.prototype.isHTML=function(){return this.getExtension().match(/^(?:|\.(?:htm|html|xhtml))$/)},a.prototype.isPrefixedBy=function(n){var i;return i=t(n),this.isEqualTo(n)||o(this.absoluteURL,i)},a.prototype.isEqualTo=function(n){return this.absoluteURL===n?.absoluteURL},a.prototype.toCacheKey=function(){return this.requestURL},a.prototype.toJSON=function(){return this.absoluteURL},a.prototype.toString=function(){return this.absoluteURL},a.prototype.valueOf=function(){return this.absoluteURL},t=function(n){return e(n.getOrigin()+n.getPath())},e=function(n){return r(n,"/")?n:n+"/"},o=function(n,i){return n.slice(0,i.length)===i},r=function(n,i){return n.slice(-i.length)===i},a}()}.call(this),function(){var a=function(e,t){return function(){return e.apply(t,arguments)}};u.HttpRequest=function(){function e(t,r,o){this.delegate=t,this.requestCanceled=a(this.requestCanceled,this),this.requestTimedOut=a(this.requestTimedOut,this),this.requestFailed=a(this.requestFailed,this),this.requestLoaded=a(this.requestLoaded,this),this.requestProgressed=a(this.requestProgressed,this),this.url=u.Location.wrap(r).requestURL,this.referrer=u.Location.wrap(o).absoluteURL,this.createXHR()}return e.NETWORK_FAILURE=0,e.TIMEOUT_FAILURE=-1,e.timeout=60,e.prototype.send=function(){var t;return this.xhr&&!this.sent?(this.notifyApplicationBeforeRequestStart(),this.setProgress(0),this.xhr.send(),this.sent=!0,typeof(t=this.delegate).requestStarted=="function"?t.requestStarted():void 0):void 0},e.prototype.cancel=function(){return this.xhr&&this.sent?this.xhr.abort():void 0},e.prototype.requestProgressed=function(t){return t.lengthComputable?this.setProgress(t.loaded/t.total):void 0},e.prototype.requestLoaded=function(){return this.endRequest(function(t){return function(){var r;return 200<=(r=t.xhr.status)&&300>r?t.delegate.requestCompletedWithResponse(t.xhr.responseText,t.xhr.getResponseHeader("Turbolinks-Location")):(t.failed=!0,t.delegate.requestFailedWithStatusCode(t.xhr.status,t.xhr.responseText))}}(this))},e.prototype.requestFailed=function(){return this.endRequest(function(t){return function(){return t.failed=!0,t.delegate.requestFailedWithStatusCode(t.constructor.NETWORK_FAILURE)}}(this))},e.prototype.requestTimedOut=function(){return this.endRequest(function(t){return function(){return t.failed=!0,t.delegate.requestFailedWithStatusCode(t.constructor.TIMEOUT_FAILURE)}}(this))},e.prototype.requestCanceled=function(){return this.endRequest()},e.prototype.notifyApplicationBeforeRequestStart=function(){return u.dispatch("turbolinks:request-start",{data:{url:this.url,xhr:this.xhr}})},e.prototype.notifyApplicationAfterRequestEnd=function(){return u.dispatch("turbolinks:request-end",{data:{url:this.url,xhr:this.xhr}})},e.prototype.createXHR=function(){return this.xhr=new XMLHttpRequest,this.xhr.open("GET",this.url,!0),this.xhr.timeout=1e3*this.constructor.timeout,this.xhr.setRequestHeader("Accept","text/html, application/xhtml+xml"),this.xhr.setRequestHeader("Turbolinks-Referrer",this.referrer),this.xhr.onprogress=this.requestProgressed,this.xhr.onload=this.requestLoaded,this.xhr.onerror=this.requestFailed,this.xhr.ontimeout=this.requestTimedOut,this.xhr.onabort=this.requestCanceled},e.prototype.endRequest=function(t){return this.xhr?(this.notifyApplicationAfterRequestEnd(),t?.call(this),this.destroy()):void 0},e.prototype.setProgress=function(t){var r;return this.progress=t,typeof(r=this.delegate).requestProgressed=="function"?r.requestProgressed(this.progress):void 0},e.prototype.destroy=function(){var t;return this.setProgress(1),typeof(t=this.delegate).requestFinished=="function"&&t.requestFinished(),this.delegate=null,this.xhr=null},e}()}.call(this),function(){var a=function(e,t){return function(){return e.apply(t,arguments)}};u.ProgressBar=function(){function e(){this.trickle=a(this.trickle,this),this.stylesheetElement=this.createStylesheetElement(),this.progressElement=this.createProgressElement()}var t;return t=300,e.defaultCSS=`.turbolinks-progress-bar { - position: fixed; - display: block; - top: 0; - left: 0; - height: 3px; - background: #0076ff; - z-index: 9999; - transition: width `+t+"ms ease-out, opacity "+t/2+"ms "+t/2+`ms ease-in; - transform: translate3d(0, 0, 0); -}`,e.prototype.show=function(){return this.visible?void 0:(this.visible=!0,this.installStylesheetElement(),this.installProgressElement(),this.startTrickling())},e.prototype.hide=function(){return this.visible&&!this.hiding?(this.hiding=!0,this.fadeProgressElement(function(r){return function(){return r.uninstallProgressElement(),r.stopTrickling(),r.visible=!1,r.hiding=!1}}(this))):void 0},e.prototype.setValue=function(r){return this.value=r,this.refresh()},e.prototype.installStylesheetElement=function(){return document.head.insertBefore(this.stylesheetElement,document.head.firstChild)},e.prototype.installProgressElement=function(){return this.progressElement.style.width=0,this.progressElement.style.opacity=1,document.documentElement.insertBefore(this.progressElement,document.body),this.refresh()},e.prototype.fadeProgressElement=function(r){return this.progressElement.style.opacity=0,setTimeout(r,1.5*t)},e.prototype.uninstallProgressElement=function(){return this.progressElement.parentNode?document.documentElement.removeChild(this.progressElement):void 0},e.prototype.startTrickling=function(){return this.trickleInterval!=null?this.trickleInterval:this.trickleInterval=setInterval(this.trickle,t)},e.prototype.stopTrickling=function(){return clearInterval(this.trickleInterval),this.trickleInterval=null},e.prototype.trickle=function(){return this.setValue(this.value+Math.random()/100)},e.prototype.refresh=function(){return requestAnimationFrame(function(r){return function(){return r.progressElement.style.width=10+90*r.value+"%"}}(this))},e.prototype.createStylesheetElement=function(){var r;return r=document.createElement("style"),r.type="text/css",r.textContent=this.constructor.defaultCSS,r},e.prototype.createProgressElement=function(){var r;return r=document.createElement("div"),r.className="turbolinks-progress-bar",r},e}()}.call(this),function(){var a=function(e,t){return function(){return e.apply(t,arguments)}};u.BrowserAdapter=function(){function e(n){this.controller=n,this.showProgressBar=a(this.showProgressBar,this),this.progressBar=new u.ProgressBar}var t,r,o;return o=u.HttpRequest,t=o.NETWORK_FAILURE,r=o.TIMEOUT_FAILURE,e.prototype.visitProposedToLocationWithAction=function(n,i){return this.controller.startVisitToLocationWithAction(n,i)},e.prototype.visitStarted=function(n){return n.issueRequest(),n.changeHistory(),n.loadCachedSnapshot()},e.prototype.visitRequestStarted=function(n){return this.progressBar.setValue(0),n.hasCachedSnapshot()||n.action!=="restore"?this.showProgressBarAfterDelay():this.showProgressBar()},e.prototype.visitRequestProgressed=function(n){return this.progressBar.setValue(n.progress)},e.prototype.visitRequestCompleted=function(n){return n.loadResponse()},e.prototype.visitRequestFailedWithStatusCode=function(n,i){switch(i){case t:case r:return this.reload();default:return n.loadResponse()}},e.prototype.visitRequestFinished=function(n){return this.hideProgressBar()},e.prototype.visitCompleted=function(n){return n.followRedirect()},e.prototype.pageInvalidated=function(){return this.reload()},e.prototype.showProgressBarAfterDelay=function(){return this.progressBarTimeout=setTimeout(this.showProgressBar,this.controller.progressBarDelay)},e.prototype.showProgressBar=function(){return this.progressBar.show()},e.prototype.hideProgressBar=function(){return this.progressBar.hide(),clearTimeout(this.progressBarTimeout)},e.prototype.reload=function(){return window.location.reload()},e}()}.call(this),function(){var a=function(e,t){return function(){return e.apply(t,arguments)}};u.History=function(){function e(t){this.delegate=t,this.onPageLoad=a(this.onPageLoad,this),this.onPopState=a(this.onPopState,this)}return e.prototype.start=function(){return this.started?void 0:(addEventListener("popstate",this.onPopState,!1),addEventListener("load",this.onPageLoad,!1),this.started=!0)},e.prototype.stop=function(){return this.started?(removeEventListener("popstate",this.onPopState,!1),removeEventListener("load",this.onPageLoad,!1),this.started=!1):void 0},e.prototype.push=function(t,r){return t=u.Location.wrap(t),this.update("push",t,r)},e.prototype.replace=function(t,r){return t=u.Location.wrap(t),this.update("replace",t,r)},e.prototype.onPopState=function(t){var r,o,n,i;return this.shouldHandlePopState()&&(i=(o=t.state)!=null?o.turbolinks:void 0)?(r=u.Location.wrap(window.location),n=i.restorationIdentifier,this.delegate.historyPoppedToLocationWithRestorationIdentifier(r,n)):void 0},e.prototype.onPageLoad=function(t){return u.defer(function(r){return function(){return r.pageLoaded=!0}}(this))},e.prototype.shouldHandlePopState=function(){return this.pageIsLoaded()},e.prototype.pageIsLoaded=function(){return this.pageLoaded||document.readyState==="complete"},e.prototype.update=function(t,r,o){var n;return n={turbolinks:{restorationIdentifier:o}},history[t+"State"](n,null,r)},e}()}.call(this),function(){u.HeadDetails=function(){function a(i){var s,l,c,h,p,d;for(this.elements={},c=0,p=i.length;p>c;c++)d=i[c],d.nodeType===Node.ELEMENT_NODE&&(h=d.outerHTML,l=(s=this.elements)[h]!=null?s[h]:s[h]={type:n(d),tracked:o(d),elements:[]},l.elements.push(d))}var e,t,r,o,n;return a.fromHeadElement=function(i){var s;return new this((s=i?.childNodes)!=null?s:[])},a.prototype.hasElementWithKey=function(i){return i in this.elements},a.prototype.getTrackedElementSignature=function(){var i,s;return function(){var l,c;l=this.elements,c=[];for(i in l)s=l[i].tracked,s&&c.push(i);return c}.call(this).join("")},a.prototype.getScriptElementsNotInDetails=function(i){return this.getElementsMatchingTypeNotInDetails("script",i)},a.prototype.getStylesheetElementsNotInDetails=function(i){return this.getElementsMatchingTypeNotInDetails("stylesheet",i)},a.prototype.getElementsMatchingTypeNotInDetails=function(i,s){var l,c,h,p,d,m;h=this.elements,d=[];for(c in h)p=h[c],m=p.type,l=p.elements,m!==i||s.hasElementWithKey(c)||d.push(l[0]);return d},a.prototype.getProvisionalElements=function(){var i,s,l,c,h,p,d;l=[],c=this.elements;for(s in c)h=c[s],d=h.type,p=h.tracked,i=h.elements,d!=null||p?i.length>1&&l.push.apply(l,i.slice(1)):l.push.apply(l,i);return l},a.prototype.getMetaValue=function(i){var s;return(s=this.findMetaElementByName(i))!=null?s.getAttribute("content"):void 0},a.prototype.findMetaElementByName=function(i){var s,l,c,h;s=void 0,h=this.elements;for(c in h)l=h[c].elements,e(l[0],i)&&(s=l[0]);return s},n=function(i){return t(i)?"script":r(i)?"stylesheet":void 0},o=function(i){return i.getAttribute("data-turbolinks-track")==="reload"},t=function(i){var s;return s=i.tagName.toLowerCase(),s==="script"},r=function(i){var s;return s=i.tagName.toLowerCase(),s==="style"||s==="link"&&i.getAttribute("rel")==="stylesheet"},e=function(i,s){var l;return l=i.tagName.toLowerCase(),l==="meta"&&i.getAttribute("name")===s},a}()}.call(this),function(){u.Snapshot=function(){function a(e,t){this.headDetails=e,this.bodyElement=t}return a.wrap=function(e){return e instanceof this?e:typeof e=="string"?this.fromHTMLString(e):this.fromHTMLElement(e)},a.fromHTMLString=function(e){var t;return t=document.createElement("html"),t.innerHTML=e,this.fromHTMLElement(t)},a.fromHTMLElement=function(e){var t,r,o,n;return o=e.querySelector("head"),t=(n=e.querySelector("body"))!=null?n:document.createElement("body"),r=u.HeadDetails.fromHeadElement(o),new this(r,t)},a.prototype.clone=function(){return new this.constructor(this.headDetails,this.bodyElement.cloneNode(!0))},a.prototype.getRootLocation=function(){var e,t;return t=(e=this.getSetting("root"))!=null?e:"/",new u.Location(t)},a.prototype.getCacheControlValue=function(){return this.getSetting("cache-control")},a.prototype.getElementForAnchor=function(e){try{return this.bodyElement.querySelector("[id='"+e+"'], a[name='"+e+"']")}catch{}},a.prototype.getPermanentElements=function(){return this.bodyElement.querySelectorAll("[id][data-turbolinks-permanent]")},a.prototype.getPermanentElementById=function(e){return this.bodyElement.querySelector("#"+e+"[data-turbolinks-permanent]")},a.prototype.getPermanentElementsPresentInSnapshot=function(e){var t,r,o,n,i;for(n=this.getPermanentElements(),i=[],r=0,o=n.length;o>r;r++)t=n[r],e.getPermanentElementById(t.id)&&i.push(t);return i},a.prototype.findFirstAutofocusableElement=function(){return this.bodyElement.querySelector("[autofocus]")},a.prototype.hasAnchor=function(e){return this.getElementForAnchor(e)!=null},a.prototype.isPreviewable=function(){return this.getCacheControlValue()!=="no-preview"},a.prototype.isCacheable=function(){return this.getCacheControlValue()!=="no-cache"},a.prototype.isVisitable=function(){return this.getSetting("visit-control")!=="reload"},a.prototype.getSetting=function(e){return this.headDetails.getMetaValue("turbolinks-"+e)},a}()}.call(this),function(){var a=[].slice;u.Renderer=function(){function e(){}var t;return e.render=function(){var r,o,n,i;return n=arguments[0],o=arguments[1],r=3<=arguments.length?a.call(arguments,2):[],i=function(s,l,c){c.prototype=s.prototype;var h=new c,p=s.apply(h,l);return Object(p)===p?p:h}(this,r,function(){}),i.delegate=n,i.render(o),i},e.prototype.renderView=function(r){return this.delegate.viewWillRender(this.newBody),r(),this.delegate.viewRendered(this.newBody)},e.prototype.invalidateView=function(){return this.delegate.viewInvalidated()},e.prototype.createScriptElement=function(r){var o;return r.getAttribute("data-turbolinks-eval")==="false"?r:(o=document.createElement("script"),o.textContent=r.textContent,o.async=!1,t(o,r),o)},t=function(r,o){var n,i,s,l,c,h,p;for(l=o.attributes,h=[],n=0,i=l.length;i>n;n++)c=l[n],s=c.name,p=c.value,h.push(r.setAttribute(s,p));return h},e}()}.call(this),function(){var a,e,t=function(o,n){function i(){this.constructor=o}for(var s in n)r.call(n,s)&&(o[s]=n[s]);return i.prototype=n.prototype,o.prototype=new i,o.__super__=n.prototype,o},r={}.hasOwnProperty;u.SnapshotRenderer=function(o){function n(i,s,l){this.currentSnapshot=i,this.newSnapshot=s,this.isPreview=l,this.currentHeadDetails=this.currentSnapshot.headDetails,this.newHeadDetails=this.newSnapshot.headDetails,this.currentBody=this.currentSnapshot.bodyElement,this.newBody=this.newSnapshot.bodyElement}return t(n,o),n.prototype.render=function(i){return this.shouldRender()?(this.mergeHead(),this.renderView(function(s){return function(){return s.replaceBody(),s.isPreview||s.focusFirstAutofocusableElement(),i()}}(this))):this.invalidateView()},n.prototype.mergeHead=function(){return this.copyNewHeadStylesheetElements(),this.copyNewHeadScriptElements(),this.removeCurrentHeadProvisionalElements(),this.copyNewHeadProvisionalElements()},n.prototype.replaceBody=function(){var i;return i=this.relocateCurrentBodyPermanentElements(),this.activateNewBodyScriptElements(),this.assignNewBody(),this.replacePlaceholderElementsWithClonedPermanentElements(i)},n.prototype.shouldRender=function(){return this.newSnapshot.isVisitable()&&this.trackedElementsAreIdentical()},n.prototype.trackedElementsAreIdentical=function(){return this.currentHeadDetails.getTrackedElementSignature()===this.newHeadDetails.getTrackedElementSignature()},n.prototype.copyNewHeadStylesheetElements=function(){var i,s,l,c,h;for(c=this.getNewHeadStylesheetElements(),h=[],s=0,l=c.length;l>s;s++)i=c[s],h.push(document.head.appendChild(i));return h},n.prototype.copyNewHeadScriptElements=function(){var i,s,l,c,h;for(c=this.getNewHeadScriptElements(),h=[],s=0,l=c.length;l>s;s++)i=c[s],h.push(document.head.appendChild(this.createScriptElement(i)));return h},n.prototype.removeCurrentHeadProvisionalElements=function(){var i,s,l,c,h;for(c=this.getCurrentHeadProvisionalElements(),h=[],s=0,l=c.length;l>s;s++)i=c[s],h.push(document.head.removeChild(i));return h},n.prototype.copyNewHeadProvisionalElements=function(){var i,s,l,c,h;for(c=this.getNewHeadProvisionalElements(),h=[],s=0,l=c.length;l>s;s++)i=c[s],h.push(document.head.appendChild(i));return h},n.prototype.relocateCurrentBodyPermanentElements=function(){var i,s,l,c,h,p,d;for(p=this.getCurrentBodyPermanentElements(),d=[],i=0,s=p.length;s>i;i++)c=p[i],h=a(c),l=this.newSnapshot.getPermanentElementById(c.id),e(c,h.element),e(l,c),d.push(h);return d},n.prototype.replacePlaceholderElementsWithClonedPermanentElements=function(i){var s,l,c,h,p,d,m;for(m=[],c=0,h=i.length;h>c;c++)d=i[c],l=d.element,p=d.permanentElement,s=p.cloneNode(!0),m.push(e(l,s));return m},n.prototype.activateNewBodyScriptElements=function(){var i,s,l,c,h,p;for(h=this.getNewBodyScriptElements(),p=[],s=0,c=h.length;c>s;s++)l=h[s],i=this.createScriptElement(l),p.push(e(l,i));return p},n.prototype.assignNewBody=function(){return document.body=this.newBody},n.prototype.focusFirstAutofocusableElement=function(){var i;return(i=this.newSnapshot.findFirstAutofocusableElement())!=null?i.focus():void 0},n.prototype.getNewHeadStylesheetElements=function(){return this.newHeadDetails.getStylesheetElementsNotInDetails(this.currentHeadDetails)},n.prototype.getNewHeadScriptElements=function(){return this.newHeadDetails.getScriptElementsNotInDetails(this.currentHeadDetails)},n.prototype.getCurrentHeadProvisionalElements=function(){return this.currentHeadDetails.getProvisionalElements()},n.prototype.getNewHeadProvisionalElements=function(){return this.newHeadDetails.getProvisionalElements()},n.prototype.getCurrentBodyPermanentElements=function(){return this.currentSnapshot.getPermanentElementsPresentInSnapshot(this.newSnapshot)},n.prototype.getNewBodyScriptElements=function(){return this.newBody.querySelectorAll("script")},n}(u.Renderer),a=function(o){var n;return n=document.createElement("meta"),n.setAttribute("name","turbolinks-permanent-placeholder"),n.setAttribute("content",o.id),{element:n,permanentElement:o}},e=function(o,n){var i;return(i=o.parentNode)?i.replaceChild(n,o):void 0}}.call(this),function(){var a=function(t,r){function o(){this.constructor=t}for(var n in r)e.call(r,n)&&(t[n]=r[n]);return o.prototype=r.prototype,t.prototype=new o,t.__super__=r.prototype,t},e={}.hasOwnProperty;u.ErrorRenderer=function(t){function r(o){var n;n=document.createElement("html"),n.innerHTML=o,this.newHead=n.querySelector("head"),this.newBody=n.querySelector("body")}return a(r,t),r.prototype.render=function(o){return this.renderView(function(n){return function(){return n.replaceHeadAndBody(),n.activateBodyScriptElements(),o()}}(this))},r.prototype.replaceHeadAndBody=function(){var o,n;return n=document.head,o=document.body,n.parentNode.replaceChild(this.newHead,n),o.parentNode.replaceChild(this.newBody,o)},r.prototype.activateBodyScriptElements=function(){var o,n,i,s,l,c;for(s=this.getScriptElements(),c=[],n=0,i=s.length;i>n;n++)l=s[n],o=this.createScriptElement(l),c.push(l.parentNode.replaceChild(o,l));return c},r.prototype.getScriptElements=function(){return document.documentElement.querySelectorAll("script")},r}(u.Renderer)}.call(this),function(){u.View=function(){function a(e){this.delegate=e,this.htmlElement=document.documentElement}return a.prototype.getRootLocation=function(){return this.getSnapshot().getRootLocation()},a.prototype.getElementForAnchor=function(e){return this.getSnapshot().getElementForAnchor(e)},a.prototype.getSnapshot=function(){return u.Snapshot.fromHTMLElement(this.htmlElement)},a.prototype.render=function(e,t){var r,o,n;return n=e.snapshot,r=e.error,o=e.isPreview,this.markAsPreview(o),n!=null?this.renderSnapshot(n,o,t):this.renderError(r,t)},a.prototype.markAsPreview=function(e){return e?this.htmlElement.setAttribute("data-turbolinks-preview",""):this.htmlElement.removeAttribute("data-turbolinks-preview")},a.prototype.renderSnapshot=function(e,t,r){return u.SnapshotRenderer.render(this.delegate,r,this.getSnapshot(),u.Snapshot.wrap(e),t)},a.prototype.renderError=function(e,t){return u.ErrorRenderer.render(this.delegate,t,e)},a}()}.call(this),function(){var a=function(e,t){return function(){return e.apply(t,arguments)}};u.ScrollManager=function(){function e(t){this.delegate=t,this.onScroll=a(this.onScroll,this),this.onScroll=u.throttle(this.onScroll)}return e.prototype.start=function(){return this.started?void 0:(addEventListener("scroll",this.onScroll,!1),this.onScroll(),this.started=!0)},e.prototype.stop=function(){return this.started?(removeEventListener("scroll",this.onScroll,!1),this.started=!1):void 0},e.prototype.scrollToElement=function(t){return t.scrollIntoView()},e.prototype.scrollToPosition=function(t){var r,o;return r=t.x,o=t.y,window.scrollTo(r,o)},e.prototype.onScroll=function(t){return this.updatePosition({x:window.pageXOffset,y:window.pageYOffset})},e.prototype.updatePosition=function(t){var r;return this.position=t,(r=this.delegate)!=null?r.scrollPositionChanged(this.position):void 0},e}()}.call(this),function(){u.SnapshotCache=function(){function a(t){this.size=t,this.keys=[],this.snapshots={}}var e;return a.prototype.has=function(t){var r;return r=e(t),r in this.snapshots},a.prototype.get=function(t){var r;if(this.has(t))return r=this.read(t),this.touch(t),r},a.prototype.put=function(t,r){return this.write(t,r),this.touch(t),r},a.prototype.read=function(t){var r;return r=e(t),this.snapshots[r]},a.prototype.write=function(t,r){var o;return o=e(t),this.snapshots[o]=r},a.prototype.touch=function(t){var r,o;return o=e(t),r=this.keys.indexOf(o),r>-1&&this.keys.splice(r,1),this.keys.unshift(o),this.trim()},a.prototype.trim=function(){var t,r,o,n,i;for(n=this.keys.splice(this.size),i=[],t=0,o=n.length;o>t;t++)r=n[t],i.push(delete this.snapshots[r]);return i},e=function(t){return u.Location.wrap(t).toCacheKey()},a}()}.call(this),function(){var a=function(e,t){return function(){return e.apply(t,arguments)}};u.Visit=function(){function e(r,o,n){this.controller=r,this.action=n,this.performScroll=a(this.performScroll,this),this.identifier=u.uuid(),this.location=u.Location.wrap(o),this.adapter=this.controller.adapter,this.state="initialized",this.timingMetrics={}}var t;return e.prototype.start=function(){return this.state==="initialized"?(this.recordTimingMetric("visitStart"),this.state="started",this.adapter.visitStarted(this)):void 0},e.prototype.cancel=function(){var r;return this.state==="started"?((r=this.request)!=null&&r.cancel(),this.cancelRender(),this.state="canceled"):void 0},e.prototype.complete=function(){var r;return this.state==="started"?(this.recordTimingMetric("visitEnd"),this.state="completed",typeof(r=this.adapter).visitCompleted=="function"&&r.visitCompleted(this),this.controller.visitCompleted(this)):void 0},e.prototype.fail=function(){var r;return this.state==="started"?(this.state="failed",typeof(r=this.adapter).visitFailed=="function"?r.visitFailed(this):void 0):void 0},e.prototype.changeHistory=function(){var r,o;return this.historyChanged?void 0:(r=this.location.isEqualTo(this.referrer)?"replace":this.action,o=t(r),this.controller[o](this.location,this.restorationIdentifier),this.historyChanged=!0)},e.prototype.issueRequest=function(){return this.shouldIssueRequest()&&this.request==null?(this.progress=0,this.request=new u.HttpRequest(this,this.location,this.referrer),this.request.send()):void 0},e.prototype.getCachedSnapshot=function(){var r;return!(r=this.controller.getCachedSnapshotForLocation(this.location))||this.location.anchor!=null&&!r.hasAnchor(this.location.anchor)||this.action!=="restore"&&!r.isPreviewable()?void 0:r},e.prototype.hasCachedSnapshot=function(){return this.getCachedSnapshot()!=null},e.prototype.loadCachedSnapshot=function(){var r,o;return(o=this.getCachedSnapshot())?(r=this.shouldIssueRequest(),this.render(function(){var n;return this.cacheSnapshot(),this.controller.render({snapshot:o,isPreview:r},this.performScroll),typeof(n=this.adapter).visitRendered=="function"&&n.visitRendered(this),r?void 0:this.complete()})):void 0},e.prototype.loadResponse=function(){return this.response!=null?this.render(function(){var r,o;return this.cacheSnapshot(),this.request.failed?(this.controller.render({error:this.response},this.performScroll),typeof(r=this.adapter).visitRendered=="function"&&r.visitRendered(this),this.fail()):(this.controller.render({snapshot:this.response},this.performScroll),typeof(o=this.adapter).visitRendered=="function"&&o.visitRendered(this),this.complete())}):void 0},e.prototype.followRedirect=function(){return this.redirectedToLocation&&!this.followedRedirect?(this.location=this.redirectedToLocation,this.controller.replaceHistoryWithLocationAndRestorationIdentifier(this.redirectedToLocation,this.restorationIdentifier),this.followedRedirect=!0):void 0},e.prototype.requestStarted=function(){var r;return this.recordTimingMetric("requestStart"),typeof(r=this.adapter).visitRequestStarted=="function"?r.visitRequestStarted(this):void 0},e.prototype.requestProgressed=function(r){var o;return this.progress=r,typeof(o=this.adapter).visitRequestProgressed=="function"?o.visitRequestProgressed(this):void 0},e.prototype.requestCompletedWithResponse=function(r,o){return this.response=r,o!=null&&(this.redirectedToLocation=u.Location.wrap(o)),this.adapter.visitRequestCompleted(this)},e.prototype.requestFailedWithStatusCode=function(r,o){return this.response=o,this.adapter.visitRequestFailedWithStatusCode(this,r)},e.prototype.requestFinished=function(){var r;return this.recordTimingMetric("requestEnd"),typeof(r=this.adapter).visitRequestFinished=="function"?r.visitRequestFinished(this):void 0},e.prototype.performScroll=function(){return this.scrolled?void 0:(this.action==="restore"?this.scrollToRestoredPosition()||this.scrollToTop():this.scrollToAnchor()||this.scrollToTop(),this.scrolled=!0)},e.prototype.scrollToRestoredPosition=function(){var r,o;return r=(o=this.restorationData)!=null?o.scrollPosition:void 0,r!=null?(this.controller.scrollToPosition(r),!0):void 0},e.prototype.scrollToAnchor=function(){return this.location.anchor!=null?(this.controller.scrollToAnchor(this.location.anchor),!0):void 0},e.prototype.scrollToTop=function(){return this.controller.scrollToPosition({x:0,y:0})},e.prototype.recordTimingMetric=function(r){var o;return(o=this.timingMetrics)[r]!=null?o[r]:o[r]=new Date().getTime()},e.prototype.getTimingMetrics=function(){return u.copyObject(this.timingMetrics)},t=function(r){switch(r){case"replace":return"replaceHistoryWithLocationAndRestorationIdentifier";case"advance":case"restore":return"pushHistoryWithLocationAndRestorationIdentifier"}},e.prototype.shouldIssueRequest=function(){return this.action==="restore"?!this.hasCachedSnapshot():!0},e.prototype.cacheSnapshot=function(){return this.snapshotCached?void 0:(this.controller.cacheSnapshot(),this.snapshotCached=!0)},e.prototype.render=function(r){return this.cancelRender(),this.frame=requestAnimationFrame(function(o){return function(){return o.frame=null,r.call(o)}}(this))},e.prototype.cancelRender=function(){return this.frame?cancelAnimationFrame(this.frame):void 0},e}()}.call(this),function(){var a=function(e,t){return function(){return e.apply(t,arguments)}};u.Controller=function(){function e(){this.clickBubbled=a(this.clickBubbled,this),this.clickCaptured=a(this.clickCaptured,this),this.pageLoaded=a(this.pageLoaded,this),this.history=new u.History(this),this.view=new u.View(this),this.scrollManager=new u.ScrollManager(this),this.restorationData={},this.clearCache(),this.setProgressBarDelay(500)}return e.prototype.start=function(){return u.supported&&!this.started?(addEventListener("click",this.clickCaptured,!0),addEventListener("DOMContentLoaded",this.pageLoaded,!1),this.scrollManager.start(),this.startHistory(),this.started=!0,this.enabled=!0):void 0},e.prototype.disable=function(){return this.enabled=!1},e.prototype.stop=function(){return this.started?(removeEventListener("click",this.clickCaptured,!0),removeEventListener("DOMContentLoaded",this.pageLoaded,!1),this.scrollManager.stop(),this.stopHistory(),this.started=!1):void 0},e.prototype.clearCache=function(){return this.cache=new u.SnapshotCache(10)},e.prototype.visit=function(t,r){var o,n;return r==null&&(r={}),t=u.Location.wrap(t),this.applicationAllowsVisitingLocation(t)?this.locationIsVisitable(t)?(o=(n=r.action)!=null?n:"advance",this.adapter.visitProposedToLocationWithAction(t,o)):window.location=t:void 0},e.prototype.startVisitToLocationWithAction=function(t,r,o){var n;return u.supported?(n=this.getRestorationDataForIdentifier(o),this.startVisit(t,r,{restorationData:n})):window.location=t},e.prototype.setProgressBarDelay=function(t){return this.progressBarDelay=t},e.prototype.startHistory=function(){return this.location=u.Location.wrap(window.location),this.restorationIdentifier=u.uuid(),this.history.start(),this.history.replace(this.location,this.restorationIdentifier)},e.prototype.stopHistory=function(){return this.history.stop()},e.prototype.pushHistoryWithLocationAndRestorationIdentifier=function(t,r){return this.restorationIdentifier=r,this.location=u.Location.wrap(t),this.history.push(this.location,this.restorationIdentifier)},e.prototype.replaceHistoryWithLocationAndRestorationIdentifier=function(t,r){return this.restorationIdentifier=r,this.location=u.Location.wrap(t),this.history.replace(this.location,this.restorationIdentifier)},e.prototype.historyPoppedToLocationWithRestorationIdentifier=function(t,r){var o;return this.restorationIdentifier=r,this.enabled?(o=this.getRestorationDataForIdentifier(this.restorationIdentifier),this.startVisit(t,"restore",{restorationIdentifier:this.restorationIdentifier,restorationData:o,historyChanged:!0}),this.location=u.Location.wrap(t)):this.adapter.pageInvalidated()},e.prototype.getCachedSnapshotForLocation=function(t){var r;return(r=this.cache.get(t))!=null?r.clone():void 0},e.prototype.shouldCacheSnapshot=function(){return this.view.getSnapshot().isCacheable()},e.prototype.cacheSnapshot=function(){var t,r;return this.shouldCacheSnapshot()?(this.notifyApplicationBeforeCachingSnapshot(),r=this.view.getSnapshot(),t=this.lastRenderedLocation,u.defer(function(o){return function(){return o.cache.put(t,r.clone())}}(this))):void 0},e.prototype.scrollToAnchor=function(t){var r;return(r=this.view.getElementForAnchor(t))?this.scrollToElement(r):this.scrollToPosition({x:0,y:0})},e.prototype.scrollToElement=function(t){return this.scrollManager.scrollToElement(t)},e.prototype.scrollToPosition=function(t){return this.scrollManager.scrollToPosition(t)},e.prototype.scrollPositionChanged=function(t){var r;return r=this.getCurrentRestorationData(),r.scrollPosition=t},e.prototype.render=function(t,r){return this.view.render(t,r)},e.prototype.viewInvalidated=function(){return this.adapter.pageInvalidated()},e.prototype.viewWillRender=function(t){return this.notifyApplicationBeforeRender(t)},e.prototype.viewRendered=function(){return this.lastRenderedLocation=this.currentVisit.location,this.notifyApplicationAfterRender()},e.prototype.pageLoaded=function(){return this.lastRenderedLocation=this.location,this.notifyApplicationAfterPageLoad()},e.prototype.clickCaptured=function(){return removeEventListener("click",this.clickBubbled,!1),addEventListener("click",this.clickBubbled,!1)},e.prototype.clickBubbled=function(t){var r,o,n;return this.enabled&&this.clickEventIsSignificant(t)&&(o=this.getVisitableLinkForNode(t.target))&&(n=this.getVisitableLocationForLink(o))&&this.applicationAllowsFollowingLinkToLocation(o,n)?(t.preventDefault(),r=this.getActionForLink(o),this.visit(n,{action:r})):void 0},e.prototype.applicationAllowsFollowingLinkToLocation=function(t,r){var o;return o=this.notifyApplicationAfterClickingLinkToLocation(t,r),!o.defaultPrevented},e.prototype.applicationAllowsVisitingLocation=function(t){var r;return r=this.notifyApplicationBeforeVisitingLocation(t),!r.defaultPrevented},e.prototype.notifyApplicationAfterClickingLinkToLocation=function(t,r){return u.dispatch("turbolinks:click",{target:t,data:{url:r.absoluteURL},cancelable:!0})},e.prototype.notifyApplicationBeforeVisitingLocation=function(t){return u.dispatch("turbolinks:before-visit",{data:{url:t.absoluteURL},cancelable:!0})},e.prototype.notifyApplicationAfterVisitingLocation=function(t){return u.dispatch("turbolinks:visit",{data:{url:t.absoluteURL}})},e.prototype.notifyApplicationBeforeCachingSnapshot=function(){return u.dispatch("turbolinks:before-cache")},e.prototype.notifyApplicationBeforeRender=function(t){return u.dispatch("turbolinks:before-render",{data:{newBody:t}})},e.prototype.notifyApplicationAfterRender=function(){return u.dispatch("turbolinks:render")},e.prototype.notifyApplicationAfterPageLoad=function(t){return t==null&&(t={}),u.dispatch("turbolinks:load",{data:{url:this.location.absoluteURL,timing:t}})},e.prototype.startVisit=function(t,r,o){var n;return(n=this.currentVisit)!=null&&n.cancel(),this.currentVisit=this.createVisit(t,r,o),this.currentVisit.start(),this.notifyApplicationAfterVisitingLocation(t)},e.prototype.createVisit=function(t,r,o){var n,i,s,l,c;return i=o??{},l=i.restorationIdentifier,s=i.restorationData,n=i.historyChanged,c=new u.Visit(this,t,r),c.restorationIdentifier=l??u.uuid(),c.restorationData=u.copyObject(s),c.historyChanged=n,c.referrer=this.location,c},e.prototype.visitCompleted=function(t){return this.notifyApplicationAfterPageLoad(t.getTimingMetrics())},e.prototype.clickEventIsSignificant=function(t){return!(t.defaultPrevented||t.target.isContentEditable||t.which>1||t.altKey||t.ctrlKey||t.metaKey||t.shiftKey)},e.prototype.getVisitableLinkForNode=function(t){return this.nodeIsVisitable(t)?u.closest(t,"a[href]:not([target]):not([download])"):void 0},e.prototype.getVisitableLocationForLink=function(t){var r;return r=new u.Location(t.getAttribute("href")),this.locationIsVisitable(r)?r:void 0},e.prototype.getActionForLink=function(t){var r;return(r=t.getAttribute("data-turbolinks-action"))!=null?r:"advance"},e.prototype.nodeIsVisitable=function(t){var r;return(r=u.closest(t,"[data-turbolinks]"))?r.getAttribute("data-turbolinks")!=="false":!0},e.prototype.locationIsVisitable=function(t){return t.isPrefixedBy(this.view.getRootLocation())&&t.isHTML()},e.prototype.getCurrentRestorationData=function(){return this.getRestorationDataForIdentifier(this.restorationIdentifier)},e.prototype.getRestorationDataForIdentifier=function(t){var r;return(r=this.restorationData)[t]!=null?r[t]:r[t]={}},e}()}.call(this),function(){(function(){var a,e;if((a=e=document.currentScript)&&!e.hasAttribute("data-turbolinks-suppress-warning")){for(;a=a.parentNode;)if(a===document.body)return console.warn(`You are loading Turbolinks from a + Welcome to CryptoThrone. - -

Welcome to CryptoThrone

-To get started, open the directory src/pages in your project.
Code Challenge: Tweak the "Welcome to Astro" message above. -